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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (670) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Select2/components/Option.d.ts +4 -4
  12. package/dist/components/Select2/components/Search.d.ts +1 -1
  13. package/dist/components/Tag/Tag.d.ts +1 -1
  14. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
  15. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  16. package/dist/esm/index.css +11 -2
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  18. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  20. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  22. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  24. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  26. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  28. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  30. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  32. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  34. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  36. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  38. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  39. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  40. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  41. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  42. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  44. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  46. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  48. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  50. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  56. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  58. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js +26 -27
  60. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  62. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  64. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  66. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  68. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  69. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  70. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  72. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  73. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  74. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  76. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  78. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  80. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  82. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  84. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  86. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  88. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  90. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  92. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  96. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  98. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  100. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  102. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  108. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  109. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  110. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  111. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  112. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  113. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  114. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  116. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  117. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  118. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  126. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  128. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  130. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  132. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  134. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  136. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  138. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  140. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  142. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  144. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  146. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  158. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  160. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  161. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  162. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  163. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  164. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  166. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  168. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  170. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  172. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  174. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  176. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  180. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  184. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  186. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  188. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  190. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  192. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  194. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  196. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  198. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  200. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  202. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  204. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  206. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  208. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  210. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  212. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  214. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  216. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  220. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  222. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  224. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  226. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  228. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  238. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  240. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  242. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  244. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  246. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  248. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  250. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  254. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  256. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  258. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  260. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  262. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  264. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  265. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  266. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  268. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  270. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  272. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  274. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  275. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  276. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  278. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  280. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  282. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  284. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  286. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  288. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  290. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +36 -35
  292. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  294. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  296. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +173 -128
  298. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  300. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  302. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  304. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  306. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  308. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  310. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  312. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  314. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  316. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  324. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  330. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  332. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  334. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  336. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  338. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  340. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js +23 -23
  342. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  356. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  360. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  368. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  370. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  372. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  374. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  376. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  378. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  380. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  382. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js +18 -16
  384. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  386. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  388. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  390. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  391. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  392. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  394. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  396. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  398. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  400. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  402. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  404. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  406. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  408. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  409. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  410. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  412. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  414. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  416. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  418. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  420. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  422. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  424. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  426. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  428. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  430. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  431. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  432. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  434. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  444. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  450. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +44 -37
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +59 -42
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -39
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +21 -16
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +51 -40
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  544. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  545. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -22
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  622. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  623. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  624. package/dist/esm/packages/taco/src/types.js +1 -1
  625. package/dist/esm/packages/taco/src/types.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  627. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  629. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  631. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  633. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  635. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  637. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  639. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  643. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  645. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  647. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  649. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  651. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  653. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  655. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  656. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  657. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  658. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  659. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  660. package/dist/index.css +11 -2
  661. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
  662. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
  663. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
  664. package/dist/primitives/Table/types.d.ts +1 -1
  665. package/dist/primitives/Table/useTableManager/features/useTableServerLoading.d.ts +2 -1
  666. package/dist/taco.cjs.development.js +7944 -6916
  667. package/dist/taco.cjs.development.js.map +1 -1
  668. package/dist/taco.cjs.production.min.js +1 -1
  669. package/dist/taco.cjs.production.min.js.map +1 -1
  670. package/package.json +1 -2
@@ -1,5 +1,6 @@
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 { useMergedRef } from '../../hooks/useMergedRef.js';
4
5
  import { isElementInsideTable3OrReport, getNextFocussableElement } from '../../utils/dom.js';
5
6
  import { useLocalization } from '../Provider/Localization.js';
@@ -30,31 +31,37 @@ import { useChildren, isGroup } from './hooks/useChildren.js';
30
31
  import { Create } from './components/Create.js';
31
32
  import { Collection } from './components/Collection.js';
32
33
 
33
- const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, ref) {
34
- const {
35
- children: initChildren,
36
- defaultValue: defaultProp,
37
- disabled = false,
38
- emptyValue = undefined,
39
- fontSize,
40
- highlighted = false,
41
- invalid = false,
42
- loading,
43
- multiple = false,
44
- name,
45
- onChange,
46
- onCreate,
47
- onDelete,
48
- onEdit,
49
- placeholder,
50
- readOnly = false,
51
- tags = false,
52
- value: prop,
53
- createDialog,
54
- createTriggerText,
55
- ...otherProps
56
- } = props;
57
- const emptyOption = React__default.useMemo(() => {
34
+ var _excluded = ["children", "defaultValue", "disabled", "emptyValue", "fontSize", "highlighted", "invalid", "loading", "multiple", "name", "onChange", "onCreate", "onDelete", "onEdit", "placeholder", "readOnly", "tags", "value", "createDialog", "createTriggerText"];
35
+ var Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, ref) {
36
+ var initChildren = props.children,
37
+ defaultProp = props.defaultValue,
38
+ _props$disabled = props.disabled,
39
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
40
+ _props$emptyValue = props.emptyValue,
41
+ emptyValue = _props$emptyValue === void 0 ? undefined : _props$emptyValue,
42
+ fontSize = props.fontSize,
43
+ _props$highlighted = props.highlighted,
44
+ highlighted = _props$highlighted === void 0 ? false : _props$highlighted,
45
+ _props$invalid = props.invalid,
46
+ invalid = _props$invalid === void 0 ? false : _props$invalid,
47
+ loading = props.loading,
48
+ _props$multiple = props.multiple,
49
+ multiple = _props$multiple === void 0 ? false : _props$multiple,
50
+ name = props.name,
51
+ onChange = props.onChange,
52
+ onCreate = props.onCreate,
53
+ onDelete = props.onDelete,
54
+ onEdit = props.onEdit,
55
+ placeholder = props.placeholder,
56
+ _props$readOnly = props.readOnly,
57
+ readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
58
+ _props$tags = props.tags,
59
+ tags = _props$tags === void 0 ? false : _props$tags,
60
+ prop = props.value,
61
+ createDialog = props.createDialog,
62
+ createTriggerText = props.createTriggerText,
63
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
64
+ var emptyOption = React__default.useMemo(function () {
58
65
  if (emptyValue !== undefined && !multiple) {
59
66
  // Empty option has 0px height, because it's empty, so need to apply height manually
60
67
  return /*#__PURE__*/React__default.createElement(Option, {
@@ -66,95 +73,111 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
66
73
  }
67
74
  return;
68
75
  }, [emptyValue, multiple]);
69
- const initialChildren = React__default.useMemo(() => {
76
+ var initialChildren = React__default.useMemo(function () {
70
77
  if (emptyOption) {
71
- return [emptyOption, ...initChildren];
78
+ return [emptyOption].concat(initChildren);
72
79
  }
73
80
  return initChildren;
74
81
  }, [emptyOption, initChildren]);
75
82
  // refs
76
- const internalRef = useMergedRef(ref);
77
- const listboxRef = React__default.useRef(null);
78
- const searchRef = React__default.useRef(null);
79
- const {
80
- texts
81
- } = useLocalization();
83
+ var internalRef = useMergedRef(ref);
84
+ var listboxRef = React__default.useRef(null);
85
+ var searchRef = React__default.useRef(null);
86
+ var _useLocalization = useLocalization(),
87
+ texts = _useLocalization.texts;
82
88
  // align the listbox min width with the width of the input - it should never be smaller
83
- const dimensions = useBoundingClientRectListener(internalRef);
89
+ var dimensions = useBoundingClientRectListener(internalRef);
84
90
  // state
85
- const [open, setOpen] = React__default.useState(false);
86
- const [value, _setValue] = useControllableState({
87
- // uncontrolled
88
- defaultProp,
89
- // controlled
90
- onChange,
91
- prop
92
- });
93
- const setValue = createListboxValueSetter(multiple, _setValue);
94
- const [validationError, setValidationError] = React__default.useState();
95
- const [shouldPauseHoverState, setShouldPauseHoverState] = useIsHoverStatePaused();
96
- const {
97
- flattenedChildren,
98
- filteredChildren,
99
- searchQuery,
100
- setSearchQuery
101
- } = useChildren({
102
- children: initialChildren,
103
- emptyValue,
104
- multiple,
105
- open,
106
- setValue,
107
- value
108
- });
91
+ var _React$useState = React__default.useState(false),
92
+ open = _React$useState[0],
93
+ setOpen = _React$useState[1];
94
+ var _useControllableState = useControllableState({
95
+ // uncontrolled
96
+ defaultProp: defaultProp,
97
+ // controlled
98
+ onChange: onChange,
99
+ prop: prop
100
+ }),
101
+ value = _useControllableState[0],
102
+ _setValue = _useControllableState[1];
103
+ var setValue = createListboxValueSetter(multiple, _setValue);
104
+ var _React$useState2 = React__default.useState(),
105
+ validationError = _React$useState2[0],
106
+ setValidationError = _React$useState2[1];
107
+ var _useIsHoverStatePause = useIsHoverStatePaused(),
108
+ shouldPauseHoverState = _useIsHoverStatePause[0],
109
+ setShouldPauseHoverState = _useIsHoverStatePause[1];
110
+ var _useChildren = useChildren({
111
+ children: initialChildren,
112
+ emptyValue: emptyValue,
113
+ multiple: multiple,
114
+ open: open,
115
+ setValue: setValue,
116
+ value: value
117
+ }),
118
+ flattenedChildren = _useChildren.flattenedChildren,
119
+ filteredChildren = _useChildren.filteredChildren,
120
+ searchQuery = _useChildren.searchQuery,
121
+ setSearchQuery = _useChildren.setSearchQuery;
109
122
  // context
110
- const context = {
111
- disabled,
112
- highlighted,
113
- invalid,
114
- listboxRef,
115
- multiple,
116
- onCreate,
117
- onDelete,
118
- onEdit,
119
- open,
120
- readOnly,
123
+ var context = {
124
+ disabled: disabled,
125
+ highlighted: highlighted,
126
+ invalid: invalid,
127
+ listboxRef: listboxRef,
128
+ multiple: multiple,
129
+ onCreate: onCreate,
130
+ onDelete: onDelete,
131
+ onEdit: onEdit,
132
+ open: open,
133
+ readOnly: readOnly,
121
134
  ref: internalRef,
122
- searchQuery,
123
- searchRef,
124
- setOpen,
125
- setSearchQuery,
126
- setValidationError,
127
- setValue,
128
- shouldPauseHoverState,
129
- setShouldPauseHoverState,
130
- tags,
131
- fontSize,
132
- validationError,
133
- value,
134
- createDialog,
135
- createTriggerText
135
+ searchQuery: searchQuery,
136
+ searchRef: searchRef,
137
+ setOpen: setOpen,
138
+ setSearchQuery: setSearchQuery,
139
+ setValidationError: setValidationError,
140
+ setValue: setValue,
141
+ shouldPauseHoverState: shouldPauseHoverState,
142
+ setShouldPauseHoverState: setShouldPauseHoverState,
143
+ tags: tags,
144
+ fontSize: fontSize,
145
+ validationError: validationError,
146
+ value: value,
147
+ createDialog: createDialog,
148
+ createTriggerText: createTriggerText
136
149
  };
137
- const hasInlineCreation = onCreate && !createDialog;
138
- const hasSearch = flattenedChildren.length > 5 || hasInlineCreation;
139
- const visibleChildren = searchQuery === '' ? initialChildren : filteredChildren;
140
- const selectOptions = searchQuery === '' ? flattenedChildren.map(child => child.props.value) : filteredChildren.map(child => isGroup(child) ? Array.isArray(child.props.children) && child.props.children.map(subChild => subChild.props.value) : child.props.value).flatMap(c => c) || [];
150
+ var hasInlineCreation = onCreate && !createDialog;
151
+ var hasSearch = flattenedChildren.length > 5 || hasInlineCreation;
152
+ var visibleChildren = searchQuery === '' ? initialChildren : filteredChildren;
153
+ var selectOptions = searchQuery === '' ? flattenedChildren.map(function (child) {
154
+ return child.props.value;
155
+ }) : filteredChildren.map(function (child) {
156
+ return isGroup(child) ? Array.isArray(child.props.children) && child.props.children.map(function (subChild) {
157
+ return subChild.props.value;
158
+ }) : child.props.value;
159
+ }).flatMap(function (c) {
160
+ return c;
161
+ }) || [];
141
162
  // support typeahead functionality when search isn't available
142
- const queryTimeoutRef = React__default.useRef('');
143
- const typeahead = debounce(function () {
163
+ var queryTimeoutRef = React__default.useRef('');
164
+ var typeahead = debounce(function () {
144
165
  if (!queryTimeoutRef.current) {
145
166
  return;
146
167
  }
147
- const matchedValueIndex = visibleChildren.findIndex(child => filterOption(child, queryTimeoutRef.current));
168
+ var matchedValueIndex = visibleChildren.findIndex(function (child) {
169
+ return filterOption(child, queryTimeoutRef.current);
170
+ });
148
171
  if (matchedValueIndex > -1) {
149
172
  setValue(selectOptions[matchedValueIndex]);
150
173
  }
151
174
  queryTimeoutRef.current = '';
152
175
  }, 200);
153
- const setValueIfMatched = query => {
176
+ var setValueIfMatched = function setValueIfMatched(query) {
154
177
  queryTimeoutRef.current = queryTimeoutRef.current + query;
155
178
  typeahead();
156
179
  };
157
- const handleKeyDown = event => {
180
+ var handleKeyDown = function handleKeyDown(event) {
158
181
  var _listboxRef$current;
159
182
  if (open) {
160
183
  event.preventDefault();
@@ -169,8 +192,8 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
169
192
  // the focus should always remain on the input, so we forward events on to the listbox
170
193
  (_listboxRef$current = listboxRef.current) === null || _listboxRef$current === void 0 ? void 0 : _listboxRef$current.dispatchEvent(createCustomKeyboardEvent(event));
171
194
  };
172
- const shouldFocusNextRef = React__default.useRef(false);
173
- const handleListboxKeyDown = event => {
195
+ var shouldFocusNextRef = React__default.useRef(false);
196
+ var handleListboxKeyDown = function handleListboxKeyDown(event) {
174
197
  if (isAriaDirectionKey(event)) {
175
198
  setShouldPauseHoverState(true);
176
199
  return;
@@ -187,7 +210,7 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
187
210
  }
188
211
  };
189
212
  // popover closes and unmounts before any event can be used to focus next, so prevent focusing the trigger and focus next
190
- const handleCloseAutoFocus = event => {
213
+ var handleCloseAutoFocus = function handleCloseAutoFocus(event) {
191
214
  if (shouldFocusNextRef.current) {
192
215
  var _otherProps$onBlur, _getNextFocussableEle;
193
216
  event.preventDefault();
@@ -197,8 +220,10 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
197
220
  return;
198
221
  }
199
222
  };
200
- const areAllSelected = Array.isArray(value) && selectOptions.every(option => value.includes(option));
201
- const selectAllText = React__default.useMemo(() => {
223
+ var areAllSelected = Array.isArray(value) && selectOptions.every(function (option) {
224
+ return value.includes(option);
225
+ });
226
+ var selectAllText = React__default.useMemo(function () {
202
227
  if (searchQuery === '') {
203
228
  if (areAllSelected) {
204
229
  return texts.select2.deselectAll;
@@ -211,24 +236,28 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
211
236
  return texts.select2.selectAllResults;
212
237
  }
213
238
  }, [areAllSelected, searchQuery]);
214
- const selectAll = () => {
239
+ var selectAll = function selectAll() {
215
240
  if (!Array.isArray(value) || value.length === 0) {
216
241
  setValue(selectOptions);
217
242
  } else {
218
243
  // array of all available options which are not selected
219
- const preselectedValues = selectOptions.filter(option => !value.includes(option));
220
- setValue([...value, ...preselectedValues]);
244
+ var preselectedValues = selectOptions.filter(function (option) {
245
+ return !value.includes(option);
246
+ });
247
+ setValue([].concat(value, preselectedValues));
221
248
  }
222
249
  };
223
- const deselectAll = () => {
250
+ var deselectAll = function deselectAll() {
224
251
  if (searchQuery === '') {
225
252
  setValue([]);
226
253
  } else {
227
- const nextValue = Array.isArray(value) && value.filter(subValue => !selectOptions.includes(subValue));
254
+ var nextValue = Array.isArray(value) && value.filter(function (subValue) {
255
+ return !selectOptions.includes(subValue);
256
+ });
228
257
  setValue(nextValue);
229
258
  }
230
259
  };
231
- const className = cn('border-grey-300 rounded border bg-white py-1.5 shadow-md ', {
260
+ var className = cn('border-grey-300 rounded border bg-white py-1.5 shadow-md ', {
232
261
  'focus-within:yt-focus': !hasSearch,
233
262
  'outline-none': hasSearch
234
263
  }, createCollectionClassName());
@@ -256,7 +285,7 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
256
285
  }, /*#__PURE__*/React__default.createElement("div", {
257
286
  className: className,
258
287
  style: {
259
- minWidth: dimensions !== null && dimensions !== void 0 && dimensions.width ? `${dimensions.width}px` : undefined
288
+ minWidth: dimensions !== null && dimensions !== void 0 && dimensions.width ? dimensions.width + "px" : undefined
260
289
  }
261
290
  }, hasSearch ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Search, {
262
291
  placeholder: hasInlineCreation ? texts.select2.searchOrCreate : texts.select2.search,
@@ -296,7 +325,9 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
296
325
  emptyValue: emptyValue,
297
326
  multiple: multiple || tags,
298
327
  name: name,
299
- options: flattenedChildren.map(child => child.props.value),
328
+ options: flattenedChildren.map(function (child) {
329
+ return child.props.value;
330
+ }),
300
331
  parentRef: internalRef,
301
332
  setValue: setValue,
302
333
  value: value
@@ -305,18 +336,18 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
305
336
  Select2.Option = Option;
306
337
  Select2.Group = Group;
307
338
  Select2.Title = Title;
308
- const ControlledHiddenField = props => {
309
- const {
310
- emptyValue,
311
- multiple,
312
- name,
313
- options,
314
- parentRef,
315
- value,
316
- setValue
317
- } = props;
318
- const isFormControl = useIsFormControl(parentRef, () => setValue(multiple ? [] : undefined));
319
- let bubbleValue;
339
+ var ControlledHiddenField = function ControlledHiddenField(props) {
340
+ var emptyValue = props.emptyValue,
341
+ multiple = props.multiple,
342
+ name = props.name,
343
+ options = props.options,
344
+ parentRef = props.parentRef,
345
+ value = props.value,
346
+ setValue = props.setValue;
347
+ var isFormControl = useIsFormControl(parentRef, function () {
348
+ return setValue(multiple ? [] : undefined);
349
+ });
350
+ var bubbleValue;
320
351
  if (isFormControl) {
321
352
  if (value !== undefined) {
322
353
  if (multiple) {
@@ -334,10 +365,12 @@ const ControlledHiddenField = props => {
334
365
  value: bubbleValue
335
366
  }, emptyValue !== undefined ? /*#__PURE__*/React__default.createElement("option", {
336
367
  value: emptyValue
337
- }) : null, options.map(option => (/*#__PURE__*/React__default.createElement("option", {
338
- key: String(option),
339
- value: String(option)
340
- }))));
368
+ }) : null, options.map(function (option) {
369
+ return /*#__PURE__*/React__default.createElement("option", {
370
+ key: String(option),
371
+ value: String(option)
372
+ });
373
+ }));
341
374
  }
342
375
  return null;
343
376
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Select2.js","sources":["../../../../../../../src/components/Select2/Select2.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as ListboxPrimitive from '../../primitives/Listbox2/Listbox2';\nimport {\n Select2Children,\n Select2CreateHandler,\n Select2CreateDialogRenderer,\n Select2DeleteHandler,\n Select2EditHandler,\n Select2OptionValue,\n Select2Value,\n} from './types';\nimport { Option, Select2OptionProps } from './components/Option';\nimport { Group, Select2GroupProps } from './components/Group';\nimport { Select2TitleProps, Title } from './components/Title';\nimport { Select2Context } from './components/Context';\nimport { createCollectionClassName, filterOption, getFontSize } from './utilities';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener';\nimport { createCustomKeyboardEvent } from '../../utils/input';\nimport { Trigger } from './components/Trigger';\nimport { useIsFormControl } from '../../hooks/useIsFormControl';\nimport { BubbleSelect } from '../../primitives/BubbleSelect';\nimport { Search } from './components/Search';\nimport { isGroup, useChildren } from './hooks/useChildren';\n\nimport { Create } from './components/Create';\nimport { Collection } from './components/Collection';\nimport { CollectionRef } from '../../primitives/Collection/Collection';\nimport { useLocalization } from '../Provider/Localization';\nimport { useIsHoverStatePaused } from '../../hooks/useIsHoverStatePaused';\nimport { isAriaDirectionKey } from '../../utils/aria';\nimport { getNextFocussableElement, isElementInsideTable3OrReport } from '../../utils/dom';\nimport { FontSize, FontSizes } from '../../types';\nimport { Button } from '../Button/Button';\nimport { Spinner } from '../Spinner/Spinner';\nimport { debounce } from '../../utils/debounce';\n\ntype Select2Texts = {\n allSelect: string;\n allDeselect: string;\n cancel: string;\n chooseColor: string;\n create: string;\n delete: string;\n save: string;\n search: string;\n searchOrCreate: string;\n selectAll: string;\n selectAllResults: string;\n deselectAll: string;\n deselectAllResults: string;\n};\n\ntype Select2Props = Omit<React.HTMLAttributes<HTMLButtonElement>, 'children' | 'defaultValue' | 'onChange' | 'value'> & {\n /** Autofocus Select2 when loaded **/\n autoFocus?: boolean;\n /** Array of options in Select2 */\n children: Select2Children;\n /** Initial value of the input in Select2 */\n defaultValue?: Select2Value;\n /** Set what value should have an empty option in Select2 */\n emptyValue?: Select2OptionValue;\n /** Whether the Select2 is in a disabled state **/\n disabled?: boolean;\n /** Font size of text in Select2 **/\n fontSize?: FontSize;\n /** Draws attention to the Select2 by changing its style and making it visually prominent */\n highlighted?: boolean;\n /** Whether the Select2 is in an invalid state **/\n invalid?: boolean;\n /** Whether the Select2 is loading the data **/\n loading?: boolean;\n /** Whether the Select2 allows selecting multiple values **/\n multiple?: boolean;\n /** Whether the Select2 is in an invalid state **/\n name?: string;\n /** Handler called when user chooses an option from the provided options **/\n onChange?: (value: Select2Value) => void;\n /** Handler called when user creates a new option **/\n onCreate?: Select2CreateHandler;\n /** Handler called when user deletes an option **/\n onDelete?: Select2DeleteHandler;\n /** Handler called when user edits an option **/\n onEdit?: Select2EditHandler;\n /** Placeholder showed when nothing is selected **/\n placeholder?: string;\n /** Whether the Select2 is in a readonly state **/\n readOnly?: boolean;\n required?: boolean;\n /** Renders select options as tags **/\n tags?: boolean;\n /** Value of the input in select2 */\n value?: Select2Value;\n /** Create dialog component, if specified, then create button will become always visible in the bottom of options dropdown,\n * when clicked, it will open create dialog and wait for 'onCreate' handler to be triggered from the dialog */\n createDialog?: Select2CreateDialogRenderer;\n /** Create button text */\n createTriggerText?: string;\n};\ntype Select2PropsWithStatics = React.ForwardRefExoticComponent<Select2Props & React.RefAttributes<HTMLButtonElement>> & {\n Option: React.ForwardRefExoticComponent<Select2OptionProps>;\n Group: React.ForwardRefExoticComponent<Select2GroupProps>;\n Title: React.ForwardRefExoticComponent<Select2TitleProps>;\n};\n\nconst Select2 = React.forwardRef<HTMLButtonElement, Select2Props>(function Select2(props, ref) {\n const {\n children: initChildren,\n defaultValue: defaultProp,\n disabled = false,\n emptyValue = undefined,\n fontSize,\n highlighted = false,\n invalid = false,\n loading,\n multiple = false,\n name,\n onChange,\n onCreate,\n onDelete,\n onEdit,\n placeholder,\n readOnly = false,\n tags = false,\n value: prop,\n createDialog,\n createTriggerText,\n ...otherProps\n } = props;\n\n const emptyOption: React.ReactElement<Select2OptionProps> | undefined = React.useMemo(() => {\n if (emptyValue !== undefined && !multiple) {\n // Empty option has 0px height, because it's empty, so need to apply height manually\n return <Option key=\"__empty\" children=\"\" value={emptyValue} className=\"h-8\" />;\n }\n return;\n }, [emptyValue, multiple]);\n\n const initialChildren = React.useMemo(() => {\n if (emptyOption) {\n return [emptyOption, ...initChildren] as Select2Children;\n }\n return initChildren;\n }, [emptyOption, initChildren]);\n\n // refs\n const internalRef = useMergedRef<HTMLButtonElement>(ref);\n const listboxRef = React.useRef<CollectionRef>(null);\n const searchRef = React.useRef<HTMLInputElement>(null);\n const { texts } = useLocalization();\n // align the listbox min width with the width of the input - it should never be smaller\n const dimensions = useBoundingClientRectListener(internalRef);\n\n // state\n const [open, setOpen] = React.useState(false);\n const [value, _setValue] = useControllableState<Select2Value>({\n // uncontrolled\n defaultProp,\n // controlled\n onChange,\n prop,\n });\n const setValue = ListboxPrimitive.createListboxValueSetter(multiple, _setValue);\n const [validationError, setValidationError] = React.useState<Error | undefined>();\n const [shouldPauseHoverState, setShouldPauseHoverState] = useIsHoverStatePaused();\n\n const { flattenedChildren, filteredChildren, searchQuery, setSearchQuery } = useChildren({\n children: initialChildren,\n emptyValue,\n multiple,\n open,\n setValue,\n value,\n });\n\n // context\n const context = {\n disabled,\n highlighted,\n invalid,\n listboxRef,\n multiple,\n onCreate,\n onDelete,\n onEdit,\n open,\n readOnly,\n ref: internalRef,\n searchQuery,\n searchRef,\n setOpen,\n setSearchQuery,\n setValidationError,\n setValue,\n shouldPauseHoverState,\n setShouldPauseHoverState,\n tags,\n fontSize,\n validationError,\n value,\n createDialog,\n createTriggerText,\n };\n\n const hasInlineCreation = onCreate && !createDialog;\n const hasSearch = flattenedChildren.length > 5 || hasInlineCreation;\n const visibleChildren = searchQuery === '' ? initialChildren : filteredChildren;\n const selectOptions =\n searchQuery === ''\n ? flattenedChildren.map(child => child.props.value)\n : filteredChildren\n .map(child =>\n isGroup(child)\n ? Array.isArray(child.props.children) && child.props.children.map(subChild => subChild.props.value)\n : child.props.value\n )\n .flatMap(c => c) || [];\n\n // support typeahead functionality when search isn't available\n const queryTimeoutRef = React.useRef('');\n\n const typeahead = debounce(function () {\n if (!queryTimeoutRef.current) {\n return;\n }\n\n const matchedValueIndex = visibleChildren.findIndex(child =>\n filterOption(child as React.ReactElement<Select2OptionProps>, queryTimeoutRef.current)\n );\n\n if (matchedValueIndex > -1) {\n setValue(selectOptions[matchedValueIndex]);\n }\n\n queryTimeoutRef.current = '';\n }, 200);\n\n const setValueIfMatched = (query: string) => {\n queryTimeoutRef.current = queryTimeoutRef.current + query;\n typeahead();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (open) {\n event.preventDefault();\n } else if (isElementInsideTable3OrReport(event.currentTarget) && isAriaDirectionKey(event)) {\n return;\n } else if (!event.ctrlKey && !event.metaKey && (event.key === 'ArrowDown' || /^[a-z0-9]$/i.test(event.key))) {\n setOpen(true);\n\n if (!hasSearch) {\n setValueIfMatched(event.key);\n }\n }\n\n // the focus should always remain on the input, so we forward events on to the listbox\n listboxRef.current?.dispatchEvent(createCustomKeyboardEvent(event as React.KeyboardEvent<HTMLInputElement>));\n };\n\n const shouldFocusNextRef = React.useRef<boolean>(false);\n\n const handleListboxKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (isAriaDirectionKey(event)) {\n setShouldPauseHoverState(true);\n return;\n }\n\n if (event.key === 'Tab') {\n shouldFocusNextRef.current = true;\n setOpen(false);\n return;\n }\n\n // support typeahead to set the value by typing its text\n if (!hasSearch && /^[a-z0-9]$/i.test(event.key)) {\n setValueIfMatched(event.key);\n return;\n }\n };\n\n // popover closes and unmounts before any event can be used to focus next, so prevent focusing the trigger and focus next\n const handleCloseAutoFocus = event => {\n if (shouldFocusNextRef.current) {\n event.preventDefault();\n shouldFocusNextRef.current = false;\n otherProps.onBlur?.(event as any);\n getNextFocussableElement(internalRef.current)?.focus();\n return;\n }\n };\n\n const areAllSelected = Array.isArray(value) && selectOptions.every(option => value.includes(option as string));\n\n const selectAllText = React.useMemo(() => {\n if (searchQuery === '') {\n if (areAllSelected) {\n return texts.select2.deselectAll;\n } else {\n return texts.select2.selectAll;\n }\n } else if (areAllSelected) {\n return texts.select2.deselectAllResults;\n } else {\n return texts.select2.selectAllResults;\n }\n }, [areAllSelected, searchQuery]);\n\n const selectAll = () => {\n if (!Array.isArray(value) || value.length === 0) {\n setValue(selectOptions);\n } else {\n // array of all available options which are not selected\n const preselectedValues = selectOptions.filter(option => !value.includes(option));\n setValue([...value, ...preselectedValues]);\n }\n };\n\n const deselectAll = () => {\n if (searchQuery === '') {\n setValue([]);\n } else {\n const nextValue = Array.isArray(value) && value.filter(subValue => !selectOptions.includes(subValue as string));\n setValue(nextValue);\n }\n };\n\n const className = cn(\n 'border-grey-300 rounded border bg-white py-1.5 shadow-md ',\n {\n 'focus-within:yt-focus': !hasSearch,\n 'outline-none': hasSearch,\n },\n createCollectionClassName()\n );\n\n return (\n <Select2Context.Provider value={context}>\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <PopoverPrimitive.Trigger asChild data-taco=\"Select2\">\n <Trigger\n {...otherProps}\n aria-haspopup=\"listbox\"\n emptyValue={emptyValue}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n ref={internalRef}>\n {flattenedChildren}\n </Trigger>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n asChild\n align=\"start\"\n onCloseAutoFocus={handleCloseAutoFocus}\n onPointerDownOutside={otherProps.onBlur as any}\n sideOffset={4}\n tabIndex={-1}>\n <div className={className} style={{ minWidth: dimensions?.width ? `${dimensions.width}px` : undefined }}>\n {hasSearch ? (\n <>\n <Search\n placeholder={hasInlineCreation ? texts.select2.searchOrCreate : texts.select2.search}\n ref={searchRef}\n />\n {multiple && selectOptions.length > 1 && (\n <>\n <Button\n className=\"!justify-start\"\n appearance=\"discrete\"\n onClick={areAllSelected ? deselectAll : selectAll}>\n {selectAllText}\n </Button>\n <div className=\"border-grey-300 mx-3 rounded border-t\" />\n </>\n )}\n </>\n ) : null}\n {loading ? (\n <span className={cn('text-grey-700 flex items-center italic', fontSize && getFontSize(fontSize))}>\n <span>\n <Spinner\n delay={0}\n className={cn('ml-3 mr-2 mt-1.5 h-5 w-5', {\n '!mt-1 !h-3.5 !w-3.5': fontSize === FontSizes.small,\n '!h-4 !w-4': fontSize === FontSizes.medium,\n '!h-5 !w-5': fontSize === FontSizes.large,\n })}\n />\n </span>\n <span>{texts.listbox.loading}</span>\n </span>\n ) : flattenedChildren.length <= 0 ? (\n <div className=\"text-grey-700 -mt-0.5 flex h-8 items-center px-2\" role=\"presentation\">\n {texts.listbox.empty}\n </div>\n ) : (\n <ListboxPrimitive.Root\n className=\"flex flex-col gap-0.5 focus-visible:outline-none\"\n customSelector=\":scope > button\"\n disabled={disabled}\n multiple={multiple}\n onKeyDown={handleListboxKeyDown}\n readOnly={readOnly}\n ref={listboxRef}\n setValue={setValue}\n value={value}>\n <Collection>{visibleChildren}</Collection>\n {onCreate ? <Create onCreate={onCreate} options={flattenedChildren} /> : null}\n </ListboxPrimitive.Root>\n )}\n </div>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n <ControlledHiddenField\n emptyValue={emptyValue}\n multiple={multiple || tags}\n name={name}\n options={flattenedChildren.map(child => child.props.value)}\n parentRef={internalRef}\n setValue={setValue}\n value={value}\n />\n </PopoverPrimitive.Root>\n </Select2Context.Provider>\n );\n}) as Select2PropsWithStatics;\nSelect2.Option = Option;\nSelect2.Group = Group;\nSelect2.Title = Title;\n\nconst ControlledHiddenField = props => {\n const { emptyValue, multiple, name, options, parentRef, value, setValue } = props;\n const isFormControl = useIsFormControl(parentRef, () => setValue(multiple ? [] : undefined));\n\n let bubbleValue;\n\n if (isFormControl) {\n if (value !== undefined) {\n if (multiple) {\n bubbleValue = Array.isArray(value) ? value.map(String) : [value === null ? '' : String(value)];\n } else {\n bubbleValue = value === null ? '' : String(value);\n }\n }\n\n return (\n <BubbleSelect aria-hidden key={String(bubbleValue)} multiple={multiple} name={name} tabIndex={-1} value={bubbleValue}>\n {emptyValue !== undefined ? <option value={emptyValue} /> : null}\n {options.map(option => (\n <option key={String(option)} value={String(option)} />\n ))}\n </BubbleSelect>\n );\n }\n\n return null;\n};\nSelect2.displayName = 'Select2';\n\nexport { Select2 };\n\nexport type {\n Select2Texts,\n Select2GroupProps,\n Select2OptionProps,\n Select2OptionValue,\n Select2Value,\n Select2Props,\n Select2TitleProps,\n};\n"],"names":["Select2","React","forwardRef","props","ref","children","initChildren","defaultValue","defaultProp","disabled","emptyValue","undefined","fontSize","highlighted","invalid","loading","multiple","name","onChange","onCreate","onDelete","onEdit","placeholder","readOnly","tags","value","prop","createDialog","createTriggerText","otherProps","emptyOption","useMemo","Option","key","className","initialChildren","internalRef","useMergedRef","listboxRef","useRef","searchRef","texts","useLocalization","dimensions","useBoundingClientRectListener","open","setOpen","useState","_setValue","useControllableState","setValue","ListboxPrimitive","validationError","setValidationError","shouldPauseHoverState","setShouldPauseHoverState","useIsHoverStatePaused","flattenedChildren","filteredChildren","searchQuery","setSearchQuery","useChildren","context","hasInlineCreation","hasSearch","length","visibleChildren","selectOptions","map","child","isGroup","Array","isArray","subChild","flatMap","c","queryTimeoutRef","typeahead","debounce","current","matchedValueIndex","findIndex","filterOption","setValueIfMatched","query","handleKeyDown","event","preventDefault","isElementInsideTable3OrReport","currentTarget","isAriaDirectionKey","ctrlKey","metaKey","test","_listboxRef$current","dispatchEvent","createCustomKeyboardEvent","shouldFocusNextRef","handleListboxKeyDown","handleCloseAutoFocus","_otherProps$onBlur","_getNextFocussableEle","onBlur","call","getNextFocussableElement","focus","areAllSelected","every","option","includes","selectAllText","select2","deselectAll","selectAll","deselectAllResults","selectAllResults","preselectedValues","filter","nextValue","subValue","cn","createCollectionClassName","Select2Context","Provider","PopoverPrimitive","onOpenChange","asChild","Trigger","onKeyDown","align","onCloseAutoFocus","onPointerDownOutside","sideOffset","tabIndex","style","minWidth","width","Search","searchOrCreate","search","Button","appearance","onClick","getFontSize","Spinner","delay","FontSizes","small","medium","large","listbox","role","empty","customSelector","Collection","Create","options","ControlledHiddenField","parentRef","Group","Title","isFormControl","useIsFormControl","bubbleValue","String","BubbleSelect","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4GMA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAkC,SAASF,OAAOA,CAACG,KAAK,EAAEC,GAAG;EACzF,MAAM;IACFC,QAAQ,EAAEC,YAAY;IACtBC,YAAY,EAAEC,WAAW;IACzBC,QAAQ,GAAG,KAAK;IAChBC,UAAU,GAAGC,SAAS;IACtBC,QAAQ;IACRC,WAAW,GAAG,KAAK;IACnBC,OAAO,GAAG,KAAK;IACfC,OAAO;IACPC,QAAQ,GAAG,KAAK;IAChBC,IAAI;IACJC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,MAAM;IACNC,WAAW;IACXC,QAAQ,GAAG,KAAK;IAChBC,IAAI,GAAG,KAAK;IACZC,KAAK,EAAEC,IAAI;IACXC,YAAY;IACZC,iBAAiB;IACjB,GAAGC;GACN,GAAG1B,KAAK;EAET,MAAM2B,WAAW,GAAuD7B,cAAK,CAAC8B,OAAO,CAAC;IAClF,IAAIrB,UAAU,KAAKC,SAAS,IAAI,CAACK,QAAQ,EAAE;;MAEvC,oBAAOf,6BAAC+B,MAAM;QAACC,GAAG,EAAC,SAAS;QAAC5B,QAAQ,EAAC,EAAE;QAACoB,KAAK,EAAEf,UAAU;QAAEwB,SAAS,EAAC;QAAQ;;IAElF;GACH,EAAE,CAACxB,UAAU,EAAEM,QAAQ,CAAC,CAAC;EAE1B,MAAMmB,eAAe,GAAGlC,cAAK,CAAC8B,OAAO,CAAC;IAClC,IAAID,WAAW,EAAE;MACb,OAAO,CAACA,WAAW,EAAE,GAAGxB,YAAY,CAAoB;;IAE5D,OAAOA,YAAY;GACtB,EAAE,CAACwB,WAAW,EAAExB,YAAY,CAAC,CAAC;;EAG/B,MAAM8B,WAAW,GA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IACf,IAAIxI,KAAK,KAAKd,SAAS,EAAE;MACrB,IAAIK,QAAQ,EAAE;QACVmJ,WAAW,GAAG5F,KAAK,CAACC,OAAO,CAAC/C,KAAK,CAAC,GAAGA,KAAK,CAAC2C,GAAG,CAACgG,MAAM,CAAC,GAAG,CAAC3I,KAAK,KAAK,IAAI,GAAG,EAAE,GAAG2I,MAAM,CAAC3I,KAAK,CAAC,CAAC;OACjG,MAAM;QACH0I,WAAW,GAAG1I,KAAK,KAAK,IAAI,GAAG,EAAE,GAAG2I,MAAM,CAAC3I,KAAK,CAAC;;;IAIzD,oBACIxB,6BAACoK,YAAY;;MAAapI,GAAG,EAAEmI,MAAM,CAACD,WAAW,CAAC;MAAEnJ,QAAQ,EAAEA,QAAQ;MAAEC,IAAI,EAAEA,IAAI;MAAEoH,QAAQ,EAAE,CAAC,CAAC;MAAE5G,KAAK,EAAE0I;OACpGzJ,UAAU,KAAKC,SAAS,gBAAGV;MAAQwB,KAAK,EAAEf;MAAc,GAAG,IAAI,EAC/DkJ,OAAO,CAACxF,GAAG,CAACwC,MAAM,kBACf3G;MAAQgC,GAAG,EAAEmI,MAAM,CAACxD,MAAM,CAAC;MAAEnF,KAAK,EAAE2I,MAAM,CAACxD,MAAM;MAAK,CACzD,CAAC,CACS;;EAIvB,OAAO,IAAI;AACf,CAAC;AACD5G,OAAO,CAACsK,WAAW,GAAG,SAAS;;;;"}
1
+ {"version":3,"file":"Select2.js","sources":["../../../../../../../src/components/Select2/Select2.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as ListboxPrimitive from '../../primitives/Listbox2/Listbox2';\nimport {\n Select2Children,\n Select2CreateHandler,\n Select2CreateDialogRenderer,\n Select2DeleteHandler,\n Select2EditHandler,\n Select2OptionValue,\n Select2Value,\n} from './types';\nimport { Option, Select2OptionProps } from './components/Option';\nimport { Group, Select2GroupProps } from './components/Group';\nimport { Select2TitleProps, Title } from './components/Title';\nimport { Select2Context } from './components/Context';\nimport { createCollectionClassName, filterOption, getFontSize } from './utilities';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener';\nimport { createCustomKeyboardEvent } from '../../utils/input';\nimport { Trigger } from './components/Trigger';\nimport { useIsFormControl } from '../../hooks/useIsFormControl';\nimport { BubbleSelect } from '../../primitives/BubbleSelect';\nimport { Search } from './components/Search';\nimport { isGroup, useChildren } from './hooks/useChildren';\n\nimport { Create } from './components/Create';\nimport { Collection } from './components/Collection';\nimport { CollectionRef } from '../../primitives/Collection/Collection';\nimport { useLocalization } from '../Provider/Localization';\nimport { useIsHoverStatePaused } from '../../hooks/useIsHoverStatePaused';\nimport { isAriaDirectionKey } from '../../utils/aria';\nimport { getNextFocussableElement, isElementInsideTable3OrReport } from '../../utils/dom';\nimport { FontSize, FontSizes } from '../../types';\nimport { Button } from '../Button/Button';\nimport { Spinner } from '../Spinner/Spinner';\nimport { debounce } from '../../utils/debounce';\n\ntype Select2Texts = {\n allSelect: string;\n allDeselect: string;\n cancel: string;\n chooseColor: string;\n create: string;\n delete: string;\n save: string;\n search: string;\n searchOrCreate: string;\n selectAll: string;\n selectAllResults: string;\n deselectAll: string;\n deselectAllResults: string;\n};\n\ntype Select2Props = Omit<React.HTMLAttributes<HTMLButtonElement>, 'children' | 'defaultValue' | 'onChange' | 'value'> & {\n /** Autofocus Select2 when loaded **/\n autoFocus?: boolean;\n /** Array of options in Select2 */\n children: Select2Children;\n /** Initial value of the input in Select2 */\n defaultValue?: Select2Value;\n /** Set what value should have an empty option in Select2 */\n emptyValue?: Select2OptionValue;\n /** Whether the Select2 is in a disabled state **/\n disabled?: boolean;\n /** Font size of text in Select2 **/\n fontSize?: FontSize;\n /** Draws attention to the Select2 by changing its style and making it visually prominent */\n highlighted?: boolean;\n /** Whether the Select2 is in an invalid state **/\n invalid?: boolean;\n /** Whether the Select2 is loading the data **/\n loading?: boolean;\n /** Whether the Select2 allows selecting multiple values **/\n multiple?: boolean;\n /** Whether the Select2 is in an invalid state **/\n name?: string;\n /** Handler called when user chooses an option from the provided options **/\n onChange?: (value: Select2Value) => void;\n /** Handler called when user creates a new option **/\n onCreate?: Select2CreateHandler;\n /** Handler called when user deletes an option **/\n onDelete?: Select2DeleteHandler;\n /** Handler called when user edits an option **/\n onEdit?: Select2EditHandler;\n /** Placeholder showed when nothing is selected **/\n placeholder?: string;\n /** Whether the Select2 is in a readonly state **/\n readOnly?: boolean;\n required?: boolean;\n /** Renders select options as tags **/\n tags?: boolean;\n /** Value of the input in select2 */\n value?: Select2Value;\n /** Create dialog component, if specified, then create button will become always visible in the bottom of options dropdown,\n * when clicked, it will open create dialog and wait for 'onCreate' handler to be triggered from the dialog */\n createDialog?: Select2CreateDialogRenderer;\n /** Create button text */\n createTriggerText?: string;\n};\ntype Select2PropsWithStatics = React.ForwardRefExoticComponent<Select2Props & React.RefAttributes<HTMLButtonElement>> & {\n Option: React.ForwardRefExoticComponent<Select2OptionProps>;\n Group: React.ForwardRefExoticComponent<Select2GroupProps>;\n Title: React.ForwardRefExoticComponent<Select2TitleProps>;\n};\n\nconst Select2 = React.forwardRef<HTMLButtonElement, Select2Props>(function Select2(props, ref) {\n const {\n children: initChildren,\n defaultValue: defaultProp,\n disabled = false,\n emptyValue = undefined,\n fontSize,\n highlighted = false,\n invalid = false,\n loading,\n multiple = false,\n name,\n onChange,\n onCreate,\n onDelete,\n onEdit,\n placeholder,\n readOnly = false,\n tags = false,\n value: prop,\n createDialog,\n createTriggerText,\n ...otherProps\n } = props;\n\n const emptyOption: React.ReactElement<Select2OptionProps> | undefined = React.useMemo(() => {\n if (emptyValue !== undefined && !multiple) {\n // Empty option has 0px height, because it's empty, so need to apply height manually\n return <Option key=\"__empty\" children=\"\" value={emptyValue} className=\"h-8\" />;\n }\n return;\n }, [emptyValue, multiple]);\n\n const initialChildren = React.useMemo(() => {\n if (emptyOption) {\n return [emptyOption, ...initChildren] as Select2Children;\n }\n return initChildren;\n }, [emptyOption, initChildren]);\n\n // refs\n const internalRef = useMergedRef<HTMLButtonElement>(ref);\n const listboxRef = React.useRef<CollectionRef>(null);\n const searchRef = React.useRef<HTMLInputElement>(null);\n const { texts } = useLocalization();\n // align the listbox min width with the width of the input - it should never be smaller\n const dimensions = useBoundingClientRectListener(internalRef);\n\n // state\n const [open, setOpen] = React.useState(false);\n const [value, _setValue] = useControllableState<Select2Value>({\n // uncontrolled\n defaultProp,\n // controlled\n onChange,\n prop,\n });\n const setValue = ListboxPrimitive.createListboxValueSetter(multiple, _setValue);\n const [validationError, setValidationError] = React.useState<Error | undefined>();\n const [shouldPauseHoverState, setShouldPauseHoverState] = useIsHoverStatePaused();\n\n const { flattenedChildren, filteredChildren, searchQuery, setSearchQuery } = useChildren({\n children: initialChildren,\n emptyValue,\n multiple,\n open,\n setValue,\n value,\n });\n\n // context\n const context = {\n disabled,\n highlighted,\n invalid,\n listboxRef,\n multiple,\n onCreate,\n onDelete,\n onEdit,\n open,\n readOnly,\n ref: internalRef,\n searchQuery,\n searchRef,\n setOpen,\n setSearchQuery,\n setValidationError,\n setValue,\n shouldPauseHoverState,\n setShouldPauseHoverState,\n tags,\n fontSize,\n validationError,\n value,\n createDialog,\n createTriggerText,\n };\n\n const hasInlineCreation = onCreate && !createDialog;\n const hasSearch = flattenedChildren.length > 5 || hasInlineCreation;\n const visibleChildren = searchQuery === '' ? initialChildren : filteredChildren;\n const selectOptions =\n searchQuery === ''\n ? flattenedChildren.map(child => child.props.value)\n : filteredChildren\n .map(child =>\n isGroup(child)\n ? Array.isArray(child.props.children) && child.props.children.map(subChild => subChild.props.value)\n : child.props.value\n )\n .flatMap(c => c) || [];\n\n // support typeahead functionality when search isn't available\n const queryTimeoutRef = React.useRef('');\n\n const typeahead = debounce(function () {\n if (!queryTimeoutRef.current) {\n return;\n }\n\n const matchedValueIndex = visibleChildren.findIndex(child =>\n filterOption(child as React.ReactElement<Select2OptionProps>, queryTimeoutRef.current)\n );\n\n if (matchedValueIndex > -1) {\n setValue(selectOptions[matchedValueIndex]);\n }\n\n queryTimeoutRef.current = '';\n }, 200);\n\n const setValueIfMatched = (query: string) => {\n queryTimeoutRef.current = queryTimeoutRef.current + query;\n typeahead();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (open) {\n event.preventDefault();\n } else if (isElementInsideTable3OrReport(event.currentTarget) && isAriaDirectionKey(event)) {\n return;\n } else if (!event.ctrlKey && !event.metaKey && (event.key === 'ArrowDown' || /^[a-z0-9]$/i.test(event.key))) {\n setOpen(true);\n\n if (!hasSearch) {\n setValueIfMatched(event.key);\n }\n }\n\n // the focus should always remain on the input, so we forward events on to the listbox\n listboxRef.current?.dispatchEvent(createCustomKeyboardEvent(event as React.KeyboardEvent<HTMLInputElement>));\n };\n\n const shouldFocusNextRef = React.useRef<boolean>(false);\n\n const handleListboxKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (isAriaDirectionKey(event)) {\n setShouldPauseHoverState(true);\n return;\n }\n\n if (event.key === 'Tab') {\n shouldFocusNextRef.current = true;\n setOpen(false);\n return;\n }\n\n // support typeahead to set the value by typing its text\n if (!hasSearch && /^[a-z0-9]$/i.test(event.key)) {\n setValueIfMatched(event.key);\n return;\n }\n };\n\n // popover closes and unmounts before any event can be used to focus next, so prevent focusing the trigger and focus next\n const handleCloseAutoFocus = event => {\n if (shouldFocusNextRef.current) {\n event.preventDefault();\n shouldFocusNextRef.current = false;\n otherProps.onBlur?.(event as any);\n getNextFocussableElement(internalRef.current)?.focus();\n return;\n }\n };\n\n const areAllSelected = Array.isArray(value) && selectOptions.every(option => value.includes(option as string));\n\n const selectAllText = React.useMemo(() => {\n if (searchQuery === '') {\n if (areAllSelected) {\n return texts.select2.deselectAll;\n } else {\n return texts.select2.selectAll;\n }\n } else if (areAllSelected) {\n return texts.select2.deselectAllResults;\n } else {\n return texts.select2.selectAllResults;\n }\n }, [areAllSelected, searchQuery]);\n\n const selectAll = () => {\n if (!Array.isArray(value) || value.length === 0) {\n setValue(selectOptions);\n } else {\n // array of all available options which are not selected\n const preselectedValues = selectOptions.filter(option => !value.includes(option));\n setValue([...value, ...preselectedValues]);\n }\n };\n\n const deselectAll = () => {\n if (searchQuery === '') {\n setValue([]);\n } else {\n const nextValue = Array.isArray(value) && value.filter(subValue => !selectOptions.includes(subValue as string));\n setValue(nextValue);\n }\n };\n\n const className = cn(\n 'border-grey-300 rounded border bg-white py-1.5 shadow-md ',\n {\n 'focus-within:yt-focus': !hasSearch,\n 'outline-none': hasSearch,\n },\n createCollectionClassName()\n );\n\n return (\n <Select2Context.Provider value={context}>\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <PopoverPrimitive.Trigger asChild data-taco=\"Select2\">\n <Trigger\n {...otherProps}\n aria-haspopup=\"listbox\"\n emptyValue={emptyValue}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n ref={internalRef}>\n {flattenedChildren}\n </Trigger>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n asChild\n align=\"start\"\n onCloseAutoFocus={handleCloseAutoFocus}\n onPointerDownOutside={otherProps.onBlur as any}\n sideOffset={4}\n tabIndex={-1}>\n <div className={className} style={{ minWidth: dimensions?.width ? `${dimensions.width}px` : undefined }}>\n {hasSearch ? (\n <>\n <Search\n placeholder={hasInlineCreation ? texts.select2.searchOrCreate : texts.select2.search}\n ref={searchRef}\n />\n {multiple && selectOptions.length > 1 && (\n <>\n <Button\n className=\"!justify-start\"\n appearance=\"discrete\"\n onClick={areAllSelected ? deselectAll : selectAll}>\n {selectAllText}\n </Button>\n <div className=\"border-grey-300 mx-3 rounded border-t\" />\n </>\n )}\n </>\n ) : null}\n {loading ? (\n <span className={cn('text-grey-700 flex items-center italic', fontSize && getFontSize(fontSize))}>\n <span>\n <Spinner\n delay={0}\n className={cn('ml-3 mr-2 mt-1.5 h-5 w-5', {\n '!mt-1 !h-3.5 !w-3.5': fontSize === FontSizes.small,\n '!h-4 !w-4': fontSize === FontSizes.medium,\n '!h-5 !w-5': fontSize === FontSizes.large,\n })}\n />\n </span>\n <span>{texts.listbox.loading}</span>\n </span>\n ) : flattenedChildren.length <= 0 ? (\n <div className=\"text-grey-700 -mt-0.5 flex h-8 items-center px-2\" role=\"presentation\">\n {texts.listbox.empty}\n </div>\n ) : (\n <ListboxPrimitive.Root\n className=\"flex flex-col gap-0.5 focus-visible:outline-none\"\n customSelector=\":scope > button\"\n disabled={disabled}\n multiple={multiple}\n onKeyDown={handleListboxKeyDown}\n readOnly={readOnly}\n ref={listboxRef}\n setValue={setValue}\n value={value}>\n <Collection>{visibleChildren}</Collection>\n {onCreate ? <Create onCreate={onCreate} options={flattenedChildren} /> : null}\n </ListboxPrimitive.Root>\n )}\n </div>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n <ControlledHiddenField\n emptyValue={emptyValue}\n multiple={multiple || tags}\n name={name}\n options={flattenedChildren.map(child => child.props.value)}\n parentRef={internalRef}\n setValue={setValue}\n value={value}\n />\n </PopoverPrimitive.Root>\n </Select2Context.Provider>\n );\n}) as Select2PropsWithStatics;\nSelect2.Option = Option;\nSelect2.Group = Group;\nSelect2.Title = Title;\n\nconst ControlledHiddenField = props => {\n const { emptyValue, multiple, name, options, parentRef, value, setValue } = props;\n const isFormControl = useIsFormControl(parentRef, () => setValue(multiple ? [] : undefined));\n\n let bubbleValue;\n\n if (isFormControl) {\n if (value !== undefined) {\n if (multiple) {\n bubbleValue = Array.isArray(value) ? value.map(String) : [value === null ? '' : String(value)];\n } else {\n bubbleValue = value === null ? '' : String(value);\n }\n }\n\n return (\n <BubbleSelect aria-hidden key={String(bubbleValue)} multiple={multiple} name={name} tabIndex={-1} value={bubbleValue}>\n {emptyValue !== undefined ? <option value={emptyValue} /> : null}\n {options.map(option => (\n <option key={String(option)} value={String(option)} />\n ))}\n </BubbleSelect>\n );\n }\n\n return null;\n};\nSelect2.displayName = 'Select2';\n\nexport { Select2 };\n\nexport type {\n Select2Texts,\n Select2GroupProps,\n Select2OptionProps,\n Select2OptionValue,\n Select2Value,\n Select2Props,\n Select2TitleProps,\n};\n"],"names":["Select2","React","forwardRef","props","ref","initChildren","children","defaultProp","defaultValue","_props$disabled","disabled","_props$emptyValue","emptyValue","undefined","fontSize","_props$highlighted","highlighted","_props$invalid","invalid","loading","_props$multiple","multiple","name","onChange","onCreate","onDelete","onEdit","placeholder","_props$readOnly","readOnly","_props$tags","tags","prop","value","createDialog","createTriggerText","otherProps","_objectWithoutPropertiesLoose","_excluded","emptyOption","useMemo","Option","key","className","initialChildren","concat","internalRef","useMergedRef","listboxRef","useRef","searchRef","_useLocalization","useLocalization","texts","dimensions","useBoundingClientRectListener","_React$useState","useState","open","setOpen","_useControllableState","useControllableState","_setValue","setValue","ListboxPrimitive","_React$useState2","validationError","setValidationError","_useIsHoverStatePause","useIsHoverStatePaused","shouldPauseHoverState","setShouldPauseHoverState","_useChildren","useChildren","flattenedChildren","filteredChildren","searchQuery","setSearchQuery","context","hasInlineCreation","hasSearch","length","visibleChildren","selectOptions","map","child","isGroup","Array","isArray","subChild","flatMap","c","queryTimeoutRef","typeahead","debounce","current","matchedValueIndex","findIndex","filterOption","setValueIfMatched","query","handleKeyDown","event","preventDefault","isElementInsideTable3OrReport","currentTarget","isAriaDirectionKey","ctrlKey","metaKey","test","_listboxRef$current","dispatchEvent","createCustomKeyboardEvent","shouldFocusNextRef","handleListboxKeyDown","handleCloseAutoFocus","_otherProps$onBlur","_getNextFocussableEle","onBlur","call","getNextFocussableElement","focus","areAllSelected","every","option","includes","selectAllText","select2","deselectAll","selectAll","deselectAllResults","selectAllResults","preselectedValues","filter","nextValue","subValue","cn","createCollectionClassName","Select2Context","Provider","PopoverPrimitive","onOpenChange","asChild","Trigger","onKeyDown","align","onCloseAutoFocus","onPointerDownOutside","sideOffset","tabIndex","style","minWidth","width","Search","searchOrCreate","search","Button","appearance","onClick","getFontSize","Spinner","delay","FontSizes","small","medium","large","listbox","role","empty","customSelector","Collection","Create","options","ControlledHiddenField","parentRef","Group","Title","isFormControl","useIsFormControl","bubbleValue","String","BubbleSelect","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4GMA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAkC,SAASF,OAAOA,CAACG,KAAK,EAAEC,GAAG;EACzF,IACcC,YAAY,GAqBtBF,KAAK,CArBLG,QAAQ;IACMC,WAAW,GAoBzBJ,KAAK,CApBLK,YAAY;IAAAC,eAAA,GAoBZN,KAAK,CAnBLO,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAAAE,iBAAA,GAmBhBR,KAAK,CAlBLS,UAAU;IAAVA,UAAU,GAAAD,iBAAA,cAAGE,SAAS,GAAAF,iBAAA;IACtBG,QAAQ,GAiBRX,KAAK,CAjBLW,QAAQ;IAAAC,kBAAA,GAiBRZ,KAAK,CAhBLa,WAAW;IAAXA,WAAW,GAAAD,kBAAA,cAAG,KAAK,GAAAA,kBAAA;IAAAE,cAAA,GAgBnBd,KAAK,CAfLe,OAAO;IAAPA,OAAO,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IACfE,OAAO,GAcPhB,KAAK,CAdLgB,OAAO;IAAAC,eAAA,GAcPjB,KAAK,CAbLkB,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAChBE,IAAI,GAYJnB,KAAK,CAZLmB,IAAI;IACJC,QAAQ,GAWRpB,KAAK,CAXLoB,QAAQ;IACRC,QAAQ,GAURrB,KAAK,CAVLqB,QAAQ;IACRC,QAAQ,GASRtB,KAAK,CATLsB,QAAQ;IACRC,MAAM,GAQNvB,KAAK,CARLuB,MAAM;IACNC,WAAW,GAOXxB,KAAK,CAPLwB,WAAW;IAAAC,eAAA,GAOXzB,KAAK,CANL0B,QAAQ;IAARA,QAAQ,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I,MAAM,CAACD,WAAW,CAAC;MAAE9J,QAAQ,EAAEA,QAAQ;MAAEC,IAAI,EAAEA,IAAI;MAAE+H,QAAQ,EAAE,CAAC,CAAC;MAAEpH,KAAK,EAAEkJ;OACpGvK,UAAU,KAAKC,SAAS,gBAAGZ;MAAQgC,KAAK,EAAErB;MAAc,GAAG,IAAI,EAC/DgK,OAAO,CAACxF,GAAG,CAAC,UAAAwC,MAAM;MAAA,oBACf3H;QAAQyC,GAAG,EAAE0I,MAAM,CAACxD,MAAM,CAAC;QAAE3F,KAAK,EAAEmJ,MAAM,CAACxD,MAAM;QAAK;KACzD,CAAC,CACS;;EAIvB,OAAO,IAAI;AACf,CAAC;AACD5H,OAAO,CAACsL,WAAW,GAAG,SAAS;;;;"}
@@ -1,10 +1,8 @@
1
1
  import React__default from 'react';
2
2
  import { ScrollArea } from '../../ScrollArea/ScrollArea.js';
3
3
 
4
- const Collection = props => {
5
- const {
6
- children
7
- } = props;
4
+ var Collection = function Collection(props) {
5
+ var children = props.children;
8
6
  // max-h-[11.5rem] = is 5.5 options + spacing between them. Option height is 2rem, spacing 0.125. In total it's 11.5.
9
7
  return /*#__PURE__*/React__default.createElement(ScrollArea, {
10
8
  className: "flex max-h-[11.5rem] w-full flex-col gap-y-0.5 px-1.5"
@@ -1 +1 @@
1
- {"version":3,"file":"Collection.js","sources":["../../../../../../../../src/components/Select2/components/Collection.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollArea } from '../../ScrollArea/ScrollArea';\nimport { Select2GroupProps } from './Group';\nimport { Select2OptionProps } from './Option';\n\nexport type Select2CollectionProps = {\n children: Array<React.ReactElement<Select2OptionProps> | React.ReactElement<Select2GroupProps>>;\n};\n\nexport const Collection = (props: Select2CollectionProps) => {\n const { children } = props;\n\n // max-h-[11.5rem] = is 5.5 options + spacing between them. Option height is 2rem, spacing 0.125. In total it's 11.5.\n return <ScrollArea className=\"flex max-h-[11.5rem] w-full flex-col gap-y-0.5 px-1.5\">{children}</ScrollArea>;\n};\n"],"names":["Collection","props","children","React","ScrollArea","className"],"mappings":";;;MASaA,UAAU,GAAIC,KAA6B;EACpD,MAAM;IAAEC;GAAU,GAAGD,KAAK;;EAG1B,oBAAOE,6BAACC,UAAU;IAACC,SAAS,EAAC;KAAyDH,QAAQ,CAAc;AAChH;;;;"}
1
+ {"version":3,"file":"Collection.js","sources":["../../../../../../../../src/components/Select2/components/Collection.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollArea } from '../../ScrollArea/ScrollArea';\nimport { Select2GroupProps } from './Group';\nimport { Select2OptionProps } from './Option';\n\nexport type Select2CollectionProps = {\n children: Array<React.ReactElement<Select2OptionProps> | React.ReactElement<Select2GroupProps>>;\n};\n\nexport const Collection = (props: Select2CollectionProps) => {\n const { children } = props;\n\n // max-h-[11.5rem] = is 5.5 options + spacing between them. Option height is 2rem, spacing 0.125. In total it's 11.5.\n return <ScrollArea className=\"flex max-h-[11.5rem] w-full flex-col gap-y-0.5 px-1.5\">{children}</ScrollArea>;\n};\n"],"names":["Collection","props","children","React","ScrollArea","className"],"mappings":";;;IASaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAA6B;EACpD,IAAQC,QAAQ,GAAKD,KAAK,CAAlBC,QAAQ;;EAGhB,oBAAOC,6BAACC,UAAU;IAACC,SAAS,EAAC;KAAyDH,QAAQ,CAAc;AAChH;;;;"}
@@ -1,7 +1,9 @@
1
1
  import React__default from 'react';
2
2
 
3
- const Select2Context = /*#__PURE__*/React__default.createContext({});
4
- const useSelect2Context = () => React__default.useContext(Select2Context);
3
+ var Select2Context = /*#__PURE__*/React__default.createContext({});
4
+ var useSelect2Context = function useSelect2Context() {
5
+ return React__default.useContext(Select2Context);
6
+ };
5
7
 
6
8
  export { Select2Context, useSelect2Context };
7
9
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../../../../../src/components/Select2/components/Context.tsx"],"sourcesContent":["import React from 'react';\nimport { CollectionRef } from '../../../primitives/Collection/Collection';\nimport {\n Select2CreateHandler,\n Select2DeleteHandler,\n Select2EditHandler,\n Select2OptionValue,\n Select2Value,\n Select2CreateDialogRenderer,\n} from '../types';\nimport { FontSize } from '../../../types';\n\nexport type Select2ContextProps = {\n createDialog?: Select2CreateDialogRenderer;\n createTriggerText?: string;\n disabled: boolean;\n highlighted: boolean;\n invalid: boolean;\n listboxRef: React.RefObject<CollectionRef>;\n multiple: boolean;\n onCreate?: Select2CreateHandler;\n onDelete?: Select2DeleteHandler;\n onEdit?: Select2EditHandler;\n open: boolean;\n readOnly: boolean;\n ref: React.RefObject<HTMLButtonElement>;\n searchQuery: string;\n searchRef?: React.RefObject<HTMLInputElement>;\n setOpen: (open: boolean) => void;\n setSearchQuery: (value: string) => void;\n setValidationError: (error: Error | undefined) => void;\n setValue: (value: Select2OptionValue) => void;\n shouldPauseHoverState: boolean;\n setShouldPauseHoverState: (pause: boolean) => void;\n tags?: boolean;\n validationError?: Error;\n value?: Select2Value;\n fontSize?: FontSize;\n};\n\nexport const Select2Context = React.createContext({} as Select2ContextProps);\nexport const useSelect2Context = () => React.useContext(Select2Context);\n"],"names":["Select2Context","React","createContext","useSelect2Context","useContext"],"mappings":";;MAwCaA,cAAc,gBAAGC,cAAK,CAACC,aAAa,CAAC,EAAyB;MAC9DC,iBAAiB,GAAGA,MAAMF,cAAK,CAACG,UAAU,CAACJ,cAAc;;;;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../../../../../src/components/Select2/components/Context.tsx"],"sourcesContent":["import React from 'react';\nimport { CollectionRef } from '../../../primitives/Collection/Collection';\nimport {\n Select2CreateHandler,\n Select2DeleteHandler,\n Select2EditHandler,\n Select2OptionValue,\n Select2Value,\n Select2CreateDialogRenderer,\n} from '../types';\nimport { FontSize } from '../../../types';\n\nexport type Select2ContextProps = {\n createDialog?: Select2CreateDialogRenderer;\n createTriggerText?: string;\n disabled: boolean;\n highlighted: boolean;\n invalid: boolean;\n listboxRef: React.RefObject<CollectionRef>;\n multiple: boolean;\n onCreate?: Select2CreateHandler;\n onDelete?: Select2DeleteHandler;\n onEdit?: Select2EditHandler;\n open: boolean;\n readOnly: boolean;\n ref: React.RefObject<HTMLButtonElement>;\n searchQuery: string;\n searchRef?: React.RefObject<HTMLInputElement>;\n setOpen: (open: boolean) => void;\n setSearchQuery: (value: string) => void;\n setValidationError: (error: Error | undefined) => void;\n setValue: (value: Select2OptionValue) => void;\n shouldPauseHoverState: boolean;\n setShouldPauseHoverState: (pause: boolean) => void;\n tags?: boolean;\n validationError?: Error;\n value?: Select2Value;\n fontSize?: FontSize;\n};\n\nexport const Select2Context = React.createContext({} as Select2ContextProps);\nexport const useSelect2Context = () => React.useContext(Select2Context);\n"],"names":["Select2Context","React","createContext","useSelect2Context","useContext"],"mappings":";;IAwCaA,cAAc,gBAAGC,cAAK,CAACC,aAAa,CAAC,EAAyB;IAC9DC,iBAAiB,GAAG,SAApBA,iBAAiBA;EAAA,OAASF,cAAK,CAACG,UAAU,CAACJ,cAAc,CAAC;AAAA;;;;"}