@economic/taco 0.0.12-alpha.0 → 0.0.13-alpha.0

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 (384) hide show
  1. package/README.md +84 -84
  2. package/dist/components/Menu/Menu.d.ts +1 -0
  3. package/dist/esm/components/Accordion/Accordion.js.map +1 -1
  4. package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
  5. package/dist/esm/components/Badge/Badge.js.map +1 -1
  6. package/dist/esm/components/Banner/Banner.js +1 -1
  7. package/dist/esm/components/Banner/Banner.js.map +1 -1
  8. package/dist/esm/components/Banner/util.js +1 -1
  9. package/dist/esm/components/Banner/util.js.map +1 -1
  10. package/dist/esm/components/Button/Button.js.map +1 -1
  11. package/dist/esm/components/Button/util.js +49 -24
  12. package/dist/esm/components/Button/util.js.map +1 -1
  13. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  14. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  15. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  16. package/dist/esm/components/Combobox/useCombobox.js +64 -84
  17. package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
  18. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  19. package/dist/esm/components/Datepicker/useDatepicker.js +35 -33
  20. package/dist/esm/components/Datepicker/useDatepicker.js.map +1 -1
  21. package/dist/esm/components/Dialog/Context.js +3 -3
  22. package/dist/esm/components/Dialog/Context.js.map +1 -1
  23. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  24. package/dist/esm/components/Dialog/components/Content.js +39 -44
  25. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  26. package/dist/esm/components/Dialog/components/Drawer.js +3 -3
  27. package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
  28. package/dist/esm/components/Dialog/components/Extra.js +2 -2
  29. package/dist/esm/components/Dialog/components/Extra.js.map +1 -1
  30. package/dist/esm/components/Dialog/components/Trigger.js +2 -2
  31. package/dist/esm/components/Dialog/components/Trigger.js.map +1 -1
  32. package/dist/esm/components/Form/Form.js.map +1 -1
  33. package/dist/esm/components/Group/Group.js.map +1 -1
  34. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  35. package/dist/esm/components/Icon/Icon.js.map +1 -1
  36. package/dist/esm/components/Icon/components/AccountPreview.js.map +1 -1
  37. package/dist/esm/components/Icon/components/Accounting.js.map +1 -1
  38. package/dist/esm/components/Icon/components/AccountingYear.js.map +1 -1
  39. package/dist/esm/components/Icon/components/AccountingYearCancel.js.map +1 -1
  40. package/dist/esm/components/Icon/components/ArrowBottom.js.map +1 -1
  41. package/dist/esm/components/Icon/components/ArrowDown.js.map +1 -1
  42. package/dist/esm/components/Icon/components/ArrowEnd.js.map +1 -1
  43. package/dist/esm/components/Icon/components/ArrowLeft.js.map +1 -1
  44. package/dist/esm/components/Icon/components/ArrowRight.js.map +1 -1
  45. package/dist/esm/components/Icon/components/ArrowStart.js.map +1 -1
  46. package/dist/esm/components/Icon/components/ArrowTop.js.map +1 -1
  47. package/dist/esm/components/Icon/components/ArrowUp.js.map +1 -1
  48. package/dist/esm/components/Icon/components/Attach.js.map +1 -1
  49. package/dist/esm/components/Icon/components/AttachAuto.js.map +1 -1
  50. package/dist/esm/components/Icon/components/AttachCancel.js.map +1 -1
  51. package/dist/esm/components/Icon/components/Autotext.js.map +1 -1
  52. package/dist/esm/components/Icon/components/AutotextInsert.js.map +1 -1
  53. package/dist/esm/components/Icon/components/Basic.js.map +1 -1
  54. package/dist/esm/components/Icon/components/BasicTabs.js.map +1 -1
  55. package/dist/esm/components/Icon/components/BellSolid.js.map +1 -1
  56. package/dist/esm/components/Icon/components/Book.js.map +1 -1
  57. package/dist/esm/components/Icon/components/Booking.js.map +1 -1
  58. package/dist/esm/components/Icon/components/Budget.js.map +1 -1
  59. package/dist/esm/components/Icon/components/Calendar.js.map +1 -1
  60. package/dist/esm/components/Icon/components/CashAccount.js.map +1 -1
  61. package/dist/esm/components/Icon/components/CashReports.js.map +1 -1
  62. package/dist/esm/components/Icon/components/Chat.js.map +1 -1
  63. package/dist/esm/components/Icon/components/ChatSolid.js.map +1 -1
  64. package/dist/esm/components/Icon/components/ChevronDown.js.map +1 -1
  65. package/dist/esm/components/Icon/components/ChevronDownDouble.js.map +1 -1
  66. package/dist/esm/components/Icon/components/ChevronDownSolid.js.map +1 -1
  67. package/dist/esm/components/Icon/components/ChevronLeft.js.map +1 -1
  68. package/dist/esm/components/Icon/components/ChevronLeftDouble.js.map +1 -1
  69. package/dist/esm/components/Icon/components/ChevronRight.js.map +1 -1
  70. package/dist/esm/components/Icon/components/ChevronRightDouble.js.map +1 -1
  71. package/dist/esm/components/Icon/components/ChevronUp.js.map +1 -1
  72. package/dist/esm/components/Icon/components/ChevronUpDouble.js.map +1 -1
  73. package/dist/esm/components/Icon/components/ChevronUpSolid.js.map +1 -1
  74. package/dist/esm/components/Icon/components/Clamp.js.map +1 -1
  75. package/dist/esm/components/Icon/components/ClampOpen.js.map +1 -1
  76. package/dist/esm/components/Icon/components/Close.js.map +1 -1
  77. package/dist/esm/components/Icon/components/ConnectionEnable.js.map +1 -1
  78. package/dist/esm/components/Icon/components/ConnectionRevoke.js.map +1 -1
  79. package/dist/esm/components/Icon/components/Contacts.js.map +1 -1
  80. package/dist/esm/components/Icon/components/Copy.js.map +1 -1
  81. package/dist/esm/components/Icon/components/Courses.js.map +1 -1
  82. package/dist/esm/components/Icon/components/Credit.js.map +1 -1
  83. package/dist/esm/components/Icon/components/Delete.js.map +1 -1
  84. package/dist/esm/components/Icon/components/DeletePermanently.js.map +1 -1
  85. package/dist/esm/components/Icon/components/Depecriate.js.map +1 -1
  86. package/dist/esm/components/Icon/components/Developer.js.map +1 -1
  87. package/dist/esm/components/Icon/components/DistributionTemplate.js.map +1 -1
  88. package/dist/esm/components/Icon/components/Document.js.map +1 -1
  89. package/dist/esm/components/Icon/components/DocumentApprove.js.map +1 -1
  90. package/dist/esm/components/Icon/components/DocumentCreateEntry.js.map +1 -1
  91. package/dist/esm/components/Icon/components/DocumentCut.js.map +1 -1
  92. package/dist/esm/components/Icon/components/DocumentError.js.map +1 -1
  93. package/dist/esm/components/Icon/components/DocumentIsolatePage.js.map +1 -1
  94. package/dist/esm/components/Icon/components/DocumentMerge.js.map +1 -1
  95. package/dist/esm/components/Icon/components/DocumentMove.js.map +1 -1
  96. package/dist/esm/components/Icon/components/DocumentPreview.js.map +1 -1
  97. package/dist/esm/components/Icon/components/DocumentReceived.js.map +1 -1
  98. package/dist/esm/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
  99. package/dist/esm/components/Icon/components/DocumentSplit.js.map +1 -1
  100. package/dist/esm/components/Icon/components/DocumentTime.js.map +1 -1
  101. package/dist/esm/components/Icon/components/Download.js.map +1 -1
  102. package/dist/esm/components/Icon/components/Drag.js.map +1 -1
  103. package/dist/esm/components/Icon/components/ECopedia.js.map +1 -1
  104. package/dist/esm/components/Icon/components/ESignature.js.map +1 -1
  105. package/dist/esm/components/Icon/components/Edit.js.map +1 -1
  106. package/dist/esm/components/Icon/components/EllipsisHorizontal.js.map +1 -1
  107. package/dist/esm/components/Icon/components/EllipsisVertical.js.map +1 -1
  108. package/dist/esm/components/Icon/components/EntriesOnAccount.js.map +1 -1
  109. package/dist/esm/components/Icon/components/EntriesOpen.js.map +1 -1
  110. package/dist/esm/components/Icon/components/EntriesWarning.js.map +1 -1
  111. package/dist/esm/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
  112. package/dist/esm/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
  113. package/dist/esm/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
  114. package/dist/esm/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
  115. package/dist/esm/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
  116. package/dist/esm/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
  117. package/dist/esm/components/Icon/components/Envelope.js.map +1 -1
  118. package/dist/esm/components/Icon/components/EnvelopeApproved.js.map +1 -1
  119. package/dist/esm/components/Icon/components/ExpandView.js.map +1 -1
  120. package/dist/esm/components/Icon/components/Expenses.js.map +1 -1
  121. package/dist/esm/components/Icon/components/Export.js.map +1 -1
  122. package/dist/esm/components/Icon/components/ExportToExcel.js.map +1 -1
  123. package/dist/esm/components/Icon/components/ExportToExcelCopy.js.map +1 -1
  124. package/dist/esm/components/Icon/components/Filter.js.map +1 -1
  125. package/dist/esm/components/Icon/components/FilterSolid.js.map +1 -1
  126. package/dist/esm/components/Icon/components/GraphSolid.js.map +1 -1
  127. package/dist/esm/components/Icon/components/Hash.js.map +1 -1
  128. package/dist/esm/components/Icon/components/Home.js.map +1 -1
  129. package/dist/esm/components/Icon/components/Images.js.map +1 -1
  130. package/dist/esm/components/Icon/components/Import.js.map +1 -1
  131. package/dist/esm/components/Icon/components/Inbox.js.map +1 -1
  132. package/dist/esm/components/Icon/components/InboxSmart.js.map +1 -1
  133. package/dist/esm/components/Icon/components/Info.js.map +1 -1
  134. package/dist/esm/components/Icon/components/Inventory.js.map +1 -1
  135. package/dist/esm/components/Icon/components/InventoryMatrix.js.map +1 -1
  136. package/dist/esm/components/Icon/components/JournalPro.js.map +1 -1
  137. package/dist/esm/components/Icon/components/Layout.js.map +1 -1
  138. package/dist/esm/components/Icon/components/LayoutBoth.js.map +1 -1
  139. package/dist/esm/components/Icon/components/LayoutFirst.js.map +1 -1
  140. package/dist/esm/components/Icon/components/LayoutLast.js.map +1 -1
  141. package/dist/esm/components/Icon/components/LayoutNone.js.map +1 -1
  142. package/dist/esm/components/Icon/components/LedgerCard.js.map +1 -1
  143. package/dist/esm/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
  144. package/dist/esm/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
  145. package/dist/esm/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
  146. package/dist/esm/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
  147. package/dist/esm/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
  148. package/dist/esm/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
  149. package/dist/esm/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
  150. package/dist/esm/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
  151. package/dist/esm/components/Icon/components/Lightbulb.js.map +1 -1
  152. package/dist/esm/components/Icon/components/Line.js.map +1 -1
  153. package/dist/esm/components/Icon/components/List.js.map +1 -1
  154. package/dist/esm/components/Icon/components/ListBulleted.js.map +1 -1
  155. package/dist/esm/components/Icon/components/ListSearch.js.map +1 -1
  156. package/dist/esm/components/Icon/components/LockOpen.js.map +1 -1
  157. package/dist/esm/components/Icon/components/Log.js.map +1 -1
  158. package/dist/esm/components/Icon/components/Market.js.map +1 -1
  159. package/dist/esm/components/Icon/components/MatchAmount.js.map +1 -1
  160. package/dist/esm/components/Icon/components/MatchEntries.js.map +1 -1
  161. package/dist/esm/components/Icon/components/Mileage.js.map +1 -1
  162. package/dist/esm/components/Icon/components/Minus.js.map +1 -1
  163. package/dist/esm/components/Icon/components/ModalResize.js.map +1 -1
  164. package/dist/esm/components/Icon/components/ModalShrink.js.map +1 -1
  165. package/dist/esm/components/Icon/components/More.js.map +1 -1
  166. package/dist/esm/components/Icon/components/MoreSolid.js.map +1 -1
  167. package/dist/esm/components/Icon/components/Move.js.map +1 -1
  168. package/dist/esm/components/Icon/components/NavigationList.js.map +1 -1
  169. package/dist/esm/components/Icon/components/Note.js.map +1 -1
  170. package/dist/esm/components/Icon/components/NoteFollowUp.js.map +1 -1
  171. package/dist/esm/components/Icon/components/NoteRead.js.map +1 -1
  172. package/dist/esm/components/Icon/components/PartnerApi.js.map +1 -1
  173. package/dist/esm/components/Icon/components/Period.js.map +1 -1
  174. package/dist/esm/components/Icon/components/PersonChange.js.map +1 -1
  175. package/dist/esm/components/Icon/components/PersonMinus.js.map +1 -1
  176. package/dist/esm/components/Icon/components/PersonPlus.js.map +1 -1
  177. package/dist/esm/components/Icon/components/PersonTick.js.map +1 -1
  178. package/dist/esm/components/Icon/components/Play.js.map +1 -1
  179. package/dist/esm/components/Icon/components/PlusCircle.js.map +1 -1
  180. package/dist/esm/components/Icon/components/PlusMinus.js.map +1 -1
  181. package/dist/esm/components/Icon/components/Print.js.map +1 -1
  182. package/dist/esm/components/Icon/components/ProcessPayment.js.map +1 -1
  183. package/dist/esm/components/Icon/components/ProductLedgerCard.js.map +1 -1
  184. package/dist/esm/components/Icon/components/ProjectCards.js.map +1 -1
  185. package/dist/esm/components/Icon/components/Projects.js.map +1 -1
  186. package/dist/esm/components/Icon/components/Quicklinks.js.map +1 -1
  187. package/dist/esm/components/Icon/components/RatingBankruptcy.js.map +1 -1
  188. package/dist/esm/components/Icon/components/RatingPaymentProblems.js.map +1 -1
  189. package/dist/esm/components/Icon/components/Reconciled.js.map +1 -1
  190. package/dist/esm/components/Icon/components/Refresh.js.map +1 -1
  191. package/dist/esm/components/Icon/components/Report.js.map +1 -1
  192. package/dist/esm/components/Icon/components/ReportSolid.js.map +1 -1
  193. package/dist/esm/components/Icon/components/Restore.js.map +1 -1
  194. package/dist/esm/components/Icon/components/RotateLeft.js.map +1 -1
  195. package/dist/esm/components/Icon/components/RotateRight.js.map +1 -1
  196. package/dist/esm/components/Icon/components/Sales.js.map +1 -1
  197. package/dist/esm/components/Icon/components/Search.js.map +1 -1
  198. package/dist/esm/components/Icon/components/SearchBold.js.map +1 -1
  199. package/dist/esm/components/Icon/components/Secure.js.map +1 -1
  200. package/dist/esm/components/Icon/components/SecureTick.js.map +1 -1
  201. package/dist/esm/components/Icon/components/Settings.js.map +1 -1
  202. package/dist/esm/components/Icon/components/SettingsSolid.js.map +1 -1
  203. package/dist/esm/components/Icon/components/Shortcuts.js.map +1 -1
  204. package/dist/esm/components/Icon/components/ShowAll.js.map +1 -1
  205. package/dist/esm/components/Icon/components/ShowLess.js.map +1 -1
  206. package/dist/esm/components/Icon/components/ShowMore.js.map +1 -1
  207. package/dist/esm/components/Icon/components/ShowTemplate.js.map +1 -1
  208. package/dist/esm/components/Icon/components/Sliders.js.map +1 -1
  209. package/dist/esm/components/Icon/components/Smartpay.js.map +1 -1
  210. package/dist/esm/components/Icon/components/SortBy.js.map +1 -1
  211. package/dist/esm/components/Icon/components/Spinner.js.map +1 -1
  212. package/dist/esm/components/Icon/components/Star.js.map +1 -1
  213. package/dist/esm/components/Icon/components/StarSolid.js.map +1 -1
  214. package/dist/esm/components/Icon/components/Subscriptions.js.map +1 -1
  215. package/dist/esm/components/Icon/components/SystemEntries.js.map +1 -1
  216. package/dist/esm/components/Icon/components/Tag.js.map +1 -1
  217. package/dist/esm/components/Icon/components/TemplateOverride.js.map +1 -1
  218. package/dist/esm/components/Icon/components/Templates.js.map +1 -1
  219. package/dist/esm/components/Icon/components/Thumb.js.map +1 -1
  220. package/dist/esm/components/Icon/components/ThumbBoth.js.map +1 -1
  221. package/dist/esm/components/Icon/components/ThumbDown.js.map +1 -1
  222. package/dist/esm/components/Icon/components/ThumbDownSolid.js.map +1 -1
  223. package/dist/esm/components/Icon/components/ThumbUpSolid.js.map +1 -1
  224. package/dist/esm/components/Icon/components/Tick.js.map +1 -1
  225. package/dist/esm/components/Icon/components/TickCircle.js.map +1 -1
  226. package/dist/esm/components/Icon/components/Time.js.map +1 -1
  227. package/dist/esm/components/Icon/components/Transfer.js.map +1 -1
  228. package/dist/esm/components/Icon/components/TransferCancel.js.map +1 -1
  229. package/dist/esm/components/Icon/components/TransferLocked.js.map +1 -1
  230. package/dist/esm/components/Icon/components/Undock.js.map +1 -1
  231. package/dist/esm/components/Icon/components/Unreconciled.js.map +1 -1
  232. package/dist/esm/components/Icon/components/Warning.js.map +1 -1
  233. package/dist/esm/components/Icon/components/Webshop.js.map +1 -1
  234. package/dist/esm/components/Icon/components/Website.js.map +1 -1
  235. package/dist/esm/components/Icon/components/Workflow.js.map +1 -1
  236. package/dist/esm/components/Icon/components/Zoom.js.map +1 -1
  237. package/dist/esm/components/Icon/components/index.js +4 -4
  238. package/dist/esm/components/Icon/components/index.js.map +1 -1
  239. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  240. package/dist/esm/components/Input/Input.js.map +1 -1
  241. package/dist/esm/components/Input/util.js +9 -8
  242. package/dist/esm/components/Input/util.js.map +1 -1
  243. package/dist/esm/components/Label/Label.js.map +1 -1
  244. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  245. package/dist/esm/components/Listbox/ScrollableList.js +63 -82
  246. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  247. package/dist/esm/components/Listbox/useListbox.js +49 -58
  248. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  249. package/dist/esm/components/Listbox/useMultiListbox.js +63 -91
  250. package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
  251. package/dist/esm/components/Listbox/useTypeahead.js +10 -9
  252. package/dist/esm/components/Listbox/useTypeahead.js.map +1 -1
  253. package/dist/esm/components/Listbox/util.js +48 -84
  254. package/dist/esm/components/Listbox/util.js.map +1 -1
  255. package/dist/esm/components/Menu/Context.js +2 -2
  256. package/dist/esm/components/Menu/Context.js.map +1 -1
  257. package/dist/esm/components/Menu/Menu.js.map +1 -1
  258. package/dist/esm/components/Menu/components/Checkbox.js +8 -9
  259. package/dist/esm/components/Menu/components/Checkbox.js.map +1 -1
  260. package/dist/esm/components/Menu/components/Content.js +10 -13
  261. package/dist/esm/components/Menu/components/Content.js.map +1 -1
  262. package/dist/esm/components/Menu/components/Header.js +4 -4
  263. package/dist/esm/components/Menu/components/Header.js.map +1 -1
  264. package/dist/esm/components/Menu/components/Item.js +34 -35
  265. package/dist/esm/components/Menu/components/Item.js.map +1 -1
  266. package/dist/esm/components/Menu/components/Link.js +7 -8
  267. package/dist/esm/components/Menu/components/Link.js.map +1 -1
  268. package/dist/esm/components/Menu/components/RadioGroup.js +16 -18
  269. package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
  270. package/dist/esm/components/Menu/components/Separator.js +4 -4
  271. package/dist/esm/components/Menu/components/Separator.js.map +1 -1
  272. package/dist/esm/components/Menu/components/Trigger.js +5 -5
  273. package/dist/esm/components/Menu/components/Trigger.js.map +1 -1
  274. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  275. package/dist/esm/components/Pagination/PageNumbers.js +23 -28
  276. package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
  277. package/dist/esm/components/Pagination/Pagination.js +39 -56
  278. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  279. package/dist/esm/components/Pagination/usePagination.js +7 -21
  280. package/dist/esm/components/Pagination/usePagination.js.map +1 -1
  281. package/dist/esm/components/Pagination/usePaginationShortcuts.js +9 -9
  282. package/dist/esm/components/Pagination/usePaginationShortcuts.js.map +1 -1
  283. package/dist/esm/components/Popover/Popover.js +29 -34
  284. package/dist/esm/components/Popover/Popover.js.map +1 -1
  285. package/dist/esm/components/Popover/Primitives.js +27 -30
  286. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  287. package/dist/esm/components/Progress/Progress.js +11 -15
  288. package/dist/esm/components/Progress/Progress.js.map +1 -1
  289. package/dist/esm/components/Provider/Provider.js +14 -19
  290. package/dist/esm/components/Provider/Provider.js.map +1 -1
  291. package/dist/esm/components/RadioGroup/RadioGroup.js +45 -57
  292. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  293. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  294. package/dist/esm/components/Select/Select.js +30 -31
  295. package/dist/esm/components/Select/Select.js.map +1 -1
  296. package/dist/esm/components/Select/useSelect.js +63 -82
  297. package/dist/esm/components/Select/useSelect.js.map +1 -1
  298. package/dist/esm/components/Spinner/Spinner.js +12 -19
  299. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  300. package/dist/esm/components/Switch/Switch.js +9 -10
  301. package/dist/esm/components/Switch/Switch.js.map +1 -1
  302. package/dist/esm/components/Table/components/BaseTable.js +23 -30
  303. package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
  304. package/dist/esm/components/Table/components/PaginatedTable.js +3 -7
  305. package/dist/esm/components/Table/components/PaginatedTable.js.map +1 -1
  306. package/dist/esm/components/Table/components/Table.js +18 -25
  307. package/dist/esm/components/Table/components/Table.js.map +1 -1
  308. package/dist/esm/components/Table/components/WindowedTable.js +88 -104
  309. package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
  310. package/dist/esm/components/Table/hooks/plugins/useRowActions.js +122 -146
  311. package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  312. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js +57 -61
  313. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  314. package/dist/esm/components/Table/hooks/plugins/useRowEditing.js +39 -36
  315. package/dist/esm/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  316. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js +80 -90
  317. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  318. package/dist/esm/components/Table/hooks/useRowCreation.js +29 -64
  319. package/dist/esm/components/Table/hooks/useRowCreation.js.map +1 -1
  320. package/dist/esm/components/Table/hooks/useTable.js +119 -141
  321. package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
  322. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +12 -15
  323. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  324. package/dist/esm/components/Table/util/renderColumn.js +10 -10
  325. package/dist/esm/components/Table/util/renderColumn.js.map +1 -1
  326. package/dist/esm/components/Table/util/renderRow.js +37 -46
  327. package/dist/esm/components/Table/util/renderRow.js.map +1 -1
  328. package/dist/esm/components/Table/util/rowIndexPath.js +14 -16
  329. package/dist/esm/components/Table/util/rowIndexPath.js.map +1 -1
  330. package/dist/esm/components/Table/util/sortTypes.js +23 -31
  331. package/dist/esm/components/Table/util/sortTypes.js.map +1 -1
  332. package/dist/esm/components/Table/util.js +29 -41
  333. package/dist/esm/components/Table/util.js.map +1 -1
  334. package/dist/esm/components/Tabs/Tabs.js +25 -27
  335. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  336. package/dist/esm/components/Textarea/Textarea.js +8 -6
  337. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  338. package/dist/esm/components/Toast/Toast.js +20 -21
  339. package/dist/esm/components/Toast/Toast.js.map +1 -1
  340. package/dist/esm/components/Toast/Toaster.js +88 -118
  341. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  342. package/dist/esm/components/Toast/util.js +2 -2
  343. package/dist/esm/components/Toast/util.js.map +1 -1
  344. package/dist/esm/components/Tooltip/Tooltip.js +7 -8
  345. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  346. package/dist/esm/components/Tour/Tour.js +44 -50
  347. package/dist/esm/components/Tour/Tour.js.map +1 -1
  348. package/dist/esm/components/Treeview/Treeview.js +26 -36
  349. package/dist/esm/components/Treeview/Treeview.js.map +1 -1
  350. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
  351. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  352. package/dist/esm/index.css +638 -638
  353. package/dist/esm/index.js +1 -1
  354. package/dist/esm/primitives/Button.js +9 -13
  355. package/dist/esm/primitives/Button.js.map +1 -1
  356. package/dist/esm/utils/date.js.map +1 -1
  357. package/dist/esm/utils/hooks/useBoundingClientRectListener.js +12 -20
  358. package/dist/esm/utils/hooks/useBoundingClientRectListener.js.map +1 -1
  359. package/dist/esm/utils/hooks/useDraggable.js +16 -18
  360. package/dist/esm/utils/hooks/useDraggable.js.map +1 -1
  361. package/dist/esm/utils/hooks/useDropTarget.js +7 -10
  362. package/dist/esm/utils/hooks/useDropTarget.js.map +1 -1
  363. package/dist/esm/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  364. package/dist/esm/utils/hooks/useListScrollTo.js.map +1 -1
  365. package/dist/esm/utils/hooks/useOnClickOutside.js.map +1 -1
  366. package/dist/esm/utils/hooks/useProxiedRef.js +3 -3
  367. package/dist/esm/utils/hooks/useProxiedRef.js.map +1 -1
  368. package/dist/esm/utils/hooks/useTimer.js +9 -17
  369. package/dist/esm/utils/hooks/useTimer.js.map +1 -1
  370. package/dist/esm/utils/input.js +7 -11
  371. package/dist/esm/utils/input.js.map +1 -1
  372. package/dist/esm/utils/mergeRefs.js +2 -2
  373. package/dist/esm/utils/mergeRefs.js.map +1 -1
  374. package/dist/esm/utils/taillwind.js +2 -2
  375. package/dist/esm/utils/taillwind.js.map +1 -1
  376. package/dist/index.css +638 -638
  377. package/dist/taco.cjs.development.js +1914 -2299
  378. package/dist/taco.cjs.development.js.map +1 -1
  379. package/dist/taco.cjs.production.min.js +1 -1
  380. package/dist/taco.cjs.production.min.js.map +1 -1
  381. package/dist/utils/tailwind.d.ts +1 -1
  382. package/package.json +2 -2
  383. package/plugins/tailwindcss-aria-attributes.js +73 -73
  384. package/tailwind.config.js +297 -297
@@ -1 +1 @@
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((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(({ 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((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((props: PopoverProps, ref: React.Ref<HTMLElement>): JSX.Element => {\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","context","children","type","console","warn","name","PopoverPrimitive","mergeRefs","asChild","RenderPropWrapper","onClick","close","CustomEvent","Content","className","cn","output","UnstyledContent","placement","UnstyledArrow","Close","Popover","trigger","otherProps","Provider","value"],"mappings":";;;;;;;;AASA,IAAMA,cAAc,gBAAGC,aAAA,CAAyC;AAC5DC,EAAAA,KAAK,EAAE,EADqD;AAE5DC,EAAAA,GAAG,EAAE;AAFuD,CAAzC,CAAvB;AAMA,IAAMC,OAAO,gBAAGH,UAAA,CAAiB,UAACC,KAAD,EAA6BC,GAA7B;;;AAC7B,MAAME,OAAO,GAAGJ,UAAA,CAAiBD,cAAjB,CAAhB;AACA,MAAIM,QAAQ,GAAGJ,KAAK,CAACI,QAArB;;AAEA,MAAIL,cAAA,CAAqBC,KAAK,CAACI,QAA3B,KAAwC,2BAAOJ,KAAK,CAACI,QAAb,oDAAO,gBAAgBC,IAAvB,MAAgC,UAA5E,EAAwF;AACpFC,IAAAA,OAAO,CAACC,IAAR,uHACwHP,KAAK,CAACI,QAAN,CAAeC,IAAf,CAAoBG,IAD5I,mDAC8LR,KAAK,CAACI,QAAN,CAAeC,IAAf,CAAoBG,IADlN;AAGAJ,IAAAA,QAAQ,GAAGL,aAAA,OAAA,MAAA,EAAOC,KAAK,CAACI,QAAb,CAAX;AACH;;AAED,SACIL,aAAA,CAACU,SAAD,oBAA8BN,OAAO,CAACH,OAAWA;AAAOI,IAAAA,QAAQ,EAAEA;AAAUH,IAAAA,GAAG,EAAES,SAAS,CAAC,CAACP,OAAO,CAACF,GAAT,EAAcA,GAAd,CAAD;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;IAApD,CADJ;AAAA,CADU,CAAd;IAgBaa,OAAO,gBAAGzB,UAAA,CAAiB,UAACC,KAAD,EAAsBC,GAAtB;AACpC,MAAQG,QAAR,GAA6CJ,KAA7C,CAAQI,QAAR;AAAA,MAAkBqB,OAAlB,GAA6CzB,KAA7C,CAAkByB,OAAlB;AAAA,MAA8BC,UAA9B,iCAA6C1B,KAA7C;;AACA,MAAMG,OAAO,GAAGJ,OAAA,CAAc;AAAA,WAAO;AAAEC,MAAAA,KAAK,EAAE0B,UAAT;AAAqBzB,MAAAA,GAAG,EAAHA;AAArB,KAAP;AAAA,GAAd,EAAkD,CAACyB,UAAD,CAAlD,CAAhB;AAEA,SACI3B,aAAA,CAACD,cAAc,CAAC6B,QAAhB;AAAyBC,IAAAA,KAAK,EAAEzB;GAAhC,EACIJ,aAAA,CAACU,IAAD,MAAA,EACKgB,OAAO,IAAI1B,aAAA,CAACG,OAAD,MAAA,EAAUuB,OAAV,CADhB,EAEKrB,QAFL,CADJ,CADJ;AAQH,CAZsB;AAavBoB,OAAO,CAACtB,OAAR,GAAkBA,OAAlB;AACAsB,OAAO,CAACR,OAAR,GAAkBA,OAAlB;AACAQ,OAAO,CAACD,KAAR,GAAgBA,KAAhB;;;;"}
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((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(({ 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((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((props: PopoverProps, ref: React.Ref<HTMLElement>): JSX.Element => {\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","context","children","type","console","warn","name","PopoverPrimitive","mergeRefs","asChild","RenderPropWrapper","onClick","close","CustomEvent","Content","className","cn","output","UnstyledContent","placement","UnstyledArrow","Close","Popover","trigger","otherProps","Provider","value"],"mappings":";;;;;;AASA,MAAMA,cAAc,gBAAGC,aAAA,CAAyC;AAC5DC,EAAAA,KAAK,EAAE,EADqD;AAE5DC,EAAAA,GAAG,EAAE;AAFuD,CAAzC,CAAvB;AAMA,MAAMC,OAAO,gBAAGH,UAAA,CAAiB,CAACC,KAAD,EAA6BC,GAA7B;;;AAC7B,QAAME,OAAO,GAAGJ,UAAA,CAAiBD,cAAjB,CAAhB;AACA,MAAIM,QAAQ,GAAGJ,KAAK,CAACI,QAArB;;AAEA,MAAIL,cAAA,CAAqBC,KAAK,CAACI,QAA3B,KAAwC,2BAAOJ,KAAK,CAACI,QAAb,oDAAO,gBAAgBC,IA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ACH;;AAED,SACIL,aAAA,CAACqB,eAAD;AAAiBH,IAAAA,SAAS,EAAEA;AAAWI,IAAAA,SAAS,EAAErB,KAAK,CAACqB;AAAWpB,IAAAA,GAAG,EAAEA;GAAxE,EACKkB,MADL,EAEIpB,aAAA,CAACuB,aAAD;AAAeL,IAAAA,SAAS,EAAC;GAAzB,CAFJ,CADJ;AAMH,CArBe,CAAhB;AAwBA,MAAMM,KAAK,gBAAGxB,UAAA,CACV,CAACC,KAAD,EAA2BC,GAA3B,KACIF,aAAA,CAACU,OAAD,oBAA4BT;AAAOC,EAAAA,GAAG,EAAEA;AAAKU,EAAAA,OAAO;EAApD,CAFM,CAAd;MAgBaa,OAAO,gBAAGzB,UAAA,CAAiB,CAACC,KAAD,EAAsBC,GAAtB;AACpC,QAAM;AAAEG,IAAAA,QAAF;AAAYqB,IAAAA,OAAZ;AAAqB,OAAGC;AAAxB,MAAuC1B,KAA7C;AACA,QAAMG,OAAO,GAAGJ,OAAA,CAAc,OAAO;AAAEC,IAAAA,KAAK,EAAE0B,UAAT;AAAqBzB,IAAAA;AAArB,GAAP,CAAd,EAAkD,CAACyB,UAAD,CAAlD,CAAhB;AAEA,SACI3B,aAAA,CAACD,cAAc,CAAC6B,QAAhB;AAAyBC,IAAAA,KAAK,EAAEzB;GAAhC,EACIJ,aAAA,CAACU,IAAD,MAAA,EACKgB,OAAO,IAAI1B,aAAA,CAACG,OAAD,MAAA,EAAUuB,OAAV,CADhB,EAEKrB,QAFL,CADJ,CADJ;AAQH,CAZsB;AAavBoB,OAAO,CAACtB,OAAR,GAAkBA,OAAlB;AACAsB,OAAO,CAACR,OAAR,GAAkBA,OAAlB;AACAQ,OAAO,CAACD,KAAR,GAAgBA,KAAhB;;;;"}
@@ -1,42 +1,39 @@
1
- import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import { forwardRef, createElement } from 'react';
3
2
  import cn from 'classnames';
4
3
  import { Arrow, Content } from '@radix-ui/react-popover';
5
4
 
6
- var _excluded = ["placement"];
7
- var UnstyledArrow = /*#__PURE__*/forwardRef(function (props, ref) {
8
- return createElement(Arrow, {
9
- className: "pointer-events-none -mt-px",
10
- asChild: true,
11
- offset: 2,
12
- width: 30,
13
- height: 11
14
- }, createElement("svg", Object.assign({}, props, {
15
- ref: ref,
16
- viewBox: "0 19 30 11",
17
- style: {
18
- transform: 'rotateZ(180deg)'
19
- }
20
- }), createElement("path", {
21
- className: "text-grey-dark group-focus:text-blue-light fill-current",
22
- 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"
23
- }), createElement("path", {
24
- className: "fill-current",
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"
26
- })));
27
- });
28
- var UnstyledContent = /*#__PURE__*/forwardRef(function (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 ', props.className);
5
+ const UnstyledArrow = /*#__PURE__*/forwardRef((props, ref) => createElement(Arrow, {
6
+ className: "pointer-events-none -mt-px",
7
+ asChild: true,
8
+ offset: 2,
9
+ width: 30,
10
+ height: 11
11
+ }, createElement("svg", Object.assign({}, props, {
12
+ ref: ref,
13
+ viewBox: "0 19 30 11",
14
+ style: {
15
+ transform: 'rotateZ(180deg)'
16
+ }
17
+ }), createElement("path", {
18
+ className: "text-grey-dark group-focus:text-blue-light fill-current",
19
+ 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"
20
+ }), createElement("path", {
21
+ className: "fill-current",
22
+ 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"
23
+ }))));
24
+ const UnstyledContent = /*#__PURE__*/forwardRef((props, ref) => {
25
+ const {
26
+ placement: side,
27
+ ...otherProps
28
+ } = props;
29
+ const className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group ', props.className);
33
30
  return createElement(Content, Object.assign({}, otherProps, {
34
31
  className: className,
35
32
  side: side,
36
33
  sideOffset: 1,
37
- style: _extends({}, props.style, {
34
+ style: { ...props.style,
38
35
  zIndex: 996
39
- }),
36
+ },
40
37
  ref: ref
41
38
  }));
42
39
  });
@@ -1 +1 @@
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((props: React.SVGAttributes<SVGElement>, ref: React.Ref<SVGSVGElement>) => (\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\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((props: UnstyledContentProps, ref: React.Ref<HTMLDivElement>) => {\n const { placement: side, ...otherProps } = props;\n\n const className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group ', props.className);\n\n return (\n <PopoverPrimitive.Content\n {...otherProps}\n className={className}\n side={side}\n sideOffset={1}\n style={{\n ...props.style,\n zIndex: 996,\n }}\n ref={ref}\n />\n );\n});\n"],"names":["UnstyledArrow","React","props","ref","PopoverPrimitive","className","asChild","offset","width","height","viewBox","style","transform","d","UnstyledContent","side","placement","otherProps","cn","sideOffset","zIndex"],"mappings":";;;;;;IAKaA,aAAa,gBAAGC,UAAA,CAAiB,UAACC,KAAD,EAAyCC,GAAzC;AAAA,SAC1CF,aAAA,CAACG,KAAD;AAAwBC,IAAAA,SAAS,EAAC;AAA6BC,IAAAA,OAAO;AAACC,IAAAA,MAAM,EAAE;AAAGC,IAAAA,KAAK,EAAE;AAAIC,IAAAA,MAAM,EAAE;GAArG,EACIR,aAAA,MAAA,oBAASC;AAAOC,IAAAA,GAAG,EAAEA;AAAKO,IAAAA,OAAO,EAAC;AAAaC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,SAAS,EAAE;AAAb;IAAtD,EACIX,aAAA,OAAA;AACII,IAAAA,SAAS,EAAC;AACVQ,IAAAA,CAAC,EAAC;GAFN,CADJ,EAKIZ,aAAA,OAAA;AACII,IAAAA,SAAS,EAAC;AACVQ,IAAAA,CAAC,EAAC;GAFN,CALJ,CADJ,CAD0C;AAAA,CAAjB;IAmBhBC,eAAe,gBAAGb,UAAA,CAAiB,UAACC,KAAD,EAA8BC,GAA9B;AAC5C,MAAmBY,IAAnB,GAA2Cb,KAA3C,CAAQc,SAAR;AAAA,MAA4BC,UAA5B,iCAA2Cf,KAA3C;;AAEA,MAAMG,SAAS,GAAGa,EAAE,CAAC,oFAAD,EAAuFhB,KAAK,CAACG,SAA7F,CAApB;AAEA,SACIJ,aAAA,CAACG,OAAD,oBACQa;AACJZ,IAAAA,SAAS,EAAEA;AACXU,IAAAA,IAAI,EAAEA;AACNI,IAAAA,UAAU,EAAE;AACZR,IAAAA,KAAK,eACET,KAAK,CAACS,KADR;AAEDS,MAAAA,MAAM,EAAE;AAFP;AAILjB,IAAAA,GAAG,EAAEA;IATT,CADJ;AAaH,CAlB8B;;;;"}
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((props: React.SVGAttributes<SVGElement>, ref: React.Ref<SVGSVGElement>) => (\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\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((props: UnstyledContentProps, ref: React.Ref<HTMLDivElement>) => {\r\n const { placement: side, ...otherProps } = props;\r\n\r\n const className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group ', props.className);\r\n\r\n return (\r\n <PopoverPrimitive.Content\r\n {...otherProps}\r\n className={className}\r\n side={side}\r\n sideOffset={1}\r\n style={{\r\n ...props.style,\r\n zIndex: 996,\r\n }}\r\n ref={ref}\r\n />\r\n );\r\n});\r\n"],"names":["UnstyledArrow","React","props","ref","PopoverPrimitive","className","asChild","offset","width","height","viewBox","style","transform","d","UnstyledContent","placement","side","otherProps","cn","sideOffset","zIndex"],"mappings":";;;;MAKaA,aAAa,gBAAGC,UAAA,CAAiB,CAACC,KAAD,EAAyCC,GAAzC,KAC1CF,aAAA,CAACG,KAAD;AAAwBC,EAAAA,SAAS,EAAC;AAA6BC,EAAAA,OAAO;AAACC,EAAAA,MAAM,EAAE;AAAGC,EAAAA,KAAK,EAAE;AAAIC,EAAAA,MAAM,EAAE;CAArG,EACIR,aAAA,MAAA,oBAASC;AAAOC,EAAAA,GAAG,EAAEA;AAAKO,EAAAA,OAAO,EAAC;AAAaC,EAAAA,KAAK,EAAE;AAAEC,IAAAA,SAAS,EAAE;AAAb;EAAtD,EACIX,aAAA,OAAA;AACII,EAAAA,SAAS,EAAC;AACVQ,EAAAA,CAAC,EAAC;CAFN,CADJ,EAKIZ,aAAA,OAAA;AACII,EAAAA,SAAS,EAAC;AACVQ,EAAAA,CAAC,EAAC;CAFN,CALJ,CADJ,CADyB;MAmBhBC,eAAe,gBAAGb,UAAA,CAAiB,CAACC,KAAD,EAA8BC,GAA9B;AAC5C,QAAM;AAAEY,IAAAA,SAAS,EAAEC,IAAb;AAAmB,OAAGC;AAAtB,MAAqCf,KAA3C;AAEA,QAAMG,SAAS,GAAGa,EAAE,CAAC,oFAAD,EAAuFhB,KAAK,CAACG,SAA7F,CAApB;AAEA,SACIJ,aAAA,CAACG,OAAD,oBACQa;AACJZ,IAAAA,SAAS,EAAEA;AACXW,IAAAA,IAAI,EAAEA;AACNG,IAAAA,UAAU,EAAE;AACZR,IAAAA,KAAK,EAAE,EACH,GAAGT,KAAK,CAACS,KADN;AAEHS,MAAAA,MAAM,EAAE;AAFL;AAIPjB,IAAAA,GAAG,EAAEA;IATT,CADJ;AAaH,CAlB8B;;;;"}
@@ -1,27 +1,23 @@
1
- import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default from 'react';
3
2
  import cn from 'classnames';
4
3
 
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;
4
+ const Progress = ({
5
+ duration = undefined,
6
+ ...props
7
+ }) => {
8
+ let style;
14
9
 
15
10
  if (duration) {
16
11
  style = {
17
- animationDuration: duration + "ms"
12
+ animationDuration: `${duration}ms`
18
13
  };
19
14
  }
20
15
 
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));
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
+ });
25
21
  return React__default.createElement("span", Object.assign({}, props, {
26
22
  "data-taco": "progress",
27
23
  className: className
@@ -1 +1 @@
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;;AAChD,MAAIC,KAAJ;;AAEA,MAAIH,QAAJ,EAAc;AACVG,IAAAA,KAAK,GAAG;AACJC,MAAAA,iBAAiB,EAAKJ,QAAL;AADb,KAAR;AAGH;;AAED,MAAMK,SAAS,GAAGC,EAAE,CAAC,wDAAD,EAA2DJ,KAAK,CAACG,SAAjE,CAApB;AAEA,MAAME,iBAAiB,GAAGD,EAAE,CAAC,4BAAD;AACxB,6JACI,CAACN;AAFmB,yDAGwBA,QAHxB,OAA5B;AAMA,SACIQ,4BAAA,OAAA,oBAAUN;iBAAiB;AAAWG,IAAAA,SAAS,EAAEA;IAAjD,EACIG,4BAAA,OAAA;AAAMH,IAAAA,SAAS,EAAEE;iBAA6B;AAAeJ,IAAAA,KAAK,EAAEA;GAApE,CADJ,CADJ;AAKH;;;;"}
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;AAAEC,EAAAA,QAAQ,GAAGC,SAAb;AAAwB,KAAGC;AAA3B,CAAD;AACpB,MAAIC,KAAJ;;AAEA,MAAIH,QAAJ,EAAc;AACVG,IAAAA,KAAK,GAAG;AACJC,MAAAA,iBAAiB,KAAKJ;AADlB,KAAR;AAGH;;AAED,QAAMK,SAAS,GAAGC,EAAE,CAAC,wDAAD,EAA2DJ,KAAK,CAACG,SAAjE,CAApB;AAEA,QAAME,iBAAiB,GAAGD,EAAE,CAAC,4BAAD,EAA+B;AACvD,6JACI,CAACN,QAFkD;AAGvD,iDAAA,GAAgDA;AAHO,GAA/B,CAA5B;AAMA,SACIQ,4BAAA,OAAA,oBAAUN;iBAAiB;AAAWG,IAAAA,SAAS,EAAEA;IAAjD,EACIG,4BAAA,OAAA;AAAMH,IAAAA,SAAS,EAAEE;iBAA6B;AAAeJ,IAAAA,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
- var defaultLocalisationTexts = {
4
+ const 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'],
@@ -65,7 +65,7 @@ var defaultLocalisationTexts = {
65
65
  back: 'Back',
66
66
  close: 'Close',
67
67
  skip: 'Close and complete',
68
- last: 'Last',
68
+ last: 'Done',
69
69
  next: 'Next',
70
70
  open: 'Open'
71
71
  },
@@ -73,35 +73,30 @@ var defaultLocalisationTexts = {
73
73
  inputLabel: 'Search...'
74
74
  }
75
75
  };
76
- var defaultLocalizationContext = {
76
+ const defaultLocalizationContext = {
77
77
  locale: 'en-GB',
78
78
  texts: defaultLocalisationTexts,
79
79
  formatting: {
80
80
  date: 'dd.mm.yy'
81
81
  }
82
82
  };
83
- var Context = /*#__PURE__*/createContext({
83
+ const Context = /*#__PURE__*/createContext({
84
84
  localization: defaultLocalizationContext
85
85
  });
86
- var Provider = function Provider(props) {
87
- var children = props.children,
88
- _props$localization = props.localization,
89
- localization = _props$localization === void 0 ? defaultLocalizationContext : _props$localization;
90
- var value = useMemo(function () {
91
- return {
92
- localization: localization
93
- };
94
- }, [localization]);
86
+ const Provider = props => {
87
+ const {
88
+ children,
89
+ localization = defaultLocalizationContext
90
+ } = props;
91
+ const value = useMemo(() => ({
92
+ localization
93
+ }), [localization]);
95
94
  return createElement(Context.Provider, {
96
95
  value: value
97
96
  }, createElement(ToastProvider, null, children));
98
97
  };
99
- var useTaco = function useTaco() {
100
- return useContext(Context);
101
- };
102
- var useLocalization = function useLocalization() {
103
- return useTaco().localization;
104
- };
98
+ const useTaco = () => useContext(Context);
99
+ const useLocalization = () => useTaco().localization;
105
100
 
106
101
  export { Provider, defaultLocalisationTexts, useLocalization, useTaco };
107
102
  //# sourceMappingURL=Provider.js.map
@@ -1 +1 @@
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 { 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 [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 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: 'Last',\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","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":";;;IA4DaA,wBAAwB,GAAG;AACpCC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,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;AAeNC,IAAAA,aAAa,EAAE,CAAC,KAAD,EAAQ,KAAR,EAAe,KAAf,EAAsB,KAAtB,EAA6B,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,CAACG,QAAT;AAAkBG,IAAAA,KAAK,EAAEA;GAAzB,EACIL,aAAA,CAACM,aAAD,MAAA,EAAgBF,QAAhB,CADJ,CADJ;AAKH;IAEYG,OAAO,GAAG,SAAVA,OAAU;AAAA,SAAYP,UAAA,CAAiBD,OAAjB,CAAZ;AAAA;IACVS,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAoBD,OAAO,GAAGN,YAA9B;AAAA;;;;"}
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 { 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 [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 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","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":";;;MA4DaA,wBAAwB,GAAG;AACpCC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,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;AAeNC,IAAAA,aAAa,EAAE,CAAC,KAAD,EAAQ,KAAR,EAAe,KAAf,EAAsB,KAAtB,EAA6B,KAA7B,EAAoC,KAApC,EAA2C,KAA3C,CAfT;AAgBNC,IAAAA,OAAO,EAAE;AACLC,MAAAA,aAAa,EAAE,gBADV;AAELC,MAAAA,SAAS,EAAE,YAFN;AAGLC,MAAAA,YAAY,EAAE,eAHT;AAILC,MAAAA,QAAQ,EAAE,WAJL;AAKLC,MAAAA,KAAK,EAAE;AALF;AAhBH,GAD0B;AAyBpCC,EAAAA,UAAU,EAAE;AACRT,IAAAA,QAAQ,EAAE,UADF;AAERU,IAAAA,KAAK,EAAE,OAFC;AAGRC,IAAAA,MAAM,EAAE,eAHA;AAIRC,IAAAA,SAAS,EAAE;AAJH,GAzBwB;AA+BpCC,EAAAA,MAAM,EAAE;AACJC,IAAAA,KAAK,EAAE;AADH,GA/B4B;AAkCpCC,EAAAA,OAAO,EAAE;AACLC,IAAAA,OAAO,EAAE,oBADJ;AAELC,IAAAA,KAAK,EAAE,kBAFF;AAGLC,IAAAA,SAAS,EAAE;AAHN,GAlC2B;AAuCpCC,EAAAA,MAAM,EAAE;AACJL,IAAAA,KAAK,EAAE,OADH;AAEJM,IAAAA,IAAI,EAAE;AAFF,GAvC4B;AA2CpCC,EAAAA,UAAU,EAAE;AACRC,IAA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EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AADE;AAHiC,CAAjD;AAQA,MAAMC,OAAO,gBAAGC,aAAA,CAA0B;AACtCC,EAAAA,YAAY,EAAEP;AADwB,CAA1B,CAAhB;MAWaQ,QAAQ,GAAIC,KAAD;AACpB,QAAM;AAAEC,IAAAA,QAAF;AAAYH,IAAAA,YAAY,GAAGP;AAA3B,MAA0DS,KAAhE;AACA,QAAME,KAAK,GAAGL,OAAA,CAAc,OAAO;AAAEC,IAAAA;AAAF,GAAP,CAAd,EAAwC,CAACA,YAAD,CAAxC,CAAd;AAEA,SACID,aAAA,CAACD,OAAO,CAACG,QAAT;AAAkBG,IAAAA,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,36 +1,27 @@
1
- import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import { useMemo, Children, isValidElement, forwardRef, createElement, createContext, useContext } from 'react';
3
2
  import cn from 'classnames';
4
3
  import { Root, Item, Indicator } from '@radix-ui/react-radio-group';
5
4
 
6
- var _excluded = ["children", "value"],
7
- _excluded2 = ["children", "defaultValue", "disabled", "invalid", "onChange", "orientation", "value"];
8
- var getRadioGroupItemValueAsString = function getRadioGroupItemValueAsString(value) {
9
- return value === null ? '' : String(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({
5
+ const getRadioGroupItemValueAsString = value => value === null ? '' : String(value);
6
+ const findByValue = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
7
+ const RadioGroupContext = /*#__PURE__*/createContext({
17
8
  disabled: false,
18
9
  invalid: false
19
10
  });
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 disabled = context.disabled || props.disabled;
28
- var className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {
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 disabled = context.disabled || props.disabled;
19
+ const className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {
29
20
  'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue': !disabled && !context.invalid,
30
21
  'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,
31
22
  'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !disabled
32
23
  });
33
- var labelClassName = cn('flex items-center cursor-pointer', {
24
+ const labelClassName = cn('flex items-center cursor-pointer', {
34
25
  'cursor-not-allowed text-grey-dark': disabled
35
26
  });
36
27
  return createElement("label", {
@@ -44,38 +35,34 @@ var RadioGroupItem = /*#__PURE__*/forwardRef(function RadioGroupItem(props, ref)
44
35
  className: "h-2 w-2 rounded-full bg-white"
45
36
  })), children);
46
37
  });
47
- var useRadioGroup = function useRadioGroup(props) {
48
- var children = props.children,
49
- defaultValue = props.defaultValue,
50
- disabled = props.disabled,
51
- invalid = props.invalid,
52
- onChange = props.onChange,
53
- _props$orientation = props.orientation,
54
- orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
55
- value = props.value,
56
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2);
57
-
58
- var values = useMemo(function () {
59
- var radioGroupItemValues = [];
60
- Children.forEach(children, function (child) {
38
+ const useRadioGroup = props => {
39
+ const {
40
+ children,
41
+ defaultValue,
42
+ disabled,
43
+ invalid,
44
+ onChange,
45
+ orientation = 'vertical',
46
+ value,
47
+ ...otherProps
48
+ } = props;
49
+ const values = useMemo(() => {
50
+ const radioGroupItemValues = [];
51
+ Children.forEach(children, child => {
61
52
  if (isValidElement(child)) {
62
53
  radioGroupItemValues.push(child.props.value);
63
54
  }
64
55
  });
65
56
  return radioGroupItemValues;
66
57
  }, [children]);
67
- var context = useMemo(function () {
68
- return {
69
- disabled: disabled !== null && disabled !== void 0 ? disabled : false,
70
- invalid: invalid !== null && invalid !== void 0 ? invalid : false
71
- };
72
- }, [disabled, invalid]);
73
- var valueProps;
58
+ const context = useMemo(() => ({
59
+ disabled: disabled !== null && disabled !== void 0 ? disabled : false,
60
+ invalid: invalid !== null && invalid !== void 0 ? invalid : false
61
+ }), [disabled, invalid]);
62
+ let valueProps;
74
63
 
75
64
  if (onChange !== undefined) {
76
- var handleChange = function handleChange(value) {
77
- return onChange(findByValue(values, value));
78
- };
65
+ const handleChange = value => onChange(findByValue(values, value));
79
66
 
80
67
  valueProps = {
81
68
  onValueChange: handleChange,
@@ -88,19 +75,20 @@ var useRadioGroup = function useRadioGroup(props) {
88
75
  }
89
76
 
90
77
  return {
91
- context: context,
92
- props: _extends({}, otherProps, valueProps, {
93
- children: children,
94
- orientation: orientation
95
- })
78
+ context,
79
+ props: { ...otherProps,
80
+ ...valueProps,
81
+ children,
82
+ orientation
83
+ }
96
84
  };
97
85
  };
98
- var RadioGroup = /*#__PURE__*/forwardRef(function RadioGroup(props, ref) {
99
- var _useRadioGroup = useRadioGroup(props),
100
- context = _useRadioGroup.context,
101
- otherProps = _useRadioGroup.props;
102
-
103
- var className = cn('flex items-start', {
86
+ const RadioGroup = /*#__PURE__*/forwardRef(function RadioGroup(props, ref) {
87
+ const {
88
+ context,
89
+ props: otherProps
90
+ } = useRadioGroup(props);
91
+ const className = cn('flex items-start', {
104
92
  'flex-wrap space-x-4': otherProps.orientation === 'horizontal',
105
93
  'flex-col space-y-2': otherProps.orientation === 'vertical'
106
94
  }, otherProps.className);
@@ -1 +1 @@
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 => (value === null ? '' : 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 disabled = context.disabled || props.disabled;\n\n const className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {\n 'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue':\n !disabled && !context.invalid,\n 'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,\n 'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red':\n context.invalid && !disabled,\n });\n const labelClassName = cn('flex items-center cursor-pointer', {\n 'cursor-not-allowed text-grey-dark': disabled,\n });\n\n return (\n <label className={labelClassName}>\n <RadioGroupPrimitive.Item\n {...otherProps}\n className={className}\n disabled={disabled}\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',\n {\n 'flex-wrap space-x-4': otherProps.orientation === 'horizontal',\n 'flex-col space-y-2': 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","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;AAAA,SAAyCA,KAAK,KAAK,IAAV,GAAiB,EAAjB,GAAsBC,MAAM,CAACD,KAAD,CAArE;AAAA;IAEjCE,WAAW,GAAG,SAAdA,WAAc,CAACC,MAAD,EAAgCC,aAAhC;AAAA,SACvBD,MAAM,CAACE,IAAP,CAAY,UAAAL,KAAK;AAAA,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sx"],"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 => (value === null ? '' : 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 disabled = context.disabled || props.disabled;\r\n\r\n const className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {\r\n 'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue':\r\n !disabled && !context.invalid,\r\n 'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,\r\n 'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red':\r\n context.invalid && !disabled,\r\n });\r\n const labelClassName = cn('flex items-center cursor-pointer', {\r\n 'cursor-not-allowed text-grey-dark': disabled,\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={disabled}\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',\r\n {\r\n 'flex-wrap space-x-4': otherProps.orientation === 'horizontal',\r\n 'flex-col space-y-2': 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","className","cn","labelClassName","RadioGroupPrimitive","useRadioGroup","defaultValue","onChange","orientation","radioGroupItemValues","forEach","child","push","valueProps","undefined","handleChange","onValueChange","RadioGroup","Provider","Item"],"mappings":";;;;MAOaA,8BAA8B,GAAIC,KAAD,IAAyCA,KAAK,KAAK,IAAV,G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P,MAAAA,YAAY,EAAEA,YAAY,KAAKQ,SAAjB,GAA6B9B,8BAA8B,CAACsB,YAAD,CAA3D,GAA4EQ;AADjF,KAAb;AAGH;;AAED,SAAO;AACHhB,IAAAA,OADG;AAEHF,IAAAA,KAAK,EAAE,EACH,GAAGI,UADA;AAEH,SAAGa,UAFA;AAGHd,MAAAA,QAHG;AAIHS,MAAAA;AAJG;AAFJ,GAAP;AASH;MAEYS,UAAU,gBAAGzB,UAAA,CAAiB,SAASyB,UAAT,CAAoBrB,KAApB,EAA4CC,GAA5C;AACvC,QAAM;AAAEC,IAAAA,OAAF;AAAWF,IAAAA,KAAK,EAAEI;AAAlB,MAAiCK,aAAa,CAACT,KAAD,CAApD;AACA,QAAMK,SAAS,GAAGC,EAAE,CAChB,kBADgB,EAEhB;AACI,2BAAuBF,UAAU,CAACQ,WAAX,KAA2B,YADtD;AAEI,0BAAsBR,UAAU,CAACQ,WAAX,KAA2B;AAFrD,GAFgB,EAMhBR,UAAU,CAACC,SANK,CAApB;AASA,SACIT,aAAA,CAACD,iBAAiB,CAAC2B,QAAnB;AAA4BjC,IAAAA,KAAK,EAAEa;GAAnC,EACIN,aAAA,CAACY,IAAD,oBAA8BJ;AAAYC,IAAAA,SAAS,EAAEA;iBAAqB;AAAcJ,IAAAA,GAAG,EAAEA;IAA7F,CADJ,CADJ;AAKH,CAhByB;AAiB1BoB,UAAU,CAACE,IAAX,GAAkBxB,cAAlB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.js","sources":["../../../../src/components/SearchInput/SearchInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport keycode from 'keycode';\nimport { Input, InputProps, useLocalization, IconButton } from '../..';\n\nexport type SearchInputTexts = {\n /**\n * aria-label text for input\n */\n inputLabel: string;\n};\n\nexport type SearchInputProps = Omit<InputProps, 'icon'> & {\n /** Current input value will be passed to the method. In order to get the value, the component must be controlled otherwise value will always be undefined */\n onSearch?: (value: string | number | readonly string[] | undefined) => void;\n};\n\nexport const SearchInput = React.forwardRef(function SearchInput(\n { onSearch, ...props }: SearchInputProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { texts } = useLocalization();\n\n const handleClick = (): void => {\n if (!props.disabled) {\n onSearch?.(props.value);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {\n const isEnterKeyPressed = event.keyCode === keycode('enter');\n\n if (isEnterKeyPressed) {\n handleClick();\n }\n };\n\n return (\n <Input\n aria-label={texts.searchInput.inputLabel}\n {...props}\n button={\n <IconButton\n icon=\"search\"\n className=\"!bg-transparent !border-transparent\"\n disabled={props.disabled}\n onClick={handleClick}\n />\n }\n onKeyDown={handleKeyDown}\n ref={ref}\n />\n );\n});\n"],"names":["SearchInput","React","ref","onSearch","props","useLocalization","texts","handleClick","disabled","value","handleKeyDown","event","isEnterKeyPressed","keyCode","keycode","Input","searchInput","inputLabel","button","IconButton","icon","className","onClick","onKeyDown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBaA,WAAW,gBAAGC,UAAA,CAAiB,SAASD,WAAT,OAExCE,GAFwC;MACtCC,gBAAAA;MAAaC;;AAGf,yBAAkBC,eAAe,EAAjC;AAAA,MAAQC,KAAR,oBAAQA,KAAR;;AAEA,MAAMC,WAAW,GAAG,SAAdA,WAAc;AAChB,QAAI,CAACH,KAAK,CAACI,QAAX,EAAqB;AACjBL,MAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAGC,KAAK,CAACK,KAAT,CAAR;AACH;AACJ,GAJD;;AAMA,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;AAClB,QAAMC,iBAAiB,GAAGD,KAAK,CAACE,OAAN,KAAkBC,OAAO,CAAC,OAAD,CAAnD;;AAEA,QAAIF,iBAAJ,EAAuB;AACnBL,MAAAA,WAAW;AACd;AACJ,GAND;;AAQA,SACIN,aAAA,CAACc,KAAD;kBACgBT,KAAK,CAACU,WAAN,CAAkBC;KAC1Bb;AACJc,IAAAA,MAAM,EACFjB,aAAA,CAACkB,UAAD;AACIC,MAAAA,IAAI,EAAC;AACLC,MAAAA,SAAS,EAAC;AACVb,MAAAA,QAAQ,EAAEJ,KAAK,CAACI;AAChBc,MAAAA,OAAO,EAAEf;KAJb;AAOJgB,IAAAA,SAAS,EAAEb;AACXR,IAAAA,GAAG,EAAEA;IAZT,CADJ;AAgBH,CApC0B;;;;"}
1
+ {"version":3,"file":"SearchInput.js","sources":["../../../../src/components/SearchInput/SearchInput.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport keycode from 'keycode';\r\nimport { Input, InputProps, useLocalization, IconButton } from '../..';\r\n\r\nexport type SearchInputTexts = {\r\n /**\r\n * aria-label text for input\r\n */\r\n inputLabel: string;\r\n};\r\n\r\nexport type SearchInputProps = Omit<InputProps, 'icon'> & {\r\n /** Current input value will be passed to the method. In order to get the value, the component must be controlled otherwise value will always be undefined */\r\n onSearch?: (value: string | number | readonly string[] | undefined) => void;\r\n};\r\n\r\nexport const SearchInput = React.forwardRef(function SearchInput(\r\n { onSearch, ...props }: SearchInputProps,\r\n ref: React.Ref<HTMLInputElement>\r\n) {\r\n const { texts } = useLocalization();\r\n\r\n const handleClick = (): void => {\r\n if (!props.disabled) {\r\n onSearch?.(props.value);\r\n }\r\n };\r\n\r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {\r\n const isEnterKeyPressed = event.keyCode === keycode('enter');\r\n\r\n if (isEnterKeyPressed) {\r\n handleClick();\r\n }\r\n };\r\n\r\n return (\r\n <Input\r\n aria-label={texts.searchInput.inputLabel}\r\n {...props}\r\n button={\r\n <IconButton\r\n icon=\"search\"\r\n className=\"!bg-transparent !border-transparent\"\r\n disabled={props.disabled}\r\n onClick={handleClick}\r\n />\r\n }\r\n onKeyDown={handleKeyDown}\r\n ref={ref}\r\n />\r\n );\r\n});\r\n"],"names":["SearchInput","React","ref","onSearch","props","useLocalization","texts","handleClick","disabled","value","handleKeyDown","event","isEnterKeyPressed","keyCode","keycode","Input","searchInput","inputLabel","button","IconButton","icon","className","onClick","onKeyDown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBaA,WAAW,gBAAGC,UAAA,CAAiB,SAASD,WAAT,OAExCE,GAFwC;MACtCC,gBAAAA;MAAaC;;AAGf,yBAAkBC,eAAe,EAAjC;AAAA,MAAQC,KAAR,oBAAQA,KAAR;;AAEA,MAAMC,WAAW,GAAG,SAAdA,WAAc;AAChB,QAAI,CAACH,KAAK,CAACI,QAAX,EAAqB;AACjBL,MAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAGC,KAAK,CAACK,KAAT,CAAR;AACH;AACJ,GAJD;;AAMA,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;AAClB,QAAMC,iBAAiB,GAAGD,KAAK,CAACE,OAAN,KAAkBC,OAAO,CAAC,OAAD,CAAnD;;AAEA,QAAIF,iBAAJ,EAAuB;AACnBL,MAAAA,WAAW;AACd;AACJ,GAND;;AAQA,SACIN,aAAA,CAACc,KAAD;kBACgBT,KAAK,CAACU,WAAN,CAAkBC;KAC1Bb;AACJc,IAAAA,MAAM,EACFjB,aAAA,CAACkB,UAAD;AACIC,MAAAA,IAAI,EAAC;AACLC,MAAAA,SAAS,EAAC;AACVb,MAAAA,QAAQ,EAAEJ,KAAK,CAACI;AAChBc,MAAAA,OAAO,EAAEf;KAJb;AAOJgB,IAAAA,SAAS,EAAEb;AACXR,IAAAA,GAAG,EAAEA;IAZT,CADJ;AAgBH,CApC0B;;;;"}