@economic/taco 13.0.0 → 14.0.0-tanstack-virtual-update.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/dist/charts/components/Area/AreaChart.cjs.map +1 -1
  2. package/dist/charts/components/Area/AreaChart.js.map +1 -1
  3. package/dist/charts/components/Bar/BarChart.cjs.map +1 -1
  4. package/dist/charts/components/Bar/BarChart.js.map +1 -1
  5. package/dist/charts/components/Composed/BarLineChart.cjs.map +1 -1
  6. package/dist/charts/components/Composed/BarLineChart.js.map +1 -1
  7. package/dist/charts/components/Donut/DonutChart.cjs +1 -1
  8. package/dist/charts/components/Donut/DonutChart.cjs.map +1 -1
  9. package/dist/charts/components/Donut/DonutChart.js +1 -1
  10. package/dist/charts/components/Donut/DonutChart.js.map +1 -1
  11. package/dist/charts/components/LegacyDonut/ActiveShape.cjs.map +1 -1
  12. package/dist/charts/components/LegacyDonut/ActiveShape.js.map +1 -1
  13. package/dist/charts/components/LegacyDonut/LegacyDonutChart.cjs.map +1 -1
  14. package/dist/charts/components/LegacyDonut/LegacyDonutChart.js.map +1 -1
  15. package/dist/charts/components/LegacyDonut/Legend.cjs.map +1 -1
  16. package/dist/charts/components/LegacyDonut/Legend.js.map +1 -1
  17. package/dist/charts/components/Legend.cjs +3 -3
  18. package/dist/charts/components/Legend.cjs.map +1 -1
  19. package/dist/charts/components/Legend.js +3 -3
  20. package/dist/charts/components/Legend.js.map +1 -1
  21. package/dist/charts/components/Line/LineChart.cjs.map +1 -1
  22. package/dist/charts/components/Line/LineChart.js.map +1 -1
  23. package/dist/charts/components/Pie/PieChart.cjs.map +1 -1
  24. package/dist/charts/components/Pie/PieChart.js.map +1 -1
  25. package/dist/charts/components/useChartData.cjs +1 -1
  26. package/dist/charts/components/useChartData.cjs.map +1 -1
  27. package/dist/charts/components/useChartData.js +1 -1
  28. package/dist/charts/components/useChartData.js.map +1 -1
  29. package/dist/charts/utils/color.cjs.map +1 -1
  30. package/dist/charts/utils/color.js.map +1 -1
  31. package/dist/charts/utils/common.cjs.map +1 -1
  32. package/dist/charts/utils/common.d.ts +1 -1
  33. package/dist/charts/utils/common.js.map +1 -1
  34. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  35. package/dist/components/Accordion/Accordion.js.map +1 -1
  36. package/dist/components/Actions/Button/Button.cjs +2 -2
  37. package/dist/components/Actions/Button/Button.cjs.map +1 -1
  38. package/dist/components/Actions/Button/Button.d.ts +2 -2
  39. package/dist/components/Actions/Button/Button.js +2 -2
  40. package/dist/components/Actions/Button/Button.js.map +1 -1
  41. package/dist/components/Actions/Link/Link.cjs.map +1 -1
  42. package/dist/components/Actions/Link/Link.js.map +1 -1
  43. package/dist/components/Actions/LinkButton/LinkButton.cjs +1 -1
  44. package/dist/components/Actions/LinkButton/LinkButton.cjs.map +1 -1
  45. package/dist/components/Actions/LinkButton/LinkButton.d.ts +2 -2
  46. package/dist/components/Actions/LinkButton/LinkButton.js +1 -1
  47. package/dist/components/Actions/LinkButton/LinkButton.js.map +1 -1
  48. package/dist/components/Alert/Alert.cjs.map +1 -1
  49. package/dist/components/Alert/Alert.js.map +1 -1
  50. package/dist/components/AlertDialog/components/Content.cjs +2 -2
  51. package/dist/components/AlertDialog/components/Content.cjs.map +1 -1
  52. package/dist/components/AlertDialog/components/Content.js +2 -2
  53. package/dist/components/AlertDialog/components/Content.js.map +1 -1
  54. package/dist/components/AlertDialog/components/Trigger.cjs.map +1 -1
  55. package/dist/components/AlertDialog/components/Trigger.js.map +1 -1
  56. package/dist/components/Backdrop/Backdrop.cjs.map +1 -1
  57. package/dist/components/Backdrop/Backdrop.js.map +1 -1
  58. package/dist/components/Badge/Badge.cjs +1 -1
  59. package/dist/components/Badge/Badge.cjs.map +1 -1
  60. package/dist/components/Badge/Badge.js +1 -1
  61. package/dist/components/Badge/Badge.js.map +1 -1
  62. package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
  63. package/dist/components/BadgeIcon/BadgeIcon.d.ts +1 -1
  64. package/dist/components/BadgeIcon/BadgeIcon.js.map +1 -1
  65. package/dist/components/Banner/Banner.cjs +2 -2
  66. package/dist/components/Banner/Banner.cjs.map +1 -1
  67. package/dist/components/Banner/Banner.js +2 -2
  68. package/dist/components/Banner/Banner.js.map +1 -1
  69. package/dist/components/Banner/util.cjs.map +1 -1
  70. package/dist/components/Banner/util.js.map +1 -1
  71. package/dist/components/Calendar/Calendar.cjs +2 -2
  72. package/dist/components/Calendar/Calendar.cjs.map +1 -1
  73. package/dist/components/Calendar/Calendar.js +2 -2
  74. package/dist/components/Calendar/Calendar.js.map +1 -1
  75. package/dist/components/Card/Card.cjs +2 -2
  76. package/dist/components/Card/Card.cjs.map +1 -1
  77. package/dist/components/Card/Card.d.ts +1 -1
  78. package/dist/components/Card/Card.js +2 -2
  79. package/dist/components/Card/Card.js.map +1 -1
  80. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  81. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  82. package/dist/components/Combobox/Combobox.cjs +4 -4
  83. package/dist/components/Combobox/Combobox.cjs.map +1 -1
  84. package/dist/components/Combobox/Combobox.d.ts +1 -2
  85. package/dist/components/Combobox/Combobox.js +4 -4
  86. package/dist/components/Combobox/Combobox.js.map +1 -1
  87. package/dist/components/Combobox/useCombobox.cjs +3 -3
  88. package/dist/components/Combobox/useCombobox.cjs.map +1 -1
  89. package/dist/components/Combobox/useCombobox.d.ts +1 -1
  90. package/dist/components/Combobox/useCombobox.js +3 -3
  91. package/dist/components/Combobox/useCombobox.js.map +1 -1
  92. package/dist/components/Datepicker/Datepicker.cjs +3 -3
  93. package/dist/components/Datepicker/Datepicker.cjs.map +1 -1
  94. package/dist/components/Datepicker/Datepicker.d.ts +1 -2
  95. package/dist/components/Datepicker/Datepicker.js +3 -3
  96. package/dist/components/Datepicker/Datepicker.js.map +1 -1
  97. package/dist/components/Datepicker/useDatepicker.cjs.map +1 -1
  98. package/dist/components/Datepicker/useDatepicker.d.ts +1 -2
  99. package/dist/components/Datepicker/useDatepicker.js.map +1 -1
  100. package/dist/components/Dialog/components/Content.cjs +3 -3
  101. package/dist/components/Dialog/components/Content.cjs.map +1 -1
  102. package/dist/components/Dialog/components/Content.js +3 -3
  103. package/dist/components/Dialog/components/Content.js.map +1 -1
  104. package/dist/components/Dialog/components/Trigger.cjs.map +1 -1
  105. package/dist/components/Dialog/components/Trigger.js.map +1 -1
  106. package/dist/components/Drawer/Drawer.cjs.map +1 -1
  107. package/dist/components/Drawer/Drawer.d.ts +1 -1
  108. package/dist/components/Drawer/Drawer.js.map +1 -1
  109. package/dist/components/Drawer/components/Content.cjs +3 -3
  110. package/dist/components/Drawer/components/Content.cjs.map +1 -1
  111. package/dist/components/Drawer/components/Content.js +3 -3
  112. package/dist/components/Drawer/components/Content.js.map +1 -1
  113. package/dist/components/Field/Field.cjs +1 -1
  114. package/dist/components/Field/Field.cjs.map +1 -1
  115. package/dist/components/Field/Field.js +1 -1
  116. package/dist/components/Field/Field.js.map +1 -1
  117. package/dist/components/Form/Form.cjs.map +1 -1
  118. package/dist/components/Form/Form.d.ts +1 -1
  119. package/dist/components/Form/Form.js.map +1 -1
  120. package/dist/components/Group/Group.cjs.map +1 -1
  121. package/dist/components/Group/Group.d.ts +2 -1
  122. package/dist/components/Group/Group.js.map +1 -1
  123. package/dist/components/Hanger/Hanger.cjs +2 -2
  124. package/dist/components/Hanger/Hanger.cjs.map +1 -1
  125. package/dist/components/Hanger/Hanger.d.ts +1 -1
  126. package/dist/components/Hanger/Hanger.js +2 -2
  127. package/dist/components/Hanger/Hanger.js.map +1 -1
  128. package/dist/components/Header/components/Agreement/Badge.cjs.map +1 -1
  129. package/dist/components/Header/components/Agreement/Badge.js.map +1 -1
  130. package/dist/components/Header/components/Agreement/Display.cjs.map +1 -1
  131. package/dist/components/Header/components/Agreement/Display.js.map +1 -1
  132. package/dist/components/Header/components/Agreement/Item.cjs +1 -1
  133. package/dist/components/Header/components/Agreement/Item.cjs.map +1 -1
  134. package/dist/components/Header/components/Agreement/Item.js +1 -1
  135. package/dist/components/Header/components/Agreement/Item.js.map +1 -1
  136. package/dist/components/Header/components/AgreementSelector.cjs +3 -3
  137. package/dist/components/Header/components/AgreementSelector.cjs.map +1 -1
  138. package/dist/components/Header/components/AgreementSelector.js +3 -3
  139. package/dist/components/Header/components/AgreementSelector.js.map +1 -1
  140. package/dist/components/Header/components/Button.cjs.map +1 -1
  141. package/dist/components/Header/components/Button.d.ts +1 -1
  142. package/dist/components/Header/components/Button.js.map +1 -1
  143. package/dist/components/Header/components/Link.cjs +2 -2
  144. package/dist/components/Header/components/Link.cjs.map +1 -1
  145. package/dist/components/Header/components/Link.d.ts +1 -1
  146. package/dist/components/Header/components/Link.js +2 -2
  147. package/dist/components/Header/components/Link.js.map +1 -1
  148. package/dist/components/Header/components/MenuButton.cjs +1 -1
  149. package/dist/components/Header/components/MenuButton.cjs.map +1 -1
  150. package/dist/components/Header/components/MenuButton.js +1 -1
  151. package/dist/components/Header/components/MenuButton.js.map +1 -1
  152. package/dist/components/Header/components/PrimaryNavigation.cjs +3 -3
  153. package/dist/components/Header/components/PrimaryNavigation.cjs.map +1 -1
  154. package/dist/components/Header/components/PrimaryNavigation.js +3 -3
  155. package/dist/components/Header/components/PrimaryNavigation.js.map +1 -1
  156. package/dist/components/HoverCard/HoverCard.cjs.map +1 -1
  157. package/dist/components/HoverCard/HoverCard.d.ts +1 -1
  158. package/dist/components/HoverCard/HoverCard.js.map +1 -1
  159. package/dist/components/Inline/Inline.cjs +2 -6
  160. package/dist/components/Inline/Inline.cjs.map +1 -1
  161. package/dist/components/Inline/Inline.d.ts +1 -1
  162. package/dist/components/Inline/Inline.js +2 -6
  163. package/dist/components/Inline/Inline.js.map +1 -1
  164. package/dist/components/Input/Input.cjs +1 -1
  165. package/dist/components/Input/Input.cjs.map +1 -1
  166. package/dist/components/Input/Input.d.ts +1 -1
  167. package/dist/components/Input/Input.js +1 -1
  168. package/dist/components/Input/Input.js.map +1 -1
  169. package/dist/components/Layout/components/Sidebar.cjs.map +1 -1
  170. package/dist/components/Layout/components/Sidebar.js.map +1 -1
  171. package/dist/components/LegacyComponents/Button/Button.cjs +1 -1
  172. package/dist/components/LegacyComponents/Button/Button.cjs.map +1 -1
  173. package/dist/components/LegacyComponents/Button/Button.d.ts +3 -7
  174. package/dist/components/LegacyComponents/Button/Button.js +1 -1
  175. package/dist/components/LegacyComponents/Button/Button.js.map +1 -1
  176. package/dist/components/LegacyComponents/Button/util.cjs.map +1 -1
  177. package/dist/components/LegacyComponents/Button/util.js.map +1 -1
  178. package/dist/components/LegacyComponents/IconButton/IconButton.cjs +1 -1
  179. package/dist/components/LegacyComponents/IconButton/IconButton.cjs.map +1 -1
  180. package/dist/components/LegacyComponents/IconButton/IconButton.d.ts +4 -8
  181. package/dist/components/LegacyComponents/IconButton/IconButton.js +1 -1
  182. package/dist/components/LegacyComponents/IconButton/IconButton.js.map +1 -1
  183. package/dist/components/List/components/Collapsible.cjs +1 -1
  184. package/dist/components/List/components/Collapsible.cjs.map +1 -1
  185. package/dist/components/List/components/Collapsible.js +1 -1
  186. package/dist/components/List/components/Collapsible.js.map +1 -1
  187. package/dist/components/List/components/Item.cjs.map +1 -1
  188. package/dist/components/List/components/Item.d.ts +1 -1
  189. package/dist/components/List/components/Item.js.map +1 -1
  190. package/dist/components/List/components/Link.cjs +1 -1
  191. package/dist/components/List/components/Link.cjs.map +1 -1
  192. package/dist/components/List/components/Link.js +1 -1
  193. package/dist/components/List/components/Link.js.map +1 -1
  194. package/dist/components/List/components/Toggle.cjs +2 -2
  195. package/dist/components/List/components/Toggle.cjs.map +1 -1
  196. package/dist/components/List/components/Toggle.d.ts +1 -2
  197. package/dist/components/List/components/Toggle.js +2 -2
  198. package/dist/components/List/components/Toggle.js.map +1 -1
  199. package/dist/components/Listbox/Listbox.d.ts +2 -2
  200. package/dist/components/Listbox/ScrollableList.cjs +3 -3
  201. package/dist/components/Listbox/ScrollableList.cjs.map +1 -1
  202. package/dist/components/Listbox/ScrollableList.d.ts +1 -1
  203. package/dist/components/Listbox/ScrollableList.js +3 -3
  204. package/dist/components/Listbox/ScrollableList.js.map +1 -1
  205. package/dist/components/Listbox/useListbox.cjs.map +1 -1
  206. package/dist/components/Listbox/useListbox.js.map +1 -1
  207. package/dist/components/Listbox/useMultiListbox.cjs +1 -1
  208. package/dist/components/Listbox/useMultiListbox.cjs.map +1 -1
  209. package/dist/components/Listbox/useMultiListbox.js +1 -1
  210. package/dist/components/Listbox/useMultiListbox.js.map +1 -1
  211. package/dist/components/Listbox/useTypeahead.cjs.map +1 -1
  212. package/dist/components/Listbox/useTypeahead.js.map +1 -1
  213. package/dist/components/Listbox/util.cjs.map +1 -1
  214. package/dist/components/Listbox/util.js.map +1 -1
  215. package/dist/components/Menu/Menu.cjs.map +1 -1
  216. package/dist/components/Menu/Menu.js.map +1 -1
  217. package/dist/components/Menu/components/Checkbox.cjs +1 -1
  218. package/dist/components/Menu/components/Checkbox.cjs.map +1 -1
  219. package/dist/components/Menu/components/Checkbox.js +1 -1
  220. package/dist/components/Menu/components/Checkbox.js.map +1 -1
  221. package/dist/components/Menu/components/Content.cjs.map +1 -1
  222. package/dist/components/Menu/components/Content.js.map +1 -1
  223. package/dist/components/Menu/components/Item.cjs +1 -1
  224. package/dist/components/Menu/components/Item.cjs.map +1 -1
  225. package/dist/components/Menu/components/Item.d.ts +1 -2
  226. package/dist/components/Menu/components/Item.js +1 -1
  227. package/dist/components/Menu/components/Item.js.map +1 -1
  228. package/dist/components/Menu/components/Link.cjs.map +1 -1
  229. package/dist/components/Menu/components/Link.d.ts +1 -1
  230. package/dist/components/Menu/components/Link.js.map +1 -1
  231. package/dist/components/Menu/components/RadioGroup.cjs.map +1 -1
  232. package/dist/components/Menu/components/RadioGroup.d.ts +1 -1
  233. package/dist/components/Menu/components/RadioGroup.js.map +1 -1
  234. package/dist/components/Menu/components/SubMenu.cjs.map +1 -1
  235. package/dist/components/Menu/components/SubMenu.js.map +1 -1
  236. package/dist/components/Menu/components/Trigger.cjs.map +1 -1
  237. package/dist/components/Menu/components/Trigger.js.map +1 -1
  238. package/dist/components/Navigation2/components/Group.cjs.map +1 -1
  239. package/dist/components/Navigation2/components/Group.js.map +1 -1
  240. package/dist/components/Navigation2/components/Link.cjs +2 -2
  241. package/dist/components/Navigation2/components/Link.cjs.map +1 -1
  242. package/dist/components/Navigation2/components/Link.d.ts +1 -2
  243. package/dist/components/Navigation2/components/Link.js +2 -2
  244. package/dist/components/Navigation2/components/Link.js.map +1 -1
  245. package/dist/components/OverflowGroup/OverflowGroup.cjs +1 -1
  246. package/dist/components/OverflowGroup/OverflowGroup.cjs.map +1 -1
  247. package/dist/components/OverflowGroup/OverflowGroup.d.ts +1 -1
  248. package/dist/components/OverflowGroup/OverflowGroup.js +1 -1
  249. package/dist/components/OverflowGroup/OverflowGroup.js.map +1 -1
  250. package/dist/components/Pagination/PageNumbers.cjs +1 -1
  251. package/dist/components/Pagination/PageNumbers.cjs.map +1 -1
  252. package/dist/components/Pagination/PageNumbers.js +1 -1
  253. package/dist/components/Pagination/PageNumbers.js.map +1 -1
  254. package/dist/components/Pagination/Pagination.cjs +4 -4
  255. package/dist/components/Pagination/Pagination.cjs.map +1 -1
  256. package/dist/components/Pagination/Pagination.js +4 -4
  257. package/dist/components/Pagination/Pagination.js.map +1 -1
  258. package/dist/components/Popover/Popover.cjs.map +1 -1
  259. package/dist/components/Popover/Popover.d.ts +1 -1
  260. package/dist/components/Popover/Popover.js.map +1 -1
  261. package/dist/components/Provider/Localization.cjs.map +1 -1
  262. package/dist/components/Provider/Localization.d.ts +1 -1
  263. package/dist/components/Provider/Localization.js.map +1 -1
  264. package/dist/components/Provider/Provider.cjs +1 -1
  265. package/dist/components/Provider/Provider.cjs.map +1 -1
  266. package/dist/components/Provider/Provider.js +1 -1
  267. package/dist/components/Provider/Provider.js.map +1 -1
  268. package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
  269. package/dist/components/RadioGroup/RadioGroup.cjs.map +1 -1
  270. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  271. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  272. package/dist/components/Report/Report.cjs.map +1 -1
  273. package/dist/components/Report/Report.js.map +1 -1
  274. package/dist/components/Report/useReport.cjs.map +1 -1
  275. package/dist/components/Report/useReport.js.map +1 -1
  276. package/dist/components/SearchInput/SearchInput.cjs +1 -1
  277. package/dist/components/SearchInput/SearchInput.cjs.map +1 -1
  278. package/dist/components/SearchInput/SearchInput.d.ts +5 -5
  279. package/dist/components/SearchInput/SearchInput.js +1 -1
  280. package/dist/components/SearchInput/SearchInput.js.map +1 -1
  281. package/dist/components/SearchInput2/SearchInput2.cjs +3 -3
  282. package/dist/components/SearchInput2/SearchInput2.cjs.map +1 -1
  283. package/dist/components/SearchInput2/SearchInput2.js +3 -3
  284. package/dist/components/SearchInput2/SearchInput2.js.map +1 -1
  285. package/dist/components/Select/Select.cjs +4 -4
  286. package/dist/components/Select/Select.cjs.map +1 -1
  287. package/dist/components/Select/Select.d.ts +5 -5
  288. package/dist/components/Select/Select.js +4 -4
  289. package/dist/components/Select/Select.js.map +1 -1
  290. package/dist/components/Select/useSelect.cjs +1 -1
  291. package/dist/components/Select/useSelect.cjs.map +1 -1
  292. package/dist/components/Select/useSelect.js +1 -1
  293. package/dist/components/Select/useSelect.js.map +1 -1
  294. package/dist/components/Select2/Select2.cjs +4 -4
  295. package/dist/components/Select2/Select2.cjs.map +1 -1
  296. package/dist/components/Select2/Select2.d.ts +2 -2
  297. package/dist/components/Select2/Select2.js +4 -4
  298. package/dist/components/Select2/Select2.js.map +1 -1
  299. package/dist/components/Select2/components/Collection.cjs.map +1 -1
  300. package/dist/components/Select2/components/Collection.js.map +1 -1
  301. package/dist/components/Select2/components/Context.cjs.map +1 -1
  302. package/dist/components/Select2/components/Context.js.map +1 -1
  303. package/dist/components/Select2/components/Create.cjs +4 -4
  304. package/dist/components/Select2/components/Create.cjs.map +1 -1
  305. package/dist/components/Select2/components/Create.js +4 -4
  306. package/dist/components/Select2/components/Create.js.map +1 -1
  307. package/dist/components/Select2/components/Edit.cjs +5 -5
  308. package/dist/components/Select2/components/Edit.cjs.map +1 -1
  309. package/dist/components/Select2/components/Edit.d.ts +1 -1
  310. package/dist/components/Select2/components/Edit.js +5 -5
  311. package/dist/components/Select2/components/Edit.js.map +1 -1
  312. package/dist/components/Select2/components/Group.cjs +1 -1
  313. package/dist/components/Select2/components/Group.cjs.map +1 -1
  314. package/dist/components/Select2/components/Group.js +1 -1
  315. package/dist/components/Select2/components/Group.js.map +1 -1
  316. package/dist/components/Select2/components/Option.cjs +4 -4
  317. package/dist/components/Select2/components/Option.cjs.map +1 -1
  318. package/dist/components/Select2/components/Option.d.ts +1 -1
  319. package/dist/components/Select2/components/Option.js +4 -4
  320. package/dist/components/Select2/components/Option.js.map +1 -1
  321. package/dist/components/Select2/components/Search.cjs +1 -1
  322. package/dist/components/Select2/components/Search.cjs.map +1 -1
  323. package/dist/components/Select2/components/Search.js +1 -1
  324. package/dist/components/Select2/components/Search.js.map +1 -1
  325. package/dist/components/Select2/components/Title.cjs.map +1 -1
  326. package/dist/components/Select2/components/Title.js.map +1 -1
  327. package/dist/components/Select2/components/Trigger.cjs +6 -6
  328. package/dist/components/Select2/components/Trigger.cjs.map +1 -1
  329. package/dist/components/Select2/components/Trigger.d.ts +1 -1
  330. package/dist/components/Select2/components/Trigger.js +6 -6
  331. package/dist/components/Select2/components/Trigger.js.map +1 -1
  332. package/dist/components/Select2/types.d.ts +1 -1
  333. package/dist/components/Select2/utilities.cjs.map +1 -1
  334. package/dist/components/Select2/utilities.js.map +1 -1
  335. package/dist/components/Shortcut/Shortcut.cjs.map +1 -1
  336. package/dist/components/Shortcut/Shortcut.js.map +1 -1
  337. package/dist/components/Stack/Stack.cjs +2 -6
  338. package/dist/components/Stack/Stack.cjs.map +1 -1
  339. package/dist/components/Stack/Stack.d.ts +1 -1
  340. package/dist/components/Stack/Stack.js +2 -6
  341. package/dist/components/Stack/Stack.js.map +1 -1
  342. package/dist/components/Switch/Switch.cjs.map +1 -1
  343. package/dist/components/Switch/Switch.js.map +1 -1
  344. package/dist/components/Table3/Table3.cjs +1 -3
  345. package/dist/components/Table3/Table3.cjs.map +1 -1
  346. package/dist/components/Table3/Table3.d.ts +1 -4
  347. package/dist/components/Table3/Table3.js +1 -3
  348. package/dist/components/Table3/Table3.js.map +1 -1
  349. package/dist/components/Table3/components/Columns/Cell/Cell.cjs.map +1 -1
  350. package/dist/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  351. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.cjs +1 -1
  352. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.cjs.map +1 -1
  353. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +1 -1
  354. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  355. package/dist/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.cjs.map +1 -1
  356. package/dist/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  357. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.cjs +6 -6
  358. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.cjs.map +1 -1
  359. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.js +6 -6
  360. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  361. package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.cjs.map +1 -1
  362. package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  363. package/dist/components/Table3/components/Columns/Cell/util.cjs.map +1 -1
  364. package/dist/components/Table3/components/Columns/Cell/util.js.map +1 -1
  365. package/dist/components/Table3/components/Editing/Alert.cjs +3 -3
  366. package/dist/components/Table3/components/Editing/Alert.cjs.map +1 -1
  367. package/dist/components/Table3/components/Editing/Alert.d.ts +1 -1
  368. package/dist/components/Table3/components/Editing/Alert.js +3 -3
  369. package/dist/components/Table3/components/Editing/Alert.js.map +1 -1
  370. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.cjs +3 -3
  371. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.cjs.map +1 -1
  372. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.d.ts +1 -1
  373. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +3 -3
  374. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  375. package/dist/components/Table3/components/Row/Editing/CreateNewRow.cjs +2 -2
  376. package/dist/components/Table3/components/Row/Editing/CreateNewRow.cjs.map +1 -1
  377. package/dist/components/Table3/components/Row/Editing/CreateNewRow.js +2 -2
  378. package/dist/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  379. package/dist/components/Table3/components/Row/Editing/SaveStatus.cjs +2 -2
  380. package/dist/components/Table3/components/Row/Editing/SaveStatus.cjs.map +1 -1
  381. package/dist/components/Table3/components/Row/Editing/SaveStatus.js +2 -2
  382. package/dist/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  383. package/dist/components/Table3/components/Row/Editing/TemporaryRow.cjs.map +1 -1
  384. package/dist/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  385. package/dist/components/Table3/components/Row/Row.cjs.map +1 -1
  386. package/dist/components/Table3/components/Row/Row.js.map +1 -1
  387. package/dist/components/Table3/components/Toolbar/Editing/Editing.cjs +2 -2
  388. package/dist/components/Table3/components/Toolbar/Editing/Editing.cjs.map +1 -1
  389. package/dist/components/Table3/components/Toolbar/Editing/Editing.js +2 -2
  390. package/dist/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  391. package/dist/components/Table3/features/useEditingState.cjs +1 -1
  392. package/dist/components/Table3/features/useEditingState.cjs.map +1 -1
  393. package/dist/components/Table3/features/useEditingState.js +1 -1
  394. package/dist/components/Table3/features/useEditingState.js.map +1 -1
  395. package/dist/components/Table3/features/useTableEditing.cjs +1 -1
  396. package/dist/components/Table3/features/useTableEditing.cjs.map +1 -1
  397. package/dist/components/Table3/features/useTableEditing.js +1 -1
  398. package/dist/components/Table3/features/useTableEditing.js.map +1 -1
  399. package/dist/components/Table3/listeners/useTableEditingListener.cjs +1 -1
  400. package/dist/components/Table3/listeners/useTableEditingListener.cjs.map +1 -1
  401. package/dist/components/Table3/listeners/useTableEditingListener.js +1 -1
  402. package/dist/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  403. package/dist/components/Table3/useTable3.cjs +2 -2
  404. package/dist/components/Table3/useTable3.cjs.map +1 -1
  405. package/dist/components/Table3/useTable3.js +2 -2
  406. package/dist/components/Table3/useTable3.js.map +1 -1
  407. package/dist/components/Table3/util/editing.cjs.map +1 -1
  408. package/dist/components/Table3/util/editing.d.ts +2 -2
  409. package/dist/components/Table3/util/editing.js.map +1 -1
  410. package/dist/components/Tabs/Context.cjs.map +1 -1
  411. package/dist/components/Tabs/Context.js.map +1 -1
  412. package/dist/components/Tabs/Tabs.cjs.map +1 -1
  413. package/dist/components/Tabs/Tabs.js.map +1 -1
  414. package/dist/components/Tabs/components/TabList.cjs +2 -2
  415. package/dist/components/Tabs/components/TabList.cjs.map +1 -1
  416. package/dist/components/Tabs/components/TabList.js +2 -2
  417. package/dist/components/Tabs/components/TabList.js.map +1 -1
  418. package/dist/components/Tabs/components/Trigger.cjs +3 -3
  419. package/dist/components/Tabs/components/Trigger.cjs.map +1 -1
  420. package/dist/components/Tabs/components/Trigger.js +3 -3
  421. package/dist/components/Tabs/components/Trigger.js.map +1 -1
  422. package/dist/components/Tag/Tag.cjs.map +1 -1
  423. package/dist/components/Tag/Tag.d.ts +1 -1
  424. package/dist/components/Tag/Tag.js.map +1 -1
  425. package/dist/components/Textarea/Textarea.cjs +1 -1
  426. package/dist/components/Textarea/Textarea.cjs.map +1 -1
  427. package/dist/components/Textarea/Textarea.js +1 -1
  428. package/dist/components/Textarea/Textarea.js.map +1 -1
  429. package/dist/components/Toast/Toast.cjs +2 -2
  430. package/dist/components/Toast/Toast.cjs.map +1 -1
  431. package/dist/components/Toast/Toast.js +2 -2
  432. package/dist/components/Toast/Toast.js.map +1 -1
  433. package/dist/components/Toast/util.cjs +1 -1
  434. package/dist/components/Toast/util.cjs.map +1 -1
  435. package/dist/components/Toast/util.js +1 -1
  436. package/dist/components/Toast/util.js.map +1 -1
  437. package/dist/components/Tour/Tour.cjs +2 -2
  438. package/dist/components/Tour/Tour.cjs.map +1 -1
  439. package/dist/components/Tour/Tour.js +2 -2
  440. package/dist/components/Tour/Tour.js.map +1 -1
  441. package/dist/components/Truncate/Truncate.cjs.map +1 -1
  442. package/dist/components/Truncate/Truncate.js.map +1 -1
  443. package/dist/components/Typography/Heading.cjs.map +1 -1
  444. package/dist/components/Typography/Heading.d.ts +1 -1
  445. package/dist/components/Typography/Heading.js.map +1 -1
  446. package/dist/components/Typography/Text.cjs.map +1 -1
  447. package/dist/components/Typography/Text.d.ts +1 -1
  448. package/dist/components/Typography/Text.js.map +1 -1
  449. package/dist/components/index.d.ts +0 -1
  450. package/dist/hooks/useBoundaryOverflowDetection.cjs.map +1 -1
  451. package/dist/hooks/useBoundaryOverflowDetection.js.map +1 -1
  452. package/dist/hooks/useBoundingClientRectListener.cjs.map +1 -1
  453. package/dist/hooks/useBoundingClientRectListener.js.map +1 -1
  454. package/dist/hooks/useGlobalKeyDown.cjs.map +1 -1
  455. package/dist/hooks/useGlobalKeyDown.js.map +1 -1
  456. package/dist/hooks/useTacoSettings.cjs.map +1 -1
  457. package/dist/hooks/useTacoSettings.d.ts +1 -1
  458. package/dist/hooks/useTacoSettings.js.map +1 -1
  459. package/dist/index.cjs +0 -2
  460. package/dist/index.cjs.map +1 -1
  461. package/dist/index.js +0 -2
  462. package/dist/index.js.map +1 -1
  463. package/dist/primitives/BubbleSelect.cjs.map +1 -1
  464. package/dist/primitives/BubbleSelect.js.map +1 -1
  465. package/dist/primitives/Button.cjs.map +1 -1
  466. package/dist/primitives/Button.js.map +1 -1
  467. package/dist/primitives/Collection/components/Root.cjs.map +1 -1
  468. package/dist/primitives/Collection/components/Root.js.map +1 -1
  469. package/dist/primitives/Listbox2/components/Option.cjs.map +1 -1
  470. package/dist/primitives/Listbox2/components/Option.js.map +1 -1
  471. package/dist/primitives/Listbox2/components/Root.cjs.map +1 -1
  472. package/dist/primitives/Listbox2/components/Root.js.map +1 -1
  473. package/dist/primitives/Listbox2/components/Title.cjs.map +1 -1
  474. package/dist/primitives/Listbox2/components/Title.js.map +1 -1
  475. package/dist/primitives/Table/Core/components/Body/Body.cjs.map +1 -1
  476. package/dist/primitives/Table/Core/components/Body/Body.js.map +1 -1
  477. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.cjs.map +1 -1
  478. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  479. package/dist/primitives/Table/Core/components/Body/util.cjs.map +1 -1
  480. package/dist/primitives/Table/Core/components/Body/util.js.map +1 -1
  481. package/dist/primitives/Table/Core/components/Columns/Cell/util.cjs +1 -1
  482. package/dist/primitives/Table/Core/components/Columns/Cell/util.cjs.map +1 -1
  483. package/dist/primitives/Table/Core/components/Columns/Cell/util.js +1 -1
  484. package/dist/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  485. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.cjs +3 -3
  486. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.cjs.map +1 -1
  487. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.js +3 -3
  488. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  489. package/dist/primitives/Table/Core/components/Columns/Internal/Drag.cjs +2 -2
  490. package/dist/primitives/Table/Core/components/Columns/Internal/Drag.cjs.map +1 -1
  491. package/dist/primitives/Table/Core/components/Columns/Internal/Drag.js +2 -2
  492. package/dist/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  493. package/dist/primitives/Table/Core/components/Columns/Internal/Expansion.cjs +3 -3
  494. package/dist/primitives/Table/Core/components/Columns/Internal/Expansion.cjs.map +1 -1
  495. package/dist/primitives/Table/Core/components/Columns/Internal/Expansion.js +3 -3
  496. package/dist/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  497. package/dist/primitives/Table/Core/components/Columns/Internal/Selection.cjs +4 -4
  498. package/dist/primitives/Table/Core/components/Columns/Internal/Selection.cjs.map +1 -1
  499. package/dist/primitives/Table/Core/components/Columns/Internal/Selection.js +4 -4
  500. package/dist/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  501. package/dist/primitives/Table/Core/components/Footer/Summary.cjs.map +1 -1
  502. package/dist/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  503. package/dist/primitives/Table/Core/components/Header/Header.cjs +1 -1
  504. package/dist/primitives/Table/Core/components/Header/Header.cjs.map +1 -1
  505. package/dist/primitives/Table/Core/components/Header/Header.js +1 -1
  506. package/dist/primitives/Table/Core/components/Header/Header.js.map +1 -1
  507. package/dist/primitives/Table/Core/components/Header/components/Goto.cjs +1 -1
  508. package/dist/primitives/Table/Core/components/Header/components/Goto.cjs.map +1 -1
  509. package/dist/primitives/Table/Core/components/Header/components/Goto.d.ts +1 -1
  510. package/dist/primitives/Table/Core/components/Header/components/Goto.js +1 -1
  511. package/dist/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  512. package/dist/primitives/Table/Core/components/Header/components/Menu.cjs +4 -6
  513. package/dist/primitives/Table/Core/components/Header/components/Menu.cjs.map +1 -1
  514. package/dist/primitives/Table/Core/components/Header/components/Menu.js +4 -6
  515. package/dist/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  516. package/dist/primitives/Table/Core/components/Header/components/Resizer.cjs.map +1 -1
  517. package/dist/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  518. package/dist/primitives/Table/Core/components/Header/components/SortIndicator.cjs.map +1 -1
  519. package/dist/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  520. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.cjs +3 -1
  521. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.cjs.map +1 -1
  522. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +3 -1
  523. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  524. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.cjs +5 -5
  525. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.cjs.map +1 -1
  526. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +5 -5
  527. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  528. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.cjs +4 -4
  529. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.cjs.map +1 -1
  530. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +4 -4
  531. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  532. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.cjs +2 -2
  533. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.cjs.map +1 -1
  534. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +2 -2
  535. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  536. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.cjs +3 -3
  537. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.cjs.map +1 -1
  538. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
  539. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +3 -3
  540. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  541. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.cjs +2 -2
  542. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.cjs.map +1 -1
  543. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.d.ts +1 -1
  544. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +2 -2
  545. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  546. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.cjs +5 -5
  547. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.cjs.map +1 -1
  548. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +5 -5
  549. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  550. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.cjs +4 -4
  551. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.cjs.map +1 -1
  552. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.js +4 -4
  553. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  554. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.cjs +6 -6
  555. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.cjs.map +1 -1
  556. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.d.ts +1 -2
  557. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +6 -6
  558. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  559. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.cjs +2 -2
  560. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.cjs.map +1 -1
  561. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.js +2 -2
  562. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  563. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.cjs +7 -7
  564. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.cjs.map +1 -1
  565. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +1 -1
  566. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +7 -7
  567. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  568. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.cjs +3 -3
  569. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.cjs.map +1 -1
  570. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +3 -3
  571. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  572. package/dist/primitives/Table/Core/features/useTableGlobalShortcuts.cjs.map +1 -1
  573. package/dist/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  574. package/dist/primitives/Table/Core/listeners/useTableRowActiveListener.cjs.map +1 -1
  575. package/dist/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  576. package/dist/primitives/Table/Core/useTable.cjs.map +1 -1
  577. package/dist/primitives/Table/Core/useTable.js.map +1 -1
  578. package/dist/primitives/Table/types.cjs.map +1 -1
  579. package/dist/primitives/Table/types.d.ts +1 -1
  580. package/dist/primitives/Table/types.js.map +1 -1
  581. package/dist/primitives/Table/useTableManager/features/useTableFontSize.cjs.map +1 -1
  582. package/dist/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  583. package/dist/primitives/Table/useTableManager/features/useTablePrinting.cjs.map +1 -1
  584. package/dist/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  585. package/dist/primitives/Table/useTableManager/features/useTableRowActive.cjs.map +1 -1
  586. package/dist/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  587. package/dist/primitives/Table/useTableManager/features/useTableSettings.cjs.map +1 -1
  588. package/dist/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  589. package/dist/primitives/Table/useTableManager/listeners/useTableDataListener.cjs.map +1 -1
  590. package/dist/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  591. package/dist/primitives/Table/useTableManager/listeners/useTableFilterListener.cjs.map +1 -1
  592. package/dist/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  593. package/dist/primitives/Table/useTableManager/listeners/useTableFontSizeListener.cjs.map +1 -1
  594. package/dist/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  595. package/dist/primitives/Table/useTableManager/listeners/useTableRowHeightListener.cjs.map +1 -1
  596. package/dist/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  597. package/dist/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.cjs.map +1 -1
  598. package/dist/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  599. package/dist/primitives/Table/useTableManager/listeners/useTableSearchListener.cjs +1 -1
  600. package/dist/primitives/Table/useTableManager/listeners/useTableSearchListener.cjs.map +1 -1
  601. package/dist/primitives/Table/useTableManager/listeners/useTableSearchListener.js +1 -1
  602. package/dist/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  603. package/dist/primitives/Table/useTableManager/listeners/useTableShortcutsListener.cjs.map +1 -1
  604. package/dist/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  605. package/dist/primitives/Table/useTableManager/listeners/useTableSortingListener.cjs.map +1 -1
  606. package/dist/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  607. package/dist/primitives/Table/useTableManager/useTableManager.cjs +1 -1
  608. package/dist/primitives/Table/useTableManager/useTableManager.cjs.map +1 -1
  609. package/dist/primitives/Table/useTableManager/useTableManager.js +1 -1
  610. package/dist/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  611. package/dist/primitives/Table/useTableManager/util/columns.cjs.map +1 -1
  612. package/dist/primitives/Table/useTableManager/util/columns.d.ts +1 -1
  613. package/dist/primitives/Table/useTableManager/util/columns.js.map +1 -1
  614. package/dist/primitives/Table/useTableManager/util/dataTypes.cjs.map +1 -1
  615. package/dist/primitives/Table/useTableManager/util/dataTypes.d.ts +1 -1
  616. package/dist/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  617. package/dist/primitives/Table/useTableManager/util/filtering.cjs.map +1 -1
  618. package/dist/primitives/Table/useTableManager/util/filtering.d.ts +1 -1
  619. package/dist/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  620. package/dist/primitives/Table/useTableManager/util/search.cjs.map +1 -1
  621. package/dist/primitives/Table/useTableManager/util/search.d.ts +1 -1
  622. package/dist/primitives/Table/useTableManager/util/search.js.map +1 -1
  623. package/dist/primitives/Table/useTableManager/util/setup.cjs +11 -1
  624. package/dist/primitives/Table/useTableManager/util/setup.cjs.map +1 -1
  625. package/dist/primitives/Table/useTableManager/util/setup.d.ts +1 -1
  626. package/dist/primitives/Table/useTableManager/util/setup.js +12 -2
  627. package/dist/primitives/Table/useTableManager/util/setup.js.map +1 -1
  628. package/dist/utils/dom.cjs.map +1 -1
  629. package/dist/utils/dom.js.map +1 -1
  630. package/dist/utils/flattenChildren.cjs +12 -0
  631. package/dist/utils/flattenChildren.cjs.map +1 -0
  632. package/dist/utils/flattenChildren.d.ts +6 -0
  633. package/dist/utils/flattenChildren.js +12 -0
  634. package/dist/utils/flattenChildren.js.map +1 -0
  635. package/dist/utils/hooks/useListKeyboardNavigation.cjs.map +1 -1
  636. package/dist/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  637. package/dist/utils/storyutils.d.ts +1 -1
  638. package/dist/utils/tailwind.cjs.map +1 -1
  639. package/dist/utils/tailwind.js.map +1 -1
  640. package/package.json +6 -5
  641. package/dist/components/Treeview/Treeview.cjs +0 -52
  642. package/dist/components/Treeview/Treeview.cjs.map +0 -1
  643. package/dist/components/Treeview/Treeview.d.ts +0 -25
  644. package/dist/components/Treeview/Treeview.js +0 -52
  645. package/dist/components/Treeview/Treeview.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { useControlled } from '../../hooks/useControlled';\nimport type { GroupProps } from '../Group/Group';\n\nimport type {\n DrawerInnerContentProps,\n DrawerFooterProps,\n DrawerTitleProps,\n DrawerContentProps,\n DrawerCloseProps,\n} from './components/Content';\nimport { Actions, Footer, InnerContent, Title, Close, Content } from './components/Content';\nimport type { DrawerTriggerProps } from './components/Trigger';\nimport { Trigger } from './components/Trigger';\nimport type { OnOpenHandle } from './Context';\nimport { DrawerContext } from './Context';\nimport type { DrawerSize, DrawerVariant } from './types';\nimport { useDrawerStack } from './useDrawerStack';\n\nexport type DrawerTexts = {\n /** Aria-label for back icon button in drawer. */\n back: string;\n /** Aria-label for close icon button in drawer. */\n close: string;\n};\n\nexport type DrawerProps = {\n children: React.ReactNode | React.ReactNode[];\n /** Size of the drawer. This is the recommended way to set a size for drawer component. */\n size?: DrawerSize;\n /** Set whether the drawer is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Handles the back button click and determines its visibility */\n onClickBack?: () => void;\n /** Handler called when drawer closes by user interaction */\n onClose?: () => void;\n /** Called when the drawer opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n /** Control the open state of the drawer from outside the component */\n open?: boolean;\n /** A trigger to be used for the drawer, should not be set if `children` already contains a trigger */\n trigger?: React.JSX.Element;\n /** Triggers when resizing, can be throttled or debounced for better performances */\n onResize?: (delta: number) => void;\n /** Rendering variant of the drawer */\n variant?: DrawerVariant;\n /** className for children container, needed for embedded version, in cases where we might need to control children height */\n className?: string;\n /** When 'true' renders close button in topr right cornenr of drawer content */\n showCloseButton?: boolean;\n /** Target specific named outlet allowing you to render a drawer to a specific outlet */\n outletName?: string;\n};\n\nexport type OutletProps = React.HTMLAttributes<HTMLDivElement> & {\n name?: string;\n};\n\nconst DEFAULT_OUTLET_NAME = 'default';\n\nconst Outlet = React.forwardRef(function Outlet(props: OutletProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn('ml-auto h-full flex-shrink-0 overflow-hidden', props.className);\n return (\n <div\n {...props}\n className={className}\n data-taco=\"drawer-outlet\"\n data-taco-outlet-name={props.name ?? DEFAULT_OUTLET_NAME}\n ref={ref}\n />\n );\n});\n\nexport type ForwardedDrawerWithStatics = React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<HTMLButtonElement>>;\n Content: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;\n InnerContent: React.ForwardRefExoticComponent<DrawerInnerContentProps & React.RefAttributes<HTMLDivElement>>;\n Title: React.ForwardRefExoticComponent<DrawerTitleProps & React.RefAttributes<HTMLHeadingElement>>;\n Footer: React.ForwardRefExoticComponent<DrawerFooterProps & React.RefAttributes<HTMLDivElement>>;\n Close: React.ForwardRefExoticComponent<DrawerCloseProps & React.RefAttributes<HTMLButtonElement>>;\n Actions: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;\n Outlet: React.ForwardRefExoticComponent<OutletProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Drawer = React.forwardRef(function Drawer(props: DrawerProps, ref: React.Ref<HTMLElement>) {\n const {\n onChange,\n variant = 'embedded',\n className: _1,\n onResize,\n onClose,\n onClickBack,\n size = 'md',\n trigger,\n children,\n showCloseButton = true,\n outletName,\n ...otherProps\n } = props;\n\n const [outlet, setOutlet] = React.useState<HTMLElement>();\n const containerRef = React.useRef<OnOpenHandle>(null);\n\n const [open, setOpen] = useControlled<boolean>({\n value: props.open,\n defaultValue: props.defaultOpen ?? false,\n onChange,\n });\n\n useDrawerStack({\n open,\n setOpen,\n onClose,\n onOpen: () => {\n // sets container width for resizing.\n containerRef.current?.onOpen();\n },\n });\n\n const context = React.useMemo(\n () => ({\n containerRef,\n onClickBack,\n onClose,\n onResize,\n props: otherProps,\n size,\n ref,\n variant,\n showCloseButton,\n outlet,\n }),\n [containerRef, otherProps, variant, onResize, onClose, size, showCloseButton, outlet, onClickBack]\n );\n\n const handleOpenChange = (open: boolean, eventDetails: DrawerPrimitive.Root.ChangeEventDetails) => {\n if (eventDetails.reason === 'escape-key') {\n const triggeredFromRadixPortal = (eventDetails.event.target as HTMLElement)?.closest(\n 'div[data-radix-popper-content-wrapper]'\n );\n\n if (triggeredFromRadixPortal) {\n // TODO: This could be removed when all radix overlays are replaced with base UI components, but currently it propagates through and closes the dialog.\n\n // cancel closing the dialog\n eventDetails.cancel();\n // propagate to allow the radix overlay to close\n eventDetails.allowPropagation();\n return;\n } else if (variant === 'embedded') {\n eventDetails.cancel();\n return;\n }\n }\n\n setOpen?.(open);\n\n if (open === false) {\n onClose?.();\n }\n };\n\n React.useEffect(() => {\n const outletSelector = `[data-taco=\"drawer-outlet\"][data-taco-outlet-name=\"${outletName ?? DEFAULT_OUTLET_NAME}\"]`;\n const outletElement = document.querySelector<HTMLElement>(outletSelector) ?? document.body;\n setOutlet(outletElement);\n }, [outletName]);\n\n return (\n <DrawerContext.Provider value={context}>\n <DrawerPrimitive.Root\n disablePointerDismissal={variant === 'embedded'}\n modal={variant === 'overlay'}\n open={open}\n onOpenChange={handleOpenChange}\n swipeDirection=\"right\">\n {trigger && <Trigger>{trigger}</Trigger>}\n {children}\n </DrawerPrimitive.Root>\n </DrawerContext.Provider>\n );\n}) as ForwardedDrawerWithStatics;\n\nDrawer.Trigger = Trigger;\nDrawer.Content = Content;\nDrawer.InnerContent = InnerContent;\nDrawer.Title = Title;\nDrawer.Footer = Footer;\nDrawer.Close = Close;\nDrawer.Actions = Actions;\nDrawer.Outlet = Outlet;\n"],"names":["Outlet","Drawer","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AAW,cAAc;AACtC,YAAM,2BAA4B,aAAa,MAAM,QAAwB;AAAA,QACzE;AAAA,MAAA;AAGJ,UAAI,0BAA0B;AAI1B,qBAAa,OAAA;AAEb,qBAAa,iBAAA;AACb;AAAA,MACJ,WAAW,YAAY,YAAY;AAC/B,qBAAa,OAAA;AACb;AAAA,MACJ;AAAA,IACJ;AAEA,cAAUA,KAAI;AAEd,QAAIA,UAAS,OAAO;AAChB,gBAAA;AAAA,IACJ;AAAA,EACJ;AAEA,QAAM,UAAU,MAAM;AAClB,UAAM,iBAAiB,sDAAsD,cAAc,mBAAmB;AAC9G,UAAM,gBAAgB,SAAS,cAA2B,cAAc,KAAK,SAAS;AACtF,cAAU,aAAa;AAAA,EAC3B,GAAG,CAAC,UAAU,CAAC;AAEf,SACI,sBAAA,cAAC,cAAc,UAAd,EAAuB,OAAO,WAC3B,sBAAA;AAAA,IAACC,SAAgB;AAAA,IAAhB;AAAA,MACG,yBAAyB,YAAY;AAAA,MACrC,OAAO,YAAY;AAAA,MACnB;AAAA,MACA,cAAc;AAAA,MACd,gBAAe;AAAA,IAAA;AAAA,IACd,WAAW,sBAAA,cAAC,SAAA,MAAS,OAAQ;AAAA,IAC7B;AAAA,EAAA,CAET;AAER,CAAC;AAED,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,eAAe;AACtB,OAAO,QAAQ;AACf,OAAO,SAAS;AAChB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,SAAS;"}
1
+ {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { GroupProps } from '@/components';\nimport { useControlled } from '@/hooks/useControlled';\n\nimport type {\n DrawerInnerContentProps,\n DrawerFooterProps,\n DrawerTitleProps,\n DrawerContentProps,\n DrawerCloseProps,\n} from './components/Content';\nimport { Actions, Footer, InnerContent, Title, Close, Content } from './components/Content';\nimport type { DrawerTriggerProps } from './components/Trigger';\nimport { Trigger } from './components/Trigger';\nimport type { OnOpenHandle } from './Context';\nimport { DrawerContext } from './Context';\nimport type { DrawerSize, DrawerVariant } from './types';\nimport { useDrawerStack } from './useDrawerStack';\n\nexport type DrawerTexts = {\n /** Aria-label for back icon button in drawer. */\n back: string;\n /** Aria-label for close icon button in drawer. */\n close: string;\n};\n\nexport type DrawerProps = {\n children: React.ReactNode | React.ReactNode[];\n /** Size of the drawer. This is the recommended way to set a size for drawer component. */\n size?: DrawerSize;\n /** Set whether the drawer is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Handles the back button click and determines its visibility */\n onClickBack?: () => void;\n /** Handler called when drawer closes by user interaction */\n onClose?: () => void;\n /** Called when the drawer opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n /** Control the open state of the drawer from outside the component */\n open?: boolean;\n /** A trigger to be used for the drawer, should not be set if `children` already contains a trigger */\n trigger?: React.JSX.Element;\n /** Triggers when resizing, can be throttled or debounced for better performances */\n onResize?: (delta: number) => void;\n /** Rendering variant of the drawer */\n variant?: DrawerVariant;\n /** className for children container, needed for embedded version, in cases where we might need to control children height */\n className?: string;\n /** When 'true' renders close button in topr right cornenr of drawer content */\n showCloseButton?: boolean;\n /** Target specific named outlet allowing you to render a drawer to a specific outlet */\n outletName?: string;\n};\n\nexport type OutletProps = React.HTMLAttributes<HTMLDivElement> & {\n name?: string;\n};\n\nconst DEFAULT_OUTLET_NAME = 'default';\n\nconst Outlet = React.forwardRef(function Outlet(props: OutletProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn('ml-auto h-full flex-shrink-0 overflow-hidden', props.className);\n return (\n <div\n {...props}\n className={className}\n data-taco=\"drawer-outlet\"\n data-taco-outlet-name={props.name ?? DEFAULT_OUTLET_NAME}\n ref={ref}\n />\n );\n});\n\nexport type ForwardedDrawerWithStatics = React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<HTMLButtonElement>>;\n Content: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;\n InnerContent: React.ForwardRefExoticComponent<DrawerInnerContentProps & React.RefAttributes<HTMLDivElement>>;\n Title: React.ForwardRefExoticComponent<DrawerTitleProps & React.RefAttributes<HTMLHeadingElement>>;\n Footer: React.ForwardRefExoticComponent<DrawerFooterProps & React.RefAttributes<HTMLDivElement>>;\n Close: React.ForwardRefExoticComponent<DrawerCloseProps & React.RefAttributes<HTMLButtonElement>>;\n Actions: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;\n Outlet: React.ForwardRefExoticComponent<OutletProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Drawer = React.forwardRef(function Drawer(props: DrawerProps, ref: React.Ref<HTMLElement>) {\n const {\n onChange,\n variant = 'embedded',\n className: _1,\n onResize,\n onClose,\n onClickBack,\n size = 'md',\n trigger,\n children,\n showCloseButton = true,\n outletName,\n ...otherProps\n } = props;\n\n const [outlet, setOutlet] = React.useState<HTMLElement>();\n const containerRef = React.useRef<OnOpenHandle>(null);\n\n const [open, setOpen] = useControlled<boolean>({\n value: props.open,\n defaultValue: props.defaultOpen ?? false,\n onChange,\n });\n\n useDrawerStack({\n open,\n setOpen,\n onClose,\n onOpen: () => {\n // sets container width for resizing.\n containerRef.current?.onOpen();\n },\n });\n\n const context = React.useMemo(\n () => ({\n containerRef,\n onClickBack,\n onClose,\n onResize,\n props: otherProps,\n size,\n ref,\n variant,\n showCloseButton,\n outlet,\n }),\n [containerRef, otherProps, variant, onResize, onClose, size, showCloseButton, outlet, onClickBack]\n );\n\n const handleOpenChange = (open: boolean, eventDetails: DrawerPrimitive.Root.ChangeEventDetails) => {\n if (eventDetails.reason === 'escape-key') {\n const triggeredFromRadixPortal = (eventDetails.event.target as HTMLElement)?.closest(\n 'div[data-radix-popper-content-wrapper]'\n );\n\n if (triggeredFromRadixPortal) {\n // TODO: This could be removed when all radix overlays are replaced with base UI components, but currently it propagates through and closes the dialog.\n\n // cancel closing the dialog\n eventDetails.cancel();\n // propagate to allow the radix overlay to close\n eventDetails.allowPropagation();\n return;\n } else if (variant === 'embedded') {\n eventDetails.cancel();\n return;\n }\n }\n\n setOpen?.(open);\n\n if (open === false) {\n onClose?.();\n }\n };\n\n React.useEffect(() => {\n const outletSelector = `[data-taco=\"drawer-outlet\"][data-taco-outlet-name=\"${outletName ?? DEFAULT_OUTLET_NAME}\"]`;\n const outletElement = document.querySelector<HTMLElement>(outletSelector) ?? document.body;\n setOutlet(outletElement);\n }, [outletName]);\n\n return (\n <DrawerContext.Provider value={context}>\n <DrawerPrimitive.Root\n disablePointerDismissal={variant === 'embedded'}\n modal={variant === 'overlay'}\n open={open}\n onOpenChange={handleOpenChange}\n swipeDirection=\"right\">\n {trigger && <Trigger>{trigger}</Trigger>}\n {children}\n </DrawerPrimitive.Root>\n </DrawerContext.Provider>\n );\n}) as ForwardedDrawerWithStatics;\n\nDrawer.Trigger = Trigger;\nDrawer.Content = Content;\nDrawer.InnerContent = InnerContent;\nDrawer.Title = Title;\nDrawer.Footer = Footer;\nDrawer.Close = Close;\nDrawer.Actions = Actions;\nDrawer.Outlet = Outlet;\n"],"names":["Outlet","Drawer","open","DrawerPrimitive"],"mappings":";;;;;;;;AA6DA,MAAM,sBAAsB;AAE5B,MAAM,SAAS,MAAM,WAAW,SAASA,QAAO,OAAoB,KAAgC;AAChG,QAAM,YAAY,GAAG,gDAAgD,MAAM,SAAS;AACpF,SACI,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ;AAAA,MACA,aAAU;AAAA,MACV,yBAAuB,MAAM,QAAQ;AAAA,MACrC;AAAA,IAAA;AAAA,EAAA;AAGZ,CAAC;AAaM,MAAM,SAAS,MAAM,WAAW,SAASC,QAAO,OAAoB,KAA6B;AACpG,QAAM;AAAA,IACF;AAAA,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,KAAK,SAAS;AACtF,cAAU,aAAa;AAAA,EAC3B,GAAG,CAAC,UAAU,CAAC;AAEf,SACI,sBAAA,cAAC,cAAc,UAAd,EAAuB,OAAO,WAC3B,sBAAA;AAAA,IAACC,SAAgB;AAAA,IAAhB;AAAA,MACG,yBAAyB,YAAY;AAAA,MACrC,OAAO,YAAY;AAAA,MACnB;AAAA,MACA,cAAc;AAAA,MACd,gBAAe;AAAA,IAAA;AAAA,IACd,WAAW,sBAAA,cAAC,SAAA,MAAS,OAAQ;AAAA,IAC7B;AAAA,EAAA,CAET;AAER,CAAC;AAED,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,eAAe;AACtB,OAAO,QAAQ;AACf,OAAO,SAAS;AAChB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,SAAS;"}
@@ -3,13 +3,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const drawer = require("@base-ui/react/drawer");
4
4
  const cn = require("clsx");
5
5
  const React = require("react");
6
+ const Context$1 = require("../../Menu/Context.cjs");
6
7
  const useMergedRef = require("../../../hooks/useMergedRef.cjs");
7
8
  const useDraggable = require("../../../utils/hooks/useDraggable.cjs");
8
- const IconButton = require("../../LegacyComponents/IconButton/IconButton.cjs");
9
- const Context$1 = require("../../Menu/Context.cjs");
10
- const Localization = require("../../Provider/Localization.cjs");
11
9
  const Context = require("../Context.cjs");
12
10
  const util = require("../util.cjs");
11
+ const Localization = require("../../Provider/Localization.cjs");
12
+ const IconButton = require("../../LegacyComponents/IconButton/IconButton.cjs");
13
13
  const RESIZE_MIN = 360;
14
14
  const RESIZE_MAX = 1e3;
15
15
  const RenderPropWrapper = React.forwardRef(function RenderPropWrapper2({ children, onClick, renderProps }, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"Content.cjs","sources":["../../../../src/components/Drawer/components/Content.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport cn from 'clsx';\nimport React from 'react';\n\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useDraggable } from '../../../utils/hooks/useDraggable';\nimport type { GroupProps } from '../../Group/Group';\nimport { LegacyIconButton } from '../../LegacyComponents/IconButton/IconButton';\nimport { useCurrentMenu } from '../../Menu/Context';\nimport { useLocalization } from '../../Provider/Localization';\nimport { useCurrentDrawer } from '../Context';\nimport { getDrawerContainerClassNames, getDrawerContentClassNames, getDrawerDragHandlerClassNames } from '../util';\n\nconst RESIZE_MIN = 360;\nconst RESIZE_MAX = 1000;\n\nexport enum DrawerAnimationDefinition {\n Visible = 'visible',\n Hidden = 'hidden',\n}\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick, renderProps }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('close'));\n };\n\n return children({ close, ref, ...renderProps });\n});\n\nexport type DrawerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DrawerTitle(props: DrawerTitleProps, externalRef: React.Ref<HTMLHeadingElement>) {\n const { className, children, ...otherProps } = props;\n const ref = useMergedRef<HTMLHeadingElement>(externalRef);\n const [style, setStyle] = React.useState({});\n const { texts } = useLocalization();\n const { onClickBack } = useCurrentDrawer();\n\n /**\n * By design in default drawer version Title has grey separator, but we might have exceptions like Drawer + Tabs scenario,\n * where we might want to hide the grey separator. For this reason separator was rendered with using of classNames,\n * so it can be easily overriden in exceptional scenarios.\n * */\n const cName = cn('mb-0 flex grow-0 items-start justify-self-start border-b-[1px] border-gray-200 px-4 py-4', className);\n\n React.useEffect(() => {\n const drawer = ref?.current?.closest('[data-taco=\"drawer\"]');\n\n // This is the margin amount that we need to deduct from the margins to align with the design\n const marginAdjust = 4;\n\n const closeButton: HTMLButtonElement | null = drawer?.querySelector(`[aria-label=\"${texts.drawer.close}\"]`) ?? null;\n const closeButtonWidth = closeButton?.offsetWidth ?? 0;\n const closeButtonRightMargin = 8;\n\n const actionsWrapper: HTMLSpanElement | null = drawer?.querySelector('#taco-drawer-actions[data-taco=\"group\"]') ?? null;\n const actionsWrapperWidth = actionsWrapper?.offsetWidth ?? 0;\n const actionsWrapperRightMargin = 8;\n\n const marginRight =\n closeButtonWidth + actionsWrapperWidth + closeButtonRightMargin + actionsWrapperRightMargin - marginAdjust;\n\n setStyle({ marginRight });\n }, [ref, texts.drawer.close]);\n\n return (\n <DrawerPrimitive.Title className={cName} {...otherProps} ref={ref}>\n {onClickBack ? (\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.back}\n className=\"mr-3 text-base\"\n icon=\"chevron-left\"\n onClick={onClickBack}\n />\n ) : null}\n {\n // We need to apply the right margin as an inline style instead of using Tailwind CSS.\n // This is necessary because we are creating styles dynamically at runtime,\n // and Tailwind doesn't support generating runtime styles.\n }\n <span className=\"line-clamp-2 inline-block overflow-y-hidden\" style={style}>\n {children}\n </span>\n </DrawerPrimitive.Title>\n );\n});\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\nexport const Footer = React.forwardRef(function DrawerFooter(props: DrawerFooterProps, ref: React.Ref<HTMLDivElement>) {\n const { className: _1, ...otherProps } = props;\n /**\n * The same scenario as Title, grey separator rendered using classNames to have posibility to override it.\n */\n const cName = cn('mt-auto flex grow-0 justify-end border-t-[1px] border-gray-200 p-4', props.className);\n return <div {...otherProps} className={cName} ref={ref} />;\n});\n\nexport const Actions = React.forwardRef(function Actions(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { className, ...otherProps } = props;\n const cName = cn('absolute right-10 top-0 mr-[2] mt-4 flex gap-2', className);\n // Id is added to identify the actions wrapper inside a useEffect in Dialog.Title\n return <div {...otherProps} className={cName} id=\"taco-drawer-actions\" ref={ref} />;\n});\n\nexport type DrawerCloseProps = React.HTMLAttributes<HTMLButtonElement> & {\n children: React.ReactElement;\n};\n\nexport const Close = React.forwardRef(function DrawerClose(props: DrawerCloseProps, ref: React.Ref<HTMLButtonElement>) {\n const { onClose } = useCurrentDrawer();\n\n const { children, ...restProps } = props;\n\n return <DrawerPrimitive.Close {...restProps} onClick={onClose} ref={ref} render={children} />;\n});\n\nexport type DrawerInnerContentProps = React.HTMLAttributes<HTMLDivElement>;\n/**\n * It is container component, needed to provide default scrolling behaviour and padding, to simplyfy usage, requested by feature devs.\n * It is optional to use InnerContent component, if consumer need to implement custom behaviour or paddings for inner content,\n * then it's simply enough to render children and wrap them in custom implementation.\n */\nexport const InnerContent = React.forwardRef(function InnerContent(\n props: DrawerInnerContentProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const { className, children, ...otherProps } = props;\n return (\n <div {...otherProps} className={cn('flex grow flex-col overflow-y-hidden', className)} ref={ref}>\n <div className=\"w-full gap-y-0.5 overflow-auto p-4\">{children}</div>\n </div>\n );\n});\n\nexport type DrawerContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n /** An accessible label to be announced when the side drawer is opened */\n 'aria-label': string;\n children: React.ReactNode | ((props: { close: () => void }) => React.ReactNode);\n};\nexport const Content = React.forwardRef(function Content(props: DrawerContentProps, externalRef: React.Ref<HTMLDivElement>) {\n const { containerRef, size, onResize, variant, showCloseButton, outlet } = useCurrentDrawer();\n const { className, children, ...otherProps } = props;\n const { texts } = useLocalization();\n const ref = useMergedRef<HTMLDivElement>(externalRef);\n\n const contentRef = React.useRef(null);\n\n // if the drawer was opened by a menu, we need to close the menu when the drawer closes\n // the menu is still open (and mounted) because it is the trigger for the drawer\n const menu = useCurrentMenu();\n let finalFocus: DrawerPrimitive.Popup.Props['finalFocus'];\n\n if (menu) {\n finalFocus = () => {\n menu.close();\n };\n }\n\n const containerClassName: string = React.useMemo(() => cn(getDrawerContainerClassNames(variant), className), [className]);\n\n const { contentClassName, dragHandlerClassName } = React.useMemo(() => {\n const contentClassName = getDrawerContentClassNames(size, variant);\n const dragHandlerClassName: string = getDrawerDragHandlerClassNames();\n return { contentClassName, dragHandlerClassName };\n }, [size, variant]);\n\n const [containerWidth, setContainerWidth] = React.useState<number>();\n\n // resize\n const dragHandlerRef = React.useRef<HTMLDivElement>(null);\n\n const {\n position,\n dragging,\n handleProps: dragHandleProps,\n resetPosition,\n } = useDraggable(useMergedRef<HTMLDivElement>(dragHandlerRef));\n\n const resizedWidth = React.useMemo((): number | undefined => {\n if (containerWidth) {\n return Math.min(RESIZE_MAX, Math.max(RESIZE_MIN, containerWidth - position.x || 0));\n }\n return;\n }, [containerWidth, position]);\n\n React.useImperativeHandle(\n containerRef,\n () => ({\n onOpen: () => {\n requestAnimationFrame(() => {\n if (contentRef.current) {\n setContainerWidth((contentRef.current as HTMLElement)?.offsetWidth);\n }\n });\n },\n }),\n []\n );\n\n React.useEffect(() => {\n if (onResize) {\n onResize(position.x);\n }\n }, [position]);\n\n React.useEffect(() => {\n if (!dragging && resizedWidth) {\n setContainerWidth(resizedWidth);\n resetPosition();\n }\n }, [dragging]);\n\n let output;\n\n if (typeof children === 'function') {\n output = (\n <Close>\n <RenderPropWrapper>{children}</RenderPropWrapper>\n </Close>\n );\n } else {\n output = children;\n }\n\n const content = (\n <div ref={contentRef} data-taco=\"drawer\" className={containerClassName}>\n {output}\n <div className={dragHandlerClassName} {...dragHandleProps} data-testid=\"resize-handler\" ref={dragHandlerRef}>\n {dragging ? <div data-testid=\"resize-hit-area\" className=\"fixed bottom-0 left-0 right-0 top-0\" /> : null}\n </div>\n {showCloseButton ? (\n <Close>\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.close}\n className=\"absolute right-0 top-0 mr-2 mt-4\"\n icon=\"close\"\n />\n </Close>\n ) : null}\n </div>\n );\n\n if (!outlet) {\n return null;\n }\n\n return (\n <DrawerPrimitive.Portal container={outlet ?? undefined} className=\"h-full\">\n {variant === 'overlay' ? (\n <DrawerPrimitive.Backdrop\n className=\"fixed inset-0 cursor-default overflow-y-auto bg-brand-midnight/[0.3] print:absolute print:overflow-visible\"\n data-taco=\"backdrop\"\n />\n ) : null}\n <DrawerPrimitive.Viewport className=\"h-full\">\n <DrawerPrimitive.Popup\n {...otherProps}\n className={contentClassName}\n finalFocus={finalFocus}\n ref={ref}\n style={{ width: resizedWidth }}>\n <DrawerPrimitive.Content>{content}</DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n});\n"],"names":["RenderPropWrapper","useMergedRef","useLocalization","useCurrentDrawer","drawer","DrawerPrimitive","LegacyIconButton","Actions","InnerContent","Content","useCurrentMenu","getDrawerContainerClassNames","contentClassName","getDrawerContentClassNames","dragHandlerClassName","getDrawerDragHandlerClassNames","useDraggable"],"mappings":";;;;;;;;;;;;AAaA,MAAM,aAAa;AACnB,MAAM,aAAa;AAOnB,MAAM,oBAAoB,MAAM,WAAW,SAASA,mBAAkB,EAAE,UAAU,SAAS,YAAA,GAAoB,KAAK;AAChH,QAAM,QAAQ,MAAM;AAChB,YAAQ,IAAI,YAAY,OAAO,CAAC;AAAA,EACpC;AAEA,SAAO,SAAS,EAAE,OAAO,KAAK,GAAG,aAAa;AAClD,CAAC;AAGM,MAAM,QAAQ,MAAM,WAAW,SAAS,YAAY,OAAyB,aAA4C;AAC5H,QAAM,EAAE,WAAW,UAAU,GAAG,eAAe;AAC/C,QAAM,MAAMC,aAAAA,aAAiC,WAAW;AACxD,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,CAAA,CAAE;AAC3C,QAAM,EAAE,MAAA,IAAUC,6BAAA;AAClB,QAAM,EAAE,YAAA,IAAgBC,yBAAA;AAOxB,QAAM,QAAQ,GAAG,4FAA4F,SAAS;AAEtH,QAAM,UAAU,MAAM;AAClB,UAAMC,UAAS,KAAK,SAAS,QAAQ,sBAAsB;AAG3D,UAAM,eAAe;AAErB,UAAM,cAAwCA,SAAQ,cAAc,gBAAgB,MAAM,OAAO,KAAK,IAAI,KAAK;AAC/G,UAAM,mBAAmB,aAAa,eAAe;AACrD,UAAM,yBAAyB;AAE/B,UAAM,iBAAyCA,SAAQ,cAAc,yCAAyC,KAAK;A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AAI,CAAC,QAAQ;AACT,WAAO;AAAA,EACX;AAEA,SACI,sBAAA,cAACD,OAAAA,OAAgB,QAAhB,EAAuB,WAAW,UAAU,QAAW,WAAU,SAAA,GAC7D,YAAY,YACT,sBAAA;AAAA,IAACA,OAAAA,OAAgB;AAAA,IAAhB;AAAA,MACG,WAAU;AAAA,MACV,aAAU;AAAA,IAAA;AAAA,EAAA,IAEd,MACJ,sBAAA,cAACA,OAAAA,OAAgB,UAAhB,EAAyB,WAAU,YAChC,sBAAA;AAAA,IAACA,OAAAA,OAAgB;AAAA,IAAhB;AAAA,MACI,GAAG;AAAA,MACJ,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,OAAO,EAAE,OAAO,aAAA;AAAA,IAAa;AAAA,IAC7B,sBAAA,cAACA,OAAAA,OAAgB,SAAhB,MAAyB,OAAQ;AAAA,EAAA,CAE1C,CACJ;AAER,CAAC;;;;;;;"}
1
+ {"version":3,"file":"Content.cjs","sources":["../../../../src/components/Drawer/components/Content.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport cn from 'clsx';\nimport React from 'react';\n\nimport type { GroupProps } from '@/components';\nimport { LegacyIconButton, useLocalization } from '@/components';\nimport { useCurrentMenu } from '@/components/Menu/Context';\nimport { useMergedRef } from '@/hooks/useMergedRef';\nimport { useDraggable } from '@/utils/hooks/useDraggable';\n\nimport { useCurrentDrawer } from '../Context';\nimport { getDrawerContainerClassNames, getDrawerContentClassNames, getDrawerDragHandlerClassNames } from '../util';\n\nconst RESIZE_MIN = 360;\nconst RESIZE_MAX = 1000;\n\nexport enum DrawerAnimationDefinition {\n Visible = 'visible',\n Hidden = 'hidden',\n}\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick, renderProps }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('close'));\n };\n\n return children({ close, ref, ...renderProps });\n});\n\nexport type DrawerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DrawerTitle(props: DrawerTitleProps, externalRef: React.Ref<HTMLHeadingElement>) {\n const { className, children, ...otherProps } = props;\n const ref = useMergedRef<HTMLHeadingElement>(externalRef);\n const [style, setStyle] = React.useState({});\n const { texts } = useLocalization();\n const { onClickBack } = useCurrentDrawer();\n\n /**\n * By design in default drawer version Title has grey separator, but we might have exceptions like Drawer + Tabs scenario,\n * where we might want to hide the grey separator. For this reason separator was rendered with using of classNames,\n * so it can be easily overriden in exceptional scenarios.\n * */\n const cName = cn('mb-0 flex grow-0 items-start justify-self-start border-b-[1px] border-gray-200 px-4 py-4', className);\n\n React.useEffect(() => {\n const drawer = ref?.current?.closest('[data-taco=\"drawer\"]');\n\n // This is the margin amount that we need to deduct from the margins to align with the design\n const marginAdjust = 4;\n\n const closeButton: HTMLButtonElement | null = drawer?.querySelector(`[aria-label=\"${texts.drawer.close}\"]`) ?? null;\n const closeButtonWidth = closeButton?.offsetWidth ?? 0;\n const closeButtonRightMargin = 8;\n\n const actionsWrapper: HTMLSpanElement | null = drawer?.querySelector('#taco-drawer-actions[data-taco=\"group\"]') ?? null;\n const actionsWrapperWidth = actionsWrapper?.offsetWidth ?? 0;\n const actionsWrapperRightMargin = 8;\n\n const marginRight =\n closeButtonWidth + actionsWrapperWidth + closeButtonRightMargin + actionsWrapperRightMargin - marginAdjust;\n\n setStyle({ marginRight });\n }, [ref, texts.drawer.close]);\n\n return (\n <DrawerPrimitive.Title className={cName} {...otherProps} ref={ref}>\n {onClickBack ? (\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.back}\n className=\"mr-3 text-base\"\n icon=\"chevron-left\"\n onClick={onClickBack}\n />\n ) : null}\n {\n // We need to apply the right margin as an inline style instead of using Tailwind CSS.\n // This is necessary because we are creating styles dynamically at runtime,\n // and Tailwind doesn't support generating runtime styles.\n }\n <span className=\"line-clamp-2 inline-block overflow-y-hidden\" style={style}>\n {children}\n </span>\n </DrawerPrimitive.Title>\n );\n});\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\nexport const Footer = React.forwardRef(function DrawerFooter(props: DrawerFooterProps, ref: React.Ref<HTMLDivElement>) {\n const { className: _1, ...otherProps } = props;\n /**\n * The same scenario as Title, grey separator rendered using classNames to have posibility to override it.\n */\n const cName = cn('mt-auto flex grow-0 justify-end border-t-[1px] border-gray-200 p-4', props.className);\n return <div {...otherProps} className={cName} ref={ref} />;\n});\n\nexport const Actions = React.forwardRef(function Actions(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { className, ...otherProps } = props;\n const cName = cn('absolute right-10 top-0 mr-[2] mt-4 flex gap-2', className);\n // Id is added to identify the actions wrapper inside a useEffect in Dialog.Title\n return <div {...otherProps} className={cName} id=\"taco-drawer-actions\" ref={ref} />;\n});\n\nexport type DrawerCloseProps = React.HTMLAttributes<HTMLButtonElement> & {\n children: React.ReactElement;\n};\n\nexport const Close = React.forwardRef(function DrawerClose(props: DrawerCloseProps, ref: React.Ref<HTMLButtonElement>) {\n const { onClose } = useCurrentDrawer();\n\n const { children, ...restProps } = props;\n\n return <DrawerPrimitive.Close {...restProps} onClick={onClose} ref={ref} render={children} />;\n});\n\nexport type DrawerInnerContentProps = React.HTMLAttributes<HTMLDivElement>;\n/**\n * It is container component, needed to provide default scrolling behaviour and padding, to simplyfy usage, requested by feature devs.\n * It is optional to use InnerContent component, if consumer need to implement custom behaviour or paddings for inner content,\n * then it's simply enough to render children and wrap them in custom implementation.\n */\nexport const InnerContent = React.forwardRef(function InnerContent(\n props: DrawerInnerContentProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const { className, children, ...otherProps } = props;\n return (\n <div {...otherProps} className={cn('flex grow flex-col overflow-y-hidden', className)} ref={ref}>\n <div className=\"w-full gap-y-0.5 overflow-auto p-4\">{children}</div>\n </div>\n );\n});\n\nexport type DrawerContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n /** An accessible label to be announced when the side drawer is opened */\n 'aria-label': string;\n children: React.ReactNode | ((props: { close: () => void }) => React.ReactNode);\n};\nexport const Content = React.forwardRef(function Content(props: DrawerContentProps, externalRef: React.Ref<HTMLDivElement>) {\n const { containerRef, size, onResize, variant, showCloseButton, outlet } = useCurrentDrawer();\n const { className, children, ...otherProps } = props;\n const { texts } = useLocalization();\n const ref = useMergedRef<HTMLDivElement>(externalRef);\n\n const contentRef = React.useRef(null);\n\n // if the drawer was opened by a menu, we need to close the menu when the drawer closes\n // the menu is still open (and mounted) because it is the trigger for the drawer\n const menu = useCurrentMenu();\n let finalFocus: DrawerPrimitive.Popup.Props['finalFocus'];\n\n if (menu) {\n finalFocus = () => {\n menu.close();\n };\n }\n\n const containerClassName: string = React.useMemo(() => cn(getDrawerContainerClassNames(variant), className), [className]);\n\n const { contentClassName, dragHandlerClassName } = React.useMemo(() => {\n const contentClassName = getDrawerContentClassNames(size, variant);\n const dragHandlerClassName: string = getDrawerDragHandlerClassNames();\n return { contentClassName, dragHandlerClassName };\n }, [size, variant]);\n\n const [containerWidth, setContainerWidth] = React.useState<number>();\n\n // resize\n const dragHandlerRef = React.useRef<HTMLDivElement>(null);\n\n const {\n position,\n dragging,\n handleProps: dragHandleProps,\n resetPosition,\n } = useDraggable(useMergedRef<HTMLDivElement>(dragHandlerRef));\n\n const resizedWidth = React.useMemo((): number | undefined => {\n if (containerWidth) {\n return Math.min(RESIZE_MAX, Math.max(RESIZE_MIN, containerWidth - position.x || 0));\n }\n return;\n }, [containerWidth, position]);\n\n React.useImperativeHandle(\n containerRef,\n () => ({\n onOpen: () => {\n requestAnimationFrame(() => {\n if (contentRef.current) {\n setContainerWidth((contentRef.current as HTMLElement)?.offsetWidth);\n }\n });\n },\n }),\n []\n );\n\n React.useEffect(() => {\n if (onResize) {\n onResize(position.x);\n }\n }, [position]);\n\n React.useEffect(() => {\n if (!dragging && resizedWidth) {\n setContainerWidth(resizedWidth);\n resetPosition();\n }\n }, [dragging]);\n\n let output;\n\n if (typeof children === 'function') {\n output = (\n <Close>\n <RenderPropWrapper>{children}</RenderPropWrapper>\n </Close>\n );\n } else {\n output = children;\n }\n\n const content = (\n <div ref={contentRef} data-taco=\"drawer\" className={containerClassName}>\n {output}\n <div className={dragHandlerClassName} {...dragHandleProps} data-testid=\"resize-handler\" ref={dragHandlerRef}>\n {dragging ? <div data-testid=\"resize-hit-area\" className=\"fixed bottom-0 left-0 right-0 top-0\" /> : null}\n </div>\n {showCloseButton ? (\n <Close>\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.close}\n className=\"absolute right-0 top-0 mr-2 mt-4\"\n icon=\"close\"\n />\n </Close>\n ) : null}\n </div>\n );\n\n if (!outlet) {\n return null;\n }\n\n return (\n <DrawerPrimitive.Portal container={outlet ?? undefined} className=\"h-full\">\n {variant === 'overlay' ? (\n <DrawerPrimitive.Backdrop\n className=\"fixed inset-0 cursor-default overflow-y-auto bg-brand-midnight/[0.3] print:absolute print:overflow-visible\"\n data-taco=\"backdrop\"\n />\n ) : null}\n <DrawerPrimitive.Viewport className=\"h-full\">\n <DrawerPrimitive.Popup\n {...otherProps}\n className={contentClassName}\n finalFocus={finalFocus}\n ref={ref}\n style={{ width: resizedWidth }}>\n <DrawerPrimitive.Content>{content}</DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n});\n"],"names":["RenderPropWrapper","useMergedRef","useLocalization","useCurrentDrawer","drawer","DrawerPrimitive","LegacyIconButton","Actions","InnerContent","Content","useCurrentMenu","getDrawerContainerClassNames","contentClassName","getDrawerContentClassNames","dragHandlerClassName","getDrawerDragHandlerClassNames","useDraggable"],"mappings":";;;;;;;;;;;;AAaA,MAAM,aAAa;AACnB,MAAM,aAAa;AAOnB,MAAM,oBAAoB,MAAM,WAAW,SAASA,mBAAkB,EAAE,UAAU,SAAS,YAAA,GAAoB,KAAK;AAChH,QAAM,QAAQ,MAAM;AAChB,YAAQ,IAAI,YAAY,OAAO,CAAC;AAAA,E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 -1,13 +1,13 @@
1
1
  import { Drawer } from "@base-ui/react/drawer";
2
2
  import cn from "clsx";
3
3
  import React__default from "react";
4
+ import { useCurrentMenu } from "../../Menu/Context.js";
4
5
  import { useMergedRef } from "../../../hooks/useMergedRef.js";
5
6
  import { useDraggable } from "../../../utils/hooks/useDraggable.js";
6
- import { LegacyIconButton } from "../../LegacyComponents/IconButton/IconButton.js";
7
- import { useCurrentMenu } from "../../Menu/Context.js";
8
- import { useLocalization } from "../../Provider/Localization.js";
9
7
  import { useCurrentDrawer } from "../Context.js";
10
8
  import { getDrawerContainerClassNames, getDrawerContentClassNames, getDrawerDragHandlerClassNames } from "../util.js";
9
+ import { useLocalization } from "../../Provider/Localization.js";
10
+ import { LegacyIconButton } from "../../LegacyComponents/IconButton/IconButton.js";
11
11
  const RESIZE_MIN = 360;
12
12
  const RESIZE_MAX = 1e3;
13
13
  const RenderPropWrapper = React__default.forwardRef(function RenderPropWrapper2({ children, onClick, renderProps }, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../src/components/Drawer/components/Content.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport cn from 'clsx';\nimport React from 'react';\n\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useDraggable } from '../../../utils/hooks/useDraggable';\nimport type { GroupProps } from '../../Group/Group';\nimport { LegacyIconButton } from '../../LegacyComponents/IconButton/IconButton';\nimport { useCurrentMenu } from '../../Menu/Context';\nimport { useLocalization } from '../../Provider/Localization';\nimport { useCurrentDrawer } from '../Context';\nimport { getDrawerContainerClassNames, getDrawerContentClassNames, getDrawerDragHandlerClassNames } from '../util';\n\nconst RESIZE_MIN = 360;\nconst RESIZE_MAX = 1000;\n\nexport enum DrawerAnimationDefinition {\n Visible = 'visible',\n Hidden = 'hidden',\n}\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick, renderProps }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('close'));\n };\n\n return children({ close, ref, ...renderProps });\n});\n\nexport type DrawerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DrawerTitle(props: DrawerTitleProps, externalRef: React.Ref<HTMLHeadingElement>) {\n const { className, children, ...otherProps } = props;\n const ref = useMergedRef<HTMLHeadingElement>(externalRef);\n const [style, setStyle] = React.useState({});\n const { texts } = useLocalization();\n const { onClickBack } = useCurrentDrawer();\n\n /**\n * By design in default drawer version Title has grey separator, but we might have exceptions like Drawer + Tabs scenario,\n * where we might want to hide the grey separator. For this reason separator was rendered with using of classNames,\n * so it can be easily overriden in exceptional scenarios.\n * */\n const cName = cn('mb-0 flex grow-0 items-start justify-self-start border-b-[1px] border-gray-200 px-4 py-4', className);\n\n React.useEffect(() => {\n const drawer = ref?.current?.closest('[data-taco=\"drawer\"]');\n\n // This is the margin amount that we need to deduct from the margins to align with the design\n const marginAdjust = 4;\n\n const closeButton: HTMLButtonElement | null = drawer?.querySelector(`[aria-label=\"${texts.drawer.close}\"]`) ?? null;\n const closeButtonWidth = closeButton?.offsetWidth ?? 0;\n const closeButtonRightMargin = 8;\n\n const actionsWrapper: HTMLSpanElement | null = drawer?.querySelector('#taco-drawer-actions[data-taco=\"group\"]') ?? null;\n const actionsWrapperWidth = actionsWrapper?.offsetWidth ?? 0;\n const actionsWrapperRightMargin = 8;\n\n const marginRight =\n closeButtonWidth + actionsWrapperWidth + closeButtonRightMargin + actionsWrapperRightMargin - marginAdjust;\n\n setStyle({ marginRight });\n }, [ref, texts.drawer.close]);\n\n return (\n <DrawerPrimitive.Title className={cName} {...otherProps} ref={ref}>\n {onClickBack ? (\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.back}\n className=\"mr-3 text-base\"\n icon=\"chevron-left\"\n onClick={onClickBack}\n />\n ) : null}\n {\n // We need to apply the right margin as an inline style instead of using Tailwind CSS.\n // This is necessary because we are creating styles dynamically at runtime,\n // and Tailwind doesn't support generating runtime styles.\n }\n <span className=\"line-clamp-2 inline-block overflow-y-hidden\" style={style}>\n {children}\n </span>\n </DrawerPrimitive.Title>\n );\n});\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\nexport const Footer = React.forwardRef(function DrawerFooter(props: DrawerFooterProps, ref: React.Ref<HTMLDivElement>) {\n const { className: _1, ...otherProps } = props;\n /**\n * The same scenario as Title, grey separator rendered using classNames to have posibility to override it.\n */\n const cName = cn('mt-auto flex grow-0 justify-end border-t-[1px] border-gray-200 p-4', props.className);\n return <div {...otherProps} className={cName} ref={ref} />;\n});\n\nexport const Actions = React.forwardRef(function Actions(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { className, ...otherProps } = props;\n const cName = cn('absolute right-10 top-0 mr-[2] mt-4 flex gap-2', className);\n // Id is added to identify the actions wrapper inside a useEffect in Dialog.Title\n return <div {...otherProps} className={cName} id=\"taco-drawer-actions\" ref={ref} />;\n});\n\nexport type DrawerCloseProps = React.HTMLAttributes<HTMLButtonElement> & {\n children: React.ReactElement;\n};\n\nexport const Close = React.forwardRef(function DrawerClose(props: DrawerCloseProps, ref: React.Ref<HTMLButtonElement>) {\n const { onClose } = useCurrentDrawer();\n\n const { children, ...restProps } = props;\n\n return <DrawerPrimitive.Close {...restProps} onClick={onClose} ref={ref} render={children} />;\n});\n\nexport type DrawerInnerContentProps = React.HTMLAttributes<HTMLDivElement>;\n/**\n * It is container component, needed to provide default scrolling behaviour and padding, to simplyfy usage, requested by feature devs.\n * It is optional to use InnerContent component, if consumer need to implement custom behaviour or paddings for inner content,\n * then it's simply enough to render children and wrap them in custom implementation.\n */\nexport const InnerContent = React.forwardRef(function InnerContent(\n props: DrawerInnerContentProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const { className, children, ...otherProps } = props;\n return (\n <div {...otherProps} className={cn('flex grow flex-col overflow-y-hidden', className)} ref={ref}>\n <div className=\"w-full gap-y-0.5 overflow-auto p-4\">{children}</div>\n </div>\n );\n});\n\nexport type DrawerContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n /** An accessible label to be announced when the side drawer is opened */\n 'aria-label': string;\n children: React.ReactNode | ((props: { close: () => void }) => React.ReactNode);\n};\nexport const Content = React.forwardRef(function Content(props: DrawerContentProps, externalRef: React.Ref<HTMLDivElement>) {\n const { containerRef, size, onResize, variant, showCloseButton, outlet } = useCurrentDrawer();\n const { className, children, ...otherProps } = props;\n const { texts } = useLocalization();\n const ref = useMergedRef<HTMLDivElement>(externalRef);\n\n const contentRef = React.useRef(null);\n\n // if the drawer was opened by a menu, we need to close the menu when the drawer closes\n // the menu is still open (and mounted) because it is the trigger for the drawer\n const menu = useCurrentMenu();\n let finalFocus: DrawerPrimitive.Popup.Props['finalFocus'];\n\n if (menu) {\n finalFocus = () => {\n menu.close();\n };\n }\n\n const containerClassName: string = React.useMemo(() => cn(getDrawerContainerClassNames(variant), className), [className]);\n\n const { contentClassName, dragHandlerClassName } = React.useMemo(() => {\n const contentClassName = getDrawerContentClassNames(size, variant);\n const dragHandlerClassName: string = getDrawerDragHandlerClassNames();\n return { contentClassName, dragHandlerClassName };\n }, [size, variant]);\n\n const [containerWidth, setContainerWidth] = React.useState<number>();\n\n // resize\n const dragHandlerRef = React.useRef<HTMLDivElement>(null);\n\n const {\n position,\n dragging,\n handleProps: dragHandleProps,\n resetPosition,\n } = useDraggable(useMergedRef<HTMLDivElement>(dragHandlerRef));\n\n const resizedWidth = React.useMemo((): number | undefined => {\n if (containerWidth) {\n return Math.min(RESIZE_MAX, Math.max(RESIZE_MIN, containerWidth - position.x || 0));\n }\n return;\n }, [containerWidth, position]);\n\n React.useImperativeHandle(\n containerRef,\n () => ({\n onOpen: () => {\n requestAnimationFrame(() => {\n if (contentRef.current) {\n setContainerWidth((contentRef.current as HTMLElement)?.offsetWidth);\n }\n });\n },\n }),\n []\n );\n\n React.useEffect(() => {\n if (onResize) {\n onResize(position.x);\n }\n }, [position]);\n\n React.useEffect(() => {\n if (!dragging && resizedWidth) {\n setContainerWidth(resizedWidth);\n resetPosition();\n }\n }, [dragging]);\n\n let output;\n\n if (typeof children === 'function') {\n output = (\n <Close>\n <RenderPropWrapper>{children}</RenderPropWrapper>\n </Close>\n );\n } else {\n output = children;\n }\n\n const content = (\n <div ref={contentRef} data-taco=\"drawer\" className={containerClassName}>\n {output}\n <div className={dragHandlerClassName} {...dragHandleProps} data-testid=\"resize-handler\" ref={dragHandlerRef}>\n {dragging ? <div data-testid=\"resize-hit-area\" className=\"fixed bottom-0 left-0 right-0 top-0\" /> : null}\n </div>\n {showCloseButton ? (\n <Close>\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.close}\n className=\"absolute right-0 top-0 mr-2 mt-4\"\n icon=\"close\"\n />\n </Close>\n ) : null}\n </div>\n );\n\n if (!outlet) {\n return null;\n }\n\n return (\n <DrawerPrimitive.Portal container={outlet ?? undefined} className=\"h-full\">\n {variant === 'overlay' ? (\n <DrawerPrimitive.Backdrop\n className=\"fixed inset-0 cursor-default overflow-y-auto bg-brand-midnight/[0.3] print:absolute print:overflow-visible\"\n data-taco=\"backdrop\"\n />\n ) : null}\n <DrawerPrimitive.Viewport className=\"h-full\">\n <DrawerPrimitive.Popup\n {...otherProps}\n className={contentClassName}\n finalFocus={finalFocus}\n ref={ref}\n style={{ width: resizedWidth }}>\n <DrawerPrimitive.Content>{content}</DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n});\n"],"names":["React","RenderPropWrapper","DrawerPrimitive","Actions","InnerContent","Content","contentClassName","dragHandlerClassName"],"mappings":";;;;;;;;;;AAaA,MAAM,aAAa;AACnB,MAAM,aAAa;AAOnB,MAAM,oBAAoBA,eAAM,WAAW,SAASC,mBAAkB,EAAE,UAAU,SAAS,YAAA,GAAoB,KAAK;AAChH,QAAM,QAAQ,MAAM;AAChB,YAAQ,IAAI,YAAY,OAAO,CAAC;AAAA,EACpC;AAEA,SAAO,SA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AC;AAEb,MAAI;AAEJ,MAAI,OAAO,aAAa,YAAY;AAChC,aACIA,+BAAA,cAAC,OAAA,MACGA,+BAAA,cAAC,mBAAA,MAAmB,QAAS,CACjC;AAAA,EAER,OAAO;AACH,aAAS;AAAA,EACb;AAEA,QAAM,UACFA,+BAAA,cAAC,OAAA,EAAI,KAAK,YAAY,aAAU,UAAS,WAAW,sBAC/C,QACDA,+BAAA,cAAC,OAAA,EAAI,WAAW,sBAAuB,GAAG,iBAAiB,eAAY,kBAAiB,KAAK,eAAA,GACxF,WAAWA,+BAAA,cAAC,SAAI,eAAY,mBAAkB,WAAU,uCAAsC,IAAK,IACxG,GACC,+DACI,OAAA,MACGA,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,YAAW;AAAA,MACX,cAAY,MAAM,OAAO;AAAA,MACzB,WAAU;AAAA,MACV,MAAK;AAAA,IAAA;AAAA,EAAA,CAEb,IACA,IACR;AAGJ,MAAI,CAAC,QAAQ;AACT,WAAO;AAAA,EACX;AAEA,SACIA,+BAAA,cAACE,OAAgB,QAAhB,EAAuB,WAAW,UAAU,QAAW,WAAU,SAAA,GAC7D,YAAY,YACTF,+BAAA;AAAA,IAACE,OAAgB;AAAA,IAAhB;AAAA,MACG,WAAU;AAAA,MACV,aAAU;AAAA,IAAA;AAAA,EAAA,IAEd,MACJF,+BAAA,cAACE,OAAgB,UAAhB,EAAyB,WAAU,YAChCF,+BAAA;AAAA,IAACE,OAAgB;AAAA,IAAhB;AAAA,MACI,GAAG;AAAA,MACJ,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,OAAO,EAAE,OAAO,aAAA;AAAA,IAAa;AAAA,IAC7BF,+BAAA,cAACE,OAAgB,SAAhB,MAAyB,OAAQ;AAAA,EAAA,CAE1C,CACJ;AAER,CAAC;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../src/components/Drawer/components/Content.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport cn from 'clsx';\nimport React from 'react';\n\nimport type { GroupProps } from '@/components';\nimport { LegacyIconButton, useLocalization } from '@/components';\nimport { useCurrentMenu } from '@/components/Menu/Context';\nimport { useMergedRef } from '@/hooks/useMergedRef';\nimport { useDraggable } from '@/utils/hooks/useDraggable';\n\nimport { useCurrentDrawer } from '../Context';\nimport { getDrawerContainerClassNames, getDrawerContentClassNames, getDrawerDragHandlerClassNames } from '../util';\n\nconst RESIZE_MIN = 360;\nconst RESIZE_MAX = 1000;\n\nexport enum DrawerAnimationDefinition {\n Visible = 'visible',\n Hidden = 'hidden',\n}\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick, renderProps }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('close'));\n };\n\n return children({ close, ref, ...renderProps });\n});\n\nexport type DrawerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DrawerTitle(props: DrawerTitleProps, externalRef: React.Ref<HTMLHeadingElement>) {\n const { className, children, ...otherProps } = props;\n const ref = useMergedRef<HTMLHeadingElement>(externalRef);\n const [style, setStyle] = React.useState({});\n const { texts } = useLocalization();\n const { onClickBack } = useCurrentDrawer();\n\n /**\n * By design in default drawer version Title has grey separator, but we might have exceptions like Drawer + Tabs scenario,\n * where we might want to hide the grey separator. For this reason separator was rendered with using of classNames,\n * so it can be easily overriden in exceptional scenarios.\n * */\n const cName = cn('mb-0 flex grow-0 items-start justify-self-start border-b-[1px] border-gray-200 px-4 py-4', className);\n\n React.useEffect(() => {\n const drawer = ref?.current?.closest('[data-taco=\"drawer\"]');\n\n // This is the margin amount that we need to deduct from the margins to align with the design\n const marginAdjust = 4;\n\n const closeButton: HTMLButtonElement | null = drawer?.querySelector(`[aria-label=\"${texts.drawer.close}\"]`) ?? null;\n const closeButtonWidth = closeButton?.offsetWidth ?? 0;\n const closeButtonRightMargin = 8;\n\n const actionsWrapper: HTMLSpanElement | null = drawer?.querySelector('#taco-drawer-actions[data-taco=\"group\"]') ?? null;\n const actionsWrapperWidth = actionsWrapper?.offsetWidth ?? 0;\n const actionsWrapperRightMargin = 8;\n\n const marginRight =\n closeButtonWidth + actionsWrapperWidth + closeButtonRightMargin + actionsWrapperRightMargin - marginAdjust;\n\n setStyle({ marginRight });\n }, [ref, texts.drawer.close]);\n\n return (\n <DrawerPrimitive.Title className={cName} {...otherProps} ref={ref}>\n {onClickBack ? (\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.back}\n className=\"mr-3 text-base\"\n icon=\"chevron-left\"\n onClick={onClickBack}\n />\n ) : null}\n {\n // We need to apply the right margin as an inline style instead of using Tailwind CSS.\n // This is necessary because we are creating styles dynamically at runtime,\n // and Tailwind doesn't support generating runtime styles.\n }\n <span className=\"line-clamp-2 inline-block overflow-y-hidden\" style={style}>\n {children}\n </span>\n </DrawerPrimitive.Title>\n );\n});\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\nexport const Footer = React.forwardRef(function DrawerFooter(props: DrawerFooterProps, ref: React.Ref<HTMLDivElement>) {\n const { className: _1, ...otherProps } = props;\n /**\n * The same scenario as Title, grey separator rendered using classNames to have posibility to override it.\n */\n const cName = cn('mt-auto flex grow-0 justify-end border-t-[1px] border-gray-200 p-4', props.className);\n return <div {...otherProps} className={cName} ref={ref} />;\n});\n\nexport const Actions = React.forwardRef(function Actions(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { className, ...otherProps } = props;\n const cName = cn('absolute right-10 top-0 mr-[2] mt-4 flex gap-2', className);\n // Id is added to identify the actions wrapper inside a useEffect in Dialog.Title\n return <div {...otherProps} className={cName} id=\"taco-drawer-actions\" ref={ref} />;\n});\n\nexport type DrawerCloseProps = React.HTMLAttributes<HTMLButtonElement> & {\n children: React.ReactElement;\n};\n\nexport const Close = React.forwardRef(function DrawerClose(props: DrawerCloseProps, ref: React.Ref<HTMLButtonElement>) {\n const { onClose } = useCurrentDrawer();\n\n const { children, ...restProps } = props;\n\n return <DrawerPrimitive.Close {...restProps} onClick={onClose} ref={ref} render={children} />;\n});\n\nexport type DrawerInnerContentProps = React.HTMLAttributes<HTMLDivElement>;\n/**\n * It is container component, needed to provide default scrolling behaviour and padding, to simplyfy usage, requested by feature devs.\n * It is optional to use InnerContent component, if consumer need to implement custom behaviour or paddings for inner content,\n * then it's simply enough to render children and wrap them in custom implementation.\n */\nexport const InnerContent = React.forwardRef(function InnerContent(\n props: DrawerInnerContentProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const { className, children, ...otherProps } = props;\n return (\n <div {...otherProps} className={cn('flex grow flex-col overflow-y-hidden', className)} ref={ref}>\n <div className=\"w-full gap-y-0.5 overflow-auto p-4\">{children}</div>\n </div>\n );\n});\n\nexport type DrawerContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n /** An accessible label to be announced when the side drawer is opened */\n 'aria-label': string;\n children: React.ReactNode | ((props: { close: () => void }) => React.ReactNode);\n};\nexport const Content = React.forwardRef(function Content(props: DrawerContentProps, externalRef: React.Ref<HTMLDivElement>) {\n const { containerRef, size, onResize, variant, showCloseButton, outlet } = useCurrentDrawer();\n const { className, children, ...otherProps } = props;\n const { texts } = useLocalization();\n const ref = useMergedRef<HTMLDivElement>(externalRef);\n\n const contentRef = React.useRef(null);\n\n // if the drawer was opened by a menu, we need to close the menu when the drawer closes\n // the menu is still open (and mounted) because it is the trigger for the drawer\n const menu = useCurrentMenu();\n let finalFocus: DrawerPrimitive.Popup.Props['finalFocus'];\n\n if (menu) {\n finalFocus = () => {\n menu.close();\n };\n }\n\n const containerClassName: string = React.useMemo(() => cn(getDrawerContainerClassNames(variant), className), [className]);\n\n const { contentClassName, dragHandlerClassName } = React.useMemo(() => {\n const contentClassName = getDrawerContentClassNames(size, variant);\n const dragHandlerClassName: string = getDrawerDragHandlerClassNames();\n return { contentClassName, dragHandlerClassName };\n }, [size, variant]);\n\n const [containerWidth, setContainerWidth] = React.useState<number>();\n\n // resize\n const dragHandlerRef = React.useRef<HTMLDivElement>(null);\n\n const {\n position,\n dragging,\n handleProps: dragHandleProps,\n resetPosition,\n } = useDraggable(useMergedRef<HTMLDivElement>(dragHandlerRef));\n\n const resizedWidth = React.useMemo((): number | undefined => {\n if (containerWidth) {\n return Math.min(RESIZE_MAX, Math.max(RESIZE_MIN, containerWidth - position.x || 0));\n }\n return;\n }, [containerWidth, position]);\n\n React.useImperativeHandle(\n containerRef,\n () => ({\n onOpen: () => {\n requestAnimationFrame(() => {\n if (contentRef.current) {\n setContainerWidth((contentRef.current as HTMLElement)?.offsetWidth);\n }\n });\n },\n }),\n []\n );\n\n React.useEffect(() => {\n if (onResize) {\n onResize(position.x);\n }\n }, [position]);\n\n React.useEffect(() => {\n if (!dragging && resizedWidth) {\n setContainerWidth(resizedWidth);\n resetPosition();\n }\n }, [dragging]);\n\n let output;\n\n if (typeof children === 'function') {\n output = (\n <Close>\n <RenderPropWrapper>{children}</RenderPropWrapper>\n </Close>\n );\n } else {\n output = children;\n }\n\n const content = (\n <div ref={contentRef} data-taco=\"drawer\" className={containerClassName}>\n {output}\n <div className={dragHandlerClassName} {...dragHandleProps} data-testid=\"resize-handler\" ref={dragHandlerRef}>\n {dragging ? <div data-testid=\"resize-hit-area\" className=\"fixed bottom-0 left-0 right-0 top-0\" /> : null}\n </div>\n {showCloseButton ? (\n <Close>\n <LegacyIconButton\n appearance=\"discrete\"\n aria-label={texts.drawer.close}\n className=\"absolute right-0 top-0 mr-2 mt-4\"\n icon=\"close\"\n />\n </Close>\n ) : null}\n </div>\n );\n\n if (!outlet) {\n return null;\n }\n\n return (\n <DrawerPrimitive.Portal container={outlet ?? undefined} className=\"h-full\">\n {variant === 'overlay' ? (\n <DrawerPrimitive.Backdrop\n className=\"fixed inset-0 cursor-default overflow-y-auto bg-brand-midnight/[0.3] print:absolute print:overflow-visible\"\n data-taco=\"backdrop\"\n />\n ) : null}\n <DrawerPrimitive.Viewport className=\"h-full\">\n <DrawerPrimitive.Popup\n {...otherProps}\n className={contentClassName}\n finalFocus={finalFocus}\n ref={ref}\n style={{ width: resizedWidth }}>\n <DrawerPrimitive.Content>{content}</DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n});\n"],"names":["React","RenderPropWrapper","DrawerPrimitive","Actions","InnerContent","Content","contentClassName","dragHandlerClassName"],"mappings":";;;;;;;;;;AAaA,MAAM,aAAa;AACnB,MAAM,aAAa;AAOnB,MAAM,oBAAoBA,eAAM,WAAW,SAASC,mBAAkB,EAAE,UAAU,SAAS,YAAA,GAAoB,KAAK;AAChH,QAAM,QAAQ,MAAM;AAChB,YAAQ,IAAI,YAAY,OAAO,CAAC;AAAA,EACpC;AAEA,SAAO,SAAS,EAAE,OAAO,KAAK,GAAG,aAAa;AAClD,CAAC;AAGM,MAAM,QAAQD,eAAM,WAAW,SAAS,YAAY,OAAyB,aAA4C;AAC5H,QAAM,EAAE,WAAW,UAAU,GAAG,eAAe;AAC/C,QAAM,MAAM,aAAiC,WAAW;AACxD,QAAM,CAAC,OAAO,QAAQ,IAAIA,eAAM,SAAS,CAAA,CAAE;AAC3C,QAAM,EAAE,MAAA,IAAU,gBAAA;AAClB,QAAM,EAAE,YAAA,IAAgB,iBAAA;AAOxB,QAAM,QAAQ,GAAG,4FAA4F,SAAS;AAEtHA,iBAAM,UAAU,MAAM;AAClB,UAAM,SAAS,KAAK,SAAS,QAAQ,sBAAsB;AAG3D,UAAM,eAAe;AAErB,UAAM,cAAwC,QAAQ,cAAc,gBAAgB,MAAM,OAAO,KAAK,IAAI,KAAK;AAC/G,UAAM,mBAAmB,aAAa,eAAe;AACrD,UAAM,yBAAyB;AAE/B,UAAM,iBAAyC,QAAQ,cAAc,yCAAyC,KAAK;AACnH,UAAM,sBAAsB,gBAAgB,eAAe;AAC3D,UAAM,4BAA4B;AAElC,UAAM,cACF,mBAAmB,sBAAsB,yBAAyB,4BAA4B;AAElG,aAAS,EAAE,aAAa;AAAA,EAC5B,GAAG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AU;AAAA,MACV,aAAU;AAAA,IAAA;AAAA,EAAA,IAEd,MACJF,+BAAA,cAACE,OAAgB,UAAhB,EAAyB,WAAU,YAChCF,+BAAA;AAAA,IAACE,OAAgB;AAAA,IAAhB;AAAA,MACI,GAAG;AAAA,MACJ,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,OAAO,EAAE,OAAO,aAAA;AAAA,IAAa;AAAA,IAC7BF,+BAAA,cAACE,OAAgB,SAAhB,MAAyB,OAAQ;AAAA,EAAA,CAE1C,CACJ;AAER,CAAC;"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const cn = require("clsx");
4
4
  const React = require("react");
5
- const Truncate = require("../Truncate/Truncate.cjs");
6
5
  ;/* empty css */
6
+ const Truncate = require("../Truncate/Truncate.cjs");
7
7
  function _interopNamespaceDefault(e) {
8
8
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
9
  if (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"Field.cjs","sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport { Truncate } from '../Truncate/Truncate';\n\nimport './Field.css';\n\nexport type FieldProps = React.LabelHTMLAttributes<HTMLLabelElement> & {\n /** Content of the field */\n children: React.ReactNode;\n /**\tChanges the style to indicate the element is disabled */\n disabled?: boolean;\n /** Whether the input is in an invalid state */\n invalid?: boolean;\n /** Whether the input is in a warning state */\n warning?: boolean;\n /**\n * Text displayed below the children of Field.\n * Should be a short text that indicates feedback for user.\n */\n message?: string;\n};\n\nexport const Field = React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\n const messageRef = React.useRef<HTMLSpanElement>(null);\n\n const { disabled, children, invalid = false, warning = false, message, ...otherProps } = props;\n const className = cn(\n 'flex min-h-[theme(spacing.18)] flex-col pb-4 text-xs font-bold leading-loose',\n {\n 'text-gray-300': disabled,\n },\n props.className\n );\n const messageClassName = cn('-mb-4 h-4 truncate text-left text-xs font-normal leading-normal', {\n 'text-gray-700': !invalid && !warning,\n 'text-red-700': invalid,\n 'opacity-50': disabled,\n });\n\n return (\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\n {children}\n {message && (\n <Truncate tooltip={message}>\n <span\n className={messageClassName}\n data-taco=\"label-message\"\n ref={messageRef}\n role={invalid ? 'alert' : undefined}>\n {message}\n </span>\n </Truncate>\n )}\n </label>\n );\n});\n"],"names":["React","Field","Truncate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,QAAQA,iBAAM,WAAW,SAASC,OAAM,OAAmB,KAAkC;AACtG,QAAM,aAAaD,iBAAM,OAAwB,IAAI;AAErD,QAAM,EAAE,UAAU,UAAU,UAAU,OAAO,UAAU,OAAO,SAAS,GAAG,WAAA,IAAe;AACzF,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,iBAAiB;AAAA,IAAA;AAAA,IAErB,MAAM;AAAA,EAAA;AAEV,QAAM,mBAAmB,GAAG,mEAAmE;AAAA,IAC3F,iBAAiB,CAAC,WAAW,CAAC;AAAA,IAC9B,gBAAgB;AAAA,IAChB,cAAc;AAAA,EAAA,CACjB;AAED,SACIA,iCAAA,cAAC,SAAA,EAAO,GAAG,YAAY,WAAsB,aAAU,SAAQ,IAAA,GAC1D,UACA,WACGA,iCAAA,cAACE,SAAAA,UAAA,EAAS,SAAS,WACfF,iCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,MACX,aAAU;AAAA,MACV,KAAK;AAAA,MACL,MAAM,UAAU,UAAU;AAAA,IAAA;AAAA,IACzB;AAAA,EAAA,CAET,CAER;AAER,CAAC;;"}
1
+ {"version":3,"file":"Field.cjs","sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport { Truncate } from '@/components';\n\nimport './Field.css';\n\nexport type FieldProps = React.LabelHTMLAttributes<HTMLLabelElement> & {\n /** Content of the field */\n children: React.ReactNode;\n /**\tChanges the style to indicate the element is disabled */\n disabled?: boolean;\n /** Whether the input is in an invalid state */\n invalid?: boolean;\n /** Whether the input is in a warning state */\n warning?: boolean;\n /**\n * Text displayed below the children of Field.\n * Should be a short text that indicates feedback for user.\n */\n message?: string;\n};\n\nexport const Field = React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\n const messageRef = React.useRef<HTMLSpanElement>(null);\n\n const { disabled, children, invalid = false, warning = false, message, ...otherProps } = props;\n const className = cn(\n 'flex min-h-[theme(spacing.18)] flex-col pb-4 text-xs font-bold leading-loose',\n {\n 'text-gray-300': disabled,\n },\n props.className\n );\n const messageClassName = cn('-mb-4 h-4 truncate text-left text-xs font-normal leading-normal', {\n 'text-gray-700': !invalid && !warning,\n 'text-red-700': invalid,\n 'opacity-50': disabled,\n });\n\n return (\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\n {children}\n {message && (\n <Truncate tooltip={message}>\n <span\n className={messageClassName}\n data-taco=\"label-message\"\n ref={messageRef}\n role={invalid ? 'alert' : undefined}>\n {message}\n </span>\n </Truncate>\n )}\n </label>\n );\n});\n"],"names":["React","Field","Truncate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,QAAQA,iBAAM,WAAW,SAASC,OAAM,OAAmB,KAAkC;AACtG,QAAM,aAAaD,iBAAM,OAAwB,IAAI;AAErD,QAAM,EAAE,UAAU,UAAU,UAAU,OAAO,UAAU,OAAO,SAAS,GAAG,WAAA,IAAe;AACzF,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,iBAAiB;AAAA,IAAA;AAAA,IAErB,MAAM;AAAA,EAAA;AAEV,QAAM,mBAAmB,GAAG,mEAAmE;AAAA,IAC3F,iBAAiB,CAAC,WAAW,CAAC;AAAA,IAC9B,gBAAgB;AAAA,IAChB,cAAc;AAAA,EAAA,CACjB;AAED,SACIA,iCAAA,cAAC,SAAA,EAAO,GAAG,YAAY,WAAsB,aAAU,SAAQ,IAAA,GAC1D,UACA,WACGA,iCAAA,cAACE,SAAAA,UAAA,EAAS,SAAS,WACfF,iCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,MACX,aAAU;AAAA,MACV,KAAK;AAAA,MACL,MAAM,UAAU,UAAU;AAAA,IAAA;AAAA,IACzB;AAAA,EAAA,CAET,CAER;AAER,CAAC;;"}
@@ -1,7 +1,7 @@
1
1
  import cn from "clsx";
2
2
  import * as React from "react";
3
- import { Truncate } from "../Truncate/Truncate.js";
4
3
  /* empty css */
4
+ import { Truncate } from "../Truncate/Truncate.js";
5
5
  const Field = React.forwardRef(function Field2(props, ref) {
6
6
  const messageRef = React.useRef(null);
7
7
  const { disabled, children, invalid = false, warning = false, message, ...otherProps } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport { Truncate } from '../Truncate/Truncate';\n\nimport './Field.css';\n\nexport type FieldProps = React.LabelHTMLAttributes<HTMLLabelElement> & {\n /** Content of the field */\n children: React.ReactNode;\n /**\tChanges the style to indicate the element is disabled */\n disabled?: boolean;\n /** Whether the input is in an invalid state */\n invalid?: boolean;\n /** Whether the input is in a warning state */\n warning?: boolean;\n /**\n * Text displayed below the children of Field.\n * Should be a short text that indicates feedback for user.\n */\n message?: string;\n};\n\nexport const Field = React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\n const messageRef = React.useRef<HTMLSpanElement>(null);\n\n const { disabled, children, invalid = false, warning = false, message, ...otherProps } = props;\n const className = cn(\n 'flex min-h-[theme(spacing.18)] flex-col pb-4 text-xs font-bold leading-loose',\n {\n 'text-gray-300': disabled,\n },\n props.className\n );\n const messageClassName = cn('-mb-4 h-4 truncate text-left text-xs font-normal leading-normal', {\n 'text-gray-700': !invalid && !warning,\n 'text-red-700': invalid,\n 'opacity-50': disabled,\n });\n\n return (\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\n {children}\n {message && (\n <Truncate tooltip={message}>\n <span\n className={messageClassName}\n data-taco=\"label-message\"\n ref={messageRef}\n role={invalid ? 'alert' : undefined}>\n {message}\n </span>\n </Truncate>\n )}\n </label>\n );\n});\n"],"names":["Field"],"mappings":";;;;AAuBO,MAAM,QAAQ,MAAM,WAAW,SAASA,OAAM,OAAmB,KAAkC;AACtG,QAAM,aAAa,MAAM,OAAwB,IAAI;AAErD,QAAM,EAAE,UAAU,UAAU,UAAU,OAAO,UAAU,OAAO,SAAS,GAAG,WAAA,IAAe;AACzF,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,iBAAiB;AAAA,IAAA;AAAA,IAErB,MAAM;AAAA,EAAA;AAEV,QAAM,mBAAmB,GAAG,mEAAmE;AAAA,IAC3F,iBAAiB,CAAC,WAAW,CAAC;AAAA,IAC9B,gBAAgB;AAAA,IAChB,cAAc;AAAA,EAAA,CACjB;AAED,SACI,sBAAA,cAAC,SAAA,EAAO,GAAG,YAAY,WAAsB,aAAU,SAAQ,IAAA,GAC1D,UACA,WACG,sBAAA,cAAC,UAAA,EAAS,SAAS,WACf,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,MACX,aAAU;AAAA,MACV,KAAK;AAAA,MACL,MAAM,UAAU,UAAU;AAAA,IAAA;AAAA,IACzB;AAAA,EAAA,CAET,CAER;AAER,CAAC;"}
1
+ {"version":3,"file":"Field.js","sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport { Truncate } from '@/components';\n\nimport './Field.css';\n\nexport type FieldProps = React.LabelHTMLAttributes<HTMLLabelElement> & {\n /** Content of the field */\n children: React.ReactNode;\n /**\tChanges the style to indicate the element is disabled */\n disabled?: boolean;\n /** Whether the input is in an invalid state */\n invalid?: boolean;\n /** Whether the input is in a warning state */\n warning?: boolean;\n /**\n * Text displayed below the children of Field.\n * Should be a short text that indicates feedback for user.\n */\n message?: string;\n};\n\nexport const Field = React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\n const messageRef = React.useRef<HTMLSpanElement>(null);\n\n const { disabled, children, invalid = false, warning = false, message, ...otherProps } = props;\n const className = cn(\n 'flex min-h-[theme(spacing.18)] flex-col pb-4 text-xs font-bold leading-loose',\n {\n 'text-gray-300': disabled,\n },\n props.className\n );\n const messageClassName = cn('-mb-4 h-4 truncate text-left text-xs font-normal leading-normal', {\n 'text-gray-700': !invalid && !warning,\n 'text-red-700': invalid,\n 'opacity-50': disabled,\n });\n\n return (\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\n {children}\n {message && (\n <Truncate tooltip={message}>\n <span\n className={messageClassName}\n data-taco=\"label-message\"\n ref={messageRef}\n role={invalid ? 'alert' : undefined}>\n {message}\n </span>\n </Truncate>\n )}\n </label>\n );\n});\n"],"names":["Field"],"mappings":";;;;AAuBO,MAAM,QAAQ,MAAM,WAAW,SAASA,OAAM,OAAmB,KAAkC;AACtG,QAAM,aAAa,MAAM,OAAwB,IAAI;AAErD,QAAM,EAAE,UAAU,UAAU,UAAU,OAAO,UAAU,OAAO,SAAS,GAAG,WAAA,IAAe;AACzF,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,iBAAiB;AAAA,IAAA;AAAA,IAErB,MAAM;AAAA,EAAA;AAEV,QAAM,mBAAmB,GAAG,mEAAmE;AAAA,IAC3F,iBAAiB,CAAC,WAAW,CAAC;AAAA,IAC9B,gBAAgB;AAAA,IAChB,cAAc;AAAA,EAAA,CACjB;AAED,SACI,sBAAA,cAAC,SAAA,EAAO,GAAG,YAAY,WAAsB,aAAU,SAAQ,IAAA,GAC1D,UACA,WACG,sBAAA,cAAC,UAAA,EAAS,SAAS,WACf,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,MACX,aAAU;AAAA,MACV,KAAK;AAAA,MACL,MAAM,UAAU,UAAU;AAAA,IAAA;AAAA,IACzB;AAAA,EAAA,CAET,CAER;AAER,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Form.cjs","sources":["../../../src/components/Form/Form.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport './Form.css';\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {\n /** Content should be composed of other Taco form elements */\n children: React.ReactNode;\n /** Display the form fields in a horizontal layout */\n horizontal?: boolean;\n};\n\n/**\n * @deprecated\n */\nexport const Form = React.forwardRef(function Form(props: FormProps, ref: React.Ref<HTMLFormElement>) {\n const { horizontal = false, ...otherProps } = props;\n const className = cn(\n 'yt-form',\n {\n 'yt-form--horizontal flex flex-wrap': horizontal,\n },\n props.className\n );\n\n return <form {...otherProps} className={className} data-taco=\"form\" ref={ref} />;\n});\n"],"names":["React","Form"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,OAAOA,iBAAM,WAAW,SAASC,MAAK,OAAkB,KAAiC;AAClG,QAAM,EAAE,aAAa,OAAO,GAAG,eAAe;AAC9C,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,sCAAsC;AAAA,IAAA;AAAA,IAE1C,MAAM;AAAA,EAAA;AAGV,wDAAQ,QAAA,EAAM,GAAG,YAAY,WAAsB,aAAU,QAAO,KAAU;AAClF,CAAC;;"}
1
+ {"version":3,"file":"Form.cjs","sources":["../../../src/components/Form/Form.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport './Form.css';\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {\n /** Content should be composed of other Taco form elements */\n children: React.ReactNode;\n /** Display the form fields in a horizontal layout */\n horizontal?: boolean;\n};\n\n/**\n * @deprecated Use a combination of `<form>` (HTML) and `<Stack>`/`<Inline>` instead.\n */\nexport const Form = React.forwardRef(function Form(props: FormProps, ref: React.Ref<HTMLFormElement>) {\n const { horizontal = false, ...otherProps } = props;\n const className = cn(\n 'yt-form',\n {\n 'yt-form--horizontal flex flex-wrap': horizontal,\n },\n props.className\n );\n\n return <form {...otherProps} className={className} data-taco=\"form\" ref={ref} />;\n});\n"],"names":["React","Form"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,OAAOA,iBAAM,WAAW,SAASC,MAAK,OAAkB,KAAiC;AAClG,QAAM,EAAE,aAAa,OAAO,GAAG,eAAe;AAC9C,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,sCAAsC;AAAA,IAAA;AAAA,IAE1C,MAAM;AAAA,EAAA;AAGV,wDAAQ,QAAA,EAAM,GAAG,YAAY,WAAsB,aAAU,QAAO,KAAU;AAClF,CAAC;;"}
@@ -6,7 +6,7 @@ export type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {
6
6
  horizontal?: boolean;
7
7
  };
8
8
  /**
9
- * @deprecated
9
+ * @deprecated Use a combination of `<form>` (HTML) and `<Stack>`/`<Inline>` instead.
10
10
  */
11
11
  export declare const Form: React.ForwardRefExoticComponent<React.FormHTMLAttributes<HTMLFormElement> & {
12
12
  /** Content should be composed of other Taco form elements */
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../src/components/Form/Form.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport './Form.css';\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {\n /** Content should be composed of other Taco form elements */\n children: React.ReactNode;\n /** Display the form fields in a horizontal layout */\n horizontal?: boolean;\n};\n\n/**\n * @deprecated\n */\nexport const Form = React.forwardRef(function Form(props: FormProps, ref: React.Ref<HTMLFormElement>) {\n const { horizontal = false, ...otherProps } = props;\n const className = cn(\n 'yt-form',\n {\n 'yt-form--horizontal flex flex-wrap': horizontal,\n },\n props.className\n );\n\n return <form {...otherProps} className={className} data-taco=\"form\" ref={ref} />;\n});\n"],"names":["Form"],"mappings":";;;AAeO,MAAM,OAAO,MAAM,WAAW,SAASA,MAAK,OAAkB,KAAiC;AAClG,QAAM,EAAE,aAAa,OAAO,GAAG,eAAe;AAC9C,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,sCAAsC;AAAA,IAAA;AAAA,IAE1C,MAAM;AAAA,EAAA;AAGV,6CAAQ,QAAA,EAAM,GAAG,YAAY,WAAsB,aAAU,QAAO,KAAU;AAClF,CAAC;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../src/components/Form/Form.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport './Form.css';\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {\n /** Content should be composed of other Taco form elements */\n children: React.ReactNode;\n /** Display the form fields in a horizontal layout */\n horizontal?: boolean;\n};\n\n/**\n * @deprecated Use a combination of `<form>` (HTML) and `<Stack>`/`<Inline>` instead.\n */\nexport const Form = React.forwardRef(function Form(props: FormProps, ref: React.Ref<HTMLFormElement>) {\n const { horizontal = false, ...otherProps } = props;\n const className = cn(\n 'yt-form',\n {\n 'yt-form--horizontal flex flex-wrap': horizontal,\n },\n props.className\n );\n\n return <form {...otherProps} className={className} data-taco=\"form\" ref={ref} />;\n});\n"],"names":["Form"],"mappings":";;;AAeO,MAAM,OAAO,MAAM,WAAW,SAASA,MAAK,OAAkB,KAAiC;AAClG,QAAM,EAAE,aAAa,OAAO,GAAG,eAAe;AAC9C,QAAM,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACI,sCAAsC;AAAA,IAAA;AAAA,IAE1C,MAAM;AAAA,EAAA;AAGV,6CAAQ,QAAA,EAAM,GAAG,YAAY,WAAsB,aAAU,QAAO,KAAU;AAClF,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Group.cjs","sources":["../../../src/components/Group/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Orientation } from '../../types';\n\nexport type GroupProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * Change what html tag element will render.\n * Default value is `span`\n */\n as?: 'div' | 'span' | 'nav';\n /** Content should be composed of other Taco elements */\n children: React.ReactNode;\n /**\n * Define orientation of grouping.\n * @defaultValue horizontal\n */\n orientation?: Orientation;\n};\n\n/**\n * @deprecated\n */\nexport const Group = React.forwardRef(function Group(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { as: Tag = 'span', orientation = 'horizontal', ...otherProps } = props;\n const className = cn(\n 'flex gap-2 [&:has([data-taco=\"tag\"])]:!gap-1',\n { 'flex-col': orientation === 'vertical' },\n props.className\n );\n return <Tag {...otherProps} className={className} data-taco=\"group\" ref={ref} />;\n});\n"],"names":["React","Group"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,QAAQA,iBAAM,WAAW,SAASC,OAAM,OAAmB,KAAgC;AACpG,QAAM,EAAE,IAAI,MAAM,QAAQ,cAAc,cAAc,GAAG,eAAe;AACxE,QAAM,YAAY;AAAA,IACd;AAAA,IACA,EAAE,YAAY,gBAAgB,WAAA;AAAA,IAC9B,MAAM;AAAA,EAAA;AAEV,wDAAQ,KAAA,EAAK,GAAG,YAAY,WAAsB,aAAU,SAAQ,KAAU;AAClF,CAAC;;"}
1
+ {"version":3,"file":"Group.cjs","sources":["../../../src/components/Group/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Orientation } from '@/types';\n\nexport type GroupProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * Change what html tag element will render.\n * Default value is `span`\n */\n as?: 'div' | 'span' | 'nav';\n /** Content should be composed of other Taco elements */\n children: React.ReactNode;\n /**\n * Define orientation of grouping.\n * @defaultValue horizontal\n */\n orientation?: Orientation;\n};\n\n/**\n * @deprecated Use `<Inline>` instead.\n *\n */\nexport const Group = React.forwardRef(function Group(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { as: Tag = 'span', orientation = 'horizontal', ...otherProps } = props;\n const className = cn(\n 'flex gap-2 [&:has([data-taco=\"tag\"])]:!gap-1',\n { 'flex-col': orientation === 'vertical' },\n props.className\n );\n return <Tag {...otherProps} className={className} data-taco=\"group\" ref={ref} />;\n});\n"],"names":["React","Group"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,QAAQA,iBAAM,WAAW,SAASC,OAAM,OAAmB,KAAgC;AACpG,QAAM,EAAE,IAAI,MAAM,QAAQ,cAAc,cAAc,GAAG,eAAe;AACxE,QAAM,YAAY;AAAA,IACd;AAAA,IACA,EAAE,YAAY,gBAAgB,WAAA;AAAA,IAC9B,MAAM;AAAA,EAAA;AAEV,wDAAQ,KAAA,EAAK,GAAG,YAAY,WAAsB,aAAU,SAAQ,KAAU;AAClF,CAAC;;"}
@@ -15,7 +15,8 @@ export type GroupProps = React.HTMLAttributes<HTMLElement> & {
15
15
  orientation?: Orientation;
16
16
  };
17
17
  /**
18
- * @deprecated
18
+ * @deprecated Use `<Inline>` instead.
19
+ *
19
20
  */
20
21
  export declare const Group: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
21
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Group.js","sources":["../../../src/components/Group/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Orientation } from '../../types';\n\nexport type GroupProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * Change what html tag element will render.\n * Default value is `span`\n */\n as?: 'div' | 'span' | 'nav';\n /** Content should be composed of other Taco elements */\n children: React.ReactNode;\n /**\n * Define orientation of grouping.\n * @defaultValue horizontal\n */\n orientation?: Orientation;\n};\n\n/**\n * @deprecated\n */\nexport const Group = React.forwardRef(function Group(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { as: Tag = 'span', orientation = 'horizontal', ...otherProps } = props;\n const className = cn(\n 'flex gap-2 [&:has([data-taco=\"tag\"])]:!gap-1',\n { 'flex-col': orientation === 'vertical' },\n props.className\n );\n return <Tag {...otherProps} className={className} data-taco=\"group\" ref={ref} />;\n});\n"],"names":["Group"],"mappings":";;AAuBO,MAAM,QAAQ,MAAM,WAAW,SAASA,OAAM,OAAmB,KAAgC;AACpG,QAAM,EAAE,IAAI,MAAM,QAAQ,cAAc,cAAc,GAAG,eAAe;AACxE,QAAM,YAAY;AAAA,IACd;AAAA,IACA,EAAE,YAAY,gBAAgB,WAAA;AAAA,IAC9B,MAAM;AAAA,EAAA;AAEV,6CAAQ,KAAA,EAAK,GAAG,YAAY,WAAsB,aAAU,SAAQ,KAAU;AAClF,CAAC;"}
1
+ {"version":3,"file":"Group.js","sources":["../../../src/components/Group/Group.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Orientation } from '@/types';\n\nexport type GroupProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * Change what html tag element will render.\n * Default value is `span`\n */\n as?: 'div' | 'span' | 'nav';\n /** Content should be composed of other Taco elements */\n children: React.ReactNode;\n /**\n * Define orientation of grouping.\n * @defaultValue horizontal\n */\n orientation?: Orientation;\n};\n\n/**\n * @deprecated Use `<Inline>` instead.\n *\n */\nexport const Group = React.forwardRef(function Group(props: GroupProps, ref: React.Ref<HTMLDivElement>) {\n const { as: Tag = 'span', orientation = 'horizontal', ...otherProps } = props;\n const className = cn(\n 'flex gap-2 [&:has([data-taco=\"tag\"])]:!gap-1',\n { 'flex-col': orientation === 'vertical' },\n props.className\n );\n return <Tag {...otherProps} className={className} data-taco=\"group\" ref={ref} />;\n});\n"],"names":["Group"],"mappings":";;AAwBO,MAAM,QAAQ,MAAM,WAAW,SAASA,OAAM,OAAmB,KAAgC;AACpG,QAAM,EAAE,IAAI,MAAM,QAAQ,cAAc,cAAc,GAAG,eAAe;AACxE,QAAM,YAAY;AAAA,IACd;AAAA,IACA,EAAE,YAAY,gBAAgB,WAAA;AAAA,IAC9B,MAAM;AAAA,EAAA;AAEV,6CAAQ,KAAA,EAAK,GAAG,YAAY,WAAsB,aAAU,SAAQ,KAAU;AAClF,CAAC;"}
@@ -4,10 +4,10 @@ const popover = require("@base-ui/react/popover");
4
4
  const cn = require("clsx");
5
5
  const React = require("react");
6
6
  const mergeRefs = require("../../utils/mergeRefs.cjs");
7
- const IconButton = require("../LegacyComponents/IconButton/IconButton.cjs");
8
- const Localization = require("../Provider/Localization.cjs");
9
7
  const Arrow = require("./Arrow.cjs");
10
8
  ;/* empty css */
9
+ const Localization = require("../Provider/Localization.cjs");
10
+ const IconButton = require("../LegacyComponents/IconButton/IconButton.cjs");
11
11
  function _interopNamespaceDefault(e) {
12
12
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
13
13
  if (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"Hanger.cjs","sources":["../../../src/components/Hanger/Hanger.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react/popover';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Placement } from '../..';\nimport { mergeRefs } from '../../utils/mergeRefs';\nimport { LegacyIconButton } from '../LegacyComponents/IconButton/IconButton';\nimport { useLocalization } from '../Provider/Localization';\n\nimport { UnstyledArrow } from './Arrow';\n\nimport './Hanger.css';\n\ntype HangerContextValue = {\n /** Handler called when hanger closes by user interaction */\n onClose?: () => void;\n anchorRef: React.RefObject<HTMLElement | null>;\n};\nconst HangerContext = React.createContext<HangerContextValue>({\n anchorRef: { current: null },\n onClose: undefined,\n});\n\nexport type HangerTexts = {\n /** Aria-label for the close icon button of hanger */\n close: string;\n};\n\nexport type HangerAnchorProps = React.PropsWithChildren;\n// `Hanger.Anchor` is a pure pass-through that renders its child untouched. It exists only to keep\n// the composable API (<Hanger.Anchor>…</Hanger.Anchor>) — the Hanger root owns the single DOM\n// wrapper that serves as the positioning anchor, so this adds no DOM and needs no ref.\nconst Anchor: React.FC<HangerAnchorProps> = ({ children }) => <>{children}</>;\n\nexport type HangerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DialogTitle(props: HangerTitleProps, ref: React.Ref<HTMLHeadingElement>) {\n const className = cn('mb-1 flex w-full text-base font-bold', props.className);\n return <span {...props} className={className} ref={ref} />;\n});\n\nexport type HangerContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Set the position of the Hanger relative to its achor. Default value is `bottom` */\n placement?: Placement;\n hideWhenDetached?: boolean;\n container?: HTMLElement | null;\n};\n\nconst Content = React.forwardRef(function HangerContent(props: HangerContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, hideWhenDetached = false, container, ...popoverContentProps } = props;\n const context = React.useContext(HangerContext);\n const { texts } = useLocalization();\n const className = cn(\n 'max-w-sm rounded border border-transparent bg-blue-500 p-3 pr-12 text-white yt-shadow focus:border-transparent print:hidden',\n props.className\n );\n\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n anchor={context.anchorRef}\n className={hideWhenDetached ? 'data-[anchor-hidden]:hidden' : undefined}\n side={side}\n sideOffset={11}>\n <PopoverPrimitive.Popup {...popoverContentProps} className={className} data-taco=\"hanger\" ref={ref}>\n {props.children}\n <UnstyledArrow className=\"text-blue-500\" />\n <PopoverPrimitive.Close\n render={\n <LegacyIconButton\n appearance=\"primary\"\n aria-label={texts.hanger.close}\n className=\"absolute right-0 top-0 mx-2 mt-2 text-white\"\n icon=\"close\"\n onClick={context.onClose}\n />\n }\n />\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type HangerProps = React.PropsWithChildren<{\n /** An anchor to be used for the hanger, should not be set if `children` already contains an anchor */\n anchor?: React.JSX.Element;\n /**\n * Shows or hides hanger depending on the value\n * @defaultValue true\n */\n defaultOpen?: boolean;\n /** Handler called when user closes the hanger */\n onClose?: () => void;\n}>;\n\nexport type ForwardedHangerWithStatics = React.ForwardRefExoticComponent<HangerProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.FC<HangerAnchorProps>;\n Content: React.ForwardRefExoticComponent<HangerContentProps>;\n Title: React.ForwardRefExoticComponent<HangerTitleProps>;\n};\n\nexport const Hanger = React.forwardRef<HTMLSpanElement, HangerProps>(function Hanger(props, ref) {\n const { anchor, children, defaultOpen = true, onClose, ...otherProps } = props;\n const anchorRef = React.useRef<HTMLElement>(null);\n const combinedRef = mergeRefs([anchorRef as React.MutableRefObject<HTMLElement | null>, ref]);\n const context = React.useMemo(() => ({ anchorRef, onClose }), [onClose]);\n\n // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal\n const [open, setOpen] = React.useState(false);\n React.useEffect(() => {\n if (defaultOpen) {\n setOpen(defaultOpen);\n }\n }, []);\n\n // Hanger should only close from its close button, matching the previous Radix onInteractOutside behavior.\n const handleOpenChange = (nextOpen: boolean, eventDetails: PopoverPrimitive.Root.ChangeEventDetails) => {\n if (!nextOpen && (eventDetails.reason === 'outside-press' || eventDetails.reason === 'focus-out')) {\n eventDetails.cancel();\n return;\n }\n\n setOpen(nextOpen);\n };\n\n // Single inline <span> wrapper: serves as the Floating UI anchor (its rect matches the\n // in-flow trigger child) and contains the FloatingFocusManager guard spans Base UI injects\n // when open, so they aren't siblings of the Hanger in parent IntersectionObservers\n // (e.g. OverflowGroup's) and don't get counted as overflowed children.\n return (\n <HangerContext.Provider value={context}>\n <span {...otherProps} ref={combinedRef as React.Ref<HTMLSpanElement>}>\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n {/* Anchor via the `anchor` prop. */}\n {anchor}\n {/* Composition (<Hanger.Anchor>) and the popup Content (portaled out) come through {children}. */}\n {children}\n </PopoverPrimitive.Root>\n </span>\n </HangerContext.Provider>\n );\n}) as ForwardedHangerWithStatics;\nHanger.Anchor = Anchor;\nHanger.Content = Content;\nHanger.Title = Title;\n"],"names":["React","useLocalization","PopoverPrimitive","UnstyledArrow","LegacyIconButton","Hanger","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,gBAAgBA,iBAAM,cAAkC;AAAA,EAC1D,WAAW,EAAE,SAAS,KAAA;AAAA,EACt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;AAC7F,QAAM,EAAE,QAAQ,UAAU,cAAc,MAAM,SAAS,GAAG,eAAe;AACzE,QAAM,YAAYL,iBAAM,OAAoB,IAAI;AAChD,QAAM,cAAcM,UAAAA,UAAU,CAAC,WAAyD,GAAG,CAAC;AAC5F,QAAM,UAAUN,iBAAM,QAAQ,OAAO,EAAE,WAAW,QAAA,IAAY,CAAC,OAAO,CAAC;AAGvE,QAAM,CAAC,MAAM,OAAO,IAAIA,iBAAM,SAAS,KAAK;AAC5CA,mBAAM,UAAU,MAAM;AAClB,QAAI,aAAa;AACb,cAAQ,WAAW;AAAA,IACvB;AAAA,EACJ,GAAG,CAAA,CAAE;AAGL,QAAM,mBAAmB,CAAC,UAAmB,iBAA2D;AACpG,QAAI,CAAC,aAAa,aAAa,WAAW,mBAAmB,aAAa,WAAW,cAAc;AAC/F,mBAAa,OAAA;AACb;AAAA,IACJ;AAEA,YAAQ,QAAQ;AAAA,EACpB;AAMA,SACIA,iCAAA,cAAC,cAAc,UAAd,EAAuB,OAAO,QAAA,GAC3BA,iCAAA,cAAC,QAAA,EAAM,GAAG,YAAY,KAAK,eACvBA,iCAAA,cAACE,QAAAA,QAAiB,MAAjB,EAAsB,MAAY,cAAc,iBAAA,GAE5C,QAEA,QACL,CACJ,CACJ;AAER,CAAC;AACD,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,QAAQ;;;"}
1
+ {"version":3,"file":"Hanger.cjs","sources":["../../../src/components/Hanger/Hanger.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react/popover';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { LegacyIconButton, useLocalization } from '@/components';\nimport type { Placement } from '@/types';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nimport { UnstyledArrow } from './Arrow';\n\nimport './Hanger.css';\n\ntype HangerContextValue = {\n /** Handler called when hanger closes by user interaction */\n onClose?: () => void;\n anchorRef: React.RefObject<HTMLElement | null>;\n};\nconst HangerContext = React.createContext<HangerContextValue>({\n anchorRef: { current: null },\n onClose: undefined,\n});\n\nexport type HangerTexts = {\n /** Aria-label for the close icon button of hanger */\n close: string;\n};\n\nexport type HangerAnchorProps = React.PropsWithChildren;\n// `Hanger.Anchor` is a pure pass-through that renders its child untouched. It exists only to keep\n// the composable API (<Hanger.Anchor>…</Hanger.Anchor>) — the Hanger root owns the single DOM\n// wrapper that serves as the positioning anchor, so this adds no DOM and needs no ref.\nconst Anchor: React.FC<HangerAnchorProps> = ({ children }) => <>{children}</>;\n\nexport type HangerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DialogTitle(props: HangerTitleProps, ref: React.Ref<HTMLHeadingElement>) {\n const className = cn('mb-1 flex w-full text-base font-bold', props.className);\n return <span {...props} className={className} ref={ref} />;\n});\n\nexport type HangerContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Set the position of the Hanger relative to its achor. Default value is `bottom` */\n placement?: Placement;\n hideWhenDetached?: boolean;\n container?: HTMLElement | null;\n};\n\nconst Content = React.forwardRef(function HangerContent(props: HangerContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, hideWhenDetached = false, container, ...popoverContentProps } = props;\n const context = React.useContext(HangerContext);\n const { texts } = useLocalization();\n const className = cn(\n 'max-w-sm rounded border border-transparent bg-blue-500 p-3 pr-12 text-white yt-shadow focus:border-transparent print:hidden',\n props.className\n );\n\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n anchor={context.anchorRef}\n className={hideWhenDetached ? 'data-[anchor-hidden]:hidden' : undefined}\n side={side}\n sideOffset={11}>\n <PopoverPrimitive.Popup {...popoverContentProps} className={className} data-taco=\"hanger\" ref={ref}>\n {props.children}\n <UnstyledArrow className=\"text-blue-500\" />\n <PopoverPrimitive.Close\n render={\n <LegacyIconButton\n appearance=\"primary\"\n aria-label={texts.hanger.close}\n className=\"absolute right-0 top-0 mx-2 mt-2 text-white\"\n icon=\"close\"\n onClick={context.onClose}\n />\n }\n />\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type HangerProps = React.PropsWithChildren<{\n /** An anchor to be used for the hanger, should not be set if `children` already contains an anchor */\n anchor?: React.JSX.Element;\n /**\n * Shows or hides hanger depending on the value\n * @defaultValue true\n */\n defaultOpen?: boolean;\n /** Handler called when user closes the hanger */\n onClose?: () => void;\n}>;\n\nexport type ForwardedHangerWithStatics = React.ForwardRefExoticComponent<HangerProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.FC<HangerAnchorProps>;\n Content: React.ForwardRefExoticComponent<HangerContentProps>;\n Title: React.ForwardRefExoticComponent<HangerTitleProps>;\n};\n\nexport const Hanger = React.forwardRef<HTMLSpanElement, HangerProps>(function Hanger(props, ref) {\n const { anchor, children, defaultOpen = true, onClose, ...otherProps } = props;\n const anchorRef = React.useRef<HTMLElement>(null);\n const combinedRef = mergeRefs([anchorRef as React.MutableRefObject<HTMLElement | null>, ref]);\n const context = React.useMemo(() => ({ anchorRef, onClose }), [onClose]);\n\n // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal\n const [open, setOpen] = React.useState(false);\n React.useEffect(() => {\n if (defaultOpen) {\n setOpen(defaultOpen);\n }\n }, []);\n\n // Hanger should only close from its close button, matching the previous Radix onInteractOutside behavior.\n const handleOpenChange = (nextOpen: boolean, eventDetails: PopoverPrimitive.Root.ChangeEventDetails) => {\n if (!nextOpen && (eventDetails.reason === 'outside-press' || eventDetails.reason === 'focus-out')) {\n eventDetails.cancel();\n return;\n }\n\n setOpen(nextOpen);\n };\n\n // Single inline <span> wrapper: serves as the Floating UI anchor (its rect matches the\n // in-flow trigger child) and contains the FloatingFocusManager guard spans Base UI injects\n // when open, so they aren't siblings of the Hanger in parent IntersectionObservers\n // (e.g. OverflowGroup's) and don't get counted as overflowed children.\n return (\n <HangerContext.Provider value={context}>\n <span {...otherProps} ref={combinedRef as React.Ref<HTMLSpanElement>}>\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n {/* Anchor via the `anchor` prop. */}\n {anchor}\n {/* Composition (<Hanger.Anchor>) and the popup Content (portaled out) come through {children}. */}\n {children}\n </PopoverPrimitive.Root>\n </span>\n </HangerContext.Provider>\n );\n}) as ForwardedHangerWithStatics;\nHanger.Anchor = Anchor;\nHanger.Content = Content;\nHanger.Title = Title;\n"],"names":["React","useLocalization","PopoverPrimitive","UnstyledArrow","LegacyIconButton","Hanger","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,gBAAgBA,iBAAM,cAAkC;AAAA,EAC1D,WAAW,EAAE,SAAS,KAAA;AAAA,EACtB,SAAS;AACb,CAAC;AAWD,MAAM,SAAsC,CAAC,EAAE,SAAA,sFAAkB,QAAS;AAGnE,MAAM,QAAQA,iBAAM,WAAW,SAAS,YAAY,OAAyB,KAAoC;AACpH,QAAM,YAAY,GAAG,wCAAwC,MAAM,SAAS;AAC5E,SAAOA,iCAAA,cAAC,QAAA,EAAM,GAAG,OAAO,WAAsB,KAAU;AAC5D,CAAC;AASD,MAAM,UAAUA,iBAAM,WAAW,SAAS,cAAc,OAA2B,KAAgC;AAC/G,QAAM,EAAE,WAAW,MAAM,mBAAmB,OAAO,WAAW,GAAG,wBAAwB;AACzF,QAAM,UAAUA,iBAAM,WAAW,aAAa;AAC9C,QAAM,EAAE,MAAA,IAAUC,6BAAA;AAClB,QAAM,YAAY;AAAA,IACd;AAAA,IACA,MAAM;AAAA,EAAA;AAGV,SACID,iCAAA,cAACE,QAAAA,QAAiB,QAAjB,EAAwB,UAAA,GACrBF,iCAAA;AAAA,IAACE,QAAAA,QAAiB;AAAA,IAAjB;AAAA,MACG,QAAQ,QAAQ;AAAA,MAChB,WAAW,mBAAmB,gCAAgC;AAAA,MAC9D;AAAA,MACA,YAAY;AAAA,IAAA;AAAA,mDACXA,QAAAA,QAAiB,OAAjB,EAAwB,GAAG,qBAAqB,WAAsB,aAAU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C;AACD,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,QAAQ;;;"}
@@ -1,4 +1,4 @@
1
- import { Placement } from '../..';
1
+ import { Placement } from '../../types';
2
2
  import * as React from 'react';
3
3
  export type HangerTexts = {
4
4
  /** Aria-label for the close icon button of hanger */
@@ -2,10 +2,10 @@ import { Popover } from "@base-ui/react/popover";
2
2
  import cn from "clsx";
3
3
  import * as React from "react";
4
4
  import { mergeRefs } from "../../utils/mergeRefs.js";
5
- import { LegacyIconButton } from "../LegacyComponents/IconButton/IconButton.js";
6
- import { useLocalization } from "../Provider/Localization.js";
7
5
  import { UnstyledArrow } from "./Arrow.js";
8
6
  /* empty css */
7
+ import { useLocalization } from "../Provider/Localization.js";
8
+ import { LegacyIconButton } from "../LegacyComponents/IconButton/IconButton.js";
9
9
  const HangerContext = React.createContext({
10
10
  anchorRef: { current: null },
11
11
  onClose: void 0
@@ -1 +1 @@
1
- {"version":3,"file":"Hanger.js","sources":["../../../src/components/Hanger/Hanger.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react/popover';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport type { Placement } from '../..';\nimport { mergeRefs } from '../../utils/mergeRefs';\nimport { LegacyIconButton } from '../LegacyComponents/IconButton/IconButton';\nimport { useLocalization } from '../Provider/Localization';\n\nimport { UnstyledArrow } from './Arrow';\n\nimport './Hanger.css';\n\ntype HangerContextValue = {\n /** Handler called when hanger closes by user interaction */\n onClose?: () => void;\n anchorRef: React.RefObject<HTMLElement | null>;\n};\nconst HangerContext = React.createContext<HangerContextValue>({\n anchorRef: { current: null },\n onClose: undefined,\n});\n\nexport type HangerTexts = {\n /** Aria-label for the close icon button of hanger */\n close: string;\n};\n\nexport type HangerAnchorProps = React.PropsWithChildren;\n// `Hanger.Anchor` is a pure pass-through that renders its child untouched. It exists only to keep\n// the composable API (<Hanger.Anchor>…</Hanger.Anchor>) — the Hanger root owns the single DOM\n// wrapper that serves as the positioning anchor, so this adds no DOM and needs no ref.\nconst Anchor: React.FC<HangerAnchorProps> = ({ children }) => <>{children}</>;\n\nexport type HangerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DialogTitle(props: HangerTitleProps, ref: React.Ref<HTMLHeadingElement>) {\n const className = cn('mb-1 flex w-full text-base font-bold', props.className);\n return <span {...props} className={className} ref={ref} />;\n});\n\nexport type HangerContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Set the position of the Hanger relative to its achor. Default value is `bottom` */\n placement?: Placement;\n hideWhenDetached?: boolean;\n container?: HTMLElement | null;\n};\n\nconst Content = React.forwardRef(function HangerContent(props: HangerContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, hideWhenDetached = false, container, ...popoverContentProps } = props;\n const context = React.useContext(HangerContext);\n const { texts } = useLocalization();\n const className = cn(\n 'max-w-sm rounded border border-transparent bg-blue-500 p-3 pr-12 text-white yt-shadow focus:border-transparent print:hidden',\n props.className\n );\n\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n anchor={context.anchorRef}\n className={hideWhenDetached ? 'data-[anchor-hidden]:hidden' : undefined}\n side={side}\n sideOffset={11}>\n <PopoverPrimitive.Popup {...popoverContentProps} className={className} data-taco=\"hanger\" ref={ref}>\n {props.children}\n <UnstyledArrow className=\"text-blue-500\" />\n <PopoverPrimitive.Close\n render={\n <LegacyIconButton\n appearance=\"primary\"\n aria-label={texts.hanger.close}\n className=\"absolute right-0 top-0 mx-2 mt-2 text-white\"\n icon=\"close\"\n onClick={context.onClose}\n />\n }\n />\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type HangerProps = React.PropsWithChildren<{\n /** An anchor to be used for the hanger, should not be set if `children` already contains an anchor */\n anchor?: React.JSX.Element;\n /**\n * Shows or hides hanger depending on the value\n * @defaultValue true\n */\n defaultOpen?: boolean;\n /** Handler called when user closes the hanger */\n onClose?: () => void;\n}>;\n\nexport type ForwardedHangerWithStatics = React.ForwardRefExoticComponent<HangerProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.FC<HangerAnchorProps>;\n Content: React.ForwardRefExoticComponent<HangerContentProps>;\n Title: React.ForwardRefExoticComponent<HangerTitleProps>;\n};\n\nexport const Hanger = React.forwardRef<HTMLSpanElement, HangerProps>(function Hanger(props, ref) {\n const { anchor, children, defaultOpen = true, onClose, ...otherProps } = props;\n const anchorRef = React.useRef<HTMLElement>(null);\n const combinedRef = mergeRefs([anchorRef as React.MutableRefObject<HTMLElement | null>, ref]);\n const context = React.useMemo(() => ({ anchorRef, onClose }), [onClose]);\n\n // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal\n const [open, setOpen] = React.useState(false);\n React.useEffect(() => {\n if (defaultOpen) {\n setOpen(defaultOpen);\n }\n }, []);\n\n // Hanger should only close from its close button, matching the previous Radix onInteractOutside behavior.\n const handleOpenChange = (nextOpen: boolean, eventDetails: PopoverPrimitive.Root.ChangeEventDetails) => {\n if (!nextOpen && (eventDetails.reason === 'outside-press' || eventDetails.reason === 'focus-out')) {\n eventDetails.cancel();\n return;\n }\n\n setOpen(nextOpen);\n };\n\n // Single inline <span> wrapper: serves as the Floating UI anchor (its rect matches the\n // in-flow trigger child) and contains the FloatingFocusManager guard spans Base UI injects\n // when open, so they aren't siblings of the Hanger in parent IntersectionObservers\n // (e.g. OverflowGroup's) and don't get counted as overflowed children.\n return (\n <HangerContext.Provider value={context}>\n <span {...otherProps} ref={combinedRef as React.Ref<HTMLSpanElement>}>\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n {/* Anchor via the `anchor` prop. */}\n {anchor}\n {/* Composition (<Hanger.Anchor>) and the popup Content (portaled out) come through {children}. */}\n {children}\n </PopoverPrimitive.Root>\n </span>\n </HangerContext.Provider>\n );\n}) as ForwardedHangerWithStatics;\nHanger.Anchor = Anchor;\nHanger.Content = Content;\nHanger.Title = Title;\n"],"names":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C;AAoBM,MAAM,SAAS,MAAM,WAAyC,SAASC,QAAO,OAAO,KAAK;AAC7F,QAAM,EAAE,QAAQ,UAAU,cAAc,MAAM,SAAS,GAAG,eAAe;AACzE,QAAM,YAAY,MAAM,OAAoB,IAAI;AAChD,QAAM,cAAc,UAAU,CAAC,WAAyD,GAAG,CAAC;AAC5F,QAAM,UAAU,MAAM,QAAQ,OAAO,EAAE,WAAW,QAAA,IAAY,CAAC,OAAO,CAAC;AAGvE,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAC5C,QAAM,UAAU,MAAM;AAClB,QAAI,aAAa;AACb,cAAQ,WAAW;AAAA,IACvB;AAAA,EACJ,GAAG,CAAA,CAAE;AAGL,QAAM,mBAAmB,CAAC,UAAmB,iBAA2D;AACpG,QAAI,CAAC,aAAa,aAAa,WAAW,mBAAmB,aAAa,WAAW,cAAc;AAC/F,mBAAa,OAAA;AACb;AAAA,IACJ;AAEA,YAAQ,QAAQ;AAAA,EACpB;AAMA,SACI,sBAAA,cAAC,cAAc,UAAd,EAAuB,OAAO,QAAA,GAC3B,sBAAA,cAAC,QAAA,EAAM,GAAG,YAAY,KAAK,eACvB,sBAAA,cAACD,QAAiB,MAAjB,EAAsB,MAAY,cAAc,iBAAA,GAE5C,QAEA,QACL,CACJ,CACJ;AAER,CAAC;AACD,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,QAAQ;"}
1
+ {"version":3,"file":"Hanger.js","sources":["../../../src/components/Hanger/Hanger.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react/popover';\nimport cn from 'clsx';\nimport * as React from 'react';\n\nimport { LegacyIconButton, useLocalization } from '@/components';\nimport type { Placement } from '@/types';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nimport { UnstyledArrow } from './Arrow';\n\nimport './Hanger.css';\n\ntype HangerContextValue = {\n /** Handler called when hanger closes by user interaction */\n onClose?: () => void;\n anchorRef: React.RefObject<HTMLElement | null>;\n};\nconst HangerContext = React.createContext<HangerContextValue>({\n anchorRef: { current: null },\n onClose: undefined,\n});\n\nexport type HangerTexts = {\n /** Aria-label for the close icon button of hanger */\n close: string;\n};\n\nexport type HangerAnchorProps = React.PropsWithChildren;\n// `Hanger.Anchor` is a pure pass-through that renders its child untouched. It exists only to keep\n// the composable API (<Hanger.Anchor>…</Hanger.Anchor>) — the Hanger root owns the single DOM\n// wrapper that serves as the positioning anchor, so this adds no DOM and needs no ref.\nconst Anchor: React.FC<HangerAnchorProps> = ({ children }) => <>{children}</>;\n\nexport type HangerTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DialogTitle(props: HangerTitleProps, ref: React.Ref<HTMLHeadingElement>) {\n const className = cn('mb-1 flex w-full text-base font-bold', props.className);\n return <span {...props} className={className} ref={ref} />;\n});\n\nexport type HangerContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Set the position of the Hanger relative to its achor. Default value is `bottom` */\n placement?: Placement;\n hideWhenDetached?: boolean;\n container?: HTMLElement | null;\n};\n\nconst Content = React.forwardRef(function HangerContent(props: HangerContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, hideWhenDetached = false, container, ...popoverContentProps } = props;\n const context = React.useContext(HangerContext);\n const { texts } = useLocalization();\n const className = cn(\n 'max-w-sm rounded border border-transparent bg-blue-500 p-3 pr-12 text-white yt-shadow focus:border-transparent print:hidden',\n props.className\n );\n\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n anchor={context.anchorRef}\n className={hideWhenDetached ? 'data-[anchor-hidden]:hidden' : undefined}\n side={side}\n sideOffset={11}>\n <PopoverPrimitive.Popup {...popoverContentProps} className={className} data-taco=\"hanger\" ref={ref}>\n {props.children}\n <UnstyledArrow className=\"text-blue-500\" />\n <PopoverPrimitive.Close\n render={\n <LegacyIconButton\n appearance=\"primary\"\n aria-label={texts.hanger.close}\n className=\"absolute right-0 top-0 mx-2 mt-2 text-white\"\n icon=\"close\"\n onClick={context.onClose}\n />\n }\n />\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type HangerProps = React.PropsWithChildren<{\n /** An anchor to be used for the hanger, should not be set if `children` already contains an anchor */\n anchor?: React.JSX.Element;\n /**\n * Shows or hides hanger depending on the value\n * @defaultValue true\n */\n defaultOpen?: boolean;\n /** Handler called when user closes the hanger */\n onClose?: () => void;\n}>;\n\nexport type ForwardedHangerWithStatics = React.ForwardRefExoticComponent<HangerProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.FC<HangerAnchorProps>;\n Content: React.ForwardRefExoticComponent<HangerContentProps>;\n Title: React.ForwardRefExoticComponent<HangerTitleProps>;\n};\n\nexport const Hanger = React.forwardRef<HTMLSpanElement, HangerProps>(function Hanger(props, ref) {\n const { anchor, children, defaultOpen = true, onClose, ...otherProps } = props;\n const anchorRef = React.useRef<HTMLElement>(null);\n const combinedRef = mergeRefs([anchorRef as React.MutableRefObject<HTMLElement | null>, ref]);\n const context = React.useMemo(() => ({ anchorRef, onClose }), [onClose]);\n\n // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal\n const [open, setOpen] = React.useState(false);\n React.useEffect(() => {\n if (defaultOpen) {\n setOpen(defaultOpen);\n }\n }, []);\n\n // Hanger should only close from its close button, matching the previous Radix onInteractOutside behavior.\n const handleOpenChange = (nextOpen: boolean, eventDetails: PopoverPrimitive.Root.ChangeEventDetails) => {\n if (!nextOpen && (eventDetails.reason === 'outside-press' || eventDetails.reason === 'focus-out')) {\n eventDetails.cancel();\n return;\n }\n\n setOpen(nextOpen);\n };\n\n // Single inline <span> wrapper: serves as the Floating UI anchor (its rect matches the\n // in-flow trigger child) and contains the FloatingFocusManager guard spans Base UI injects\n // when open, so they aren't siblings of the Hanger in parent IntersectionObservers\n // (e.g. OverflowGroup's) and don't get counted as overflowed children.\n return (\n <HangerContext.Provider value={context}>\n <span {...otherProps} ref={combinedRef as React.Ref<HTMLSpanElement>}>\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n {/* Anchor via the `anchor` prop. */}\n {anchor}\n {/* Composition (<Hanger.Anchor>) and the popup Content (portaled out) come through {children}. */}\n {children}\n </PopoverPrimitive.Root>\n </span>\n </HangerContext.Provider>\n );\n}) as ForwardedHangerWithStatics;\nHanger.Anchor = Anchor;\nHanger.Content = Content;\nHanger.Title = Title;\n"],"names":["PopoverPrimitive","Hanger"],"mappings":";;;;;;;;AAiBA,MAAM,gBAAgB,MAAM,cAAkC;AAAA,EAC1D,WAAW,EAAE,SAAS,KAAA;AAAA,EACtB,SAAS;AACb,CAAC;AAWD,MAAM,SAAsC,CAAC,EAAE,SAAA,gEAAkB,QAAS;AAGnE,MAAM,QAAQ,MAAM,WAAW,SAAS,YAAY,OAAyB,KAAoC;AACpH,QAAM,YAAY,GAAG,wCAAwC,MAAM,SAAS;AAC5E,SAAO,sBAAA,cAAC,QAAA,EAAM,GAAG,OAAO,WAAsB,KAAU;AAC5D,CAAC;AASD,MAAM,UAAU,MAAM,WAAW,SAAS,cAAc,OAA2B,KAAgC;AAC/G,QAAM,EAAE,WAAW,MAAM,mBAAmB,OAAO,WAAW,GAAG,wBAAwB;AACzF,QAAM,UAAU,MAAM,WAAW,aAAa;AAC9C,QAAM,EAAE,MAAA,IAAU,gBAAA;AAClB,QAAM,YAAY;AAAA,IACd;AAAA,IACA,MAAM;AAAA,EAAA;AAGV,SACI,sBAAA,cAACA,QAAiB,QAAjB,EAAwB,UAAA,GACrB,sBAAA;AAAA,IAACA,QAAiB;AAAA,IAAjB;AAAA,MACG,QAAQ,QAAQ;AAAA,MAChB,WAAW,mBAAmB,gCAAgC;AAAA,MAC9D;AAAA,MACA,YAAY;AAAA,IAAA;AAAA,wCACXA,QAAiB,OAAjB,EAAwB,GAAG,qBAAqB,WAAsB,aAAU,UAAS,IAAA,GACrF,MAAM,UACP,sBAAA,cAAC,eAAA,EAAc,WAAU,iBAAgB,GAC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ge.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Badge } from '../../../Badge/Badge';\n\nimport type { Agreement } from './types';\n\nexport type AgreementBadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n agreement: Agreement;\n};\n\nexport const AgreementBadge = ({ agreement, ...props }: AgreementBadgeProps) => {\n if (agreement.isAdministrator) {\n return (\n <Badge {...props} color=\"blue\" small>\n Admin\n </Badge>\n );\n }\n if (agreement.isDeveloper) {\n return (\n <Badge {...props} color=\"blue\" small>\n Developer\n </Badge>\n );\n }\n\n return null;\n};\n"],"names":["Badge"],"mappings":";;;;AAUO,MAAM,iBAAiB,CAAC,EAAE,WAAW,GAAG,YAAiC;AAC5E,MAAI,UAAU,iBAAiB;AAC3B,WACI,sBAAA,cAACA,MAAAA,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,OAErC;AAAA,EAER;AACA,MAAI,UAAU,aAAa;AACvB,WACI,sBAAA,cAACA,MAAAA,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,WAErC;AAAA,EAER;AAEA,SAAO;AACX;;"}
1
+ {"version":3,"file":"Badge.cjs","sources":["../../../../../src/components/Header/components/Agreement/Badge.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Badge } from '@/components';\n\nimport type { Agreement } from './types';\n\nexport type AgreementBadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n agreement: Agreement;\n};\n\nexport const AgreementBadge = ({ agreement, ...props }: AgreementBadgeProps) => {\n if (agreement.isAdministrator) {\n return (\n <Badge {...props} color=\"blue\" small>\n Admin\n </Badge>\n );\n }\n if (agreement.isDeveloper) {\n return (\n <Badge {...props} color=\"blue\" small>\n Developer\n </Badge>\n );\n }\n\n return null;\n};\n"],"names":["Badge"],"mappings":";;;;AAUO,MAAM,iBAAiB,CAAC,EAAE,WAAW,GAAG,YAAiC;AAC5E,MAAI,UAAU,iBAAiB;AAC3B,WACI,sBAAA,cAACA,MAAAA,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,OAErC;AAAA,EAER;AACA,MAAI,UAAU,aAAa;AACvB,WACI,sBAAA,cAACA,MAAAA,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,WAErC;AAAA,EAER;AAEA,SAAO;AACX;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../../../src/components/Header/components/Agreement/Badge.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Badge } from '../../../Badge/Badge';\n\nimport type { Agreement } from './types';\n\nexport type AgreementBadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n agreement: Agreement;\n};\n\nexport const AgreementBadge = ({ agreement, ...props }: AgreementBadgeProps) => {\n if (agreement.isAdministrator) {\n return (\n <Badge {...props} color=\"blue\" small>\n Admin\n </Badge>\n );\n }\n if (agreement.isDeveloper) {\n return (\n <Badge {...props} color=\"blue\" small>\n Developer\n </Badge>\n );\n }\n\n return null;\n};\n"],"names":["React"],"mappings":";;AAUO,MAAM,iBAAiB,CAAC,EAAE,WAAW,GAAG,YAAiC;AAC5E,MAAI,UAAU,iBAAiB;AAC3B,WACIA,+BAAA,cAAC,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,OAErC;AAAA,EAER;AACA,MAAI,UAAU,aAAa;AACvB,WACIA,+BAAA,cAAC,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,WAErC;AAAA,EAER;AAEA,SAAO;AACX;"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../../../src/components/Header/components/Agreement/Badge.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Badge } from '@/components';\n\nimport type { Agreement } from './types';\n\nexport type AgreementBadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n agreement: Agreement;\n};\n\nexport const AgreementBadge = ({ agreement, ...props }: AgreementBadgeProps) => {\n if (agreement.isAdministrator) {\n return (\n <Badge {...props} color=\"blue\" small>\n Admin\n </Badge>\n );\n }\n if (agreement.isDeveloper) {\n return (\n <Badge {...props} color=\"blue\" small>\n Developer\n </Badge>\n );\n }\n\n return null;\n};\n"],"names":["React"],"mappings":";;AAUO,MAAM,iBAAiB,CAAC,EAAE,WAAW,GAAG,YAAiC;AAC5E,MAAI,UAAU,iBAAiB;AAC3B,WACIA,+BAAA,cAAC,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,OAErC;AAAA,EAER;AACA,MAAI,UAAU,aAAa;AACvB,WACIA,+BAAA,cAAC,SAAO,GAAG,OAAO,OAAM,QAAO,OAAK,QAAC,WAErC;AAAA,EAER;AAEA,SAAO;AACX;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Display.cjs","sources":["../../../../../src/components/Header/components/Agreement/Display.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useMatchMedia } from '../../../../hooks/useMatchMedia';\n\nimport { AgreementAvatar } from './Avatar';\nimport { AgreementBadge } from './Badge';\nimport { AgreementItem } from './Item';\nimport type { Agreement } from './types';\n\nexport type AgreementDisplayProps = {\n children?: React.JSX.Element | null;\n className?: string;\n currentAgreement: Agreement;\n fallbackImageSrc: string;\n};\n\nexport const AgreementDisplay = (props: AgreementDisplayProps) => {\n const { children, currentAgreement, fallbackImageSrc } = props;\n const isXlScreen = useMatchMedia('(min-width: 1280px)', window.innerWidth > 1280);\n\n if (isXlScreen) {\n const className = cn('h-12 flex-grow xl:[button>&]:hover:bg-white/[0.16]', props.className);\n return (\n <AgreementItem {...currentAgreement} children={children} className={className} fallbackImageSrc={fallbackImageSrc} />\n );\n }\n\n return (\n <span className=\"relative flex h-12 flex-grow items-center pr-2\">\n <AgreementAvatar\n fallbackSrc={fallbackImageSrc}\n src={currentAgreement.imageSrc}\n title={`${currentAgreement.name} - ${currentAgreement.number} ${currentAgreement.userId}`}\n />\n <AgreementBadge agreement={currentAgreement} className=\"absolute right-0 top-0 -mr-1 w-8 !justify-start\" />\n </span>\n );\n};\n"],"names":["useMatchMedia","AgreementItem","AgreementAvatar","AgreementBadge"],"mappings":";;;;;;;;AAiBO,MAAM,mBAAmB,CAAC,UAAiC;AAC9D,QAAM,EAAE,UAAU,kBAAkB,iBAAA,IAAqB;AACzD,QAAM,aAAaA,cAAAA,cAAc,uBAAuB,OAAO,aAAa,IAAI;AAEhF,MAAI,YAAY;AACZ,UAAM,YAAY,GAAG,sDAAsD,MAAM,SAAS;AAC1F,+CACKC,oBAAA,EAAe,GAAG,kBAAkB,UAAoB,WAAsB,kBAAoC;AAAA,EAE3H;AAEA,SACI,sBAAA,cAAC,QAAA,EAAK,WAAU,iDAAA,GACZ,sBAAA;AAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACG,aAAa;AAAA,MACb,KAAK,iBAAiB;AAAA,MACtB,OAAO,GAAG,iBAAiB,IAAI,MAAM,iBAAiB,MAAM,IAAI,iBAAiB,MAAM;AAAA,IAAA;AAAA,EAAA,GAE3F,sBAAA,cAACC,sBAAA,EAAe,WAAW,kBAAkB,WAAU,mDAAkD,CAC7G;AAER;;"}
1
+ {"version":3,"file":"Display.cjs","sources":["../../../../../src/components/Header/components/Agreement/Display.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useMatchMedia } from '@/hooks/useMatchMedia';\n\nimport { AgreementAvatar } from './Avatar';\nimport { AgreementBadge } from './Badge';\nimport { AgreementItem } from './Item';\nimport type { Agreement } from './types';\n\nexport type AgreementDisplayProps = {\n children?: React.JSX.Element | null;\n className?: string;\n currentAgreement: Agreement;\n fallbackImageSrc: string;\n};\n\nexport const AgreementDisplay = (props: AgreementDisplayProps) => {\n const { children, currentAgreement, fallbackImageSrc } = props;\n const isXlScreen = useMatchMedia('(min-width: 1280px)', window.innerWidth > 1280);\n\n if (isXlScreen) {\n const className = cn('h-12 flex-grow xl:[button>&]:hover:bg-white/[0.16]', props.className);\n return (\n <AgreementItem {...currentAgreement} children={children} className={className} fallbackImageSrc={fallbackImageSrc} />\n );\n }\n\n return (\n <span className=\"relative flex h-12 flex-grow items-center pr-2\">\n <AgreementAvatar\n fallbackSrc={fallbackImageSrc}\n src={currentAgreement.imageSrc}\n title={`${currentAgreement.name} - ${currentAgreement.number} ${currentAgreement.userId}`}\n />\n <AgreementBadge agreement={currentAgreement} className=\"absolute right-0 top-0 -mr-1 w-8 !justify-start\" />\n </span>\n );\n};\n"],"names":["useMatchMedia","AgreementItem","AgreementAvatar","AgreementBadge"],"mappings":";;;;;;;;AAiBO,MAAM,mBAAmB,CAAC,UAAiC;AAC9D,QAAM,EAAE,UAAU,kBAAkB,iBAAA,IAAqB;AACzD,QAAM,aAAaA,cAAAA,cAAc,uBAAuB,OAAO,aAAa,IAAI;AAEhF,MAAI,YAAY;AACZ,UAAM,YAAY,GAAG,sDAAsD,MAAM,SAAS;AAC1F,+CACKC,oBAAA,EAAe,GAAG,kBAAkB,UAAoB,WAAsB,kBAAoC;AAAA,EAE3H;AAEA,SACI,sBAAA,cAAC,QAAA,EAAK,WAAU,iDAAA,GACZ,sBAAA;AAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACG,aAAa;AAAA,MACb,KAAK,iBAAiB;AAAA,MACtB,OAAO,GAAG,iBAAiB,IAAI,MAAM,iBAAiB,MAAM,IAAI,iBAAiB,MAAM;AAAA,IAAA;AAAA,EAAA,GAE3F,sBAAA,cAACC,sBAAA,EAAe,WAAW,kBAAkB,WAAU,mDAAkD,CAC7G;AAER;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Display.js","sources":["../../../../../src/components/Header/components/Agreement/Display.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useMatchMedia } from '../../../../hooks/useMatchMedia';\n\nimport { AgreementAvatar } from './Avatar';\nimport { AgreementBadge } from './Badge';\nimport { AgreementItem } from './Item';\nimport type { Agreement } from './types';\n\nexport type AgreementDisplayProps = {\n children?: React.JSX.Element | null;\n className?: string;\n currentAgreement: Agreement;\n fallbackImageSrc: string;\n};\n\nexport const AgreementDisplay = (props: AgreementDisplayProps) => {\n const { children, currentAgreement, fallbackImageSrc } = props;\n const isXlScreen = useMatchMedia('(min-width: 1280px)', window.innerWidth > 1280);\n\n if (isXlScreen) {\n const className = cn('h-12 flex-grow xl:[button>&]:hover:bg-white/[0.16]', props.className);\n return (\n <AgreementItem {...currentAgreement} children={children} className={className} fallbackImageSrc={fallbackImageSrc} />\n );\n }\n\n return (\n <span className=\"relative flex h-12 flex-grow items-center pr-2\">\n <AgreementAvatar\n fallbackSrc={fallbackImageSrc}\n src={currentAgreement.imageSrc}\n title={`${currentAgreement.name} - ${currentAgreement.number} ${currentAgreement.userId}`}\n />\n <AgreementBadge agreement={currentAgreement} className=\"absolute right-0 top-0 -mr-1 w-8 !justify-start\" />\n </span>\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAiBO,MAAM,mBAAmB,CAAC,UAAiC;AAC9D,QAAM,EAAE,UAAU,kBAAkB,iBAAA,IAAqB;AACzD,QAAM,aAAa,cAAc,uBAAuB,OAAO,aAAa,IAAI;AAEhF,MAAI,YAAY;AACZ,UAAM,YAAY,GAAG,sDAAsD,MAAM,SAAS;AAC1F,wDACK,eAAA,EAAe,GAAG,kBAAkB,UAAoB,WAAsB,kBAAoC;AAAA,EAE3H;AAEA,SACIA,+BAAA,cAAC,QAAA,EAAK,WAAU,iDAAA,GACZA,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,aAAa;AAAA,MACb,KAAK,iBAAiB;AAAA,MACtB,OAAO,GAAG,iBAAiB,IAAI,MAAM,iBAAiB,MAAM,IAAI,iBAAiB,MAAM;AAAA,IAAA;AAAA,EAAA,GAE3FA,+BAAA,cAAC,gBAAA,EAAe,WAAW,kBAAkB,WAAU,mDAAkD,CAC7G;AAER;"}
1
+ {"version":3,"file":"Display.js","sources":["../../../../../src/components/Header/components/Agreement/Display.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { useMatchMedia } from '@/hooks/useMatchMedia';\n\nimport { AgreementAvatar } from './Avatar';\nimport { AgreementBadge } from './Badge';\nimport { AgreementItem } from './Item';\nimport type { Agreement } from './types';\n\nexport type AgreementDisplayProps = {\n children?: React.JSX.Element | null;\n className?: string;\n currentAgreement: Agreement;\n fallbackImageSrc: string;\n};\n\nexport const AgreementDisplay = (props: AgreementDisplayProps) => {\n const { children, currentAgreement, fallbackImageSrc } = props;\n const isXlScreen = useMatchMedia('(min-width: 1280px)', window.innerWidth > 1280);\n\n if (isXlScreen) {\n const className = cn('h-12 flex-grow xl:[button>&]:hover:bg-white/[0.16]', props.className);\n return (\n <AgreementItem {...currentAgreement} children={children} className={className} fallbackImageSrc={fallbackImageSrc} />\n );\n }\n\n return (\n <span className=\"relative flex h-12 flex-grow items-center pr-2\">\n <AgreementAvatar\n fallbackSrc={fallbackImageSrc}\n src={currentAgreement.imageSrc}\n title={`${currentAgreement.name} - ${currentAgreement.number} ${currentAgreement.userId}`}\n />\n <AgreementBadge agreement={currentAgreement} className=\"absolute right-0 top-0 -mr-1 w-8 !justify-start\" />\n </span>\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAiBO,MAAM,mBAAmB,CAAC,UAAiC;AAC9D,QAAM,EAAE,UAAU,kBAAkB,iBAAA,IAAqB;AACzD,QAAM,aAAa,cAAc,uBAAuB,OAAO,aAAa,IAAI;AAEhF,MAAI,YAAY;AACZ,UAAM,YAAY,GAAG,sDAAsD,MAAM,SAAS;AAC1F,wDACK,eAAA,EAAe,GAAG,kBAAkB,UAAoB,WAAsB,kBAAoC;AAAA,EAE3H;AAEA,SACIA,+BAAA,cAAC,QAAA,EAAK,WAAU,iDAAA,GACZA,+BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,aAAa;AAAA,MACb,KAAK,iBAAiB;AAAA,MACtB,OAAO,GAAG,iBAAiB,IAAI,MAAM,iBAAiB,MAAM,IAAI,iBAAiB,MAAM;AAAA,IAAA;AAAA,EAAA,GAE3FA,+BAAA,cAAC,gBAAA,EAAe,WAAW,kBAAkB,WAAU,mDAAkD,CAC7G;AAER;"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const cn = require("clsx");
4
4
  const React = require("react");
5
- const Icon = require("../../../Icon/Icon.cjs");
6
5
  const Avatar = require("./Avatar.cjs");
7
6
  const Badge = require("./Badge.cjs");
7
+ const Icon = require("../../../Icon/Icon.cjs");
8
8
  const AgreementItem = (props) => {
9
9
  const { children, className: customClassName, fallbackImageSrc, ...agreement } = props;
10
10
  const className = cn("flex w-full items-center gap-2 overflow-hidden rounded px-2 text-left", customClassName);
@@ -1 +1 @@
1
- {"version":3,"file":"Item.cjs","sources":["../../../../../src/components/Header/components/Agreement/Item.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { Icon } from '../../../Icon/Icon';\n\nimport { AgreementAvatar } from './Avatar';\nimport { AgreementBadge } from './Badge';\nimport type { Agreement } from './types';\n\nexport type AgreementItemProps = Agreement & {\n children?: React.JSX.Element | null;\n className?: string;\n fallbackImageSrc: string;\n};\n\nexport const AgreementItem = (props: AgreementItemProps) => {\n const { children, className: customClassName, fallbackImageSrc, ...agreement } = props;\n const className = cn('flex w-full items-center gap-2 overflow-hidden rounded px-2 text-left', customClassName);\n\n return (\n <span className={className}>\n <AgreementAvatar\n fallbackSrc={fallbackImageSrc}\n src={agreement.imageSrc}\n title={`${agreement.name} - ${agreement.number} ${agreement.userId}`}\n />\n <span className=\"flex flex-col overflow-hidden\">\n <span className=\"flex truncate text-white\" title={agreement.name}>\n <span className=\"truncate\">{agreement.name}</span>{' '}\n {agreement.secure ? (\n <Icon name=\"secure-tick\" className=\"mb-0.5 ml-1 mt-0.5 !h-4 !w-4 flex-shrink-0 flex-grow-0\" />\n ) : null}\n </span>\n <span className=\"whitespace-nowrap text-xs text-gray-100\">\n {agreement.number} {agreement.userId} <AgreementBadge agreement={agreement} />\n </span>\n </span>\n {children}\n </span>\n );\n};\n"],"names":["AgreementAvatar","Icon","AgreementBadge"],"mappings":";;;;;;;AAeO,MAAM,gBAAgB,CAAC,UAA8B;AACxD,QAAM,EAAE,UAAU,WAAW,iBAAiB,kBAAkB,GAAG,cAAc;AACjF,QAAM,YAAY,GAAG,yEAAyE,eAAe;AAE7G,SACI,sBAAA,cAAC,UAAK,UAAA,GACF,sBAAA;AAAA,IAACA,OAAAA;AAAAA,IAAA;AAAA,MACG,aAAa;AAAA,MACb,KAAK,UAAU;AAAA,MACf,OAAO,GAAG,UAAU,IAAI,MAAM,UAAU,MAAM,IAAI,UAAU,MAAM;AAAA,IAAA;AAAA,EAAA,uCAErE,QAAA,EAAK,WAAU,mCACZ,sBAAA,cAAC,QAAA,EAAK,WAAU,4BAA2B,OAAO,UAAU,KAAA,GACxD,sBAAA,cAAC,UAAK,WAAU,cAAY,UAAU,IAAK,GAAQ,KAClD,UAAU,SACP,sBAAA,cAACC,KAAAA,QAAK,MAAK,eAAc,WAAU,yDAAA,CAAyD,IAC5F,IACR,GACA,sBAAA,cAAC,QAAA,EAAK,WAAU,0CAAA,GACX,UAAU,QAAO,KAAE,UAAU,QAAO,KAAC,sBAAA,cAACC,MAAAA,kBAAe,UAAA,CAAsB,CAChF,CACJ,GACC,QACL;AAER;;"}
1
+ {"version":3,"file":"Item.cjs","sources":["../../../../../src/components/Header/components/Agreement/Item.tsx"],"sourcesContent":["import cn from 'clsx';\nimport React from 'react';\n\nimport { Icon } from '@/components';\n\nimport { AgreementAvatar } from './Avatar';\nimport { AgreementBadge } from './Badge';\nimport type { Agreement } from './types';\n\nexport type AgreementItemProps = Agreement & {\n children?: React.JSX.Element | null;\n className?: string;\n fallbackImageSrc: string;\n};\n\nexport const AgreementItem = (props: AgreementItemProps) => {\n const { children, className: customClassName, fallbackImageSrc, ...agreement } = props;\n const className = cn('flex w-full items-center gap-2 overflow-hidden rounded px-2 text-left', customClassName);\n\n return (\n <span className={className}>\n <AgreementAvatar\n fallbackSrc={fallbackImageSrc}\n src={agreement.imageSrc}\n title={`${agreement.name} - ${agreement.number} ${agreement.userId}`}\n />\n <span className=\"flex flex-col overflow-hidden\">\n <span className=\"flex truncate text-white\" title={agreement.name}>\n <span className=\"truncate\">{agreement.name}</span>{' '}\n {agreement.secure ? (\n <Icon name=\"secure-tick\" className=\"mb-0.5 ml-1 mt-0.5 !h-4 !w-4 flex-shrink-0 flex-grow-0\" />\n ) : null}\n </span>\n <span className=\"whitespace-nowrap text-xs text-gray-100\">\n {agreement.number} {agreement.userId} <AgreementBadge agreement={agreement} />\n </span>\n </span>\n {children}\n </span>\n );\n};\n"],"names":["AgreementAvatar","Icon","AgreementBadge"],"mappings":";;;;;;;AAeO,MAAM,gBAAgB,CAAC,UAA8B;AACxD,QAAM,EAAE,UAAU,WAAW,iBAAiB,kBAAkB,GAAG,cAAc;AACjF,QAAM,YAAY,GAAG,yEAAyE,eAAe;AAE7G,SACI,sBAAA,cAAC,UAAK,UAAA,GACF,sBAAA;AAAA,IAACA,OAAAA;AAAAA,IAAA;AAAA,MACG,aAAa;AAAA,MACb,KAAK,UAAU;AAAA,MACf,OAAO,GAAG,UAAU,IAAI,MAAM,UAAU,MAAM,IAAI,UAAU,MAAM;AAAA,IAAA;AAAA,EAAA,uCAErE,QAAA,EAAK,WAAU,mCACZ,sBAAA,cAAC,QAAA,EAAK,WAAU,4BAA2B,OAAO,UAAU,KAAA,GACxD,sBAAA,cAAC,UAAK,WAAU,cAAY,UAAU,IAAK,GAAQ,KAClD,UAAU,SACP,sBAAA,cAACC,KAAAA,QAAK,MAAK,eAAc,WAAU,yDAAA,CAAyD,IAC5F,IACR,GACA,sBAAA,cAAC,QAAA,EAAK,WAAU,0CAAA,GACX,UAAU,QAAO,KAAE,UAAU,QAAO,KAAC,sBAAA,cAACC,MAAAA,kBAAe,UAAA,CAAsB,CAChF,CACJ,GACC,QACL;AAER;;"}