@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,38 +1,40 @@
1
1
  import React__default from 'react';
2
2
 
3
- const useLocalStorage = (key, initialValue) => {
4
- const [state, setState] = React__default.useState(() => {
5
- if (!key) {
6
- return initialValue;
7
- }
8
- try {
9
- const localStorageValue = localStorage.getItem(key);
10
- if (typeof localStorageValue !== 'string') {
11
- localStorage.setItem(key, JSON.stringify(initialValue));
3
+ var useLocalStorage = function useLocalStorage(key, initialValue) {
4
+ var _React$useState = React__default.useState(function () {
5
+ if (!key) {
12
6
  return initialValue;
13
- } else {
14
- return JSON.parse(localStorageValue || 'null');
15
7
  }
16
- } catch {
17
- // If user is in private mode or has storage restriction
18
- // localStorage can throw. JSON.parse and JSON.stringify
19
- // can throw, too.
20
- return initialValue;
21
- }
22
- });
23
- React__default.useEffect(() => {
8
+ try {
9
+ var localStorageValue = localStorage.getItem(key);
10
+ if (typeof localStorageValue !== 'string') {
11
+ localStorage.setItem(key, JSON.stringify(initialValue));
12
+ return initialValue;
13
+ } else {
14
+ return JSON.parse(localStorageValue || 'null');
15
+ }
16
+ } catch (_unused) {
17
+ // If user is in private mode or has storage restriction
18
+ // localStorage can throw. JSON.parse and JSON.stringify
19
+ // can throw, too.
20
+ return initialValue;
21
+ }
22
+ }),
23
+ state = _React$useState[0],
24
+ setState = _React$useState[1];
25
+ React__default.useEffect(function () {
24
26
  if (!key) {
25
27
  return;
26
28
  }
27
29
  try {
28
- const serializedState = JSON.stringify(state);
30
+ var serializedState = JSON.stringify(state);
29
31
  localStorage.setItem(key, serializedState);
30
- } catch {
32
+ } catch (_unused2) {
31
33
  // If user is in private mode or has storage restriction
32
34
  // localStorage can throw. Also JSON.stringify can throw.
33
35
  }
34
36
  }, [key, state]);
35
- const clear = () => {
37
+ var clear = function clear() {
36
38
  if (key) {
37
39
  localStorage.removeItem(key);
38
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useLocalStorage.js","sources":["../../../../../../src/hooks/useLocalStorage.ts"],"sourcesContent":["import React from 'react';\n\nexport const useLocalStorage = <TType>(\n key?: string,\n initialValue?: TType\n): [TType, React.Dispatch<React.SetStateAction<TType>>, () => void] => {\n const [state, setState] = React.useState<TType>(() => {\n if (!key) {\n return initialValue;\n }\n\n try {\n const localStorageValue = localStorage.getItem(key);\n\n if (typeof localStorageValue !== 'string') {\n localStorage.setItem(key, JSON.stringify(initialValue));\n return initialValue;\n } else {\n return JSON.parse(localStorageValue || 'null');\n }\n } catch {\n // If user is in private mode or has storage restriction\n // localStorage can throw. JSON.parse and JSON.stringify\n // can throw, too.\n return initialValue;\n }\n });\n\n React.useEffect(() => {\n if (!key) {\n return;\n }\n\n try {\n const serializedState = JSON.stringify(state);\n localStorage.setItem(key, serializedState);\n } catch {\n // If user is in private mode or has storage restriction\n // localStorage can throw. Also JSON.stringify can throw.\n }\n }, [key, state]);\n\n const clear = () => {\n if (key) {\n localStorage.removeItem(key);\n }\n };\n\n return [state, setState, clear];\n};\n"],"names":["useLocalStorage","key","initialValue","state","setState","React","useState","localStorageValue","localStorage","getItem","setItem","JSON","stringify","parse","useEffect","serializedState","clear","removeItem"],"mappings":";;MAEaA,eAAe,GAAGA,CAC3BC,GAAY,EACZC,YAAoB;EAEpB,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAQ;IAC5C,IAAI,CAACL,GAAG,EAAE;MACN,OAAOC,YAAY;;IAGvB,IAAI;MACA,MAAMK,iBAAiB,GAAGC,YAAY,CAACC,OAAO,CAACR,GAAG,CAAC;MAEnD,IAAI,OAAOM,iBAAiB,KAAK,QAAQ,EAAE;QACvCC,YAAY,CAACE,OAAO,CAACT,GAAG,EAAEU,IAAI,CAACC,SAAS,CAACV,YAAY,CAAC,CAAC;QACvD,OAAOA,YAAY;OACtB,MAAM;QACH,OAAOS,IAAI,CAACE,KAAK,CAACN,iBAAiB,IAAI,MAAM,CAAC;;KAErD,CAAC,MAAM;;;;MAIJ,OAAOL,YAAY;;GAE1B,CAAC;EAEFG,cAAK,CAACS,SAAS,CAAC;IACZ,IAAI,CAACb,GAAG,EAAE;MACN;;IAGJ,IAAI;MACA,MAAMc,eAAe,GAAGJ,IAAI,CAACC,SAAS,CAACT,KAAK,CAAC;MAC7CK,YAAY,CAACE,OAAO,CAACT,GAAG,EAAEc,eAAe,CAAC;KAC7C,CAAC,MAAM;;;;GAIX,EAAE,CAACd,GAAG,EAAEE,KAAK,CAAC,CAAC;EAEhB,MAAMa,KAAK,GAAGA;IACV,IAAIf,GAAG,EAAE;MACLO,YAAY,CAACS,UAAU,CAAChB,GAAG,CAAC;;GAEnC;EAED,OAAO,CAACE,KAAK,EAAEC,QAAQ,EAAEY,KAAK,CAAC;AACnC;;;;"}
1
+ {"version":3,"file":"useLocalStorage.js","sources":["../../../../../../src/hooks/useLocalStorage.ts"],"sourcesContent":["import React from 'react';\n\nexport const useLocalStorage = <TType>(\n key?: string,\n initialValue?: TType\n): [TType, React.Dispatch<React.SetStateAction<TType>>, () => void] => {\n const [state, setState] = React.useState<TType>(() => {\n if (!key) {\n return initialValue;\n }\n\n try {\n const localStorageValue = localStorage.getItem(key);\n\n if (typeof localStorageValue !== 'string') {\n localStorage.setItem(key, JSON.stringify(initialValue));\n return initialValue;\n } else {\n return JSON.parse(localStorageValue || 'null');\n }\n } catch {\n // If user is in private mode or has storage restriction\n // localStorage can throw. JSON.parse and JSON.stringify\n // can throw, too.\n return initialValue;\n }\n });\n\n React.useEffect(() => {\n if (!key) {\n return;\n }\n\n try {\n const serializedState = JSON.stringify(state);\n localStorage.setItem(key, serializedState);\n } catch {\n // If user is in private mode or has storage restriction\n // localStorage can throw. Also JSON.stringify can throw.\n }\n }, [key, state]);\n\n const clear = () => {\n if (key) {\n localStorage.removeItem(key);\n }\n };\n\n return [state, setState, clear];\n};\n"],"names":["useLocalStorage","key","initialValue","_React$useState","React","useState","localStorageValue","localStorage","getItem","setItem","JSON","stringify","parse","_unused","state","setState","useEffect","serializedState","_unused2","clear","removeItem"],"mappings":";;IAEaA,eAAe,GAAG,SAAlBA,eAAeA,CACxBC,GAAY,EACZC,YAAoB;EAEpB,IAAAC,eAAA,GAA0BC,cAAK,CAACC,QAAQ,CAAQ;MAC5C,IAAI,CAACJ,GAAG,EAAE;QACN,OAAOC,YAAY;;MAGvB,IAAI;QACA,IAAMI,iBAAiB,GAAGC,YAAY,CAACC,OAAO,CAACP,GAAG,CAAC;QAEnD,IAAI,OAAOK,iBAAiB,KAAK,QAAQ,EAAE;UACvCC,YAAY,CAACE,OAAO,CAACR,GAAG,EAAES,IAAI,CAACC,SAAS,CAACT,YAAY,CAAC,CAAC;UACvD,OAAOA,YAAY;SACtB,MAAM;UACH,OAAOQ,IAAI,CAACE,KAAK,CAACN,iBAAiB,IAAI,MAAM,CAAC;;OAErD,CAAC,OAAAO,OAAA,EAAM;;;;QAIJ,OAAOX,YAAY;;KAE1B,CAAC;IApBKY,KAAK,GAAAX,eAAA;IAAEY,QAAQ,GAAAZ,eAAA;EAsBtBC,cAAK,CAACY,SAAS,CAAC;IACZ,IAAI,CAACf,GAAG,EAAE;MACN;;IAGJ,IAAI;MACA,IAAMgB,eAAe,GAAGP,IAAI,CAACC,SAAS,CAACG,KAAK,CAAC;MAC7CP,YAAY,CAACE,OAAO,CAACR,GAAG,EAAEgB,eAAe,CAAC;KAC7C,CAAC,OAAAC,QAAA,EAAM;;;;GAIX,EAAE,CAACjB,GAAG,EAAEa,KAAK,CAAC,CAAC;EAEhB,IAAMK,KAAK,GAAG,SAARA,KAAKA;IACP,IAAIlB,GAAG,EAAE;MACLM,YAAY,CAACa,UAAU,CAACnB,GAAG,CAAC;;GAEnC;EAED,OAAO,CAACa,KAAK,EAAEC,QAAQ,EAAEI,KAAK,CAAC;AACnC;;;;"}
@@ -1,13 +1,20 @@
1
1
  import React__default from 'react';
2
2
 
3
- const useMatchMedia = (query, defaultMatches = false) => {
4
- const [matches, setMatches] = React__default.useState(defaultMatches);
5
- const handleChange = React__default.useCallback(event => setMatches(event.matches), []);
6
- React__default.useEffect(() => {
7
- const mediaQuery = window.matchMedia(query);
3
+ var useMatchMedia = function useMatchMedia(query, defaultMatches) {
4
+ if (defaultMatches === void 0) {
5
+ defaultMatches = false;
6
+ }
7
+ var _React$useState = React__default.useState(defaultMatches),
8
+ matches = _React$useState[0],
9
+ setMatches = _React$useState[1];
10
+ var handleChange = React__default.useCallback(function (event) {
11
+ return setMatches(event.matches);
12
+ }, []);
13
+ React__default.useEffect(function () {
14
+ var mediaQuery = window.matchMedia(query);
8
15
  setMatches(mediaQuery.matches);
9
16
  mediaQuery.addEventListener('change', handleChange);
10
- return () => {
17
+ return function () {
11
18
  mediaQuery.removeEventListener('change', handleChange);
12
19
  };
13
20
  }, []);
@@ -1 +1 @@
1
- {"version":3,"file":"useMatchMedia.js","sources":["../../../../../../src/hooks/useMatchMedia.ts"],"sourcesContent":["import React from 'react';\n\nexport const useMatchMedia = (query: string, defaultMatches = false): boolean => {\n const [matches, setMatches] = React.useState<boolean>(defaultMatches);\n\n const handleChange = React.useCallback((event: MediaQueryList | MediaQueryListEvent) => setMatches(event.matches), []);\n\n React.useEffect(() => {\n const mediaQuery = window.matchMedia(query);\n setMatches(mediaQuery.matches);\n mediaQuery.addEventListener('change', handleChange);\n\n return () => {\n mediaQuery.removeEventListener('change', handleChange);\n };\n }, []);\n\n return matches;\n};\n"],"names":["useMatchMedia","query","defaultMatches","matches","setMatches","React","useState","handleChange","useCallback","event","useEffect","mediaQuery","window","matchMedia","addEventListener","removeEventListener"],"mappings":";;MAEaA,aAAa,GAAGA,CAACC,KAAa,EAAEC,cAAc,GAAG,KAAK;EAC/D,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAUJ,cAAc,CAAC;EAErE,MAAMK,YAAY,GAAGF,cAAK,CAACG,WAAW,CAAEC,KAA2C,IAAKL,UAAU,CAACK,KAAK,CAACN,OAAO,CAAC,EAAE,EAAE,CAAC;EAEtHE,cAAK,CAACK,SAAS,CAAC;IACZ,MAAMC,UAAU,GAAGC,MAAM,CAACC,UAAU,CAACZ,KAAK,CAAC;IAC3CG,UAAU,CAACO,UAAU,CAACR,OAAO,CAAC;IAC9BQ,UAAU,CAACG,gBAAgB,CAAC,QAAQ,EAAEP,YAAY,CAAC;IAEnD,OAAO;MACHI,UAAU,CAACI,mBAAmB,CAAC,QAAQ,EAAER,YAAY,CAAC;KACzD;GACJ,EAAE,EAAE,CAAC;EAEN,OAAOJ,OAAO;AAClB;;;;"}
1
+ {"version":3,"file":"useMatchMedia.js","sources":["../../../../../../src/hooks/useMatchMedia.ts"],"sourcesContent":["import React from 'react';\n\nexport const useMatchMedia = (query: string, defaultMatches = false): boolean => {\n const [matches, setMatches] = React.useState<boolean>(defaultMatches);\n\n const handleChange = React.useCallback((event: MediaQueryList | MediaQueryListEvent) => setMatches(event.matches), []);\n\n React.useEffect(() => {\n const mediaQuery = window.matchMedia(query);\n setMatches(mediaQuery.matches);\n mediaQuery.addEventListener('change', handleChange);\n\n return () => {\n mediaQuery.removeEventListener('change', handleChange);\n };\n }, []);\n\n return matches;\n};\n"],"names":["useMatchMedia","query","defaultMatches","_React$useState","React","useState","matches","setMatches","handleChange","useCallback","event","useEffect","mediaQuery","window","matchMedia","addEventListener","removeEventListener"],"mappings":";;IAEaA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAa,EAAEC,cAAc;MAAdA,cAAc;IAAdA,cAAc,GAAG,KAAK;;EAC/D,IAAAC,eAAA,GAA8BC,cAAK,CAACC,QAAQ,CAAUH,cAAc,CAAC;IAA9DI,OAAO,GAAAH,eAAA;IAAEI,UAAU,GAAAJ,eAAA;EAE1B,IAAMK,YAAY,GAAGJ,cAAK,CAACK,WAAW,CAAC,UAACC,KAA2C;IAAA,OAAKH,UAAU,CAACG,KAAK,CAACJ,OAAO,CAAC;KAAE,EAAE,CAAC;EAEtHF,cAAK,CAACO,SAAS,CAAC;IACZ,IAAMC,UAAU,GAAGC,MAAM,CAACC,UAAU,CAACb,KAAK,CAAC;IAC3CM,UAAU,CAACK,UAAU,CAACN,OAAO,CAAC;IAC9BM,UAAU,CAACG,gBAAgB,CAAC,QAAQ,EAAEP,YAAY,CAAC;IAEnD,OAAO;MACHI,UAAU,CAACI,mBAAmB,CAAC,QAAQ,EAAER,YAAY,CAAC;KACzD;GACJ,EAAE,EAAE,CAAC;EAEN,OAAOF,OAAO;AAClB;;;;"}
@@ -1,9 +1,9 @@
1
1
  import React__default from 'react';
2
2
 
3
3
  // merges an external ref (optional) with an internal ref (required)
4
- const useMergedRef = ref => {
5
- const internalRef = React__default.useRef(null);
6
- React__default.useEffect(() => {
4
+ var useMergedRef = function useMergedRef(ref) {
5
+ var internalRef = React__default.useRef(null);
6
+ React__default.useEffect(function () {
7
7
  if (ref) {
8
8
  if (typeof ref === 'function') {
9
9
  ref(internalRef.current);
@@ -1 +1 @@
1
- {"version":3,"file":"useMergedRef.js","sources":["../../../../../../src/hooks/useMergedRef.ts"],"sourcesContent":["import React from 'react';\n\n// merges an external ref (optional) with an internal ref (required)\nexport const useMergedRef = <T extends HTMLElement>(ref: React.Ref<HTMLElement>): React.RefObject<T> => {\n const internalRef = React.useRef<T>(null);\n\n React.useEffect(() => {\n if (ref) {\n if (typeof ref === 'function') {\n ref(internalRef.current);\n } else {\n (ref as React.MutableRefObject<HTMLElement | null>).current = internalRef.current;\n }\n }\n }, [ref]);\n\n return internalRef;\n};\n"],"names":["useMergedRef","ref","internalRef","React","useRef","useEffect","current"],"mappings":";;AAEA;MACaA,YAAY,GAA2BC,GAA2B;EAC3E,MAAMC,WAAW,GAAGC,cAAK,CAACC,MAAM,CAAI,IAAI,CAAC;EAEzCD,cAAK,CAACE,SAAS,CAAC;IACZ,IAAIJ,GAAG,EAAE;MACL,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC3BA,GAAG,CAACC,WAAW,CAACI,OAAO,CAAC;OAC3B,MAAM;QACFL,GAAkD,CAACK,OAAO,GAAGJ,WAAW,CAACI,OAAO;;;GAG5F,EAAE,CAACL,GAAG,CAAC,CAAC;EAET,OAAOC,WAAW;AACtB;;;;"}
1
+ {"version":3,"file":"useMergedRef.js","sources":["../../../../../../src/hooks/useMergedRef.ts"],"sourcesContent":["import React from 'react';\n\n// merges an external ref (optional) with an internal ref (required)\nexport const useMergedRef = <T extends HTMLElement>(ref: React.Ref<HTMLElement>): React.RefObject<T> => {\n const internalRef = React.useRef<T>(null);\n\n React.useEffect(() => {\n if (ref) {\n if (typeof ref === 'function') {\n ref(internalRef.current);\n } else {\n (ref as React.MutableRefObject<HTMLElement | null>).current = internalRef.current;\n }\n }\n }, [ref]);\n\n return internalRef;\n};\n"],"names":["useMergedRef","ref","internalRef","React","useRef","useEffect","current"],"mappings":";;AAEA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAA2BC,GAA2B;EAC3E,IAAMC,WAAW,GAAGC,cAAK,CAACC,MAAM,CAAI,IAAI,CAAC;EAEzCD,cAAK,CAACE,SAAS,CAAC;IACZ,IAAIJ,GAAG,EAAE;MACL,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC3BA,GAAG,CAACC,WAAW,CAACI,OAAO,CAAC;OAC3B,MAAM;QACFL,GAAkD,CAACK,OAAO,GAAGJ,WAAW,CAACI,OAAO;;;GAG5F,EAAE,CAACL,GAAG,CAAC,CAAC;EAET,OAAOC,WAAW;AACtB;;;;"}
@@ -4,9 +4,9 @@ import React__default from 'react';
4
4
  function usePreviousValue(value) {
5
5
  // The ref object is a generic container whose current property is mutable ...
6
6
  // ... and can hold any value, similar to an instance property on a class
7
- const ref = React__default.useRef(value);
7
+ var ref = React__default.useRef(value);
8
8
  // Store current value in ref
9
- React__default.useEffect(() => {
9
+ React__default.useEffect(function () {
10
10
  ref.current = value;
11
11
  }, [value]); // Only re-run if value changes
12
12
  // Return previous value (happens before update in useEffect above)
@@ -1 +1 @@
1
- {"version":3,"file":"usePrevious.js","sources":["../../../../../../src/hooks/usePrevious.ts"],"sourcesContent":["import React from 'react';\n\n// taken from radix\nfunction usePreviousValue<T>(value: T) {\n // The ref object is a generic container whose current property is mutable ...\n // ... and can hold any value, similar to an instance property on a class\n const ref = React.useRef<T>(value);\n\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]); // Only re-run if value changes\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n\nexport { usePreviousValue };\n"],"names":["usePreviousValue","value","ref","React","useRef","useEffect","current"],"mappings":";;AAEA;AACA,SAASA,gBAAgBA,CAAIC,KAAQ;;;EAGjC,MAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAIH,KAAK,CAAC;;EAGlCE,cAAK,CAACE,SAAS,CAAC;IACZH,GAAG,CAACI,OAAO,GAAGL,KAAK;GACtB,EAAE,CAACA,KAAK,CAAC,CAAC,CAAC;;EAGZ,OAAOC,GAAG,CAACI,OAAO;AACtB;;;;"}
1
+ {"version":3,"file":"usePrevious.js","sources":["../../../../../../src/hooks/usePrevious.ts"],"sourcesContent":["import React from 'react';\n\n// taken from radix\nfunction usePreviousValue<T>(value: T) {\n // The ref object is a generic container whose current property is mutable ...\n // ... and can hold any value, similar to an instance property on a class\n const ref = React.useRef<T>(value);\n\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]); // Only re-run if value changes\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n\nexport { usePreviousValue };\n"],"names":["usePreviousValue","value","ref","React","useRef","useEffect","current"],"mappings":";;AAEA;AACA,SAASA,gBAAgBA,CAAIC,KAAQ;;;EAGjC,IAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAIH,KAAK,CAAC;;EAGlCE,cAAK,CAACE,SAAS,CAAC;IACZH,GAAG,CAACI,OAAO,GAAGL,KAAK;GACtB,EAAE,CAACA,KAAK,CAAC,CAAC,CAAC;;EAGZ,OAAOC,GAAG,CAACI,OAAO;AACtB;;;;"}
@@ -1,23 +1,23 @@
1
1
  import React__default from 'react';
2
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { usePreviousValue } from '../hooks/usePrevious.js';
3
4
 
5
+ var _excluded = ["value"];
4
6
  // taken from radix - https://github.com/radix-ui/primitives/blob/main/packages/react/select/src/Select.tsx#L1183-L1224
5
- const BubbleSelect = props => {
6
- const {
7
- value,
8
- ...selectProps
9
- } = props;
10
- const ref = React__default.useRef(null);
11
- const prevValue = usePreviousValue(value);
7
+ var BubbleSelect = function BubbleSelect(props) {
8
+ var value = props.value,
9
+ selectProps = _objectWithoutPropertiesLoose(props, _excluded);
10
+ var ref = React__default.useRef(null);
11
+ var prevValue = usePreviousValue(value);
12
12
  // Bubble value change to parents (e.g form change event)
13
- React__default.useEffect(() => {
14
- const select = ref.current;
15
- const descriptor = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value');
16
- const setValue = descriptor.set;
13
+ React__default.useEffect(function () {
14
+ var select = ref.current;
15
+ var descriptor = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value');
16
+ var setValue = descriptor.set;
17
17
  if (prevValue !== value && setValue) {
18
18
  if (Array.isArray(value)) {
19
- value.forEach(v => {
20
- const option = select.querySelector(`option[value='${v}']`);
19
+ value.forEach(function (v) {
20
+ var option = select.querySelector("option[value='" + v + "']");
21
21
  if (option) {
22
22
  option.selected = true;
23
23
  }
@@ -25,7 +25,7 @@ const BubbleSelect = props => {
25
25
  } else {
26
26
  setValue.call(select, value);
27
27
  }
28
- const event = new Event('change', {
28
+ var event = new Event('change', {
29
29
  bubbles: true
30
30
  });
31
31
  select.dispatchEvent(event);
@@ -1 +1 @@
1
- {"version":3,"file":"BubbleSelect.js","sources":["../../../../../../src/primitives/BubbleSelect.tsx"],"sourcesContent":["import React from 'react';\nimport { usePreviousValue } from '../hooks/usePrevious';\n\n// taken from radix - https://github.com/radix-ui/primitives/blob/main/packages/react/select/src/Select.tsx#L1183-L1224\nexport const BubbleSelect = (props: React.SelectHTMLAttributes<HTMLSelectElement>) => {\n const { value, ...selectProps } = props;\n const ref = React.useRef<HTMLSelectElement>(null);\n const prevValue = usePreviousValue(value);\n\n // Bubble value change to parents (e.g form change event)\n React.useEffect(() => {\n const select = ref.current!;\n const descriptor = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value') as PropertyDescriptor;\n const setValue = descriptor.set;\n\n if (prevValue !== value && setValue) {\n if (Array.isArray(value)) {\n value.forEach(v => {\n const option: HTMLOptionElement | null = select.querySelector(`option[value='${v}']`);\n\n if (option) {\n option.selected = true;\n }\n });\n } else {\n setValue.call(select, value);\n }\n\n const event = new Event('change', { bubbles: true });\n select.dispatchEvent(event);\n }\n }, [prevValue, value]);\n\n /**\n * We purposefully do not use `type=\"hidden\"` here otherwise forms that\n * wrap it will not be able to access its value via the FormData API.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programatically and bubble to any parent form `onChange` event.\n * Adding the `value` will cause React to consider the programatic\n * dispatch a duplicate and it will get swallowed.\n */\n return <select {...selectProps} defaultValue={value} ref={ref} style={{ display: 'none' }} />;\n};\n"],"names":["BubbleSelect","props","value","selectProps","ref","React","useRef","prevValue","usePreviousValue","useEffect","select","current","descriptor","Object","getOwnPropertyDescriptor","window","HTMLSelectElement","prototype","setValue","set","Array","isArray","forEach","v","option","querySelector","selected","call","event","Event","bubbles","dispatchEvent","defaultValue","style","display"],"mappings":";;;AAGA;MACaA,YAAY,GAAIC,KAAoD;EAC7E,MAAM;IAAEC,KAAK;IAAE,GAAGC;GAAa,GAAGF,KAAK;EACvC,MAAMG,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAoB,IAAI,CAAC;EACjD,MAAMC,SAAS,GAAGC,gBAAgB,CAACN,KAAK,CAAC;;EAGzCG,cAAK,CAACI,SAAS,CAAC;IACZ,MAAMC,MAAM,GAAGN,GAAG,CAACO,OAAQ;IAC3B,MAAMC,UAAU,GAAGC,MAAM,CAACC,wBAAwB,CAACC,MAAM,CAACC,iBAAiB,CAACC,SAAS,EAAE,OAAO,CAAuB;IACrH,MAAMC,QAAQ,GAAGN,UAAU,CAACO,GAAG;IAE/B,IAAIZ,SAAS,KAAKL,KAAK,IAAIgB,QAAQ,EAAE;MACjC,IAAIE,KAAK,CAACC,OAAO,CAACnB,KAAK,CAAC,EAAE;QACtBA,KAAK,CAACoB,OAAO,CAACC,CAAC;UACX,MAAMC,MAAM,GAA6Bd,MAAM,CAACe,aAAa,CAAC,iBAAiBF,CAAC,IAAI,CAAC;UAErF,IAAIC,MAAM,EAAE;YACRA,MAAM,CAACE,QAAQ,GAAG,IAAI;;SAE7B,CAAC;OACL,MAAM;QACHR,QAAQ,CAACS,IAAI,CAACjB,MAAM,EAAER,KAAK,CAAC;;MAGhC,MAAM0B,KAAK,GAAG,IAAIC,KAAK,CAAC,QAAQ,EAAE;QAAEC,OAAO,EAAE;OAAM,CAAC;MACpDpB,MAAM,CAACqB,aAAa,CAACH,KAAK,CAAC;;GAElC,EAAE,CAACrB,SAAS,EAAEL,KAAK,CAAC,CAAC;;;;;;;;;;EAWtB,oBAAOG,yDAAYF,WAAW;IAAE6B,YAAY,EAAE9B,KAAK;IAAEE,GAAG,EAAEA,GAAG;IAAE6B,KAAK,EAAE;MAAEC,OAAO,EAAE;;KAAY;AACjG;;;;"}
1
+ {"version":3,"file":"BubbleSelect.js","sources":["../../../../../../src/primitives/BubbleSelect.tsx"],"sourcesContent":["import React from 'react';\nimport { usePreviousValue } from '../hooks/usePrevious';\n\n// taken from radix - https://github.com/radix-ui/primitives/blob/main/packages/react/select/src/Select.tsx#L1183-L1224\nexport const BubbleSelect = (props: React.SelectHTMLAttributes<HTMLSelectElement>) => {\n const { value, ...selectProps } = props;\n const ref = React.useRef<HTMLSelectElement>(null);\n const prevValue = usePreviousValue(value);\n\n // Bubble value change to parents (e.g form change event)\n React.useEffect(() => {\n const select = ref.current!;\n const descriptor = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value') as PropertyDescriptor;\n const setValue = descriptor.set;\n\n if (prevValue !== value && setValue) {\n if (Array.isArray(value)) {\n value.forEach(v => {\n const option: HTMLOptionElement | null = select.querySelector(`option[value='${v}']`);\n\n if (option) {\n option.selected = true;\n }\n });\n } else {\n setValue.call(select, value);\n }\n\n const event = new Event('change', { bubbles: true });\n select.dispatchEvent(event);\n }\n }, [prevValue, value]);\n\n /**\n * We purposefully do not use `type=\"hidden\"` here otherwise forms that\n * wrap it will not be able to access its value via the FormData API.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programatically and bubble to any parent form `onChange` event.\n * Adding the `value` will cause React to consider the programatic\n * dispatch a duplicate and it will get swallowed.\n */\n return <select {...selectProps} defaultValue={value} ref={ref} style={{ display: 'none' }} />;\n};\n"],"names":["BubbleSelect","props","value","selectProps","_objectWithoutPropertiesLoose","_excluded","ref","React","useRef","prevValue","usePreviousValue","useEffect","select","current","descriptor","Object","getOwnPropertyDescriptor","window","HTMLSelectElement","prototype","setValue","set","Array","isArray","forEach","v","option","querySelector","selected","call","event","Event","bubbles","dispatchEvent","defaultValue","style","display"],"mappings":";;;;;AAGA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,KAAoD;EAC7E,IAAQC,KAAK,GAAqBD,KAAK,CAA/BC,KAAK;IAAKC,WAAW,GAAAC,6BAAA,CAAKH,KAAK,EAAAI,SAAA;EACvC,IAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAoB,IAAI,CAAC;EACjD,IAAMC,SAAS,GAAGC,gBAAgB,CAACR,KAAK,CAAC;;EAGzCK,cAAK,CAACI,SAAS,CAAC;IACZ,IAAMC,MAAM,GAAGN,GAAG,CAACO,OAAQ;IAC3B,IAAMC,UAAU,GAAGC,MAAM,CAACC,wBAAwB,CAACC,MAAM,CAACC,iBAAiB,CAACC,SAAS,EAAE,OAAO,CAAuB;IACrH,IAAMC,QAAQ,GAAGN,UAAU,CAACO,GAAG;IAE/B,IAAIZ,SAAS,KAAKP,KAAK,IAAIkB,QAAQ,EAAE;MACjC,IAAIE,KAAK,CAACC,OAAO,CAACrB,KAAK,CAAC,EAAE;QACtBA,KAAK,CAACsB,OAAO,CAAC,UAAAC,CAAC;UACX,IAAMC,MAAM,GAA6Bd,MAAM,CAACe,aAAa,oBAAkBF,CAAC,OAAI,CAAC;UAErF,IAAIC,MAAM,EAAE;YACRA,MAAM,CAACE,QAAQ,GAAG,IAAI;;SAE7B,CAAC;OACL,MAAM;QACHR,QAAQ,CAACS,IAAI,CAACjB,MAAM,EAAEV,KAAK,CAAC;;MAGhC,IAAM4B,KAAK,GAAG,IAAIC,KAAK,CAAC,QAAQ,EAAE;QAAEC,OAAO,EAAE;OAAM,CAAC;MACpDpB,MAAM,CAACqB,aAAa,CAACH,KAAK,CAAC;;GAElC,EAAE,CAACrB,SAAS,EAAEP,KAAK,CAAC,CAAC;;;;;;;;;;EAWtB,oBAAOK,yDAAYJ,WAAW;IAAE+B,YAAY,EAAEhC,KAAK;IAAEI,GAAG,EAAEA,GAAG;IAAE6B,KAAK,EAAE;MAAEC,OAAO,EAAE;;KAAY;AACjG;;;;"}
@@ -1,27 +1,28 @@
1
1
  import { forwardRef, createElement, Children } from 'react';
2
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { useMergedRef } from '../hooks/useMergedRef.js';
3
4
  import { useGlobalKeyDown } from '../hooks/useGlobalKeyDown.js';
4
5
 
5
- const Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
6
- const {
7
- disabled,
8
- shortcut,
9
- target,
10
- type = 'button',
11
- ...otherProps
12
- } = props;
13
- const internalRef = useMergedRef(ref);
14
- useGlobalKeyDown(shortcut, event => {
6
+ var _excluded = ["disabled", "shortcut", "target", "type"];
7
+ var Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
8
+ var disabled = props.disabled,
9
+ shortcut = props.shortcut,
10
+ target = props.target,
11
+ _props$type = props.type,
12
+ type = _props$type === void 0 ? 'button' : _props$type,
13
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
14
+ var internalRef = useMergedRef(ref);
15
+ useGlobalKeyDown(shortcut, function (event) {
15
16
  var _internalRef$current;
16
17
  event === null || event === void 0 ? void 0 : event.preventDefault();
17
- const dialog = document.querySelector('[role="dialog"]');
18
+ var dialog = document.querySelector('[role="dialog"]');
18
19
  // Don't trigger the click on the button if it is outside of the dialog
19
20
  if (dialog && !(dialog !== null && dialog !== void 0 && dialog.contains(internalRef.current))) {
20
21
  return;
21
22
  }
22
23
  (_internalRef$current = internalRef.current) === null || _internalRef$current === void 0 ? void 0 : _internalRef$current.click();
23
24
  });
24
- const Tag = props.href ? 'a' : 'button';
25
+ var Tag = props.href ? 'a' : 'button';
25
26
  return /*#__PURE__*/createElement(Tag, Object.assign({}, otherProps, {
26
27
  href: disabled ? undefined : props.href,
27
28
  "aria-disabled": disabled ? 'true' : undefined,
@@ -29,7 +30,9 @@ const Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
29
30
  target: Tag === 'a' ? target : undefined,
30
31
  type: Tag !== 'a' ? type : undefined,
31
32
  ref: internalRef
32
- }), Children.count(props.children) > 1 ? Children.map(props.children, child => typeof child === 'string' ? /*#__PURE__*/createElement("span", null, child) : child) : props.children);
33
+ }), Children.count(props.children) > 1 ? Children.map(props.children, function (child) {
34
+ return typeof child === 'string' ? /*#__PURE__*/createElement("span", null, child) : child;
35
+ }) : props.children);
33
36
  });
34
37
 
35
38
  export { Button };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../../src/primitives/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { KeyDownHandlerOptions } from '../utils/keyboard';\nimport { useMergedRef } from '../hooks/useMergedRef';\nimport { useGlobalKeyDown } from '../hooks/useGlobalKeyDown';\n\ntype ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> & {\n /** Content should be a text */\n children: React.ReactNode;\n /** Provides url for buttons being used as a link */\n href?: string;\n shortcut?: string | KeyDownHandlerOptions;\n /** Provides target for buttons being used as a link */\n target?: '_self' | '_blank' | '_parent' | '_top';\n};\n\nconst Button = React.forwardRef(function Button(props: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) {\n const { disabled, shortcut, target, type = 'button', ...otherProps } = props;\n const internalRef = useMergedRef<HTMLButtonElement | HTMLAnchorElement>(ref);\n\n useGlobalKeyDown(shortcut, event => {\n event?.preventDefault();\n const dialog = document.querySelector('[role=\"dialog\"]');\n\n // Don't trigger the click on the button if it is outside of the dialog\n if (dialog && !dialog?.contains(internalRef.current)) {\n return;\n }\n\n internalRef.current?.click();\n });\n\n const Tag = props.href ? 'a' : 'button';\n\n return (\n <Tag\n {...otherProps}\n href={disabled ? undefined : props.href}\n aria-disabled={disabled ? 'true' : undefined}\n disabled={disabled}\n target={Tag === 'a' ? target : undefined}\n type={Tag !== 'a' ? type : undefined}\n ref={internalRef as any}>\n {React.Children.count(props.children) > 1\n ? React.Children.map(props.children, child => (typeof child === 'string' ? <span>{child}</span> : child))\n : props.children}\n </Tag>\n );\n});\n\nexport { Button };\nexport type { ButtonProps };\n"],"names":["Button","React","props","ref","disabled","shortcut","target","type","otherProps","internalRef","useMergedRef","useGlobalKeyDown","event","preventDefault","dialog","document","querySelector","contains","current","_internalRef$current","click","Tag","href","undefined","count","children","map","child"],"mappings":";;;;MAeMA,MAAM,gBAAGC,UAAgB,CAAC,SAASD,MAAMA,CAACE,KAAkB,EAAEC,GAAqD;EACrH,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,IAAI,GAAG,QAAQ;IAAE,GAAGC;GAAY,GAAGN,KAAK;EAC5E,MAAMO,WAAW,GAAGC,YAAY,CAAwCP,GAAG,CAAC;EAE5EQ,gBAAgB,CAACN,QAAQ,EAAEO,KAAK;;IAC5BA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEC,cAAc,EAAE;IACvB,MAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,iBAAiB,CAAC;;IAGxD,IAAIF,MAAM,IAAI,EAACA,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEG,QAAQ,CAACR,WAAW,CAACS,OAAO,CAAC,GAAE;MAClD;;IAGJ,CAAAC,oBAAA,GAAAV,WAAW,CAACS,OAAO,cAAAC,oBAAA,uBAAnBA,oBAAA,CAAqBC,KAAK,EAAE;GAC/B,CAAC;EAEF,MAAMC,GAAG,GAAGnB,KAAK,CAACoB,IAAI,GAAG,GAAG,GAAG,QAAQ;EAEvC,oBACIrB,cAACoB,GAAG,oBACIb,UAAU;IACdc,IAAI,EAAElB,QAAQ,GAAGmB,SAAS,GAAGrB,KAAK,CAACoB,IAAI;qBACxBlB,QAAQ,GAAG,MAAM,GAAGmB,SAAS;IAC5CnB,QAAQ,EAAEA,QAAQ;IAClBE,MAAM,EAAEe,GAAG,KAAK,GAAG,GAAGf,MAAM,GAAGiB,SAAS;IACxChB,IAAI,EAAEc,GAAG,KAAK,GAAG,GAAGd,IAAI,GAAGgB,SAAS;IACpCpB,GAAG,EAAEM;MACJR,QAAc,CAACuB,KAAK,CAACtB,KAAK,CAACuB,QAAQ,CAAC,GAAG,CAAC,GACnCxB,QAAc,CAACyB,GAAG,CAACxB,KAAK,CAACuB,QAAQ,EAAEE,KAAK,IAAK,OAAOA,KAAK,KAAK,QAAQ,gBAAG1B,4BAAO0B,KAAK,CAAQ,GAAGA,KAAM,CAAC,GACvGzB,KAAK,CAACuB,QAAQ,CAClB;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../../src/primitives/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { KeyDownHandlerOptions } from '../utils/keyboard';\nimport { useMergedRef } from '../hooks/useMergedRef';\nimport { useGlobalKeyDown } from '../hooks/useGlobalKeyDown';\n\ntype ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> & {\n /** Content should be a text */\n children: React.ReactNode;\n /** Provides url for buttons being used as a link */\n href?: string;\n shortcut?: string | KeyDownHandlerOptions;\n /** Provides target for buttons being used as a link */\n target?: '_self' | '_blank' | '_parent' | '_top';\n};\n\nconst Button = React.forwardRef(function Button(props: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) {\n const { disabled, shortcut, target, type = 'button', ...otherProps } = props;\n const internalRef = useMergedRef<HTMLButtonElement | HTMLAnchorElement>(ref);\n\n useGlobalKeyDown(shortcut, event => {\n event?.preventDefault();\n const dialog = document.querySelector('[role=\"dialog\"]');\n\n // Don't trigger the click on the button if it is outside of the dialog\n if (dialog && !dialog?.contains(internalRef.current)) {\n return;\n }\n\n internalRef.current?.click();\n });\n\n const Tag = props.href ? 'a' : 'button';\n\n return (\n <Tag\n {...otherProps}\n href={disabled ? undefined : props.href}\n aria-disabled={disabled ? 'true' : undefined}\n disabled={disabled}\n target={Tag === 'a' ? target : undefined}\n type={Tag !== 'a' ? type : undefined}\n ref={internalRef as any}>\n {React.Children.count(props.children) > 1\n ? React.Children.map(props.children, child => (typeof child === 'string' ? <span>{child}</span> : child))\n : props.children}\n </Tag>\n );\n});\n\nexport { Button };\nexport type { ButtonProps };\n"],"names":["Button","React","props","ref","disabled","shortcut","target","_props$type","type","otherProps","_objectWithoutPropertiesLoose","_excluded","internalRef","useMergedRef","useGlobalKeyDown","event","preventDefault","dialog","document","querySelector","contains","current","_internalRef$current","click","Tag","href","undefined","count","children","map","child"],"mappings":";;;;;;IAeMA,MAAM,gBAAGC,UAAgB,CAAC,SAASD,MAAMA,CAACE,KAAkB,EAAEC,GAAqD;EACrH,IAAQC,QAAQ,GAAuDF,KAAK,CAApEE,QAAQ;IAAEC,QAAQ,GAA6CH,KAAK,CAA1DG,QAAQ;IAAEC,MAAM,GAAqCJ,KAAK,CAAhDI,MAAM;IAAAC,WAAA,GAAqCL,KAAK,CAAxCM,IAAI;IAAJA,IAAI,GAAAD,WAAA,cAAG,QAAQ,GAAAA,WAAA;IAAKE,UAAU,GAAAC,6BAAA,CAAKR,KAAK,EAAAS,SAAA;EAC5E,IAAMC,WAAW,GAAGC,YAAY,CAAwCV,GAAG,CAAC;EAE5EW,gBAAgB,CAACT,QAAQ,EAAE,UAAAU,KAAK;;IAC5BA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEC,cAAc,EAAE;IACvB,IAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,iBAAiB,CAAC;;IAGxD,IAAIF,MAAM,IAAI,EAACA,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEG,QAAQ,CAACR,WAAW,CAACS,OAAO,CAAC,GAAE;MAClD;;IAGJ,CAAAC,oBAAA,GAAAV,WAAW,CAACS,OAAO,cAAAC,oBAAA,uBAAnBA,oBAAA,CAAqBC,KAAK,EAAE;GAC/B,CAAC;EAEF,IAAMC,GAAG,GAAGtB,KAAK,CAACuB,IAAI,GAAG,GAAG,GAAG,QAAQ;EAEvC,oBACIxB,cAACuB,GAAG,oBACIf,UAAU;IACdgB,IAAI,EAAErB,QAAQ,GAAGsB,SAAS,GAAGxB,KAAK,CAACuB,IAAI;qBACxBrB,QAAQ,GAAG,MAAM,GAAGsB,SAAS;IAC5CtB,QAAQ,EAAEA,QAAQ;IAClBE,MAAM,EAAEkB,GAAG,KAAK,GAAG,GAAGlB,MAAM,GAAGoB,SAAS;IACxClB,IAAI,EAAEgB,GAAG,KAAK,GAAG,GAAGhB,IAAI,GAAGkB,SAAS;IACpCvB,GAAG,EAAES;MACJX,QAAc,CAAC0B,KAAK,CAACzB,KAAK,CAAC0B,QAAQ,CAAC,GAAG,CAAC,GACnC3B,QAAc,CAAC4B,GAAG,CAAC3B,KAAK,CAAC0B,QAAQ,EAAE,UAAAE,KAAK;IAAA,OAAK,OAAOA,KAAK,KAAK,QAAQ,gBAAG7B,4BAAO6B,KAAK,CAAQ,GAAGA,KAAK;GAAC,CAAC,GACvG5B,KAAK,CAAC0B,QAAQ,CAClB;AAEd,CAAC;;;;"}
@@ -1,54 +1,59 @@
1
1
  import React__default from 'react';
2
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { useMergedRef } from '../../../hooks/useMergedRef.js';
3
4
  import { createCustomKeyboardEvent } from '../../../utils/input.js';
4
5
  import { isAriaDirectionKey } from '../../../utils/aria.js';
5
6
 
6
- const getOptionsFromCollection = (collection, selector) => collection.querySelectorAll(selector);
7
+ var _excluded = ["querySelector", "resetOnChange", "tabIndex"];
8
+ var getOptionsFromCollection = function getOptionsFromCollection(collection, selector) {
9
+ return collection.querySelectorAll(selector);
10
+ };
7
11
  // we use javascript to set attributes (rather than cloning children and adding them)
8
12
  // so that we can support nesting (e.g. groups) - child elements that aren't options.
9
13
  // without doing this we would have to unwrap and flatten all groups
10
- const Root = /*#__PURE__*/React__default.forwardRef(function CollectionRoot(props, ref) {
11
- const {
12
- querySelector,
13
- resetOnChange,
14
- tabIndex = 0,
15
- ...otherProps
16
- } = props;
17
- const internalRef = useMergedRef(ref);
18
- const [activeIndex, setActiveIndex] = React__default.useState();
19
- const setActiveOption = (index, collection, option) => {
14
+ var Root = /*#__PURE__*/React__default.forwardRef(function CollectionRoot(props, ref) {
15
+ var querySelector = props.querySelector,
16
+ resetOnChange = props.resetOnChange,
17
+ _props$tabIndex = props.tabIndex,
18
+ tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
19
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
20
+ var internalRef = useMergedRef(ref);
21
+ var _React$useState = React__default.useState(),
22
+ activeIndex = _React$useState[0],
23
+ setActiveIndex = _React$useState[1];
24
+ var setActiveOption = function setActiveOption(index, collection, option) {
20
25
  var _collection$querySele;
21
- (_collection$querySele = collection.querySelector(`[aria-current]`)) === null || _collection$querySele === void 0 ? void 0 : _collection$querySele.removeAttribute('aria-current');
26
+ (_collection$querySele = collection.querySelector("[aria-current]")) === null || _collection$querySele === void 0 ? void 0 : _collection$querySele.removeAttribute('aria-current');
22
27
  option.setAttribute('aria-current', 'true');
23
28
  option.scrollIntoView({
24
29
  block: 'nearest'
25
30
  });
26
31
  setActiveIndex(index);
27
32
  };
28
- const setActiveIndexByElement = React__default.useCallback(option => {
33
+ var setActiveIndexByElement = React__default.useCallback(function (option) {
29
34
  if (internalRef.current) {
30
35
  if (option.matches(querySelector)) {
31
- const options = getOptionsFromCollection(internalRef.current, querySelector);
32
- const nextActiveIndex = Array.from(options).indexOf(option);
36
+ var options = getOptionsFromCollection(internalRef.current, querySelector);
37
+ var nextActiveIndex = Array.from(options).indexOf(option);
33
38
  if (nextActiveIndex > -1) {
34
39
  setActiveOption(nextActiveIndex, internalRef.current, option);
35
40
  }
36
41
  }
37
42
  }
38
43
  }, [internalRef.current, querySelector]);
39
- React__default.useEffect(() => {
44
+ React__default.useEffect(function () {
40
45
  if (internalRef.current) {
41
46
  internalRef.current.setActiveIndexByElement = setActiveIndexByElement;
42
47
  }
43
48
  }, [internalRef.current]);
44
- React__default.useEffect(() => {
49
+ React__default.useEffect(function () {
45
50
  if (internalRef.current) {
46
- const selected = internalRef.current.querySelectorAll(`[aria-current="true"]`);
47
- const options = getOptionsFromCollection(internalRef.current, querySelector);
51
+ var selected = internalRef.current.querySelectorAll("[aria-current=\"true\"]");
52
+ var options = getOptionsFromCollection(internalRef.current, querySelector);
48
53
  if (options.length && selected.length === 1) {
49
- const firstSelected = internalRef.current.querySelector(`[aria-selected]`);
54
+ var firstSelected = internalRef.current.querySelector("[aria-selected]");
50
55
  if (firstSelected) {
51
- const selectedIndex = Array.from(options).indexOf(firstSelected);
56
+ var selectedIndex = Array.from(options).indexOf(firstSelected);
52
57
  if (selectedIndex > -1) {
53
58
  setActiveOption(selectedIndex, internalRef.current, firstSelected);
54
59
  }
@@ -56,20 +61,20 @@ const Root = /*#__PURE__*/React__default.forwardRef(function CollectionRoot(prop
56
61
  }
57
62
  }
58
63
  }, [resetOnChange]);
59
- React__default.useEffect(() => {
64
+ React__default.useEffect(function () {
60
65
  if (internalRef.current) {
61
- const options = getOptionsFromCollection(internalRef.current, querySelector);
66
+ var options = getOptionsFromCollection(internalRef.current, querySelector);
62
67
  if (options.length) {
63
- let selected = internalRef.current.querySelectorAll(`[aria-current="true"]`);
68
+ var selected = internalRef.current.querySelectorAll("[aria-current=\"true\"]");
64
69
  // if nothing is current (keyboard visible), look for selected items
65
70
  if (selected.length === 0) {
66
- selected = internalRef.current.querySelectorAll(`[aria-selected]`);
71
+ selected = internalRef.current.querySelectorAll("[aria-selected]");
67
72
  }
68
73
  // if one item is selected, make sure it's current
69
74
  if (selected.length === 1) {
70
75
  if (options) {
71
- const firstSelected = selected.item(0);
72
- const selectedIndex = Array.from(options).indexOf(firstSelected);
76
+ var firstSelected = selected.item(0);
77
+ var selectedIndex = Array.from(options).indexOf(firstSelected);
73
78
  if (selectedIndex > -1) {
74
79
  setActiveOption(selectedIndex, internalRef.current, firstSelected);
75
80
  }
@@ -81,17 +86,17 @@ const Root = /*#__PURE__*/React__default.forwardRef(function CollectionRoot(prop
81
86
  }
82
87
  }
83
88
  }, [props.children]);
84
- const handleClick = event => {
85
- const option = event.target;
89
+ var handleClick = function handleClick(event) {
90
+ var option = event.target;
86
91
  if (option.matches(querySelector)) {
87
- const options = getOptionsFromCollection(event.currentTarget, querySelector);
88
- const nextActiveIndex = Array.from(options).indexOf(option);
92
+ var options = getOptionsFromCollection(event.currentTarget, querySelector);
93
+ var nextActiveIndex = Array.from(options).indexOf(option);
89
94
  if (nextActiveIndex > -1) {
90
95
  setActiveOption(nextActiveIndex, event.currentTarget, option);
91
96
  }
92
97
  }
93
98
  };
94
- const handleKeyDown = event => {
99
+ var handleKeyDown = function handleKeyDown(event) {
95
100
  // this stops the event dispatched to the option rebounding back and starting an infinite loop
96
101
  if (event.target !== event.currentTarget) {
97
102
  return;
@@ -102,12 +107,12 @@ const Root = /*#__PURE__*/React__default.forwardRef(function CollectionRoot(prop
102
107
  if (event.isDefaultPrevented()) {
103
108
  return;
104
109
  }
105
- const options = getOptionsFromCollection(event.currentTarget, querySelector);
110
+ var options = getOptionsFromCollection(event.currentTarget, querySelector);
106
111
  if (options) {
107
112
  if (isAriaDirectionKey(event)) {
108
113
  event.preventDefault();
109
114
  event.stopPropagation();
110
- const nextActiveIndex = getNextEnabledItem(event, options, activeIndex);
115
+ var nextActiveIndex = getNextEnabledItem(event, options, activeIndex);
111
116
  if (nextActiveIndex !== undefined && nextActiveIndex !== activeIndex) {
112
117
  setActiveOption(nextActiveIndex, event.currentTarget, options.item(nextActiveIndex));
113
118
  }
@@ -125,7 +130,7 @@ const Root = /*#__PURE__*/React__default.forwardRef(function CollectionRoot(prop
125
130
  tabIndex: tabIndex
126
131
  }));
127
132
  });
128
- const getNextIndexFromKeycode = (event, length, activeIndex) => {
133
+ var getNextIndexFromKeycode = function getNextIndexFromKeycode(event, length, activeIndex) {
129
134
  switch (event.key) {
130
135
  case 'ArrowUp':
131
136
  return activeIndex === undefined ? length - 1 : activeIndex > 0 ? activeIndex - 1 : activeIndex;
@@ -139,8 +144,11 @@ const getNextIndexFromKeycode = (event, length, activeIndex) => {
139
144
  return;
140
145
  }
141
146
  };
142
- const getNextEnabledItem = (event, options, activeIndex, recurse = true) => {
143
- const nextIndex = getNextIndexFromKeycode(event, options.length, activeIndex);
147
+ var getNextEnabledItem = function getNextEnabledItem(event, options, activeIndex, recurse) {
148
+ if (recurse === void 0) {
149
+ recurse = true;
150
+ }
151
+ var nextIndex = getNextIndexFromKeycode(event, options.length, activeIndex);
144
152
  if (nextIndex !== undefined) {
145
153
  if (nextIndex === activeIndex) {
146
154
  return activeIndex;
@@ -149,15 +157,13 @@ const getNextEnabledItem = (event, options, activeIndex, recurse = true) => {
149
157
  // but prevent infinite loops if all elements are disabled by disabling recursion
150
158
  if (recurse) {
151
159
  if (nextIndex === 0) {
152
- return getNextEnabledItem(new KeyboardEvent(event.type, {
153
- ...event,
160
+ return getNextEnabledItem(new KeyboardEvent(event.type, _extends({}, event, {
154
161
  key: 'ArrowDown'
155
- }), options, nextIndex, false);
162
+ })), options, nextIndex, false);
156
163
  } else if (nextIndex === options.length - 1) {
157
- return getNextEnabledItem(new KeyboardEvent(event.type, {
158
- ...event,
164
+ return getNextEnabledItem(new KeyboardEvent(event.type, _extends({}, event, {
159
165
  key: 'ArrowUp'
160
- }), options, nextIndex, false);
166
+ })), options, nextIndex, false);
161
167
  }
162
168
  }
163
169
  return getNextEnabledItem(event, options, nextIndex, recurse);
@@ -165,7 +171,7 @@ const getNextEnabledItem = (event, options, activeIndex, recurse = true) => {
165
171
  }
166
172
  return nextIndex;
167
173
  };
168
- const isSkippableItem = element => {
174
+ var isSkippableItem = function isSkippableItem(element) {
169
175
  return element.getAttribute('role') === 'presentation' || !!element.hasAttribute('disabled') || !!element.getAttribute('aria-disabled') || !!element.getAttribute('aria-hidden');
170
176
  };
171
177
 
@@ -1 +1 @@
1
- {"version":3,"file":"Root.js","sources":["../../../../../../../../src/primitives/Collection/components/Root.tsx"],"sourcesContent":["import React from 'react';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { isAriaDirectionKey } from '../../../utils/aria';\nimport { createCustomKeyboardEvent } from '../../../utils/input';\n\n/* This component provides a keyboard navigable collection primitive for use in lists\n * It is unlikely you need to edit this component\n */\n\nexport type CollectionProps = React.HTMLAttributes<HTMLDivElement> & {\n querySelector: string;\n resetOnChange?: unknown;\n};\n\nexport type CollectionRef = HTMLDivElement & {\n setActiveIndexByElement: (option: HTMLDivElement) => void;\n};\n\nconst getOptionsFromCollection = (collection: HTMLDivElement, selector: string): NodeListOf<Element> =>\n collection.querySelectorAll(selector);\n\n// we use javascript to set attributes (rather than cloning children and adding them)\n// so that we can support nesting (e.g. groups) - child elements that aren't options.\n// without doing this we would have to unwrap and flatten all groups\nexport const Root = React.forwardRef<CollectionRef, CollectionProps>(function CollectionRoot(props, ref) {\n const { querySelector, resetOnChange, tabIndex = 0, ...otherProps } = props;\n const internalRef = useMergedRef<CollectionRef>(ref);\n const [activeIndex, setActiveIndex] = React.useState<number | undefined>();\n\n const setActiveOption = (index: number, collection: HTMLDivElement, option: Element) => {\n collection.querySelector(`[aria-current]`)?.removeAttribute('aria-current');\n option.setAttribute('aria-current', 'true');\n option.scrollIntoView({ block: 'nearest' });\n setActiveIndex(index);\n };\n\n const setActiveIndexByElement = React.useCallback(\n (option: HTMLDivElement) => {\n if (internalRef.current) {\n if (option.matches(querySelector)) {\n const options = getOptionsFromCollection(internalRef.current, querySelector);\n const nextActiveIndex = Array.from(options).indexOf(option);\n\n if (nextActiveIndex > -1) {\n setActiveOption(nextActiveIndex, internalRef.current, option);\n }\n }\n }\n },\n [internalRef.current, querySelector]\n );\n\n React.useEffect(() => {\n if (internalRef.current) {\n internalRef.current.setActiveIndexByElement = setActiveIndexByElement;\n }\n }, [internalRef.current]);\n\n React.useEffect(() => {\n if (internalRef.current) {\n const selected = internalRef.current.querySelectorAll(`[aria-current=\"true\"]`);\n const options = getOptionsFromCollection(internalRef.current, querySelector);\n\n if (options.length && selected.length === 1) {\n const firstSelected = internalRef.current.querySelector(`[aria-selected]`);\n\n if (firstSelected) {\n const selectedIndex = Array.from(options).indexOf(firstSelected);\n\n if (selectedIndex > -1) {\n setActiveOption(selectedIndex, internalRef.current, firstSelected);\n }\n }\n }\n }\n }, [resetOnChange]);\n\n React.useEffect(() => {\n if (internalRef.current) {\n const options = getOptionsFromCollection(internalRef.current, querySelector);\n\n if (options.length) {\n let selected = internalRef.current.querySelectorAll(`[aria-current=\"true\"]`);\n\n // if nothing is current (keyboard visible), look for selected items\n if (selected.length === 0) {\n selected = internalRef.current.querySelectorAll(`[aria-selected]`);\n }\n\n // if one item is selected, make sure it's current\n if (selected.length === 1) {\n if (options) {\n const firstSelected = selected.item(0);\n const selectedIndex = Array.from(options).indexOf(firstSelected);\n\n if (selectedIndex > -1) {\n setActiveOption(selectedIndex, internalRef.current, firstSelected);\n }\n }\n } else {\n // multiple selected or none selected should go to 0\n setActiveOption(0, internalRef.current, options.item(0));\n }\n }\n }\n }, [props.children]);\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n const option = event.target as HTMLElement;\n\n if (option.matches(querySelector)) {\n const options = getOptionsFromCollection(event.currentTarget, querySelector);\n const nextActiveIndex = Array.from(options).indexOf(option);\n\n if (nextActiveIndex > -1) {\n setActiveOption(nextActiveIndex, event.currentTarget, option);\n }\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // this stops the event dispatched to the option rebounding back and starting an infinite loop\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (otherProps.onKeyDown) {\n otherProps.onKeyDown(event);\n }\n\n if (event.isDefaultPrevented()) {\n return;\n }\n\n const options = getOptionsFromCollection(event.currentTarget, querySelector);\n\n if (options) {\n if (isAriaDirectionKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n const nextActiveIndex = getNextEnabledItem(event, options, activeIndex);\n\n if (nextActiveIndex !== undefined && nextActiveIndex !== activeIndex) {\n setActiveOption(nextActiveIndex, event.currentTarget, options.item(nextActiveIndex));\n }\n } else if (activeIndex !== undefined && !!options.item(activeIndex)) {\n // forward events onto the underlying option - this lets consumers place onKeyDown handlers on their own components\n options\n .item(activeIndex)\n ?.dispatchEvent(createCustomKeyboardEvent(event as React.KeyboardEvent<HTMLInputElement>));\n }\n }\n };\n\n return <div {...otherProps} onClick={handleClick} onKeyDown={handleKeyDown} ref={internalRef} tabIndex={tabIndex} />;\n});\n\nexport const getNextIndexFromKeycode = (\n event: React.KeyboardEvent,\n length: number,\n activeIndex: number | undefined\n): number | undefined => {\n switch (event.key) {\n case 'ArrowUp':\n return activeIndex === undefined ? length - 1 : activeIndex > 0 ? activeIndex - 1 : activeIndex;\n\n case 'ArrowDown':\n return activeIndex === undefined ? 0 : activeIndex < length - 1 ? activeIndex + 1 : activeIndex;\n\n case 'Home':\n return 0;\n\n case 'End':\n return length - 1;\n\n default:\n return;\n }\n};\n\nexport const getNextEnabledItem = (\n event: React.KeyboardEvent<HTMLElement>,\n options: NodeListOf<Element>,\n activeIndex: number | undefined,\n recurse = true\n): number | undefined => {\n const nextIndex = getNextIndexFromKeycode(event, options.length, activeIndex);\n\n if (nextIndex !== undefined) {\n if (nextIndex === activeIndex) {\n return activeIndex;\n } else if (options.item(nextIndex) && isSkippableItem(options.item(nextIndex))) {\n // check in the other direction if the first or last item is disabled,\n // but prevent infinite loops if all elements are disabled by disabling recursion\n if (recurse) {\n if (nextIndex === 0) {\n return getNextEnabledItem(\n new KeyboardEvent(event.type, { ...(event as any), key: 'ArrowDown' }) as any,\n options,\n nextIndex,\n false\n );\n } else if (nextIndex === options.length - 1) {\n return getNextEnabledItem(\n new KeyboardEvent(event.type, { ...(event as any), key: 'ArrowUp' }) as any,\n options,\n nextIndex,\n false\n );\n }\n }\n\n return getNextEnabledItem(event, options, nextIndex, recurse);\n }\n }\n\n return nextIndex;\n};\n\nconst isSkippableItem = (element: Element) => {\n return (\n element.getAttribute('role') === 'presentation' ||\n !!element.hasAttribute('disabled') ||\n !!element.getAttribute('aria-disabled') ||\n !!element.getAttribute('aria-hidden')\n );\n};\n"],"names":["getOptionsFromCollection","collection","selector","querySelectorAll","Root","React","forwardRef","CollectionRoot","props","ref","querySelector","resetOnChange","tabIndex","otherProps","internalRef","useMergedRef","activeIndex","setActiveIndex","useState","setActiveOption","index","option","_collection$querySele","removeAttribute","setAttribute","scrollIntoView","block","setActiveIndexByElement","useCallback","current","matches","options","nextActiveIndex","Array","from","indexOf","useEffect","selected","length","firstSelected","selectedIndex","item","children","handleClick","event","target","currentTarget","handleKeyDown","onKeyDown","isDefaultPrevented","isAriaDirectionKey","preventDefault","stopPropagation","getNextEnabledItem","undefined","_options$item","dispatchEvent","createCustomKeyboardEvent","onClick","getNextIndexFromKeycode","key","recurse","nextIndex","isSkippableItem","KeyboardEvent","type","element","getAttribute","hasAttribute"],"mappings":";;;;;AAkBA,MAAMA,wBAAwB,GAAGA,CAACC,UAA0B,EAAEC,QAAgB,KAC1ED,UAAU,CAACE,gBAAgB,CAACD,QAAQ,CAAC;AAEzC;AACA;AACA;MACaE,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAiC,SAASC,cAAcA,CAACC,KAAK,EAAEC,GAAG;EACnG,MAAM;IAAEC,aAAa;IAAEC,aAAa;IAAEC,QAAQ,GAAG,CAAC;IAAE,GAAGC;GAAY,GAAGL,KAAK;EAC3E,MAAMM,WAAW,GAAGC,YAAY,CAAgBN,GAAG,CAAC;EACpD,MAAM,CAAC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/Collection/components/Root.tsx"],"sourcesContent":["import React from 'react';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { isAriaDirectionKey } from '../../../utils/aria';\nimport { createCustomKeyboardEvent } from '../../../utils/input';\n\n/* This component provides a keyboard navigable collection primitive for use in lists\n * It is unlikely you need to edit this component\n */\n\nexport type CollectionProps = React.HTMLAttributes<HTMLDivElement> & {\n querySelector: string;\n resetOnChange?: unknown;\n};\n\nexport type CollectionRef = HTMLDivElement & {\n setActiveIndexByElement: (option: HTMLDivElement) => void;\n};\n\nconst getOptionsFromCollection = (collection: HTMLDivElement, selector: string): NodeListOf<Element> =>\n collection.querySelectorAll(selector);\n\n// we use javascript to set attributes (rather than cloning children and adding them)\n// so that we can support nesting (e.g. groups) - child elements that aren't options.\n// without doing this we would have to unwrap and flatten all groups\nexport const Root = React.forwardRef<CollectionRef, CollectionProps>(function CollectionRoot(props, ref) {\n const { querySelector, resetOnChange, tabIndex = 0, ...otherProps } = props;\n const internalRef = useMergedRef<CollectionRef>(ref);\n const [activeIndex, setActiveIndex] = React.useState<number | undefined>();\n\n const setActiveOption = (index: number, collection: HTMLDivElement, option: Element) => {\n collection.querySelector(`[aria-current]`)?.removeAttribute('aria-current');\n option.setAttribute('aria-current', 'true');\n option.scrollIntoView({ block: 'nearest' });\n setActiveIndex(index);\n };\n\n const setActiveIndexByElement = React.useCallback(\n (option: HTMLDivElement) => {\n if (internalRef.current) {\n if (option.matches(querySelector)) {\n const options = getOptionsFromCollection(internalRef.current, querySelector);\n const nextActiveIndex = Array.from(options).indexOf(option);\n\n if (nextActiveIndex > -1) {\n setActiveOption(nextActiveIndex, internalRef.current, option);\n }\n }\n }\n },\n [internalRef.current, querySelector]\n );\n\n React.useEffect(() => {\n if (internalRef.current) {\n internalRef.current.setActiveIndexByElement = setActiveIndexByElement;\n }\n }, [internalRef.current]);\n\n React.useEffect(() => {\n if (internalRef.current) {\n const selected = internalRef.current.querySelectorAll(`[aria-current=\"true\"]`);\n const options = getOptionsFromCollection(internalRef.current, querySelector);\n\n if (options.length && selected.length === 1) {\n const firstSelected = internalRef.current.querySelector(`[aria-selected]`);\n\n if (firstSelected) {\n const selectedIndex = Array.from(options).indexOf(firstSelected);\n\n if (selectedIndex > -1) {\n setActiveOption(selectedIndex, internalRef.current, firstSelected);\n }\n }\n }\n }\n }, [resetOnChange]);\n\n React.useEffect(() => {\n if (internalRef.current) {\n const options = getOptionsFromCollection(internalRef.current, querySelector);\n\n if (options.length) {\n let selected = internalRef.current.querySelectorAll(`[aria-current=\"true\"]`);\n\n // if nothing is current (keyboard visible), look for selected items\n if (selected.length === 0) {\n selected = internalRef.current.querySelectorAll(`[aria-selected]`);\n }\n\n // if one item is selected, make sure it's current\n if (selected.length === 1) {\n if (options) {\n const firstSelected = selected.item(0);\n const selectedIndex = Array.from(options).indexOf(firstSelected);\n\n if (selectedIndex > -1) {\n setActiveOption(selectedIndex, internalRef.current, firstSelected);\n }\n }\n } else {\n // multiple selected or none selected should go to 0\n setActiveOption(0, internalRef.current, options.item(0));\n }\n }\n }\n }, [props.children]);\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n const option = event.target as HTMLElement;\n\n if (option.matches(querySelector)) {\n const options = getOptionsFromCollection(event.currentTarget, querySelector);\n const nextActiveIndex = Array.from(options).indexOf(option);\n\n if (nextActiveIndex > -1) {\n setActiveOption(nextActiveIndex, event.currentTarget, option);\n }\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // this stops the event dispatched to the option rebounding back and starting an infinite loop\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (otherProps.onKeyDown) {\n otherProps.onKeyDown(event);\n }\n\n if (event.isDefaultPrevented()) {\n return;\n }\n\n const options = getOptionsFromCollection(event.currentTarget, querySelector);\n\n if (options) {\n if (isAriaDirectionKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n const nextActiveIndex = getNextEnabledItem(event, options, activeIndex);\n\n if (nextActiveIndex !== undefined && nextActiveIndex !== activeIndex) {\n setActiveOption(nextActiveIndex, event.currentTarget, options.item(nextActiveIndex));\n }\n } else if (activeIndex !== undefined && !!options.item(activeIndex)) {\n // forward events onto the underlying option - this lets consumers place onKeyDown handlers on their own components\n options\n .item(activeIndex)\n ?.dispatchEvent(createCustomKeyboardEvent(event as React.KeyboardEvent<HTMLInputElement>));\n }\n }\n };\n\n return <div {...otherProps} onClick={handleClick} onKeyDown={handleKeyDown} ref={internalRef} tabIndex={tabIndex} />;\n});\n\nexport const getNextIndexFromKeycode = (\n event: React.KeyboardEvent,\n length: number,\n activeIndex: number | undefined\n): number | undefined => {\n switch (event.key) {\n case 'ArrowUp':\n return activeIndex === undefined ? length - 1 : activeIndex > 0 ? activeIndex - 1 : activeIndex;\n\n case 'ArrowDown':\n return activeIndex === undefined ? 0 : activeIndex < length - 1 ? activeIndex + 1 : activeIndex;\n\n case 'Home':\n return 0;\n\n case 'End':\n return length - 1;\n\n default:\n return;\n }\n};\n\nexport const getNextEnabledItem = (\n event: React.KeyboardEvent<HTMLElement>,\n options: NodeListOf<Element>,\n activeIndex: number | undefined,\n recurse = true\n): number | undefined => {\n const nextIndex = getNextIndexFromKeycode(event, options.length, activeIndex);\n\n if (nextIndex !== undefined) {\n if (nextIndex === activeIndex) {\n return activeIndex;\n } else if (options.item(nextIndex) && isSkippableItem(options.item(nextIndex))) {\n // check in the other direction if the first or last item is disabled,\n // but prevent infinite loops if all elements are disabled by disabling recursion\n if (recurse) {\n if (nextIndex === 0) {\n return getNextEnabledItem(\n new KeyboardEvent(event.type, { ...(event as any), key: 'ArrowDown' }) as any,\n options,\n nextIndex,\n false\n );\n } else if (nextIndex === options.length - 1) {\n return getNextEnabledItem(\n new KeyboardEvent(event.type, { ...(event as any), key: 'ArrowUp' }) as any,\n options,\n nextIndex,\n false\n );\n }\n }\n\n return getNextEnabledItem(event, options, nextIndex, recurse);\n }\n }\n\n return nextIndex;\n};\n\nconst isSkippableItem = (element: Element) => {\n return (\n element.getAttribute('role') === 'presentation' ||\n !!element.hasAttribute('disabled') ||\n !!element.getAttribute('aria-disabled') ||\n !!element.getAttribute('aria-hidden')\n );\n};\n"],"names":["getOptionsFromCollection","collection","selector","querySelectorAll","Root","React","forwardRef","CollectionRoot","props","ref","querySelector","resetOnChange","_props$tabIndex","tabIndex","otherProps","_objectWithoutPropertiesLoose","_excluded","internalRef","useMergedRef","_React$useState","useState","activeIndex","setActiveIndex","setActiveOption","index","option","_collection$querySele","removeAttribute","setAttribute","scrollIntoView","block","setActiveIndexByElement","useCallback","current","matches","options","nextActiveIndex","Array","from","indexOf","useEffect","selected","length","firstSelected","selectedIndex","item","children","handleClick","event","target","currentTarget","handleKeyDown","onKeyDown","isDefaultPrevented","isAriaDirectionKey","preventDefault","stopPropagation","getNextEnabledItem","undefined","_options$item","dispatchEvent","createCustomKeyboardEvent","onClick","getNextIndexFromKeycode","key","recurse","nextIndex","isSkippableItem","KeyboardEvent","type","_extends","element","getAttribute","hasAttribute"],"mappings":";;;;;;;AAkBA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,UAA0B,EAAEC,QAAgB;EAAA,OAC1ED,UAAU,CAACE,gBAAgB,CAACD,QAAQ,CAAC;AAAA;AAEzC;AACA;AACA;IACaE,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAiC,SAASC,cAAcA,CAACC,KAAK,EAAEC,GAAG;EACnG,IAAQC,aAAa,GAAiDF,KAAK,CAAnEE,aAAa;IAAEC,aAAa,GAAkCH,KAAK,CAApDG,aAAa;IAAAC,eAAA,GAAkCJ,KAAK,CAArCK,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,CAAC,GAAAA,eAAA;IAAKE,UAAU,GAAAC,6BAAA,CAAKP,KAAK,EAAAQ,SAAA;EAC3E,IAAMC,WAAW,GAAGC,YAAY,CAAgBT,GAAG,CAAC;EACpD,IAAAU,eAAA,GAAsCd,cAAK,CAACe,QAAQ,EAAsB;IAAnEC,WAAW,GAAAF,eAAA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,OAAO,CAACC,YAAY,CAAC,aAAa,CAAC;AAE7C,CAAC;;;;"}
@@ -1,7 +1,9 @@
1
1
  import React__default from 'react';
2
2
 
3
- const Listbox2Context = /*#__PURE__*/React__default.createContext({});
4
- const useListbox2Context = () => React__default.useContext(Listbox2Context);
3
+ var Listbox2Context = /*#__PURE__*/React__default.createContext({});
4
+ var useListbox2Context = function useListbox2Context() {
5
+ return React__default.useContext(Listbox2Context);
6
+ };
5
7
 
6
8
  export { Listbox2Context, useListbox2Context };
7
9
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Context.tsx"],"sourcesContent":["import React from 'react';\nimport { Listbox2Value } from '../types';\n\nexport type Listbox2ContextProps = {\n disabled: boolean;\n readOnly: boolean;\n setValue: (value: Listbox2Value) => void;\n value?: Listbox2Value;\n};\n\nexport const Listbox2Context = React.createContext({} as Listbox2ContextProps);\nexport const useListbox2Context = () => React.useContext(Listbox2Context);\n"],"names":["Listbox2Context","React","createContext","useListbox2Context","useContext"],"mappings":";;MAUaA,eAAe,gBAAGC,cAAK,CAACC,aAAa,CAAC,EAA0B;MAChEC,kBAAkB,GAAGA,MAAMF,cAAK,CAACG,UAAU,CAACJ,eAAe;;;;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Context.tsx"],"sourcesContent":["import React from 'react';\nimport { Listbox2Value } from '../types';\n\nexport type Listbox2ContextProps = {\n disabled: boolean;\n readOnly: boolean;\n setValue: (value: Listbox2Value) => void;\n value?: Listbox2Value;\n};\n\nexport const Listbox2Context = React.createContext({} as Listbox2ContextProps);\nexport const useListbox2Context = () => React.useContext(Listbox2Context);\n"],"names":["Listbox2Context","React","createContext","useListbox2Context","useContext"],"mappings":";;IAUaA,eAAe,gBAAGC,cAAK,CAACC,aAAa,CAAC,EAA0B;IAChEC,kBAAkB,GAAG,SAArBA,kBAAkBA;EAAA,OAASF,cAAK,CAACG,UAAU,CAACJ,eAAe,CAAC;AAAA;;;;"}