@economic/taco 1.1.5-alpha.1 → 1.1.6

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 (404) 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 +23 -18
  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 +12 -14
  13. package/dist/esm/components/Card/Card.js.map +1 -1
  14. package/dist/esm/components/Checkbox/Checkbox.js +18 -15
  15. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  16. package/dist/esm/components/Combobox/Combobox.js +25 -23
  17. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  18. package/dist/esm/components/Combobox/useCombobox.js +87 -67
  19. package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
  20. package/dist/esm/components/Datepicker/Datepicker.js +52 -48
  21. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  22. package/dist/esm/components/Datepicker/useDatepicker.js +34 -27
  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 +58 -39
  27. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  28. package/dist/esm/components/Dialog/components/Content.js +44 -39
  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 +12 -10
  37. package/dist/esm/components/Field/Field.js.map +1 -1
  38. package/dist/esm/components/Form/Form.js +8 -6
  39. package/dist/esm/components/Form/Form.js.map +1 -1
  40. package/dist/esm/components/Group/Group.js +8 -6
  41. package/dist/esm/components/Group/Group.js.map +1 -1
  42. package/dist/esm/components/Hanger/Hanger.js +35 -27
  43. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  44. package/dist/esm/components/HoverCard/HoverCard.js +9 -8
  45. package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
  46. package/dist/esm/components/Icon/Icon.js +8 -7
  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 +11 -9
  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 +25 -24
  261. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  262. package/dist/esm/components/Listbox/ScrollableList.js +83 -64
  263. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  264. package/dist/esm/components/Listbox/useListbox.js +60 -51
  265. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  266. package/dist/esm/components/Listbox/useMultiListbox.js +91 -64
  267. package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
  268. package/dist/esm/components/Listbox/useTypeahead.js +9 -10
  269. package/dist/esm/components/Listbox/useTypeahead.js.map +1 -1
  270. package/dist/esm/components/Listbox/util.js +85 -48
  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 +34 -16
  275. package/dist/esm/components/Menu/Menu.js.map +1 -1
  276. package/dist/esm/components/Menu/components/Checkbox.js +9 -8
  277. package/dist/esm/components/Menu/components/Checkbox.js.map +1 -1
  278. package/dist/esm/components/Menu/components/Content.js +11 -9
  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 +31 -30
  283. package/dist/esm/components/Menu/components/Item.js.map +1 -1
  284. package/dist/esm/components/Menu/components/Link.js +11 -10
  285. package/dist/esm/components/Menu/components/Link.js.map +1 -1
  286. package/dist/esm/components/Menu/components/RadioGroup.js +18 -16
  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 +44 -35
  293. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  294. package/dist/esm/components/Pagination/PageNumbers.js +28 -23
  295. package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
  296. package/dist/esm/components/Pagination/Pagination.js +56 -39
  297. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  298. package/dist/esm/components/Pagination/usePagination.js +21 -7
  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 +34 -29
  303. package/dist/esm/components/Popover/Popover.js.map +1 -1
  304. package/dist/esm/components/Popover/Primitives.js +8 -7
  305. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  306. package/dist/esm/components/Progress/Progress.js +15 -11
  307. package/dist/esm/components/Progress/Progress.js.map +1 -1
  308. package/dist/esm/components/Provider/Provider.js +18 -13
  309. package/dist/esm/components/Provider/Provider.js.map +1 -1
  310. package/dist/esm/components/RadioGroup/RadioGroup.js +57 -45
  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 +31 -30
  315. package/dist/esm/components/Select/Select.js.map +1 -1
  316. package/dist/esm/components/Select/useSelect.js +81 -63
  317. package/dist/esm/components/Select/useSelect.js.map +1 -1
  318. package/dist/esm/components/Spinner/Spinner.js +19 -12
  319. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  320. package/dist/esm/components/Switch/Switch.js +10 -9
  321. package/dist/esm/components/Switch/Switch.js.map +1 -1
  322. package/dist/esm/components/Table/components/BaseTable.js +30 -23
  323. package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
  324. package/dist/esm/components/Table/components/PaginatedTable.js +7 -3
  325. package/dist/esm/components/Table/components/PaginatedTable.js.map +1 -1
  326. package/dist/esm/components/Table/components/Table.js +25 -18
  327. package/dist/esm/components/Table/components/Table.js.map +1 -1
  328. package/dist/esm/components/Table/components/WindowedTable.js +109 -89
  329. package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
  330. package/dist/esm/components/Table/hooks/plugins/useRowActions.js +146 -122
  331. package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  332. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js +61 -57
  333. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  334. package/dist/esm/components/Table/hooks/plugins/useRowEditing.js +36 -39
  335. package/dist/esm/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  336. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js +89 -79
  337. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  338. package/dist/esm/components/Table/hooks/useRowCreation.js +64 -29
  339. package/dist/esm/components/Table/hooks/useRowCreation.js.map +1 -1
  340. package/dist/esm/components/Table/hooks/useTable.js +141 -119
  341. package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
  342. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +16 -13
  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 +46 -37
  347. package/dist/esm/components/Table/util/renderRow.js.map +1 -1
  348. package/dist/esm/components/Table/util/rowIndexPath.js +16 -14
  349. package/dist/esm/components/Table/util/rowIndexPath.js.map +1 -1
  350. package/dist/esm/components/Table/util/sortTypes.js +31 -23
  351. package/dist/esm/components/Table/util/sortTypes.js.map +1 -1
  352. package/dist/esm/components/Table/util.js +41 -29
  353. package/dist/esm/components/Table/util.js.map +1 -1
  354. package/dist/esm/components/Tabs/Tabs.js +27 -25
  355. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  356. package/dist/esm/components/Textarea/Textarea.js +9 -11
  357. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  358. package/dist/esm/components/Toast/Toast.js +21 -20
  359. package/dist/esm/components/Toast/Toast.js.map +1 -1
  360. package/dist/esm/components/Toast/Toaster.js +118 -88
  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 +8 -7
  365. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  366. package/dist/esm/components/Tour/Tour.js +50 -44
  367. package/dist/esm/components/Tour/Tour.js.map +1 -1
  368. package/dist/esm/components/Treeview/Treeview.js +36 -26
  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 +1 -2
  374. package/dist/esm/index.js.map +1 -1
  375. package/dist/esm/primitives/Button.js +13 -9
  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 +17 -16
  380. package/dist/esm/utils/hooks/useDraggable.js.map +1 -1
  381. package/dist/esm/utils/hooks/useDropTarget.js +10 -7
  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 +17 -9
  388. package/dist/esm/utils/hooks/useTimer.js.map +1 -1
  389. package/dist/esm/utils/input.js +11 -7
  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 +0 -1
  397. package/dist/taco.cjs.development.js +2586 -2116
  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 +3 -4
  403. package/plugins/tailwindcss-aria-attributes.js +73 -73
  404. package/tailwind.config.js +255 -260
@@ -1,21 +1,23 @@
1
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import { forwardRef, useMemo, createElement, createContext, useContext, isValidElement } from 'react';
2
3
  import cn from 'classnames';
3
4
  import { Root, Trigger as Trigger$1, Close as Close$1 } from '@radix-ui/react-popover';
4
5
  import { UnstyledContent, UnstyledArrow } from './Primitives.js';
5
6
  import mergeRefs from '../../utils/mergeRefs.js';
6
7
 
7
- const PopoverContext = /*#__PURE__*/createContext({
8
+ var _excluded = ["children", "trigger"];
9
+ var PopoverContext = /*#__PURE__*/createContext({
8
10
  props: {},
9
11
  ref: null
10
12
  });
11
- const Trigger = /*#__PURE__*/forwardRef(function PopoverTrigger(props, ref) {
13
+ var Trigger = /*#__PURE__*/forwardRef(function PopoverTrigger(props, ref) {
12
14
  var _props$children;
13
15
 
14
- const context = useContext(PopoverContext);
15
- let children = props.children;
16
+ var context = useContext(PopoverContext);
17
+ var children = props.children;
16
18
 
17
19
  if (isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
18
- console.warn(`Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`);
20
+ console.warn("Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '" + props.children.type.name + "' in React.forwardRef()? Taco has wrapped '" + props.children.type.name + "' in a 'span' to maintain functionality, but this may cause unintended behaviour");
19
21
  children = createElement("span", null, props.children);
20
22
  }
21
23
 
@@ -25,22 +27,22 @@ const Trigger = /*#__PURE__*/forwardRef(function PopoverTrigger(props, ref) {
25
27
  asChild: true
26
28
  }));
27
29
  });
28
- const RenderPropWrapper = /*#__PURE__*/forwardRef(function RenderPropWrapper({
29
- children,
30
- onClick
31
- }, ref) {
32
- const close = () => {
30
+ var RenderPropWrapper = /*#__PURE__*/forwardRef(function RenderPropWrapper(_ref, ref) {
31
+ var children = _ref.children,
32
+ onClick = _ref.onClick;
33
+
34
+ var close = function close() {
33
35
  onClick(new CustomEvent('hide'));
34
36
  };
35
37
 
36
38
  return children({
37
- close,
38
- ref
39
+ close: close,
40
+ ref: ref
39
41
  });
40
42
  });
41
- const Content = /*#__PURE__*/forwardRef(function PopoverContent(props, ref) {
42
- const className = cn('bg-white focus:border-blue-light', props.className);
43
- let output;
43
+ var Content = /*#__PURE__*/forwardRef(function PopoverContent(props, ref) {
44
+ var className = cn('bg-white focus:border-blue-light', props.className);
45
+ var output;
44
46
 
45
47
  if (typeof props.children === 'function') {
46
48
  output = createElement(Close$1, {
@@ -58,20 +60,23 @@ const Content = /*#__PURE__*/forwardRef(function PopoverContent(props, ref) {
58
60
  className: "text-white"
59
61
  }));
60
62
  });
61
- const Close = /*#__PURE__*/forwardRef((props, ref) => createElement(Close$1, Object.assign({}, props, {
62
- ref: ref,
63
- asChild: true
64
- })));
65
- const Popover = /*#__PURE__*/forwardRef(function Popover(props, ref) {
66
- const {
67
- children,
68
- trigger,
69
- ...otherProps
70
- } = props;
71
- const context = useMemo(() => ({
72
- props: otherProps,
73
- ref
74
- }), [otherProps]);
63
+ var Close = /*#__PURE__*/forwardRef(function (props, ref) {
64
+ return createElement(Close$1, Object.assign({}, props, {
65
+ ref: ref,
66
+ asChild: true
67
+ }));
68
+ });
69
+ var Popover = /*#__PURE__*/forwardRef(function Popover(props, ref) {
70
+ var children = props.children,
71
+ trigger = props.trigger,
72
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
73
+
74
+ var context = useMemo(function () {
75
+ return {
76
+ props: otherProps,
77
+ ref: ref
78
+ };
79
+ }, [otherProps]);
75
80
  return createElement(PopoverContext.Provider, {
76
81
  value: context
77
82
  }, createElement(Root, null, trigger && createElement(Trigger, null, trigger), children));
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\nimport { Placement } from '../..';\r\nimport { UnstyledArrow, UnstyledContent } from './Primitives';\r\nimport mergeRefs from '../../utils/mergeRefs';\r\n\r\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement> };\r\n\r\nconst PopoverContext = React.createContext<PopoverContextValue>({\r\n props: {},\r\n ref: null,\r\n});\r\n\r\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLButtonElement>;\r\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, ref: React.Ref<HTMLButtonElement>) {\r\n const context = React.useContext(PopoverContext);\r\n let children = props.children;\r\n\r\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\r\n console.warn(\r\n `Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\r\n );\r\n children = <span>{props.children}</span>;\r\n }\r\n\r\n return (\r\n <PopoverPrimitive.Trigger {...context.props} {...props} children={children} ref={mergeRefs([context.ref, ref])} asChild />\r\n );\r\n});\r\n\r\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\r\n const close = () => {\r\n onClick(new CustomEvent('hide'));\r\n };\r\n\r\n return children({ close, ref });\r\n});\r\n\r\nexport type PopoverContentRenderProps = { close: () => void };\r\nexport type PopoverContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\r\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\r\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\r\n placement?: Placement;\r\n};\r\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\r\n const className = cn('bg-white focus:border-blue-light', props.className);\r\n\r\n let output;\r\n\r\n if (typeof props.children === 'function') {\r\n output = (\r\n <PopoverPrimitive.Close asChild>\r\n <RenderPropWrapper>{props.children}</RenderPropWrapper>\r\n </PopoverPrimitive.Close>\r\n );\r\n } else {\r\n output = props.children;\r\n }\r\n\r\n return (\r\n <UnstyledContent className={className} placement={props.placement} ref={ref}>\r\n {output}\r\n <UnstyledArrow className=\"text-white\" />\r\n </UnstyledContent>\r\n );\r\n});\r\n\r\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement>;\r\nconst Close = React.forwardRef(\r\n (props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => (\r\n <PopoverPrimitive.Close {...props} ref={ref} asChild />\r\n )\r\n);\r\n\r\nexport type PopoverProps = React.PropsWithChildren<{\r\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\r\n trigger?: JSX.Element;\r\n}>;\r\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\r\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\r\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\r\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\r\n};\r\n\r\nexport const Popover = React.forwardRef(function Popover(props: PopoverProps, ref: React.Ref<HTMLElement>) {\r\n const { children, trigger, ...otherProps } = props;\r\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\r\n\r\n return (\r\n <PopoverContext.Provider value={context}>\r\n <PopoverPrimitive.Root>\r\n {trigger && <Trigger>{trigger}</Trigger>}\r\n {children}\r\n </PopoverPrimitive.Root>\r\n </PopoverContext.Provider>\r\n );\r\n}) as ForwardedPopoverWithStatics;\r\nPopover.Trigger = Trigger;\r\nPopover.Content = Content;\r\nPopover.Close = Close;\r\n"],"names":["PopoverContext","React","props","ref","Trigger","PopoverTrigger","context","children","type","console","warn","name","PopoverPrimitive","mergeRefs","asChild","RenderPropWrapper","onClick","close","CustomEvent","Content","PopoverContent","className","cn","output","UnstyledContent","placement","UnstyledArrow","Close","Popover","trigger","otherProps","Provider","value"],"mappings":";;;;;;AASA,MAAMA,cAAc,gBAAGC,aAAA,CAAyC;EAC5DC,KAAK,EAAE,EADqD;EAE5DC,GAAG,EAAE;AAFuD,CAAzC,CAAvB;AAMA,MAAMC,OAAO,gBAAGH,UAAA,CAAiB,SAASI,cAAT,CAAwBH,KAAxB,EAAoDC,GAApD;;;EAC7B,MAAMG,OAAO,GAAGL,UAAA,CAAiBD,cAAjB,CAAhB;EACA,IAAIO,QAAQ,GAAGL,KAAK,CAACK,QAArB;;EAEA,IAAIN,cAAA,CAAqBC,KAAK,CAACK,QAA3B,KAAwC,2BAAOL,KAAK,CAACK,QAAb,oDAAO,gBAAgBC,IAAvB,MAAgC,UAA5E,EAAwF;IACpFC,OAAO,CAACC,IAAR,qHACwHR,KAAK,CAACK,QAAN,CAAeC,IAAf,CAAoBG,kDAAkDT,KAAK,CAACK,QAAN,CAAeC,IAAf,CAAoBG,sFADlN;IAGAJ,QAAQ,GAAGN,aAAA,OAAA,MAAA,EAAOC,KAAK,CAACK,QAAb,CAAX;;;EAGJ,OACIN,aAAA,CAACW,SAAD,oBAA8BN,OAAO,CAACJ,OAAWA;IAAOK,QAAQ,EAAEA;IAAUJ,GAAG,EAAEU,SAAS,CAAC,CAACP,OAAO,CAACH,GAAT,EAAcA,GAAd,CAAD;IAAsBW,OAAO;IAAvH,CADJ;AAGH,CAde,CAAhB;AAgBA,MAAMC,iBAAiB,gBAAGd,UAAA,CAAiB,SAASc,iBAAT,CAA2B;EAAER,QAAF;EAAYS;AAAZ,CAA3B,EAAuDb,GAAvD;EACvC,MAAMc,KAAK,GAAG;IACVD,OAAO,CAAC,IAAIE,WAAJ,CAAgB,MAAhB,CAAD,CAAP;GADJ;;EAIA,OAAOX,QAAQ,CAAC;IAAEU,KAAF;IAASd;GAAV,CAAf;AACH,CANyB,CAA1B;AAcA,MAAMgB,OAAO,g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,OAAV,CADhB,EAEKtB,QAFL,CADJ,CADJ;AAQH,CAZsB;AAavBqB,OAAO,CAACxB,OAAR,GAAkBA,OAAlB;AACAwB,OAAO,CAACT,OAAR,GAAkBA,OAAlB;AACAS,OAAO,CAACD,KAAR,GAAgBA,KAAhB;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { Placement } from '../..';\nimport { UnstyledArrow, UnstyledContent } from './Primitives';\nimport mergeRefs from '../../utils/mergeRefs';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n props: {},\n ref: null,\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLButtonElement>;\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, ref: React.Ref<HTMLButtonElement>) {\n const context = React.useContext(PopoverContext);\n let children = props.children;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n console.warn(\n `Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\n );\n children = <span>{props.children}</span>;\n }\n\n return (\n <PopoverPrimitive.Trigger {...context.props} {...props} children={children} ref={mergeRefs([context.ref, ref])} asChild />\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\nexport type PopoverContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn('bg-white focus:border-blue-light', props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = (\n <PopoverPrimitive.Close asChild>\n <RenderPropWrapper>{props.children}</RenderPropWrapper>\n </PopoverPrimitive.Close>\n );\n } else {\n output = props.children;\n }\n\n return (\n <UnstyledContent className={className} placement={props.placement} ref={ref}>\n {output}\n <UnstyledArrow className=\"text-white\" />\n </UnstyledContent>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement>;\nconst Close = React.forwardRef(\n (props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => (\n <PopoverPrimitive.Close {...props} ref={ref} asChild />\n )\n);\n\nexport type PopoverProps = React.PropsWithChildren<{\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n};\n\nexport const Popover = React.forwardRef(function Popover(props: PopoverProps, ref: React.Ref<HTMLElement>) {\n const { children, trigger, ...otherProps } = props;\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\n\n return (\n <PopoverContext.Provider value={context}>\n <PopoverPrimitive.Root>\n {trigger && <Trigger>{trigger}</Trigger>}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\n"],"names":["PopoverContext","React","props","ref","Trigger","PopoverTrigger","context","children","type","console","warn","name","PopoverPrimitive","mergeRefs","asChild","RenderPropWrapper","onClick","close","CustomEvent","Content","PopoverContent","className","cn","output","UnstyledContent","placement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AE1B;GAAhC,EACIL,aAAA,CAACW,IAAD,MAAA,EACKiB,OAAO,IAAI5B,aAAA,CAACG,OAAD,MAAA,EAAUyB,OAAV,CADhB,EAEKtB,QAFL,CADJ,CADJ;AAQH,CAZsB;AAavBqB,OAAO,CAACxB,OAAR,GAAkBA,OAAlB;AACAwB,OAAO,CAACT,OAAR,GAAkBA,OAAlB;AACAS,OAAO,CAACD,KAAR,GAAgBA,KAAhB;;;;"}
@@ -1,8 +1,10 @@
1
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import { forwardRef, createElement } from 'react';
2
3
  import cn from 'classnames';
3
4
  import { Arrow, Content } from '@radix-ui/react-popover';
4
5
 
5
- const UnstyledArrow = /*#__PURE__*/forwardRef(function PopoverArrow(props, ref) {
6
+ var _excluded = ["placement"];
7
+ var UnstyledArrow = /*#__PURE__*/forwardRef(function PopoverArrow(props, ref) {
6
8
  return createElement(Arrow, {
7
9
  className: "pointer-events-none -mt-px",
8
10
  asChild: true,
@@ -23,12 +25,11 @@ const UnstyledArrow = /*#__PURE__*/forwardRef(function PopoverArrow(props, ref)
23
25
  d: "M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"
24
26
  })));
25
27
  });
26
- const UnstyledContent = /*#__PURE__*/forwardRef(function PopoverContent(props, ref) {
27
- const {
28
- placement: side,
29
- ...otherProps
30
- } = props;
31
- const className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group z-[996]', props.className);
28
+ var UnstyledContent = /*#__PURE__*/forwardRef(function PopoverContent(props, ref) {
29
+ var side = props.placement,
30
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
31
+
32
+ var className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group z-[996]', props.className);
32
33
  return createElement(Content, Object.assign({}, otherProps, {
33
34
  className: className,
34
35
  side: side,
@@ -1 +1 @@
1
- {"version":3,"file":"Primitives.js","sources":["../../../../src/components/Popover/Primitives.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\nimport { Placement } from '../../types';\r\n\r\nexport const UnstyledArrow = React.forwardRef(function PopoverArrow(\r\n props: React.SVGAttributes<SVGElement>,\r\n ref: React.Ref<SVGSVGElement>\r\n) {\r\n return (\r\n <PopoverPrimitive.Arrow className=\"pointer-events-none -mt-px\" asChild offset={2} width={30} height={11}>\r\n <svg {...props} ref={ref} viewBox=\"0 19 30 11\" style={{ transform: 'rotateZ(180deg)' }}>\r\n <path\r\n className=\"text-grey-dark group-focus:text-blue-light fill-current\"\r\n d=\"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26 C26.7,29,24.6,28.1,23.7,27.1z\"\r\n ></path>\r\n <path\r\n className=\"fill-current\"\r\n d=\"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z\"\r\n ></path>\r\n </svg>\r\n </PopoverPrimitive.Arrow>\r\n );\r\n});\r\n\r\nexport type UnstyledContentProps = Omit<PopoverPrimitive.PopoverContentProps, 'side'> & {\r\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\r\n placement?: Placement;\r\n};\r\nexport const UnstyledContent = React.forwardRef(function PopoverContent(\r\n props: UnstyledContentProps,\r\n ref: React.Ref<HTMLDivElement>\r\n) {\r\n const { placement: side, ...otherProps } = props;\r\n\r\n const className = cn(\r\n 'border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group z-[996]',\r\n props.className\r\n );\r\n\r\n return <PopoverPrimitive.Content {...otherProps} className={className} side={side} sideOffset={1} ref={ref} />;\r\n});\r\n"],"names":["UnstyledArrow","React","PopoverArrow","props","ref","PopoverPrimitive","className","asChild","offset","width","height","viewBox","style","transform","d","UnstyledContent","PopoverContent","placement","side","otherProps","cn","sideOffset"],"mappings":";;;;MAKaA,aAAa,gBAAGC,UAAA,CAAiB,SAASC,YAAT,CAC1CC,KAD0C,EAE1CC,GAF0C;EAI1C,OACIH,aAAA,CAACI,KAAD;IAAwBC,SAAS,EAAC;IAA6BC,OAAO;IAACC,MAAM,EAAE;IAAGC,KAAK,EAAE;IAAIC,MAAM,EAAE;GAArG,EACIT,aAAA,MAAA,oBAASE;IAAOC,GAAG,EAAEA;IAAKO,OAAO,EAAC;IAAaC,KAAK,EAAE;MAAEC,SAAS,EAAE;;IAAnE,EACIZ,aAAA,OAAA;IACIK,SAAS,EAAC;IACVQ,CAAC,EAAC;GAFN,CADJ,EAKIb,aAAA,OAAA;IACIK,SAAS,EAAC;IACVQ,CAAC,EAAC;GAFN,CALJ,CADJ,CADJ;AAcH,CAlB4B;MAwBhBC,eAAe,gBAAGd,UAAA,CAAiB,SAASe,cAAT,CAC5Cb,KAD4C,EAE5CC,GAF4C;EAI5C,MAAM;IAAEa,SAAS,EAAEC,IAAb;IAAmB,GAAGC;MAAehB,KAA3C;EAEA,MAAMG,SAAS,GAAGc,EAAE,CAChB,2FADgB,EAEhBjB,KAAK,CAACG,SAFU,CAApB;EAKA,OAAOL,aAAA,CAACI,OAAD,oBAA8Bc;IAAYb,SAAS,EAAEA;IAAWY,IAAI,EAAEA;IAAMG,UAAU,EAAE;IAAGjB,GAAG,EAAEA;IAAhG,CAAP;AACH,CAZ8B;;;;"}
1
+ {"version":3,"file":"Primitives.js","sources":["../../../../src/components/Popover/Primitives.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { Placement } from '../../types';\n\nexport const UnstyledArrow = React.forwardRef(function PopoverArrow(\n props: React.SVGAttributes<SVGElement>,\n ref: React.Ref<SVGSVGElement>\n) {\n return (\n <PopoverPrimitive.Arrow className=\"pointer-events-none -mt-px\" asChild offset={2} width={30} height={11}>\n <svg {...props} ref={ref} viewBox=\"0 19 30 11\" style={{ transform: 'rotateZ(180deg)' }}>\n <path\n className=\"text-grey-dark group-focus:text-blue-light fill-current\"\n d=\"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26 C26.7,29,24.6,28.1,23.7,27.1z\"\n ></path>\n <path\n className=\"fill-current\"\n d=\"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z\"\n ></path>\n </svg>\n </PopoverPrimitive.Arrow>\n );\n});\n\nexport type UnstyledContentProps = Omit<PopoverPrimitive.PopoverContentProps, 'side'> & {\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nexport const UnstyledContent = React.forwardRef(function PopoverContent(\n props: UnstyledContentProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const { placement: side, ...otherProps } = props;\n\n const className = cn(\n 'border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group z-[996]',\n props.className\n );\n\n return <PopoverPrimitive.Content {...otherProps} className={className} side={side} sideOffset={1} ref={ref} />;\n});\n"],"names":["UnstyledArrow","React","PopoverArrow","props","ref","PopoverPrimitive","className","asChild","offset","width","height","viewBox","style","transform","d","UnstyledContent","PopoverContent","side","placement","otherProps","cn","sideOffset"],"mappings":";;;;;;IAKaA,aAAa,gBAAGC,UAAA,CAAiB,SAASC,YAAT,CAC1CC,KAD0C,EAE1CC,GAF0C;EAI1C,OACIH,aAAA,CAACI,KAAD;IAAwBC,SAAS,EAAC;IAA6BC,OAAO;IAACC,MAAM,EAAE;IAAGC,KAAK,EAAE;IAAIC,MAAM,EAAE;GAArG,EACIT,aAAA,MAAA,oBAASE;IAAOC,GAAG,EAAEA;IAAKO,OAAO,EAAC;IAAaC,KAAK,EAAE;MAAEC,SAAS,EAAE;;IAAnE,EACIZ,aAAA,OAAA;IACIK,SAAS,EAAC;IACVQ,CAAC,EAAC;GAFN,CADJ,EAKIb,aAAA,OAAA;IACIK,SAAS,EAAC;IACVQ,CAAC,EAAC;GAFN,CALJ,CADJ,CADJ;AAcH,CAlB4B;IAwBhBC,eAAe,gBAAGd,UAAA,CAAiB,SAASe,cAAT,CAC5Cb,KAD4C,EAE5CC,GAF4C;EAI5C,IAAmBa,IAAnB,GAA2Cd,KAA3C,CAAQe,SAAR;MAA4BC,UAA5B,iCAA2ChB,KAA3C;;EAEA,IAAMG,SAAS,GAAGc,EAAE,CAChB,2FADgB,EAEhBjB,KAAK,CAACG,SAFU,CAApB;EAKA,OAAOL,aAAA,CAACI,OAAD,oBAA8Bc;IAAYb,SAAS,EAAEA;IAAWW,IAAI,EAAEA;IAAMI,UAAU,EAAE;IAAGjB,GAAG,EAAEA;IAAhG,CAAP;AACH,CAZ8B;;;;"}
@@ -1,23 +1,27 @@
1
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import React__default from 'react';
2
3
  import cn from 'classnames';
3
4
 
4
- const Progress = ({
5
- duration = undefined,
6
- ...props
7
- }) => {
8
- let style;
5
+ var _excluded = ["duration"];
6
+ var Progress = function Progress(_ref) {
7
+ var _cn;
8
+
9
+ var _ref$duration = _ref.duration,
10
+ duration = _ref$duration === void 0 ? undefined : _ref$duration,
11
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
12
+
13
+ var style;
9
14
 
10
15
  if (duration) {
11
16
  style = {
12
- animationDuration: `${duration}ms`
17
+ animationDuration: duration + "ms"
13
18
  };
14
19
  }
15
20
 
16
- const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
17
- const progressClassName = cn('yt-progress__bar block h-1', {
18
- "w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration,
19
- [`w-0 bg-grey-dark animate-[progress_linear]`]: duration
20
- });
21
+ var className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
22
+ var progressClassName = cn('yt-progress__bar block h-1', (_cn = {
23
+ "w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration
24
+ }, _cn["w-0 bg-grey-dark animate-[progress_linear]"] = duration, _cn));
21
25
  return React__default.createElement("span", Object.assign({}, props, {
22
26
  "data-taco": "progress",
23
27
  className: className
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.js","sources":["../../../../src/components/Progress/Progress.tsx"],"sourcesContent":["import React from 'react';\r\nimport cn from 'classnames';\r\nimport './Progress.css';\r\n\r\nexport type ProgressProps = React.HTMLAttributes<HTMLSpanElement> & {\r\n /**\r\n * Indicates how long (in milliseconds) a progress bar will take to progress through.\r\n * By default, progress bar has no duration\r\n */\r\n duration?: number;\r\n};\r\n\r\nexport const Progress = ({ duration = undefined, ...props }: ProgressProps): JSX.Element => {\r\n let style;\r\n\r\n if (duration) {\r\n style = {\r\n animationDuration: `${duration}ms`,\r\n };\r\n }\r\n\r\n const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);\r\n\r\n const progressClassName = cn('yt-progress__bar block h-1', {\r\n \"w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']\":\r\n !duration,\r\n [`w-0 bg-grey-dark animate-[progress_linear]`]: duration,\r\n });\r\n\r\n return (\r\n <span {...props} data-taco=\"progress\" className={className}>\r\n <span className={progressClassName} data-taco=\"progress-bar\" style={style} />\r\n </span>\r\n );\r\n};\r\n"],"names":["Progress","duration","undefined","props","style","animationDuration","className","cn","progressClassName","React"],"mappings":";;;MAYaA,QAAQ,GAAG,CAAC;EAAEC,QAAQ,GAAGC,SAAb;EAAwB,GAAGC;AAA3B,CAAD;EACpB,IAAIC,KAAJ;;EAEA,IAAIH,QAAJ,EAAc;IACVG,KAAK,GAAG;MACJC,iBAAiB,KAAKJ;KAD1B;;;EAKJ,MAAMK,SAAS,GAAGC,EAAE,CAAC,wDAAD,EAA2DJ,KAAK,CAACG,SAAjE,CAApB;EAEA,MAAME,iBAAiB,GAAGD,EAAE,CAAC,4BAAD,EAA+B;IACvD,yJACI,CAACN,QAFkD;IAGvD,6CAAA,GAAgDA;GAHxB,CAA5B;EAMA,OACIQ,4BAAA,OAAA,oBAAUN;iBAAiB;IAAWG,SAAS,EAAEA;IAAjD,EACIG,4BAAA,OAAA;IAAMH,SAAS,EAAEE;iBAA6B;IAAeJ,KAAK,EAAEA;GAApE,CADJ,CADJ;AAKH;;;;"}
1
+ {"version":3,"file":"Progress.js","sources":["../../../../src/components/Progress/Progress.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport './Progress.css';\n\nexport type ProgressProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Indicates how long (in milliseconds) a progress bar will take to progress through.\n * By default, progress bar has no duration\n */\n duration?: number;\n};\n\nexport const Progress = ({ duration = undefined, ...props }: ProgressProps): JSX.Element => {\n let style;\n\n if (duration) {\n style = {\n animationDuration: `${duration}ms`,\n };\n }\n\n const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);\n\n const progressClassName = cn('yt-progress__bar block h-1', {\n \"w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']\":\n !duration,\n [`w-0 bg-grey-dark animate-[progress_linear]`]: duration,\n });\n\n return (\n <span {...props} data-taco=\"progress\" className={className}>\n <span className={progressClassName} data-taco=\"progress-bar\" style={style} />\n </span>\n );\n};\n"],"names":["Progress","duration","undefined","props","style","animationDuration","className","cn","progressClassName","React"],"mappings":";;;;;IAYaA,QAAQ,GAAG,SAAXA,QAAW;;;2BAAGC;MAAAA,sCAAWC;MAAcC;;EAChD,IAAIC,KAAJ;;EAEA,IAAIH,QAAJ,EAAc;IACVG,KAAK,GAAG;MACJC,iBAAiB,EAAKJ,QAAL;KADrB;;;EAKJ,IAAMK,SAAS,GAAGC,EAAE,CAAC,wDAAD,EAA2DJ,KAAK,CAACG,SAAjE,CAApB;EAEA,IAAME,iBAAiB,GAAGD,EAAE,CAAC,4BAAD;IACxB,yJACI,CAACN;yDAC2CA,QAHxB,OAA5B;EAMA,OACIQ,4BAAA,OAAA,oBAAUN;iBAAiB;IAAWG,SAAS,EAAEA;IAAjD,EACIG,4BAAA,OAAA;IAAMH,SAAS,EAAEE;iBAA6B;IAAeJ,KAAK,EAAEA;GAApE,CADJ,CADJ;AAKH;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { useMemo, createElement, useContext, createContext } from 'react';
2
2
  import { ToastProvider } from '../Toast/Toaster.js';
3
3
 
4
- const defaultLocalisationTexts = {
4
+ var defaultLocalisationTexts = {
5
5
  calendar: {
6
6
  months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
7
7
  weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
@@ -76,30 +76,35 @@ const defaultLocalisationTexts = {
76
76
  inputLabel: 'Search...'
77
77
  }
78
78
  };
79
- const defaultLocalizationContext = {
79
+ var defaultLocalizationContext = {
80
80
  locale: 'en-GB',
81
81
  texts: defaultLocalisationTexts,
82
82
  formatting: {
83
83
  date: 'dd.mm.yy'
84
84
  }
85
85
  };
86
- const Context = /*#__PURE__*/createContext({
86
+ var Context = /*#__PURE__*/createContext({
87
87
  localization: defaultLocalizationContext
88
88
  });
89
- const Provider = props => {
90
- const {
91
- children,
92
- localization = defaultLocalizationContext
93
- } = props;
94
- const value = useMemo(() => ({
95
- localization
96
- }), [localization]);
89
+ var Provider = function Provider(props) {
90
+ var children = props.children,
91
+ _props$localization = props.localization,
92
+ localization = _props$localization === void 0 ? defaultLocalizationContext : _props$localization;
93
+ var value = useMemo(function () {
94
+ return {
95
+ localization: localization
96
+ };
97
+ }, [localization]);
97
98
  return createElement(Context.Provider, {
98
99
  value: value
99
100
  }, createElement(ToastProvider, null, children));
100
101
  };
101
- const useTaco = () => useContext(Context);
102
- const useLocalization = () => useTaco().localization;
102
+ var useTaco = function useTaco() {
103
+ return useContext(Context);
104
+ };
105
+ var useLocalization = function useLocalization() {
106
+ return useTaco().localization;
107
+ };
103
108
 
104
109
  export { Provider, defaultLocalisationTexts, useLocalization, useTaco };
105
110
  //# sourceMappingURL=Provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.js","sources":["../../../../src/components/Provider/Provider.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport { Locale } from '../../types';\r\nimport { CalendarTexts } from '../Calendar/Calendar';\r\nimport { ComboboxTexts } from '../Combobox/Combobox';\r\nimport { DialogTexts } from '../Dialog/Dialog';\r\nimport { PaginationTexts } from '../Pagination/Pagination';\r\nimport { ListboxTexts } from '../Listbox/Listbox';\r\nimport { ToastsTexts } from '../Toast/Toast';\r\nimport { DatepickerTexts } from '../Datepicker/Datepicker';\r\nimport { HangerTexts } from '../Hanger/Hanger';\r\nimport { SelectTexts } from '../Select/Select';\r\nimport { TourTexts } from '../Tour/Tour';\r\nimport { TableTexts } from '../Table/Table';\r\nimport { SearchInputTexts } from '../SearchInput/SearchInput';\r\nimport { ToastProvider } from '../Toast/Toaster';\r\n\r\nexport type LocalizationTexts = {\r\n /** Localized texts and aria-labels for [Calendar](component:calendar) component */\r\n calendar: CalendarTexts;\r\n /** Localized texts and aria-labels for [Combobox](component:combobox) component */\r\n combobox: ComboboxTexts;\r\n /** Localized texts and aria-labels for [DatePicker](component:datepicker) component */\r\n datepicker: DatepickerTexts;\r\n /** Localized texts and aria-labels for [Hanger](component:hanger) component */\r\n hanger: HangerTexts;\r\n /** Localized texts and aria-labels for [Listbox](component:listbox) component */\r\n listbox: ListboxTexts;\r\n /** Localized texts and aria-labels for [Dialog](component:dialog) component */\r\n dialog: DialogTexts;\r\n /** Localized texts and aria-labels for [Pagination](component:pagination) component */\r\n pagination: PaginationTexts;\r\n /** Localized texts and aria-labels for [Table](component:table) component */\r\n table: TableTexts;\r\n /** Localized texts and aria-labels for [Select](component:select) component */\r\n select: SelectTexts;\r\n /** Localized texts and aria-labels for [Toast](component:toast) component */\r\n toasts: ToastsTexts;\r\n /** Localized texts and aria-labels for [Tour](component:tour) component */\r\n tour: TourTexts;\r\n /** Localized texts and aria-labels for [SearchInput](component:searchinput) component */\r\n searchInput: SearchInputTexts;\r\n};\r\n\r\nexport type Localization = {\r\n /**\r\n * Provide the language code used in application.\r\n * Default value is `en-GB`\r\n */\r\n locale: Locale;\r\n /** Provide the texts and aria-labels for components used within the provider */\r\n texts: LocalizationTexts;\r\n /** Provide the formatting */\r\n formatting: {\r\n /** Default value is `dd.mm.yy` */\r\n date: string;\r\n };\r\n};\r\nexport type Taco = {\r\n /** Define localized texts and formatted data in your application */\r\n localization: Localization;\r\n};\r\n\r\nexport const defaultLocalisationTexts = {\r\n calendar: {\r\n months: [\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December',\r\n ],\r\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\r\n actions: {\r\n previousMonth: 'Previous month',\r\n nextMonth: 'Next month',\r\n previousYear: 'Previous year',\r\n nextYear: 'Next year',\r\n today: 'Today',\r\n },\r\n },\r\n combobox: {\r\n tooltip: 'Search in list',\r\n },\r\n datepicker: {\r\n calendar: 'Calendar',\r\n clear: 'Clear',\r\n expand: 'Show calendar',\r\n shortcuts: 'Shortcuts',\r\n },\r\n hanger: {\r\n close: 'Close',\r\n },\r\n listbox: {\r\n loading: 'Loading results...',\r\n empty: 'No results found',\r\n allOption: 'All',\r\n },\r\n dialog: {\r\n close: 'Close',\r\n drag: 'Drag',\r\n },\r\n pagination: {\r\n label: 'Pagination',\r\n pageSize: 'Items per page',\r\n showingXofYofTotal: 'Showing [X] - [Y] of [total]',\r\n actions: {\r\n firstPage: 'Goto first page',\r\n firstPageWithShortcut: 'Goto first page (Home)',\r\n previousPage: 'Goto previous page',\r\n previousPageWithShortcut: 'Goto previous page (Page Up)',\r\n nextPage: 'Goto next page',\r\n nextPageWithShortcut: 'Goto next page (Page Down)',\r\n lastPage: 'Goto last page',\r\n lastPageWithShortcut: 'Goto last page (End)',\r\n pageX: 'Goto page [X]',\r\n },\r\n },\r\n table: {\r\n actions: 'Other actions',\r\n edit: 'Edit (e)',\r\n copy: 'Copy (c)',\r\n del: 'Delete (del)',\r\n newSubRow: 'New row (shift + n)',\r\n loading: 'Loading...',\r\n },\r\n select: {\r\n allOptionsSelected: 'All',\r\n },\r\n toasts: {\r\n dismiss: 'Dismiss',\r\n },\r\n tour: {\r\n back: 'Back',\r\n close: 'Close',\r\n skip: 'Close and complete',\r\n last: 'Done',\r\n next: 'Next',\r\n open: 'Open',\r\n },\r\n searchInput: {\r\n inputLabel: 'Search...',\r\n },\r\n};\r\n\r\nconst defaultLocalizationContext: Localization = {\r\n locale: 'en-GB',\r\n texts: defaultLocalisationTexts,\r\n formatting: {\r\n date: 'dd.mm.yy',\r\n },\r\n};\r\n\r\nconst Context = React.createContext<Taco>({\r\n localization: defaultLocalizationContext,\r\n});\r\n\r\nexport type ProviderProps = {\r\n /** Content would be your application */\r\n children?: any;\r\n /** Define localized texts and formatted data in your application */\r\n localization?: Localization;\r\n};\r\n\r\nexport const Provider = (props: ProviderProps): JSX.Element => {\r\n const { children, localization = defaultLocalizationContext } = props;\r\n const value = React.useMemo(() => ({ localization }), [localization]);\r\n\r\n return (\r\n <Context.Provider value={value}>\r\n <ToastProvider>{children}</ToastProvider>\r\n </Context.Provider>\r\n );\r\n};\r\n\r\nexport const useTaco = (): Taco => React.useContext(Context);\r\nexport const useLocalization = (): Localization => useTaco().localization;\r\n"],"names":["defaultLocalisationTexts","calendar","months","weekdaysShort","actions","previousMonth","nextMonth","previousYear","nextYear","today","combobox","tooltip","datepicker","clear","expand","shortcuts","hanger","close","listbox","loading","empty","allOption","dialog","drag","pagination","label","pageSize","showingXofYofTotal","firstPage","firstPageWithShortcut","previousPage","previousPageWithShortcut","nextPage","nextPageWithShortcut","lastPage","lastPageWithShortcut","pageX","table","edit","copy","del","newSubRow","select","allOptionsSelected","toasts","dismiss","tour","back","skip","last","next","open","searchInput","inputLabel","defaultLocalizationContext","locale","texts","formatting","date","Context","React","localization","Provider","props","children","value","ToastProvider","useTaco","useLocalization"],"mappings":";;;MA+DaA,wBAAwB,GAAG;EACpCC,QAAQ,EAAE;IACNC,MAAM,EAAE,CACJ,SADI,EAEJ,UAFI,EAGJ,OAHI,EAIJ,OAJI,EAKJ,KALI,EAMJ,MANI,EAOJ,MAPI,EAQJ,QARI,EASJ,WATI,EAUJ,SAVI,EAWJ,UAXI,EAYJ,UAZI,CADF;IAeNC,aAAa,EAAE,CAAC,KAAD,EAAQ,KAAR,EAAe,KAAf,EAAsB,KAAtB,EAA6B,KAA7B,EAAoC,KAApC,EAA2C,KAA3C,CAfT;IAgBNC,OAAO,EAAE;MACLC,aAAa,EAAE,gBADV;MAELC,SAAS,EAAE,YAFN;MAGLC,YAAY,EAAE,eAHT;MAILC,QAAQ,EAAE,WAJL;MAKLC,KAAK,EAAE;;GAtBqB;EAyBpCC,QAAQ,EAAE;IACNC,OAAO,EAAE;GA1BuB;EA4BpCC,UAAU,EAAE;IACRX,QAAQ,EAAE,UADF;IAERY,KAAK,EAAE,OAFC;IAGRC,MAAM,EAAE,eAHA;IAIRC,SAAS,EAAE;GAhCqB;EAkCpCC,MAAM,EAAE;IACJC,KAAK,EAAE;GAnCyB;EAqCpCC,OAAO,EAAE;IACLC,OAAO,EAAE,oBADJ;IAELC,KAAK,EAAE,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D;EACpB,MAAM;IAAEC,QAAF;IAAYH,YAAY,GAAGP;MAA+BS,KAAhE;EACA,MAAME,KAAK,GAAGL,OAAA,CAAc,OAAO;IAAEC;GAAT,CAAd,EAAwC,CAACA,YAAD,CAAxC,CAAd;EAEA,OACID,aAAA,CAACD,OAAO,CAACG,QAAT;IAAkBG,KAAK,EAAEA;GAAzB,EACIL,aAAA,CAACM,aAAD,MAAA,EAAgBF,QAAhB,CADJ,CADJ;AAKH;MAEYG,OAAO,GAAG,MAAYP,UAAA,CAAiBD,OAAjB;MACtBS,eAAe,GAAG,MAAoBD,OAAO,GAAGN;;;;"}
1
+ {"version":3,"file":"Provider.js","sources":["../../../../src/components/Provider/Provider.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Locale } from '../../types';\nimport { CalendarTexts } from '../Calendar/Calendar';\nimport { ComboboxTexts } from '../Combobox/Combobox';\nimport { DialogTexts } from '../Dialog/Dialog';\nimport { PaginationTexts } from '../Pagination/Pagination';\nimport { ListboxTexts } from '../Listbox/Listbox';\nimport { ToastsTexts } from '../Toast/Toast';\nimport { DatepickerTexts } from '../Datepicker/Datepicker';\nimport { HangerTexts } from '../Hanger/Hanger';\nimport { SelectTexts } from '../Select/Select';\nimport { TourTexts } from '../Tour/Tour';\nimport { TableTexts } from '../Table/Table';\nimport { SearchInputTexts } from '../SearchInput/SearchInput';\nimport { ToastProvider } from '../Toast/Toaster';\n\nexport type LocalizationTexts = {\n /** Localized texts and aria-labels for [Calendar](component:calendar) component */\n calendar: CalendarTexts;\n /** Localized texts and aria-labels for [Combobox](component:combobox) component */\n combobox: ComboboxTexts;\n /** Localized texts and aria-labels for [DatePicker](component:datepicker) component */\n datepicker: DatepickerTexts;\n /** Localized texts and aria-labels for [Hanger](component:hanger) component */\n hanger: HangerTexts;\n /** Localized texts and aria-labels for [Listbox](component:listbox) component */\n listbox: ListboxTexts;\n /** Localized texts and aria-labels for [Dialog](component:dialog) component */\n dialog: DialogTexts;\n /** Localized texts and aria-labels for [Pagination](component:pagination) component */\n pagination: PaginationTexts;\n /** Localized texts and aria-labels for [Table](component:table) component */\n table: TableTexts;\n /** Localized texts and aria-labels for [Select](component:select) component */\n select: SelectTexts;\n /** Localized texts and aria-labels for [Toast](component:toast) component */\n toasts: ToastsTexts;\n /** Localized texts and aria-labels for [Tour](component:tour) component */\n tour: TourTexts;\n /** Localized texts and aria-labels for [SearchInput](component:searchinput) component */\n searchInput: SearchInputTexts;\n};\n\nexport type Localization = {\n /**\n * Provide the language code used in application.\n * Default value is `en-GB`\n */\n locale: Locale;\n /** Provide the texts and aria-labels for components used within the provider */\n texts: LocalizationTexts;\n /** Provide the formatting */\n formatting: {\n /** Default value is `dd.mm.yy` */\n date: string;\n };\n};\nexport type Taco = {\n /** Define localized texts and formatted data in your application */\n localization: Localization;\n};\n\nexport const defaultLocalisationTexts = {\n calendar: {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n actions: {\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n today: 'Today',\n },\n },\n combobox: {\n tooltip: 'Search in list',\n },\n datepicker: {\n calendar: 'Calendar',\n clear: 'Clear',\n expand: 'Show calendar',\n shortcuts: 'Shortcuts',\n },\n hanger: {\n close: 'Close',\n },\n listbox: {\n loading: 'Loading results...',\n empty: 'No results found',\n allOption: 'All',\n },\n dialog: {\n close: 'Close',\n drag: 'Drag',\n },\n pagination: {\n label: 'Pagination',\n pageSize: 'Items per page',\n showingXofYofTotal: 'Showing [X] - [Y] of [total]',\n actions: {\n firstPage: 'Goto first page',\n firstPageWithShortcut: 'Goto first page (Home)',\n previousPage: 'Goto previous page',\n previousPageWithShortcut: 'Goto previous page (Page Up)',\n nextPage: 'Goto next page',\n nextPageWithShortcut: 'Goto next page (Page Down)',\n lastPage: 'Goto last page',\n lastPageWithShortcut: 'Goto last page (End)',\n pageX: 'Goto page [X]',\n },\n },\n table: {\n actions: 'Other actions',\n edit: 'Edit (e)',\n copy: 'Copy (c)',\n del: 'Delete (del)',\n newSubRow: 'New row (shift + n)',\n loading: 'Loading...',\n },\n select: {\n allOptionsSelected: 'All',\n },\n toasts: {\n dismiss: 'Dismiss',\n },\n tour: {\n back: 'Back',\n close: 'Close',\n skip: 'Close and complete',\n last: 'Done',\n next: 'Next',\n open: 'Open',\n },\n searchInput: {\n inputLabel: 'Search...',\n },\n};\n\nconst defaultLocalizationContext: Localization = {\n locale: 'en-GB',\n texts: defaultLocalisationTexts,\n formatting: {\n date: 'dd.mm.yy',\n },\n};\n\nconst Context = React.createContext<Taco>({\n localization: defaultLocalizationContext,\n});\n\nexport type ProviderProps = {\n /** Content would be your application */\n children?: any;\n /** Define localized texts and formatted data in your application */\n localization?: Localization;\n};\n\nexport const Provider = (props: ProviderProps): JSX.Element => {\n const { children, localization = defaultLocalizationContext } = props;\n const value = React.useMemo(() => ({ localization }), [localization]);\n\n return (\n <Context.Provider value={value}>\n <ToastProvider>{children}</ToastProvider>\n </Context.Provider>\n );\n};\n\nexport const useTaco = (): Taco => React.useContext(Context);\nexport const useLocalization = (): Localization => useTaco().localization;\n"],"names":["defaultLocalisationTexts","calendar","months","weekdaysShort","actions","previousMonth","nextMonth","previousYear","nextYear","today","combobox","tooltip","datepicker","clear","expand","shortcuts","hanger","close","listbox","loading","empty","allOption","dialog","drag","pagination","label","pageSize","showingXofYofTotal","firstPage","firstPageWithShortcut","previousPage","previousPageWithShortcut","nextPage","nextPageWithShortcut","lastPage","lastPageWithShortcut","pageX","table","edit","copy","del","newSubRow","select","allOptionsSelected","toasts","dismiss","tour","back","skip","last","next","open","searchInput","inputLabel","defaultLocalizationContext","locale","texts","formatting","date","Context","React","localization","Provider","props","children","value","ToastProvider","useTaco","useLocalization"],"mappings":";;;IA+DaA,wBAAwB,GAAG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A,eAAkB;EAAA,OAAoBD,OAAO,GAAGN,YAA9B;AAAA;;;;"}
@@ -1,27 +1,36 @@
1
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import { useMemo, Children, isValidElement, forwardRef, createElement, createContext, useContext } from 'react';
2
3
  import cn from 'classnames';
3
4
  import { Root, Item, Indicator } from '@radix-ui/react-radio-group';
4
5
 
5
- const getRadioGroupItemValueAsString = value => String(value !== null && value !== void 0 ? value : '');
6
- const findByValue = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
7
- const RadioGroupContext = /*#__PURE__*/createContext({
6
+ var _excluded = ["children", "value"],
7
+ _excluded2 = ["children", "defaultValue", "disabled", "invalid", "onChange", "orientation", "value"];
8
+ var getRadioGroupItemValueAsString = function getRadioGroupItemValueAsString(value) {
9
+ return String(value !== null && value !== void 0 ? value : '');
10
+ };
11
+ var findByValue = function findByValue(values, valueAsString) {
12
+ return values.find(function (value) {
13
+ return getRadioGroupItemValueAsString(value) === valueAsString;
14
+ });
15
+ };
16
+ var RadioGroupContext = /*#__PURE__*/createContext({
8
17
  disabled: false,
9
18
  invalid: false
10
19
  });
11
- const RadioGroupItem = /*#__PURE__*/forwardRef(function RadioGroupItem(props, ref) {
12
- const context = useContext(RadioGroupContext);
13
- const {
14
- children,
15
- value,
16
- ...otherProps
17
- } = props;
18
- const isDisabled = context.disabled || props.disabled;
19
- const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2', {
20
+ var RadioGroupItem = /*#__PURE__*/forwardRef(function RadioGroupItem(props, ref) {
21
+ var context = useContext(RadioGroupContext);
22
+
23
+ var children = props.children,
24
+ value = props.value,
25
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
26
+
27
+ var isDisabled = context.disabled || props.disabled;
28
+ var className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2', {
20
29
  'border-grey-dark hover:border-4 focus:yt-focus aria-checked:bg-blue aria-checked:border-blue hover:aria-checked:border-blue-light': !isDisabled && !context.invalid,
21
30
  'border-grey cursor-not-allowed aria-checked:bg-blue-light aria-checked:border-blue-light ': isDisabled,
22
31
  'border-red hover:border-4 text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !isDisabled
23
32
  });
24
- const labelClassName = cn('flex items-center gap-2', {
33
+ var labelClassName = cn('flex items-center gap-2', {
25
34
  'cursor-pointer': !isDisabled,
26
35
  'cursor-not-allowed text-grey-dark': isDisabled
27
36
  }, props.className);
@@ -36,34 +45,38 @@ const RadioGroupItem = /*#__PURE__*/forwardRef(function RadioGroupItem(props, re
36
45
  className: "h-2 w-2 rounded-full bg-white"
37
46
  })), children);
38
47
  });
39
- const useRadioGroup = props => {
40
- const {
41
- children,
42
- defaultValue,
43
- disabled,
44
- invalid,
45
- onChange,
46
- orientation = 'vertical',
47
- value,
48
- ...otherProps
49
- } = props;
50
- const values = useMemo(() => {
51
- const radioGroupItemValues = [];
52
- Children.forEach(children, child => {
48
+ var useRadioGroup = function useRadioGroup(props) {
49
+ var children = props.children,
50
+ defaultValue = props.defaultValue,
51
+ disabled = props.disabled,
52
+ invalid = props.invalid,
53
+ onChange = props.onChange,
54
+ _props$orientation = props.orientation,
55
+ orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
56
+ value = props.value,
57
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2);
58
+
59
+ var values = useMemo(function () {
60
+ var radioGroupItemValues = [];
61
+ Children.forEach(children, function (child) {
53
62
  if (isValidElement(child)) {
54
63
  radioGroupItemValues.push(child.props.value);
55
64
  }
56
65
  });
57
66
  return radioGroupItemValues;
58
67
  }, [children]);
59
- const context = useMemo(() => ({
60
- disabled: disabled !== null && disabled !== void 0 ? disabled : false,
61
- invalid: invalid !== null && invalid !== void 0 ? invalid : false
62
- }), [disabled, invalid]);
63
- let valueProps;
68
+ var context = useMemo(function () {
69
+ return {
70
+ disabled: disabled !== null && disabled !== void 0 ? disabled : false,
71
+ invalid: invalid !== null && invalid !== void 0 ? invalid : false
72
+ };
73
+ }, [disabled, invalid]);
74
+ var valueProps;
64
75
 
65
76
  if (onChange !== undefined) {
66
- const handleChange = value => onChange(findByValue(values, value));
77
+ var handleChange = function handleChange(value) {
78
+ return onChange(findByValue(values, value));
79
+ };
67
80
 
68
81
  valueProps = {
69
82
  onValueChange: handleChange,
@@ -76,20 +89,19 @@ const useRadioGroup = props => {
76
89
  }
77
90
 
78
91
  return {
79
- context,
80
- props: { ...otherProps,
81
- ...valueProps,
82
- children,
83
- orientation
84
- }
92
+ context: context,
93
+ props: _extends({}, otherProps, valueProps, {
94
+ children: children,
95
+ orientation: orientation
96
+ })
85
97
  };
86
98
  };
87
- const RadioGroup = /*#__PURE__*/forwardRef(function RadioGroup(props, ref) {
88
- const {
89
- context,
90
- props: otherProps
91
- } = useRadioGroup(props);
92
- const className = cn('flex items-start gap-y-2', {
99
+ var RadioGroup = /*#__PURE__*/forwardRef(function RadioGroup(props, ref) {
100
+ var _useRadioGroup = useRadioGroup(props),
101
+ context = _useRadioGroup.context,
102
+ otherProps = _useRadioGroup.props;
103
+
104
+ var className = cn('flex items-start gap-y-2', {
93
105
  'flex-wrap gap-x-4 ': otherProps.orientation === 'horizontal',
94
106
  'flex-col': otherProps.orientation === 'vertical'
95
107
  }, otherProps.className);
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\r\nimport { Orientation } from '../../types';\r\n\r\nexport type RadioGroupItemValue = string | number | boolean | null;\r\n\r\nexport const getRadioGroupItemValueAsString = (value: RadioGroupItemValue): string => String(value ?? '');\r\n\r\nexport const findByValue = (values: RadioGroupItemValue[], valueAsString: string): RadioGroupItemValue =>\r\n values.find(value => getRadioGroupItemValueAsString(value) === valueAsString) as RadioGroupItemValue;\r\n\r\nconst RadioGroupContext = React.createContext({ disabled: false, invalid: false });\r\n\r\nexport type RadioGroupItemProps<T = HTMLButtonElement> = Omit<\r\n React.ButtonHTMLAttributes<T>,\r\n 'children' | 'onSelect' | 'value'\r\n> & {\r\n /** Label for the radio group item */\r\n children: React.ReactNode;\r\n /* Whether the radio group item is disabled */\r\n disabled?: boolean;\r\n /** Value of the radio button */\r\n value: RadioGroupItemValue;\r\n};\r\n\r\nconst RadioGroupItem = React.forwardRef(function RadioGroupItem(props: RadioGroupItemProps, ref: React.Ref<HTMLButtonElement>) {\r\n const context = React.useContext(RadioGroupContext);\r\n const { children, value, ...otherProps } = props;\r\n\r\n const isDisabled = context.disabled || props.disabled;\r\n\r\n const className = cn(\r\n 'flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2',\r\n {\r\n 'border-grey-dark hover:border-4 focus:yt-focus aria-checked:bg-blue aria-checked:border-blue hover:aria-checked:border-blue-light':\r\n !isDisabled && !context.invalid,\r\n 'border-grey cursor-not-allowed aria-checked:bg-blue-light aria-checked:border-blue-light ': isDisabled,\r\n 'border-red hover:border-4 text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red':\r\n context.invalid && !isDisabled,\r\n }\r\n );\r\n const labelClassName = cn(\r\n 'flex items-center gap-2',\r\n {\r\n 'cursor-pointer': !isDisabled,\r\n 'cursor-not-allowed text-grey-dark': isDisabled,\r\n },\r\n props.className\r\n );\r\n\r\n return (\r\n <label className={labelClassName}>\r\n <RadioGroupPrimitive.Item\r\n {...otherProps}\r\n className={className}\r\n disabled={isDisabled}\r\n ref={ref}\r\n value={getRadioGroupItemValueAsString(value)}\r\n >\r\n <RadioGroupPrimitive.Indicator className=\"h-2 w-2 rounded-full bg-white\" />\r\n </RadioGroupPrimitive.Item>\r\n {children}\r\n </label>\r\n );\r\n});\r\n\r\ntype ReactGroupBaseChild = React.ReactElement<RadioGroupItemProps> | boolean | null;\r\n\r\ntype RadioGroupBaseProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'onChange' | 'value'> & {\r\n children: ReactGroupBaseChild[];\r\n /* Whether the radio group is disabled */\r\n disabled?: boolean;\r\n /* Whether the radio group is in an invalid state */\r\n invalid?: boolean;\r\n /** The name of the radio group, used when submitting an HTML form */\r\n name?: string;\r\n /**\r\n * Orientation of the radio group\r\n * @defaultValue vertical\r\n */\r\n orientation?: Orientation;\r\n /* Whether the radio group requires user input */\r\n required?: boolean;\r\n};\r\n\r\ninterface UncontrolledRadioGroupProps extends RadioGroupBaseProps {\r\n /* The default value (uncontrolled) */\r\n defaultValue?: RadioGroupItemValue;\r\n onChange?: never;\r\n value?: never;\r\n}\r\n\r\ninterface ControlledRadioGroupProps extends RadioGroupBaseProps {\r\n defaultValue?: never;\r\n /** Handler called when the value changes */\r\n onChange: (value: RadioGroupItemValue) => void;\r\n /** The current value (controlled) */\r\n value?: RadioGroupItemValue;\r\n}\r\n\r\nexport type RadioGroupProps = UncontrolledRadioGroupProps | ControlledRadioGroupProps;\r\n\r\nexport type ForwardedRadioGroupWithStatics = React.ForwardRefExoticComponent<\r\n RadioGroupProps & React.RefAttributes<HTMLDivElement>\r\n> & {\r\n /** Item component rendered in a `RadioGroup` component */\r\n Item: React.ForwardRefExoticComponent<RadioGroupItemProps>;\r\n};\r\n\r\nexport const useRadioGroup = (props: RadioGroupProps) => {\r\n const { children, defaultValue, disabled, invalid, onChange, orientation = 'vertical', value, ...otherProps } = props;\r\n\r\n const values = React.useMemo<RadioGroupItemValue[]>(() => {\r\n const radioGroupItemValues: RadioGroupItemValue[] = [];\r\n\r\n React.Children.forEach(children, child => {\r\n if (React.isValidElement(child)) {\r\n radioGroupItemValues.push(child.props.value);\r\n }\r\n });\r\n\r\n return radioGroupItemValues;\r\n }, [children]);\r\n\r\n const context = React.useMemo(() => ({ disabled: disabled ?? false, invalid: invalid ?? false }), [disabled, invalid]);\r\n\r\n let valueProps;\r\n\r\n if (onChange !== undefined) {\r\n const handleChange = (value: string): void => onChange(findByValue(values, value));\r\n\r\n valueProps = {\r\n onValueChange: handleChange,\r\n value: value !== undefined ? getRadioGroupItemValueAsString(value) : undefined,\r\n };\r\n } else {\r\n valueProps = {\r\n defaultValue: defaultValue !== undefined ? getRadioGroupItemValueAsString(defaultValue) : undefined,\r\n };\r\n }\r\n\r\n return {\r\n context,\r\n props: {\r\n ...otherProps,\r\n ...valueProps,\r\n children,\r\n orientation,\r\n },\r\n };\r\n};\r\n\r\nexport const RadioGroup = React.forwardRef(function RadioGroup(props: RadioGroupProps, ref: React.Ref<HTMLDivElement>) {\r\n const { context, props: otherProps } = useRadioGroup(props);\r\n const className = cn(\r\n 'flex items-start gap-y-2',\r\n {\r\n 'flex-wrap gap-x-4 ': otherProps.orientation === 'horizontal',\r\n 'flex-col': otherProps.orientation === 'vertical',\r\n },\r\n otherProps.className\r\n );\r\n\r\n return (\r\n <RadioGroupContext.Provider value={context}>\r\n <RadioGroupPrimitive.Root {...otherProps} className={className} data-taco=\"radio-group\" ref={ref} />\r\n </RadioGroupContext.Provider>\r\n );\r\n}) as ForwardedRadioGroupWithStatics;\r\nRadioGroup.Item = RadioGroupItem;\r\n"],"names":["getRadioGroupItemValueAsString","value","String","findByValue","values","valueAsString","find","RadioGroupContext","React","disabled","invalid","RadioGroupItem","props","ref","context","children","otherProps","isDisabled","className","cn","labelClassName","RadioGroupPrimitive","useRadioGroup","defaultValue","onChange","orientation","radioGroupItemValues","forEach","child","push","valueProps","undefined","handleChange","onValueChange","RadioGroup","Provider","Item"],"mappings":";;;;MAOaA,8BAA8B,GAAIC,KAAD,IAAwCC,MAAM,CAACD,KAAD,aAACA,KAAD,cAACA,KAAD,GAAU,EAAV;MAE/EE,WAAW,GAAG,CAACC,MAAD,EAAgCC,aAAhC,KACvBD,MAAM,CAACE,IAAP,CAAYL,KA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AAWF,KAAK,EAAEI;MAAeM,aAAa,CAACV,KAAD,CAApD;EACA,MAAMM,SAAS,GAAGC,EAAE,CAChB,0BADgB,EAEhB;IACI,sBAAsBH,UAAU,CAACS,WAAX,KAA2B,YADrD;IAEI,YAAYT,UAAU,CAACS,WAAX,KAA2B;GAJ3B,EAMhBT,UAAU,CAACE,SANK,CAApB;EASA,OACIV,aAAA,CAACD,iBAAiB,CAAC4B,QAAnB;IAA4BlC,KAAK,EAAEa;GAAnC,EACIN,aAAA,CAACa,IAAD,oBAA8BL;IAAYE,SAAS,EAAEA;iBAAqB;IAAcL,GAAG,EAAEA;IAA7F,CADJ,CADJ;AAKH,CAhByB;AAiB1BqB,UAAU,CAACE,IAAX,GAAkBzB,cAAlB;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../../../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Orientation } from '../../types';\n\nexport type RadioGroupItemValue = string | number | boolean | null;\n\nexport const getRadioGroupItemValueAsString = (value: RadioGroupItemValue): string => String(value ?? '');\n\nexport const findByValue = (values: RadioGroupItemValue[], valueAsString: string): RadioGroupItemValue =>\n values.find(value => getRadioGroupItemValueAsString(value) === valueAsString) as RadioGroupItemValue;\n\nconst RadioGroupContext = React.createContext({ disabled: false, invalid: false });\n\nexport type RadioGroupItemProps<T = HTMLButtonElement> = Omit<\n React.ButtonHTMLAttributes<T>,\n 'children' | 'onSelect' | 'value'\n> & {\n /** Label for the radio group item */\n children: React.ReactNode;\n /* Whether the radio group item is disabled */\n disabled?: boolean;\n /** Value of the radio button */\n value: RadioGroupItemValue;\n};\n\nconst RadioGroupItem = React.forwardRef(function RadioGroupItem(props: RadioGroupItemProps, ref: React.Ref<HTMLButtonElement>) {\n const context = React.useContext(RadioGroupContext);\n const { children, value, ...otherProps } = props;\n\n const isDisabled = context.disabled || props.disabled;\n\n const className = cn(\n 'flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2',\n {\n 'border-grey-dark hover:border-4 focus:yt-focus aria-checked:bg-blue aria-checked:border-blue hover:aria-checked:border-blue-light':\n !isDisabled && !context.invalid,\n 'border-grey cursor-not-allowed aria-checked:bg-blue-light aria-checked:border-blue-light ': isDisabled,\n 'border-red hover:border-4 text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red':\n context.invalid && !isDisabled,\n }\n );\n const labelClassName = cn(\n 'flex items-center gap-2',\n {\n 'cursor-pointer': !isDisabled,\n 'cursor-not-allowed text-grey-dark': isDisabled,\n },\n props.className\n );\n\n return (\n <label className={labelClassName}>\n <RadioGroupPrimitive.Item\n {...otherProps}\n className={className}\n disabled={isDisabled}\n ref={ref}\n value={getRadioGroupItemValueAsString(value)}\n >\n <RadioGroupPrimitive.Indicator className=\"h-2 w-2 rounded-full bg-white\" />\n </RadioGroupPrimitive.Item>\n {children}\n </label>\n );\n});\n\ntype ReactGroupBaseChild = React.ReactElement<RadioGroupItemProps> | boolean | null;\n\ntype RadioGroupBaseProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'onChange' | 'value'> & {\n children: ReactGroupBaseChild[];\n /* Whether the radio group is disabled */\n disabled?: boolean;\n /* Whether the radio group is in an invalid state */\n invalid?: boolean;\n /** The name of the radio group, used when submitting an HTML form */\n name?: string;\n /**\n * Orientation of the radio group\n * @defaultValue vertical\n */\n orientation?: Orientation;\n /* Whether the radio group requires user input */\n required?: boolean;\n};\n\ninterface UncontrolledRadioGroupProps extends RadioGroupBaseProps {\n /* The default value (uncontrolled) */\n defaultValue?: RadioGroupItemValue;\n onChange?: never;\n value?: never;\n}\n\ninterface ControlledRadioGroupProps extends RadioGroupBaseProps {\n defaultValue?: never;\n /** Handler called when the value changes */\n onChange: (value: RadioGroupItemValue) => void;\n /** The current value (controlled) */\n value?: RadioGroupItemValue;\n}\n\nexport type RadioGroupProps = UncontrolledRadioGroupProps | ControlledRadioGroupProps;\n\nexport type ForwardedRadioGroupWithStatics = React.ForwardRefExoticComponent<\n RadioGroupProps & React.RefAttributes<HTMLDivElement>\n> & {\n /** Item component rendered in a `RadioGroup` component */\n Item: React.ForwardRefExoticComponent<RadioGroupItemProps>;\n};\n\nexport const useRadioGroup = (props: RadioGroupProps) => {\n const { children, defaultValue, disabled, invalid, onChange, orientation = 'vertical', value, ...otherProps } = props;\n\n const values = React.useMemo<RadioGroupItemValue[]>(() => {\n const radioGroupItemValues: RadioGroupItemValue[] = [];\n\n React.Children.forEach(children, child => {\n if (React.isValidElement(child)) {\n radioGroupItemValues.push(child.props.value);\n }\n });\n\n return radioGroupItemValues;\n }, [children]);\n\n const context = React.useMemo(() => ({ disabled: disabled ?? false, invalid: invalid ?? false }), [disabled, invalid]);\n\n let valueProps;\n\n if (onChange !== undefined) {\n const handleChange = (value: string): void => onChange(findByValue(values, value));\n\n valueProps = {\n onValueChange: handleChange,\n value: value !== undefined ? getRadioGroupItemValueAsString(value) : undefined,\n };\n } else {\n valueProps = {\n defaultValue: defaultValue !== undefined ? getRadioGroupItemValueAsString(defaultValue) : undefined,\n };\n }\n\n return {\n context,\n props: {\n ...otherProps,\n ...valueProps,\n children,\n orientation,\n },\n };\n};\n\nexport const RadioGroup = React.forwardRef(function RadioGroup(props: RadioGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { context, props: otherProps } = useRadioGroup(props);\n const className = cn(\n 'flex items-start gap-y-2',\n {\n 'flex-wrap gap-x-4 ': otherProps.orientation === 'horizontal',\n 'flex-col': otherProps.orientation === 'vertical',\n },\n otherProps.className\n );\n\n return (\n <RadioGroupContext.Provider value={context}>\n <RadioGroupPrimitive.Root {...otherProps} className={className} data-taco=\"radio-group\" ref={ref} />\n </RadioGroupContext.Provider>\n );\n}) as ForwardedRadioGroupWithStatics;\nRadioGroup.Item = RadioGroupItem;\n"],"names":["getRadioGroupItemValueAsString","value","String","findByValue","values","valueAsString","find","RadioGroupContext","React","disabled","invalid","RadioGroupItem","props","ref","context","children","otherProps","isDisabled","className","cn","labelClassName","RadioGroupPrimitive","useRadioGroup","defaultValue","onChange","orientation","radioGroupItemValues","forEach","child","push","valueProps","undefined","handleChange","onValueChange","RadioGroup","Provider","Item"],"mappings":";;;;;;;IAOaA,8BAA8B,GAAG,SAAjCA,8BAAiC,CAACC,KAAD;EAAA,OAAwCC,MAAM,CAACD,KAAD,aAACA,KAAD,cAACA,KAAD,GAAU,EAAV,CAA9C;AAAA;IAEjCE,WAAW,GAAG,SAAdA,WAAc,CAACC,MAAD,EAAgCC,aAAhC;EAAA,OACvBD,MAAM,CAACE,IAAP,CAAY,UAAAL,KAAK;IAAA,OAAID,8BAA8B,CAACC,KAAD,CAA9B,KAA0CI,aAA9C;GAAjB,CADuB;AAAA;AAG3B,IAAME,iBAAiB,gBAAGC,aAAA,CAAoB;EAAEC,QAAQ,EAAE,KAAZ;EAAmBC,OAAO,EAAE;AAA5B,CAApB,CAA1B;AAcA,IAAMC,cAAc,gBAAGH,UAAA,CAAiB,SAASG,cAAT,CAAwBC,KAAxB,EAAoDC,GAApD;EACpC,IAAMC,OAAO,GAAGN,UAAA,CAAiBD,iBAAjB,CAAhB;;EACA,IAAQQ,QAAR,GAA2CH,KAA3C,CAAQG,QAAR;MAAkBd,KAAlB,GAA2CW,KAA3C,CAAkBX,KAAlB;MAA4Be,UAA5B,iCAA2CJ,KAA3C;;EAEA,IAAMK,UAAU,GAAGH,OAAO,CAACL,QAAR,IAAoBG,KAAK,CAACH,QAA7C;EAEA,IAAMS,SAAS,GAAGC,EAAE,CAChB,8GADgB,EAEhB;IACI,qIACI,CAACF,UAAD,IAAe,CAACH,OAAO,CAACJ,OAFhC;IAGI,6FAA6FO,UAHjG;IAII,sHACIH,OAAO,CAACJ,OAAR,IAAmB,CAACO;GAPZ,CAApB;EAUA,IAAMG,cAAc,GAAGD,EAAE,CACrB,yBADqB,EAErB;IACI,kBAAkB,CAACF,U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GAAG,EAAEA;IAA7F,CADJ,CADJ;AAKH,CAhByB;AAiB1BqB,UAAU,CAACE,IAAX,GAAkBzB,cAAlB;;;;"}
@@ -1,3 +1,4 @@
1
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import { forwardRef, createElement } from 'react';
2
3
  import '../Icon/components/index.js';
3
4
  import '../Icon/Icon.js';
@@ -13,8 +14,8 @@ import '../Spinner/Spinner.js';
13
14
  import '../Toast/Toaster.js';
14
15
  import { useLocalization } from '../Provider/Provider.js';
15
16
  import '../Calendar/Calendar.js';
17
+ import '../Card/Card.js';
16
18
  import '../Checkbox/Checkbox.js';
17
- import '../../utils/hooks/useProxiedRef.js';
18
19
  import { Input } from '../Input/Input.js';
19
20
  import keycode from 'keycode';
20
21
  import '../../utils/hooks/useListKeyboardNavigation.js';
@@ -49,26 +50,25 @@ import '../Textarea/Textarea.js';
49
50
  import '../Switch/Switch.js';
50
51
  import '../Tour/Tour.js';
51
52
  import '../../utils/hooks/useOnClickOutside.js';
52
- import '../Card/Card.js';
53
53
 
54
- const SearchInput = /*#__PURE__*/forwardRef(function SearchInput({
55
- onSearch,
56
- ...props
57
- }, ref) {
58
- const {
59
- texts
60
- } = useLocalization();
54
+ var _excluded = ["onSearch"];
55
+ var SearchInput = /*#__PURE__*/forwardRef(function SearchInput(_ref, ref) {
56
+ var onSearch = _ref.onSearch,
57
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
58
+
59
+ var _useLocalization = useLocalization(),
60
+ texts = _useLocalization.texts;
61
61
 
62
- const handleClick = () => {
62
+ var handleClick = function handleClick() {
63
63
  if (!props.disabled) {
64
64
  onSearch === null || onSearch === void 0 ? void 0 : onSearch(props.value);
65
65
  }
66
66
  };
67
67
 
68
- const handleKeyDown = event => {
68
+ var handleKeyDown = function handleKeyDown(event) {
69
69
  var _props$onKeyDown;
70
70
 
71
- const isEnterKeyPressed = event.keyCode === keycode('enter');
71
+ var isEnterKeyPressed = event.keyCode === keycode('enter');
72
72
 
73
73
  if (isEnterKeyPressed) {
74
74
  handleClick();