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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (662) 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 +2 -2
  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/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  18. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  20. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  22. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  24. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  26. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  28. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  30. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  32. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  34. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  36. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  38. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  39. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  40. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  41. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Badge/Badge.js +21 -25
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  65. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  67. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  69. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  73. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  100. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  109. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  110. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  111. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  113. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  117. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  158. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  160. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  161. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  162. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  163. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  164. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  166. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  168. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  170. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  172. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  174. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  176. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  180. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  184. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  186. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  188. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  190. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  192. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  194. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  196. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  198. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  200. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  202. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  204. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  206. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  208. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  210. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  212. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  214. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  216. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  220. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  222. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  224. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  226. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  228. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  238. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  240. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  242. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  244. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  246. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  248. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  250. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  254. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  256. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  258. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  260. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  262. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  264. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  265. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  266. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  268. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  270. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  272. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  274. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  275. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  276. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  278. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  280. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  282. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  284. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  286. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  288. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  290. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +29 -30
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  292. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  294. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  296. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +136 -128
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  298. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  300. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  302. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  304. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  306. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  308. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  310. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  312. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  314. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  316. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  324. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  330. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  332. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  334. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  338. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  339. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Table3/Table3.js +12 -10
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  356. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  360. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  370. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  372. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  374. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  376. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  378. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  380. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  382. package/dist/esm/packages/taco/src/components/Tag/Tag.js +12 -12
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  384. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  386. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  388. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  390. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  391. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  392. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  394. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  396. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  398. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  400. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  402. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  404. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  406. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  408. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  409. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  410. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  412. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  414. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  416. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  418. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  420. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  422. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  424. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  426. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  428. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  430. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  431. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  432. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  434. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  444. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  450. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +34 -29
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -1
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +54 -39
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -37
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +20 -16
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +50 -41
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  544. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  545. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -24
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  622. package/dist/esm/packages/taco/src/types.js +1 -1
  623. package/dist/esm/packages/taco/src/types.js.map +1 -1
  624. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  625. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  627. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  629. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  631. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  633. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  635. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  637. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  639. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  643. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  645. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  647. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  649. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  651. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  653. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  655. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  656. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  657. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  658. package/dist/taco.cjs.development.js +7857 -6877
  659. package/dist/taco.cjs.development.js.map +1 -1
  660. package/dist/taco.cjs.production.min.js +1 -1
  661. package/dist/taco.cjs.production.min.js.map +1 -1
  662. package/package.json +1 -1
@@ -1,46 +1,45 @@
1
1
  import { forwardRef, createElement } from 'react';
2
2
  import cn from 'clsx';
3
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { Icon } from '../Icon/Icon.js';
4
5
  import { getButtonClasses, getAppearanceClasses, createButtonWithTooltip, createButtonWithOverlays } from '../Button/util.js';
5
6
 
6
- const Base = /*#__PURE__*/forwardRef(function IconButtonBase(props, ref) {
7
- const {
8
- icon,
9
- rounded = false,
10
- ...otherProps
11
- } = props;
12
- const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
7
+ var _excluded = ["icon", "rounded"],
8
+ _excluded2 = ["dialog", "hanger", "menu", "popover"];
9
+ var Base = /*#__PURE__*/forwardRef(function IconButtonBase(props, ref) {
10
+ var icon = props.icon,
11
+ _props$rounded = props.rounded,
12
+ rounded = _props$rounded === void 0 ? false : _props$rounded,
13
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
14
+ var className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
13
15
  'rounded-full': rounded,
14
16
  rounded: !rounded
15
17
  }, props.className);
16
18
  if (!icon) {
17
19
  return null;
18
20
  }
19
- return createButtonWithTooltip({
20
- ...otherProps,
21
+ return createButtonWithTooltip(_extends({}, otherProps, {
21
22
  children: /*#__PURE__*/createElement(Icon, {
22
23
  name: icon,
23
24
  className: "m-0 p-0"
24
25
  }),
25
26
  'data-taco': 'icon-button'
26
- }, className, ref);
27
+ }), className, ref);
27
28
  });
28
- const IconButton = /*#__PURE__*/forwardRef(function Button(props, ref) {
29
- const {
30
- dialog,
31
- hanger,
32
- menu,
33
- popover,
34
- ...buttonProps
35
- } = props;
36
- const button = /*#__PURE__*/createElement(Base, Object.assign({}, buttonProps, {
29
+ var IconButton = /*#__PURE__*/forwardRef(function Button(props, ref) {
30
+ var dialog = props.dialog,
31
+ hanger = props.hanger,
32
+ menu = props.menu,
33
+ popover = props.popover,
34
+ buttonProps = _objectWithoutPropertiesLoose(props, _excluded2);
35
+ var button = /*#__PURE__*/createElement(Base, Object.assign({}, buttonProps, {
37
36
  ref: ref
38
37
  }));
39
38
  return createButtonWithOverlays({
40
- dialog,
41
- hanger,
42
- menu,
43
- popover
39
+ dialog: dialog,
40
+ hanger: hanger,
41
+ menu: menu,
42
+ popover: popover
44
43
  }, button);
45
44
  });
46
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":["../../../../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getAppearanceClasses, getButtonClasses, createButtonWithTooltip, createButtonWithOverlays } from '../Button/util';\nimport { Appearance } from '../../types';\nimport { DialogProps, HangerProps, MenuProps, PopoverProps } from '../..';\n\nexport type IconButtonProps = Omit<ButtonPrimitive.ButtonProps, 'children'> & {\n /** Appearance will change the style of the button */\n appearance?: Appearance;\n /**\n * Dialog component associated with the button, clicking the button will open the dialog.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated dialog when clicked.\n */\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n /** Hanger component associated with the button. */\n hanger?: (props: Partial<HangerProps>) => JSX.Element;\n /** Set which icon should be rendered within button */\n icon: IconName; // this dynamic type causes the type extraction for props to fail\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /**\n * Popover component associated with the button, clicking the button will open the popover.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated popover when clicked.\n */\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\n /**\n * Set whether the button is rounded.\n * Default value is `false`\n */\n rounded?: boolean;\n /** A tooltip to show when hovering over the button */\n tooltip?: string | JSX.Element;\n};\n\nexport const Base = React.forwardRef(function IconButtonBase(\n props: IconButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n) {\n const { icon, rounded = false, ...otherProps } = props;\n\n const className = cn(\n 'w-8',\n getButtonClasses(),\n getAppearanceClasses(otherProps.appearance, true),\n {\n 'rounded-full': rounded,\n rounded: !rounded,\n },\n props.className\n );\n\n if (!icon) {\n return null;\n }\n\n return createButtonWithTooltip(\n { ...otherProps, children: <Icon name={icon} className=\"m-0 p-0\" />, 'data-taco': 'icon-button' },\n className,\n ref\n );\n});\n\nexport const IconButton = React.forwardRef(function Button(\n props: IconButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n) {\n const { dialog, hanger, menu, popover, ...buttonProps } = props;\n const button = <Base {...buttonProps} ref={ref} />;\n\n return createButtonWithOverlays({ dialog, hanger, menu, popover }, button);\n});\n"],"names":["Base","React","IconButtonBase","props","ref","icon","rounded","otherProps","className","cn","getButtonClasses","getAppearanceClasses","appearance","createButtonWithTooltip","children","Icon","name","IconButton","Button","dialog","hanger","menu","popover","buttonProps","button","createButtonWithOverlays"],"mappings":";;;;;MAsCaA,IAAI,gBAAGC,UAAgB,CAAC,SAASC,cAAcA,CACxDC,KAAsB,EACtBC,GAAqD;EAErD,MAAM;IAAEC,IAAI;IAAEC,OAAO,GAAG,KAAK;IAAE,GAAGC;GAAY,GAAGJ,KAAK;EAEtD,MAAMK,SAAS,GAAGC,EAAE,CAChB,KAAK,EACLC,gBAAgB,EAAE,EAClBC,oBAAoB,CAACJ,UAAU,CAACK,UAAU,EAAE,IAAI,CAAC,EACjD;IACI,cAAc,EAAEN,OAAO;IACvBA,OAAO,EAAE,CAACA;GACb,EACDH,KAAK,CAACK,SAAS,CAClB;EAED,IAAI,CAACH,IAAI,EAAE;IACP,OAAO,IAAI;;EAGf,OAAOQ,uBAAuB,CAC1B;IAAE,GAAGN,UAAU;IAAEO,QAAQ,eAAEb,cAACc,IAAI;MAACC,IAAI,EAAEX,IAAI;MAAEG,SAAS,EAAC;MAAY;IAAE,WAAW,EAAE;GAAe,EACjGA,SAAS,EACTJ,GAAG,CACN;AACL,CAAC;MAEYa,UAAU,gBAAGhB,UAAgB,CAAC,SAASiB,MAAMA,CACtDf,KAAsB,EACtBC,GAAqD;EAErD,MAAM;IAAEe,MAAM;IAAEC,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAE,GAAGC;GAAa,GAAGpB,KAAK;EAC/D,MAAMqB,MAAM,gBAAGvB,cAACD,IAAI,oBAAKuB,WAAW;IAAEnB,GAAG,EAAEA;KAAO;EAElD,OAAOqB,wBAAwB,CAAC;IAAEN,MAAM;IAAEC,MAAM;IAAEC,IAAI;IAAEC;GAAS,EAAEE,MAAM,CAAC;AAC9E,CAAC;;;;"}
1
+ {"version":3,"file":"IconButton.js","sources":["../../../../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getAppearanceClasses, getButtonClasses, createButtonWithTooltip, createButtonWithOverlays } from '../Button/util';\nimport { Appearance } from '../../types';\nimport { DialogProps, HangerProps, MenuProps, PopoverProps } from '../..';\n\nexport type IconButtonProps = Omit<ButtonPrimitive.ButtonProps, 'children'> & {\n /** Appearance will change the style of the button */\n appearance?: Appearance;\n /**\n * Dialog component associated with the button, clicking the button will open the dialog.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated dialog when clicked.\n */\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n /** Hanger component associated with the button. */\n hanger?: (props: Partial<HangerProps>) => JSX.Element;\n /** Set which icon should be rendered within button */\n icon: IconName; // this dynamic type causes the type extraction for props to fail\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /**\n * Popover component associated with the button, clicking the button will open the popover.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated popover when clicked.\n */\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\n /**\n * Set whether the button is rounded.\n * Default value is `false`\n */\n rounded?: boolean;\n /** A tooltip to show when hovering over the button */\n tooltip?: string | JSX.Element;\n};\n\nexport const Base = React.forwardRef(function IconButtonBase(\n props: IconButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n) {\n const { icon, rounded = false, ...otherProps } = props;\n\n const className = cn(\n 'w-8',\n getButtonClasses(),\n getAppearanceClasses(otherProps.appearance, true),\n {\n 'rounded-full': rounded,\n rounded: !rounded,\n },\n props.className\n );\n\n if (!icon) {\n return null;\n }\n\n return createButtonWithTooltip(\n { ...otherProps, children: <Icon name={icon} className=\"m-0 p-0\" />, 'data-taco': 'icon-button' },\n className,\n ref\n );\n});\n\nexport const IconButton = React.forwardRef(function Button(\n props: IconButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n) {\n const { dialog, hanger, menu, popover, ...buttonProps } = props;\n const button = <Base {...buttonProps} ref={ref} />;\n\n return createButtonWithOverlays({ dialog, hanger, menu, popover }, button);\n});\n"],"names":["Base","React","IconButtonBase","props","ref","icon","_props$rounded","rounded","otherProps","_objectWithoutPropertiesLoose","_excluded","className","cn","getButtonClasses","getAppearanceClasses","appearance","createButtonWithTooltip","_extends","children","Icon","name","IconButton","Button","dialog","hanger","menu","popover","buttonProps","_excluded2","button","createButtonWithOverlays"],"mappings":";;;;;;;;IAsCaA,IAAI,gBAAGC,UAAgB,CAAC,SAASC,cAAcA,CACxDC,KAAsB,EACtBC,GAAqD;EAErD,IAAQC,IAAI,GAAqCF,KAAK,CAA9CE,IAAI;IAAAC,cAAA,GAAqCH,KAAK,CAAxCI,OAAO;IAAPA,OAAO,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IAAKE,UAAU,GAAAC,6BAAA,CAAKN,KAAK,EAAAO,SAAA;EAEtD,IAAMC,SAAS,GAAGC,EAAE,CAChB,KAAK,EACLC,gBAAgB,EAAE,EAClBC,oBAAoB,CAACN,UAAU,CAACO,UAAU,EAAE,IAAI,CAAC,EACjD;IACI,cAAc,EAAER,OAAO;IACvBA,OAAO,EAAE,CAACA;GACb,EACDJ,KAAK,CAACQ,SAAS,CAClB;EAED,IAAI,CAACN,IAAI,EAAE;IACP,OAAO,IAAI;;EAGf,OAAOW,uBAAuB,CAAAC,QAAA,KACrBT,UAAU;IAAEU,QAAQ,eAAEjB,cAACkB,IAAI;MAACC,IAAI,EAAEf,IAAI;MAAEM,SAAS,EAAC;MAAY;IAAE,WAAW,EAAE;MAClFA,SAAS,EACTP,GAAG,CACN;AACL,CAAC;IAEYiB,UAAU,gBAAGpB,UAAgB,CAAC,SAASqB,MAAMA,CACtDnB,KAAsB,EACtBC,GAAqD;EAErD,IAAQmB,MAAM,GAA4CpB,KAAK,CAAvDoB,MAAM;IAAEC,MAAM,GAAoCrB,KAAK,CAA/CqB,MAAM;IAAEC,IAAI,GAA8BtB,KAAK,CAAvCsB,IAAI;IAAEC,OAAO,GAAqBvB,KAAK,CAAjCuB,OAAO;IAAKC,WAAW,GAAAlB,6BAAA,CAAKN,KAAK,EAAAyB,UAAA;EAC/D,IAAMC,MAAM,gBAAG5B,cAACD,IAAI,oBAAK2B,WAAW;IAAEvB,GAAG,EAAEA;KAAO;EAElD,OAAO0B,wBAAwB,CAAC;IAAEP,MAAM,EAANA,MAAM;IAAEC,MAAM,EAANA,MAAM;IAAEC,IAAI,EAAJA,IAAI;IAAEC,OAAO,EAAPA;GAAS,EAAEG,MAAM,CAAC;AAC9E,CAAC;;;;"}
@@ -1,28 +1,33 @@
1
1
  import { forwardRef, createElement, useLayoutEffect, useRef, memo, cloneElement } from 'react';
2
2
  import cn from 'clsx';
3
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { Icon } from '../Icon/Icon.js';
4
5
  import { useMergedRef } from '../../hooks/useMergedRef.js';
5
6
  import { isPressingMetaKey } from '../../utils/keyboard.js';
6
7
  import { getButtonStateClasses, getInputClasses } from './util.js';
7
8
  import { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener.js';
8
9
 
9
- const validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];
10
- const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWithoutDeprecatedFeatures(props, ref) {
11
- const {
12
- highlighted,
13
- invalid,
14
- onKeyDown,
15
- postfix,
16
- prefix,
17
- type = 'text',
18
- ...attributes
19
- } = props;
20
- const internalRef = useMergedRef(ref);
10
+ var _excluded = ["highlighted", "invalid", "onKeyDown", "postfix", "prefix", "type"],
11
+ _excluded2 = ["button", "icon"];
12
+ var validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];
13
+ var InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWithoutDeprecatedFeatures(props, ref) {
14
+ var highlighted = props.highlighted,
15
+ invalid = props.invalid,
16
+ onKeyDown = props.onKeyDown,
17
+ postfix = props.postfix,
18
+ prefix = props.prefix,
19
+ _props$type = props.type,
20
+ type = _props$type === void 0 ? 'text' : _props$type,
21
+ attributes = _objectWithoutPropertiesLoose(props, _excluded);
22
+ var internalRef = useMergedRef(ref);
21
23
  // input[type=number] does not support setSelectionRange by default, this adds support
22
- useLayoutEffect(() => {
24
+ useLayoutEffect(function () {
23
25
  if (internalRef.current && type === 'number') {
24
26
  (function (fn) {
25
- internalRef.current.setSelectionRange = function (...args) {
27
+ internalRef.current.setSelectionRange = function () {
28
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
29
+ args[_key] = arguments[_key];
30
+ }
26
31
  if (this.type === 'number') {
27
32
  this.type = 'text';
28
33
  fn.apply(this, args);
@@ -34,7 +39,7 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
34
39
  })(internalRef.current.setSelectionRange);
35
40
  }
36
41
  }, []);
37
- const handleKeyDown = event => {
42
+ var handleKeyDown = function handleKeyDown(event) {
38
43
  // prevent any external keyboard shortcuts from executing while typing single characters in input
39
44
  if (event.key.length === 1 && !isPressingMetaKey(event)) {
40
45
  event.stopPropagation();
@@ -46,11 +51,11 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
46
51
  if (validSetSelectionRangeTypes.includes(type)) {
47
52
  if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {
48
53
  event.preventDefault();
49
- const position = event.key === 'End' ? event.currentTarget.value.length : 0;
54
+ var position = event.key === 'End' ? event.currentTarget.value.length : 0;
50
55
  event.currentTarget.setSelectionRange(position, position);
51
56
  // Necessary for ensuring the cursor is scrolled into view when using Home/End keys on Windows
52
57
  if (internalRef.current) {
53
- const scrollPosition = event.key === 'End' ? internalRef.current.scrollWidth : 0;
58
+ var scrollPosition = event.key === 'End' ? internalRef.current.scrollWidth : 0;
54
59
  internalRef.current.scrollLeft = scrollPosition;
55
60
  }
56
61
  }
@@ -59,22 +64,22 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
59
64
  onKeyDown(event);
60
65
  }
61
66
  };
62
- const prefixRef = useRef(null);
63
- const prefixRect = useBoundingClientRectListener(prefixRef);
64
- const postfixRef = useRef(null);
65
- const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);
66
- const className = cn(getInputClasses(props), {
67
+ var prefixRef = useRef(null);
68
+ var prefixRect = useBoundingClientRectListener(prefixRef);
69
+ var postfixRef = useRef(null);
70
+ var postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);
71
+ var className = cn(getInputClasses(props), {
67
72
  'pl-8': !!prefix,
68
73
  'pr-8': !!postfix
69
74
  }, attributes.className);
70
- const typeAttributes = {
71
- type
75
+ var typeAttributes = {
76
+ type: type
72
77
  };
73
78
  if (type === 'number') {
74
- typeAttributes.onWheelCapture = event => {
79
+ typeAttributes.onWheelCapture = function (event) {
75
80
  // blur is the only way to prevent scroll, so restore focus if it had it
76
81
  if (document.activeElement === event.currentTarget) {
77
- requestAnimationFrame(() => {
82
+ requestAnimationFrame(function () {
78
83
  event.target.focus();
79
84
  });
80
85
  }
@@ -96,8 +101,8 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
96
101
  onKeyDown: handleKeyDown,
97
102
  ref: internalRef,
98
103
  style: {
99
- paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,
100
- paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined
104
+ paddingLeft: prefixRect ? prefixRect.width - 1 + "px" : undefined,
105
+ paddingRight: postfixRect ? postfixRect.width - 1 + "px" : undefined
101
106
  }
102
107
  })), prefix ? /*#__PURE__*/createElement(Affix, {
103
108
  type: "prefix",
@@ -111,12 +116,10 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
111
116
  ref: postfixRef
112
117
  }) : null);
113
118
  });
114
- const Affix = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Affix(props, ref) {
115
- const {
116
- children,
117
- disabled,
118
- type
119
- } = props;
119
+ var Affix = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Affix(props, ref) {
120
+ var children = props.children,
121
+ disabled = props.disabled,
122
+ type = props.type;
120
123
  return /*#__PURE__*/createElement("div", {
121
124
  className: cn('group absolute top-0 flex h-full items-center justify-center px-2',
122
125
  // icon
@@ -130,20 +133,18 @@ const Affix = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Affix(props, re
130
133
  ref: ref
131
134
  }, children);
132
135
  }));
133
- const Input = /*#__PURE__*/forwardRef(function LegacyInput(props, ref) {
136
+ var Input = /*#__PURE__*/forwardRef(function LegacyInput(props, ref) {
134
137
  var _attributes$postfix;
135
- const {
136
- button,
137
- icon,
138
- ...attributes
139
- } = props;
140
- let postfix;
138
+ var button = props.button,
139
+ icon = props.icon,
140
+ attributes = _objectWithoutPropertiesLoose(props, _excluded2);
141
+ var postfix;
141
142
  if (button) {
142
- const disabled = button.props.disabled || attributes.disabled;
143
- const buttonClassName = cn('items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none', getButtonStateClasses(attributes.invalid, disabled), button.props.className);
143
+ var disabled = button.props.disabled || attributes.disabled;
144
+ var buttonClassName = cn('items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none', getButtonStateClasses(attributes.invalid, disabled), button.props.className);
144
145
  postfix = /*#__PURE__*/cloneElement(button, {
145
146
  className: buttonClassName,
146
- disabled
147
+ disabled: disabled
147
148
  });
148
149
  } else if (icon) {
149
150
  postfix = typeof icon === 'string' ? /*#__PURE__*/createElement(Icon, {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":["../../../../../../../src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getButtonStateClasses, getInputClasses } from './util';\nimport { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { isPressingMetaKey } from '../../utils/keyboard';\n\nexport type InputWithoutDeprecatedFeaturesProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix'> & {\n /** Draws attention to the input by changing its style and making it visually prominent */\n highlighted?: boolean;\n /* Whether the input is in an invalid state */\n invalid?: boolean;\n postfix?: string | JSX.Element;\n prefix?: string | JSX.Element;\n};\n\nconst validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];\n\nconst InputWithoutDeprecatedFeatures = React.forwardRef(function InputWithoutDeprecatedFeatures(\n props: InputWithoutDeprecatedFeaturesProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { highlighted, invalid, onKeyDown, postfix, prefix, type = 'text', ...attributes } = props;\n const internalRef = useMergedRef<HTMLInputElement>(ref);\n\n // input[type=number] does not support setSelectionRange by default, this adds support\n React.useLayoutEffect(() => {\n if (internalRef.current && type === 'number') {\n (function (fn) {\n internalRef.current.setSelectionRange = function (...args) {\n if (this.type === 'number') {\n this.type = 'text';\n fn.apply(this, args);\n this.type = 'number';\n } else {\n fn.apply(this, args);\n }\n };\n })(internalRef.current.setSelectionRange);\n }\n }, []);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n // prevent any external keyboard shortcuts from executing while typing single characters in input\n if (event.key.length === 1 && !isPressingMetaKey(event)) {\n event.stopPropagation();\n }\n\n // home and end keys only navigate to the start/end of input value if the input container does not scroll\n // if it has scroll height then the browser reverts to native scrolling behaviour only\n // so we manually override it to ensure _our_ desired behaviour remains intact\n // only the 'text', 'search', 'url', 'tel', 'password' input types support setSelectionRange\n if (validSetSelectionRangeTypes.includes(type)) {\n if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {\n event.preventDefault();\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\n event.currentTarget.setSelectionRange(position, position);\n\n // Necessary for ensuring the cursor is scrolled into view when using Home/End keys on Windows\n if (internalRef.current) {\n const scrollPosition = event.key === 'End' ? internalRef.current.scrollWidth : 0;\n internalRef.current.scrollLeft = scrollPosition;\n }\n }\n }\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n }\n };\n\n const prefixRef = React.useRef<HTMLDivElement>(null);\n const prefixRect = useBoundingClientRectListener(prefixRef);\n const postfixRef = React.useRef<HTMLDivElement>(null);\n const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);\n\n const className = cn(\n getInputClasses(props),\n {\n 'pl-8': !!prefix,\n 'pr-8': !!postfix,\n },\n attributes.className\n );\n\n const typeAttributes: Partial<React.InputHTMLAttributes<HTMLInputElement>> = {\n type,\n };\n\n if (type === 'number') {\n typeAttributes.onWheelCapture = (event: React.WheelEvent<HTMLInputElement>) => {\n // blur is the only way to prevent scroll, so restore focus if it had it\n if (document.activeElement === event.currentTarget) {\n requestAnimationFrame(() => {\n (event.target as HTMLInputElement).focus();\n });\n }\n // blur the field on scroll - only way to prevent scroll\n event.currentTarget.blur();\n };\n }\n\n return (\n <div className=\"relative inline-flex h-fit w-full\" data-taco=\"input-container\" style={{ opacity: 0.999 }}>\n <input\n {...attributes}\n {...typeAttributes}\n aria-invalid={invalid}\n className={className}\n data-highlighted={highlighted}\n data-taco=\"input\"\n onKeyDown={handleKeyDown}\n ref={internalRef}\n style={{\n paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,\n paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined,\n }}\n />\n {prefix ? <Affix type=\"prefix\" children={prefix} disabled={attributes.disabled} ref={prefixRef} /> : null}\n {postfix ? <Affix type=\"postfix\" children={postfix} disabled={attributes.disabled} ref={postfixRef} /> : null}\n </div>\n );\n});\n\ntype AffixProps = {\n children: string | JSX.Element;\n disabled?: boolean;\n type: 'prefix' | 'postfix';\n};\nconst Affix = React.memo(\n React.forwardRef(function Affix(props: AffixProps, ref: React.Ref<HTMLDivElement>) {\n const { children, disabled, type } = props;\n\n return (\n <div\n className={cn(\n 'group absolute top-0 flex h-full items-center justify-center px-2',\n // icon\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n {\n 'text-grey-300': disabled,\n 'text-grey-700': !disabled,\n 'left-0 [&>button]:!-ml-2': type === 'prefix',\n 'right-0 [&>button]:!-mr-2': type === 'postfix',\n }\n )}\n data-affix-type={type}\n ref={ref}>\n {children}\n </div>\n );\n })\n);\n\nexport type InputProps = InputWithoutDeprecatedFeaturesProps & {\n /** Shows a button within the input field */\n button?: React.ReactElement;\n /** Shows an icon within the input field */\n icon?: IconName | JSX.Element;\n};\n\nexport const Input = React.forwardRef(function LegacyInput(props: InputProps, ref: React.Ref<HTMLInputElement>) {\n const { button, icon, ...attributes } = props;\n\n let postfix;\n\n if (button) {\n const disabled = button.props.disabled || attributes.disabled;\n const buttonClassName = cn(\n 'items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none',\n getButtonStateClasses(attributes.invalid, disabled),\n button.props.className\n );\n postfix = React.cloneElement(button, {\n className: buttonClassName,\n disabled,\n });\n } else if (icon) {\n postfix = typeof icon === 'string' ? <Icon name={icon} /> : icon;\n }\n\n return <InputWithoutDeprecatedFeatures {...attributes} postfix={attributes.postfix ?? postfix} ref={ref} />;\n});\n"],"names":["validSetSelectionRangeTypes","InputWithoutDeprecatedFeatures","React","props","ref","highlighted","invalid","onKeyDown","postfix","prefix","type","attributes","internalRef","useMergedRef","current","fn","setSelectionRange","args","apply","handleKeyDown","event","key","length","isPressingMetaKey","stopPropagation","includes","shiftKey","preventDefault","position","currentTarget","value","scrollPosition","scrollWidth","scrollLeft","prefixRef","prefixRect","useBoundingClientRectListener","postfixRef","postfixRect","className","cn","getInputClasses","typeAttributes","onWheelCapture","document","activeElement","requestAnimationFrame","target","focus","blur","style","opacity","paddingLeft","width","undefined","paddingRight","Affix","children","disabled","Input","LegacyInput","button","icon","buttonClassName","getButtonStateClasses","Icon","name","_attributes$postfix"],"mappings":";;;;;;;;AAiBA,MAAMA,2BAA2B,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,K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G,EAAEA;KACJqD,QAAQ,CACP;AAEd,CAAC,CAAC,CACL;MASYE,KAAK,gBAAGzD,UAAgB,CAAC,SAAS0D,WAAWA,CAACzD,KAAiB,EAAEC,GAAgC;;EAC1G,MAAM;IAAEyD,MAAM;IAAEC,IAAI;IAAE,GAAGnD;GAAY,GAAGR,KAAK;EAE7C,IAAIK,OAAO;EAEX,IAAIqD,MAAM,EAAE;IACR,MAAMH,QAAQ,GAAGG,MAAM,CAAC1D,KAAK,CAACuD,QAAQ,IAAI/C,UAAU,CAAC+C,QAAQ;IAC7D,MAAMK,eAAe,GAAGvB,EAAE,CACtB,8GAA8G,EAC9GwB,qBAAqB,CAACrD,UAAU,CAACL,OAAO,EAAEoD,QAAQ,CAAC,EACnDG,MAAM,CAAC1D,KAAK,CAACoC,SAAS,CACzB;IACD/B,OAAO,gBAAGN,YAAkB,CAAC2D,MAAM,EAAE;MACjCtB,SAAS,EAAEwB,eAAe;MAC1BL;KACH,CAAC;GACL,MAAM,IAAII,IAAI,EAAE;IACbtD,OAAO,GAAG,OAAOsD,IAAI,KAAK,QAAQ,gBAAG5D,cAAC+D,IAAI;MAACC,IAAI,EAAEJ;MAAQ,GAAGA,IAAI;;EAGpE,oBAAO5D,cAACD,8BAA8B,oBAAKU,UAAU;IAAEH,OAAO,GAAA2D,mBAAA,GAAExD,UAAU,CAACH,OAAO,cAAA2D,mBAAA,cAAAA,mBAAA,GAAI3D,OAAO;IAAEJ,GAAG,EAAEA;KAAO;AAC/G,CAAC;;;;"}
1
+ {"version":3,"file":"Input.js","sources":["../../../../../../../src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getButtonStateClasses, getInputClasses } from './util';\nimport { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { isPressingMetaKey } from '../../utils/keyboard';\n\nexport type InputWithoutDeprecatedFeaturesProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix'> & {\n /** Draws attention to the input by changing its style and making it visually prominent */\n highlighted?: boolean;\n /* Whether the input is in an invalid state */\n invalid?: boolean;\n postfix?: string | JSX.Element;\n prefix?: string | JSX.Element;\n};\n\nconst validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];\n\nconst InputWithoutDeprecatedFeatures = React.forwardRef(function InputWithoutDeprecatedFeatures(\n props: InputWithoutDeprecatedFeaturesProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { highlighted, invalid, onKeyDown, postfix, prefix, type = 'text', ...attributes } = props;\n const internalRef = useMergedRef<HTMLInputElement>(ref);\n\n // input[type=number] does not support setSelectionRange by default, this adds support\n React.useLayoutEffect(() => {\n if (internalRef.current && type === 'number') {\n (function (fn) {\n internalRef.current.setSelectionRange = function (...args) {\n if (this.type === 'number') {\n this.type = 'text';\n fn.apply(this, args);\n this.type = 'number';\n } else {\n fn.apply(this, args);\n }\n };\n })(internalRef.current.setSelectionRange);\n }\n }, []);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n // prevent any external keyboard shortcuts from executing while typing single characters in input\n if (event.key.length === 1 && !isPressingMetaKey(event)) {\n event.stopPropagation();\n }\n\n // home and end keys only navigate to the start/end of input value if the input container does not scroll\n // if it has scroll height then the browser reverts to native scrolling behaviour only\n // so we manually override it to ensure _our_ desired behaviour remains intact\n // only the 'text', 'search', 'url', 'tel', 'password' input types support setSelectionRange\n if (validSetSelectionRangeTypes.includes(type)) {\n if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {\n event.preventDefault();\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\n event.currentTarget.setSelectionRange(position, position);\n\n // Necessary for ensuring the cursor is scrolled into view when using Home/End keys on Windows\n if (internalRef.current) {\n const scrollPosition = event.key === 'End' ? internalRef.current.scrollWidth : 0;\n internalRef.current.scrollLeft = scrollPosition;\n }\n }\n }\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n }\n };\n\n const prefixRef = React.useRef<HTMLDivElement>(null);\n const prefixRect = useBoundingClientRectListener(prefixRef);\n const postfixRef = React.useRef<HTMLDivElement>(null);\n const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);\n\n const className = cn(\n getInputClasses(props),\n {\n 'pl-8': !!prefix,\n 'pr-8': !!postfix,\n },\n attributes.className\n );\n\n const typeAttributes: Partial<React.InputHTMLAttributes<HTMLInputElement>> = {\n type,\n };\n\n if (type === 'number') {\n typeAttributes.onWheelCapture = (event: React.WheelEvent<HTMLInputElement>) => {\n // blur is the only way to prevent scroll, so restore focus if it had it\n if (document.activeElement === event.currentTarget) {\n requestAnimationFrame(() => {\n (event.target as HTMLInputElement).focus();\n });\n }\n // blur the field on scroll - only way to prevent scroll\n event.currentTarget.blur();\n };\n }\n\n return (\n <div className=\"relative inline-flex h-fit w-full\" data-taco=\"input-container\" style={{ opacity: 0.999 }}>\n <input\n {...attributes}\n {...typeAttributes}\n aria-invalid={invalid}\n className={className}\n data-highlighted={highlighted}\n data-taco=\"input\"\n onKeyDown={handleKeyDown}\n ref={internalRef}\n style={{\n paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,\n paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined,\n }}\n />\n {prefix ? <Affix type=\"prefix\" children={prefix} disabled={attributes.disabled} ref={prefixRef} /> : null}\n {postfix ? <Affix type=\"postfix\" children={postfix} disabled={attributes.disabled} ref={postfixRef} /> : null}\n </div>\n );\n});\n\ntype AffixProps = {\n children: string | JSX.Element;\n disabled?: boolean;\n type: 'prefix' | 'postfix';\n};\nconst Affix = React.memo(\n React.forwardRef(function Affix(props: AffixProps, ref: React.Ref<HTMLDivElement>) {\n const { children, disabled, type } = props;\n\n return (\n <div\n className={cn(\n 'group absolute top-0 flex h-full items-center justify-center px-2',\n // icon\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n {\n 'text-grey-300': disabled,\n 'text-grey-700': !disabled,\n 'left-0 [&>button]:!-ml-2': type === 'prefix',\n 'right-0 [&>button]:!-mr-2': type === 'postfix',\n }\n )}\n data-affix-type={type}\n ref={ref}>\n {children}\n </div>\n );\n })\n);\n\nexport type InputProps = InputWithoutDeprecatedFeaturesProps & {\n /** Shows a button within the input field */\n button?: React.ReactElement;\n /** Shows an icon within the input field */\n icon?: IconName | JSX.Element;\n};\n\nexport const Input = React.forwardRef(function LegacyInput(props: InputProps, ref: React.Ref<HTMLInputElement>) {\n const { button, icon, ...attributes } = props;\n\n let postfix;\n\n if (button) {\n const disabled = button.props.disabled || attributes.disabled;\n const buttonClassName = cn(\n 'items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none',\n getButtonStateClasses(attributes.invalid, disabled),\n button.props.className\n );\n postfix = React.cloneElement(button, {\n className: buttonClassName,\n disabled,\n });\n } else if (icon) {\n postfix = typeof icon === 'string' ? <Icon name={icon} /> : icon;\n }\n\n return <InputWithoutDeprecatedFeatures {...attributes} postfix={attributes.postfix ?? postfix} ref={ref} />;\n});\n"],"names":["validSetSelectionRangeTypes","InputWithoutDeprecatedFeatures","React","props","ref","highlighted","invalid","onKeyDown","postfix","prefix","_props$type","type","attributes","_objectWithoutPropertiesLoose","_excluded","internalRef","useMergedRef","current","fn","setSelectionRange","args","Array","_len","_key","arguments","apply","handleKeyDown","event","key","length","isPressingMetaKey","stopPropagation","includes","shiftKey","preventDefault","position","currentTarget","value","scrollPosition","scrollWidth","scrollLeft","prefixRef","prefixRect","useBoundingClientRectListener","postfixRef","postfixRect","className","cn","getInputClasses","typeAttributes","onWheelCapture","document","activeElement","requestAnimationFrame","target","focus","blur","style","opacity","paddingLeft","width","undefined","paddingRight","Affix","children","disabled","Input","LegacyInput","button","icon","_excluded2","buttonClassName","getButtonStateClasses","Icon","name","_attributes$postfix"],"mappings":";;;;;;;;;;;AAiBA,IAAMA,2BAA2B,GAAG,CAAC,MAAM,EAAE,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IAAI,KAAK,QAAQ,gBAAGnE,cAACuE,IAAI;MAACC,IAAI,EAAEL;MAAQ,GAAGA,IAAI;;EAGpE,oBAAOnE,cAACD,8BAA8B,oBAAKW,UAAU;IAAEJ,OAAO,GAAAmE,mBAAA,GAAE/D,UAAU,CAACJ,OAAO,cAAAmE,mBAAA,cAAAA,mBAAA,GAAInE,OAAO;IAAEJ,GAAG,EAAEA;KAAO;AAC/G,CAAC;;;;"}
@@ -1,9 +1,9 @@
1
1
  import cn from 'clsx';
2
2
 
3
- const getInputClasses = props => {
4
- const disabled = props.disabled || !!props['aria-disabled'];
5
- const readOnly = props.readOnly || !!props['aria-readonly'];
6
- const invalid = props.invalid || !!props['aria-invalid'];
3
+ var getInputClasses = function getInputClasses(props) {
4
+ var disabled = props.disabled || !!props['aria-disabled'];
5
+ var readOnly = props.readOnly || !!props['aria-readonly'];
6
+ var invalid = props.invalid || !!props['aria-invalid'];
7
7
  return cn('peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus:yt-focus',
8
8
  // hide the arrow controls on input[type=number]
9
9
  '[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none', {
@@ -21,7 +21,10 @@ const getInputClasses = props => {
21
21
  'cursor-not-allowed text-black bg-grey-200': readOnly
22
22
  });
23
23
  };
24
- const getButtonStateClasses = (invalid, disabled = false) => {
24
+ var getButtonStateClasses = function getButtonStateClasses(invalid, disabled) {
25
+ if (disabled === void 0) {
26
+ disabled = false;
27
+ }
25
28
  if (invalid) {
26
29
  return cn('border border-red-500 group-peer-hover:enabled:border-red-700 transition-colors ease-in', {
27
30
  'border-red-500/30': disabled
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../../src/components/Input/util.ts"],"sourcesContent":["import cn from 'clsx';\n\nexport const getInputClasses = props => {\n const disabled = props.disabled || !!props['aria-disabled'];\n const readOnly = props.readOnly || !!props['aria-readonly'];\n const invalid = props.invalid || !!props['aria-invalid'];\n\n return cn(\n 'peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus:yt-focus',\n // hide the arrow controls on input[type=number]\n '[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',\n {\n 'bg-white': !props.highlighted && !readOnly,\n // default\n 'border-grey-300 enabled:hover:border-grey-500 disabled:border-grey-200': !invalid,\n // disabled\n 'text-opacity-25 cursor-not-allowed placeholder:text-grey-700': disabled,\n // highlighted\n 'bg-yellow-100/50': props.highlighted && disabled,\n 'bg-yellow-100': props.highlighted && !disabled,\n // invalid\n 'border-red-500 enabled:hover:border-red-700 disabled:border-red-500/50': invalid,\n // readOnly\n 'cursor-not-allowed text-black bg-grey-200': readOnly,\n }\n );\n};\n\nexport const getButtonStateClasses = (invalid: boolean | undefined, disabled = false): string => {\n if (invalid) {\n return cn('border border-red-500 group-peer-hover:enabled:border-red-700 transition-colors ease-in', {\n 'border-red-500/30': disabled,\n });\n }\n\n return 'border border-grey-300 group-peer-hover:enabled:border-grey-500 transition-colors transition-opacity ease-in';\n};\n"],"names":["getInputClasses","props","disabled","readOnly","invalid","cn","highlighted","getButtonStateClasses"],"mappings":";;MAEaA,eAAe,GAAGC,KAAK;EAChC,MAAMC,QAAQ,GAAGD,KAAK,CAACC,QAAQ,IAAI,CAAC,CAACD,KAAK,CAAC,eAAe,CAAC;EAC3D,MAAME,QAAQ,GAAGF,KAAK,CAACE,QAAQ,IAAI,CAAC,CAACF,KAAK,CAAC,eAAe,CAAC;EAC3D,MAAMG,OAAO,GAAGH,KAAK,CAACG,OAAO,IAAI,CAAC,CAACH,KAAK,CAAC,cAAc,CAAC;EAExD,OAAOI,EAAE,CACL,gOAAgO;;EAEhO,sHAAsH,EACtH;IACI,UAAU,EAAE,CAACJ,KAAK,CAACK,WAAW,IAAI,CAACH,QAAQ;;IAE3C,wEAAwE,EAAE,CAACC,OAAO;;IAElF,8DAA8D,EAAEF,QAAQ;;IAExE,kBAAkB,EAAED,KAAK,CAACK,WAAW,IAAIJ,QAAQ;IACjD,eAAe,EAAED,KAAK,CAACK,WAAW,IAAI,CAACJ,QAAQ;;IAE/C,wEAAwE,EAAEE,OAAO;;IAEjF,2CAA2C,EAAED;GAChD,CACJ;AACL;MAEaI,qBAAqB,GAAGA,CAACH,OAA4B,EAAEF,QAAQ,GAAG,KAAK;EAChF,IAAIE,OAAO,EAAE;IACT,OAAOC,EAAE,CAAC,yFAAyF,EAAE;MACjG,mBAAmB,EAAEH;KACxB,CAAC;;EAGN,OAAO,8GAA8G;AACzH;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../src/components/Input/util.ts"],"sourcesContent":["import cn from 'clsx';\n\nexport const getInputClasses = props => {\n const disabled = props.disabled || !!props['aria-disabled'];\n const readOnly = props.readOnly || !!props['aria-readonly'];\n const invalid = props.invalid || !!props['aria-invalid'];\n\n return cn(\n 'peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus:yt-focus',\n // hide the arrow controls on input[type=number]\n '[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',\n {\n 'bg-white': !props.highlighted && !readOnly,\n // default\n 'border-grey-300 enabled:hover:border-grey-500 disabled:border-grey-200': !invalid,\n // disabled\n 'text-opacity-25 cursor-not-allowed placeholder:text-grey-700': disabled,\n // highlighted\n 'bg-yellow-100/50': props.highlighted && disabled,\n 'bg-yellow-100': props.highlighted && !disabled,\n // invalid\n 'border-red-500 enabled:hover:border-red-700 disabled:border-red-500/50': invalid,\n // readOnly\n 'cursor-not-allowed text-black bg-grey-200': readOnly,\n }\n );\n};\n\nexport const getButtonStateClasses = (invalid: boolean | undefined, disabled = false): string => {\n if (invalid) {\n return cn('border border-red-500 group-peer-hover:enabled:border-red-700 transition-colors ease-in', {\n 'border-red-500/30': disabled,\n });\n }\n\n return 'border border-grey-300 group-peer-hover:enabled:border-grey-500 transition-colors transition-opacity ease-in';\n};\n"],"names":["getInputClasses","props","disabled","readOnly","invalid","cn","highlighted","getButtonStateClasses"],"mappings":";;IAEaA,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,KAAK;EAChC,IAAMC,QAAQ,GAAGD,KAAK,CAACC,QAAQ,IAAI,CAAC,CAACD,KAAK,CAAC,eAAe,CAAC;EAC3D,IAAME,QAAQ,GAAGF,KAAK,CAACE,QAAQ,IAAI,CAAC,CAACF,KAAK,CAAC,eAAe,CAAC;EAC3D,IAAMG,OAAO,GAAGH,KAAK,CAACG,OAAO,IAAI,CAAC,CAACH,KAAK,CAAC,cAAc,CAAC;EAExD,OAAOI,EAAE,CACL,gOAAgO;;EAEhO,sHAAsH,EACtH;IACI,UAAU,EAAE,CAACJ,KAAK,CAACK,WAAW,IAAI,CAACH,QAAQ;;IAE3C,wEAAwE,EAAE,CAACC,OAAO;;IAElF,8DAA8D,EAAEF,QAAQ;;IAExE,kBAAkB,EAAED,KAAK,CAACK,WAAW,IAAIJ,QAAQ;IACjD,eAAe,EAAED,KAAK,CAACK,WAAW,IAAI,CAACJ,QAAQ;;IAE/C,wEAAwE,EAAEE,OAAO;;IAEjF,2CAA2C,EAAED;GAChD,CACJ;AACL;IAEaI,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIH,OAA4B,EAAEF,QAAQ;MAARA,QAAQ;IAARA,QAAQ,GAAG,KAAK;;EAChF,IAAIE,OAAO,EAAE;IACT,OAAOC,EAAE,CAAC,yFAAyF,EAAE;MACjG,mBAAmB,EAAEH;KACxB,CAAC;;EAGN,OAAO,8GAA8G;AACzH;;;;"}
@@ -6,13 +6,15 @@ import { Sidebar } from './components/Sidebar.js';
6
6
  import { Top } from './components/Top.js';
7
7
  import { Page } from './components/Page.js';
8
8
 
9
- const Layout = /*#__PURE__*/React__default.forwardRef(function Layout(props, ref) {
10
- const [sidebarOpen, setSidebarOpen] = React__default.useState(false);
11
- const className = cn('flex h-screen w-screen flex-col overflow-hidden print:overflow-visible print:h-full relative', props.className);
9
+ var Layout = /*#__PURE__*/React__default.forwardRef(function Layout(props, ref) {
10
+ var _React$useState = React__default.useState(false),
11
+ sidebarOpen = _React$useState[0],
12
+ setSidebarOpen = _React$useState[1];
13
+ var className = cn('flex h-screen w-screen flex-col overflow-hidden print:overflow-visible print:h-full relative', props.className);
12
14
  return /*#__PURE__*/React__default.createElement(LayoutContext.Provider, {
13
15
  value: {
14
- sidebarOpen,
15
- setSidebarOpen
16
+ sidebarOpen: sidebarOpen,
17
+ setSidebarOpen: setSidebarOpen
16
18
  }
17
19
  }, /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
18
20
  className: className,
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.js","sources":["../../../../../../../src/components/Layout/Layout.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { LayoutContext } from './components/Context';\nimport { Content } from './components/Content';\nimport { Sidebar } from './components/Sidebar';\nimport { Top } from './components/Top';\nimport { Page } from './components/Page';\n\nexport type LayoutProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Layout = React.forwardRef<HTMLDivElement, LayoutProps>(function Layout(props, ref) {\n const [sidebarOpen, setSidebarOpen] = React.useState(false);\n const className = cn(\n 'flex h-screen w-screen flex-col overflow-hidden print:overflow-visible print:h-full relative',\n props.className\n );\n\n return (\n <LayoutContext.Provider value={{ sidebarOpen, setSidebarOpen }}>\n <div {...props} className={className} ref={ref} />\n </LayoutContext.Provider>\n );\n}) as React.ForwardRefExoticComponent<LayoutProps> & {\n Top: typeof Top;\n Page: typeof Page;\n Sidebar: typeof Sidebar;\n Content: typeof Content;\n};\n\nLayout.Top = Top;\nLayout.Page = Page;\nLayout.Sidebar = Sidebar;\nLayout.Content = Content;\n\nexport type { LayoutContentProps } from './components/Content';\nexport type { LayoutPageProps } from './components/Page';\nexport type { LayoutSidebarProps } from './components/Sidebar';\nexport type { LayoutTopProps } from './components/Top';\n"],"names":["Layout","React","forwardRef","props","ref","sidebarOpen","setSidebarOpen","useState","className","cn","LayoutContext","Provider","value","Top","Page","Sidebar","Content"],"mappings":";;;;;;;;MAUaA,MAAM,gBAAGC,cAAK,CAACC,UAAU,CAA8B,SAASF,MAAMA,CAACG,KAAK,EAAEC,GAAG;EAC1F,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGL,cAAK,CAACM,QAAQ,CAAC,KAAK,CAAC;EAC3D,MAAMC,SAAS,GAAGC,EAAE,CAChB,8FAA8F,EAC9FN,KAAK,CAACK,SAAS,CAClB;EAED,oBACIP,6BAACS,aAAa,CAACC,QAAQ;IAACC,KAAK,EAAE;MAAEP,WAAW;MAAEC;;kBAC1CL,sDAASE,KAAK;IAAEK,SAAS,EAAEA,SAAS;IAAEJ,GAAG,EAAEA;KAAO,CAC7B;AAEjC,CAAC;AAODJ,MAAM,CAACa,GAAG,GAAGA,GAAG;AAChBb,MAAM,CAACc,IAAI,GAAGA,IAAI;AAClBd,MAAM,CAACe,OAAO,GAAGA,OAAO;AACxBf,MAAM,CAACgB,OAAO,GAAGA,OAAO;;;;"}
1
+ {"version":3,"file":"Layout.js","sources":["../../../../../../../src/components/Layout/Layout.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { LayoutContext } from './components/Context';\nimport { Content } from './components/Content';\nimport { Sidebar } from './components/Sidebar';\nimport { Top } from './components/Top';\nimport { Page } from './components/Page';\n\nexport type LayoutProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Layout = React.forwardRef<HTMLDivElement, LayoutProps>(function Layout(props, ref) {\n const [sidebarOpen, setSidebarOpen] = React.useState(false);\n const className = cn(\n 'flex h-screen w-screen flex-col overflow-hidden print:overflow-visible print:h-full relative',\n props.className\n );\n\n return (\n <LayoutContext.Provider value={{ sidebarOpen, setSidebarOpen }}>\n <div {...props} className={className} ref={ref} />\n </LayoutContext.Provider>\n );\n}) as React.ForwardRefExoticComponent<LayoutProps> & {\n Top: typeof Top;\n Page: typeof Page;\n Sidebar: typeof Sidebar;\n Content: typeof Content;\n};\n\nLayout.Top = Top;\nLayout.Page = Page;\nLayout.Sidebar = Sidebar;\nLayout.Content = Content;\n\nexport type { LayoutContentProps } from './components/Content';\nexport type { LayoutPageProps } from './components/Page';\nexport type { LayoutSidebarProps } from './components/Sidebar';\nexport type { LayoutTopProps } from './components/Top';\n"],"names":["Layout","React","forwardRef","props","ref","_React$useState","useState","sidebarOpen","setSidebarOpen","className","cn","LayoutContext","Provider","value","Top","Page","Sidebar","Content"],"mappings":";;;;;;;;IAUaA,MAAM,gBAAGC,cAAK,CAACC,UAAU,CAA8B,SAASF,MAAMA,CAACG,KAAK,EAAEC,GAAG;EAC1F,IAAAC,eAAA,GAAsCJ,cAAK,CAACK,QAAQ,CAAC,KAAK,CAAC;IAApDC,WAAW,GAAAF,eAAA;IAAEG,cAAc,GAAAH,eAAA;EAClC,IAAMI,SAAS,GAAGC,EAAE,CAChB,8FAA8F,EAC9FP,KAAK,CAACM,SAAS,CAClB;EAED,oBACIR,6BAACU,aAAa,CAACC,QAAQ;IAACC,KAAK,EAAE;MAAEN,WAAW,EAAXA,WAAW;MAAEC,cAAc,EAAdA;;kBAC1CP,sDAASE,KAAK;IAAEM,SAAS,EAAEA,SAAS;IAAEL,GAAG,EAAEA;KAAO,CAC7B;AAEjC,CAAC;AAODJ,MAAM,CAACc,GAAG,GAAGA,GAAG;AAChBd,MAAM,CAACe,IAAI,GAAGA,IAAI;AAClBf,MAAM,CAACgB,OAAO,GAAGA,OAAO;AACxBhB,MAAM,CAACiB,OAAO,GAAGA,OAAO;;;;"}
@@ -1,8 +1,8 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
3
 
4
- const Content = /*#__PURE__*/React__default.forwardRef(function LayoutContent(props, ref) {
5
- const className = cn('flex-grow overflow-y-auto print:overflow-visible print:h-full print:!p-0 bg-white flex flex-shrink flex-col relative', props.className);
4
+ var Content = /*#__PURE__*/React__default.forwardRef(function LayoutContent(props, ref) {
5
+ var className = cn('flex-grow overflow-y-auto print:overflow-visible print:h-full print:!p-0 bg-white flex flex-shrink flex-col relative', props.className);
6
6
  return /*#__PURE__*/React__default.createElement("main", Object.assign({}, props, {
7
7
  className: className,
8
8
  ref: ref
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Layout/components/Content.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\n\nexport type LayoutContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Content = React.forwardRef<HTMLDivElement, LayoutContentProps>(function LayoutContent(props, ref) {\n const className = cn(\n 'flex-grow overflow-y-auto print:overflow-visible print:h-full print:!p-0 bg-white flex flex-shrink flex-col relative',\n props.className\n );\n return <main {...props} className={className} ref={ref} />;\n});\n"],"names":["Content","React","forwardRef","LayoutContent","props","ref","className","cn"],"mappings":";;;MAKaA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAqC,SAASC,aAAaA,CAACC,KAAK,EAAEC,GAAG;EACzG,MAAMC,SAAS,GAAGC,EAAE,CAChB,sHAAsH,EACtHH,KAAK,CAACE,SAAS,CAClB;EACD,oBAAOL,uDAAUG,KAAK;IAAEE,SAAS,EAAEA,SAAS;IAAED,GAAG,EAAEA;KAAO;AAC9D,CAAC;;;;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Layout/components/Content.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\n\nexport type LayoutContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Content = React.forwardRef<HTMLDivElement, LayoutContentProps>(function LayoutContent(props, ref) {\n const className = cn(\n 'flex-grow overflow-y-auto print:overflow-visible print:h-full print:!p-0 bg-white flex flex-shrink flex-col relative',\n props.className\n );\n return <main {...props} className={className} ref={ref} />;\n});\n"],"names":["Content","React","forwardRef","LayoutContent","props","ref","className","cn"],"mappings":";;;IAKaA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAqC,SAASC,aAAaA,CAACC,KAAK,EAAEC,GAAG;EACzG,IAAMC,SAAS,GAAGC,EAAE,CAChB,sHAAsH,EACtHH,KAAK,CAACE,SAAS,CAClB;EACD,oBAAOL,uDAAUG,KAAK;IAAEE,SAAS,EAAEA,SAAS;IAAED,GAAG,EAAEA;KAAO;AAC9D,CAAC;;;;"}
@@ -1,8 +1,10 @@
1
1
  import React__default from 'react';
2
2
 
3
- const LayoutContext = /*#__PURE__*/React__default.createContext({
3
+ var LayoutContext = /*#__PURE__*/React__default.createContext({
4
4
  sidebarOpen: false,
5
- setSidebarOpen: () => undefined
5
+ setSidebarOpen: function setSidebarOpen() {
6
+ return undefined;
7
+ }
6
8
  });
7
9
 
8
10
  export { LayoutContext };
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../../../../../src/components/Layout/components/Context.tsx"],"sourcesContent":["import React from 'react';\n\nexport type LayoutContextValue = {\n sidebarOpen: boolean;\n setSidebarOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nexport const LayoutContext = React.createContext<LayoutContextValue>({ sidebarOpen: false, setSidebarOpen: () => undefined });\n"],"names":["LayoutContext","React","createContext","sidebarOpen","setSidebarOpen","undefined"],"mappings":";;MAOaA,aAAa,gBAAGC,cAAK,CAACC,aAAa,CAAqB;EAAEC,WAAW,EAAE,KAAK;EAAEC,cAAc,EAAEA,MAAMC;CAAW;;;;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../../../../../src/components/Layout/components/Context.tsx"],"sourcesContent":["import React from 'react';\n\nexport type LayoutContextValue = {\n sidebarOpen: boolean;\n setSidebarOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nexport const LayoutContext = React.createContext<LayoutContextValue>({ sidebarOpen: false, setSidebarOpen: () => undefined });\n"],"names":["LayoutContext","React","createContext","sidebarOpen","setSidebarOpen","undefined"],"mappings":";;IAOaA,aAAa,gBAAGC,cAAK,CAACC,aAAa,CAAqB;EAAEC,WAAW,EAAE,KAAK;EAAEC,cAAc,EAAE,SAAAA;IAAA,OAAMC,SAAS;;CAAE;;;;"}
@@ -1,8 +1,8 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
3
 
4
- const Page = /*#__PURE__*/React__default.forwardRef(function LayoutPage(props, ref) {
5
- const className = cn('flex flex-grow overflow-hidden print:overflow-visible print:h-full relative', props.className);
4
+ var Page = /*#__PURE__*/React__default.forwardRef(function LayoutPage(props, ref) {
5
+ var className = cn('flex flex-grow overflow-hidden print:overflow-visible print:h-full relative', props.className);
6
6
  return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
7
7
  className: className,
8
8
  ref: ref
@@ -1 +1 @@
1
- {"version":3,"file":"Page.js","sources":["../../../../../../../../src/components/Layout/components/Page.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\n\nexport type LayoutPageProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Page = React.forwardRef<HTMLDivElement, LayoutPageProps>(function LayoutPage(props, ref) {\n const className = cn('flex flex-grow overflow-hidden print:overflow-visible print:h-full relative', props.className);\n return <div {...props} className={className} ref={ref} />;\n});\n"],"names":["Page","React","forwardRef","LayoutPage","props","ref","className","cn"],"mappings":";;;MAKaA,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAkC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG;EAChG,MAAMC,SAAS,GAAGC,EAAE,CAAC,6EAA6E,EAAEH,KAAK,CAACE,SAAS,CAAC;EACpH,oBAAOL,sDAASG,KAAK;IAAEE,SAAS,EAAEA,SAAS;IAAED,GAAG,EAAEA;KAAO;AAC7D,CAAC;;;;"}
1
+ {"version":3,"file":"Page.js","sources":["../../../../../../../../src/components/Layout/components/Page.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\n\nexport type LayoutPageProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Page = React.forwardRef<HTMLDivElement, LayoutPageProps>(function LayoutPage(props, ref) {\n const className = cn('flex flex-grow overflow-hidden print:overflow-visible print:h-full relative', props.className);\n return <div {...props} className={className} ref={ref} />;\n});\n"],"names":["Page","React","forwardRef","LayoutPage","props","ref","className","cn"],"mappings":";;;IAKaA,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAkC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG;EAChG,IAAMC,SAAS,GAAGC,EAAE,CAAC,6EAA6E,EAAEH,KAAK,CAACE,SAAS,CAAC;EACpH,oBAAOL,sDAASG,KAAK;IAAEE,SAAS,EAAEA,SAAS;IAAED,GAAG,EAAEA;KAAO;AAC7D,CAAC;;;;"}
@@ -1,30 +1,29 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { Backdrop } from '../../Backdrop/Backdrop.js';
4
5
  import { AnimatePresence, motion } from 'framer-motion';
5
6
  import { useIsLargeScreen } from '../../../hooks/useIsLargeScreen.js';
6
7
  import { LayoutContext } from './Context.js';
7
8
 
8
- const SidebarBackdrop = /*#__PURE__*/motion(Backdrop);
9
- const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(props, ref) {
10
- const {
11
- children,
12
- ...attributes
13
- } = props;
14
- const {
15
- sidebarOpen,
16
- setSidebarOpen
17
- } = React__default.useContext(LayoutContext);
18
- const isLargeScreen = useIsLargeScreen();
19
- const isSmallScreen = !isLargeScreen;
9
+ var _excluded = ["children"];
10
+ var SidebarBackdrop = /*#__PURE__*/motion(Backdrop);
11
+ var Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(props, ref) {
12
+ var children = props.children,
13
+ attributes = _objectWithoutPropertiesLoose(props, _excluded);
14
+ var _React$useContext = React__default.useContext(LayoutContext),
15
+ sidebarOpen = _React$useContext.sidebarOpen,
16
+ setSidebarOpen = _React$useContext.setSidebarOpen;
17
+ var isLargeScreen = useIsLargeScreen();
18
+ var isSmallScreen = !isLargeScreen;
20
19
  // if it's a large screen we override the open state and make it always visible
21
- const isVisible = isLargeScreen || sidebarOpen;
20
+ var isVisible = isLargeScreen || sidebarOpen;
22
21
  // ensures the menu is always closed by default when resizing to a smaller window size
23
- React__default.useEffect(() => {
22
+ React__default.useEffect(function () {
24
23
  setSidebarOpen(isLargeScreen);
25
24
  }, [isLargeScreen]);
26
- React__default.useEffect(() => {
27
- const handleEscapeKey = event => {
25
+ React__default.useEffect(function () {
26
+ var handleEscapeKey = function handleEscapeKey(event) {
28
27
  if (event.key === 'Escape') {
29
28
  event.preventDefault();
30
29
  event.stopPropagation();
@@ -34,13 +33,15 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
34
33
  if (isSmallScreen && sidebarOpen) {
35
34
  window.addEventListener('keydown', handleEscapeKey);
36
35
  }
37
- return () => {
36
+ return function () {
38
37
  window.removeEventListener('keydown', handleEscapeKey);
39
38
  };
40
39
  }, [isSmallScreen, sidebarOpen]);
41
- const showBackdrop = isSmallScreen && sidebarOpen === true;
42
- const [ready, setReady] = React__default.useState(isSmallScreen);
43
- const className = cn('bg-grey-50 h-full w-64 flex-shrink-0 flex-grow-0 print:hidden', {
40
+ var showBackdrop = isSmallScreen && sidebarOpen === true;
41
+ var _React$useState = React__default.useState(isSmallScreen),
42
+ ready = _React$useState[0],
43
+ setReady = _React$useState[1];
44
+ var className = cn('bg-grey-50 h-full w-64 flex-shrink-0 flex-grow-0 print:hidden', {
44
45
  'absolute z-10 aria-hidden:-translate-x-64 ': isSmallScreen,
45
46
  // prevent animation when crossing the boundary from large to small screen,
46
47
  // this prevents awkward animation in the edge case (resizing the browser, instead of starting at a given size)
@@ -48,17 +49,21 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
48
49
  'transition-[transform] duration-300 visible': isSmallScreen && ready,
49
50
  'border-r-2 border-black/[.08] ': !showBackdrop
50
51
  }, props.className);
51
- React__default.useEffect(() => {
52
+ React__default.useEffect(function () {
52
53
  // ensure state is updated in the next cpu tick so that the animation definitely doesn't run
53
- setTimeout(() => {
54
+ setTimeout(function () {
54
55
  setReady(isSmallScreen);
55
56
  }, 1);
56
57
  }, [isSmallScreen]);
57
- const toggleSidebar = () => setSidebarOpen(open => !open);
58
- const content = typeof children === 'function' ? children({
59
- isLargeScreen,
58
+ var toggleSidebar = function toggleSidebar() {
59
+ return setSidebarOpen(function (open) {
60
+ return !open;
61
+ });
62
+ };
63
+ var content = typeof children === 'function' ? children({
64
+ isLargeScreen: isLargeScreen,
60
65
  open: sidebarOpen,
61
- toggleSidebar
66
+ toggleSidebar: toggleSidebar
62
67
  }) : children;
63
68
  if (!content) {
64
69
  return null;
@@ -79,7 +84,9 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
79
84
  opacity: 0
80
85
  },
81
86
  className: "z-[1]",
82
- onClick: () => setSidebarOpen(false)
87
+ onClick: function onClick() {
88
+ return setSidebarOpen(false);
89
+ }
83
90
  }))));
84
91
  });
85
92