@economic/taco 11.0.0 → 11.0.1-react-v19.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 (774) hide show
  1. package/dist/charts/components/Area/AreaChart.cjs.map +1 -1
  2. package/dist/charts/components/Area/AreaChart.d.ts +1 -1
  3. package/dist/charts/components/Area/AreaChart.js.map +1 -1
  4. package/dist/charts/components/Bar/BarChart.cjs.map +1 -1
  5. package/dist/charts/components/Bar/BarChart.d.ts +1 -1
  6. package/dist/charts/components/Bar/BarChart.js.map +1 -1
  7. package/dist/charts/components/Composed/BarLineChart.cjs.map +1 -1
  8. package/dist/charts/components/Composed/BarLineChart.d.ts +2 -2
  9. package/dist/charts/components/Composed/BarLineChart.js.map +1 -1
  10. package/dist/charts/components/Donut/DonutChart.cjs.map +1 -1
  11. package/dist/charts/components/Donut/DonutChart.d.ts +1 -1
  12. package/dist/charts/components/Donut/DonutChart.js.map +1 -1
  13. package/dist/charts/components/Line/LineChart.cjs.map +1 -1
  14. package/dist/charts/components/Line/LineChart.d.ts +1 -1
  15. package/dist/charts/components/Line/LineChart.js.map +1 -1
  16. package/dist/charts/components/Pie/PieChart.cjs.map +1 -1
  17. package/dist/charts/components/Pie/PieChart.d.ts +1 -1
  18. package/dist/charts/components/Pie/PieChart.js.map +1 -1
  19. package/dist/charts/components/Tooltip.cjs.map +1 -1
  20. package/dist/charts/components/Tooltip.d.ts +1 -1
  21. package/dist/charts/components/Tooltip.js.map +1 -1
  22. package/dist/charts/components/types.d.ts +2 -2
  23. package/dist/components/AlertDialog/AlertDialog.cjs.map +1 -1
  24. package/dist/components/AlertDialog/AlertDialog.d.ts +1 -1
  25. package/dist/components/AlertDialog/AlertDialog.js.map +1 -1
  26. package/dist/components/Banner/util.cjs.map +1 -1
  27. package/dist/components/Banner/util.d.ts +2 -1
  28. package/dist/components/Banner/util.js.map +1 -1
  29. package/dist/components/Card/Card.cjs.map +1 -1
  30. package/dist/components/Card/Card.d.ts +1 -1
  31. package/dist/components/Card/Card.js.map +1 -1
  32. package/dist/components/Combobox/Combobox.cjs.map +1 -1
  33. package/dist/components/Combobox/Combobox.d.ts +1 -1
  34. package/dist/components/Combobox/Combobox.js.map +1 -1
  35. package/dist/components/Combobox/useCombobox.cjs.map +1 -1
  36. package/dist/components/Combobox/useCombobox.d.ts +1 -1
  37. package/dist/components/Combobox/useCombobox.js.map +1 -1
  38. package/dist/components/Dialog/Dialog.cjs.map +1 -1
  39. package/dist/components/Dialog/Dialog.d.ts +1 -1
  40. package/dist/components/Dialog/Dialog.js.map +1 -1
  41. package/dist/components/Dialog/components/Content.cjs.map +1 -1
  42. package/dist/components/Dialog/components/Content.d.ts +2 -2
  43. package/dist/components/Dialog/components/Content.js.map +1 -1
  44. package/dist/components/Drawer/Drawer.cjs.map +1 -1
  45. package/dist/components/Drawer/Drawer.d.ts +1 -1
  46. package/dist/components/Drawer/Drawer.js.map +1 -1
  47. package/dist/components/Drawer/useDrawerStack.cjs +1 -1
  48. package/dist/components/Drawer/useDrawerStack.cjs.map +1 -1
  49. package/dist/components/Drawer/useDrawerStack.js +1 -1
  50. package/dist/components/Drawer/useDrawerStack.js.map +1 -1
  51. package/dist/components/Hanger/Hanger.cjs.map +1 -1
  52. package/dist/components/Hanger/Hanger.d.ts +1 -1
  53. package/dist/components/Hanger/Hanger.js.map +1 -1
  54. package/dist/components/Header/components/Agreement/Display.cjs.map +1 -1
  55. package/dist/components/Header/components/Agreement/Display.d.ts +1 -1
  56. package/dist/components/Header/components/Agreement/Display.js.map +1 -1
  57. package/dist/components/Header/components/Agreement/Item.cjs.map +1 -1
  58. package/dist/components/Header/components/Agreement/Item.d.ts +1 -1
  59. package/dist/components/Header/components/Agreement/Item.js.map +1 -1
  60. package/dist/components/Header/components/Link.cjs.map +1 -1
  61. package/dist/components/Header/components/Link.d.ts +1 -1
  62. package/dist/components/Header/components/Link.js.map +1 -1
  63. package/dist/components/Icon/components/AccountPreview.cjs.map +1 -1
  64. package/dist/components/Icon/components/AccountPreview.js.map +1 -1
  65. package/dist/components/Icon/components/Accounting.cjs.map +1 -1
  66. package/dist/components/Icon/components/Accounting.js.map +1 -1
  67. package/dist/components/Icon/components/AccountingYear.cjs.map +1 -1
  68. package/dist/components/Icon/components/AccountingYear.js.map +1 -1
  69. package/dist/components/Icon/components/AccountingYearCancel.cjs.map +1 -1
  70. package/dist/components/Icon/components/AccountingYearCancel.js.map +1 -1
  71. package/dist/components/Icon/components/AiChatSolid.cjs.map +1 -1
  72. package/dist/components/Icon/components/AiChatSolid.js.map +1 -1
  73. package/dist/components/Icon/components/AiStars.cjs.map +1 -1
  74. package/dist/components/Icon/components/AiStars.js.map +1 -1
  75. package/dist/components/Icon/components/ArrowBottom.cjs.map +1 -1
  76. package/dist/components/Icon/components/ArrowBottom.js.map +1 -1
  77. package/dist/components/Icon/components/ArrowDown.cjs.map +1 -1
  78. package/dist/components/Icon/components/ArrowDown.js.map +1 -1
  79. package/dist/components/Icon/components/ArrowEnd.cjs.map +1 -1
  80. package/dist/components/Icon/components/ArrowEnd.js.map +1 -1
  81. package/dist/components/Icon/components/ArrowLeft.cjs.map +1 -1
  82. package/dist/components/Icon/components/ArrowLeft.js.map +1 -1
  83. package/dist/components/Icon/components/ArrowRight.cjs.map +1 -1
  84. package/dist/components/Icon/components/ArrowRight.js.map +1 -1
  85. package/dist/components/Icon/components/ArrowStart.cjs.map +1 -1
  86. package/dist/components/Icon/components/ArrowStart.js.map +1 -1
  87. package/dist/components/Icon/components/ArrowTop.cjs.map +1 -1
  88. package/dist/components/Icon/components/ArrowTop.js.map +1 -1
  89. package/dist/components/Icon/components/ArrowUp.cjs.map +1 -1
  90. package/dist/components/Icon/components/ArrowUp.js.map +1 -1
  91. package/dist/components/Icon/components/Attach.cjs.map +1 -1
  92. package/dist/components/Icon/components/Attach.js.map +1 -1
  93. package/dist/components/Icon/components/AttachAuto.cjs.map +1 -1
  94. package/dist/components/Icon/components/AttachAuto.js.map +1 -1
  95. package/dist/components/Icon/components/AttachCancel.cjs.map +1 -1
  96. package/dist/components/Icon/components/AttachCancel.js.map +1 -1
  97. package/dist/components/Icon/components/AttachWarning.cjs.map +1 -1
  98. package/dist/components/Icon/components/AttachWarning.js.map +1 -1
  99. package/dist/components/Icon/components/Autopay.cjs.map +1 -1
  100. package/dist/components/Icon/components/Autopay.js.map +1 -1
  101. package/dist/components/Icon/components/AutopayPaused.cjs.map +1 -1
  102. package/dist/components/Icon/components/AutopayPaused.js.map +1 -1
  103. package/dist/components/Icon/components/Autotext.cjs.map +1 -1
  104. package/dist/components/Icon/components/Autotext.js.map +1 -1
  105. package/dist/components/Icon/components/AutotextInsert.cjs.map +1 -1
  106. package/dist/components/Icon/components/AutotextInsert.js.map +1 -1
  107. package/dist/components/Icon/components/Basic.cjs.map +1 -1
  108. package/dist/components/Icon/components/Basic.js.map +1 -1
  109. package/dist/components/Icon/components/BasicTabs.cjs.map +1 -1
  110. package/dist/components/Icon/components/BasicTabs.js.map +1 -1
  111. package/dist/components/Icon/components/BellSolid.cjs.map +1 -1
  112. package/dist/components/Icon/components/BellSolid.js.map +1 -1
  113. package/dist/components/Icon/components/Book.cjs.map +1 -1
  114. package/dist/components/Icon/components/Book.js.map +1 -1
  115. package/dist/components/Icon/components/Booking.cjs.map +1 -1
  116. package/dist/components/Icon/components/Booking.js.map +1 -1
  117. package/dist/components/Icon/components/Budget.cjs.map +1 -1
  118. package/dist/components/Icon/components/Budget.js.map +1 -1
  119. package/dist/components/Icon/components/Calendar.cjs.map +1 -1
  120. package/dist/components/Icon/components/Calendar.js.map +1 -1
  121. package/dist/components/Icon/components/CashAccount.cjs.map +1 -1
  122. package/dist/components/Icon/components/CashAccount.js.map +1 -1
  123. package/dist/components/Icon/components/CashReports.cjs.map +1 -1
  124. package/dist/components/Icon/components/CashReports.js.map +1 -1
  125. package/dist/components/Icon/components/ChartArea.cjs.map +1 -1
  126. package/dist/components/Icon/components/ChartArea.js.map +1 -1
  127. package/dist/components/Icon/components/ChartBar.cjs.map +1 -1
  128. package/dist/components/Icon/components/ChartBar.js.map +1 -1
  129. package/dist/components/Icon/components/ChartLine.cjs.map +1 -1
  130. package/dist/components/Icon/components/ChartLine.js.map +1 -1
  131. package/dist/components/Icon/components/ChartPie.cjs.map +1 -1
  132. package/dist/components/Icon/components/ChartPie.js.map +1 -1
  133. package/dist/components/Icon/components/ChartTable.cjs.map +1 -1
  134. package/dist/components/Icon/components/ChartTable.js.map +1 -1
  135. package/dist/components/Icon/components/Chat.cjs.map +1 -1
  136. package/dist/components/Icon/components/Chat.js.map +1 -1
  137. package/dist/components/Icon/components/ChatSolid.cjs.map +1 -1
  138. package/dist/components/Icon/components/ChatSolid.js.map +1 -1
  139. package/dist/components/Icon/components/ChevronDown.cjs.map +1 -1
  140. package/dist/components/Icon/components/ChevronDown.js.map +1 -1
  141. package/dist/components/Icon/components/ChevronDownDouble.cjs.map +1 -1
  142. package/dist/components/Icon/components/ChevronDownDouble.js.map +1 -1
  143. package/dist/components/Icon/components/ChevronDownSolid.cjs.map +1 -1
  144. package/dist/components/Icon/components/ChevronDownSolid.js.map +1 -1
  145. package/dist/components/Icon/components/ChevronLeft.cjs.map +1 -1
  146. package/dist/components/Icon/components/ChevronLeft.js.map +1 -1
  147. package/dist/components/Icon/components/ChevronLeftDouble.cjs.map +1 -1
  148. package/dist/components/Icon/components/ChevronLeftDouble.js.map +1 -1
  149. package/dist/components/Icon/components/ChevronLeftSolid.cjs.map +1 -1
  150. package/dist/components/Icon/components/ChevronLeftSolid.js.map +1 -1
  151. package/dist/components/Icon/components/ChevronRight.cjs.map +1 -1
  152. package/dist/components/Icon/components/ChevronRight.js.map +1 -1
  153. package/dist/components/Icon/components/ChevronRightDouble.cjs.map +1 -1
  154. package/dist/components/Icon/components/ChevronRightDouble.js.map +1 -1
  155. package/dist/components/Icon/components/ChevronRightSolid.cjs.map +1 -1
  156. package/dist/components/Icon/components/ChevronRightSolid.js.map +1 -1
  157. package/dist/components/Icon/components/ChevronUp.cjs.map +1 -1
  158. package/dist/components/Icon/components/ChevronUp.js.map +1 -1
  159. package/dist/components/Icon/components/ChevronUpDouble.cjs.map +1 -1
  160. package/dist/components/Icon/components/ChevronUpDouble.js.map +1 -1
  161. package/dist/components/Icon/components/ChevronUpSolid.cjs.map +1 -1
  162. package/dist/components/Icon/components/ChevronUpSolid.js.map +1 -1
  163. package/dist/components/Icon/components/CircleInformation.cjs.map +1 -1
  164. package/dist/components/Icon/components/CircleInformation.js.map +1 -1
  165. package/dist/components/Icon/components/CircleMinus.cjs.map +1 -1
  166. package/dist/components/Icon/components/CircleMinus.js.map +1 -1
  167. package/dist/components/Icon/components/CirclePlus.cjs.map +1 -1
  168. package/dist/components/Icon/components/CirclePlus.js.map +1 -1
  169. package/dist/components/Icon/components/CircleQuestionmark.cjs.map +1 -1
  170. package/dist/components/Icon/components/CircleQuestionmark.js.map +1 -1
  171. package/dist/components/Icon/components/CircleTick.cjs.map +1 -1
  172. package/dist/components/Icon/components/CircleTick.js.map +1 -1
  173. package/dist/components/Icon/components/CircleWarning.cjs.map +1 -1
  174. package/dist/components/Icon/components/CircleWarning.js.map +1 -1
  175. package/dist/components/Icon/components/Clamp.cjs.map +1 -1
  176. package/dist/components/Icon/components/Clamp.js.map +1 -1
  177. package/dist/components/Icon/components/ClampOpen.cjs.map +1 -1
  178. package/dist/components/Icon/components/ClampOpen.js.map +1 -1
  179. package/dist/components/Icon/components/ClickToPay.cjs.map +1 -1
  180. package/dist/components/Icon/components/ClickToPay.js.map +1 -1
  181. package/dist/components/Icon/components/Close.cjs.map +1 -1
  182. package/dist/components/Icon/components/Close.js.map +1 -1
  183. package/dist/components/Icon/components/ColumnFreeze.cjs.map +1 -1
  184. package/dist/components/Icon/components/ColumnFreeze.js.map +1 -1
  185. package/dist/components/Icon/components/ColumnUnfreeze.cjs.map +1 -1
  186. package/dist/components/Icon/components/ColumnUnfreeze.js.map +1 -1
  187. package/dist/components/Icon/components/Columns.cjs.map +1 -1
  188. package/dist/components/Icon/components/Columns.js.map +1 -1
  189. package/dist/components/Icon/components/ConnectionEnable.cjs.map +1 -1
  190. package/dist/components/Icon/components/ConnectionEnable.js.map +1 -1
  191. package/dist/components/Icon/components/ConnectionRevoke.cjs.map +1 -1
  192. package/dist/components/Icon/components/ConnectionRevoke.js.map +1 -1
  193. package/dist/components/Icon/components/Contacts.cjs.map +1 -1
  194. package/dist/components/Icon/components/Contacts.js.map +1 -1
  195. package/dist/components/Icon/components/Copy.cjs.map +1 -1
  196. package/dist/components/Icon/components/Copy.js.map +1 -1
  197. package/dist/components/Icon/components/Courses.cjs.map +1 -1
  198. package/dist/components/Icon/components/Courses.js.map +1 -1
  199. package/dist/components/Icon/components/Credit.cjs.map +1 -1
  200. package/dist/components/Icon/components/Credit.js.map +1 -1
  201. package/dist/components/Icon/components/Delete.cjs.map +1 -1
  202. package/dist/components/Icon/components/Delete.js.map +1 -1
  203. package/dist/components/Icon/components/DeletePermanently.cjs.map +1 -1
  204. package/dist/components/Icon/components/DeletePermanently.js.map +1 -1
  205. package/dist/components/Icon/components/Depecriate.cjs.map +1 -1
  206. package/dist/components/Icon/components/Depecriate.js.map +1 -1
  207. package/dist/components/Icon/components/Developer.cjs.map +1 -1
  208. package/dist/components/Icon/components/Developer.js.map +1 -1
  209. package/dist/components/Icon/components/DistributionTemplate.cjs.map +1 -1
  210. package/dist/components/Icon/components/DistributionTemplate.js.map +1 -1
  211. package/dist/components/Icon/components/Document.cjs.map +1 -1
  212. package/dist/components/Icon/components/Document.js.map +1 -1
  213. package/dist/components/Icon/components/DocumentApprove.cjs.map +1 -1
  214. package/dist/components/Icon/components/DocumentApprove.js.map +1 -1
  215. package/dist/components/Icon/components/DocumentCreateEntry.cjs.map +1 -1
  216. package/dist/components/Icon/components/DocumentCreateEntry.js.map +1 -1
  217. package/dist/components/Icon/components/DocumentCut.cjs.map +1 -1
  218. package/dist/components/Icon/components/DocumentCut.js.map +1 -1
  219. package/dist/components/Icon/components/DocumentError.cjs.map +1 -1
  220. package/dist/components/Icon/components/DocumentError.js.map +1 -1
  221. package/dist/components/Icon/components/DocumentIsolatePage.cjs.map +1 -1
  222. package/dist/components/Icon/components/DocumentIsolatePage.js.map +1 -1
  223. package/dist/components/Icon/components/DocumentMerge.cjs.map +1 -1
  224. package/dist/components/Icon/components/DocumentMerge.js.map +1 -1
  225. package/dist/components/Icon/components/DocumentMove.cjs.map +1 -1
  226. package/dist/components/Icon/components/DocumentMove.js.map +1 -1
  227. package/dist/components/Icon/components/DocumentPreview.cjs.map +1 -1
  228. package/dist/components/Icon/components/DocumentPreview.js.map +1 -1
  229. package/dist/components/Icon/components/DocumentReceived.cjs.map +1 -1
  230. package/dist/components/Icon/components/DocumentReceived.js.map +1 -1
  231. package/dist/components/Icon/components/DocumentRejectedRequest.cjs.map +1 -1
  232. package/dist/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
  233. package/dist/components/Icon/components/DocumentSigned.cjs.map +1 -1
  234. package/dist/components/Icon/components/DocumentSigned.js.map +1 -1
  235. package/dist/components/Icon/components/DocumentSignedSolid.cjs.map +1 -1
  236. package/dist/components/Icon/components/DocumentSignedSolid.js.map +1 -1
  237. package/dist/components/Icon/components/DocumentSplit.cjs.map +1 -1
  238. package/dist/components/Icon/components/DocumentSplit.js.map +1 -1
  239. package/dist/components/Icon/components/DocumentTime.cjs.map +1 -1
  240. package/dist/components/Icon/components/DocumentTime.js.map +1 -1
  241. package/dist/components/Icon/components/Download.cjs.map +1 -1
  242. package/dist/components/Icon/components/Download.js.map +1 -1
  243. package/dist/components/Icon/components/Drag.cjs.map +1 -1
  244. package/dist/components/Icon/components/Drag.js.map +1 -1
  245. package/dist/components/Icon/components/ECopedia.cjs.map +1 -1
  246. package/dist/components/Icon/components/ECopedia.js.map +1 -1
  247. package/dist/components/Icon/components/Edit.cjs.map +1 -1
  248. package/dist/components/Icon/components/Edit.js.map +1 -1
  249. package/dist/components/Icon/components/EditSimple.cjs.map +1 -1
  250. package/dist/components/Icon/components/EditSimple.js.map +1 -1
  251. package/dist/components/Icon/components/EllipsisHorizontal.cjs.map +1 -1
  252. package/dist/components/Icon/components/EllipsisHorizontal.js.map +1 -1
  253. package/dist/components/Icon/components/EllipsisVertical.cjs.map +1 -1
  254. package/dist/components/Icon/components/EllipsisVertical.js.map +1 -1
  255. package/dist/components/Icon/components/EntriesOnAccount.cjs.map +1 -1
  256. package/dist/components/Icon/components/EntriesOnAccount.js.map +1 -1
  257. package/dist/components/Icon/components/EntriesOpen.cjs.map +1 -1
  258. package/dist/components/Icon/components/EntriesOpen.js.map +1 -1
  259. package/dist/components/Icon/components/EntriesWarning.cjs.map +1 -1
  260. package/dist/components/Icon/components/EntriesWarning.js.map +1 -1
  261. package/dist/components/Icon/components/EntryTypeCustomerInvoice.cjs.map +1 -1
  262. package/dist/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
  263. package/dist/components/Icon/components/EntryTypeCustomerPayment.cjs.map +1 -1
  264. package/dist/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
  265. package/dist/components/Icon/components/EntryTypeJournalEntry.cjs.map +1 -1
  266. package/dist/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
  267. package/dist/components/Icon/components/EntryTypeManualCustomerInvoice.cjs.map +1 -1
  268. package/dist/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
  269. package/dist/components/Icon/components/EntryTypeSupplierInvoice.cjs.map +1 -1
  270. package/dist/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
  271. package/dist/components/Icon/components/EntryTypeSupplierPayment.cjs.map +1 -1
  272. package/dist/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
  273. package/dist/components/Icon/components/Envelope.cjs.map +1 -1
  274. package/dist/components/Icon/components/Envelope.js.map +1 -1
  275. package/dist/components/Icon/components/EnvelopeApproved.cjs.map +1 -1
  276. package/dist/components/Icon/components/EnvelopeApproved.js.map +1 -1
  277. package/dist/components/Icon/components/EnvelopeSolid.cjs.map +1 -1
  278. package/dist/components/Icon/components/EnvelopeSolid.js.map +1 -1
  279. package/dist/components/Icon/components/ExpandView.cjs.map +1 -1
  280. package/dist/components/Icon/components/ExpandView.js.map +1 -1
  281. package/dist/components/Icon/components/Expenses.cjs.map +1 -1
  282. package/dist/components/Icon/components/Expenses.js.map +1 -1
  283. package/dist/components/Icon/components/Experiment.cjs.map +1 -1
  284. package/dist/components/Icon/components/Experiment.js.map +1 -1
  285. package/dist/components/Icon/components/Export.cjs.map +1 -1
  286. package/dist/components/Icon/components/Export.js.map +1 -1
  287. package/dist/components/Icon/components/ExportToExcel.cjs.map +1 -1
  288. package/dist/components/Icon/components/ExportToExcel.js.map +1 -1
  289. package/dist/components/Icon/components/ExportToPdf.cjs.map +1 -1
  290. package/dist/components/Icon/components/ExportToPdf.js.map +1 -1
  291. package/dist/components/Icon/components/EyeOff.cjs.map +1 -1
  292. package/dist/components/Icon/components/EyeOff.js.map +1 -1
  293. package/dist/components/Icon/components/EyeOn.cjs.map +1 -1
  294. package/dist/components/Icon/components/EyeOn.js.map +1 -1
  295. package/dist/components/Icon/components/Filter.cjs.map +1 -1
  296. package/dist/components/Icon/components/Filter.js.map +1 -1
  297. package/dist/components/Icon/components/FilterSolid.cjs.map +1 -1
  298. package/dist/components/Icon/components/FilterSolid.js.map +1 -1
  299. package/dist/components/Icon/components/FontSize.cjs.map +1 -1
  300. package/dist/components/Icon/components/FontSize.js.map +1 -1
  301. package/dist/components/Icon/components/GraphSolid.cjs.map +1 -1
  302. package/dist/components/Icon/components/GraphSolid.js.map +1 -1
  303. package/dist/components/Icon/components/Hash.cjs.map +1 -1
  304. package/dist/components/Icon/components/Hash.js.map +1 -1
  305. package/dist/components/Icon/components/HeightExtraTall.cjs.map +1 -1
  306. package/dist/components/Icon/components/HeightExtraTall.js.map +1 -1
  307. package/dist/components/Icon/components/HeightMedium.cjs.map +1 -1
  308. package/dist/components/Icon/components/HeightMedium.js.map +1 -1
  309. package/dist/components/Icon/components/HeightShort.cjs.map +1 -1
  310. package/dist/components/Icon/components/HeightShort.js.map +1 -1
  311. package/dist/components/Icon/components/HeightTall.cjs.map +1 -1
  312. package/dist/components/Icon/components/HeightTall.js.map +1 -1
  313. package/dist/components/Icon/components/House.cjs.map +1 -1
  314. package/dist/components/Icon/components/House.js.map +1 -1
  315. package/dist/components/Icon/components/HouseSolid.cjs.map +1 -1
  316. package/dist/components/Icon/components/HouseSolid.js.map +1 -1
  317. package/dist/components/Icon/components/Id.cjs.map +1 -1
  318. package/dist/components/Icon/components/Id.js.map +1 -1
  319. package/dist/components/Icon/components/Images.cjs.map +1 -1
  320. package/dist/components/Icon/components/Images.js.map +1 -1
  321. package/dist/components/Icon/components/Import.cjs.map +1 -1
  322. package/dist/components/Icon/components/Import.js.map +1 -1
  323. package/dist/components/Icon/components/Inbox.cjs.map +1 -1
  324. package/dist/components/Icon/components/Inbox.js.map +1 -1
  325. package/dist/components/Icon/components/InboxEinvoicing.cjs.map +1 -1
  326. package/dist/components/Icon/components/InboxEinvoicing.js.map +1 -1
  327. package/dist/components/Icon/components/InboxScanning.cjs.map +1 -1
  328. package/dist/components/Icon/components/InboxScanning.js.map +1 -1
  329. package/dist/components/Icon/components/InboxSmart.cjs.map +1 -1
  330. package/dist/components/Icon/components/InboxSmart.js.map +1 -1
  331. package/dist/components/Icon/components/Info.cjs.map +1 -1
  332. package/dist/components/Icon/components/Info.js.map +1 -1
  333. package/dist/components/Icon/components/Inventory.cjs.map +1 -1
  334. package/dist/components/Icon/components/Inventory.js.map +1 -1
  335. package/dist/components/Icon/components/InventoryMatrix.cjs.map +1 -1
  336. package/dist/components/Icon/components/InventoryMatrix.js.map +1 -1
  337. package/dist/components/Icon/components/JournalPro.cjs.map +1 -1
  338. package/dist/components/Icon/components/JournalPro.js.map +1 -1
  339. package/dist/components/Icon/components/Layout.cjs.map +1 -1
  340. package/dist/components/Icon/components/Layout.js.map +1 -1
  341. package/dist/components/Icon/components/LayoutBoth.cjs.map +1 -1
  342. package/dist/components/Icon/components/LayoutBoth.js.map +1 -1
  343. package/dist/components/Icon/components/LayoutFirst.cjs.map +1 -1
  344. package/dist/components/Icon/components/LayoutFirst.js.map +1 -1
  345. package/dist/components/Icon/components/LayoutLast.cjs.map +1 -1
  346. package/dist/components/Icon/components/LayoutLast.js.map +1 -1
  347. package/dist/components/Icon/components/LayoutNone.cjs.map +1 -1
  348. package/dist/components/Icon/components/LayoutNone.js.map +1 -1
  349. package/dist/components/Icon/components/LedgerCard.cjs.map +1 -1
  350. package/dist/components/Icon/components/LedgerCard.js.map +1 -1
  351. package/dist/components/Icon/components/LedgerCardCustomerReminder.cjs.map +1 -1
  352. package/dist/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
  353. package/dist/components/Icon/components/LedgerCardManualCustomerInvoice.cjs.map +1 -1
  354. package/dist/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
  355. package/dist/components/Icon/components/LedgerCardObsoleteStock.cjs.map +1 -1
  356. package/dist/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
  357. package/dist/components/Icon/components/LedgerCardOpeningEntry.cjs.map +1 -1
  358. package/dist/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
  359. package/dist/components/Icon/components/LedgerCardReservedEntry.cjs.map +1 -1
  360. package/dist/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
  361. package/dist/components/Icon/components/LedgerCardShrinkagePilferage.cjs.map +1 -1
  362. package/dist/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
  363. package/dist/components/Icon/components/LedgerCardStockAdjustment.cjs.map +1 -1
  364. package/dist/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
  365. package/dist/components/Icon/components/LedgerCardTransferredOpeningEntry.cjs.map +1 -1
  366. package/dist/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
  367. package/dist/components/Icon/components/Lightbulb.cjs.map +1 -1
  368. package/dist/components/Icon/components/Lightbulb.js.map +1 -1
  369. package/dist/components/Icon/components/Line.cjs.map +1 -1
  370. package/dist/components/Icon/components/Line.js.map +1 -1
  371. package/dist/components/Icon/components/LinkExternal.cjs.map +1 -1
  372. package/dist/components/Icon/components/LinkExternal.js.map +1 -1
  373. package/dist/components/Icon/components/List.cjs.map +1 -1
  374. package/dist/components/Icon/components/List.js.map +1 -1
  375. package/dist/components/Icon/components/ListBulleted.cjs.map +1 -1
  376. package/dist/components/Icon/components/ListBulleted.js.map +1 -1
  377. package/dist/components/Icon/components/ListSearch.cjs.map +1 -1
  378. package/dist/components/Icon/components/ListSearch.js.map +1 -1
  379. package/dist/components/Icon/components/Location.cjs.map +1 -1
  380. package/dist/components/Icon/components/Location.js.map +1 -1
  381. package/dist/components/Icon/components/Lock.cjs.map +1 -1
  382. package/dist/components/Icon/components/Lock.js.map +1 -1
  383. package/dist/components/Icon/components/LockOpen.cjs.map +1 -1
  384. package/dist/components/Icon/components/LockOpen.js.map +1 -1
  385. package/dist/components/Icon/components/Log.cjs.map +1 -1
  386. package/dist/components/Icon/components/Log.js.map +1 -1
  387. package/dist/components/Icon/components/LogOut.cjs.map +1 -1
  388. package/dist/components/Icon/components/LogOut.js.map +1 -1
  389. package/dist/components/Icon/components/Market.cjs.map +1 -1
  390. package/dist/components/Icon/components/Market.js.map +1 -1
  391. package/dist/components/Icon/components/MastercardOs.cjs.map +1 -1
  392. package/dist/components/Icon/components/MastercardOs.js.map +1 -1
  393. package/dist/components/Icon/components/MatchAmount.cjs.map +1 -1
  394. package/dist/components/Icon/components/MatchAmount.js.map +1 -1
  395. package/dist/components/Icon/components/MatchEntries.cjs.map +1 -1
  396. package/dist/components/Icon/components/MatchEntries.js.map +1 -1
  397. package/dist/components/Icon/components/Menu.cjs.map +1 -1
  398. package/dist/components/Icon/components/Menu.js.map +1 -1
  399. package/dist/components/Icon/components/Mileage.cjs.map +1 -1
  400. package/dist/components/Icon/components/Mileage.js.map +1 -1
  401. package/dist/components/Icon/components/ModalResize.cjs.map +1 -1
  402. package/dist/components/Icon/components/ModalResize.js.map +1 -1
  403. package/dist/components/Icon/components/ModalShrink.cjs.map +1 -1
  404. package/dist/components/Icon/components/ModalShrink.js.map +1 -1
  405. package/dist/components/Icon/components/More.cjs.map +1 -1
  406. package/dist/components/Icon/components/More.js.map +1 -1
  407. package/dist/components/Icon/components/MoreSolid.cjs.map +1 -1
  408. package/dist/components/Icon/components/MoreSolid.js.map +1 -1
  409. package/dist/components/Icon/components/Move.cjs.map +1 -1
  410. package/dist/components/Icon/components/Move.js.map +1 -1
  411. package/dist/components/Icon/components/NavigationList.cjs.map +1 -1
  412. package/dist/components/Icon/components/NavigationList.js.map +1 -1
  413. package/dist/components/Icon/components/Note.cjs.map +1 -1
  414. package/dist/components/Icon/components/Note.js.map +1 -1
  415. package/dist/components/Icon/components/NoteFollowUp.cjs.map +1 -1
  416. package/dist/components/Icon/components/NoteFollowUp.js.map +1 -1
  417. package/dist/components/Icon/components/NoteRead.cjs.map +1 -1
  418. package/dist/components/Icon/components/NoteRead.js.map +1 -1
  419. package/dist/components/Icon/components/NovemberFirst.cjs.map +1 -1
  420. package/dist/components/Icon/components/NovemberFirst.js.map +1 -1
  421. package/dist/components/Icon/components/Numbers.cjs.map +1 -1
  422. package/dist/components/Icon/components/Numbers.js.map +1 -1
  423. package/dist/components/Icon/components/PartialPaymentScheduled.cjs.map +1 -1
  424. package/dist/components/Icon/components/PartialPaymentScheduled.js.map +1 -1
  425. package/dist/components/Icon/components/PartnerApi.cjs.map +1 -1
  426. package/dist/components/Icon/components/PartnerApi.js.map +1 -1
  427. package/dist/components/Icon/components/PaymentPaid.cjs.map +1 -1
  428. package/dist/components/Icon/components/PaymentPaid.js.map +1 -1
  429. package/dist/components/Icon/components/PaymentUnpaid.cjs.map +1 -1
  430. package/dist/components/Icon/components/PaymentUnpaid.js.map +1 -1
  431. package/dist/components/Icon/components/Period.cjs.map +1 -1
  432. package/dist/components/Icon/components/Period.js.map +1 -1
  433. package/dist/components/Icon/components/Person.cjs.map +1 -1
  434. package/dist/components/Icon/components/Person.js.map +1 -1
  435. package/dist/components/Icon/components/PersonChange.cjs.map +1 -1
  436. package/dist/components/Icon/components/PersonChange.js.map +1 -1
  437. package/dist/components/Icon/components/PersonMinus.cjs.map +1 -1
  438. package/dist/components/Icon/components/PersonMinus.js.map +1 -1
  439. package/dist/components/Icon/components/PersonPlus.cjs.map +1 -1
  440. package/dist/components/Icon/components/PersonPlus.js.map +1 -1
  441. package/dist/components/Icon/components/PersonSolid.cjs.map +1 -1
  442. package/dist/components/Icon/components/PersonSolid.js.map +1 -1
  443. package/dist/components/Icon/components/PersonTick.cjs.map +1 -1
  444. package/dist/components/Icon/components/PersonTick.js.map +1 -1
  445. package/dist/components/Icon/components/Phone.cjs.map +1 -1
  446. package/dist/components/Icon/components/Phone.js.map +1 -1
  447. package/dist/components/Icon/components/PhoneSolid.cjs.map +1 -1
  448. package/dist/components/Icon/components/PhoneSolid.js.map +1 -1
  449. package/dist/components/Icon/components/Play.cjs.map +1 -1
  450. package/dist/components/Icon/components/Play.js.map +1 -1
  451. package/dist/components/Icon/components/PlusMinus.cjs.map +1 -1
  452. package/dist/components/Icon/components/PlusMinus.js.map +1 -1
  453. package/dist/components/Icon/components/Print.cjs.map +1 -1
  454. package/dist/components/Icon/components/Print.js.map +1 -1
  455. package/dist/components/Icon/components/ProcessPayment.cjs.map +1 -1
  456. package/dist/components/Icon/components/ProcessPayment.js.map +1 -1
  457. package/dist/components/Icon/components/ProductLedgerCard.cjs.map +1 -1
  458. package/dist/components/Icon/components/ProductLedgerCard.js.map +1 -1
  459. package/dist/components/Icon/components/Profile.cjs.map +1 -1
  460. package/dist/components/Icon/components/Profile.js.map +1 -1
  461. package/dist/components/Icon/components/ProjectCards.cjs.map +1 -1
  462. package/dist/components/Icon/components/ProjectCards.js.map +1 -1
  463. package/dist/components/Icon/components/Projects.cjs.map +1 -1
  464. package/dist/components/Icon/components/Projects.js.map +1 -1
  465. package/dist/components/Icon/components/QuestionMark.cjs.map +1 -1
  466. package/dist/components/Icon/components/QuestionMark.js.map +1 -1
  467. package/dist/components/Icon/components/QuestionMarkBold.cjs.map +1 -1
  468. package/dist/components/Icon/components/QuestionMarkBold.js.map +1 -1
  469. package/dist/components/Icon/components/Quicklinks.cjs.map +1 -1
  470. package/dist/components/Icon/components/Quicklinks.js.map +1 -1
  471. package/dist/components/Icon/components/RatingBankruptcy.cjs.map +1 -1
  472. package/dist/components/Icon/components/RatingBankruptcy.js.map +1 -1
  473. package/dist/components/Icon/components/RatingPaymentProblems.cjs.map +1 -1
  474. package/dist/components/Icon/components/RatingPaymentProblems.js.map +1 -1
  475. package/dist/components/Icon/components/Reconciled.cjs.map +1 -1
  476. package/dist/components/Icon/components/Reconciled.js.map +1 -1
  477. package/dist/components/Icon/components/Refresh.cjs.map +1 -1
  478. package/dist/components/Icon/components/Refresh.js.map +1 -1
  479. package/dist/components/Icon/components/Remove.cjs.map +1 -1
  480. package/dist/components/Icon/components/Remove.js.map +1 -1
  481. package/dist/components/Icon/components/Report.cjs.map +1 -1
  482. package/dist/components/Icon/components/Report.js.map +1 -1
  483. package/dist/components/Icon/components/ReportSolid.cjs.map +1 -1
  484. package/dist/components/Icon/components/ReportSolid.js.map +1 -1
  485. package/dist/components/Icon/components/Restore.cjs.map +1 -1
  486. package/dist/components/Icon/components/Restore.js.map +1 -1
  487. package/dist/components/Icon/components/RotateLeft.cjs.map +1 -1
  488. package/dist/components/Icon/components/RotateLeft.js.map +1 -1
  489. package/dist/components/Icon/components/RotateRight.cjs.map +1 -1
  490. package/dist/components/Icon/components/RotateRight.js.map +1 -1
  491. package/dist/components/Icon/components/Sales.cjs.map +1 -1
  492. package/dist/components/Icon/components/Sales.js.map +1 -1
  493. package/dist/components/Icon/components/Search.cjs.map +1 -1
  494. package/dist/components/Icon/components/Search.js.map +1 -1
  495. package/dist/components/Icon/components/SearchBold.cjs.map +1 -1
  496. package/dist/components/Icon/components/SearchBold.js.map +1 -1
  497. package/dist/components/Icon/components/Secure.cjs.map +1 -1
  498. package/dist/components/Icon/components/Secure.js.map +1 -1
  499. package/dist/components/Icon/components/SecureTick.cjs.map +1 -1
  500. package/dist/components/Icon/components/SecureTick.js.map +1 -1
  501. package/dist/components/Icon/components/Settings.cjs.map +1 -1
  502. package/dist/components/Icon/components/Settings.js.map +1 -1
  503. package/dist/components/Icon/components/SettingsSolid.cjs.map +1 -1
  504. package/dist/components/Icon/components/SettingsSolid.js.map +1 -1
  505. package/dist/components/Icon/components/Shortcuts.cjs.map +1 -1
  506. package/dist/components/Icon/components/Shortcuts.js.map +1 -1
  507. package/dist/components/Icon/components/ShowAll.cjs.map +1 -1
  508. package/dist/components/Icon/components/ShowAll.js.map +1 -1
  509. package/dist/components/Icon/components/ShowLess.cjs.map +1 -1
  510. package/dist/components/Icon/components/ShowLess.js.map +1 -1
  511. package/dist/components/Icon/components/ShowMore.cjs.map +1 -1
  512. package/dist/components/Icon/components/ShowMore.js.map +1 -1
  513. package/dist/components/Icon/components/ShowTemplate.cjs.map +1 -1
  514. package/dist/components/Icon/components/ShowTemplate.js.map +1 -1
  515. package/dist/components/Icon/components/Sliders.cjs.map +1 -1
  516. package/dist/components/Icon/components/Sliders.js.map +1 -1
  517. package/dist/components/Icon/components/Smartpay.cjs.map +1 -1
  518. package/dist/components/Icon/components/Smartpay.js.map +1 -1
  519. package/dist/components/Icon/components/SortBy.cjs.map +1 -1
  520. package/dist/components/Icon/components/SortBy.js.map +1 -1
  521. package/dist/components/Icon/components/Star.cjs.map +1 -1
  522. package/dist/components/Icon/components/Star.js.map +1 -1
  523. package/dist/components/Icon/components/StarSolid.cjs.map +1 -1
  524. package/dist/components/Icon/components/StarSolid.js.map +1 -1
  525. package/dist/components/Icon/components/Subscriptions.cjs.map +1 -1
  526. package/dist/components/Icon/components/Subscriptions.js.map +1 -1
  527. package/dist/components/Icon/components/SystemEntries.cjs.map +1 -1
  528. package/dist/components/Icon/components/SystemEntries.js.map +1 -1
  529. package/dist/components/Icon/components/Tag.cjs.map +1 -1
  530. package/dist/components/Icon/components/Tag.js.map +1 -1
  531. package/dist/components/Icon/components/TemplateOverride.cjs.map +1 -1
  532. package/dist/components/Icon/components/TemplateOverride.js.map +1 -1
  533. package/dist/components/Icon/components/Templates.cjs.map +1 -1
  534. package/dist/components/Icon/components/Templates.js.map +1 -1
  535. package/dist/components/Icon/components/ThumbBoth.cjs.map +1 -1
  536. package/dist/components/Icon/components/ThumbBoth.js.map +1 -1
  537. package/dist/components/Icon/components/ThumbDown.cjs.map +1 -1
  538. package/dist/components/Icon/components/ThumbDown.js.map +1 -1
  539. package/dist/components/Icon/components/ThumbDownSolid.cjs.map +1 -1
  540. package/dist/components/Icon/components/ThumbDownSolid.js.map +1 -1
  541. package/dist/components/Icon/components/ThumbUp.cjs.map +1 -1
  542. package/dist/components/Icon/components/ThumbUp.js.map +1 -1
  543. package/dist/components/Icon/components/ThumbUpSolid.cjs.map +1 -1
  544. package/dist/components/Icon/components/ThumbUpSolid.js.map +1 -1
  545. package/dist/components/Icon/components/Tick.cjs.map +1 -1
  546. package/dist/components/Icon/components/Tick.js.map +1 -1
  547. package/dist/components/Icon/components/TickBold.cjs.map +1 -1
  548. package/dist/components/Icon/components/TickBold.js.map +1 -1
  549. package/dist/components/Icon/components/Time.cjs.map +1 -1
  550. package/dist/components/Icon/components/Time.js.map +1 -1
  551. package/dist/components/Icon/components/Transfer.cjs.map +1 -1
  552. package/dist/components/Icon/components/Transfer.js.map +1 -1
  553. package/dist/components/Icon/components/TransferCancel.cjs.map +1 -1
  554. package/dist/components/Icon/components/TransferCancel.js.map +1 -1
  555. package/dist/components/Icon/components/TransferLocked.cjs.map +1 -1
  556. package/dist/components/Icon/components/TransferLocked.js.map +1 -1
  557. package/dist/components/Icon/components/Undo.cjs.map +1 -1
  558. package/dist/components/Icon/components/Undo.js.map +1 -1
  559. package/dist/components/Icon/components/Undock.cjs.map +1 -1
  560. package/dist/components/Icon/components/Undock.js.map +1 -1
  561. package/dist/components/Icon/components/Unreconciled.cjs.map +1 -1
  562. package/dist/components/Icon/components/Unreconciled.js.map +1 -1
  563. package/dist/components/Icon/components/Wallet.cjs.map +1 -1
  564. package/dist/components/Icon/components/Wallet.js.map +1 -1
  565. package/dist/components/Icon/components/Warning.cjs.map +1 -1
  566. package/dist/components/Icon/components/Warning.js.map +1 -1
  567. package/dist/components/Icon/components/Webshop.cjs.map +1 -1
  568. package/dist/components/Icon/components/Webshop.js.map +1 -1
  569. package/dist/components/Icon/components/Website.cjs.map +1 -1
  570. package/dist/components/Icon/components/Website.js.map +1 -1
  571. package/dist/components/Icon/components/Workflow.cjs.map +1 -1
  572. package/dist/components/Icon/components/Workflow.js.map +1 -1
  573. package/dist/components/Icon/components/WorkflowTemplateBasic.cjs.map +1 -1
  574. package/dist/components/Icon/components/WorkflowTemplateBasic.js.map +1 -1
  575. package/dist/components/Icon/components/Zoom.cjs.map +1 -1
  576. package/dist/components/Icon/components/Zoom.js.map +1 -1
  577. package/dist/components/Input/Input.cjs.map +1 -1
  578. package/dist/components/Input/Input.d.ts +14 -8
  579. package/dist/components/Input/Input.js.map +1 -1
  580. package/dist/components/LegacyComponents/Button/Button.cjs.map +1 -1
  581. package/dist/components/LegacyComponents/Button/Button.d.ts +13 -13
  582. package/dist/components/LegacyComponents/Button/Button.js.map +1 -1
  583. package/dist/components/LegacyComponents/Button/util.cjs.map +1 -1
  584. package/dist/components/LegacyComponents/Button/util.d.ts +2 -2
  585. package/dist/components/LegacyComponents/Button/util.js.map +1 -1
  586. package/dist/components/LegacyComponents/IconButton/IconButton.cjs.map +1 -1
  587. package/dist/components/LegacyComponents/IconButton/IconButton.d.ts +15 -15
  588. package/dist/components/LegacyComponents/IconButton/IconButton.js.map +1 -1
  589. package/dist/components/List/List.cjs.map +1 -1
  590. package/dist/components/List/List.d.ts +3 -3
  591. package/dist/components/List/List.js.map +1 -1
  592. package/dist/components/List/components/Collapsible.cjs.map +1 -1
  593. package/dist/components/List/components/Collapsible.d.ts +2 -2
  594. package/dist/components/List/components/Collapsible.js.map +1 -1
  595. package/dist/components/List/components/Group.cjs.map +1 -1
  596. package/dist/components/List/components/Group.d.ts +2 -2
  597. package/dist/components/List/components/Group.js.map +1 -1
  598. package/dist/components/List/components/Item.cjs.map +1 -1
  599. package/dist/components/List/components/Item.d.ts +7 -7
  600. package/dist/components/List/components/Item.js.map +1 -1
  601. package/dist/components/List/components/Toggle.cjs.map +1 -1
  602. package/dist/components/List/components/Toggle.js.map +1 -1
  603. package/dist/components/Listbox/ScrollableList.cjs.map +1 -1
  604. package/dist/components/Listbox/ScrollableList.d.ts +4 -2
  605. package/dist/components/Listbox/ScrollableList.js.map +1 -1
  606. package/dist/components/Listbox/util.cjs.map +1 -1
  607. package/dist/components/Listbox/util.d.ts +9 -5
  608. package/dist/components/Listbox/util.js.map +1 -1
  609. package/dist/components/Menu/Context.cjs.map +1 -1
  610. package/dist/components/Menu/Context.d.ts +2 -2
  611. package/dist/components/Menu/Context.js.map +1 -1
  612. package/dist/components/Menu/Menu.cjs.map +1 -1
  613. package/dist/components/Menu/Menu.d.ts +1 -1
  614. package/dist/components/Menu/Menu.js.map +1 -1
  615. package/dist/components/Menu/components/Content.cjs.map +1 -1
  616. package/dist/components/Menu/components/Content.js.map +1 -1
  617. package/dist/components/Menu/components/Item.cjs.map +1 -1
  618. package/dist/components/Menu/components/Item.d.ts +2 -2
  619. package/dist/components/Menu/components/Item.js.map +1 -1
  620. package/dist/components/Menu/components/RadioGroup.cjs.map +1 -1
  621. package/dist/components/Menu/components/RadioGroup.js.map +1 -1
  622. package/dist/components/Navigation2/components/Group.cjs.map +1 -1
  623. package/dist/components/Navigation2/components/Group.d.ts +2 -2
  624. package/dist/components/Navigation2/components/Group.js.map +1 -1
  625. package/dist/components/Navigation2/components/Link.cjs.map +1 -1
  626. package/dist/components/Navigation2/components/Link.d.ts +2 -2
  627. package/dist/components/Navigation2/components/Link.js.map +1 -1
  628. package/dist/components/OverflowGroup/OverflowGroup.cjs.map +1 -1
  629. package/dist/components/OverflowGroup/OverflowGroup.js.map +1 -1
  630. package/dist/components/Pagination/PageNumbers.cjs.map +1 -1
  631. package/dist/components/Pagination/PageNumbers.d.ts +2 -1
  632. package/dist/components/Pagination/PageNumbers.js.map +1 -1
  633. package/dist/components/Popover/Popover.cjs.map +1 -1
  634. package/dist/components/Popover/Popover.d.ts +2 -2
  635. package/dist/components/Popover/Popover.js.map +1 -1
  636. package/dist/components/Progress/Progress.cjs.map +1 -1
  637. package/dist/components/Progress/Progress.d.ts +1 -1
  638. package/dist/components/Progress/Progress.js.map +1 -1
  639. package/dist/components/Provider/Provider.cjs.map +1 -1
  640. package/dist/components/Provider/Provider.d.ts +1 -1
  641. package/dist/components/Provider/Provider.js.map +1 -1
  642. package/dist/components/RadioGroup/RadioGroup.cjs.map +1 -1
  643. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  644. package/dist/components/Report/Report.cjs.map +1 -1
  645. package/dist/components/Report/Report.d.ts +1 -1
  646. package/dist/components/Report/Report.js.map +1 -1
  647. package/dist/components/SearchInput2/SearchInput2.cjs.map +1 -1
  648. package/dist/components/SearchInput2/SearchInput2.d.ts +1 -1
  649. package/dist/components/SearchInput2/SearchInput2.js.map +1 -1
  650. package/dist/components/Select/useSelect.cjs.map +1 -1
  651. package/dist/components/Select/useSelect.d.ts +2 -2
  652. package/dist/components/Select/useSelect.js.map +1 -1
  653. package/dist/components/Select2/Select2.cjs +1 -3
  654. package/dist/components/Select2/Select2.cjs.map +1 -1
  655. package/dist/components/Select2/Select2.d.ts +5 -5
  656. package/dist/components/Select2/Select2.js +1 -3
  657. package/dist/components/Select2/Select2.js.map +1 -1
  658. package/dist/components/Select2/components/Context.cjs.map +1 -1
  659. package/dist/components/Select2/components/Context.d.ts +3 -3
  660. package/dist/components/Select2/components/Context.js.map +1 -1
  661. package/dist/components/Select2/components/Option.cjs.map +1 -1
  662. package/dist/components/Select2/components/Option.d.ts +7 -7
  663. package/dist/components/Select2/components/Option.js.map +1 -1
  664. package/dist/components/Select2/components/Search.d.ts +7 -4
  665. package/dist/components/Select2/components/Trigger.cjs +6 -5
  666. package/dist/components/Select2/components/Trigger.cjs.map +1 -1
  667. package/dist/components/Select2/components/Trigger.js +6 -5
  668. package/dist/components/Select2/components/Trigger.js.map +1 -1
  669. package/dist/components/Select2/types.d.ts +1 -1
  670. package/dist/components/Table3/Table3.cjs.map +1 -1
  671. package/dist/components/Table3/Table3.d.ts +1 -1
  672. package/dist/components/Table3/Table3.js.map +1 -1
  673. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.cjs.map +1 -1
  674. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +1 -1
  675. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  676. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.cjs.map +1 -1
  677. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  678. package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.cjs.map +1 -1
  679. package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.d.ts +2 -1
  680. package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  681. package/dist/components/Table3/components/Editing/Alert.cjs +9 -3
  682. package/dist/components/Table3/components/Editing/Alert.cjs.map +1 -1
  683. package/dist/components/Table3/components/Editing/Alert.js +9 -3
  684. package/dist/components/Table3/components/Editing/Alert.js.map +1 -1
  685. package/dist/components/Table3/components/Row/Editing/TemporaryRow.cjs.map +1 -1
  686. package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +1 -1
  687. package/dist/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  688. package/dist/components/Table3/features/useEditingState.cjs +14 -6
  689. package/dist/components/Table3/features/useEditingState.cjs.map +1 -1
  690. package/dist/components/Table3/features/useEditingState.d.ts +24 -6
  691. package/dist/components/Table3/features/useEditingState.js +14 -6
  692. package/dist/components/Table3/features/useEditingState.js.map +1 -1
  693. package/dist/components/Table3/features/useTableEditing.d.ts +28 -7
  694. package/dist/components/Tabs/components/TabList.cjs.map +1 -1
  695. package/dist/components/Tabs/components/TabList.js.map +1 -1
  696. package/dist/components/Tabs/components/Trigger.cjs.map +1 -1
  697. package/dist/components/Tabs/components/Trigger.d.ts +2 -2
  698. package/dist/components/Tabs/components/Trigger.js.map +1 -1
  699. package/dist/components/Toast/Toast.cjs.map +1 -1
  700. package/dist/components/Toast/Toast.d.ts +1 -1
  701. package/dist/components/Toast/Toast.js.map +1 -1
  702. package/dist/components/Toast/Toaster.cjs.map +1 -1
  703. package/dist/components/Toast/Toaster.d.ts +1 -1
  704. package/dist/components/Toast/Toaster.js.map +1 -1
  705. package/dist/components/Toast/util.cjs.map +1 -1
  706. package/dist/components/Toast/util.d.ts +2 -1
  707. package/dist/components/Toast/util.js.map +1 -1
  708. package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
  709. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  710. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  711. package/dist/components/Truncate/Truncate.cjs.map +1 -1
  712. package/dist/components/Truncate/Truncate.d.ts +5 -2
  713. package/dist/components/Truncate/Truncate.js.map +1 -1
  714. package/dist/hooks/useBoundingClientRectListener.cjs.map +1 -1
  715. package/dist/hooks/useBoundingClientRectListener.d.ts +1 -1
  716. package/dist/hooks/useBoundingClientRectListener.js.map +1 -1
  717. package/dist/hooks/useIntersectionObserver.cjs.map +1 -1
  718. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  719. package/dist/hooks/useIntersectionObserver.js.map +1 -1
  720. package/dist/hooks/useMergedRef.cjs.map +1 -1
  721. package/dist/hooks/useMergedRef.js.map +1 -1
  722. package/dist/hooks/useResizeObserver.cjs.map +1 -1
  723. package/dist/hooks/useResizeObserver.d.ts +1 -1
  724. package/dist/hooks/useResizeObserver.js.map +1 -1
  725. package/dist/primitives/Button.cjs.map +1 -1
  726. package/dist/primitives/Button.d.ts +2 -2
  727. package/dist/primitives/Button.js.map +1 -1
  728. package/dist/primitives/Listbox2/components/Option.d.ts +1 -1
  729. package/dist/primitives/Sortable/components/Item.cjs.map +1 -1
  730. package/dist/primitives/Sortable/components/Item.js.map +1 -1
  731. package/dist/primitives/Table/Core/Table.cjs.map +1 -1
  732. package/dist/primitives/Table/Core/Table.d.ts +2 -2
  733. package/dist/primitives/Table/Core/Table.js.map +1 -1
  734. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.cjs.map +1 -1
  735. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  736. package/dist/primitives/Table/Core/components/Columns/Cell/util.cjs.map +1 -1
  737. package/dist/primitives/Table/Core/components/Columns/Cell/util.d.ts +1 -1
  738. package/dist/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  739. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.cjs.map +1 -1
  740. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  741. package/dist/primitives/Table/Core/components/Footer/Footer.cjs.map +1 -1
  742. package/dist/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  743. package/dist/primitives/Table/Core/components/Header/Header.cjs.map +1 -1
  744. package/dist/primitives/Table/Core/components/Header/Header.d.ts +1 -1
  745. package/dist/primitives/Table/Core/components/Header/Header.js.map +1 -1
  746. package/dist/primitives/Table/Core/components/Header/components/Menu.cjs.map +1 -1
  747. package/dist/primitives/Table/Core/components/Header/components/Menu.d.ts +1 -1
  748. package/dist/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  749. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.cjs.map +1 -1
  750. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.d.ts +1 -1
  751. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  752. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.cjs.map +1 -1
  753. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +1 -1
  754. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  755. package/dist/primitives/Table/Core/features/useTableRenderer.cjs.map +1 -1
  756. package/dist/primitives/Table/Core/features/useTableRenderer.d.ts +1 -1
  757. package/dist/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  758. package/dist/primitives/Table/Core/types.d.ts +3 -3
  759. package/dist/primitives/Table/Core/useTable.cjs.map +1 -1
  760. package/dist/primitives/Table/Core/useTable.d.ts +4 -4
  761. package/dist/primitives/Table/Core/useTable.js.map +1 -1
  762. package/dist/primitives/Table/types.cjs.map +1 -1
  763. package/dist/primitives/Table/types.d.ts +15 -15
  764. package/dist/primitives/Table/types.js.map +1 -1
  765. package/dist/primitives/Table/useTableManager/features/useTableRowSelection.d.ts +1 -1
  766. package/dist/primitives/Table/useTableManager/types.d.ts +2 -2
  767. package/dist/primitives/Table/useTableManager/util/setup.cjs +2 -2
  768. package/dist/primitives/Table/useTableManager/util/setup.cjs.map +1 -1
  769. package/dist/primitives/Table/useTableManager/util/setup.js +2 -2
  770. package/dist/primitives/Table/useTableManager/util/setup.js.map +1 -1
  771. package/dist/types.cjs.map +1 -1
  772. package/dist/types.d.ts +1 -1
  773. package/dist/types.js.map +1 -1
  774. package/package.json +8 -15
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport * as React from 'react';\n\nimport { useControlled } from '../../hooks/useControlled';\nimport { isElementInsideTable3OrReport } from '../../utils/dom';\n\nimport type { MenuCheckboxItemProps } from './components/Checkbox';\nimport { Checkbox } from './components/Checkbox';\nimport type { MenuContentProps } from './components/Content';\nimport { Content } from './components/Content';\nimport type { MenuGroupProps } from './components/Group';\nimport { Group } from './components/Group';\nimport type { MenuHeaderProps } from './components/Header';\nimport { Header } from './components/Header';\nimport type { MenuItemProps } from './components/Item';\nimport { Item } from './components/Item';\nimport type { MenuLinkItemProps } from './components/Link';\nimport { Link } from './components/Link';\nimport type { ForwardedMenuRadioGroupWithStatics } from './components/RadioGroup';\nimport { RadioGroup } from './components/RadioGroup';\nimport type { MenuSeparatorProps } from './components/Separator';\nimport { Separator } from './components/Separator';\nimport type { MenuSubMenuProps } from './components/SubMenu';\nimport { SubMenu } from './components/SubMenu';\nimport type { MenuTriggerProps } from './components/Trigger';\nimport { Trigger } from './components/Trigger';\nimport { MenuContext } from './Context';\n\nexport type MenuProps = {\n children: React.ReactNode;\n /** Set whether the menu is open by default or not */\n defaultOpen?: boolean;\n /** Called when the menu opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n /** Control the open state of the menu from outside the component */\n open?: boolean;\n /** ID of the trigger the menu is associated with (controlled mode) */\n triggerId?: string | null;\n /** A trigger to be used for the menu, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n};\nexport type ForwardedMenuWithStatics = React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<MenuTriggerProps>;\n Content: React.ForwardRefExoticComponent<MenuContentProps>;\n Item: React.ForwardRefExoticComponent<MenuItemProps>;\n Link: React.ForwardRefExoticComponent<MenuLinkItemProps>;\n Checkbox: React.ForwardRefExoticComponent<MenuCheckboxItemProps>;\n Separator: React.ForwardRefExoticComponent<MenuSeparatorProps>;\n Group: React.ForwardRefExoticComponent<MenuGroupProps>;\n Header: React.ForwardRefExoticComponent<MenuHeaderProps>;\n RadioGroup: ForwardedMenuRadioGroupWithStatics;\n SubMenu: React.ForwardRefExoticComponent<MenuSubMenuProps>;\n};\n\nexport const Menu = React.forwardRef<HTMLButtonElement, MenuProps>(function Menu(externalProps, _ref) {\n const { children, defaultOpen, onChange, open: openProp, trigger, ...props } = externalProps;\n const [indented, setIndented] = React.useState(false);\n const [minWidth, setMinWidth] = React.useState<number | undefined>(undefined);\n const [open, setOpen] = useControlled<boolean>({\n defaultValue: defaultOpen ?? false,\n onChange,\n value: openProp,\n });\n const [dialogState, setDialogState] = React.useState<{ open: boolean; render: (() => React.ReactElement) | null }>({\n open: false,\n render: null,\n });\n\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n\n const closeDialog = React.useCallback(() => {\n setDialogState({ open: false, render: null });\n triggerRef.current?.focus();\n }, []);\n\n const context = React.useMemo(\n () => ({\n indented,\n registerIndentation: () => setIndented(true),\n minWidth,\n setMinWidth: (width: number) => setMinWidth(width),\n open: () => setOpen(true),\n close: () => setOpen(false),\n // Dialog state management - survives menu close\n dialogState,\n openDialog: (render: () => React.ReactElement) => {\n setDialogState({ open: true, render });\n setOpen(false);\n },\n closeDialog,\n // Trigger ref for focus management after dialog closes\n triggerRef,\n }),\n [indented, minWidth, setOpen, dialogState, closeDialog]\n );\n\n const handleOpenChange = (open: boolean, eventDetails: MenuPrimitive.Root.ChangeEventDetails) => {\n const event = eventDetails.event as KeyboardEvent;\n const triggerElement = eventDetails.trigger ?? (event?.currentTarget as Element | null);\n const isTableHeaderOrCellMenu = isElementInsideTable3OrReport(triggerElement);\n\n // In Table3 header/cell contexts, ArrowUp/ArrowDown should keep driving table row navigation.\n // Cancel only the menu open transition for these keys so the key event can still bubble to the table.\n if (open && (event.key === 'ArrowUp' || event.key === 'ArrowDown') && isTableHeaderOrCellMenu) {\n eventDetails.cancel();\n return;\n }\n setOpen(open);\n };\n\n return (\n <MenuContext.Provider value={context}>\n <MenuPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange}>\n {trigger && <Trigger ref={triggerRef}>{trigger}</Trigger>}\n {children}\n </MenuPrimitive.Root>\n {/* Render dialog outside menu tree - state survives menu close */}\n {dialogState.open && dialogState.render && dialogState.render()}\n </MenuContext.Provider>\n );\n}) as ForwardedMenuWithStatics;\nMenu.Trigger = Trigger;\nMenu.Content = Content;\nMenu.Item = Item;\nMenu.Link = Link;\nMenu.Checkbox = Checkbox;\nMenu.Separator = Separator;\nMenu.Group = Group;\nMenu.Header = Header;\nMenu.RadioGroup = RadioGroup;\nMenu.SubMenu = SubMenu;\n\nexport type {\n MenuItemProps,\n MenuContentProps,\n MenuLinkItemProps,\n MenuTriggerProps,\n MenuCheckboxItemProps,\n MenuSeparatorProps,\n MenuGroupProps,\n MenuHeaderProps,\n MenuSubMenuProps,\n};\n"],"names":["Menu","open","MenuPrimitive"],"mappings":";;;;;;;;;;;;;;;AAsDO,MAAM,OAAO,MAAM,WAAyC,SAASA,MAAK,eAAe,MAAM;AAClG,QAAM,EAAE,UAAU,aAAa,UAAU,MAAM,UAAU,SAAS,GAAG,MAAA,IAAU;AAC/E,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,SAAS,KAAK;AACpD,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,SAA6B,MAAS;AAC5E,QAAM,CAAC,MAAM,OAAO,IAAI,cAAuB;AAAA,IAC3C,cAAc,eAAe;AAAA,IAC7B;AAAA,IACA,OAAO;AAAA,EAAA,CACV;AACD,QAAM,CAAC,aAAa,cAAc,IAAI,MAAM,SAAuE;AAAA,IAC/G,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACX;AAED,QAAM,aAAa,MAAM,OAA0B,IAAI;AAEvD,QAAM,cAAc,MAAM,YAAY,MAAM;AACxC,mBAAe,EAAE,MAAM,OAAO,QAAQ,MAAM;AAC5C,eAAW,SAAS,MAAA;AAAA,EACxB,GAAG,CAAA,CAAE;AAEL,QAAM,UAAU,MAAM;AAAA,IAClB,OAAO;AAAA,MACH;AAAA,MACA,qBAAqB,MAAM,YAAY,IAAI;AAAA,MAC3C;AAAA,MACA,aAAa,CAAC,UAAkB,YAAY,KAAK;AAAA,MACjD,MAAM,MAAM,QAAQ,IAAI;AAAA,MACxB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,MAE1B;AAAA,MACA,YAAY,CAAC,WAAqC;AAC9C,uBAAe,EAAE,MAAM,MAAM,OAAA,CAAQ;AACrC,gBAAQ,KAAK;AAAA,MACjB;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IAAA;AAAA,IAEJ,CAAC,UAAU,UAAU,SAAS,aAAa,WAAW;AAAA,EAAA;AAG1D,QAAM,mBAAmB,CAACC,OAAe,iBAAwD;AAC7F,UAAM,QAAQ,aAAa;AAC3B,UAAM,iBAAiB,aAAa,WAAY,OAAO;AACvD,UAAM,0BAA0B,8BAA8B,cAAc;AAI5E,QAAIA,UAAS,MAAM,QAAQ,aAAa,MAAM,QAAQ,gBAAgB,yBAAyB;AAC3F,mBAAa,OAAA;AACb;AAAA,IACJ;AACA,YAAQA,KAAI;AAAA,EAChB;AAEA,SACI,sBAAA,cAAC,YAAY,UAAZ,EAAqB,OAAO,QAAA,GACzB,sBAAA,cAACC,OAAc,MAAd,EAAoB,GAAG,OAAO,MAAY,cAAc,iBAAA,GACpD,WAAW,sBAAA,cAAC,SAAA,EAAQ,KAAK,WAAA,GAAa,OAAQ,GAC9C,QACL,GAEC,YAAY,QAAQ,YAAY,UAAU,YAAY,QAC3D;AAER,CAAC;AACD,KAAK,UAAU;AACf,KAAK,UAAU;AACf,KAAK,OAAO;AACZ,KAAK,OAAO;AACZ,KAAK,WAAW;AAChB,KAAK,YAAY;AACjB,KAAK,QAAQ;AACb,KAAK,SAAS;AACd,KAAK,aAAa;AAClB,KAAK,UAAU;"}
1
+ {"version":3,"file":"Menu.js","sources":["../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport * as React from 'react';\n\nimport { useControlled } from '../../hooks/useControlled';\nimport { isElementInsideTable3OrReport } from '../../utils/dom';\n\nimport type { MenuCheckboxItemProps } from './components/Checkbox';\nimport { Checkbox } from './components/Checkbox';\nimport type { MenuContentProps } from './components/Content';\nimport { Content } from './components/Content';\nimport type { MenuGroupProps } from './components/Group';\nimport { Group } from './components/Group';\nimport type { MenuHeaderProps } from './components/Header';\nimport { Header } from './components/Header';\nimport type { MenuItemProps } from './components/Item';\nimport { Item } from './components/Item';\nimport type { MenuLinkItemProps } from './components/Link';\nimport { Link } from './components/Link';\nimport type { ForwardedMenuRadioGroupWithStatics } from './components/RadioGroup';\nimport { RadioGroup } from './components/RadioGroup';\nimport type { MenuSeparatorProps } from './components/Separator';\nimport { Separator } from './components/Separator';\nimport type { MenuSubMenuProps } from './components/SubMenu';\nimport { SubMenu } from './components/SubMenu';\nimport type { MenuTriggerProps } from './components/Trigger';\nimport { Trigger } from './components/Trigger';\nimport { MenuContext } from './Context';\n\nexport type MenuProps = {\n children: React.ReactNode;\n /** Set whether the menu is open by default or not */\n defaultOpen?: boolean;\n /** Called when the menu opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n /** Control the open state of the menu from outside the component */\n open?: boolean;\n /** ID of the trigger the menu is associated with (controlled mode) */\n triggerId?: string | null;\n /** A trigger to be used for the menu, should not be set if `children` already contains a trigger */\n trigger?: React.JSX.Element;\n};\nexport type ForwardedMenuWithStatics = React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<MenuTriggerProps>;\n Content: React.ForwardRefExoticComponent<MenuContentProps>;\n Item: React.ForwardRefExoticComponent<MenuItemProps>;\n Link: React.ForwardRefExoticComponent<MenuLinkItemProps>;\n Checkbox: React.ForwardRefExoticComponent<MenuCheckboxItemProps>;\n Separator: React.ForwardRefExoticComponent<MenuSeparatorProps>;\n Group: React.ForwardRefExoticComponent<MenuGroupProps>;\n Header: React.ForwardRefExoticComponent<MenuHeaderProps>;\n RadioGroup: ForwardedMenuRadioGroupWithStatics;\n SubMenu: React.ForwardRefExoticComponent<MenuSubMenuProps>;\n};\n\nexport const Menu = React.forwardRef<HTMLButtonElement, MenuProps>(function Menu(externalProps, _ref) {\n const { children, defaultOpen, onChange, open: openProp, trigger, ...props } = externalProps;\n const [indented, setIndented] = React.useState(false);\n const [minWidth, setMinWidth] = React.useState<number | undefined>(undefined);\n const [open, setOpen] = useControlled<boolean>({\n defaultValue: defaultOpen ?? false,\n onChange,\n value: openProp,\n });\n const [dialogState, setDialogState] = React.useState<{ open: boolean; render: (() => React.ReactElement) | null }>({\n open: false,\n render: null,\n });\n\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n\n const closeDialog = React.useCallback(() => {\n setDialogState({ open: false, render: null });\n triggerRef.current?.focus();\n }, []);\n\n const context = React.useMemo(\n () => ({\n indented,\n registerIndentation: () => setIndented(true),\n minWidth,\n setMinWidth: (width: number) => setMinWidth(width),\n open: () => setOpen(true),\n close: () => setOpen(false),\n // Dialog state management - survives menu close\n dialogState,\n openDialog: (render: () => React.ReactElement) => {\n setDialogState({ open: true, render });\n setOpen(false);\n },\n closeDialog,\n // Trigger ref for focus management after dialog closes\n triggerRef,\n }),\n [indented, minWidth, setOpen, dialogState, closeDialog]\n );\n\n const handleOpenChange = (open: boolean, eventDetails: MenuPrimitive.Root.ChangeEventDetails) => {\n const event = eventDetails.event as KeyboardEvent;\n const triggerElement = eventDetails.trigger ?? (event?.currentTarget as Element | null);\n const isTableHeaderOrCellMenu = isElementInsideTable3OrReport(triggerElement);\n\n // In Table3 header/cell contexts, ArrowUp/ArrowDown should keep driving table row navigation.\n // Cancel only the menu open transition for these keys so the key event can still bubble to the table.\n if (open && (event.key === 'ArrowUp' || event.key === 'ArrowDown') && isTableHeaderOrCellMenu) {\n eventDetails.cancel();\n return;\n }\n setOpen(open);\n };\n\n return (\n <MenuContext.Provider value={context}>\n <MenuPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange}>\n {trigger && <Trigger ref={triggerRef}>{trigger}</Trigger>}\n {children}\n </MenuPrimitive.Root>\n {/* Render dialog outside menu tree - state survives menu close */}\n {dialogState.open && dialogState.render && dialogState.render()}\n </MenuContext.Provider>\n );\n}) as ForwardedMenuWithStatics;\nMenu.Trigger = Trigger;\nMenu.Content = Content;\nMenu.Item = Item;\nMenu.Link = Link;\nMenu.Checkbox = Checkbox;\nMenu.Separator = Separator;\nMenu.Group = Group;\nMenu.Header = Header;\nMenu.RadioGroup = RadioGroup;\nMenu.SubMenu = SubMenu;\n\nexport type {\n MenuItemProps,\n MenuContentProps,\n MenuLinkItemProps,\n MenuTriggerProps,\n MenuCheckboxItemProps,\n MenuSeparatorProps,\n MenuGroupProps,\n MenuHeaderProps,\n MenuSubMenuProps,\n};\n"],"names":["Menu","open","MenuPrimitive"],"mappings":";;;;;;;;;;;;;;;AAsDO,MAAM,OAAO,MAAM,WAAyC,SAASA,MAAK,eAAe,MAAM;AAClG,QAAM,EAAE,UAAU,aAAa,UAAU,MAAM,UAAU,SAAS,GAAG,MAAA,IAAU;AAC/E,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,SAAS,KAAK;AACpD,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,SAA6B,MAAS;AAC5E,QAAM,CAAC,MAAM,OAAO,IAAI,cAAuB;AAAA,IAC3C,cAAc,eAAe;AAAA,IAC7B;AAAA,IACA,OAAO;AAAA,EAAA,CACV;AACD,QAAM,CAAC,aAAa,cAAc,IAAI,MAAM,SAAuE;AAAA,IAC/G,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACX;AAED,QAAM,aAAa,MAAM,OAA0B,IAAI;AAEvD,QAAM,cAAc,MAAM,YAAY,MAAM;AACxC,mBAAe,EAAE,MAAM,OAAO,QAAQ,MAAM;AAC5C,eAAW,SAAS,MAAA;AAAA,EACxB,GAAG,CAAA,CAAE;AAEL,QAAM,UAAU,MAAM;AAAA,IAClB,OAAO;AAAA,MACH;AAAA,MACA,qBAAqB,MAAM,YAAY,IAAI;AAAA,MAC3C;AAAA,MACA,aAAa,CAAC,UAAkB,YAAY,KAAK;AAAA,MACjD,MAAM,MAAM,QAAQ,IAAI;AAAA,MACxB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,MAE1B;AAAA,MACA,YAAY,CAAC,WAAqC;AAC9C,uBAAe,EAAE,MAAM,MAAM,OAAA,CAAQ;AACrC,gBAAQ,KAAK;AAAA,MACjB;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IAAA;AAAA,IAEJ,CAAC,UAAU,UAAU,SAAS,aAAa,WAAW;AAAA,EAAA;AAG1D,QAAM,mBAAmB,CAACC,OAAe,iBAAwD;AAC7F,UAAM,QAAQ,aAAa;AAC3B,UAAM,iBAAiB,aAAa,WAAY,OAAO;AACvD,UAAM,0BAA0B,8BAA8B,cAAc;AAI5E,QAAIA,UAAS,MAAM,QAAQ,aAAa,MAAM,QAAQ,gBAAgB,yBAAyB;AAC3F,mBAAa,OAAA;AACb;AAAA,IACJ;AACA,YAAQA,KAAI;AAAA,EAChB;AAEA,SACI,sBAAA,cAAC,YAAY,UAAZ,EAAqB,OAAO,QAAA,GACzB,sBAAA,cAACC,OAAc,MAAd,EAAoB,GAAG,OAAO,MAAY,cAAc,iBAAA,GACpD,WAAW,sBAAA,cAAC,SAAA,EAAQ,KAAK,WAAA,GAAa,OAAQ,GAC9C,QACL,GAEC,YAAY,QAAQ,YAAY,UAAU,YAAY,QAC3D;AAER,CAAC;AACD,KAAK,UAAU;AACf,KAAK,UAAU;AACf,KAAK,OAAO;AACZ,KAAK,OAAO;AACZ,KAAK,WAAW;AAChB,KAAK,YAAY;AACjB,KAAK,QAAQ;AACb,KAAK,SAAS;AACd,KAAK,aAAa;AAClB,KAAK,UAAU;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Content.cjs","sources":["../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport type { Align, Placement } from '../../../types';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { useCurrentMenu } from '../Context';\n\nimport type { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup>, 'children' | 'side'> & {\n align?: Align;\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useMergedRef<any>(ref);\n const menu = useCurrentMenu();\n const { align = 'start', children: _1, placement: side, ...otherProps } = props;\n const className = cn(\n 'block rounded border border-transparent bg-white p-1 text-black outline-none yt-shadow',\n props.className\n );\n\n // attach refs to each child\n const childrenRefs = React.useRef<React.RefObject<HTMLDivElement>[]>([]);\n const childrenWithRefs = (React.Children.toArray(props.children) as React.ReactElement<MenuItemProps & { ref: any }>[])\n .filter(child => !!child) // remove falsey children\n .map((child, index) => {\n childrenRefs.current[index] = React.createRef<HTMLDivElement>();\n return React.cloneElement(child, { ref: childrenRefs.current[index] });\n });\n\n // register any shortcuts attached to children\n React.useEffect(() => {\n const shortcuts: ((event: KeyboardEvent) => void)[] = [];\n childrenWithRefs.forEach((child, index) => {\n if (child.props.shortcut) {\n shortcuts.push(\n createShortcutKeyDownHandler(child.props.shortcut, event => {\n event.preventDefault();\n\n const dialog = document.querySelector('[role=\"dialog\"]');\n\n // Don't trigger the shortcut if it is outside of the dialog\n if (dialog && !dialog?.contains(internalRef.current)) {\n return;\n }\n\n menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n // Use capture phase to intercept events before Base UI menu items can stop propagation\n shortcuts.forEach(handler => document.addEventListener('keydown', handler, { capture: true }));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler, { capture: true }));\n };\n }, []);\n\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner align={align} side={side} sideOffset={3}>\n <MenuPrimitive.Popup\n {...otherProps}\n className={className}\n data-taco=\"menu\"\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n});\n"],"names":["React","useMergedRef","menu","useCurrentMenu","createShortcutKeyDownHandler","MenuPrimitive"],"mappings":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AAS,EAAE,SAAS,KAAA,CAAM,CAAC;AAAA,IACpG;AAAA,EACJ,GAAG,CAAA,CAAE;AAEL,SACIF,iCAAA,cAACK,KAAAA,KAAc,QAAd,MACGL,iCAAA,cAACK,KAAAA,KAAc,YAAd,EAAyB,OAAc,MAAY,YAAY,EAAA,GAC5DL,iCAAA;AAAA,IAACK,KAAAA,KAAc;AAAA,IAAd;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA,aAAU;AAAA,MACV,OAAO,EAAE,UAAUH,QAAM,SAAA;AAAA,MACzB,KAAK;AAAA,IAAA;AAAA,IACJ;AAAA,EAAA,CAET,CACJ;AAER,CAAC;;"}
1
+ {"version":3,"file":"Content.cjs","sources":["../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport type { Align, Placement } from '../../../types';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { useCurrentMenu } from '../Context';\n\nimport type { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup>, 'children' | 'side'> & {\n align?: Align;\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useMergedRef<any>(ref);\n const menu = useCurrentMenu();\n const { align = 'start', children: _1, placement: side, ...otherProps } = props;\n const className = cn(\n 'block rounded border border-transparent bg-white p-1 text-black outline-none yt-shadow',\n props.className\n );\n\n // attach refs to each child\n const childrenRefs = React.useRef<React.RefObject<HTMLDivElement | null>[]>([]);\n const childrenWithRefs = (React.Children.toArray(props.children) as React.ReactElement<MenuItemProps & { ref: any }>[])\n .filter(child => !!child) // remove falsey children\n .map((child, index) => {\n childrenRefs.current[index] = React.createRef<HTMLDivElement>();\n return React.cloneElement(child, { ref: childrenRefs.current[index] });\n });\n\n // register any shortcuts attached to children\n React.useEffect(() => {\n const shortcuts: ((event: KeyboardEvent) => void)[] = [];\n childrenWithRefs.forEach((child, index) => {\n if (child.props.shortcut) {\n shortcuts.push(\n createShortcutKeyDownHandler(child.props.shortcut, event => {\n event.preventDefault();\n\n const dialog = document.querySelector('[role=\"dialog\"]');\n\n // Don't trigger the shortcut if it is outside of the dialog\n if (dialog && !dialog?.contains(internalRef.current)) {\n return;\n }\n\n menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n // Use capture phase to intercept events before Base UI menu items can stop propagation\n shortcuts.forEach(handler => document.addEventListener('keydown', handler, { capture: true }));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler, { capture: true }));\n };\n }, []);\n\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner align={align} side={side} sideOffset={3}>\n <MenuPrimitive.Popup\n {...otherProps}\n className={className}\n data-taco=\"menu\"\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n});\n"],"names":["React","useMergedRef","menu","useCurrentMenu","createShortcutKeyDownHandler","MenuPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,UAAUA,iBAAM,WAAW,SAAS,YAAY,OAAyB,KAAgC;AAClH,QAAM,cAAcC,aAAAA,aAAkB,GAAG;AACzC,QAAMC,SAAOC,QAAAA,eAAA;AACb,QAAM,EAAE,QAAQ,SAAS,UAAU,IAAI,WAAW,MAAM,GAAG,WAAA,IAAe;AAC1E,QAAM,YAAY;AAAA,IACd;AAAA,IACA,MAAM;AAAA,EAAA;AAIV,QAAM,eAAeH,iBAAM,OAAiD,EAAE;AAC9E,QAAM,mBAAoBA,iBAAM,SAAS,QAAQ,MAA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EAAA,CAET,CACJ;AAER,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport type { Align, Placement } from '../../../types';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { useCurrentMenu } from '../Context';\n\nimport type { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup>, 'children' | 'side'> & {\n align?: Align;\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useMergedRef<any>(ref);\n const menu = useCurrentMenu();\n const { align = 'start', children: _1, placement: side, ...otherProps } = props;\n const className = cn(\n 'block rounded border border-transparent bg-white p-1 text-black outline-none yt-shadow',\n props.className\n );\n\n // attach refs to each child\n const childrenRefs = React.useRef<React.RefObject<HTMLDivElement>[]>([]);\n const childrenWithRefs = (React.Children.toArray(props.children) as React.ReactElement<MenuItemProps & { ref: any }>[])\n .filter(child => !!child) // remove falsey children\n .map((child, index) => {\n childrenRefs.current[index] = React.createRef<HTMLDivElement>();\n return React.cloneElement(child, { ref: childrenRefs.current[index] });\n });\n\n // register any shortcuts attached to children\n React.useEffect(() => {\n const shortcuts: ((event: KeyboardEvent) => void)[] = [];\n childrenWithRefs.forEach((child, index) => {\n if (child.props.shortcut) {\n shortcuts.push(\n createShortcutKeyDownHandler(child.props.shortcut, event => {\n event.preventDefault();\n\n const dialog = document.querySelector('[role=\"dialog\"]');\n\n // Don't trigger the shortcut if it is outside of the dialog\n if (dialog && !dialog?.contains(internalRef.current)) {\n return;\n }\n\n menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n // Use capture phase to intercept events before Base UI menu items can stop propagation\n shortcuts.forEach(handler => document.addEventListener('keydown', handler, { capture: true }));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler, { capture: true }));\n };\n }, []);\n\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner align={align} side={side} sideOffset={3}>\n <MenuPrimitive.Popup\n {...otherProps}\n className={className}\n data-taco=\"menu\"\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n});\n"],"names":["MenuPrimitive"],"mappings":";;;;;;AAkBO,MAAM,UAAU,MAAM,WAAW,SAAS,YAAY,OAAyB,KAAgC;AAClH,QAAM,cAAc,aAAkB,GAAG;AACzC,QAAM,OAAO,eAAA;AACb,QAAM,EAAE,QAAQ,SAAS,UAAU,IAAI,WAAW,MAAM,GAAG,WAAA,IAAe;AAC1E,QAAM,YAAY;AAAA,IACd;AAAA,IACA,MAAM;AAAA,EAAA;AAIV,QAAM,eAAe,MAAM,OAA0C,EAAE;AACvE,QAAM,mBAAoB,MAAM,SAAS,QAAQ,MAAM,QAAQ,EAC1D,OAAO,CAAA,UAAS,CAAC,CAAC,KAAK,EACvB,IAAI,CAAC,OAAO,UAAU;AACnB,iBAAa,QAAQ,KAAK,IAAI,MAAM,UAAA;AACpC,WAAO,MAAM,aAAa,OAAO,EAAE,KAAK,aAAa,QAAQ,KAAK,GAAG;AAAA,EACzE,CAAC;AAGL,QAAM,UAAU,MAAM;AAClB,UAAM,YAAgD,CAAA;AACtD,qBAAiB,QAAQ,CAAC,OAAO,UAAU;AACvC,UAAI,MAAM,MAAM,UAAU;AACtB,kBAAU;AAAA,UACN,6BAA6B,MAAM,MAAM,UAAU,CAAA,UAAS;AACxD,kBAAM,eAAA;AAEN,kBAAM,SAAS,SAAS,cAAc,iBAAiB;AAGvD,gBAAI,UAAU,CAAC,QAAQ,SAAS,YAAY,OAAO,GAAG;AAClD;AAAA,YACJ;AAEA,kBAAM,KAAA;AACN,uBAAW,MAAM,aAAa,QAAQ,KAAK,GAAG,SAAS,MAAA,GAAS,CAAC;AAAA,UACrE,CAAC;AAAA,QAAA;AAAA,MAET;AAAA,IACJ,CAAC;AAGD,cAAU,QAAQ,CAAA,YAAW,SAAS,iBAAiB,WAAW,SAAS,EAAE,SAAS,KAAA,CAAM,CAAC;AAE7F,WAAO,MAAM;AACT,gBAAU,QAAQ,CAAA,YAAW,SAAS,oBAAoB,WAAW,SAAS,EAAE,SAAS,KAAA,CAAM,CAAC;AAAA,IACpG;AAAA,EACJ,GAAG,CAAA,CAAE;AAEL,SACI,sBAAA,cAACA,KAAc,QAAd,MACG,sBAAA,cAACA,KAAc,YAAd,EAAyB,OAAc,MAAY,YAAY,EAAA,GAC5D,sBAAA;AAAA,IAACA,KAAc;AAAA,IAAd;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA,aAAU;AAAA,MACV,OAAO,EAAE,UAAU,MAAM,SAAA;AAAA,MACzB,KAAK;AAAA,IAAA;AAAA,IACJ;AAAA,EAAA,CAET,CACJ;AAER,CAAC;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport type { Align, Placement } from '../../../types';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { useCurrentMenu } from '../Context';\n\nimport type { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup>, 'children' | 'side'> & {\n align?: Align;\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useMergedRef<any>(ref);\n const menu = useCurrentMenu();\n const { align = 'start', children: _1, placement: side, ...otherProps } = props;\n const className = cn(\n 'block rounded border border-transparent bg-white p-1 text-black outline-none yt-shadow',\n props.className\n );\n\n // attach refs to each child\n const childrenRefs = React.useRef<React.RefObject<HTMLDivElement | null>[]>([]);\n const childrenWithRefs = (React.Children.toArray(props.children) as React.ReactElement<MenuItemProps & { ref: any }>[])\n .filter(child => !!child) // remove falsey children\n .map((child, index) => {\n childrenRefs.current[index] = React.createRef<HTMLDivElement>();\n return React.cloneElement(child, { ref: childrenRefs.current[index] });\n });\n\n // register any shortcuts attached to children\n React.useEffect(() => {\n const shortcuts: ((event: KeyboardEvent) => void)[] = [];\n childrenWithRefs.forEach((child, index) => {\n if (child.props.shortcut) {\n shortcuts.push(\n createShortcutKeyDownHandler(child.props.shortcut, event => {\n event.preventDefault();\n\n const dialog = document.querySelector('[role=\"dialog\"]');\n\n // Don't trigger the shortcut if it is outside of the dialog\n if (dialog && !dialog?.contains(internalRef.current)) {\n return;\n }\n\n menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n // Use capture phase to intercept events before Base UI menu items can stop propagation\n shortcuts.forEach(handler => document.addEventListener('keydown', handler, { capture: true }));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler, { capture: true }));\n };\n }, []);\n\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner align={align} side={side} sideOffset={3}>\n <MenuPrimitive.Popup\n {...otherProps}\n className={className}\n data-taco=\"menu\"\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n});\n"],"names":["MenuPrimitive"],"mappings":";;;;;;AAkBO,MAAM,UAAU,MAAM,WAAW,SAAS,YAAY,OAAyB,KAAgC;AAClH,QAAM,cAAc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AyB,OAAc,MAAY,YAAY,EAAA,GAC5D,sBAAA;AAAA,IAACA,KAAc;AAAA,IAAd;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA,aAAU;AAAA,MACV,OAAO,EAAE,UAAU,MAAM,SAAA;AAAA,MACzB,KAAK;AAAA,IAAA;AAAA,IACJ;AAAA,EAAA,CAET,CACJ;AAER,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Item.cjs","sources":["../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { KeyDownHandlerOptions } from '../../../utils/keyboard';\nimport type { DialogProps } from '../../Dialog/Dialog';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { useCurrentMenu } from '../Context';\n\nexport const Icon = ({ name }: { name: IconName }) => (\n // oxlint-disable-next-line taco/no-component-margin -- grandfathered; removing this margin is a visual breaking change\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({\n disabled,\n indented,\n className,\n}: {\n disabled?: boolean;\n indented: boolean;\n className?: string;\n}) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'group relative flex h-8 w-full items-center justify-start rounded pr-1.5 focus:outline-none',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n /* TODO: Why have both hover and data-[highlighted]? */\n /* shadow-none on hover is to prevent the focus style from showing up on hover */\n 'cursor-pointer text-black hover:bg-gray-100 hover:text-black hover:!shadow-none focus-visible:yt-focus data-[highlighted]:bg-gray-100 data-[highlighted]:text-black':\n !disabled,\n 'cursor-not-allowed text-gray-300 hover:bg-white': disabled,\n },\n className\n );\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n shortcut?: string | KeyDownHandlerOptions;\n subMenu?: any;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\n\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = !!props.disabled || props['aria-disabled'] === true || props['aria-disabled'] === 'true';\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n event.stopPropagation();\n\n // For dialog items, use menu context to manage state (survives menu close)\n if (dialog && menu) {\n menu.openDialog(() =>\n dialog({\n open: true,\n onChange: (open: boolean) => {\n if (!open) menu.closeDialog();\n },\n onClose: () => menu.closeDialog(),\n })\n );\n return;\n }\n\n // Call onClick handler\n if (onClick) {\n onClick(event);\n }\n };\n\n if (subMenu) {\n return (\n <MenuPrimitive.SubmenuRoot>\n <MenuPrimitive.SubmenuTrigger {...otherProps} className={className} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n <IconPrimitive className=\"-mr-1.5 ml-auto !h-5 !w-5\" name=\"chevron-right\" />\n </MenuPrimitive.SubmenuTrigger>\n {subMenu()}\n </MenuPrimitive.SubmenuRoot>\n );\n }\n\n const menuItem = (\n <MenuPrimitive.Item\n {...otherProps}\n // Need to set aria-haspopup=\"dialog\" otherwise there is no way to know item opens the dialo (in e2e tests), and we need to know this to be able to test this scenario in e2e tests.\n {...(dialog ? { 'aria-haspopup': 'dialog' } : {})}\n className={className}\n onClick={handleClick}\n ref={ref}\n disabled={disabled}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-gray-700\" />\n </span>\n ) : null}\n </MenuPrimitive.Item>\n );\n\n return menuItem;\n});\n"],"names":["React","IconPrimitive","menu","useCurrentMenu","MenuPrimitive","Shortcut"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,OAAO,CAAC,EAAE,KAAA;AAAA;AAAA,EAEnBA,iCAAA,cAAC,UAAK,WAAU,uBAAA,kDACXC,OAAAA,MAAA,EAAc,WAAU,2BAA0B,KAAA,CAAY,CACnE;AAAA;AAGG,MAAM,iBAAiB,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACJ,MAIM;AACF,QAAMC,QAAOC,QAAAA,eAAA;AAEbH,mBAAM,UAAU,MAAM;AAClB,QAAI,YAAY,CAACE,OAAM,UAAU;AAC7B,MAAAA,OAAM,oBAAA;AAAA,IACV;AAAA,EACJ,GAAG,CAAC,QAAQ,CAAC;AAEb,SAAO;AAAA,IACH;AAAA,IACA;AAAA,MACI,QAAQA,OAAM;AAAA,MACd,UAAU,CAACA,OAAM;AAAA;AAAA;AAAA,MAGjB,uKACI,CAAC;AAAA,MACL,mDAAmD;AAAA,IAAA;AAAA,IAEvD;AAAA,EAAA;AAER;AAWO,MAAM,OAAOF,iBAAM,WAAW,SAAS,SAAS,OAAsB,KAAgC;AACzG,QAAM,EAAE,QAAQ,MAAM,SAAS,UAAU,SAAS,GAAG,eAAe;AACpE,QAAME,SAAOC,QAAAA,eAAA;AAEb,QAAM,YAAY,eAAe;AAAA,IAC7B,UAAU,MAAM;AAAA,IAChB,UAAU,CAAC,CAAC;AAAA,IACZ,WAAW,MAAM;AAAA,EAAA,CACpB;AAED,QAAM,WAAW,CAAC,CAAC,MAAM,YAAY,MAAM,eAAe,MAAM,QAAQ,MAAM,eAAe,MAAM;AAEnG,QAAM,cAAc,CAAC,UAA4C;AAC7D,QAAI,UAAU;AACV,YAAM,eAAA;AACN;AAAA,IACJ;AAEA,UAAM,gBAAA;AAGN,QAAI,UAAUD,QAAM;AAChBA,aAAK;AAAA,QAAW,MACZ,OAAO;AAAA,UACH,MAAM;AAAA,UACN,UAAU,CAAC,SAAkB;AACzB,gBAAI,CAAC,KAAMA,QAAK,YAAA;AAAA,UACpB;AAAA,UACA,SAAS,MAAMA,OAAK,YAAA;AAAA,QAAY,CACnC;AAAA,MAAA;AAEL;AAAA,IACJ;AAGA,QAAI,SAAS;AACT,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,MAAI,SAAS;AACT,WACIF,iCAAA,cAACI,KAAAA,KAAc,aAAd,MACGJ,iCAAA,cAACI,KAAAA,KAAc,gBAAd,EAA8B,GAAG,YAAY,WAAsB,IAAA,GAC/D,OAAOJ,iCAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK,MAC9B,MAAM,UACPA,iCAAA,cAACC,OAAAA,MAAA,EAAc,WAAU,6BAA4B,MAAK,iBAAgB,CAC9E,GACC,SACL;AAAA,EAER;AAEA,QAAM,WACFD,iCAAA;AAAA,IAACI,KAAAA,KAAc;AAAA,IAAd;AAAA,MACI,GAAG;AAAA,MAEH,GAAI,SAAS,EAAE,iBAAiB,SAAA,IAAa,CAAA;AAAA,MAC9C;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IACC,OAAOJ,iCAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK;AAAA,IAC9B,MAAM;AAAA,IACN,WACGA,iCAAA,cAAC,QAAA,EAAK,WAAU,kBACZA,iCAAA,cAACK,SAAAA,UAAA,EAAS,MAAM,UAAU,WAAU,gBAAA,CAAgB,CACxD,IACA;AAAA,EAAA;AAIZ,SAAO;AACX,CAAC;;;;"}
1
+ {"version":3,"file":"Item.cjs","sources":["../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { KeyDownHandlerOptions } from '../../../utils/keyboard';\nimport type { DialogProps } from '../../Dialog/Dialog';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { useCurrentMenu } from '../Context';\n\nexport const Icon = ({ name }: { name: IconName }) => (\n // oxlint-disable-next-line taco/no-component-margin -- grandfathered; removing this margin is a visual breaking change\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({\n disabled,\n indented,\n className,\n}: {\n disabled?: boolean;\n indented: boolean;\n className?: string;\n}) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'group relative flex h-8 w-full items-center justify-start rounded pr-1.5 focus:outline-none',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n /* TODO: Why have both hover and data-[highlighted]? */\n /* shadow-none on hover is to prevent the focus style from showing up on hover */\n 'cursor-pointer text-black hover:bg-gray-100 hover:text-black hover:!shadow-none focus-visible:yt-focus data-[highlighted]:bg-gray-100 data-[highlighted]:text-black':\n !disabled,\n 'cursor-not-allowed text-gray-300 hover:bg-white': disabled,\n },\n className\n );\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => React.JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n shortcut?: string | KeyDownHandlerOptions;\n subMenu?: any;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\n\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = !!props.disabled || props['aria-disabled'] === true || props['aria-disabled'] === 'true';\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n event.stopPropagation();\n\n // For dialog items, use menu context to manage state (survives menu close)\n if (dialog && menu) {\n menu.openDialog(() =>\n dialog({\n open: true,\n onChange: (open: boolean) => {\n if (!open) menu.closeDialog();\n },\n onClose: () => menu.closeDialog(),\n })\n );\n return;\n }\n\n // Call onClick handler\n if (onClick) {\n onClick(event);\n }\n };\n\n if (subMenu) {\n return (\n <MenuPrimitive.SubmenuRoot>\n <MenuPrimitive.SubmenuTrigger {...otherProps} className={className} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n <IconPrimitive className=\"-mr-1.5 ml-auto !h-5 !w-5\" name=\"chevron-right\" />\n </MenuPrimitive.SubmenuTrigger>\n {subMenu()}\n </MenuPrimitive.SubmenuRoot>\n );\n }\n\n const menuItem = (\n <MenuPrimitive.Item\n {...otherProps}\n // Need to set aria-haspopup=\"dialog\" otherwise there is no way to know item opens the dialo (in e2e tests), and we need to know this to be able to test this scenario in e2e tests.\n {...(dialog ? { 'aria-haspopup': 'dialog' } : {})}\n className={className}\n onClick={handleClick}\n ref={ref}\n disabled={disabled}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-gray-700\" />\n </span>\n ) : null}\n </MenuPrimitive.Item>\n );\n\n return menuItem;\n});\n"],"names":["React","IconPrimitive","menu","useCurrentMenu","MenuPrimitive","Shortcut"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,OAAO,CAAC,EAAE,KAAA;AAAA;AAAA,EAEnBA,iCAAA,cAAC,UAAK,WAAU,uBAAA,kDACXC,OAAAA,MAAA,EAAc,WAAU,2BAA0B,KAAA,CAAY,CACnE;AAAA;AAGG,MAAM,iBAAiB,CAAC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,MACGJ,iCAAA,cAACI,KAAAA,KAAc,gBAAd,EAA8B,GAAG,YAAY,WAAsB,IAAA,GAC/D,OAAOJ,iCAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK,MAC9B,MAAM,UACPA,iCAAA,cAACC,OAAAA,MAAA,EAAc,WAAU,6BAA4B,MAAK,iBAAgB,CAC9E,GACC,SACL;AAAA,EAER;AAEA,QAAM,WACFD,iCAAA;AAAA,IAACI,KAAAA,KAAc;AAAA,IAAd;AAAA,MACI,GAAG;AAAA,MAEH,GAAI,SAAS,EAAE,iBAAiB,SAAA,IAAa,CAAA;AAAA,MAC9C;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IACC,OAAOJ,iCAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK;AAAA,IAC9B,MAAM;AAAA,IACN,WACGA,iCAAA,cAAC,QAAA,EAAK,WAAU,kBACZA,iCAAA,cAACK,SAAAA,UAAA,EAAS,MAAM,UAAU,WAAU,gBAAA,CAAgB,CACxD,IACA;AAAA,EAAA;AAIZ,SAAO;AACX,CAAC;;;;"}
@@ -11,7 +11,7 @@ export declare const useItemStyling: ({ disabled, indented, className, }: {
11
11
  className?: string;
12
12
  }) => string;
13
13
  export type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {
14
- dialog?: (props: Partial<DialogProps>) => JSX.Element;
14
+ dialog?: (props: Partial<DialogProps>) => React.JSX.Element;
15
15
  disabled?: boolean;
16
16
  icon?: IconName;
17
17
  onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
@@ -19,7 +19,7 @@ export type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect
19
19
  subMenu?: any;
20
20
  };
21
21
  export declare const Item: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> & {
22
- dialog?: (props: Partial<DialogProps>) => JSX.Element;
22
+ dialog?: (props: Partial<DialogProps>) => React.JSX.Element;
23
23
  disabled?: boolean;
24
24
  icon?: IconName;
25
25
  onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Item.js","sources":["../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { KeyDownHandlerOptions } from '../../../utils/keyboard';\nimport type { DialogProps } from '../../Dialog/Dialog';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { useCurrentMenu } from '../Context';\n\nexport const Icon = ({ name }: { name: IconName }) => (\n // oxlint-disable-next-line taco/no-component-margin -- grandfathered; removing this margin is a visual breaking change\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({\n disabled,\n indented,\n className,\n}: {\n disabled?: boolean;\n indented: boolean;\n className?: string;\n}) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'group relative flex h-8 w-full items-center justify-start rounded pr-1.5 focus:outline-none',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n /* TODO: Why have both hover and data-[highlighted]? */\n /* shadow-none on hover is to prevent the focus style from showing up on hover */\n 'cursor-pointer text-black hover:bg-gray-100 hover:text-black hover:!shadow-none focus-visible:yt-focus data-[highlighted]:bg-gray-100 data-[highlighted]:text-black':\n !disabled,\n 'cursor-not-allowed text-gray-300 hover:bg-white': disabled,\n },\n className\n );\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n shortcut?: string | KeyDownHandlerOptions;\n subMenu?: any;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\n\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = !!props.disabled || props['aria-disabled'] === true || props['aria-disabled'] === 'true';\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n event.stopPropagation();\n\n // For dialog items, use menu context to manage state (survives menu close)\n if (dialog && menu) {\n menu.openDialog(() =>\n dialog({\n open: true,\n onChange: (open: boolean) => {\n if (!open) menu.closeDialog();\n },\n onClose: () => menu.closeDialog(),\n })\n );\n return;\n }\n\n // Call onClick handler\n if (onClick) {\n onClick(event);\n }\n };\n\n if (subMenu) {\n return (\n <MenuPrimitive.SubmenuRoot>\n <MenuPrimitive.SubmenuTrigger {...otherProps} className={className} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n <IconPrimitive className=\"-mr-1.5 ml-auto !h-5 !w-5\" name=\"chevron-right\" />\n </MenuPrimitive.SubmenuTrigger>\n {subMenu()}\n </MenuPrimitive.SubmenuRoot>\n );\n }\n\n const menuItem = (\n <MenuPrimitive.Item\n {...otherProps}\n // Need to set aria-haspopup=\"dialog\" otherwise there is no way to know item opens the dialo (in e2e tests), and we need to know this to be able to test this scenario in e2e tests.\n {...(dialog ? { 'aria-haspopup': 'dialog' } : {})}\n className={className}\n onClick={handleClick}\n ref={ref}\n disabled={disabled}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-gray-700\" />\n </span>\n ) : null}\n </MenuPrimitive.Item>\n );\n\n return menuItem;\n});\n"],"names":["IconPrim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A,QAAY,CACnC;AAAA,MAAA;AAEL;AAAA,IACJ;AAGA,QAAI,SAAS;AACT,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,MAAI,SAAS;AACT,WACI,sBAAA,cAACC,KAAc,aAAd,MACG,sBAAA,cAACA,KAAc,gBAAd,EAA8B,GAAG,YAAY,WAAsB,IAAA,GAC/D,OAAO,sBAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK,MAC9B,MAAM,UACP,sBAAA,cAACD,QAAA,EAAc,WAAU,6BAA4B,MAAK,iBAAgB,CAC9E,GACC,SACL;AAAA,EAER;AAEA,QAAM,WACF,sBAAA;AAAA,IAACC,KAAc;AAAA,IAAd;AAAA,MACI,GAAG;AAAA,MAEH,GAAI,SAAS,EAAE,iBAAiB,SAAA,IAAa,CAAA;AAAA,MAC9C;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IACC,OAAO,sBAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK;AAAA,IAC9B,MAAM;AAAA,IACN,WACG,sBAAA,cAAC,QAAA,EAAK,WAAU,kBACZ,sBAAA,cAAC,UAAA,EAAS,MAAM,UAAU,WAAU,gBAAA,CAAgB,CACxD,IACA;AAAA,EAAA;AAIZ,SAAO;AACX,CAAC;"}
1
+ {"version":3,"file":"Item.js","sources":["../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { KeyDownHandlerOptions } from '../../../utils/keyboard';\nimport type { DialogProps } from '../../Dialog/Dialog';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { useCurrentMenu } from '../Context';\n\nexport const Icon = ({ name }: { name: IconName }) => (\n // oxlint-disable-next-line taco/no-component-margin -- grandfathered; removing this margin is a visual breaking change\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({\n disabled,\n indented,\n className,\n}: {\n disabled?: boolean;\n indented: boolean;\n className?: string;\n}) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'group relative flex h-8 w-full items-center justify-start rounded pr-1.5 focus:outline-none',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n /* TODO: Why have both hover and data-[highlighted]? */\n /* shadow-none on hover is to prevent the focus style from showing up on hover */\n 'cursor-pointer text-black hover:bg-gray-100 hover:text-black hover:!shadow-none focus-visible:yt-focus data-[highlighted]:bg-gray-100 data-[highlighted]:text-black':\n !disabled,\n 'cursor-not-allowed text-gray-300 hover:bg-white': disabled,\n },\n className\n );\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => React.JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n shortcut?: string | KeyDownHandlerOptions;\n subMenu?: any;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\n\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = !!props.disabled || props['aria-disabled'] === true || props['aria-disabled'] === 'true';\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n event.stopPropagation();\n\n // For dialog items, use menu context to manage state (survives menu close)\n if (dialog && menu) {\n menu.openDialog(() =>\n dialog({\n open: true,\n onChange: (open: boolean) => {\n if (!open) menu.closeDialog();\n },\n onClose: () => menu.closeDialog(),\n })\n );\n return;\n }\n\n // Call onClick handler\n if (onClick) {\n onClick(event);\n }\n };\n\n if (subMenu) {\n return (\n <MenuPrimitive.SubmenuRoot>\n <MenuPrimitive.SubmenuTrigger {...otherProps} className={className} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n <IconPrimitive className=\"-mr-1.5 ml-auto !h-5 !w-5\" name=\"chevron-right\" />\n </MenuPrimitive.SubmenuTrigger>\n {subMenu()}\n </MenuPrimitive.SubmenuRoot>\n );\n }\n\n const menuItem = (\n <MenuPrimitive.Item\n {...otherProps}\n // Need to set aria-haspopup=\"dialog\" otherwise there is no way to know item opens the dialo (in e2e tests), and we need to know this to be able to test this scenario in e2e tests.\n {...(dialog ? { 'aria-haspopup': 'dialog' } : {})}\n className={className}\n onClick={handleClick}\n ref={ref}\n disabled={disabled}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-gray-700\" />\n </span>\n ) : null}\n </MenuPrimitive.Item>\n );\n\n return menuItem;\n});\n"],"names":["IconPrimitive","MenuPrimitive"],"mappings":";;;;;;AAWO,MAAM,OAAO,CAAC,EAAE,KAAA;AAAA;AAAA,EAEnB,sBAAA,cAAC,UAAK,WAAU,uBAAA,uCACXA,QAAA,EAAc,WAAU,2BAA0B,KAAA,CAAY,CACnE;AAAA;AAGG,MAAM,iBAAiB,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACJ,MAIM;AACF,QAAM,OAAO,eAAA;AAEb,QAAM,UAAU,MAAM;AAClB,QAAI,YAAY,CAAC,MAAM,UAAU;AAC7B,YAAM,oBAAA;AAAA,IACV;AAAA,EACJ,GAAG,CAAC,QAAQ,CAAC;AAEb,SAAO;AAAA,IACH;AAAA,IACA;AAAA,MACI,QAAQ,MAAM;AAAA,MACd,UAAU,CAAC,MAAM;AAAA;AAAA;AAAA,MAGjB,uKACI,CAAC;AAAA,MACL,mD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AAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IACC,OAAO,sBAAA,cAAC,MAAA,EAAK,MAAM,MAAM,IAAK;AAAA,IAC9B,MAAM;AAAA,IACN,WACG,sBAAA,cAAC,QAAA,EAAK,WAAU,kBACZ,sBAAA,cAAC,UAAA,EAAS,MAAM,UAAU,WAAU,gBAAA,CAAgB,CACxD,IACA;AAAA,EAAA;AAIZ,SAAO;AACX,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.cjs","sources":["../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport * as React from 'react';\n\nimport type { RadioGroupItemValue } from '../../RadioGroup/RadioGroup';\nimport { getRadioItemByValue } from '../../RadioGroup/util';\n\nimport { useItemStyling } from './Item';\n\ntype MenuRadioGroupContextType = {\n disabled?: boolean;\n value?: string;\n onChange?: (value: string) => void;\n};\n\n// Context for the radio group used to pass the disabled state to the radio group items\n// This is needed because context from RadioGroup component context was removed after migration to react-aria\n// TODO: remove this context once this component will be migrated to react-aria\nconst MenuRadioGroupContext = React.createContext<MenuRadioGroupContextType>({});\n\n// item\nexport type MenuRadioGroupItemProps<T = HTMLDivElement> = Omit<React.HTMLAttributes<T>, 'children' | 'onSelect'> & {\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\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const { children, disabled, value, ...otherProps } = props;\n const context = React.useContext(MenuRadioGroupContext);\n const isDisabled = context.disabled || disabled;\n\n const className = useItemStyling({\n disabled: isDisabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <MenuPrimitive.RadioItem {...otherProps} className={className} disabled={isDisabled} value={String(value ?? '')}>\n <MenuPrimitive.RadioItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current\" />\n </MenuPrimitive.RadioItemIndicator>\n {children}\n </MenuPrimitive.RadioItem>\n );\n};\n\n// group\nexport type MenuRadioGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n disabled?: boolean;\n /** Handler called when the value changes */\n onChange: (value: RadioGroupItemValue) => void;\n /** The current value (controlled) */\n value?: RadioGroupItemValue;\n};\n\nexport type ForwardedMenuRadioGroupWithStatics = React.ForwardRefExoticComponent<\n MenuRadioGroupProps & React.RefAttributes<HTMLElement>\n> & {\n Item: React.FunctionComponent<MenuRadioGroupItemProps>;\n};\n\nexport const RadioGroup = React.forwardRef<HTMLDivElement, MenuRadioGroupProps>(function MenuRadioItem(props, ref) {\n const values = React.useMemo<RadioGroupItemValue[]>(() => {\n const radioGroupItemValues: RadioGroupItemValue[] = [];\n\n React.Children.forEach(props.children, child => {\n if (React.isValidElement(child)) {\n radioGroupItemValues.push(child.props.value);\n }\n });\n\n return radioGroupItemValues;\n }, [props.children]);\n\n const handleChange = (value: string) => props.onChange(getRadioItemByValue(values, value));\n const value = String(props.value ?? '');\n\n return (\n <MenuRadioGroupContext.Provider value={{ disabled: props.disabled, value, onChange: handleChange }}>\n <MenuPrimitive.RadioGroup {...props} className=\"flex flex-col\" value={value} onValueChange={handleChange} ref={ref} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\n\nRadioGroup.Item = RadioItem;\n"],"names":["React","useItemStyling","MenuPrimitive","value","getRadioItemByValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,wBAAwBA,iBAAM,cAAyC,EAAE;AAYxE,MAAM,YAAY,CAAC,UAAmC;AACzD,QAAM,EAAE,UAAU,UAAU,OAAO,GAAG,eAAe;AACrD,QAAM,UAAUA,iBAAM,WAAW,qBAAqB;AACtD,QAAM,aAAa,QAAQ,YAAY;AAEvC,QAAM,YAAYC,KAAAA,eAAe;AAAA,IAC7B,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WAAW,MAAM;AAAA,EAAA,CACpB;AAED,SACID,iCAAA,cAACE,KAAAA,KAAc,WAAd,EAAyB,GAAG,YAAY,WAAsB,UAAU,YAAY,OAAO,OAAO,SAAS,EAAE,KAC1GF,iCAAA,cAACE,KAAAA,KAAc,oBAAd,EAAiC,WAAU,yBAAA,GACxCF,iCAAA,cAAC,QAAA,EAAK,WAAU,gDAAA,CAAgD,CACpE,GACC,QACL;AAER;AAiBO,MAAM,aAAaA,iBAAM,WAAgD,SAAS,cAAc,OAAO,KAAK;AAC/G,QAAM,SAASA,iBAAM,QAA+B,MAAM;AACtD,UAAM,uBAA8C,CAAA;AAEpDA,qBAAM,SAAS,QAAQ,MAAM,UAAU,CAAA,UAAS;AAC5C,UAAIA,iBAAM,eAAe,KAAK,GAAG;AAC7B,6BAAqB,KAAK,MAAM,MAAM,KAAK;AAAA,MAC/C;AAAA,IACJ,CAAC;AAED,WAAO;AAAA,EACX,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,QAAM,eAAe,CAACG,WAAkB,MAAM,SAASC,yBAAoB,QAAQD,MAAK,CAAC;AACzF,QAAM,QAAQ,OAAO,MAAM,SAAS,EAAE;AAEtC,SACIH,iCAAA,cAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,UAAU,MAAM,UAAU,OAAO,UAAU,aAAA,KAChFA,iCAAA,cAACE,KAAAA,KAAc,YAAd,EAA0B,GAAG,OAAO,WAAU,iBAAgB,OAAc,eAAe,cAAc,IAAA,CAAU,CACxH;AAER,CAAC;AAED,WAAW,OAAO;;;"}
1
+ {"version":3,"file":"RadioGroup.cjs","sources":["../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport * as React from 'react';\n\nimport type { RadioGroupItemValue } from '../../RadioGroup/RadioGroup';\nimport { getRadioItemByValue } from '../../RadioGroup/util';\n\nimport { useItemStyling } from './Item';\n\ntype MenuRadioGroupContextType = {\n disabled?: boolean;\n value?: string;\n onChange?: (value: string) => void;\n};\n\n// Context for the radio group used to pass the disabled state to the radio group items\n// This is needed because context from RadioGroup component context was removed after migration to react-aria\n// TODO: remove this context once this component will be migrated to react-aria\nconst MenuRadioGroupContext = React.createContext<MenuRadioGroupContextType>({});\n\n// item\nexport type MenuRadioGroupItemProps<T = HTMLDivElement> = Omit<React.HTMLAttributes<T>, 'children' | 'onSelect'> & {\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\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const { children, disabled, value, ...otherProps } = props;\n const context = React.useContext(MenuRadioGroupContext);\n const isDisabled = context.disabled || disabled;\n\n const className = useItemStyling({\n disabled: isDisabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <MenuPrimitive.RadioItem {...otherProps} className={className} disabled={isDisabled} value={String(value ?? '')}>\n <MenuPrimitive.RadioItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current\" />\n </MenuPrimitive.RadioItemIndicator>\n {children}\n </MenuPrimitive.RadioItem>\n );\n};\n\n// group\nexport type MenuRadioGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n disabled?: boolean;\n /** Handler called when the value changes */\n onChange: (value: RadioGroupItemValue) => void;\n /** The current value (controlled) */\n value?: RadioGroupItemValue;\n};\n\nexport type ForwardedMenuRadioGroupWithStatics = React.ForwardRefExoticComponent<\n MenuRadioGroupProps & React.RefAttributes<HTMLElement>\n> & {\n Item: React.FunctionComponent<MenuRadioGroupItemProps>;\n};\n\nexport const RadioGroup = React.forwardRef<HTMLDivElement, MenuRadioGroupProps>(function MenuRadioItem(props, ref) {\n const values = React.useMemo<RadioGroupItemValue[]>(() => {\n const radioGroupItemValues: RadioGroupItemValue[] = [];\n\n React.Children.forEach(props.children, child => {\n if (React.isValidElement<{ value: RadioGroupItemValue }>(child)) {\n radioGroupItemValues.push(child.props.value);\n }\n });\n\n return radioGroupItemValues;\n }, [props.children]);\n\n const handleChange = (value: string) => props.onChange(getRadioItemByValue(values, value));\n const value = String(props.value ?? '');\n\n return (\n <MenuRadioGroupContext.Provider value={{ disabled: props.disabled, value, onChange: handleChange }}>\n <MenuPrimitive.RadioGroup {...props} className=\"flex flex-col\" value={value} onValueChange={handleChange} ref={ref} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\n\nRadioGroup.Item = RadioItem;\n"],"names":["React","useItemStyling","MenuPrimitive","value","getRadioItemByValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,wBAAwBA,iBAAM,cAAyC,EAAE;AAYxE,MAAM,YAAY,CAAC,UAAmC;AACzD,QAAM,EAAE,UAAU,UAAU,OAAO,GAAG,eAAe;AACrD,QAAM,UAAUA,iBAAM,WAAW,qBAAqB;AACtD,QAAM,aAAa,QAAQ,YAAY;AAEvC,QAAM,YAAYC,KAAAA,eAAe;AAAA,IAC7B,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WAAW,MAAM;AAAA,EAAA,CACpB;AAED,SACID,iCAAA,cAACE,KAAAA,KAAc,WAAd,EAAyB,GAAG,YAAY,WAAsB,UAAU,YAAY,OAAO,OAAO,SAAS,EAAE,KAC1GF,iCAAA,cAACE,KAAAA,KAAc,oBAAd,EAAiC,WAAU,yBAAA,GACxCF,iCAAA,cAAC,QAAA,EAAK,WAAU,gDAAA,CAAgD,CACpE,GACC,QACL;AAER;AAiBO,MAAM,aAAaA,iBAAM,WAAgD,SAAS,cAAc,OAAO,KAAK;AAC/G,QAAM,SAASA,iBAAM,QAA+B,MAAM;AACtD,UAAM,uBAA8C,CAAA;AAEpDA,qBAAM,SAAS,QAAQ,MAAM,UAAU,CAAA,UAAS;AAC5C,UAAIA,iBAAM,eAA+C,KAAK,GAAG;AAC7D,6BAAqB,KAAK,MAAM,MAAM,KAAK;AAAA,MAC/C;AAAA,IACJ,CAAC;AAED,WAAO;AAAA,EACX,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,QAAM,eAAe,CAACG,WAAkB,MAAM,SAASC,yBAAoB,QAAQD,MAAK,CAAC;AACzF,QAAM,QAAQ,OAAO,MAAM,SAAS,EAAE;AAEtC,SACIH,iCAAA,cAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,UAAU,MAAM,UAAU,OAAO,UAAU,aAAA,KAChFA,iCAAA,cAACE,KAAAA,KAAc,YAAd,EAA0B,GAAG,OAAO,WAAU,iBAAgB,OAAc,eAAe,cAAc,IAAA,CAAU,CACxH;AAER,CAAC;AAED,WAAW,OAAO;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport * as React from 'react';\n\nimport type { RadioGroupItemValue } from '../../RadioGroup/RadioGroup';\nimport { getRadioItemByValue } from '../../RadioGroup/util';\n\nimport { useItemStyling } from './Item';\n\ntype MenuRadioGroupContextType = {\n disabled?: boolean;\n value?: string;\n onChange?: (value: string) => void;\n};\n\n// Context for the radio group used to pass the disabled state to the radio group items\n// This is needed because context from RadioGroup component context was removed after migration to react-aria\n// TODO: remove this context once this component will be migrated to react-aria\nconst MenuRadioGroupContext = React.createContext<MenuRadioGroupContextType>({});\n\n// item\nexport type MenuRadioGroupItemProps<T = HTMLDivElement> = Omit<React.HTMLAttributes<T>, 'children' | 'onSelect'> & {\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\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const { children, disabled, value, ...otherProps } = props;\n const context = React.useContext(MenuRadioGroupContext);\n const isDisabled = context.disabled || disabled;\n\n const className = useItemStyling({\n disabled: isDisabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <MenuPrimitive.RadioItem {...otherProps} className={className} disabled={isDisabled} value={String(value ?? '')}>\n <MenuPrimitive.RadioItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current\" />\n </MenuPrimitive.RadioItemIndicator>\n {children}\n </MenuPrimitive.RadioItem>\n );\n};\n\n// group\nexport type MenuRadioGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n disabled?: boolean;\n /** Handler called when the value changes */\n onChange: (value: RadioGroupItemValue) => void;\n /** The current value (controlled) */\n value?: RadioGroupItemValue;\n};\n\nexport type ForwardedMenuRadioGroupWithStatics = React.ForwardRefExoticComponent<\n MenuRadioGroupProps & React.RefAttributes<HTMLElement>\n> & {\n Item: React.FunctionComponent<MenuRadioGroupItemProps>;\n};\n\nexport const RadioGroup = React.forwardRef<HTMLDivElement, MenuRadioGroupProps>(function MenuRadioItem(props, ref) {\n const values = React.useMemo<RadioGroupItemValue[]>(() => {\n const radioGroupItemValues: RadioGroupItemValue[] = [];\n\n React.Children.forEach(props.children, child => {\n if (React.isValidElement(child)) {\n radioGroupItemValues.push(child.props.value);\n }\n });\n\n return radioGroupItemValues;\n }, [props.children]);\n\n const handleChange = (value: string) => props.onChange(getRadioItemByValue(values, value));\n const value = String(props.value ?? '');\n\n return (\n <MenuRadioGroupContext.Provider value={{ disabled: props.disabled, value, onChange: handleChange }}>\n <MenuPrimitive.RadioGroup {...props} className=\"flex flex-col\" value={value} onValueChange={handleChange} ref={ref} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\n\nRadioGroup.Item = RadioItem;\n"],"names":["MenuPrimitive","value"],"mappings":";;;;AAiBA,MAAM,wBAAwB,MAAM,cAAyC,EAAE;AAYxE,MAAM,YAAY,CAAC,UAAmC;AACzD,QAAM,EAAE,UAAU,UAAU,OAAO,GAAG,eAAe;AACrD,QAAM,UAAU,MAAM,WAAW,qBAAqB;AACtD,QAAM,aAAa,QAAQ,YAAY;AAEvC,QAAM,YAAY,eAAe;AAAA,IAC7B,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WAAW,MAAM;AAAA,EAAA,CACpB;AAED,SACI,sBAAA,cAACA,KAAc,WAAd,EAAyB,GAAG,YAAY,WAAsB,UAAU,YAAY,OAAO,OAAO,SAAS,EAAE,KAC1G,sBAAA,cAACA,KAAc,oBAAd,EAAiC,WAAU,yBAAA,GACxC,sBAAA,cAAC,QAAA,EAAK,WAAU,gDAAA,CAAgD,CACpE,GACC,QACL;AAER;AAiBO,MAAM,aAAa,MAAM,WAAgD,SAAS,cAAc,OAAO,KAAK;AAC/G,QAAM,SAAS,MAAM,QAA+B,MAAM;AACtD,UAAM,uBAA8C,CAAA;AAEpD,UAAM,SAAS,QAAQ,MAAM,UAAU,CAAA,UAAS;AAC5C,UAAI,MAAM,eAAe,KAAK,GAAG;AAC7B,6BAAqB,KAAK,MAAM,MAAM,KAAK;AAAA,MAC/C;AAAA,IACJ,CAAC;AAED,WAAO;AAAA,EACX,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,QAAM,eAAe,CAACC,WAAkB,MAAM,SAAS,oBAAoB,QAAQA,MAAK,CAAC;AACzF,QAAM,QAAQ,OAAO,MAAM,SAAS,EAAE;AAEtC,SACI,sBAAA,cAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,UAAU,MAAM,UAAU,OAAO,UAAU,aAAA,KAChF,sBAAA,cAACD,KAAc,YAAd,EAA0B,GAAG,OAAO,WAAU,iBAAgB,OAAc,eAAe,cAAc,IAAA,CAAU,CACxH;AAER,CAAC;AAED,WAAW,OAAO;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport * as React from 'react';\n\nimport type { RadioGroupItemValue } from '../../RadioGroup/RadioGroup';\nimport { getRadioItemByValue } from '../../RadioGroup/util';\n\nimport { useItemStyling } from './Item';\n\ntype MenuRadioGroupContextType = {\n disabled?: boolean;\n value?: string;\n onChange?: (value: string) => void;\n};\n\n// Context for the radio group used to pass the disabled state to the radio group items\n// This is needed because context from RadioGroup component context was removed after migration to react-aria\n// TODO: remove this context once this component will be migrated to react-aria\nconst MenuRadioGroupContext = React.createContext<MenuRadioGroupContextType>({});\n\n// item\nexport type MenuRadioGroupItemProps<T = HTMLDivElement> = Omit<React.HTMLAttributes<T>, 'children' | 'onSelect'> & {\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\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const { children, disabled, value, ...otherProps } = props;\n const context = React.useContext(MenuRadioGroupContext);\n const isDisabled = context.disabled || disabled;\n\n const className = useItemStyling({\n disabled: isDisabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <MenuPrimitive.RadioItem {...otherProps} className={className} disabled={isDisabled} value={String(value ?? '')}>\n <MenuPrimitive.RadioItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current\" />\n </MenuPrimitive.RadioItemIndicator>\n {children}\n </MenuPrimitive.RadioItem>\n );\n};\n\n// group\nexport type MenuRadioGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n disabled?: boolean;\n /** Handler called when the value changes */\n onChange: (value: RadioGroupItemValue) => void;\n /** The current value (controlled) */\n value?: RadioGroupItemValue;\n};\n\nexport type ForwardedMenuRadioGroupWithStatics = React.ForwardRefExoticComponent<\n MenuRadioGroupProps & React.RefAttributes<HTMLElement>\n> & {\n Item: React.FunctionComponent<MenuRadioGroupItemProps>;\n};\n\nexport const RadioGroup = React.forwardRef<HTMLDivElement, MenuRadioGroupProps>(function MenuRadioItem(props, ref) {\n const values = React.useMemo<RadioGroupItemValue[]>(() => {\n const radioGroupItemValues: RadioGroupItemValue[] = [];\n\n React.Children.forEach(props.children, child => {\n if (React.isValidElement<{ value: RadioGroupItemValue }>(child)) {\n radioGroupItemValues.push(child.props.value);\n }\n });\n\n return radioGroupItemValues;\n }, [props.children]);\n\n const handleChange = (value: string) => props.onChange(getRadioItemByValue(values, value));\n const value = String(props.value ?? '');\n\n return (\n <MenuRadioGroupContext.Provider value={{ disabled: props.disabled, value, onChange: handleChange }}>\n <MenuPrimitive.RadioGroup {...props} className=\"flex flex-col\" value={value} onValueChange={handleChange} ref={ref} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\n\nRadioGroup.Item = RadioItem;\n"],"names":["MenuPrimitive","value"],"mappings":";;;;AAiBA,MAAM,wBAAwB,MAAM,cAAyC,EAAE;AAYxE,MAAM,YAAY,CAAC,UAAmC;AACzD,QAAM,EAAE,UAAU,UAAU,OAAO,GAAG,eAAe;AACrD,QAAM,UAAU,MAAM,WAAW,qBAAqB;AACtD,QAAM,aAAa,QAAQ,YAAY;AAEvC,QAAM,YAAY,eAAe;AAAA,IAC7B,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WAAW,MAAM;AAAA,EAAA,CACpB;AAED,SACI,sBAAA,cAACA,KAAc,WAAd,EAAyB,GAAG,YAAY,WAAsB,UAAU,YAAY,OAAO,OAAO,SAAS,EAAE,KAC1G,sBAAA,cAACA,KAAc,oBAAd,EAAiC,WAAU,yBAAA,GACxC,sBAAA,cAAC,QAAA,EAAK,WAAU,gDAAA,CAAgD,CACpE,GACC,QACL;AAER;AAiBO,MAAM,aAAa,MAAM,WAAgD,SAAS,cAAc,OAAO,KAAK;AAC/G,QAAM,SAAS,MAAM,QAA+B,MAAM;AACtD,UAAM,uBAA8C,CAAA;AAEpD,UAAM,SAAS,QAAQ,MAAM,UAAU,CAAA,UAAS;AAC5C,UAAI,MAAM,eAA+C,KAAK,GAAG;AAC7D,6BAAqB,KAAK,MAAM,MAAM,KAAK;AAAA,MAC/C;AAAA,IACJ,CAAC;AAED,WAAO;AAAA,EACX,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,QAAM,eAAe,CAACC,WAAkB,MAAM,SAAS,oBAAoB,QAAQA,MAAK,CAAC;AACzF,QAAM,QAAQ,OAAO,MAAM,SAAS,EAAE;AAEtC,SACI,sBAAA,cAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,UAAU,MAAM,UAAU,OAAO,UAAU,aAAA,KAChF,sBAAA,cAACD,KAAc,YAAd,EAA0B,GAAG,OAAO,WAAU,iBAAgB,OAAc,eAAe,cAAc,IAAA,CAAU,CACxH;AAER,CAAC;AAED,WAAW,OAAO;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Group.cjs","sources":["../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 text-left font-bold leading-8 hover:bg-black-subtle focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} className=\"[[data-taco=navigation2]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}>\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} data-taco=\"navigation2-grouplist\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["Group","Icon"],"mappings":";;;;;AAWO,MAAM,QAAQ,MAAM,WAAiD,SAASA,OAAM,OAAO,KAAK;AACnG,QAAM,EAAE,UAAU,kBAAkB,OAAO,SAAS,SAAS,GAAG,eAAe;AAC/E,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,SAAS,eAAe;AAC9D,QAAM,YAAY;AAAA,IACd;AAAA,IACA,WAAW;AAAA,EAAA;AAGf,QAAM,cAAc,CAAC,UAA+C;AAChE,gBAAY,CAAC,QAAQ;AAErB,QAAI,SAAS;AACT,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,6CACK,MAAA,EAAI,GAAG,YAAY,WAAU,oCAAmC,OAC7D,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,iBAAc;AAAA,MACd,iBAAe;AAAA,MACf,aAAU;AAAA,MACV;AAAA,MACA,SAAS;AAAA,IAAA;AAAA,wCACRC,KAAAA,MAAA,EAAK,WAAU,mBAAkB,MAAM,WAAW,uBAAuB,uBAAuB;AAAA,IACjG,sBAAA,cAAC,QAAA,EAAK,WAAU,qBAAA,GAAsB,OAAQ;AAAA,EAAA,GAElD,sBAAA,cAAC,MAAA,EAAG,WAAW,GAAG,qCAAqC,EAAE,QAAQ,CAAC,UAAU,GAAG,aAAU,wBAAA,GACpF,QACL,CACJ;AAER,CAAC;;"}
1
+ {"version":3,"file":"Group.cjs","sources":["../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | React.JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 text-left font-bold leading-8 hover:bg-black-subtle focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} className=\"[[data-taco=navigation2]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}>\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} data-taco=\"navigation2-grouplist\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["Group","Icon"],"mappings":";;;;;AAWO,MAAM,QAAQ,MAAM,WAAiD,SAASA,OAAM,OAAO,KAAK;AACnG,QAAM,EAAE,UAAU,kBAAkB,OAAO,SAAS,SAAS,GAAG,eAAe;AAC/E,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,SAAS,eAAe;AAC9D,QAAM,YAAY;AAAA,IACd;AAAA,IACA,WAAW;AAAA,EAAA;AAGf,QAAM,cAAc,CAAC,UAA+C;AAChE,gBAAY,CAAC,QAAQ;AAErB,QAAI,SAAS;AACT,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,6CACK,MAAA,EAAI,GAAG,YAAY,WAAU,oCAAmC,OAC7D,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,iBAAc;AAAA,MACd,iBAAe;AAAA,MACf,aAAU;AAAA,MACV;AAAA,MACA,SAAS;AAAA,IAAA;AAAA,wCACRC,KAAAA,MAAA,EAAK,WAAU,mBAAkB,MAAM,WAAW,uBAAuB,uBAAuB;AAAA,IACjG,sBAAA,cAAC,QAAA,EAAK,WAAU,qBAAA,GAAsB,OAAQ;AAAA,EAAA,GAElD,sBAAA,cAAC,MAAA,EAAG,WAAW,GAAG,qCAAqC,EAAE,QAAQ,CAAC,UAAU,GAAG,aAAU,wBAAA,GACpF,QACL,CACJ;AAER,CAAC;;"}
@@ -1,11 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  export type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {
3
3
  defaultExpanded?: boolean;
4
- heading: string | JSX.Element;
4
+ heading: string | React.JSX.Element;
5
5
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  };
7
7
  export declare const Group: React.ForwardRefExoticComponent<Omit<React.LiHTMLAttributes<HTMLLIElement>, "onClick"> & {
8
8
  defaultExpanded?: boolean;
9
- heading: string | JSX.Element;
9
+ heading: string | React.JSX.Element;
10
10
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
11
  } & React.RefAttributes<HTMLLIElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Group.js","sources":["../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 text-left font-bold leading-8 hover:bg-black-subtle focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} className=\"[[data-taco=navigation2]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}>\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} data-taco=\"navigation2-grouplist\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["React","Group"],"mappings":";;;AAWO,MAAM,QAAQA,eAAM,WAAiD,SAASC,OAAM,OAAO,KAAK;AACnG,QAAM,EAAE,UAAU,kBAAkB,OAAO,SAAS,SAAS,GAAG,eAAe;AAC/E,QAAM,CAAC,UAAU,WAAW,IAAID,eAAM,SAAS,eAAe;AAC9D,QAAM,YAAY;AAAA,IACd;AAAA,IACA,WAAW;AAAA,EAAA;AAGf,QAAM,cAAc,CAAC,UAA+C;AAChE,gBAAY,CAAC,QAAQ;AAErB,QAAI,SAAS;AACT,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,sDACK,MAAA,EAAI,GAAG,YAAY,WAAU,oCAAmC,OAC7DA,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,iBAAc;AAAA,MACd,iBAAe;AAAA,MACf,aAAU;AAAA,MACV;AAAA,MACA,SAAS;AAAA,IAAA;AAAA,iDACR,MAAA,EAAK,WAAU,mBAAkB,MAAM,WAAW,uBAAuB,uBAAuB;AAAA,IACjGA,+BAAA,cAAC,QAAA,EAAK,WAAU,qBAAA,GAAsB,OAAQ;AAAA,EAAA,GAElDA,+BAAA,cAAC,MAAA,EAAG,WAAW,GAAG,qCAAqC,EAAE,QAAQ,CAAC,UAAU,GAAG,aAAU,wBAAA,GACpF,QACL,CACJ;AAER,CAAC;"}
1
+ {"version":3,"file":"Group.js","sources":["../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | React.JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 text-left font-bold leading-8 hover:bg-black-subtle focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} className=\"[[data-taco=navigation2]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}>\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} data-taco=\"navigation2-grouplist\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["React","Group"],"mappings":";;;AAWO,MAAM,QAAQA,eAAM,WAAiD,SAASC,OAAM,OAAO,KAAK;AACnG,QAAM,EAAE,UAAU,kBAAkB,OAAO,SAAS,SAAS,GAAG,eAAe;AAC/E,QAAM,CAAC,UAAU,WAAW,IAAID,eAAM,SAAS,eAAe;AAC9D,QAAM,YAAY;AAAA,IACd;AAAA,IACA,WAAW;AAAA,EAAA;AAGf,QAAM,cAAc,CAAC,UAA+C;AAChE,gBAAY,CAAC,QAAQ;AAErB,QAAI,SAAS;AACT,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,sDACK,MAAA,EAAI,GAAG,YAAY,WAAU,oCAAmC,OAC7DA,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,iBAAc;AAAA,MACd,iBAAe;AAAA,MACf,aAAU;AAAA,MACV;AAAA,MACA,SAAS;AAAA,IAAA;AAAA,iDACR,MAAA,EAAK,WAAU,mBAAkB,MAAM,WAAW,uBAAuB,uBAAuB;AAAA,IACjGA,+BAAA,cAAC,QAAA,EAAK,WAAU,qBAAA,GAAsB,OAAQ;AAAA,EAAA,GAElDA,+BAAA,cAAC,MAAA,EAAG,WAAW,GAAG,qCAAqC,EAAE,QAAQ,CAAC,UAAU,GAAG,aAAU,wBAAA,GACpF,QACL,CACJ;AAER,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Link.cjs","sources":["../../../../src/components/Navigation2/components/Link.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useDropTarget } from '../../../utils/hooks/useDropTarget';\nimport { Badge } from '../../Badge/Badge';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon } from '../../Icon/Icon';\nimport { LegacyIconButton } from '../../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../../Menu/Menu';\n\nimport { getAdjacentClasses } from './util';\n\nexport const getNavigationLinkClasses = (isDraggedOver = false) =>\n cn(\n 'group relative flex w-full items-center rounded px-2 leading-8 !text-black focus-visible:yt-focus-dark',\n // override styles for links that are children of collapsible menus\n 'font-bold [[data-taco=navigation2-grouplist]>li>&]:pl-5 [[data-taco=navigation2-grouplist]>li>&]:font-normal',\n // override styles to adjust icons included in menu links\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n // override styles to adjust badges included in menu links\n '[&>span_[data-taco=\"badge\"]]:mr-2.5 [[data-taco=navigation2-grouplist]>li>&>span_[data-taco=\"badge\"]]:mr-2',\n {\n 'hover:bg-black-subtle aria-current-page:bg-blue-500/[.1]': !isDraggedOver,\n '!bg-blue-500 !text-white [&>*]:!text-white': isDraggedOver,\n }\n );\n\nexport type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n active?: boolean;\n icon?: IconName;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /** Handler to be used when dropping a dragged element over the Navigation2 link */\n onDrop?: React.DragEventHandler;\n /** Total shown inside a Badge component */\n total?: number;\n};\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Navigation2LinkProps>(function Link(props, ref) {\n const { active, children, icon, menu, onDrop, total, ...attributes } = props;\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n\n const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);\n\n const listClassName = cn('border-gray-100 [[data-taco=navigation2]>&]:px-3', getAdjacentClasses(), {\n '[&>*]:pointer-events-none': isDraggedOver,\n });\n\n return (\n <li {...dropTargetProps} className={listClassName} data-taco=\"navigation2-link-item\">\n <a\n {...attributes}\n aria-current={active ? 'page' : undefined}\n className={className}\n data-taco=\"navigation2-link\"\n ref={ref}\n tabIndex={0}>\n {icon ? (\n <Icon\n className=\"mr-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:-ml-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:mr-0.5\"\n name={icon}\n />\n ) : null}\n <span className=\"flex flex-grow items-center truncate\">{children}</span>\n {menu ? (\n <LegacyIconButton\n appearance=\"discrete\"\n icon=\"more\"\n aria-label=\"More\"\n rounded\n className={cn(\n '-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex',\n {\n 'absolute right-0 !mr-0.5': total !== undefined,\n }\n )}\n menu={menu}\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n ) : null}\n {total === undefined ? null : (\n <Badge\n className={cn('flex-shrink-0 flex-grow-0 !font-normal', {\n 'group-hover:hidden [[aria-expanded=\"true\"]+&]:hidden': menu,\n })}\n color=\"transparent\">\n {total}\n </Badge>\n )}\n </a>\n </li>\n );\n});\n"],"names":["Link","useDropTarget","getAdjacentClasses","Icon","LegacyIconButton","Badge"],"mappings":";;;;;;;;;AAYO,MAAM,2BAA2B,CAAC,gBAAgB,UACrD;AAAA,EACI;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,IACI,4DAA4D,CAAC;AAAA,IAC7D,8CAA8C;AAAA,EAAA;AAEtD;AAaG,MAAM,OAAO,MAAM,WAAoD,SAASA,MAAK,OAAO,KAAK;AACpG,QAAM,EAAE,QAAQ,UAAU,MAAM,MAAM,QAAQ,OAAO,GAAG,WAAA,IAAe;AACvE,QAAM,CAAC,eAAe,eAAe,IAAIC,cAAAA,cAAc,MAAM;AAE7D,QAAM,YAAY,GAAG,yBAAyB,aAAa,GAAG,WAAW,SAAS;AAElF,QAAM,gBAAgB,GAAG,oDAAoDC,KAAAA,mBAAA,GAAsB;AAAA,IAC/F,6BAA6B;AAAA,EAAA,CAChC;AAED,6CACK,MAAA,EAAI,GAAG,iBAAiB,WAAW,eAAe,aAAU,wBAAA,GACzD,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,gBAAc,SAAS,SAAS;AAAA,MAChC;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,IACT,OACG,sBAAA;AAAA,MAACC,KAAAA;AAAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,MAAM;AAAA,MAAA;AAAA,IAAA,IAEV;AAAA,IACJ,sBAAA,cAAC,QAAA,EAAK,WAAU,uCAAA,GAAwC,QAAS;AAAA,IAChE,OACG,sBAAA;AAAA,MAACC,WAAAA;AAAAA,MAAA;AAAA,QACG,YAAW;AAAA,QACX,MAAK;AAAA,QACL,cAAW;AAAA,QACX,SAAO;AAAA,QACP,WAAW;AAAA,UACP;AAAA,UACA;AAAA,YACI,4BAA4B,UAAU;AAAA,UAAA;AAAA,QAC1C;AAAA,QAEJ;AAAA,QACA,SAAS,CAAA,UAAS;AACd,gBAAM,eAAA;AACN,gBAAM,gBAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAAA,IAEJ;AAAA,IACH,UAAU,SAAY,OACnB,sBAAA;AAAA,MAACC,MAAAA;AAAAA,MAAA;AAAA,QACG,WAAW,GAAG,0CAA0C;AAAA,UACpD,wDAAwD;AAAA,QAAA,CAC3D;AAAA,QACD,OAAM;AAAA,MAAA;AAAA,MACL;AAAA,IAAA;AAAA,EACL,CAGZ;AAER,CAAC;;;"}
1
+ {"version":3,"file":"Link.cjs","sources":["../../../../src/components/Navigation2/components/Link.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useDropTarget } from '../../../utils/hooks/useDropTarget';\nimport { Badge } from '../../Badge/Badge';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon } from '../../Icon/Icon';\nimport { LegacyIconButton } from '../../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../../Menu/Menu';\n\nimport { getAdjacentClasses } from './util';\n\nexport const getNavigationLinkClasses = (isDraggedOver = false) =>\n cn(\n 'group relative flex w-full items-center rounded px-2 leading-8 !text-black focus-visible:yt-focus-dark',\n // override styles for links that are children of collapsible menus\n 'font-bold [[data-taco=navigation2-grouplist]>li>&]:pl-5 [[data-taco=navigation2-grouplist]>li>&]:font-normal',\n // override styles to adjust icons included in menu links\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n // override styles to adjust badges included in menu links\n '[&>span_[data-taco=\"badge\"]]:mr-2.5 [[data-taco=navigation2-grouplist]>li>&>span_[data-taco=\"badge\"]]:mr-2',\n {\n 'hover:bg-black-subtle aria-current-page:bg-blue-500/[.1]': !isDraggedOver,\n '!bg-blue-500 !text-white [&>*]:!text-white': isDraggedOver,\n }\n );\n\nexport type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n active?: boolean;\n icon?: IconName;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => React.JSX.Element;\n /** Handler to be used when dropping a dragged element over the Navigation2 link */\n onDrop?: React.DragEventHandler;\n /** Total shown inside a Badge component */\n total?: number;\n};\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Navigation2LinkProps>(function Link(props, ref) {\n const { active, children, icon, menu, onDrop, total, ...attributes } = props;\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n\n const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);\n\n const listClassName = cn('border-gray-100 [[data-taco=navigation2]>&]:px-3', getAdjacentClasses(), {\n '[&>*]:pointer-events-none': isDraggedOver,\n });\n\n return (\n <li {...dropTargetProps} className={listClassName} data-taco=\"navigation2-link-item\">\n <a\n {...attributes}\n aria-current={active ? 'page' : undefined}\n className={className}\n data-taco=\"navigation2-link\"\n ref={ref}\n tabIndex={0}>\n {icon ? (\n <Icon\n className=\"mr-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:-ml-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:mr-0.5\"\n name={icon}\n />\n ) : null}\n <span className=\"flex flex-grow items-center truncate\">{children}</span>\n {menu ? (\n <LegacyIconButton\n appearance=\"discrete\"\n icon=\"more\"\n aria-label=\"More\"\n rounded\n className={cn(\n '-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex',\n {\n 'absolute right-0 !mr-0.5': total !== undefined,\n }\n )}\n menu={menu}\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n ) : null}\n {total === undefined ? null : (\n <Badge\n className={cn('flex-shrink-0 flex-grow-0 !font-normal', {\n 'group-hover:hidden [[aria-expanded=\"true\"]+&]:hidden': menu,\n })}\n color=\"transparent\">\n {total}\n </Badge>\n )}\n </a>\n </li>\n );\n});\n"],"names":["Link","useDropTarget","getAdjacentClasses","Icon","Legac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gBAAM,gBAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAAA,IAEJ;AAAA,IACH,UAAU,SAAY,OACnB,sBAAA;AAAA,MAACC,MAAAA;AAAAA,MAAA;AAAA,QACG,WAAW,GAAG,0CAA0C;AAAA,UACpD,wDAAwD;AAAA,QAAA,CAC3D;AAAA,QACD,OAAM;AAAA,MAAA;AAAA,MACL;AAAA,IAAA;AAAA,EACL,CAGZ;AAER,CAAC;;;"}
@@ -6,7 +6,7 @@ export type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement>
6
6
  active?: boolean;
7
7
  icon?: IconName;
8
8
  /** Menu component associated with the button. */
9
- menu?: (props: Partial<MenuProps>) => JSX.Element;
9
+ menu?: (props: Partial<MenuProps>) => React.JSX.Element;
10
10
  /** Handler to be used when dropping a dragged element over the Navigation2 link */
11
11
  onDrop?: React.DragEventHandler;
12
12
  /** Total shown inside a Badge component */
@@ -16,7 +16,7 @@ export declare const Link: React.ForwardRefExoticComponent<React.AnchorHTMLAttri
16
16
  active?: boolean;
17
17
  icon?: IconName;
18
18
  /** Menu component associated with the button. */
19
- menu?: (props: Partial<MenuProps>) => JSX.Element;
19
+ menu?: (props: Partial<MenuProps>) => React.JSX.Element;
20
20
  /** Handler to be used when dropping a dragged element over the Navigation2 link */
21
21
  onDrop?: React.DragEventHandler;
22
22
  /** Total shown inside a Badge component */
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../../src/components/Navigation2/components/Link.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useDropTarget } from '../../../utils/hooks/useDropTarget';\nimport { Badge } from '../../Badge/Badge';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon } from '../../Icon/Icon';\nimport { LegacyIconButton } from '../../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../../Menu/Menu';\n\nimport { getAdjacentClasses } from './util';\n\nexport const getNavigationLinkClasses = (isDraggedOver = false) =>\n cn(\n 'group relative flex w-full items-center rounded px-2 leading-8 !text-black focus-visible:yt-focus-dark',\n // override styles for links that are children of collapsible menus\n 'font-bold [[data-taco=navigation2-grouplist]>li>&]:pl-5 [[data-taco=navigation2-grouplist]>li>&]:font-normal',\n // override styles to adjust icons included in menu links\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n // override styles to adjust badges included in menu links\n '[&>span_[data-taco=\"badge\"]]:mr-2.5 [[data-taco=navigation2-grouplist]>li>&>span_[data-taco=\"badge\"]]:mr-2',\n {\n 'hover:bg-black-subtle aria-current-page:bg-blue-500/[.1]': !isDraggedOver,\n '!bg-blue-500 !text-white [&>*]:!text-white': isDraggedOver,\n }\n );\n\nexport type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n active?: boolean;\n icon?: IconName;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /** Handler to be used when dropping a dragged element over the Navigation2 link */\n onDrop?: React.DragEventHandler;\n /** Total shown inside a Badge component */\n total?: number;\n};\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Navigation2LinkProps>(function Link(props, ref) {\n const { active, children, icon, menu, onDrop, total, ...attributes } = props;\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n\n const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);\n\n const listClassName = cn('border-gray-100 [[data-taco=navigation2]>&]:px-3', getAdjacentClasses(), {\n '[&>*]:pointer-events-none': isDraggedOver,\n });\n\n return (\n <li {...dropTargetProps} className={listClassName} data-taco=\"navigation2-link-item\">\n <a\n {...attributes}\n aria-current={active ? 'page' : undefined}\n className={className}\n data-taco=\"navigation2-link\"\n ref={ref}\n tabIndex={0}>\n {icon ? (\n <Icon\n className=\"mr-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:-ml-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:mr-0.5\"\n name={icon}\n />\n ) : null}\n <span className=\"flex flex-grow items-center truncate\">{children}</span>\n {menu ? (\n <LegacyIconButton\n appearance=\"discrete\"\n icon=\"more\"\n aria-label=\"More\"\n rounded\n className={cn(\n '-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex',\n {\n 'absolute right-0 !mr-0.5': total !== undefined,\n }\n )}\n menu={menu}\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n ) : null}\n {total === undefined ? null : (\n <Badge\n className={cn('flex-shrink-0 flex-grow-0 !font-normal', {\n 'group-hover:hidden [[aria-expanded=\"true\"]+&]:hidden': menu,\n })}\n color=\"transparent\">\n {total}\n </Badge>\n )}\n </a>\n </li>\n );\n});\n"],"names":["React","Link"],"mappings":";;;;;;;AAYO,MAAM,2BAA2B,CAAC,gBAAgB,UACrD;AAAA,EACI;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,IACI,4DAA4D,CAAC;AAAA,IAC7D,8CAA8C;AAAA,EAAA;AAEtD;AAaG,MAAM,OAAOA,eAAM,WAAoD,SAASC,MAAK,OAAO,KAAK;AACpG,QAAM,EAAE,QAAQ,UAAU,MAAM,MAAM,QAAQ,OAAO,GAAG,WAAA,IAAe;AACvE,QAAM,CAAC,eAAe,eAAe,IAAI,cAAc,MAAM;AAE7D,QAAM,YAAY,GAAG,yBAAyB,aAAa,GAAG,WAAW,SAAS;AAElF,QAAM,gBAAgB,GAAG,oDAAoD,mBAAA,GAAsB;AAAA,IAC/F,6BAA6B;AAAA,EAAA,CAChC;AAED,sDACK,MAAA,EAAI,GAAG,iBAAiB,WAAW,eAAe,aAAU,wBAAA,GACzDD,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,gBAAc,SAAS,SAAS;AAAA,MAChC;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,IACT,OACGA,+BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,MAAM;AAAA,MAAA;AAAA,IAAA,IAEV;AAAA,IACJA,+BAAA,cAAC,QAAA,EAAK,WAAU,uCAAA,GAAwC,QAAS;AAAA,IAChE,OACGA,+BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,YAAW;AAAA,QACX,MAAK;AAAA,QACL,cAAW;AAAA,QACX,SAAO;AAAA,QACP,WAAW;AAAA,UACP;AAAA,UACA;AAAA,YACI,4BAA4B,UAAU;AAAA,UAAA;AAAA,QAC1C;AAAA,QAEJ;AAAA,QACA,SAAS,CAAA,UAAS;AACd,gBAAM,eAAA;AACN,gBAAM,gBAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAAA,IAEJ;AAAA,IACH,UAAU,SAAY,OACnBA,+BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAW,GAAG,0CAA0C;AAAA,UACpD,wDAAwD;AAAA,QAAA,CAC3D;AAAA,QACD,OAAM;AAAA,MAAA;AAAA,MACL;AAAA,IAAA;AAAA,EACL,CAGZ;AAER,CAAC;"}
1
+ {"version":3,"file":"Link.js","sources":["../../../../src/components/Navigation2/components/Link.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useDropTarget } from '../../../utils/hooks/useDropTarget';\nimport { Badge } from '../../Badge/Badge';\nimport type { IconName } from '../../Icon/Icon';\nimport { Icon } from '../../Icon/Icon';\nimport { LegacyIconButton } from '../../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../../Menu/Menu';\n\nimport { getAdjacentClasses } from './util';\n\nexport const getNavigationLinkClasses = (isDraggedOver = false) =>\n cn(\n 'group relative flex w-full items-center rounded px-2 leading-8 !text-black focus-visible:yt-focus-dark',\n // override styles for links that are children of collapsible menus\n 'font-bold [[data-taco=navigation2-grouplist]>li>&]:pl-5 [[data-taco=navigation2-grouplist]>li>&]:font-normal',\n // override styles to adjust icons included in menu links\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n // override styles to adjust badges included in menu links\n '[&>span_[data-taco=\"badge\"]]:mr-2.5 [[data-taco=navigation2-grouplist]>li>&>span_[data-taco=\"badge\"]]:mr-2',\n {\n 'hover:bg-black-subtle aria-current-page:bg-blue-500/[.1]': !isDraggedOver,\n '!bg-blue-500 !text-white [&>*]:!text-white': isDraggedOver,\n }\n );\n\nexport type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n active?: boolean;\n icon?: IconName;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => React.JSX.Element;\n /** Handler to be used when dropping a dragged element over the Navigation2 link */\n onDrop?: React.DragEventHandler;\n /** Total shown inside a Badge component */\n total?: number;\n};\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Navigation2LinkProps>(function Link(props, ref) {\n const { active, children, icon, menu, onDrop, total, ...attributes } = props;\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n\n const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);\n\n const listClassName = cn('border-gray-100 [[data-taco=navigation2]>&]:px-3', getAdjacentClasses(), {\n '[&>*]:pointer-events-none': isDraggedOver,\n });\n\n return (\n <li {...dropTargetProps} className={listClassName} data-taco=\"navigation2-link-item\">\n <a\n {...attributes}\n aria-current={active ? 'page' : undefined}\n className={className}\n data-taco=\"navigation2-link\"\n ref={ref}\n tabIndex={0}>\n {icon ? (\n <Icon\n className=\"mr-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:-ml-1.5 [[data-taco=navigation2-grouplist]>li>a>&]:mr-0.5\"\n name={icon}\n />\n ) : null}\n <span className=\"flex flex-grow items-center truncate\">{children}</span>\n {menu ? (\n <LegacyIconButton\n appearance=\"discrete\"\n icon=\"more\"\n aria-label=\"More\"\n rounded\n className={cn(\n '-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex',\n {\n 'absolute right-0 !mr-0.5': total !== undefined,\n }\n )}\n menu={menu}\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n ) : null}\n {total === undefined ? null : (\n <Badge\n className={cn('flex-shrink-0 flex-grow-0 !font-normal', {\n 'group-hover:hidden [[aria-expanded=\"true\"]+&]:hidden': menu,\n })}\n color=\"transparent\">\n {total}\n </Badge>\n )}\n </a>\n </li>\n );\n});\n"],"names":["React","Link"],"mappings":";;;;;;;AAYO,MAAM,2BAA2B,CAAC,gBAAgB,UACrD;AAAA,EACI;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,IACI,4DAA4D,CAAC;AAAA,IAC7D,8CAA8C;AAAA,EAAA;AAEtD;AAaG,MAAM,OAAOA,eAAM,WAAoD,SAASC,MAAK,OAAO,KAAK;AACpG,QAAM,EAAE,QAAQ,UAAU,MAAM,MAAM,QAAQ,OAAO,GAAG,WAAA,IAAe;AACvE,QAAM,CAAC,eAAe,eAAe,IAAI,cAAc,MAAM;AAE7D,QAAM,YAAY,GAAG,yBAAyB,aAAa,GAAG,WAAW,SAAS;AAElF,QAAM,gBAAgB,GAAG,oDAAoD,mBAAA,GAAsB;AAAA,IAC/F,6BAA6B;AAAA,EAAA,CAChC;AAED,sDACK,MAAA,EAAI,GAAG,iBAAiB,WAAW,eAAe,aAAU,wBAAA,GACzDD,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,gBAAc,SAAS,SAAS;AAAA,MAChC;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,IACT,OACGA,+BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,MAAM;AAAA,MAAA;AAAA,IAAA,IAEV;AAAA,IACJA,+BAAA,cAAC,QAAA,EAAK,WAAU,uCAAA,GAAwC,QAAS;AAAA,IAChE,OACGA,+BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,YAAW;AAAA,QACX,MAAK;AAAA,QACL,cAAW;AAAA,QACX,SAAO;AAAA,QACP,WAAW;AAAA,UACP;AAAA,UACA;AAAA,YACI,4BAA4B,UAAU;AAAA,UAAA;AAAA,QAC1C;AAAA,QAEJ;AAAA,QACA,SAAS,CAAA,UAAS;AACd,gBAAM,eAAA;AACN,gBAAM,gBAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAAA,IAEJ;AAAA,IACH,UAAU,SAAY,OACnBA,+BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAW,GAAG,0CAA0C;AAAA,UACpD,wDAAwD;AAAA,QAAA,CAC3D;AAAA,QACD,OAAM;AAAA,MAAA;AAAA,MACL;AAAA,IAAA;AAAA,EACL,CAGZ;AAER,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowGroup.cjs","sources":["../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport type { LegacyButtonProps } from '../LegacyComponents/Button/Button';\nimport { LegacyIconButton } from '../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../Menu/Menu';\nimport { Menu } from '../Menu/Menu';\nimport { useLocalization } from '../Provider/Localization';\n\nconst sanitizeButtonPropsForMenuItem = (button: JSX.Element, index: number) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: (moreButtonText: string) => React.ReactElement<LegacyButtonProps>;\n wrapChild?: true | undefined;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton, wrapChild, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const { texts } = useLocalization();\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<LegacyButtonProps>[];\n const hiddenChildren = intersectedChildIndex === undefined ? [] : children.slice(intersectedChildIndex);\n const hiddenChildrenCount = hiddenChildren.length;\n const moreButtonText = hiddenChildrenCount ? `${hiddenChildrenCount} ${texts.header.more}` : '';\n\n const MoreButton = moreButton?.(moreButtonText) ?? <LegacyIconButton icon=\"more\" />;\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'pointer-events-none invisible order-[100]':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(MoreButton, {\n className: cn('sticky right-0 order-[99]', MoreButton.props.className),\n 'data-observer-ignore': true,\n menu: (menuProps: MenuProps) => (\n <Menu {...menuProps}>\n <Menu.Content>\n {hiddenChildren.map((child, index) =>\n wrapChild ? (\n <Menu.Item key={index}>{child}</Menu.Item>\n ) : (\n sanitizeButtonPropsForMenuItem(child, index)\n )\n )}\n </Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n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K,SAAS,MAAM,qBAAqB;AACtG,QAAM,sBAAsB,eAAe;AAC3C,QAAM,iBAAiB,sBAAsB,GAAG,mBAAmB,IAAI,MAAM,OAAO,IAAI,KAAK;AAE7F,QAAM,aAAa,aAAa,cAAc,KAAK,sBAAA,cAACC,6BAAA,EAAiB,MAAK,QAAO;AAEjF,QAAM,YAAY,GAAG,wBAAwB,MAAM,SAAS;AAE5D,SACI,sBAAA,cAAC,SAAK,GAAG,YAAY,WAAsB,aAAU,kBAAiB,KAAK,YAAA,GACtE,SAAS;AAAA,IAAI,CAAC,OAAO,UAClB,MAAM,aAAa,OAAO;AAAA,MACtB,WAAW,GAAG,MAAM,MAAM,WAAW;AAAA,QACjC,SAAS,0BAA0B,UAAa,QAAQ;AAAA,QACxD,6CACI,0BAA0B,UAAa,SAAS;AAAA,MAAA,CACvD;AAAA,IAAA,CACJ;AAAA,EAAA,GAEJ,eAAe,SACV,MAAM,aAAa,YAAY;AAAA,IAC3B,WAAW,GAAG,6BAA6B,WAAW,MAAM,SAAS;AAAA,IACrE,wBAAwB;AAAA,IACxB,MAAM,CAAC,cACH,sBAAA,cAACL,KAAAA,MAAA,EAAM,GAAG,UAAA,GACN,sBAAA,cAACA,KAAAA,KAAK,SAAL,MACI,eAAe;AAAA,MAAI,CAAC,OAAO,UACxB,gDACKA,KAAAA,KAAK,MAAL,EAAU,KAAK,MAAA,GAAQ,KAAM,IAE9B,+BAA+B,OAAO,KAAK;AAAA,IAAA,CAGvD,CACJ;AAAA,IAEJ,KAAK;AAAA,EAAA,CACR,IACD,IACV;AAER,CAAC;;"}
1
+ {"version":3,"file":"OverflowGroup.cjs","sources":["../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport type { LegacyButtonProps } from '../LegacyComponents/Button/Button';\nimport { LegacyIconButton } from '../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../Menu/Menu';\nimport { Menu } from '../Menu/Menu';\nimport { useLocalization } from '../Provider/Localization';\n\nconst sanitizeButtonPropsForMenuItem = (button: React.JSX.Element, index: number) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: (moreButtonText: string) => React.ReactElement<LegacyButtonProps>;\n wrapChild?: true | undefined;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton, wrapChild, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const { texts } = useLocalization();\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<LegacyButtonProps>[];\n const hiddenChildren = intersectedChildIndex === undefined ? [] : children.slice(intersectedChildIndex);\n const hiddenChildrenCount = hiddenChildren.length;\n const moreButtonText = hiddenChildrenCount ? `${hiddenChildrenCount} ${texts.header.more}` : '';\n\n const MoreButton = moreButton?.(moreButtonText) ?? <LegacyIconButton icon=\"more\" />;\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'pointer-events-none invisible order-[100]':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(MoreButton, {\n className: cn('sticky right-0 order-[99]', MoreButton.props.className),\n 'data-observer-ignore': true,\n menu: (menuProps: MenuProps) => (\n <Menu {...menuProps}>\n <Menu.Content>\n {hiddenChildren.map((child, index) =>\n wrapChild ? (\n <Menu.Item key={index}>{child}</Menu.Item>\n ) : (\n sanitizeButtonPropsForMenuItem(child, index)\n )\n )}\n </Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n </div>\n );\n});\n"],"names":["Menu","OverflowGroup","useMergedRef","useLocalization","useIntersectionObserver","LegacyIconButton"],"mappings":";;;;;;;;;AAWA,MAAM,iCAAiC,CAAC,QAA2B,UAAkB;AACjF,QAAM,OAA2B,OAAO,MAAM,MAAM,OAAO,MAAM;AACjE,QAAM,MAAM,OAAOA,KAAAA,KAAK,OAAOA,KAAAA,KAAK;AAGpC,QAAM;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,GAAG;AAAA,EAAA,IACH,OAAO;AAEX,QAAM,QAAQ;AAAA,IACV,GAAG;AAAA,IACH,KAAK;AAAA,IACL,QAAQ,OAAQ,KAAK,WAAW,MAAM,IAAI,WAAW,UAAW;AAAA,EAAA;AAGpE,MAAI,IAAI;AACJ,WAAO,MAAM,aAAa,QAAQ,EAAE,IAAI,KAAK,GAAG,OAAO;AAAA,EAC3D;AAEA,SAAO,sBAAA,cAAC,KAAA,EAAK,GAAG,MAAA,CAA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AAM,GAAG,UAAA,GACN,sBAAA,cAACA,KAAAA,KAAK,SAAL,MACI,eAAe;AAAA,MAAI,CAAC,OAAO,UACxB,gDACKA,KAAAA,KAAK,MAAL,EAAU,KAAK,MAAA,GAAQ,KAAM,IAE9B,+BAA+B,OAAO,KAAK;AAAA,IAAA,CAGvD,CACJ;AAAA,IAEJ,KAAK;AAAA,EAAA,CACR,IACD,IACV;AAER,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowGroup.js","sources":["../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport type { LegacyButtonProps } from '../LegacyComponents/Button/Button';\nimport { LegacyIconButton } from '../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../Menu/Menu';\nimport { Menu } from '../Menu/Menu';\nimport { useLocalization } from '../Provider/Localization';\n\nconst sanitizeButtonPropsForMenuItem = (button: JSX.Element, index: number) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: (moreButtonText: string) => React.ReactElement<LegacyButtonProps>;\n wrapChild?: true | undefined;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton, wrapChild, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const { texts } = useLocalization();\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<LegacyButtonProps>[];\n const hiddenChildren = intersectedChildIndex === undefined ? [] : children.slice(intersectedChildIndex);\n const hiddenChildrenCount = hiddenChildren.length;\n const moreButtonText = hiddenChildrenCount ? `${hiddenChildrenCount} ${texts.header.more}` : '';\n\n const MoreButton = moreButton?.(moreButtonText) ?? <LegacyIconButton icon=\"more\" />;\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'pointer-events-none invisible order-[100]':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(MoreButton, {\n className: cn('sticky right-0 order-[99]', MoreButton.props.className),\n 'data-observer-ignore': true,\n menu: (menuProps: MenuProps) => (\n <Menu {...menuProps}>\n <Menu.Content>\n {hiddenChildren.map((child, index) =>\n wrapChild ? (\n <Menu.Item key={index}>{child}</Menu.Item>\n ) : (\n sanitizeButtonPropsForMenuItem(child, index)\n )\n )}\n </Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n </div>\n );\n});\n"],"names":["React","OverflowGroup"],"mappings":";;;;;;;AAWA,MAAM,iCAAiC,CAAC,QAAqB,UAAkB;AAC3E,QAAM,OAA2B,OAAO,MAAM,MAAM,OAAO,MAAM;AACjE,QAAM,MAAM,OAAO,KAAK,OAAO,KAAK;AAGpC,QAA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A,cAAC,SAAK,GAAG,YAAY,WAAsB,aAAU,kBAAiB,KAAK,YAAA,GACtE,SAAS;AAAA,IAAI,CAAC,OAAO,UAClBA,eAAM,aAAa,OAAO;AAAA,MACtB,WAAW,GAAG,MAAM,MAAM,WAAW;AAAA,QACjC,SAAS,0BAA0B,UAAa,QAAQ;AAAA,QACxD,6CACI,0BAA0B,UAAa,SAAS;AAAA,MAAA,CACvD;AAAA,IAAA,CACJ;AAAA,EAAA,GAEJ,eAAe,SACVA,eAAM,aAAa,YAAY;AAAA,IAC3B,WAAW,GAAG,6BAA6B,WAAW,MAAM,SAAS;AAAA,IACrE,wBAAwB;AAAA,IACxB,MAAM,CAAC,cACHA,+BAAA,cAAC,MAAA,EAAM,GAAG,UAAA,GACNA,+BAAA,cAAC,KAAK,SAAL,MACI,eAAe;AAAA,MAAI,CAAC,OAAO,UACxB,yDACK,KAAK,MAAL,EAAU,KAAK,MAAA,GAAQ,KAAM,IAE9B,+BAA+B,OAAO,KAAK;AAAA,IAAA,CAGvD,CACJ;AAAA,IAEJ,KAAK;AAAA,EAAA,CACR,IACD,IACV;AAER,CAAC;"}
1
+ {"version":3,"file":"OverflowGroup.js","sources":["../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport type { LegacyButtonProps } from '../LegacyComponents/Button/Button';\nimport { LegacyIconButton } from '../LegacyComponents/IconButton/IconButton';\nimport type { MenuProps } from '../Menu/Menu';\nimport { Menu } from '../Menu/Menu';\nimport { useLocalization } from '../Provider/Localization';\n\nconst sanitizeButtonPropsForMenuItem = (button: React.JSX.Element, index: number) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: (moreButtonText: string) => React.ReactElement<LegacyButtonProps>;\n wrapChild?: true | undefined;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton, wrapChild, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const { texts } = useLocalization();\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<LegacyButtonProps>[];\n const hiddenChildren = intersectedChildIndex === undefined ? [] : children.slice(intersectedChildIndex);\n const hiddenChildrenCount = hiddenChildren.length;\n const moreButtonText = hiddenChildrenCount ? `${hiddenChildrenCount} ${texts.header.more}` : '';\n\n const MoreButton = moreButton?.(moreButtonText) ?? <LegacyIconButton icon=\"more\" />;\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'pointer-events-none invisible order-[100]':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(MoreButton, {\n className: cn('sticky right-0 order-[99]', MoreButton.props.className),\n 'data-observer-ignore': true,\n menu: (menuProps: MenuProps) => (\n <Menu {...menuProps}>\n <Menu.Content>\n {hiddenChildren.map((child, index) =>\n wrapChild ? (\n <Menu.Item key={index}>{child}</Menu.Item>\n ) : (\n sanitizeButtonPropsForMenuItem(child, index)\n )\n )}\n </Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n </div>\n );\n});\n"],"names":["React","OverflowGroup"],"mappings":";;;;;;;AAWA,MAAM,iCAAiC,CAAC,QAA2B,UAAkB;AACjF,QAAM,OAA2B,OAAO,MAAM,MAAM,OAAO,MAAM;AACjE,QAAM,MAAM,OAAO,KAAK,OAAO,KAAK;AAGpC,QAAM;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,GAAG;AAAA,EAAA,IACH,OAAO;AAEX,QAAM,QAAQ;AAAA,IACV,GAAG;AAAA,IACH,KAAK;AAAA,IACL,QAAQ,OAAQ,KAAK,WAAW,MAAM,IAAI,WAAW,UAAW;AAAA,EAAA;AAGpE,MAAI,IAAI;AACJ,WAAOA,eAAM,aAAa,QAAQ,EAAE,IAAI,KAAK,GAAG,OAAO;AAAA,EAC3D;AAEA,SAAOA,+BAAA,cAAC,KAAA,EAAK,GAAG,MAAA,CAAO;AAC3B;AAOA,MAAM,iBAAiB,KAAK;AAErB,MAAM,gBAAgBA,eAAM,WAAW,SAASC,eAAc,OAA2B,KAAgC;AAC5H,QAAM,EAAE,YAAY,WAAW,GAAG,eAAe;AACjD,QAAM,cAAc,aAA6B,GAAG;AAEpD,QAAM,CAAC,aAAa,cAAc,IAAID,eAAM,SAAS,cAAc;AACnE,QAAM,oBAAoBA,eAAM,YAAY,CAAC,OAAoB,eAAe,IAAI,sBAAA,GAAyB,KAAK,GAAG,CAAA,CAAE;AACvH,QAAM,EAAE,MAAA,IAAU,gBAAA;AAElB,QAAM,wBAAwB,wBAAwB,aAAa,WAAW;AAC9E,QAAM,WAAWA,eAAM,SAAS,QAAQ,MAAM,QAAQ;AACtD,QAAM,iBAAiB,0BAA0B,SAAY,CAAA,IAAK,SAAS,MAAM,qBAAqB;AACtG,QAAM,sBAAsB,eAAe;AAC3C,QAAM,iBAAiB,sBAAsB,GAAG,mBAAmB,IAAI,MAAM,OAAO,IAAI,KAAK;AAE7F,QAAM,aAAa,aAAa,cAAc,KAAKA,+BAAA,cAAC,kBAAA,EAAiB,MAAK,QAAO;AAEjF,QAAM,YAAY,GAAG,wBAAwB,MAAM,SAAS;AAE5D,SACIA,+BAAA,cAAC,SAAK,GAAG,YAAY,WAAsB,aAAU,kBAAiB,KAAK,YAAA,GACtE,SAAS;AAAA,IAAI,CAAC,OAAO,UAClBA,eAAM,aAAa,OAAO;AAAA,MACtB,WAAW,GAAG,MAAM,MAAM,WAAW;AAAA,QACjC,SAAS,0BAA0B,UAAa,QAAQ;AAAA,QACxD,6CACI,0BAA0B,UAAa,SAAS;AAAA,MAAA,CACvD;AAAA,IAAA,CACJ;AAAA,EAAA,GAEJ,eAAe,SACVA,eAAM,aAAa,YAAY;AAAA,IAC3B,WAAW,GAAG,6BAA6B,WAAW,MAAM,SAAS;AAAA,IACrE,wBAAwB;AAAA,IACxB,MAAM,CAAC,cACHA,+BAAA,cAAC,MAAA,EAAM,GAAG,UAAA,GACNA,+BAAA,cAAC,KAAK,SAAL,MACI,eAAe;AAAA,MAAI,CAAC,OAAO,UACxB,yDACK,KAAK,MAAL,EAAU,KAAK,MAAA,GAAQ,KAAM,IAE9B,+BAA+B,OAAO,KAAK;AAAA,IAAA,CAGvD,CACJ;AAAA,IAEJ,KAAK;AAAA,EAAA,CACR,IACD,IACV;AAER,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PageNumbers.cjs","sources":["../../../src/components/Pagination/PageNumbers.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Inline } from '../Inline/Inline';\nimport { LegacyButton } from '../LegacyComponents/Button/Button';\nimport { useLocalization } from '../Provider/Localization';\n\ntype PageNumberProps = {\n currentPageIndex: number;\n onClick: (pageIndex: number) => void;\n pageCount: number;\n};\n\nconst createPageRange = (pageCount: number, pageNumber: number): number[] => {\n let lowerLimit = Math.min(pageNumber, pageCount);\n let upperLimit = Math.min(pageNumber, pageCount);\n\n for (let b = 1; b < 5 && b < pageCount;) {\n if (lowerLimit > 1) {\n lowerLimit--;\n b++;\n }\n if (b < 5 && upperLimit < pageCount) {\n upperLimit++;\n b++;\n }\n }\n\n const range: number[] = [];\n\n for (let i = lowerLimit; i <= upperLimit; i++) {\n range.push(i);\n }\n\n return range;\n};\n\nexport const PageNumbers = ({ currentPageIndex = 0, onClick: handleClick, pageCount }: PageNumberProps): JSX.Element => {\n const range = createPageRange(pageCount, currentPageIndex + 1);\n const { texts } = useLocalization();\n\n return (\n <Inline spacing={8}>\n {range.map((pageNumber: number) => (\n <LegacyButton\n appearance={pageNumber === currentPageIndex + 1 ? 'primary' : 'default'}\n aria-current={pageNumber === currentPageIndex + 1 ? 'page' : undefined}\n key={pageNumber}\n onClick={() => handleClick(pageNumber - 1)}\n aria-label={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}\n tooltip={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}>\n {pageNumber}\n </LegacyButton>\n ))}\n </Inline>\n );\n};\n"],"names":["useLocalization","Inline","React","LegacyButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,kBAAkB,CAAC,WAAmB,eAAiC;AACzE,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAC/C,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAE/C,WAAS,IAAI,GAAG,IAAI,KAAK,IAAI,aAAY;AACrC,QAAI,aAAa,GAAG;AAChB;AACA;AAAA,IACJ;AACA,QAAI,IAAI,KAAK,aAAa,WAAW;AACjC;AACA;AAAA,IACJ;AAAA,EACJ;AAEA,QAAM,QAAkB,CAAA;AAExB,WAAS,IAAI,YAAY,KAAK,YAAY,KAAK;AAC3C,UAAM,KAAK,CAAC;AAAA,EAChB;AAEA,SAAO;AACX;AAEO,MAAM,cAAc,CAAC,EAAE,mBAAmB,GAAG,SAAS,aAAa,gBAA8C;AACpH,QAAM,QAAQ,gBAAgB,WAAW,mBAAmB,CAAC;AAC7D,QAAM,EAAE,MAAA,IAAUA,6BAAA;AAElB,wDACKC,OAAAA,QAAA,EAAO,SAAS,KACZ,MAAM,IAAI,CAAC,eACRC,iCAAA;AAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACG,YAAY,eAAe,mBAAmB,IAAI,YAAY;AAAA,MAC9D,gBAAc,eAAe,mBAAmB,IAAI,SAAS;AAAA,MAC7D,KAAK;AAAA,MACL,SAAS,MAAM,YAAY,aAAa,CAAC;AAAA,MACzC,cAAY,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,MAC5E,SAAS,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,IAAA;AAAA,IACxE;AAAA,EAAA,CAER,CACL;AAER;;"}
1
+ {"version":3,"file":"PageNumbers.cjs","sources":["../../../src/components/Pagination/PageNumbers.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Inline } from '../Inline/Inline';\nimport { LegacyButton } from '../LegacyComponents/Button/Button';\nimport { useLocalization } from '../Provider/Localization';\n\ntype PageNumberProps = {\n currentPageIndex: number;\n onClick: (pageIndex: number) => void;\n pageCount: number;\n};\n\nconst createPageRange = (pageCount: number, pageNumber: number): number[] => {\n let lowerLimit = Math.min(pageNumber, pageCount);\n let upperLimit = Math.min(pageNumber, pageCount);\n\n for (let b = 1; b < 5 && b < pageCount;) {\n if (lowerLimit > 1) {\n lowerLimit--;\n b++;\n }\n if (b < 5 && upperLimit < pageCount) {\n upperLimit++;\n b++;\n }\n }\n\n const range: number[] = [];\n\n for (let i = lowerLimit; i <= upperLimit; i++) {\n range.push(i);\n }\n\n return range;\n};\n\nexport const PageNumbers = ({ currentPageIndex = 0, onClick: handleClick, pageCount }: PageNumberProps): React.JSX.Element => {\n const range = createPageRange(pageCount, currentPageIndex + 1);\n const { texts } = useLocalization();\n\n return (\n <Inline spacing={8}>\n {range.map((pageNumber: number) => (\n <LegacyButton\n appearance={pageNumber === currentPageIndex + 1 ? 'primary' : 'default'}\n aria-current={pageNumber === currentPageIndex + 1 ? 'page' : undefined}\n key={pageNumber}\n onClick={() => handleClick(pageNumber - 1)}\n aria-label={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}\n tooltip={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}>\n {pageNumber}\n </LegacyButton>\n ))}\n </Inline>\n );\n};\n"],"names":["useLocalization","Inline","React","LegacyButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,kBAAkB,CAAC,WAAmB,eAAiC;AACzE,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAC/C,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAE/C,WAAS,IAAI,GAAG,IAAI,KAAK,IAAI,aAAY;AACrC,QAAI,aAAa,GAAG;AAChB;AACA;AAAA,IACJ;AACA,QAAI,IAAI,KAAK,aAAa,WAAW;AACjC;AACA;AAAA,IACJ;AAAA,EACJ;AAEA,QAAM,QAAkB,CAAA;AAExB,WAAS,IAAI,YAAY,KAAK,YAAY,KAAK;AAC3C,UAAM,KAAK,CAAC;AAAA,EAChB;AAEA,SAAO;AACX;AAEO,MAAM,cAAc,CAAC,EAAE,mBAAmB,GAAG,SAAS,aAAa,gBAAoD;AAC1H,QAAM,QAAQ,gBAAgB,WAAW,mBAAmB,CAAC;AAC7D,QAAM,EAAE,MAAA,IAAUA,6BAAA;AAElB,wDACKC,OAAAA,QAAA,EAAO,SAAS,KACZ,MAAM,IAAI,CAAC,eACRC,iCAAA;AAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACG,YAAY,eAAe,mBAAmB,IAAI,YAAY;AAAA,MAC9D,gBAAc,eAAe,mBAAmB,IAAI,SAAS;AAAA,MAC7D,KAAK;AAAA,MACL,SAAS,MAAM,YAAY,aAAa,CAAC;AAAA,MACzC,cAAY,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,MAC5E,SAAS,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,IAAA;AAAA,IACxE;AAAA,EAAA,CAER,CACL;AAER;;"}
@@ -1,7 +1,8 @@
1
+ import * as React from 'react';
1
2
  type PageNumberProps = {
2
3
  currentPageIndex: number;
3
4
  onClick: (pageIndex: number) => void;
4
5
  pageCount: number;
5
6
  };
6
- export declare const PageNumbers: ({ currentPageIndex, onClick: handleClick, pageCount }: PageNumberProps) => JSX.Element;
7
+ export declare const PageNumbers: ({ currentPageIndex, onClick: handleClick, pageCount }: PageNumberProps) => React.JSX.Element;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PageNumbers.js","sources":["../../../src/components/Pagination/PageNumbers.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Inline } from '../Inline/Inline';\nimport { LegacyButton } from '../LegacyComponents/Button/Button';\nimport { useLocalization } from '../Provider/Localization';\n\ntype PageNumberProps = {\n currentPageIndex: number;\n onClick: (pageIndex: number) => void;\n pageCount: number;\n};\n\nconst createPageRange = (pageCount: number, pageNumber: number): number[] => {\n let lowerLimit = Math.min(pageNumber, pageCount);\n let upperLimit = Math.min(pageNumber, pageCount);\n\n for (let b = 1; b < 5 && b < pageCount;) {\n if (lowerLimit > 1) {\n lowerLimit--;\n b++;\n }\n if (b < 5 && upperLimit < pageCount) {\n upperLimit++;\n b++;\n }\n }\n\n const range: number[] = [];\n\n for (let i = lowerLimit; i <= upperLimit; i++) {\n range.push(i);\n }\n\n return range;\n};\n\nexport const PageNumbers = ({ currentPageIndex = 0, onClick: handleClick, pageCount }: PageNumberProps): JSX.Element => {\n const range = createPageRange(pageCount, currentPageIndex + 1);\n const { texts } = useLocalization();\n\n return (\n <Inline spacing={8}>\n {range.map((pageNumber: number) => (\n <LegacyButton\n appearance={pageNumber === currentPageIndex + 1 ? 'primary' : 'default'}\n aria-current={pageNumber === currentPageIndex + 1 ? 'page' : undefined}\n key={pageNumber}\n onClick={() => handleClick(pageNumber - 1)}\n aria-label={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}\n tooltip={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}>\n {pageNumber}\n </LegacyButton>\n ))}\n </Inline>\n );\n};\n"],"names":[],"mappings":";;;;AAYA,MAAM,kBAAkB,CAAC,WAAmB,eAAiC;AACzE,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAC/C,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAE/C,WAAS,IAAI,GAAG,IAAI,KAAK,IAAI,aAAY;AACrC,QAAI,aAAa,GAAG;AAChB;AACA;AAAA,IACJ;AACA,QAAI,IAAI,KAAK,aAAa,WAAW;AACjC;AACA;AAAA,IACJ;AAAA,EACJ;AAEA,QAAM,QAAkB,CAAA;AAExB,WAAS,IAAI,YAAY,KAAK,YAAY,KAAK;AAC3C,UAAM,KAAK,CAAC;AAAA,EAChB;AAEA,SAAO;AACX;AAEO,MAAM,cAAc,CAAC,EAAE,mBAAmB,GAAG,SAAS,aAAa,gBAA8C;AACpH,QAAM,QAAQ,gBAAgB,WAAW,mBAAmB,CAAC;AAC7D,QAAM,EAAE,MAAA,IAAU,gBAAA;AAElB,6CACK,QAAA,EAAO,SAAS,KACZ,MAAM,IAAI,CAAC,eACR,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,YAAY,eAAe,mBAAmB,IAAI,YAAY;AAAA,MAC9D,gBAAc,eAAe,mBAAmB,IAAI,SAAS;AAAA,MAC7D,KAAK;AAAA,MACL,SAAS,MAAM,YAAY,aAAa,CAAC;AAAA,MACzC,cAAY,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,MAC5E,SAAS,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,IAAA;AAAA,IACxE;AAAA,EAAA,CAER,CACL;AAER;"}
1
+ {"version":3,"file":"PageNumbers.js","sources":["../../../src/components/Pagination/PageNumbers.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Inline } from '../Inline/Inline';\nimport { LegacyButton } from '../LegacyComponents/Button/Button';\nimport { useLocalization } from '../Provider/Localization';\n\ntype PageNumberProps = {\n currentPageIndex: number;\n onClick: (pageIndex: number) => void;\n pageCount: number;\n};\n\nconst createPageRange = (pageCount: number, pageNumber: number): number[] => {\n let lowerLimit = Math.min(pageNumber, pageCount);\n let upperLimit = Math.min(pageNumber, pageCount);\n\n for (let b = 1; b < 5 && b < pageCount;) {\n if (lowerLimit > 1) {\n lowerLimit--;\n b++;\n }\n if (b < 5 && upperLimit < pageCount) {\n upperLimit++;\n b++;\n }\n }\n\n const range: number[] = [];\n\n for (let i = lowerLimit; i <= upperLimit; i++) {\n range.push(i);\n }\n\n return range;\n};\n\nexport const PageNumbers = ({ currentPageIndex = 0, onClick: handleClick, pageCount }: PageNumberProps): React.JSX.Element => {\n const range = createPageRange(pageCount, currentPageIndex + 1);\n const { texts } = useLocalization();\n\n return (\n <Inline spacing={8}>\n {range.map((pageNumber: number) => (\n <LegacyButton\n appearance={pageNumber === currentPageIndex + 1 ? 'primary' : 'default'}\n aria-current={pageNumber === currentPageIndex + 1 ? 'page' : undefined}\n key={pageNumber}\n onClick={() => handleClick(pageNumber - 1)}\n aria-label={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}\n tooltip={texts.pagination.actions.pageX.replace('[X]', String(pageNumber))}>\n {pageNumber}\n </LegacyButton>\n ))}\n </Inline>\n );\n};\n"],"names":[],"mappings":";;;;AAYA,MAAM,kBAAkB,CAAC,WAAmB,eAAiC;AACzE,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAC/C,MAAI,aAAa,KAAK,IAAI,YAAY,SAAS;AAE/C,WAAS,IAAI,GAAG,IAAI,KAAK,IAAI,aAAY;AACrC,QAAI,aAAa,GAAG;AAChB;AACA;AAAA,IACJ;AACA,QAAI,IAAI,KAAK,aAAa,WAAW;AACjC;AACA;AAAA,IACJ;AAAA,EACJ;AAEA,QAAM,QAAkB,CAAA;AAExB,WAAS,IAAI,YAAY,KAAK,YAAY,KAAK;AAC3C,UAAM,KAAK,CAAC;AAAA,EAChB;AAEA,SAAO;AACX;AAEO,MAAM,cAAc,CAAC,EAAE,mBAAmB,GAAG,SAAS,aAAa,gBAAoD;AAC1H,QAAM,QAAQ,gBAAgB,WAAW,mBAAmB,CAAC;AAC7D,QAAM,EAAE,MAAA,IAAU,gBAAA;AAElB,6CACK,QAAA,EAAO,SAAS,KACZ,MAAM,IAAI,CAAC,eACR,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,YAAY,eAAe,mBAAmB,IAAI,YAAY;AAAA,MAC9D,gBAAc,eAAe,mBAAmB,IAAI,SAAS;AAAA,MAC7D,KAAK;AAAA,MACL,SAAS,MAAM,YAAY,aAAa,CAAC;AAAA,MACzC,cAAY,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,MAC5E,SAAS,MAAM,WAAW,QAAQ,MAAM,QAAQ,OAAO,OAAO,UAAU,CAAC;AAAA,IAAA;AAAA,IACxE;AAAA,EAAA,CAER,CACL;AAER;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.cjs","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Placement } from '../..';\nimport { mergeRefs } from '../../utils/mergeRefs';\n\nimport { UnstyledArrow } from './Primitives';\nimport { getPopoverStyleClassnames } from './util';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement>; anchorRef: React.RefObject<HTMLElement> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n anchorRef: { current: null },\n props: {},\n ref: null,\n});\n\nexport type PopoverAnchorProps = React.HTMLAttributes<HTMLElement> & {\n children: React.ReactElement;\n};\nconst Anchor = React.forwardRef(function PopoverAnchor(props: PopoverAnchorProps, forwardedRef: React.Ref<HTMLDivElement>) {\n const context = React.useContext(PopoverContext);\n\n const ref = mergeRefs([context.anchorRef, forwardedRef]);\n\n const { children, ...restProps } = props;\n\n return <PopoverPrimitive.Trigger {...restProps} ref={ref} render={children} />;\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLElement> & {\n children: React.ReactElement;\n /**\n * Whether the trigger renders a native `<button>` element.\n * Set to `false` if the trigger child is not a button (e.g. `<input>`, `<div>`, '<span>', etc.).\n * @default true\n */\n nativeButton?: boolean;\n};\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, externalRef: React.Ref<HTMLElement>) {\n const { ref: parentRef, props: parentProps } = React.useContext(PopoverContext);\n const refCallback = mergeRefs([parentRef, externalRef]);\n\n let { children, nativeButton, ...restProps } = props;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n // oxlint-disable-next-line no-console\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\n {...parentProps}\n {...restProps}\n nativeButton={nativeButton}\n ref={refCallback}\n render={children}\n />\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\n\nexport type PopoverContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n container?: HTMLElement | null;\n finalFocus?: PopoverPrimitive.Popup.Props['finalFocus'];\n initialFocus?: PopoverPrimitive.Popup.Props['initialFocus'];\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, container, ...popoverContentProps } = props;\n\n const context = React.useContext(PopoverContext);\n\n const className = cn(getPopoverStyleClassnames(), props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = <PopoverPrimitive.Close render={<RenderPropWrapper>{props.children}</RenderPropWrapper>} />;\n } else {\n output = props.children;\n }\n\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner side={side} sideOffset={8} anchor={context.anchorRef}>\n <PopoverPrimitive.Popup {...popoverContentProps} className={className} data-taco=\"popover\" ref={ref}>\n <UnstyledArrow />\n {output}\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement> & {\n children: React.ReactElement;\n};\nconst Close = React.forwardRef((props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => {\n const { children, ...restProps } = props;\n return <PopoverPrimitive.Close {...restProps} ref={ref} render={children} />;\n});\n\nexport type PopoverProps = React.PropsWithChildren<{\n anchor?: JSX.Element;\n modal?: boolean | 'trap-focus';\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n /** Set whether the popover is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Control the open state of the popover from outside the component */\n open?: boolean;\n /** Called when the popover opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.ForwardRefExoticComponent<PopoverAnchorProps>;\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n};\n\nexport const Popover = React.forwardRef<HTMLElement, PopoverProps>(function Popover(props, ref) {\n const { anchor, children, defaultOpen, modal = 'trap-focus', open, onChange, trigger, ...otherProps } = props;\n\n const anchorRef = React.useRef(null);\n\n const handleOpenChange = (open: boolean, eventDetails: PopoverPrimitive.Root.ChangeEventDetails) => {\n if (eventDetails.reason === 'escape-key') {\n const triggeredFromRadixPortal = (eventDetails.event.target as HTMLElement)?.closest(\n 'div[data-radix-popper-content-wrapper]'\n );\n\n if (triggeredFromRadixPortal) {\n // TODO: This could be removed when all radix overlays are replaced with base UI components, but currently it propagates through and closes the dialog.\n\n // cancel closing the dialog\n eventDetails.cancel();\n // propagate to allow the radix overlay to close\n eventDetails.allowPropagation();\n return;\n }\n }\n\n onChange?.(open);\n };\n\n return (\n <PopoverContext.Provider value={{ anchorRef, props: otherProps, ref }}>\n <PopoverPrimitive.Root defaultOpen={defaultOpen} modal={modal} open={open} onOpenChange={handleOpenChange}>\n {anchor ? <Anchor>{anchor}</Anchor> : null}\n {trigger && !anchor ? <Trigger>{trigger}</Trigger> : null}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Anchor = Anchor;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\n"],"names":["React","mergeRefs","PopoverPrimitive","RenderPropWrapper","getPopoverStyleClassnames","UnstyledArrow","Popover","open"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,iBAAiBA,iBAAM,cAAmC;AAAA,EAC5D,WAAW,EAAE,SAAS,KAAA;AAAA,EACtB,OAAO,CAAA;AAAA,EACP,KAAK;AACT,CAAC;AAKD,MAA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MACJ;AAAA,IACJ;AAEA,eAAWA,KAAI;AAAA,EACnB;AAEA,SACIP,iCAAA,cAAC,eAAe,UAAf,EAAwB,OAAO,EAAE,WAAW,OAAO,YAAY,MAAI,GAChEA,iCAAA,cAACE,MAAAA,QAAiB,MAAjB,EAAsB,aAA0B,OAAc,MAAY,cAAc,oBACpF,SAASF,iCAAA,cAAC,QAAA,MAAQ,MAAO,IAAY,MACrC,WAAW,CAAC,wDAAU,SAAA,MAAS,OAAQ,IAAa,MACpD,QACL,CACJ;AAER,CAAC;AACD,QAAQ,SAAS;AACjB,QAAQ,UAAU;AAClB,QAAQ,UAAU;AAClB,QAAQ,QAAQ;;"}
1
+ {"version":3,"file":"Popover.cjs","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Placement } from '../..';\nimport { mergeRefs } from '../../utils/mergeRefs';\n\nimport { UnstyledArrow } from './Primitives';\nimport { getPopoverStyleClassnames } from './util';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement>; anchorRef: React.RefObject<HTMLElement | null> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n anchorRef: { current: null },\n props: {},\n ref: null,\n});\n\nexport type PopoverAnchorProps = React.HTMLAttributes<HTMLElement> & {\n children: React.ReactElement;\n};\nconst Anchor = React.forwardRef(function PopoverAnchor(props: PopoverAnchorProps, forwardedRef: React.Ref<HTMLDivElement>) {\n const context = React.useContext(PopoverContext);\n\n const ref = mergeRefs([context.anchorRef, forwardedRef]);\n\n const { children, ...restProps } = props;\n\n return <PopoverPrimitive.Trigger {...restProps} ref={ref} render={children} />;\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLElement> & {\n children: React.ReactElement;\n /**\n * Whether the trigger renders a native `<button>` element.\n * Set to `false` if the trigger child is not a button (e.g. `<input>`, `<div>`, '<span>', etc.).\n * @default true\n */\n nativeButton?: boolean;\n};\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, externalRef: React.Ref<HTMLElement>) {\n const { ref: parentRef, props: parentProps } = React.useContext(PopoverContext);\n const refCallback = mergeRefs([parentRef, externalRef]);\n\n let { children, nativeButton, ...restProps } = props;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n // oxlint-disable-next-line no-console\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\n {...parentProps}\n {...restProps}\n nativeButton={nativeButton}\n ref={refCallback}\n render={children}\n />\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\n\nexport type PopoverContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n container?: HTMLElement | null;\n finalFocus?: PopoverPrimitive.Popup.Props['finalFocus'];\n initialFocus?: PopoverPrimitive.Popup.Props['initialFocus'];\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, container, ...popoverContentProps } = props;\n\n const context = React.useContext(PopoverContext);\n\n const className = cn(getPopoverStyleClassnames(), props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = <PopoverPrimitive.Close render={<RenderPropWrapper>{props.children}</RenderPropWrapper>} />;\n } else {\n output = props.children;\n }\n\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner side={side} sideOffset={8} anchor={context.anchorRef}>\n <PopoverPrimitive.Popup {...popoverContentProps} className={className} data-taco=\"popover\" ref={ref}>\n <UnstyledArrow />\n {output}\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement> & {\n children: React.ReactElement;\n};\nconst Close = React.forwardRef((props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): React.JSX.Element => {\n const { children, ...restProps } = props;\n return <PopoverPrimitive.Close {...restProps} ref={ref} render={children} />;\n});\n\nexport type PopoverProps = React.PropsWithChildren<{\n anchor?: React.JSX.Element;\n modal?: boolean | 'trap-focus';\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: React.JSX.Element;\n /** Set whether the popover is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Control the open state of the popover from outside the component */\n open?: boolean;\n /** Called when the popover opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.ForwardRefExoticComponent<PopoverAnchorProps>;\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n};\n\nexport const Popover = React.forwardRef<HTMLElement, PopoverProps>(function Popover(props, ref) {\n const { anchor, children, defaultOpen, modal = 'trap-focus', open, onChange, trigger, ...otherProps } = props;\n\n const anchorRef = React.useRef(null);\n\n const handleOpenChange = (open: boolean, eventDetails: PopoverPrimitive.Root.ChangeEventDetails) => {\n if (eventDetails.reason === 'escape-key') {\n const triggeredFromRadixPortal = (eventDetails.event.target as HTMLElement)?.closest(\n 'div[data-radix-popper-content-wrapper]'\n );\n\n if (triggeredFromRadixPortal) {\n // TODO: This could be removed when all radix overlays are replaced with base UI components, but currently it propagates through and closes the dialog.\n\n // cancel closing the dialog\n eventDetails.cancel();\n // propagate to allow the radix overlay to close\n eventDetails.allowPropagation();\n return;\n }\n }\n\n onChange?.(open);\n };\n\n return (\n <PopoverContext.Provider value={{ anchorRef, props: otherProps, ref }}>\n <PopoverPrimitive.Root defaultOpen={defaultOpen} modal={modal} open={open} onOpenChange={handleOpenChange}>\n {anchor ? <Anchor>{anchor}</Anchor> : null}\n {trigger && !anchor ? <Trigger>{trigger}</Trigger> : null}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Anchor = Anchor;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\n"],"names":["React","mergeRefs","PopoverPrimitive","RenderPropWrapper","getPopoverStyleClassnames","UnstyledArrow","Popover","open"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,iBAAiBA,iBAAM,cAAmC;AAAA,EAC5D,WAAW,EAAE,SAAS,KAAA;AAAA,EACtB,OAAO,CAAA;AAAA,EACP,KAAK;AACT,CAAC;AAKD,MAAM,SAASA,iBAAM,WAAW,SAAS,cAAc,OAA2B,cAAyC;AACvH,QAAM,UAAUA,iBAAM,WAAW,cAAc;AAE/C,QAAM,MAAMC,UAAAA,UAAU,CAAC,QAAQ,WAAW,YAAY,CAAC;AAEvD,QAAM,EAAE,UAAU,GAAG,UAAA,IAAc;AAEnC,SAAOD,iCAAA,cAACE,MAAAA,QAAiB,SAAjB,EAA0B,GAAG,WAAW,KAAU,QAAQ,UAAU;AAChF,CAAC;AAWD,MAAM,UAAUF,iBAAM,WAAW,SAAS,eAAe,OAA4B,aAAqC;AACtH,QAAM,EAAE,KAAK,WAAW,OAAO,gBAAgBA,iBAAM,WAAW,cAAc;AAC9E,QAAM,cAAcC,UAAAA,UAAU,CAAC,WAAW,WAAW,CAAC;AAEtD,MAAI,EAAE,UAAU,cAAc,GAAG,cAAc;AAE/C,MAAID,iBAAM,eAAe,MAAM,QAAQ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WAAU,IAAA,GACvFF,iCAAA,cAACK,WAAAA,eAAA,IAAc,GACd,MACL,CACJ,CACJ;AAER,CAAC;AAKD,MAAM,QAAQL,iBAAM,WAAW,CAAC,OAA0B,QAAyD;AAC/G,QAAM,EAAE,UAAU,GAAG,UAAA,IAAc;AACnC,SAAOA,iCAAA,cAACE,MAAAA,QAAiB,OAAjB,EAAwB,GAAG,WAAW,KAAU,QAAQ,UAAU;AAC9E,CAAC;AAqBM,MAAM,UAAUF,iBAAM,WAAsC,SAASM,SAAQ,OAAO,KAAK;AAC5F,QAAM,EAAE,QAAQ,UAAU,aAAa,QAAQ,cAAc,MAAM,UAAU,SAAS,GAAG,WAAA,IAAe;AAExG,QAAM,YAAYN,iBAAM,OAAO,IAAI;AAEnC,QAAM,mBAAmB,CAACO,OAAe,iBAA2D;AAChG,QAAI,aAAa,WAAW,cAAc;AACtC,YAAM,2BAA4B,aAAa,MAAM,QAAwB;AAAA,QACzE;AAAA,MAAA;AAGJ,UAAI,0BAA0B;AAI1B,qBAAa,OAAA;AAEb,qBAAa,iBAAA;AACb;AAAA,MACJ;AAAA,IACJ;AAEA,eAAWA,KAAI;AAAA,EACnB;AAEA,SACIP,iCAAA,cAAC,eAAe,UAAf,EAAwB,OAAO,EAAE,WAAW,OAAO,YAAY,MAAI,GAChEA,iCAAA,cAACE,MAAAA,QAAiB,MAAjB,EAAsB,aAA0B,OAAc,MAAY,cAAc,oBACpF,SAASF,iCAAA,cAAC,QAAA,MAAQ,MAAO,IAAY,MACrC,WAAW,CAAC,wDAAU,SAAA,MAAS,OAAQ,IAAa,MACpD,QACL,CACJ;AAER,CAAC;AACD,QAAQ,SAAS;AACjB,QAAQ,UAAU;AAClB,QAAQ,UAAU;AAClB,QAAQ,QAAQ;;"}
@@ -28,10 +28,10 @@ export type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement> & {
28
28
  children: React.ReactElement;
29
29
  };
30
30
  export type PopoverProps = React.PropsWithChildren<{
31
- anchor?: JSX.Element;
31
+ anchor?: React.JSX.Element;
32
32
  modal?: boolean | 'trap-focus';
33
33
  /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */
34
- trigger?: JSX.Element;
34
+ trigger?: React.JSX.Element;
35
35
  /** Set whether the popover is open by default or not, use when not providing a trigger */
36
36
  defaultOpen?: boolean;
37
37
  /** Control the open state of the popover from outside the component */