@economic/taco 2.47.0-server.3 → 2.47.0-server.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (670) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Select2/components/Option.d.ts +4 -4
  12. package/dist/components/Select2/components/Search.d.ts +1 -1
  13. package/dist/components/Tag/Tag.d.ts +1 -1
  14. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
  15. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  16. package/dist/esm/index.css +11 -2
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  18. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  20. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  22. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  24. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  26. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  28. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  30. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  32. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  34. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  36. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  38. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  39. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  40. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  41. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  42. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  44. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  46. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  48. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  50. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  56. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  58. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js +26 -27
  60. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  62. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  64. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  66. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  68. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  69. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  70. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  72. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  73. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  74. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  76. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  78. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  80. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  82. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  84. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  86. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  88. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  90. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  92. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  96. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  98. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  100. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  102. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  108. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  109. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  110. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  111. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  112. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  113. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  114. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  116. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  117. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  118. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  126. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  128. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  130. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  132. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  134. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  136. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  138. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  140. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  142. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  144. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  146. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  158. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  160. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  161. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  162. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  163. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  164. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  166. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  168. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  170. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  172. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  174. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  176. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  180. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  184. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  186. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  188. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  190. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  192. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  194. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  196. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  198. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  200. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  202. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  204. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  206. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  208. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  210. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  212. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  214. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  216. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  220. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  222. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  224. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  226. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  228. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  238. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  240. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  242. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  244. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  246. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  248. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  250. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  254. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  256. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  258. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  260. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  262. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  264. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  265. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  266. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  268. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  270. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  272. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  274. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  275. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  276. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  278. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  280. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  282. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  284. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  286. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  288. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  290. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +36 -35
  292. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  294. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  296. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +173 -128
  298. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  300. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  302. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  304. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  306. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  308. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  310. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  312. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  314. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  316. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  324. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  330. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  332. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  334. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  336. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  338. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  340. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js +23 -23
  342. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  356. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  360. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  368. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  370. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  372. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  374. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  376. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  378. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  380. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  382. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js +18 -16
  384. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  386. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  388. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  390. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  391. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  392. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  394. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  396. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  398. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  400. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  402. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  404. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  406. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  408. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  409. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  410. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  412. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  414. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  416. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  418. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  420. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  422. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  424. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  426. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  428. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  430. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  431. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  432. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  434. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  444. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  450. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +44 -37
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +59 -42
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -39
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +21 -16
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +51 -40
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  544. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  545. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -22
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  622. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  623. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  624. package/dist/esm/packages/taco/src/types.js +1 -1
  625. package/dist/esm/packages/taco/src/types.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  627. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  629. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  631. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  633. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  635. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  637. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  639. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  643. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  645. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  647. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  649. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  651. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  653. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  655. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  656. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  657. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  658. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  659. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  660. package/dist/index.css +11 -2
  661. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
  662. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
  663. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
  664. package/dist/primitives/Table/types.d.ts +1 -1
  665. package/dist/primitives/Table/useTableManager/features/useTableServerLoading.d.ts +2 -1
  666. package/dist/taco.cjs.development.js +7944 -6916
  667. package/dist/taco.cjs.development.js.map +1 -1
  668. package/dist/taco.cjs.production.min.js +1 -1
  669. package/dist/taco.cjs.production.min.js.map +1 -1
  670. package/package.json +1 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../../../../src/components/Menu/Context.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const MenuContext = React.createContext<\n | {\n indented: boolean;\n registerIndentation: () => void;\n minWidth?: number;\n setMinWidth: (width: number) => void;\n open: () => void;\n close: () => void;\n }\n | undefined\n>(undefined);\n\nexport const useCurrentMenu = () => {\n return React.useContext(MenuContext);\n};\n"],"names":["MenuContext","React","undefined","useCurrentMenu"],"mappings":";;MAEaA,WAAW,gBAAGC,aAAmB,CAU5CC,SAAS;MAEEC,cAAc,GAAGA;EAC1B,OAAOF,UAAgB,CAACD,WAAW,CAAC;AACxC;;;;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../../../../src/components/Menu/Context.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const MenuContext = React.createContext<\n | {\n indented: boolean;\n registerIndentation: () => void;\n minWidth?: number;\n setMinWidth: (width: number) => void;\n open: () => void;\n close: () => void;\n }\n | undefined\n>(undefined);\n\nexport const useCurrentMenu = () => {\n return React.useContext(MenuContext);\n};\n"],"names":["MenuContext","React","undefined","useCurrentMenu"],"mappings":";;IAEaA,WAAW,gBAAGC,aAAmB,CAU5CC,SAAS;IAEEC,cAAc,GAAG,SAAjBA,cAAcA;EACvB,OAAOF,UAAgB,CAACD,WAAW,CAAC;AACxC;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { forwardRef, useState, useMemo, createElement } from 'react';
2
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { MenuContext } from './Context.js';
3
4
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
4
5
  import { Root } from '@radix-ui/react-dropdown-menu';
@@ -12,32 +13,47 @@ import { Separator } from './components/Separator.js';
12
13
  import { Header } from './components/Header.js';
13
14
  import { SubMenu } from './components/SubMenu.js';
14
15
 
15
- const Menu = /*#__PURE__*/forwardRef(function Menu(externalProps, ref) {
16
- const {
17
- children,
18
- defaultOpen: defaultProp,
19
- onChange,
20
- open: prop,
21
- trigger,
22
- ...props
23
- } = externalProps;
24
- const [indented, setIndented] = useState(false);
25
- const [minWidth, setMinWidth] = useState(undefined);
26
- const [open, setOpen] = useControllableState({
27
- // uncontrolled
28
- defaultProp,
29
- // controlled
30
- onChange,
31
- prop
32
- });
33
- const context = useMemo(() => ({
34
- indented,
35
- registerIndentation: () => setIndented(true),
36
- minWidth,
37
- setMinWidth: width => setMinWidth(width),
38
- open: () => setOpen(true),
39
- close: () => setOpen(false)
40
- }), [indented, minWidth]);
16
+ var _excluded = ["children", "defaultOpen", "onChange", "open", "trigger"];
17
+ var Menu = /*#__PURE__*/forwardRef(function Menu(externalProps, ref) {
18
+ var children = externalProps.children,
19
+ defaultProp = externalProps.defaultOpen,
20
+ onChange = externalProps.onChange,
21
+ prop = externalProps.open,
22
+ trigger = externalProps.trigger,
23
+ props = _objectWithoutPropertiesLoose(externalProps, _excluded);
24
+ var _React$useState = useState(false),
25
+ indented = _React$useState[0],
26
+ setIndented = _React$useState[1];
27
+ var _React$useState2 = useState(undefined),
28
+ minWidth = _React$useState2[0],
29
+ _setMinWidth = _React$useState2[1];
30
+ var _useControllableState = useControllableState({
31
+ // uncontrolled
32
+ defaultProp: defaultProp,
33
+ // controlled
34
+ onChange: onChange,
35
+ prop: prop
36
+ }),
37
+ open = _useControllableState[0],
38
+ setOpen = _useControllableState[1];
39
+ var context = useMemo(function () {
40
+ return {
41
+ indented: indented,
42
+ registerIndentation: function registerIndentation() {
43
+ return setIndented(true);
44
+ },
45
+ minWidth: minWidth,
46
+ setMinWidth: function setMinWidth(width) {
47
+ return _setMinWidth(width);
48
+ },
49
+ open: function open() {
50
+ return setOpen(true);
51
+ },
52
+ close: function close() {
53
+ return setOpen(false);
54
+ }
55
+ };
56
+ }, [indented, minWidth]);
41
57
  return /*#__PURE__*/createElement(MenuContext.Provider, {
42
58
  value: context
43
59
  }, /*#__PURE__*/createElement(Root, Object.assign({}, props, {
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../../../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { MenuContext } from './Context';\nimport { Content, MenuContentProps } from './components/Content';\nimport { Item, MenuItemProps } from './components/Item';\nimport { Link, MenuLinkItemProps } from './components/Link';\nimport { Trigger, MenuTriggerProps } from './components/Trigger';\nimport { Checkbox, MenuCheckboxItemProps } from './components/Checkbox';\nimport { ForwardedMenuRadioGroupWithStatics, RadioGroup } from './components/RadioGroup';\nimport { Separator, MenuSeparatorProps } from './components/Separator';\nimport { Header, MenuHeaderProps } from './components/Header';\nimport { SubMenu, MenuSubMenuProps } from './components/SubMenu';\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 /** 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 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: defaultProp, onChange, open: prop, trigger, ...props } = externalProps;\n const [indented, setIndented] = React.useState(false);\n const [minWidth, setMinWidth] = React.useState<number | undefined>(undefined);\n\n const [open, setOpen] = useControllableState<boolean>({\n // uncontrolled\n defaultProp,\n // controlled\n onChange,\n prop,\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 }),\n [indented, minWidth]\n );\n\n return (\n <MenuContext.Provider value={context}>\n <DropdownMenuPrimitive.Root {...props} modal={false} open={open} onOpenChange={setOpen}>\n {trigger && <Trigger ref={ref}>{trigger}</Trigger>}\n {children}\n </DropdownMenuPrimitive.Root>\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.Header = Header;\nMenu.RadioGroup = RadioGroup;\nMenu.SubMenu = SubMenu;\n"],"names":["Menu","React","externalProps","ref","children","defaultOpen","defaultProp","onChange","open","prop","trigger","props","indented","setIndented","minWidth","setMinWidth","undefined","setOpen","useControllableState","context","registerIndentation","width","close","MenuContext","Provider","value","DropdownMenuPrimitive","modal","onOpenChange","Trigger","Content","Item","Link","Checkbox","Separator","Header","RadioGroup","SubMenu"],"mappings":";;;;;;;;;;;;;;MAqCaA,IAAI,gBAAGC,UAAgB,CAA+B,SAASD,IAAIA,CAACE,aAAa,EAAEC,GAAG;EAC/F,MAAM;IAAEC,QAAQ;IAAEC,WAAW,EAAEC,WAAW;IAAEC,QAAQ;IAAEC,IAAI,EAAEC,IAAI;IAAEC,OAAO;IAAE,GAAGC;GAAO,GAAGT,aAAa;EACrG,MAAM,CAACU,QAAQ,EAAEC,WAAW,CAAC,GAAGZ,QAAc,CAAC,KAAK,CAAC;EACrD,MAAM,CAACa,QAAQ,EAAEC,WAAW,CAAC,GAAGd,QAAc,CAAqBe,SAAS,CAAC;EAE7E,MAAM,CAACR,IAAI,EAAES,OAAO,CAAC,GAAGC,oBAAoB,CAAU;;IAElDZ,WAAW;;IAEXC,QAAQ;IACRE;GACH,CAAC;EAEF,MAAMU,OAAO,GAAGlB,OAAa,CACzB,OAAO;IACHW,QAAQ;IACRQ,mBAAmB,EAAEA,MAAMP,WAAW,CAAC,IAAI,CAAC;IAC5CC,QAAQ;IACRC,WAAW,EAAGM,KAAa,IAAKN,WAAW,CAACM,KAAK,CAAC;IAClDb,IAAI,EAAEA,MAAMS,OAAO,CAAC,IAAI,CAAC;IACzBK,KAAK,EAAEA,MAAML,OAAO,CAAC,KAAK;GAC7B,CAAC,EACF,CAACL,QAAQ,EAAEE,QAAQ,CAAC,CACvB;EAED,oBACIb,cAACsB,WAAW,CAACC,QAAQ;IAACC,KAAK,EAAEN;kBACzBlB,cAACyB,IAA0B,oBAAKf,KAAK;IAAEgB,KAAK,EAAE,KAAK;IAAEnB,IAAI,EAAEA,IAAI;IAAEoB,YAAY,EAAEX;MAC1EP,OAAO,iBAAIT,cAAC4B,OAAO;IAAC1B,GAAG,EAAEA;KAAMO,OAAO,CAAW,EACjDN,QAAQ,CACgB,CACV;AAE/B,CAAC;AACDJ,IAAI,CAAC6B,OAAO,GAAGA,OAAO;AACtB7B,IAAI,CAAC8B,OAAO,GAAGA,OAAO;AACtB9B,IAAI,CAAC+B,IAAI,GAAGA,IAAI;AAChB/B,IAAI,CAACgC,IAAI,GAAGA,IAAI;AAChBhC,IAAI,CAACiC,QAAQ,GAAGA,QAAQ;AACxBjC,IAAI,CAACkC,SAAS,GAAGA,SAAS;AAC1BlC,IAAI,CAACmC,MAAM,GAAGA,MAAM;AACpBnC,IAAI,CAACoC,UAAU,GAAGA,UAAU;AAC5BpC,IAAI,CAACqC,OAAO,GAAGA,OAAO;;;;"}
1
+ {"version":3,"file":"Menu.js","sources":["../../../../../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { MenuContext } from './Context';\nimport { Content, MenuContentProps } from './components/Content';\nimport { Item, MenuItemProps } from './components/Item';\nimport { Link, MenuLinkItemProps } from './components/Link';\nimport { Trigger, MenuTriggerProps } from './components/Trigger';\nimport { Checkbox, MenuCheckboxItemProps } from './components/Checkbox';\nimport { ForwardedMenuRadioGroupWithStatics, RadioGroup } from './components/RadioGroup';\nimport { Separator, MenuSeparatorProps } from './components/Separator';\nimport { Header, MenuHeaderProps } from './components/Header';\nimport { SubMenu, MenuSubMenuProps } from './components/SubMenu';\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 /** 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 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: defaultProp, onChange, open: prop, trigger, ...props } = externalProps;\n const [indented, setIndented] = React.useState(false);\n const [minWidth, setMinWidth] = React.useState<number | undefined>(undefined);\n\n const [open, setOpen] = useControllableState<boolean>({\n // uncontrolled\n defaultProp,\n // controlled\n onChange,\n prop,\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 }),\n [indented, minWidth]\n );\n\n return (\n <MenuContext.Provider value={context}>\n <DropdownMenuPrimitive.Root {...props} modal={false} open={open} onOpenChange={setOpen}>\n {trigger && <Trigger ref={ref}>{trigger}</Trigger>}\n {children}\n </DropdownMenuPrimitive.Root>\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.Header = Header;\nMenu.RadioGroup = RadioGroup;\nMenu.SubMenu = SubMenu;\n"],"names":["Menu","React","externalProps","ref","children","defaultProp","defaultOpen","onChange","prop","open","trigger","props","_objectWithoutPropertiesLoose","_excluded","_React$useState","indented","setIndented","_React$useState2","undefined","minWidth","setMinWidth","_useControllableState","useControllableState","setOpen","context","registerIndentation","width","close","MenuContext","Provider","value","DropdownMenuPrimitive","modal","onOpenChange","Trigger","Content","Item","Link","Checkbox","Separator","Header","RadioGroup","SubMenu"],"mappings":";;;;;;;;;;;;;;;;IAqCaA,IAAI,gBAAGC,UAAgB,CAA+B,SAASD,IAAIA,CAACE,aAAa,EAAEC,GAAG;EAC/F,IAAQC,QAAQ,GAAwEF,aAAa,CAA7FE,QAAQ;IAAeC,WAAW,GAA8CH,aAAa,CAAnFI,WAAW;IAAeC,QAAQ,GAAoCL,aAAa,CAAzDK,QAAQ;IAAQC,IAAI,GAAwBN,aAAa,CAA/CO,IAAI;IAAQC,OAAO,GAAeR,aAAa,CAAnCQ,OAAO;IAAKC,KAAK,GAAAC,6BAAA,CAAKV,aAAa,EAAAW,SAAA;EACrG,IAAAC,eAAA,GAAgCb,QAAc,CAAC,KAAK,CAAC;IAA9Cc,QAAQ,GAAAD,eAAA;IAAEE,WAAW,GAAAF,eAAA;EAC5B,IAAAG,gBAAA,GAAgChB,QAAc,CAAqBiB,SAAS,CAAC;IAAtEC,QAAQ,GAAAF,gBAAA;IAAEG,YAAW,GAAAH,gBAAA;EAE5B,IAAAI,qBAAA,GAAwBC,oBAAoB,CAAU;;MAElDjB,WAAW,EAAXA,WAAW;;MAEXE,QAAQ,EAARA,QAAQ;MACRC,IAAI,EAAJA;KACH,CAAC;IANKC,IAAI,GAAAY,qBAAA;IAAEE,OAAO,GAAAF,qBAAA;EAQpB,IAAMG,OAAO,GAAGvB,OAAa,CACzB;IAAA,OAAO;MACHc,QAAQ,EAARA,QAAQ;MACRU,mBAAmB,EAAE,SAAAA;QAAA,OAAMT,WAAW,CAAC,IAAI,CAAC;;MAC5CG,QAAQ,EAARA,QAAQ;MACRC,WAAW,EAAE,SAAAA,YAACM,KAAa;QAAA,OAAKN,YAAW,CAACM,KAAK,CAAC;;MAClDjB,IAAI,EAAE,SAAAA;QAAA,OAAMc,OAAO,CAAC,IAAI,CAAC;;MACzBI,KAAK,EAAE,SAAAA;QAAA,OAAMJ,OAAO,CAAC,KAAK,CAAC;;KAC9B;GAAC,EACF,CAACR,QAAQ,EAAEI,QAAQ,CAAC,CACvB;EAED,oBACIlB,cAAC2B,WAAW,CAACC,QAAQ;IAACC,KAAK,EAAEN;kBACzBvB,cAAC8B,IAA0B,oBAAKpB,KAAK;IAAEqB,KAAK,EAAE,KAAK;IAAEvB,IAAI,EAAEA,IAAI;IAAEwB,YAAY,EAAEV;MAC1Eb,OAAO,iBAAIT,cAACiC,OAAO;IAAC/B,GAAG,EAAEA;KAAMO,OAAO,CAAW,EACjDN,QAAQ,CACgB,CACV;AAE/B,CAAC;AACDJ,IAAI,CAACkC,OAAO,GAAGA,OAAO;AACtBlC,IAAI,CAACmC,OAAO,GAAGA,OAAO;AACtBnC,IAAI,CAACoC,IAAI,GAAGA,IAAI;AAChBpC,IAAI,CAACqC,IAAI,GAAGA,IAAI;AAChBrC,IAAI,CAACsC,QAAQ,GAAGA,QAAQ;AACxBtC,IAAI,CAACuC,SAAS,GAAGA,SAAS;AAC1BvC,IAAI,CAACwC,MAAM,GAAGA,MAAM;AACpBxC,IAAI,CAACyC,UAAU,GAAGA,UAAU;AAC5BzC,IAAI,CAAC0C,OAAO,GAAGA,OAAO;;;;"}
@@ -1,16 +1,16 @@
1
1
  import { forwardRef, createElement } from 'react';
2
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { Icon } from '../../Icon/Icon.js';
3
4
  import { CheckboxItem, ItemIndicator } from '@radix-ui/react-dropdown-menu';
4
5
  import { useItemStyling } from './Item.js';
5
6
 
6
- const Checkbox = /*#__PURE__*/forwardRef(function MenuCheckboxItem(props, ref) {
7
- const {
8
- checked,
9
- children,
10
- onChange,
11
- ...otherProps
12
- } = props;
13
- const className = useItemStyling({
7
+ var _excluded = ["checked", "children", "onChange"];
8
+ var Checkbox = /*#__PURE__*/forwardRef(function MenuCheckboxItem(props, ref) {
9
+ var checked = props.checked,
10
+ children = props.children,
11
+ onChange = props.onChange,
12
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
13
+ var className = useItemStyling({
14
14
  disabled: props.disabled,
15
15
  indented: true,
16
16
  className: props.className
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../../../../../../src/components/Menu/components/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Icon } from '../../Icon/Icon';\nimport { useItemStyling } from './Item';\n\nexport type MenuCheckboxItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n /* Whether the checkbox item is disabled */\n disabled?: boolean;\n /* The current checked state (controlled) */\n checked: boolean;\n /* Handler called when the checked state changes */\n onChange: (checked: boolean | 'indeterminate') => void;\n};\n\nexport const Checkbox = React.forwardRef<HTMLDivElement, MenuCheckboxItemProps>(function MenuCheckboxItem(props, ref) {\n const { checked, children, onChange, ...otherProps } = props;\n const className = useItemStyling({\n disabled: props.disabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...otherProps}\n checked={checked}\n className={className}\n onCheckedChange={onChange}\n ref={ref}>\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-0 ml-1.5\">\n <Icon name=\"tick\" className=\"-ml-px !h-4 !w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\n"],"names":["Checkbox","React","MenuCheckboxItem","props","ref","checked","children","onChange","otherProps","className","useItemStyling","disabled","indented","DropdownMenuPrimitive","onCheckedChange","Icon","name"],"mappings":";;;;;MAcaA,QAAQ,gBAAGC,UAAgB,CAAwC,SAASC,gBAAgBA,CAACC,KAAK,EAAEC,GAAG;EAChH,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGL,KAAK;EAC5D,MAAMM,SAAS,GAAGC,cAAc,CAAC;IAC7BC,QAAQ,EAAER,KAAK,CAACQ,QAAQ;IACxBC,QAAQ,EAAE,IAAI;IACdH,SAAS,EAAEN,KAAK,CAACM;GACpB,CAAC;EAEF,oBACIR,cAACY,YAAkC,oBAC3BL,UAAU;IACdH,OAAO,EAAEA,OAAO;IAChBI,SAAS,EAAEA,SAAS;IACpBK,eAAe,EAAEP,QAAQ;IACzBH,GAAG,EAAEA;mBACLH,cAACY,aAAmC;IAACJ,SAAS,EAAC;kBAC3CR,cAACc,IAAI;IAACC,IAAI,EAAC,MAAM;IAACP,SAAS,EAAC;IAAqB,CACf,EACrCH,QAAQ,CACwB;AAE7C,CAAC;;;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../../../../../../src/components/Menu/components/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Icon } from '../../Icon/Icon';\nimport { useItemStyling } from './Item';\n\nexport type MenuCheckboxItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n /* Whether the checkbox item is disabled */\n disabled?: boolean;\n /* The current checked state (controlled) */\n checked: boolean;\n /* Handler called when the checked state changes */\n onChange: (checked: boolean | 'indeterminate') => void;\n};\n\nexport const Checkbox = React.forwardRef<HTMLDivElement, MenuCheckboxItemProps>(function MenuCheckboxItem(props, ref) {\n const { checked, children, onChange, ...otherProps } = props;\n const className = useItemStyling({\n disabled: props.disabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...otherProps}\n checked={checked}\n className={className}\n onCheckedChange={onChange}\n ref={ref}>\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-0 ml-1.5\">\n <Icon name=\"tick\" className=\"-ml-px !h-4 !w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\n"],"names":["Checkbox","React","MenuCheckboxItem","props","ref","checked","children","onChange","otherProps","_objectWithoutPropertiesLoose","_excluded","className","useItemStyling","disabled","indented","DropdownMenuPrimitive","onCheckedChange","Icon","name"],"mappings":";;;;;;;IAcaA,QAAQ,gBAAGC,UAAgB,CAAwC,SAASC,gBAAgBA,CAACC,KAAK,EAAEC,GAAG;EAChH,IAAQC,OAAO,GAAwCF,KAAK,CAApDE,OAAO;IAAEC,QAAQ,GAA8BH,KAAK,CAA3CG,QAAQ;IAAEC,QAAQ,GAAoBJ,KAAK,CAAjCI,QAAQ;IAAKC,UAAU,GAAAC,6BAAA,CAAKN,KAAK,EAAAO,SAAA;EAC5D,IAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BC,QAAQ,EAAEV,KAAK,CAACU,QAAQ;IACxBC,QAAQ,EAAE,IAAI;IACdH,SAAS,EAAER,KAAK,CAACQ;GACpB,CAAC;EAEF,oBACIV,cAACc,YAAkC,oBAC3BP,UAAU;IACdH,OAAO,EAAEA,OAAO;IAChBM,SAAS,EAAEA,SAAS;IACpBK,eAAe,EAAET,QAAQ;IACzBH,GAAG,EAAEA;mBACLH,cAACc,aAAmC;IAACJ,SAAS,EAAC;kBAC3CV,cAACgB,IAAI;IAACC,IAAI,EAAC,MAAM;IAACP,SAAS,EAAC;IAAqB,CACf,EACrCL,QAAQ,CACwB;AAE7C,CAAC;;;;"}
@@ -1,47 +1,53 @@
1
1
  import { forwardRef, useRef, Children, createRef, cloneElement, useEffect, createElement } from 'react';
2
2
  import cn from 'clsx';
3
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { useMergedRef } from '../../../hooks/useMergedRef.js';
4
5
  import { createShortcutKeyDownHandler } from '../../../utils/keyboard.js';
5
6
  import { useCurrentMenu } from '../Context.js';
6
7
  import { Portal, Content as Content$1 } from '@radix-ui/react-dropdown-menu';
7
8
 
8
- const Content = /*#__PURE__*/forwardRef(function MenuContent(props, ref) {
9
- const internalRef = useMergedRef(ref);
10
- const menu = useCurrentMenu();
11
- const {
12
- align = 'start',
13
- children,
14
- placement: side,
15
- ...otherProps
16
- } = props;
17
- const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
9
+ var _excluded = ["align", "children", "placement"];
10
+ var Content = /*#__PURE__*/forwardRef(function MenuContent(props, ref) {
11
+ var internalRef = useMergedRef(ref);
12
+ var menu = useCurrentMenu();
13
+ var _props$align = props.align,
14
+ align = _props$align === void 0 ? 'start' : _props$align,
15
+ side = props.placement,
16
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
17
+ var className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
18
18
  // attach refs to each child
19
- const childrenRefs = useRef([]);
20
- const childrenWithRefs = Children.toArray(props.children).filter(child => !!child) // remove falsey children
21
- .map((child, index) => {
19
+ var childrenRefs = useRef([]);
20
+ var childrenWithRefs = Children.toArray(props.children).filter(function (child) {
21
+ return !!child;
22
+ }) // remove falsey children
23
+ .map(function (child, index) {
22
24
  childrenRefs.current[index] = /*#__PURE__*/createRef();
23
25
  return /*#__PURE__*/cloneElement(child, {
24
26
  ref: childrenRefs.current[index]
25
27
  });
26
28
  });
27
29
  // register any shortcuts attached to children
28
- useEffect(() => {
29
- const shortcuts = [];
30
- childrenWithRefs.forEach((child, index) => {
30
+ useEffect(function () {
31
+ var shortcuts = [];
32
+ childrenWithRefs.forEach(function (child, index) {
31
33
  if (child.props.shortcut) {
32
- shortcuts.push(createShortcutKeyDownHandler(child.props.shortcut, event => {
34
+ shortcuts.push(createShortcutKeyDownHandler(child.props.shortcut, function (event) {
33
35
  event.preventDefault();
34
36
  menu === null || menu === void 0 ? void 0 : menu.open();
35
- setTimeout(() => {
37
+ setTimeout(function () {
36
38
  var _childrenRefs$current, _childrenRefs$current2;
37
39
  return (_childrenRefs$current = childrenRefs.current[index]) === null || _childrenRefs$current === void 0 ? void 0 : (_childrenRefs$current2 = _childrenRefs$current.current) === null || _childrenRefs$current2 === void 0 ? void 0 : _childrenRefs$current2.click();
38
40
  }, 1);
39
41
  }));
40
42
  }
41
43
  });
42
- shortcuts.forEach(handler => document.addEventListener('keydown', handler));
43
- return () => {
44
- shortcuts.forEach(handler => document.removeEventListener('keydown', handler));
44
+ shortcuts.forEach(function (handler) {
45
+ return document.addEventListener('keydown', handler);
46
+ });
47
+ return function () {
48
+ shortcuts.forEach(function (handler) {
49
+ return document.removeEventListener('keydown', handler);
50
+ });
45
51
  };
46
52
  }, [childrenWithRefs]);
47
53
  return /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(Content$1, Object.assign({}, otherProps, {
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { Align, Placement } from '../../../types';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useCurrentMenu } from '../Context';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<DropdownMenuPrimitive.DropdownMenuContentProps, '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, placement: side, ...otherProps } = props;\n const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);\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 menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n shortcuts.forEach(handler => document.addEventListener('keydown', handler));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler));\n };\n }, [childrenWithRefs]);\n\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n {...otherProps}\n align={align}\n className={className}\n data-taco=\"menu\"\n side={side}\n sideOffset={3}\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n );\n});\n"],"names":["Content","React","MenuContent","props","ref","internalRef","useMergedRef","menu","useCurrentMenu","align","children","placement","side","otherProps","className","cn","childrenRefs","childrenWithRefs","toArray","filter","child","map","index","current","shortcuts","forEach","shortcut","push","createShortcutKeyDownHandler","event","preventDefault","open","setTimeout","_childrenRefs$current","_childrenRefs$current2","click","handler","document","addEventListener","removeEventListener","DropdownMenuPrimitive","sideOffset","style","minWidth"],"mappings":";;;;;;;MAgBaA,OAAO,gBAAGC,UAAgB,CAAC,SAASC,WAAWA,CAACC,KAAuB,EAAEC,GAA8B;EAChH,MAAMC,WAAW,GAAGC,YAAY,CAAMF,GAAG,CAAC;EAC1C,MAAMG,IAAI,GAAGC,cAAc,EAAE;EAC7B,MAAM;IAAEC,KAAK,GAAG,OAAO;IAAEC,QAAQ;IAAEC,SAAS,EAAEC,IAAI;IAAE,GAAGC;GAAY,GAAGV,KAAK;EAC3E,MAAMW,SAAS,GAAGC,EAAE,CAAC,+EAA+E,EAAEZ,KAAK,CAACW,SAAS,CAAC;;EAGtH,MAAME,YAAY,GAAGf,MAAY,CAAoC,EAAE,CAAC;EACxE,MAAMgB,gBAAgB,GAAIhB,QAAc,CAACiB,OAAO,CAACf,KAAK,CAACO,QAAQ,CAAwD,CAClHS,MAAM,CAACC,KAAK,IAAI,CAAC,CAACA,KAAK,CAAC;GACxBC,GAAG,CAAC,CAACD,KAAK,EAAEE,KAAK;IACdN,YAAY,CAACO,OAAO,CAACD,KAAK,CAAC,gBAAGrB,SAAe,EAAkB;IAC/D,oBAAOA,YAAkB,CAACmB,KAAK,EAAE;MAAEhB,GAAG,EAAEY,YAAY,CAACO,OAAO,CAACD,KAAK;KAAG,CAAC;GACzE,CAAC;;EAGNrB,SAAe,CAAC;IACZ,MAAMuB,SAAS,GAAuC,EAAE;IACxDP,gBAAgB,CAACQ,OAAO,CAAC,CAACL,KAAK,EAAEE,KAAK;MAClC,IAAIF,KAAK,CAACjB,KAAK,CAACuB,QAAQ,EAAE;QACtBF,SAAS,CAACG,IAAI,CACVC,4BAA4B,CAACR,KAAK,CAACjB,KAAK,CAACuB,QAAQ,EAAEG,KAAK;UACpDA,KAAK,CAACC,cAAc,EAAE;UACtBvB,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEwB,IAAI,EAAE;UACZC,UAAU,CAAC;YAAA,IAAAC,qBAAA,EAAAC,sBAAA;YAAA,QAAAD,qBAAA,GAAMjB,YAAY,CAACO,OAAO,CAACD,KAAK,CAAC,cAAAW,qBAAA,wBAAAC,sBAAA,GAA3BD,qBAAA,CAA6BV,OAAO,cAAAW,sBAAA,uBAApCA,sBAAA,CAAsCC,KAAK,EAAE;aAAE,CAAC,CAAC;SACrE,CAAC,CACL;;KAER,CAAC;IAEFX,SAAS,CAACC,OAAO,CAACW,OAAO,IAAIC,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEF,OAAO,CAAC,CAAC;IAE3E,OAAO;MACHZ,SAAS,CAACC,OAAO,CAACW,OAAO,IAAIC,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEH,OAAO,CAAC,CAAC;KACjF;GACJ,EAAE,CAACnB,gBAAgB,CAAC,CAAC;EAEtB,oBACIhB,cAACuC,MAA4B,qBACzBvC,cAACuC,SAA6B,oBACtB3B,UAAU;IACdJ,KAAK,EAAEA,KAAK;IACZK,SAAS,EAAEA,SAAS;iBACV,MAAM;IAChBF,IAAI,EAAEA,IAAI;IACV6B,UAAU,EAAE,CAAC;IACbC,KAAK,EAAE;MAAEC,QAAQ,EAAEpC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEoC;KAAU;IACnCvC,GAAG,EAAEC;MACJY,gBAAgB,CACW,CACL;AAEvC,CAAC;;;;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { Align, Placement } from '../../../types';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useCurrentMenu } from '../Context';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<DropdownMenuPrimitive.DropdownMenuContentProps, '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, placement: side, ...otherProps } = props;\n const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);\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 menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n shortcuts.forEach(handler => document.addEventListener('keydown', handler));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler));\n };\n }, [childrenWithRefs]);\n\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n {...otherProps}\n align={align}\n className={className}\n data-taco=\"menu\"\n side={side}\n sideOffset={3}\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n );\n});\n"],"names":["Content","React","MenuContent","props","ref","internalRef","useMergedRef","menu","useCurrentMenu","_props$align","align","side","placement","otherProps","_objectWithoutPropertiesLoose","_excluded","className","cn","childrenRefs","childrenWithRefs","toArray","children","filter","child","map","index","current","shortcuts","forEach","shortcut","push","createShortcutKeyDownHandler","event","preventDefault","open","setTimeout","_childrenRefs$current","_childrenRefs$current2","click","handler","document","addEventListener","removeEventListener","DropdownMenuPrimitive","sideOffset","style","minWidth"],"mappings":";;;;;;;;;IAgBaA,OAAO,gBAAGC,UAAgB,CAAC,SAASC,WAAWA,CAACC,KAAuB,EAAEC,GAA8B;EAChH,IAAMC,WAAW,GAAGC,YAAY,CAAMF,GAAG,CAAC;EAC1C,IAAMG,IAAI,GAAGC,cAAc,EAAE;MAC7BC,YAAA,GAAsEN,KAAK,CAAnEO,KAAK;IAALA,KAAK,GAAAD,YAAA,cAAG,OAAO,GAAAA,YAAA;IAAuBE,IAAI,GAAoBR,KAAK,CAAxCS,SAAS;IAAWC,UAAU,GAAAC,6BAAA,CAAKX,KAAK,EAAAY,SAAA;EAC3E,IAAMC,SAAS,GAAGC,EAAE,CAAC,+EAA+E,EAAEd,KAAK,CAACa,SAAS,CAAC;;EAGtH,IAAME,YAAY,GAAGjB,MAAY,CAAoC,EAAE,CAAC;EACxE,IAAMkB,gBAAgB,GAAIlB,QAAc,CAACmB,OAAO,CAACjB,KAAK,CAACkB,QAAQ,CAAwD,CAClHC,MAAM,CAAC,UAAAC,KAAK;IAAA,OAAI,CAAC,CAACA,KAAK;IAAC;GACxBC,GAAG,CAAC,UAACD,KAAK,EAAEE,KAAK;IACdP,YAAY,CAACQ,OAAO,CAACD,KAAK,CAAC,gBAAGxB,SAAe,EAAkB;IAC/D,oBAAOA,YAAkB,CAACsB,KAAK,EAAE;MAAEnB,GAAG,EAAEc,YAAY,CAACQ,OAAO,CAACD,KAAK;KAAG,CAAC;GACzE,CAAC;;EAGNxB,SAAe,CAAC;IACZ,IAAM0B,SAAS,GAAuC,EAAE;IACxDR,gBAAgB,CAACS,OAAO,CAAC,UAACL,KAAK,EAAEE,KAAK;MAClC,IAAIF,KAAK,CAACpB,KAAK,CAAC0B,QAAQ,EAAE;QACtBF,SAAS,CAACG,IAAI,CACVC,4BAA4B,CAACR,KAAK,CAACpB,KAAK,CAAC0B,QAAQ,EAAE,UAAAG,KAAK;UACpDA,KAAK,CAACC,cAAc,EAAE;UACtB1B,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAE2B,IAAI,EAAE;UACZC,UAAU,CAAC;YAAA,IAAAC,qBAAA,EAAAC,sBAAA;YAAA,QAAAD,qBAAA,GAAMlB,YAAY,CAACQ,OAAO,CAACD,KAAK,CAAC,cAAAW,qBAAA,wBAAAC,sBAAA,GAA3BD,qBAAA,CAA6BV,OAAO,cAAAW,sBAAA,uBAApCA,sBAAA,CAAsCC,KAAK,EAAE;aAAE,CAAC,CAAC;SACrE,CAAC,CACL;;KAER,CAAC;IAEFX,SAAS,CAACC,OAAO,CAAC,UAAAW,OAAO;MAAA,OAAIC,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEF,OAAO,CAAC;MAAC;IAE3E,OAAO;MACHZ,SAAS,CAACC,OAAO,CAAC,UAAAW,OAAO;QAAA,OAAIC,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEH,OAAO,CAAC;QAAC;KACjF;GACJ,EAAE,CAACpB,gBAAgB,CAAC,CAAC;EAEtB,oBACIlB,cAAC0C,MAA4B,qBACzB1C,cAAC0C,SAA6B,oBACtB9B,UAAU;IACdH,KAAK,EAAEA,KAAK;IACZM,SAAS,EAAEA,SAAS;iBACV,MAAM;IAChBL,IAAI,EAAEA,IAAI;IACViC,UAAU,EAAE,CAAC;IACbC,KAAK,EAAE;MAAEC,QAAQ,EAAEvC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEuC;KAAU;IACnC1C,GAAG,EAAEC;MACJc,gBAAgB,CACW,CACL;AAEvC,CAAC;;;;"}
@@ -3,9 +3,9 @@ import cn from 'clsx';
3
3
  import { useCurrentMenu } from '../Context.js';
4
4
  import { Label } from '@radix-ui/react-dropdown-menu';
5
5
 
6
- const Header = /*#__PURE__*/forwardRef(function MenuHeader(props, ref) {
7
- const menu = useCurrentMenu();
8
- const className = cn('flex items-center justify-start h-7 pr-1.5 text-xs text-grey-700', {
6
+ var Header = /*#__PURE__*/forwardRef(function MenuHeader(props, ref) {
7
+ var menu = useCurrentMenu();
8
+ var className = cn('flex items-center justify-start h-7 pr-1.5 text-xs text-grey-700', {
9
9
  'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
10
10
  'pl-1.5': !(menu !== null && menu !== void 0 && menu.indented)
11
11
  }, props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":["../../../../../../../../src/components/Menu/components/Header.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Header = React.forwardRef<HTMLDivElement, MenuHeaderProps>(function MenuHeader(props, ref) {\n const menu = useCurrentMenu();\n const className = cn(\n 'flex items-center justify-start h-7 pr-1.5 text-xs text-grey-700',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n },\n props.className\n );\n\n return <DropdownMenuPrimitive.Label {...props} className={className} ref={ref} />;\n});\n"],"names":["Header","React","MenuHeader","props","ref","menu","useCurrentMenu","className","cn","indented","DropdownMenuPrimitive"],"mappings":";;;;;MAOaA,MAAM,gBAAGC,UAAgB,CAAkC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG;EAClG,MAAMC,IAAI,GAAGC,cAAc,EAAE;EAC7B,MAAMC,SAAS,GAAGC,EAAE,CAChB,kEAAkE,EAClE;IACI,MAAM,EAAEH,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEI,QAAQ;IACtB,QAAQ,EAAE,EAACJ,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEI,QAAQ;GAC5B,EACDN,KAAK,CAACI,SAAS,CAClB;EAED,oBAAON,cAACS,KAA2B,oBAAKP,KAAK;IAAEI,SAAS,EAAEA,SAAS;IAAEH,GAAG,EAAEA;KAAO;AACrF,CAAC;;;;"}
1
+ {"version":3,"file":"Header.js","sources":["../../../../../../../../src/components/Menu/components/Header.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Header = React.forwardRef<HTMLDivElement, MenuHeaderProps>(function MenuHeader(props, ref) {\n const menu = useCurrentMenu();\n const className = cn(\n 'flex items-center justify-start h-7 pr-1.5 text-xs text-grey-700',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n },\n props.className\n );\n\n return <DropdownMenuPrimitive.Label {...props} className={className} ref={ref} />;\n});\n"],"names":["Header","React","MenuHeader","props","ref","menu","useCurrentMenu","className","cn","indented","DropdownMenuPrimitive"],"mappings":";;;;;IAOaA,MAAM,gBAAGC,UAAgB,CAAkC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG;EAClG,IAAMC,IAAI,GAAGC,cAAc,EAAE;EAC7B,IAAMC,SAAS,GAAGC,EAAE,CAChB,kEAAkE,EAClE;IACI,MAAM,EAAEH,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEI,QAAQ;IACtB,QAAQ,EAAE,EAACJ,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEI,QAAQ;GAC5B,EACDN,KAAK,CAACI,SAAS,CAClB;EAED,oBAAON,cAACS,KAA2B,oBAAKP,KAAK;IAAEI,SAAS,EAAEA,SAAS;IAAEH,GAAG,EAAEA;KAAO;AACrF,CAAC;;;;"}
@@ -1,25 +1,27 @@
1
1
  import { forwardRef, createElement, useEffect } from 'react';
2
2
  import cn from 'clsx';
3
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { Icon as Icon$1 } from '../../Icon/Icon.js';
4
5
  import { useCurrentMenu } from '../Context.js';
5
6
  import { Sub, SubTrigger, Item as Item$1 } from '@radix-ui/react-dropdown-menu';
6
7
  import { Shortcut } from '../../Shortcut/Shortcut.js';
7
8
 
8
- const Icon = ({
9
- name
10
- }) => (/*#__PURE__*/createElement("span", {
11
- className: "absolute left-0 ml-1"
12
- }, /*#__PURE__*/createElement(Icon$1, {
13
- className: "-ml-px -mt-px !h-5 !w-5",
14
- name: name
15
- })));
16
- const useItemStyling = ({
17
- disabled,
18
- indented,
19
- className
20
- }) => {
21
- const menu = useCurrentMenu();
22
- useEffect(() => {
9
+ var _excluded = ["dialog", "icon", "onClick", "popover", "shortcut", "subMenu"];
10
+ var Icon = function Icon(_ref) {
11
+ var name = _ref.name;
12
+ return /*#__PURE__*/createElement("span", {
13
+ className: "absolute left-0 ml-1"
14
+ }, /*#__PURE__*/createElement(Icon$1, {
15
+ className: "-ml-px -mt-px !h-5 !w-5",
16
+ name: name
17
+ }));
18
+ };
19
+ var useItemStyling = function useItemStyling(_ref2) {
20
+ var disabled = _ref2.disabled,
21
+ indented = _ref2.indented,
22
+ className = _ref2.className;
23
+ var menu = useCurrentMenu();
24
+ useEffect(function () {
23
25
  if (indented && !(menu !== null && menu !== void 0 && menu.indented)) {
24
26
  menu === null || menu === void 0 ? void 0 : menu.registerIndentation();
25
27
  }
@@ -31,28 +33,26 @@ const useItemStyling = ({
31
33
  'cursor-not-allowed hover:bg-white text-grey-300': disabled
32
34
  }, className);
33
35
  };
34
- const Item = /*#__PURE__*/forwardRef(function MenuItem(props, ref) {
36
+ var Item = /*#__PURE__*/forwardRef(function MenuItem(props, ref) {
35
37
  var _props$disabled;
36
- const {
37
- dialog,
38
- icon,
39
- onClick,
40
- popover,
41
- shortcut,
42
- subMenu,
43
- ...otherProps
44
- } = props;
45
- const menu = useCurrentMenu();
46
- const className = useItemStyling({
38
+ var dialog = props.dialog,
39
+ icon = props.icon,
40
+ onClick = props.onClick,
41
+ popover = props.popover,
42
+ shortcut = props.shortcut,
43
+ subMenu = props.subMenu,
44
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
45
+ var menu = useCurrentMenu();
46
+ var className = useItemStyling({
47
47
  disabled: props.disabled,
48
48
  indented: !!icon,
49
49
  className: props.className
50
50
  });
51
- const disabled = (_props$disabled = props.disabled) !== null && _props$disabled !== void 0 ? _props$disabled : props['aria-disabled'];
52
- let handleClick;
51
+ var disabled = (_props$disabled = props.disabled) !== null && _props$disabled !== void 0 ? _props$disabled : props['aria-disabled'];
52
+ var handleClick;
53
53
  // radix has a bug that does not disable clicks when disabled is set on items
54
54
  if (disabled) {
55
- handleClick = event => {
55
+ handleClick = function handleClick(event) {
56
56
  event.preventDefault();
57
57
  event.stopPropagation();
58
58
  };
@@ -69,7 +69,7 @@ const Item = /*#__PURE__*/forwardRef(function MenuItem(props, ref) {
69
69
  name: "chevron-right"
70
70
  })), subMenu());
71
71
  }
72
- const handleSelect = event => {
72
+ var handleSelect = function handleSelect(event) {
73
73
  if (onClick) {
74
74
  onClick(event);
75
75
  }
@@ -77,7 +77,7 @@ const Item = /*#__PURE__*/forwardRef(function MenuItem(props, ref) {
77
77
  event.preventDefault();
78
78
  }
79
79
  };
80
- let button = /*#__PURE__*/createElement(Item$1, Object.assign({}, otherProps, {
80
+ var button = /*#__PURE__*/createElement(Item$1, Object.assign({}, otherProps, {
81
81
  className: className,
82
82
  onClick: handleClick,
83
83
  onSelect: handleSelect,
@@ -1 +1 @@
1
- {"version":3,"file":"Item.js","sources":["../../../../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { useCurrentMenu } from '../Context';\nimport { DialogProps } from '../../Dialog/Dialog';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { PopoverProps } from '../../Popover/Popover';\nimport { KeyDownHandlerOptions } from '../../../utils/keyboard';\n\nexport const Icon = ({ name }) => (\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 = ({ disabled, indented, className }) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n 'cursor-pointer text-black hover:wcag-grey-200 data-[highlighted]:wcag-grey-200': !disabled,\n 'cursor-not-allowed hover:bg-white text-grey-300': 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 popover?: (props: Partial<PopoverProps>) => JSX.Element;\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, popover, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\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'];\n\n let handleClick;\n\n // radix has a bug that does not disable clicks when disabled is set on items\n if (disabled) {\n handleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n };\n }\n\n if (subMenu) {\n return (\n <DropdownMenuPrimitive.Sub>\n <DropdownMenuPrimitive.SubTrigger {...otherProps} className={className} onClick={handleClick} 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 </DropdownMenuPrimitive.SubTrigger>\n {subMenu()}\n </DropdownMenuPrimitive.Sub>\n );\n }\n\n const handleSelect = event => {\n if (onClick) {\n onClick(event);\n }\n\n if (props['aria-haspopup'] || typeof dialog === 'function' || typeof popover === 'function') {\n event.preventDefault();\n }\n };\n\n let button = (\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-grey-700\" />\n </span>\n ) : null}\n </DropdownMenuPrimitive.Item>\n );\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button, onClose: menu?.close });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n return button;\n});\n"],"names":["Icon","name","React","className","IconPrimitive","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Item","MenuItem","props","ref","dialog","icon","onClick","popover","shortcut","subMenu","otherProps","_props$disabled","handleClick","event","preventDefault","stopPropagation","DropdownMenuPrimitive","children","handleSelect","button","onSelect","Shortcut","keys","trigger","onClose","close"],"mappings":";;;;;;;MAWaA,IAAI,GAAGA,CAAC;EAAEC;CAAM,mBACzBC;EAAMC,SAAS,EAAC;gBACZD,cAACE,MAAa;EAACD,SAAS,EAAC,yBAAyB;EAACF,IAAI,EAAEA;EAAQ,CAC9D;MAGEI,cAAc,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAEJ;CAAW;EAC5D,MAAMK,IAAI,GAAGC,cAAc,EAAE;EAE7BP,SAAe,CAAC;IACZ,IAAIK,QAAQ,IAAI,EAACC,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAED,QAAQ,GAAE;MAC7BC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,mBAAmB,EAAE;;GAElC,EAAE,CAACH,QAAQ,CAAC,CAAC;EAEd,OAAOI,EAAE,CACL,6FAA6F,EAC7F;IACI,MAAM,EAAEH,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAED,QAAQ;IACtB,QAAQ,EAAE,EAACC,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAED,QAAQ;IACzB,gFAAgF,EAAE,CAACD,QAAQ;IAC3F,iDAAiD,EAAEA;GACtD,EACDH,SAAS,CACZ;AACL;MAYaS,IAAI,gBAAGV,UAAgB,CAAC,SAASW,QAAQA,CAACC,KAAoB,EAAEC,GAA8B;;EACvG,MAAM;IAAEC,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGR,KAAK;EAClF,MAAMN,IAAI,GAAGC,cAAc,EAAE;EAC7B,MAAMN,SAAS,GAAGE,cAAc,CAAC;IAC7BC,QAAQ,EAAEQ,KAAK,CAACR,QAAQ;IACxBC,QAAQ,EAAE,CAAC,CAACU,IAAI;IAChBd,SAAS,EAAEW,KAAK,CAACX;GACpB,CAAC;EAEF,MAAMG,QAAQ,IAAAiB,eAAA,GAAGT,KAAK,CAACR,QAAQ,cAAAiB,eAAA,cAAAA,eAAA,GAAIT,KAAK,CAAC,eAAe,CAAC;EAEzD,IAAIU,WAAW;;EAGf,IAAIlB,QAAQ,EAAE;IACVkB,WAAW,GAAGC,KAAK;MACfA,KAAK,CAACC,cAAc,EAAE;MACtBD,KAAK,CAACE,eAAe,EAAE;KAC1B;;EAGL,IAAIN,OAAO,EAAE;IACT,oBACInB,cAAC0B,GAAyB,qBACtB1B,cAAC0B,UAAgC,oBAAKN,UAAU;MAAEnB,SAAS,EAAEA,SAAS;MAAEe,OAAO,EAAEM,WAAW;MAAET,GAAG,EAAEA;QAC9FE,IAAI,gBAAGf,cAACF,IAAI;MAACC,IAAI,EAAEgB;MAAQ,GAAG,IAAI,EAClCH,KAAK,CAACe,QAAQ,eACf3B,cAACE,MAAa;MAACD,SAAS,EAAC,2BAA2B;MAACF,IAAI,EAAC;MAAkB,CAC7C,EAClCoB,OAAO,EAAE,CACc;;EAIpC,MAAMS,YAAY,GAAGL,KAAK;IACtB,IAAIP,OAAO,EAAE;MACTA,OAAO,CAACO,KAAK,CAAC;;IAGlB,IAAIX,KAAK,CAAC,eAAe,CAAC,IAAI,OAAOE,MAAM,KAAK,UAAU,IAAI,OAAOG,OAAO,KAAK,UAAU,EAAE;MACzFM,KAAK,CAACC,cAAc,EAAE;;GAE7B;EAED,IAAIK,MAAM,gBACN7B,cAAC0B,MAA0B,oBAAKN,UAAU;IAAEnB,SAAS,EAAEA,SAAS;IAAEe,OAAO,EAAEM,WAAW;IAAEQ,QAAQ,EAAEF,YAAY;IAAEf,GAAG,EAAEA;MAChHE,IAAI,gBAAGf,cAACF,IAAI;IAACC,IAAI,EAAEgB;IAAQ,GAAG,IAAI,EAClCH,KAAK,CAACe,QAAQ,EACdT,QAAQ,iBACLlB;IAAMC,SAAS,EAAC;kBACZD,cAAC+B,QAAQ;IAACC,IAAI,EAAEd,QAAQ;IAAEjB,SAAS,EAAC;IAAkB,CACnD,IACP,IAAI,CAEf;EAED,IAAI,OAAOa,MAAM,KAAK,UAAU,EAAE;IAC9Be,MAAM,GAAGf,MAAM,CAAC;MAAEmB,OAAO,EAAEJ,MAAM;MAAEK,OAAO,EAAE5B,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAE6B;KAAO,CAAC;GAC7D,MAAM,IAAI,OAAOlB,OAAO,KAAK,UAAU,EAAE;IACtCY,MAAM,GAAGZ,OAAO,CAAC;MAAEgB,OAAO,EAAEJ;KAAQ,CAAC;;EAGzC,OAAOA,MAAM;AACjB,CAAC;;;;"}
1
+ {"version":3,"file":"Item.js","sources":["../../../../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { useCurrentMenu } from '../Context';\nimport { DialogProps } from '../../Dialog/Dialog';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { PopoverProps } from '../../Popover/Popover';\nimport { KeyDownHandlerOptions } from '../../../utils/keyboard';\n\nexport const Icon = ({ name }) => (\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 = ({ disabled, indented, className }) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n 'cursor-pointer text-black hover:wcag-grey-200 data-[highlighted]:wcag-grey-200': !disabled,\n 'cursor-not-allowed hover:bg-white text-grey-300': 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 popover?: (props: Partial<PopoverProps>) => JSX.Element;\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, popover, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\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'];\n\n let handleClick;\n\n // radix has a bug that does not disable clicks when disabled is set on items\n if (disabled) {\n handleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n };\n }\n\n if (subMenu) {\n return (\n <DropdownMenuPrimitive.Sub>\n <DropdownMenuPrimitive.SubTrigger {...otherProps} className={className} onClick={handleClick} 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 </DropdownMenuPrimitive.SubTrigger>\n {subMenu()}\n </DropdownMenuPrimitive.Sub>\n );\n }\n\n const handleSelect = event => {\n if (onClick) {\n onClick(event);\n }\n\n if (props['aria-haspopup'] || typeof dialog === 'function' || typeof popover === 'function') {\n event.preventDefault();\n }\n };\n\n let button = (\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-grey-700\" />\n </span>\n ) : null}\n </DropdownMenuPrimitive.Item>\n );\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button, onClose: menu?.close });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n return button;\n});\n"],"names":["Icon","_ref","name","React","className","IconPrimitive","useItemStyling","_ref2","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Item","MenuItem","props","ref","dialog","icon","onClick","popover","shortcut","subMenu","otherProps","_objectWithoutPropertiesLoose","_excluded","_props$disabled","handleClick","event","preventDefault","stopPropagation","DropdownMenuPrimitive","children","handleSelect","button","onSelect","Shortcut","keys","trigger","onClose","close"],"mappings":";;;;;;;;;IAWaA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA;EAAA,IAAMC,IAAI,GAAAD,IAAA,CAAJC,IAAI;EAAA,oBACvBC;IAAMC,SAAS,EAAC;kBACZD,cAACE,MAAa;IAACD,SAAS,EAAC,yBAAyB;IAACF,IAAI,EAAEA;IAAQ,CAC9D;AAAA;IAGEI,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,KAAA;MAAMC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAEC,QAAQ,GAAAF,KAAA,CAARE,QAAQ;IAAEL,SAAS,GAAAG,KAAA,CAATH,SAAS;EAC1D,IAAMM,IAAI,GAAGC,cAAc,EAAE;EAE7BR,SAAe,CAAC;IACZ,IAAIM,QAAQ,IAAI,EAACC,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAED,QAAQ,GAAE;MAC7BC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,mBAAmB,EAAE;;GAElC,EAAE,CAACH,QAAQ,CAAC,CAAC;EAEd,OAAOI,EAAE,CACL,6FAA6F,EAC7F;IACI,MAAM,EAAEH,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAED,QAAQ;IACtB,QAAQ,EAAE,EAACC,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAED,QAAQ;IACzB,gFAAgF,EAAE,CAACD,QAAQ;IAC3F,iDAAiD,EAAEA;GACtD,EACDJ,SAAS,CACZ;AACL;IAYaU,IAAI,gBAAGX,UAAgB,CAAC,SAASY,QAAQA,CAACC,KAAoB,EAAEC,GAA8B;;EACvG,IAAQC,MAAM,GAA+DF,KAAK,CAA1EE,MAAM;IAAEC,IAAI,GAAyDH,KAAK,CAAlEG,IAAI;IAAEC,OAAO,GAAgDJ,KAAK,CAA5DI,OAAO;IAAEC,OAAO,GAAuCL,KAAK,CAAnDK,OAAO;IAAEC,QAAQ,GAA6BN,KAAK,CAA1CM,QAAQ;IAAEC,OAAO,GAAoBP,KAAK,CAAhCO,OAAO;IAAKC,UAAU,GAAAC,6BAAA,CAAKT,KAAK,EAAAU,SAAA;EAClF,IAAMhB,IAAI,GAAGC,cAAc,EAAE;EAC7B,IAAMP,SAAS,GAAGE,cAAc,CAAC;IAC7BE,QAAQ,EAAEQ,KAAK,CAACR,QAAQ;IACxBC,QAAQ,EAAE,CAAC,CAACU,IAAI;IAChBf,SAAS,EAAEY,KAAK,CAACZ;GACpB,CAAC;EAEF,IAAMI,QAAQ,IAAAmB,eAAA,GAAGX,KAAK,CAACR,QAAQ,cAAAmB,eAAA,cAAAA,eAAA,GAAIX,KAAK,CAAC,eAAe,CAAC;EAEzD,IAAIY,WAAW;;EAGf,IAAIpB,QAAQ,EAAE;IACVoB,WAAW,GAAG,SAAAA,YAAAC,KAAK;MACfA,KAAK,CAACC,cAAc,EAAE;MACtBD,KAAK,CAACE,eAAe,EAAE;KAC1B;;EAGL,IAAIR,OAAO,EAAE;IACT,oBACIpB,cAAC6B,GAAyB,qBACtB7B,cAAC6B,UAAgC,oBAAKR,UAAU;MAAEpB,SAAS,EAAEA,SAAS;MAAEgB,OAAO,EAAEQ,WAAW;MAAEX,GAAG,EAAEA;QAC9FE,IAAI,gBAAGhB,cAACH,IAAI;MAACE,IAAI,EAAEiB;MAAQ,GAAG,IAAI,EAClCH,KAAK,CAACiB,QAAQ,eACf9B,cAACE,MAAa;MAACD,SAAS,EAAC,2BAA2B;MAACF,IAAI,EAAC;MAAkB,CAC7C,EAClCqB,OAAO,EAAE,CACc;;EAIpC,IAAMW,YAAY,GAAG,SAAfA,YAAYA,CAAGL,KAAK;IACtB,IAAIT,OAAO,EAAE;MACTA,OAAO,CAACS,KAAK,CAAC;;IAGlB,IAAIb,KAAK,CAAC,eAAe,CAAC,IAAI,OAAOE,MAAM,KAAK,UAAU,IAAI,OAAOG,OAAO,KAAK,UAAU,EAAE;MACzFQ,KAAK,CAACC,cAAc,EAAE;;GAE7B;EAED,IAAIK,MAAM,gBACNhC,cAAC6B,MAA0B,oBAAKR,UAAU;IAAEpB,SAAS,EAAEA,SAAS;IAAEgB,OAAO,EAAEQ,WAAW;IAAEQ,QAAQ,EAAEF,YAAY;IAAEjB,GAAG,EAAEA;MAChHE,IAAI,gBAAGhB,cAACH,IAAI;IAACE,IAAI,EAAEiB;IAAQ,GAAG,IAAI,EAClCH,KAAK,CAACiB,QAAQ,EACdX,QAAQ,iBACLnB;IAAMC,SAAS,EAAC;kBACZD,cAACkC,QAAQ;IAACC,IAAI,EAAEhB,QAAQ;IAAElB,SAAS,EAAC;IAAkB,CACnD,IACP,IAAI,CAEf;EAED,IAAI,OAAOc,MAAM,KAAK,UAAU,EAAE;IAC9BiB,MAAM,GAAGjB,MAAM,CAAC;MAAEqB,OAAO,EAAEJ,MAAM;MAAEK,OAAO,EAAE9B,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAE+B;KAAO,CAAC;GAC7D,MAAM,IAAI,OAAOpB,OAAO,KAAK,UAAU,EAAE;IACtCc,MAAM,GAAGd,OAAO,CAAC;MAAEkB,OAAO,EAAEJ;KAAQ,CAAC;;EAGzC,OAAOA,MAAM;AACjB,CAAC;;;;"}
@@ -1,22 +1,22 @@
1
1
  import { forwardRef, createElement } from 'react';
2
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { useCurrentMenu } from '../Context.js';
3
4
  import { Item } from '@radix-ui/react-dropdown-menu';
4
5
  import { useItemStyling, Icon } from './Item.js';
5
6
 
6
- const Link = /*#__PURE__*/forwardRef(function MenuLink(props, ref) {
7
- const {
8
- href,
9
- icon,
10
- onClick,
11
- ...otherProps
12
- } = props;
13
- const menu = useCurrentMenu();
14
- const className = useItemStyling({
7
+ var _excluded = ["href", "icon", "onClick"];
8
+ var Link = /*#__PURE__*/forwardRef(function MenuLink(props, ref) {
9
+ var href = props.href,
10
+ icon = props.icon,
11
+ onClick = props.onClick,
12
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
13
+ var menu = useCurrentMenu();
14
+ var className = useItemStyling({
15
15
  disabled: props.disabled,
16
16
  indented: !!icon,
17
17
  className: props.className
18
18
  });
19
- const handleClick = event => {
19
+ var handleClick = function handleClick(event) {
20
20
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
21
21
  menu === null || menu === void 0 ? void 0 : menu.close();
22
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../../../../../../src/components/Menu/components/Link.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon, useItemStyling } from './Item';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuLinkItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n disabled?: boolean;\n icon?: IconName;\n href: string;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n};\n\nexport const Link = React.forwardRef(function MenuLink(props: MenuLinkItemProps, ref: React.Ref<HTMLDivElement>) {\n const { href, icon, onClick, ...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 handleClick: React.MouseEventHandler<HTMLDivElement> = event => {\n onClick?.(event);\n menu?.close();\n };\n\n return (\n <DropdownMenuPrimitive.Item {...otherProps} asChild className={className} ref={ref} onClick={handleClick}>\n <a href={href} target=\"_blank\">\n {icon && <Icon name={icon} />}\n {props.children}\n </a>\n </DropdownMenuPrimitive.Item>\n );\n});\n"],"names":["Link","React","MenuLink","props","ref","href","icon","onClick","otherProps","menu","useCurrentMenu","className","useItemStyling","disabled","indented","handleClick","event","close","DropdownMenuPrimitive","asChild","target","Icon","name","children"],"mappings":";;;;;MAaaA,IAAI,gBAAGC,UAAgB,CAAC,SAASC,QAAQA,CAACC,KAAwB,EAAEC,GAA8B;EAC3G,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGL,KAAK;EACpD,MAAMM,IAAI,GAAGC,cAAc,EAAE;EAE7B,MAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BC,QAAQ,EAAEV,KAAK,CAACU,QAAQ;IACxBC,QAAQ,EAAE,CAAC,CAACR,IAAI;IAChBK,SAAS,EAAER,KAAK,CAACQ;GACpB,CAAC;EAEF,MAAMI,WAAW,GAA4CC,KAAK;IAC9DT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGS,KAAK,CAAC;IAChBP,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEQ,KAAK,EAAE;GAChB;EAED,oBACIhB,cAACiB,IAA0B,oBAAKV,UAAU;IAAEW,OAAO;IAACR,SAAS,EAAEA,SAAS;IAAEP,GAAG,EAAEA,GAAG;IAAEG,OAAO,EAAEQ;mBACzFd;IAAGI,IAAI,EAAEA,IAAI;IAAEe,MAAM,EAAC;KACjBd,IAAI,iBAAIL,cAACoB,IAAI;IAACC,IAAI,EAAEhB;IAAQ,EAC5BH,KAAK,CAACoB,QAAQ,CACf,CACqB;AAErC,CAAC;;;;"}
1
+ {"version":3,"file":"Link.js","sources":["../../../../../../../../src/components/Menu/components/Link.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon, useItemStyling } from './Item';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuLinkItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n disabled?: boolean;\n icon?: IconName;\n href: string;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n};\n\nexport const Link = React.forwardRef(function MenuLink(props: MenuLinkItemProps, ref: React.Ref<HTMLDivElement>) {\n const { href, icon, onClick, ...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 handleClick: React.MouseEventHandler<HTMLDivElement> = event => {\n onClick?.(event);\n menu?.close();\n };\n\n return (\n <DropdownMenuPrimitive.Item {...otherProps} asChild className={className} ref={ref} onClick={handleClick}>\n <a href={href} target=\"_blank\">\n {icon && <Icon name={icon} />}\n {props.children}\n </a>\n </DropdownMenuPrimitive.Item>\n );\n});\n"],"names":["Link","React","MenuLink","props","ref","href","icon","onClick","otherProps","_objectWithoutPropertiesLoose","_excluded","menu","useCurrentMenu","className","useItemStyling","disabled","indented","handleClick","event","close","DropdownMenuPrimitive","asChild","target","Icon","name","children"],"mappings":";;;;;;;IAaaA,IAAI,gBAAGC,UAAgB,CAAC,SAASC,QAAQA,CAACC,KAAwB,EAAEC,GAA8B;EAC3G,IAAQC,IAAI,GAAmCF,KAAK,CAA5CE,IAAI;IAAEC,IAAI,GAA6BH,KAAK,CAAtCG,IAAI;IAAEC,OAAO,GAAoBJ,KAAK,CAAhCI,OAAO;IAAKC,UAAU,GAAAC,6BAAA,CAAKN,KAAK,EAAAO,SAAA;EACpD,IAAMC,IAAI,GAAGC,cAAc,EAAE;EAE7B,IAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BC,QAAQ,EAAEZ,KAAK,CAACY,QAAQ;IACxBC,QAAQ,EAAE,CAAC,CAACV,IAAI;IAChBO,SAAS,EAAEV,KAAK,CAACU;GACpB,CAAC;EAEF,IAAMI,WAAW,GAA4C,SAAvDA,WAAWA,CAA4CC,KAAK;IAC9DX,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGW,KAAK,CAAC;IAChBP,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEQ,KAAK,EAAE;GAChB;EAED,oBACIlB,cAACmB,IAA0B,oBAAKZ,UAAU;IAAEa,OAAO;IAACR,SAAS,EAAEA,SAAS;IAAET,GAAG,EAAEA,GAAG;IAAEG,OAAO,EAAEU;mBACzFhB;IAAGI,IAAI,EAAEA,IAAI;IAAEiB,MAAM,EAAC;KACjBhB,IAAI,iBAAIL,cAACsB,IAAI;IAACC,IAAI,EAAElB;IAAQ,EAC5BH,KAAK,CAACsB,QAAQ,CACf,CACqB;AAErC,CAAC;;;;"}
@@ -1,18 +1,18 @@
1
1
  import { useContext, createElement, createContext, forwardRef } from 'react';
2
2
  import cn from 'clsx';
3
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { RadioItem as RadioItem$1, ItemIndicator, RadioGroup as RadioGroup$1 } from '@radix-ui/react-dropdown-menu';
4
5
  import { useItemStyling } from './Item.js';
5
6
  import { getRadioGroupItemValueAsString, useRadioGroup } from '../../RadioGroup/RadioGroup.js';
6
7
 
7
- const RadioItem = props => {
8
- const context = useContext(MenuRadioGroupContext);
9
- const {
10
- children,
11
- value,
12
- ...otherProps
13
- } = props;
14
- const disabled = context.disabled || props.disabled;
15
- const className = useItemStyling({
8
+ var _excluded = ["children", "value"];
9
+ var RadioItem = function RadioItem(props) {
10
+ var context = useContext(MenuRadioGroupContext);
11
+ var children = props.children,
12
+ value = props.value,
13
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
14
+ var disabled = context.disabled || props.disabled;
15
+ var className = useItemStyling({
16
16
  disabled: disabled,
17
17
  indented: true,
18
18
  className: props.className
@@ -27,15 +27,14 @@ const RadioItem = props => {
27
27
  className: "ml-1 flex h-1.5 w-1.5 rounded-full bg-current "
28
28
  })), children);
29
29
  };
30
- const MenuRadioGroupContext = /*#__PURE__*/createContext({
30
+ var MenuRadioGroupContext = /*#__PURE__*/createContext({
31
31
  disabled: false
32
32
  });
33
- const RadioGroup = /*#__PURE__*/forwardRef(function MenuRadioItem(props, ref) {
34
- const {
35
- context,
36
- props: otherProps
37
- } = useRadioGroup(props);
38
- const className = cn('flex flex-col', props.className);
33
+ var RadioGroup = /*#__PURE__*/forwardRef(function MenuRadioItem(props, ref) {
34
+ var _useRadioGroup = useRadioGroup(props),
35
+ context = _useRadioGroup.context,
36
+ otherProps = _useRadioGroup.props;
37
+ var className = cn('flex flex-col', props.className);
39
38
  return /*#__PURE__*/createElement(MenuRadioGroupContext.Provider, {
40
39
  value: context
41
40
  }, /*#__PURE__*/createElement(RadioGroup$1, Object.assign({}, otherProps, {
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../../../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { getRadioGroupItemValueAsString, RadioGroupItemProps, RadioGroupProps, useRadioGroup } from '../../RadioGroup/RadioGroup';\nimport { useItemStyling } from './Item';\n\nexport type MenuRadioGroupItemProps = RadioGroupItemProps<HTMLDivElement>;\n\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const context = React.useContext(MenuRadioGroupContext);\n const { children, value, ...otherProps } = props;\n const disabled = context.disabled || props.disabled;\n const className = useItemStyling({\n disabled: disabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <DropdownMenuPrimitive.RadioItem\n {...otherProps}\n className={className}\n disabled={disabled}\n value={getRadioGroupItemValueAsString(value)}>\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current \" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n};\n\nconst MenuRadioGroupContext = React.createContext({ disabled: false });\n\nexport type MenuRadioGroupProps = RadioGroupProps;\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 { context, props: otherProps } = useRadioGroup(props);\n const className = cn('flex flex-col', props.className);\n\n return (\n <MenuRadioGroupContext.Provider value={context}>\n <DropdownMenuPrimitive.RadioGroup {...otherProps} className={className} ref={ref} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\nRadioGroup.Item = RadioItem;\n"],"names":["RadioItem","props","context","React","MenuRadioGroupContext","children","value","otherProps","disabled","className","useItemStyling","indented","DropdownMenuPrimitive","getRadioGroupItemValueAsString","RadioGroup","MenuRadioItem","ref","useRadioGroup","cn","Provider","Item"],"mappings":";;;;;;MAQaA,SAAS,GAAIC,KAA8B;EACpD,MAAMC,OAAO,GAAGC,UAAgB,CAACC,qBAAqB,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAE,GAAGC;GAAY,GAAGN,KAAK;EAChD,MAAMO,QAAQ,GAAGN,OAAO,CAACM,QAAQ,IAAIP,KAAK,CAACO,QAAQ;EACnD,MAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BF,QAAQ,EAAEA,QAAQ;IAClBG,QAAQ,EAAE,IAAI;IACdF,SAAS,EAAER,KAAK,CAACQ;GACpB,CAAC;EAEF,oBACIN,cAACS,WAA+B,oBACxBL,UAAU;IACdE,SAAS,EAAEA,SAAS;IACpBD,QAAQ,EAAEA,QAAQ;IAClBF,KAAK,EAAEO,8BAA8B,CAACP,KAAK;mBAC3CH,cAACS,aAAmC;IAACH,SAAS,EAAC;kBAC3CN;IAAMM,SAAS,EAAC;IAAmD,CACjC,EACrCJ,QAAQ,CACqB;AAE1C;AAEA,MAAMD,qBAAqB,gBAAGD,aAAmB,CAAC;EAAEK,QAAQ,EAAE;CAAO,CAAC;MAUzDM,UAAU,gBAAGX,UAAgB,CAAsC,SAASY,aAAaA,CAACd,KAAK,EAAEe,GAAG;EAC7G,MAAM;IAAEd,OAAO;IAAED,KAAK,EAAEM;GAAY,GAAGU,aAAa,CAAChB,KAAK,CAAC;EAC3D,MAAMQ,SAAS,GAAGS,EAAE,CAAC,eAAe,EAAEjB,KAAK,CAACQ,SAAS,CAAC;EAEtD,oBACIN,cAACC,qBAAqB,CAACe,QAAQ;IAACb,KAAK,EAAEJ;kBACnCC,cAACS,YAAgC,oBAAKL,UAAU;IAAEE,SAAS,EAAEA,SAAS;IAAEO,GAAG,EAAEA;KAAO,CACvD;AAEzC,CAAC;AACDF,UAAU,CAACM,IAAI,GAAGpB,SAAS;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../../../../../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'clsx';\nimport { getRadioGroupItemValueAsString, RadioGroupItemProps, RadioGroupProps, useRadioGroup } from '../../RadioGroup/RadioGroup';\nimport { useItemStyling } from './Item';\n\nexport type MenuRadioGroupItemProps = RadioGroupItemProps<HTMLDivElement>;\n\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const context = React.useContext(MenuRadioGroupContext);\n const { children, value, ...otherProps } = props;\n const disabled = context.disabled || props.disabled;\n const className = useItemStyling({\n disabled: disabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <DropdownMenuPrimitive.RadioItem\n {...otherProps}\n className={className}\n disabled={disabled}\n value={getRadioGroupItemValueAsString(value)}>\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current \" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n};\n\nconst MenuRadioGroupContext = React.createContext({ disabled: false });\n\nexport type MenuRadioGroupProps = RadioGroupProps;\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 { context, props: otherProps } = useRadioGroup(props);\n const className = cn('flex flex-col', props.className);\n\n return (\n <MenuRadioGroupContext.Provider value={context}>\n <DropdownMenuPrimitive.RadioGroup {...otherProps} className={className} ref={ref} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\nRadioGroup.Item = RadioItem;\n"],"names":["RadioItem","props","context","React","MenuRadioGroupContext","children","value","otherProps","_objectWithoutPropertiesLoose","_excluded","disabled","className","useItemStyling","indented","DropdownMenuPrimitive","getRadioGroupItemValueAsString","RadioGroup","MenuRadioItem","ref","_useRadioGroup","useRadioGroup","cn","Provider","Item"],"mappings":";;;;;;;;IAQaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,KAA8B;EACpD,IAAMC,OAAO,GAAGC,UAAgB,CAACC,qBAAqB,CAAC;EACvD,IAAQC,QAAQ,GAA2BJ,KAAK,CAAxCI,QAAQ;IAAEC,KAAK,GAAoBL,KAAK,CAA9BK,KAAK;IAAKC,UAAU,GAAAC,6BAAA,CAAKP,KAAK,EAAAQ,SAAA;EAChD,IAAMC,QAAQ,GAAGR,OAAO,CAACQ,QAAQ,IAAIT,KAAK,CAACS,QAAQ;EACnD,IAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BF,QAAQ,EAAEA,QAAQ;IAClBG,QAAQ,EAAE,IAAI;IACdF,SAAS,EAAEV,KAAK,CAACU;GACpB,CAAC;EAEF,oBACIR,cAACW,WAA+B,oBACxBP,UAAU;IACdI,SAAS,EAAEA,SAAS;IACpBD,QAAQ,EAAEA,QAAQ;IAClBJ,KAAK,EAAES,8BAA8B,CAACT,KAAK;mBAC3CH,cAACW,aAAmC;IAACH,SAAS,EAAC;kBAC3CR;IAAMQ,SAAS,EAAC;IAAmD,CACjC,EACrCN,QAAQ,CACqB;AAE1C;AAEA,IAAMD,qBAAqB,gBAAGD,aAAmB,CAAC;EAAEO,QAAQ,EAAE;CAAO,CAAC;IAUzDM,UAAU,gBAAGb,UAAgB,CAAsC,SAASc,aAAaA,CAAChB,KAAK,EAAEiB,GAAG;EAC7G,IAAAC,cAAA,GAAuCC,aAAa,CAACnB,KAAK,CAAC;IAAnDC,OAAO,GAAAiB,cAAA,CAAPjB,OAAO;IAASK,UAAU,GAAAY,cAAA,CAAjBlB,KAAK;EACtB,IAAMU,SAAS,GAAGU,EAAE,CAAC,eAAe,EAAEpB,KAAK,CAACU,SAAS,CAAC;EAEtD,oBACIR,cAACC,qBAAqB,CAACkB,QAAQ;IAAChB,KAAK,EAAEJ;kBACnCC,cAACW,YAAgC,oBAAKP,UAAU;IAAEI,SAAS,EAAEA,SAAS;IAAEO,GAAG,EAAEA;KAAO,CACvD;AAEzC,CAAC;AACDF,UAAU,CAACO,IAAI,GAAGvB,SAAS;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { forwardRef, createElement } from 'react';
2
2
  import { Separator as Separator$1 } from '@radix-ui/react-dropdown-menu';
3
3
 
4
- const Separator = /*#__PURE__*/forwardRef(function Separator(props, ref) {
4
+ var Separator = /*#__PURE__*/forwardRef(function Separator(props, ref) {
5
5
  return /*#__PURE__*/createElement(Separator$1, Object.assign({
6
6
  className: "bg-grey-300 my-1 h-px"
7
7
  }, props, {
@@ -1 +1 @@
1
- {"version":3,"file":"Separator.js","sources":["../../../../../../../../src/components/Menu/components/Separator.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\n\nexport type MenuSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Separator = React.forwardRef(function Separator(props: MenuSeparatorProps, ref: React.Ref<HTMLDivElement>) {\n return <DropdownMenuPrimitive.Separator className=\"bg-grey-300 my-1 h-px\" {...props} ref={ref} />;\n});\n"],"names":["Separator","React","props","ref","DropdownMenuPrimitive","className"],"mappings":";;;MAKaA,SAAS,gBAAGC,UAAgB,CAAC,SAASD,SAASA,CAACE,KAAyB,EAAEC,GAA8B;EAClH,oBAAOF,cAACG,WAA+B;IAACC,SAAS,EAAC;KAA4BH,KAAK;IAAEC,GAAG,EAAEA;KAAO;AACrG,CAAC;;;;"}
1
+ {"version":3,"file":"Separator.js","sources":["../../../../../../../../src/components/Menu/components/Separator.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\n\nexport type MenuSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Separator = React.forwardRef(function Separator(props: MenuSeparatorProps, ref: React.Ref<HTMLDivElement>) {\n return <DropdownMenuPrimitive.Separator className=\"bg-grey-300 my-1 h-px\" {...props} ref={ref} />;\n});\n"],"names":["Separator","React","props","ref","DropdownMenuPrimitive","className"],"mappings":";;;IAKaA,SAAS,gBAAGC,UAAgB,CAAC,SAASD,SAASA,CAACE,KAAyB,EAAEC,GAA8B;EAClH,oBAAOF,cAACG,WAA+B;IAACC,SAAS,EAAC;KAA4BH,KAAK;IAAEC,GAAG,EAAEA;KAAO;AACrG,CAAC;;;;"}