@youcan/celeste 0.21.1 → 0.22.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 (539) hide show
  1. package/ai/README.md +1 -1
  2. package/ai/component-registry.json +2 -2
  3. package/ai/icons.json +2 -2
  4. package/ai/tokens.json +2 -2
  5. package/dist/celeste.css +3054 -3050
  6. package/dist/cjs/chunks/alert.cjs +4 -2
  7. package/dist/cjs/chunks/badge.cjs +4 -2
  8. package/dist/cjs/chunks/bar-chart.cjs +17 -10016
  9. package/dist/cjs/chunks/button.cjs +6 -4
  10. package/dist/cjs/chunks/calendar.cjs +20 -796
  11. package/dist/cjs/chunks/chart-card.cjs +4 -2
  12. package/dist/cjs/chunks/chart-legend.cjs +4 -2
  13. package/dist/cjs/chunks/chart-plot.cjs +4 -2
  14. package/dist/cjs/chunks/checkbox-card.cjs +11 -10
  15. package/dist/cjs/chunks/checkbox-label.cjs +12 -11
  16. package/dist/cjs/chunks/checkbox.cjs +7 -227
  17. package/dist/cjs/chunks/collapsible-content.cjs +5 -105
  18. package/dist/cjs/chunks/collapsible-trigger.cjs +2 -50
  19. package/dist/cjs/chunks/collapsible.cjs +3 -4
  20. package/dist/cjs/chunks/color-picker.cjs +21 -19
  21. package/dist/cjs/chunks/color-swatch.cjs +5 -3
  22. package/dist/cjs/chunks/combobox-anchor.cjs +6 -44
  23. package/dist/cjs/chunks/combobox-empty.cjs +5 -30
  24. package/dist/cjs/chunks/combobox-group.cjs +6 -5
  25. package/dist/cjs/chunks/combobox-input.cjs +6 -4
  26. package/dist/cjs/chunks/combobox-item.cjs +10 -66
  27. package/dist/cjs/chunks/combobox-list.cjs +8 -95
  28. package/dist/cjs/chunks/combobox-root.cjs +4 -6
  29. package/dist/cjs/chunks/combobox-separator.cjs +5 -3
  30. package/dist/cjs/chunks/combobox-trigger.cjs +7 -64
  31. package/dist/cjs/chunks/combobox.cjs +5 -5
  32. package/dist/cjs/chunks/compact-button.cjs +6 -4
  33. package/dist/cjs/chunks/components.cjs +55 -54
  34. package/dist/cjs/chunks/content-divider.cjs +6 -88
  35. package/dist/cjs/chunks/counter-input.cjs +10 -939
  36. package/dist/cjs/chunks/date-picker.cjs +5 -3
  37. package/dist/cjs/chunks/dialog-body.cjs +4 -2
  38. package/dist/cjs/chunks/dialog-content.cjs +1 -1
  39. package/dist/cjs/chunks/dialog-description.cjs +5 -4
  40. package/dist/cjs/chunks/dialog-footer.cjs +4 -2
  41. package/dist/cjs/chunks/dialog-title.cjs +5 -4
  42. package/dist/cjs/chunks/dialog-trigger.cjs +1 -1
  43. package/dist/cjs/chunks/dialog.cjs +3 -3
  44. package/dist/cjs/chunks/digit-input-group.cjs +8 -7
  45. package/dist/cjs/chunks/digit-input-slot.cjs +8 -265
  46. package/dist/cjs/chunks/digit-input.cjs +9 -8
  47. package/dist/cjs/chunks/drawer-body.cjs +7 -38
  48. package/dist/cjs/chunks/drawer-close.cjs +2 -2
  49. package/dist/cjs/chunks/drawer-content.cjs +9 -1148
  50. package/dist/cjs/chunks/drawer-description.cjs +7 -5
  51. package/dist/cjs/chunks/drawer-footer.cjs +4 -2
  52. package/dist/cjs/chunks/drawer-header.cjs +6 -4
  53. package/dist/cjs/chunks/drawer-title.cjs +7 -5
  54. package/dist/cjs/chunks/drawer-trigger.cjs +2 -50
  55. package/dist/cjs/chunks/drawer.cjs +4 -5
  56. package/dist/cjs/chunks/dropdown-menu-content.cjs +8 -535
  57. package/dist/cjs/chunks/dropdown-menu-group.cjs +2 -28
  58. package/dist/cjs/chunks/dropdown-menu-item.cjs +6 -124
  59. package/dist/cjs/chunks/dropdown-menu-label.cjs +6 -58
  60. package/dist/cjs/chunks/dropdown-menu-separator.cjs +5 -56
  61. package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +7 -287
  62. package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +6 -191
  63. package/dist/cjs/chunks/dropdown-menu-sub.cjs +3 -39
  64. package/dist/cjs/chunks/dropdown-menu-trigger.cjs +3 -89
  65. package/dist/cjs/chunks/dropdown-menu.cjs +8 -8
  66. package/dist/cjs/chunks/extra-settings.cjs +3 -3
  67. package/dist/cjs/chunks/fancy-button.cjs +6 -4
  68. package/dist/cjs/chunks/file-upload-area.cjs +6 -4
  69. package/dist/cjs/chunks/gradient-picker.cjs +8 -6
  70. package/dist/cjs/chunks/hint-text.cjs +4 -2
  71. package/dist/cjs/chunks/{label2.cjs → label.cjs} +7 -6
  72. package/dist/cjs/chunks/link-bubble.cjs +3 -3
  73. package/dist/cjs/chunks/link-button.cjs +6 -4
  74. package/dist/cjs/chunks/mochi.cjs +4 -2
  75. package/dist/cjs/chunks/modal-body.cjs +4 -2
  76. package/dist/cjs/chunks/modal-close.cjs +2 -2
  77. package/dist/cjs/chunks/modal-content.cjs +9 -9
  78. package/dist/cjs/chunks/modal-footer.cjs +4 -2
  79. package/dist/cjs/chunks/modal-header.cjs +8 -8
  80. package/dist/cjs/chunks/modal-trigger.cjs +2 -2
  81. package/dist/cjs/chunks/modal.cjs +3 -4
  82. package/dist/cjs/chunks/pagination-content.cjs +5 -87
  83. package/dist/cjs/chunks/pagination-ellipsis.cjs +6 -32
  84. package/dist/cjs/chunks/pagination-first.cjs +7 -42
  85. package/dist/cjs/chunks/pagination-item.cjs +6 -54
  86. package/dist/cjs/chunks/pagination-last.cjs +7 -42
  87. package/dist/cjs/chunks/pagination-next.cjs +7 -42
  88. package/dist/cjs/chunks/pagination-previous.cjs +7 -42
  89. package/dist/cjs/chunks/pagination.cjs +7 -8
  90. package/dist/cjs/chunks/popover-content.cjs +10 -705
  91. package/dist/cjs/chunks/popover-trigger.cjs +2 -61
  92. package/dist/cjs/chunks/popover.cjs +3 -4
  93. package/dist/cjs/chunks/progress-bar.cjs +6 -4
  94. package/dist/cjs/chunks/progress-circle.cjs +7 -5
  95. package/dist/cjs/chunks/radio-group-card.cjs +11 -10
  96. package/dist/cjs/chunks/radio-group-item.cjs +7 -302
  97. package/dist/cjs/chunks/radio-group-label.cjs +12 -11
  98. package/dist/cjs/chunks/radio-group.cjs +6 -5
  99. package/dist/cjs/chunks/range-calendar.cjs +21 -1031
  100. package/dist/cjs/chunks/range-picker.cjs +9 -7
  101. package/dist/cjs/chunks/rich-editor.cjs +21 -5863
  102. package/dist/cjs/chunks/rolldown-runtime.cjs +0 -14
  103. package/dist/cjs/chunks/scroll-area.cjs +9 -142
  104. package/dist/cjs/chunks/scroll-bar.cjs +6 -901
  105. package/dist/cjs/chunks/segmented-control-item.cjs +6 -163
  106. package/dist/cjs/chunks/segmented-control.cjs +7 -6
  107. package/dist/cjs/chunks/select-content.cjs +9 -311
  108. package/dist/cjs/chunks/select-group.cjs +2 -2
  109. package/dist/cjs/chunks/select-icon.cjs +4 -2
  110. package/dist/cjs/chunks/select-item.cjs +7 -227
  111. package/dist/cjs/chunks/select-label.cjs +5 -34
  112. package/dist/cjs/chunks/select-separator.cjs +5 -27
  113. package/dist/cjs/chunks/select-trigger.cjs +6 -163
  114. package/dist/cjs/chunks/select-value.cjs +5 -64
  115. package/dist/cjs/chunks/select.cjs +8 -8
  116. package/dist/cjs/chunks/sheet-close.cjs +5 -3
  117. package/dist/cjs/chunks/sheet-content.cjs +10 -10
  118. package/dist/cjs/chunks/sheet-description.cjs +7 -5
  119. package/dist/cjs/chunks/sheet-footer.cjs +4 -2
  120. package/dist/cjs/chunks/sheet-header.cjs +4 -2
  121. package/dist/cjs/chunks/sheet-title.cjs +7 -5
  122. package/dist/cjs/chunks/sheet-trigger.cjs +2 -2
  123. package/dist/cjs/chunks/sheet.cjs +3 -4
  124. package/dist/cjs/chunks/sidebar-content.cjs +4 -2
  125. package/dist/cjs/chunks/sidebar-element.cjs +6 -4
  126. package/dist/cjs/chunks/sidebar-footer.cjs +4 -2
  127. package/dist/cjs/chunks/sidebar-group-content.cjs +4 -2
  128. package/dist/cjs/chunks/sidebar-group-label.cjs +6 -4
  129. package/dist/cjs/chunks/sidebar-group.cjs +4 -2
  130. package/dist/cjs/chunks/sidebar-header.cjs +4 -2
  131. package/dist/cjs/chunks/sidebar-menu-action.cjs +6 -4
  132. package/dist/cjs/chunks/sidebar-menu-badge.cjs +4 -2
  133. package/dist/cjs/chunks/sidebar-menu-button.cjs +8 -6
  134. package/dist/cjs/chunks/sidebar-menu-item.cjs +4 -2
  135. package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +6 -4
  136. package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +4 -2
  137. package/dist/cjs/chunks/sidebar-menu-sub.cjs +4 -2
  138. package/dist/cjs/chunks/sidebar-menu.cjs +4 -2
  139. package/dist/cjs/chunks/sidebar-provider.cjs +9 -7
  140. package/dist/cjs/chunks/sidebar-trigger.cjs +4 -2
  141. package/dist/cjs/chunks/sidebar.cjs +4 -2
  142. package/dist/cjs/chunks/slider.cjs +10 -757
  143. package/dist/cjs/chunks/social-button.cjs +6 -4
  144. package/dist/cjs/chunks/status-badge.cjs +4 -2
  145. package/dist/cjs/chunks/switch.cjs +7 -185
  146. package/dist/cjs/chunks/tab-menu-content.cjs +5 -81
  147. package/dist/cjs/chunks/tab-menu-item.cjs +6 -88
  148. package/dist/cjs/chunks/tab-menu-list.cjs +6 -61
  149. package/dist/cjs/chunks/tab-menu.cjs +3 -4
  150. package/dist/cjs/chunks/table-body.cjs +4 -2
  151. package/dist/cjs/chunks/table-caption.cjs +4 -2
  152. package/dist/cjs/chunks/table-cell.cjs +4 -2
  153. package/dist/cjs/chunks/table-footer.cjs +4 -2
  154. package/dist/cjs/chunks/table-head.cjs +4 -2
  155. package/dist/cjs/chunks/table-header.cjs +4 -2
  156. package/dist/cjs/chunks/table-row.cjs +4 -2
  157. package/dist/cjs/chunks/table.cjs +4 -2
  158. package/dist/cjs/chunks/table2.cjs +4 -2
  159. package/dist/cjs/chunks/tag.cjs +6 -4
  160. package/dist/cjs/chunks/text-input-affix.cjs +4 -2
  161. package/dist/cjs/chunks/text-input-button.cjs +4 -2
  162. package/dist/cjs/chunks/text-input.cjs +12 -10
  163. package/dist/cjs/chunks/textarea.cjs +4 -2
  164. package/dist/cjs/chunks/tooltip-content.cjs +9 -599
  165. package/dist/cjs/chunks/tooltip-provider.cjs +2 -2
  166. package/dist/cjs/chunks/tooltip-root.cjs +3 -4
  167. package/dist/cjs/chunks/tooltip-trigger.cjs +3 -107
  168. package/dist/cjs/chunks/tooltip.cjs +4 -4
  169. package/dist/cjs/command-group.cjs +3 -4
  170. package/dist/cjs/command-input.cjs +7 -6
  171. package/dist/cjs/command-item.cjs +3 -4
  172. package/dist/cjs/command-list.cjs +3 -4
  173. package/dist/cjs/command-root.cjs +4 -6
  174. package/dist/cjs/command-separator.cjs +5 -3
  175. package/dist/cjs/context.cjs +1 -1
  176. package/dist/cjs/index.cjs +53 -53
  177. package/dist/cjs/label.cjs +1 -1
  178. package/dist/cjs/use-chart-motion.cjs +2 -2
  179. package/dist/cjs/use-color-model.cjs +6 -4
  180. package/dist/cjs/use-sidebar.cjs +2 -2
  181. package/dist/cjs/use-tab-observer.cjs +4 -4
  182. package/dist/es/chunks/alert.js +2 -2
  183. package/dist/es/chunks/badge.js +2 -2
  184. package/dist/es/chunks/bar-chart.js +11 -10007
  185. package/dist/es/chunks/button.js +3 -3
  186. package/dist/es/chunks/calendar.js +20 -798
  187. package/dist/es/chunks/chart-card.js +2 -2
  188. package/dist/es/chunks/chart-legend.js +2 -2
  189. package/dist/es/chunks/chart-plot.js +2 -2
  190. package/dist/es/chunks/checkbox-card.js +4 -5
  191. package/dist/es/chunks/checkbox-label.js +4 -5
  192. package/dist/es/chunks/checkbox.js +5 -227
  193. package/dist/es/chunks/collapsible-content.js +4 -106
  194. package/dist/es/chunks/collapsible-trigger.js +2 -50
  195. package/dist/es/chunks/collapsible.js +2 -3
  196. package/dist/es/chunks/color-picker.js +10 -10
  197. package/dist/es/chunks/color-swatch.js +1 -1
  198. package/dist/es/chunks/combobox-anchor.js +4 -44
  199. package/dist/es/chunks/combobox-empty.js +4 -30
  200. package/dist/es/chunks/combobox-group.js +4 -5
  201. package/dist/es/chunks/combobox-input.js +4 -4
  202. package/dist/es/chunks/combobox-item.js +8 -66
  203. package/dist/es/chunks/combobox-list.js +6 -94
  204. package/dist/es/chunks/combobox-root.js +3 -5
  205. package/dist/es/chunks/combobox-separator.js +3 -3
  206. package/dist/es/chunks/combobox-trigger.js +5 -63
  207. package/dist/es/chunks/combobox.js +4 -4
  208. package/dist/es/chunks/compact-button.js +3 -3
  209. package/dist/es/chunks/components.js +65 -55
  210. package/dist/es/chunks/content-divider.js +5 -89
  211. package/dist/es/chunks/counter-input.js +8 -939
  212. package/dist/es/chunks/date-picker.js +3 -3
  213. package/dist/es/chunks/dialog-body.js +2 -2
  214. package/dist/es/chunks/dialog-content.js +1 -1
  215. package/dist/es/chunks/dialog-description.js +3 -4
  216. package/dist/es/chunks/dialog-footer.js +2 -2
  217. package/dist/es/chunks/dialog-title.js +3 -4
  218. package/dist/es/chunks/dialog-trigger.js +1 -1
  219. package/dist/es/chunks/dialog.js +1 -1
  220. package/dist/es/chunks/digit-input-group.js +4 -5
  221. package/dist/es/chunks/digit-input-slot.js +5 -263
  222. package/dist/es/chunks/digit-input.js +5 -6
  223. package/dist/es/chunks/drawer-body.js +4 -36
  224. package/dist/es/chunks/drawer-close.js +2 -2
  225. package/dist/es/chunks/drawer-content.js +7 -1147
  226. package/dist/es/chunks/drawer-description.js +4 -4
  227. package/dist/es/chunks/drawer-footer.js +2 -2
  228. package/dist/es/chunks/drawer-header.js +4 -4
  229. package/dist/es/chunks/drawer-title.js +4 -4
  230. package/dist/es/chunks/drawer-trigger.js +3 -51
  231. package/dist/es/chunks/drawer.js +3 -4
  232. package/dist/es/chunks/dropdown-menu-content.js +6 -534
  233. package/dist/es/chunks/dropdown-menu-group.js +3 -28
  234. package/dist/es/chunks/dropdown-menu-item.js +4 -124
  235. package/dist/es/chunks/dropdown-menu-label.js +4 -57
  236. package/dist/es/chunks/dropdown-menu-separator.js +4 -56
  237. package/dist/es/chunks/dropdown-menu-sub-content.js +5 -286
  238. package/dist/es/chunks/dropdown-menu-sub-trigger.js +4 -191
  239. package/dist/es/chunks/dropdown-menu-sub.js +3 -39
  240. package/dist/es/chunks/dropdown-menu-trigger.js +3 -88
  241. package/dist/es/chunks/dropdown-menu.js +5 -7
  242. package/dist/es/chunks/extra-settings.js +3 -3
  243. package/dist/es/chunks/fancy-button.js +3 -3
  244. package/dist/es/chunks/file-upload-area.js +3 -3
  245. package/dist/es/chunks/gradient-picker.js +3 -3
  246. package/dist/es/chunks/hint-text.js +2 -2
  247. package/dist/es/chunks/{label2.js → label.js} +4 -5
  248. package/dist/es/chunks/link-bubble.js +3 -3
  249. package/dist/es/chunks/link-button.js +3 -3
  250. package/dist/es/chunks/mochi.js +2 -2
  251. package/dist/es/chunks/modal-body.js +2 -2
  252. package/dist/es/chunks/modal-close.js +2 -2
  253. package/dist/es/chunks/modal-content.js +5 -7
  254. package/dist/es/chunks/modal-footer.js +2 -2
  255. package/dist/es/chunks/modal-header.js +6 -8
  256. package/dist/es/chunks/modal-trigger.js +2 -2
  257. package/dist/es/chunks/modal.js +2 -3
  258. package/dist/es/chunks/pagination-content.js +5 -86
  259. package/dist/es/chunks/pagination-ellipsis.js +5 -30
  260. package/dist/es/chunks/pagination-first.js +5 -40
  261. package/dist/es/chunks/pagination-item.js +5 -53
  262. package/dist/es/chunks/pagination-last.js +5 -40
  263. package/dist/es/chunks/pagination-next.js +5 -40
  264. package/dist/es/chunks/pagination-previous.js +5 -40
  265. package/dist/es/chunks/pagination.js +4 -5
  266. package/dist/es/chunks/popover-content.js +8 -705
  267. package/dist/es/chunks/popover-trigger.js +3 -61
  268. package/dist/es/chunks/popover.js +2 -3
  269. package/dist/es/chunks/progress-bar.js +4 -4
  270. package/dist/es/chunks/progress-circle.js +5 -5
  271. package/dist/es/chunks/radio-group-card.js +4 -5
  272. package/dist/es/chunks/radio-group-item.js +5 -302
  273. package/dist/es/chunks/radio-group-label.js +4 -5
  274. package/dist/es/chunks/radio-group.js +3 -4
  275. package/dist/es/chunks/range-calendar.js +21 -1033
  276. package/dist/es/chunks/range-picker.js +7 -7
  277. package/dist/es/chunks/rich-editor.js +13 -5859
  278. package/dist/es/chunks/scroll-area.js +8 -142
  279. package/dist/es/chunks/scroll-bar.js +6 -890
  280. package/dist/es/chunks/segmented-control-item.js +5 -163
  281. package/dist/es/chunks/segmented-control.js +4 -5
  282. package/dist/es/chunks/select-content.js +7 -310
  283. package/dist/es/chunks/select-group.js +2 -2
  284. package/dist/es/chunks/select-icon.js +2 -2
  285. package/dist/es/chunks/select-item.js +6 -227
  286. package/dist/es/chunks/select-label.js +3 -33
  287. package/dist/es/chunks/select-separator.js +4 -27
  288. package/dist/es/chunks/select-trigger.js +5 -163
  289. package/dist/es/chunks/select-value.js +4 -64
  290. package/dist/es/chunks/select.js +5 -7
  291. package/dist/es/chunks/sheet-close.js +3 -3
  292. package/dist/es/chunks/sheet-content.js +6 -8
  293. package/dist/es/chunks/sheet-description.js +4 -4
  294. package/dist/es/chunks/sheet-footer.js +2 -2
  295. package/dist/es/chunks/sheet-header.js +2 -2
  296. package/dist/es/chunks/sheet-title.js +4 -4
  297. package/dist/es/chunks/sheet-trigger.js +2 -2
  298. package/dist/es/chunks/sheet.js +2 -3
  299. package/dist/es/chunks/sidebar-content.js +2 -2
  300. package/dist/es/chunks/sidebar-element.js +3 -3
  301. package/dist/es/chunks/sidebar-footer.js +2 -2
  302. package/dist/es/chunks/sidebar-group-content.js +2 -2
  303. package/dist/es/chunks/sidebar-group-label.js +3 -3
  304. package/dist/es/chunks/sidebar-group.js +2 -2
  305. package/dist/es/chunks/sidebar-header.js +2 -2
  306. package/dist/es/chunks/sidebar-menu-action.js +3 -3
  307. package/dist/es/chunks/sidebar-menu-badge.js +2 -2
  308. package/dist/es/chunks/sidebar-menu-button.js +4 -4
  309. package/dist/es/chunks/sidebar-menu-item.js +2 -2
  310. package/dist/es/chunks/sidebar-menu-sub-button.js +3 -3
  311. package/dist/es/chunks/sidebar-menu-sub-item.js +2 -2
  312. package/dist/es/chunks/sidebar-menu-sub.js +2 -2
  313. package/dist/es/chunks/sidebar-menu.js +2 -2
  314. package/dist/es/chunks/sidebar-provider.js +3 -3
  315. package/dist/es/chunks/sidebar-trigger.js +2 -2
  316. package/dist/es/chunks/sidebar.js +2 -2
  317. package/dist/es/chunks/slider.js +10 -759
  318. package/dist/es/chunks/social-button.js +3 -3
  319. package/dist/es/chunks/status-badge.js +2 -2
  320. package/dist/es/chunks/switch.js +5 -185
  321. package/dist/es/chunks/tab-menu-content.js +4 -81
  322. package/dist/es/chunks/tab-menu-item.js +4 -88
  323. package/dist/es/chunks/tab-menu-list.js +5 -62
  324. package/dist/es/chunks/tab-menu.js +2 -3
  325. package/dist/es/chunks/table-body.js +2 -2
  326. package/dist/es/chunks/table-caption.js +2 -2
  327. package/dist/es/chunks/table-cell.js +2 -2
  328. package/dist/es/chunks/table-footer.js +2 -2
  329. package/dist/es/chunks/table-head.js +2 -2
  330. package/dist/es/chunks/table-header.js +2 -2
  331. package/dist/es/chunks/table-row.js +2 -2
  332. package/dist/es/chunks/table.js +2 -2
  333. package/dist/es/chunks/table2.js +2 -2
  334. package/dist/es/chunks/tag.js +3 -3
  335. package/dist/es/chunks/text-input-affix.js +2 -2
  336. package/dist/es/chunks/text-input-button.js +2 -2
  337. package/dist/es/chunks/text-input.js +4 -4
  338. package/dist/es/chunks/textarea.js +2 -2
  339. package/dist/es/chunks/tooltip-content.js +7 -599
  340. package/dist/es/chunks/tooltip-provider.js +2 -2
  341. package/dist/es/chunks/tooltip-root.js +2 -3
  342. package/dist/es/chunks/tooltip-trigger.js +3 -107
  343. package/dist/es/chunks/tooltip.js +3 -3
  344. package/dist/es/command-group.js +3 -4
  345. package/dist/es/command-input.js +4 -5
  346. package/dist/es/command-item.js +2 -3
  347. package/dist/es/command-list.js +2 -3
  348. package/dist/es/command-root.js +3 -5
  349. package/dist/es/command-separator.js +3 -3
  350. package/dist/es/context.js +1 -1
  351. package/dist/es/index.js +54 -54
  352. package/dist/es/label.js +1 -1
  353. package/dist/es/use-chart-motion.js +1 -1
  354. package/dist/es/use-color-model.js +1 -1
  355. package/dist/es/use-sidebar.js +1 -1
  356. package/dist/es/use-tab-observer.js +1 -1
  357. package/package.json +3 -3
  358. package/src/components/text-input/text-input.vue +21 -14
  359. package/dist/cjs/chunks/BubbleSelect.cjs +0 -331
  360. package/dist/cjs/chunks/CollapsibleRoot.cjs +0 -89
  361. package/dist/cjs/chunks/Collection.cjs +0 -84
  362. package/dist/cjs/chunks/ComboboxContent.cjs +0 -446
  363. package/dist/cjs/chunks/ComboboxGroup.cjs +0 -89
  364. package/dist/cjs/chunks/ComboboxInput.cjs +0 -269
  365. package/dist/cjs/chunks/ComboboxItem.cjs +0 -202
  366. package/dist/cjs/chunks/ComboboxLabel.cjs +0 -46
  367. package/dist/cjs/chunks/ComboboxRoot.cjs +0 -753
  368. package/dist/cjs/chunks/ComboboxSeparator.cjs +0 -34
  369. package/dist/cjs/chunks/ConfigProvider.cjs +0 -68
  370. package/dist/cjs/chunks/DialogClose.cjs +0 -40
  371. package/dist/cjs/chunks/DialogDescription.cjs +0 -37
  372. package/dist/cjs/chunks/DialogPortal.cjs +0 -524
  373. package/dist/cjs/chunks/DialogRoot.cjs +0 -80
  374. package/dist/cjs/chunks/DialogTitle.cjs +0 -37
  375. package/dist/cjs/chunks/DialogTrigger.cjs +0 -56
  376. package/dist/cjs/chunks/DismissableLayer.cjs +0 -268
  377. package/dist/cjs/chunks/DrawerClose.cjs +0 -40
  378. package/dist/cjs/chunks/DrawerDescription.cjs +0 -37
  379. package/dist/cjs/chunks/DrawerRoot.cjs +0 -366
  380. package/dist/cjs/chunks/DrawerTitle.cjs +0 -37
  381. package/dist/cjs/chunks/DropdownMenuPortal.cjs +0 -72
  382. package/dist/cjs/chunks/DropdownMenuRoot.cjs +0 -86
  383. package/dist/cjs/chunks/FocusScope.cjs +0 -377
  384. package/dist/cjs/chunks/Label.cjs +0 -41
  385. package/dist/cjs/chunks/MenuAnchor.cjs +0 -36
  386. package/dist/cjs/chunks/MenuContentImpl.cjs +0 -371
  387. package/dist/cjs/chunks/MenuGroup.cjs +0 -43
  388. package/dist/cjs/chunks/MenuItemImpl.cjs +0 -100
  389. package/dist/cjs/chunks/MenuRoot.cjs +0 -108
  390. package/dist/cjs/chunks/MenuSub.cjs +0 -67
  391. package/dist/cjs/chunks/PaginationRoot.cjs +0 -100
  392. package/dist/cjs/chunks/PinInputRoot.cjs +0 -152
  393. package/dist/cjs/chunks/PopoverRoot.cjs +0 -72
  394. package/dist/cjs/chunks/PopperAnchor.cjs +0 -47
  395. package/dist/cjs/chunks/PopperArrow.cjs +0 -151
  396. package/dist/cjs/chunks/PopperContent.cjs +0 -2099
  397. package/dist/cjs/chunks/PopperRoot.cjs +0 -31
  398. package/dist/cjs/chunks/Presence.cjs +0 -195
  399. package/dist/cjs/chunks/Primitive.cjs +0 -79
  400. package/dist/cjs/chunks/ProgressIndicator.cjs +0 -160
  401. package/dist/cjs/chunks/RadioGroupRoot.cjs +0 -142
  402. package/dist/cjs/chunks/RovingFocusGroup.cjs +0 -146
  403. package/dist/cjs/chunks/RovingFocusItem.cjs +0 -113
  404. package/dist/cjs/chunks/SelectGroup.cjs +0 -43
  405. package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +0 -597
  406. package/dist/cjs/chunks/TabsRoot.cjs +0 -113
  407. package/dist/cjs/chunks/Teleport.cjs +0 -50
  408. package/dist/cjs/chunks/ToggleGroupRoot.cjs +0 -187
  409. package/dist/cjs/chunks/TooltipProvider.cjs +0 -86
  410. package/dist/cjs/chunks/TooltipRoot.cjs +0 -145
  411. package/dist/cjs/chunks/VisuallyHidden.cjs +0 -64
  412. package/dist/cjs/chunks/VisuallyHiddenInput.cjs +0 -146
  413. package/dist/cjs/chunks/clamp.cjs +0 -75
  414. package/dist/cjs/chunks/clsx.cjs +0 -21
  415. package/dist/cjs/chunks/createContext.cjs +0 -37
  416. package/dist/cjs/chunks/defu.cjs +0 -34
  417. package/dist/cjs/chunks/dist.cjs +0 -543
  418. package/dist/cjs/chunks/dist2.cjs +0 -538
  419. package/dist/cjs/chunks/dist3.cjs +0 -16177
  420. package/dist/cjs/chunks/getActiveElement.cjs +0 -14
  421. package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +0 -18
  422. package/dist/cjs/chunks/isValueEqualOrExist.cjs +0 -24
  423. package/dist/cjs/chunks/menus.cjs +0 -1368
  424. package/dist/cjs/chunks/nullish.cjs +0 -11
  425. package/dist/cjs/chunks/ohash.D__AXeF1.cjs +0 -114
  426. package/dist/cjs/chunks/tinycolor.cjs +0 -904
  427. package/dist/cjs/chunks/useArrowNavigation.cjs +0 -65
  428. package/dist/cjs/chunks/useCalendar.cjs +0 -2533
  429. package/dist/cjs/chunks/useComposing.cjs +0 -45
  430. package/dist/cjs/chunks/useDirection.cjs +0 -19
  431. package/dist/cjs/chunks/useEmitAsProps.cjs +0 -33
  432. package/dist/cjs/chunks/useFocusGuards.cjs +0 -39
  433. package/dist/cjs/chunks/useFormControl.cjs +0 -13
  434. package/dist/cjs/chunks/useForwardExpose.cjs +0 -63
  435. package/dist/cjs/chunks/useForwardProps.cjs +0 -39
  436. package/dist/cjs/chunks/useForwardPropsEmits.cjs +0 -19
  437. package/dist/cjs/chunks/useForwardScopeId.cjs +0 -30
  438. package/dist/cjs/chunks/useHideOthers.cjs +0 -137
  439. package/dist/cjs/chunks/useId.cjs +0 -30
  440. package/dist/cjs/chunks/useKbd.cjs +0 -46
  441. package/dist/cjs/chunks/useLocale.cjs +0 -19
  442. package/dist/cjs/chunks/useNonce.cjs +0 -14
  443. package/dist/cjs/chunks/usePrimitiveElement.cjs +0 -17
  444. package/dist/cjs/chunks/useSize.cjs +0 -54
  445. package/dist/cjs/chunks/useTypeahead.cjs +0 -69
  446. package/dist/cjs/chunks/utils.cjs +0 -117
  447. package/dist/cjs/chunks/utils2.cjs +0 -73
  448. package/dist/cjs/chunks/utils3.cjs +0 -20
  449. package/dist/es/chunks/BubbleSelect.js +0 -290
  450. package/dist/es/chunks/CollapsibleRoot.js +0 -78
  451. package/dist/es/chunks/Collection.js +0 -79
  452. package/dist/es/chunks/ComboboxContent.js +0 -441
  453. package/dist/es/chunks/ComboboxGroup.js +0 -78
  454. package/dist/es/chunks/ComboboxInput.js +0 -264
  455. package/dist/es/chunks/ComboboxItem.js +0 -191
  456. package/dist/es/chunks/ComboboxLabel.js +0 -41
  457. package/dist/es/chunks/ComboboxRoot.js +0 -730
  458. package/dist/es/chunks/ComboboxSeparator.js +0 -29
  459. package/dist/es/chunks/ConfigProvider.js +0 -57
  460. package/dist/es/chunks/DialogClose.js +0 -35
  461. package/dist/es/chunks/DialogDescription.js +0 -32
  462. package/dist/es/chunks/DialogPortal.js +0 -507
  463. package/dist/es/chunks/DialogRoot.js +0 -69
  464. package/dist/es/chunks/DialogTitle.js +0 -32
  465. package/dist/es/chunks/DialogTrigger.js +0 -51
  466. package/dist/es/chunks/DismissableLayer.js +0 -257
  467. package/dist/es/chunks/DrawerClose.js +0 -35
  468. package/dist/es/chunks/DrawerDescription.js +0 -32
  469. package/dist/es/chunks/DrawerRoot.js +0 -325
  470. package/dist/es/chunks/DrawerTitle.js +0 -32
  471. package/dist/es/chunks/DropdownMenuPortal.js +0 -67
  472. package/dist/es/chunks/DropdownMenuRoot.js +0 -75
  473. package/dist/es/chunks/FocusScope.js +0 -360
  474. package/dist/es/chunks/Label.js +0 -36
  475. package/dist/es/chunks/MenuAnchor.js +0 -31
  476. package/dist/es/chunks/MenuContentImpl.js +0 -360
  477. package/dist/es/chunks/MenuGroup.js +0 -32
  478. package/dist/es/chunks/MenuItemImpl.js +0 -95
  479. package/dist/es/chunks/MenuRoot.js +0 -85
  480. package/dist/es/chunks/MenuSub.js +0 -56
  481. package/dist/es/chunks/PaginationRoot.js +0 -89
  482. package/dist/es/chunks/PinInputRoot.js +0 -141
  483. package/dist/es/chunks/PopoverRoot.js +0 -61
  484. package/dist/es/chunks/PopperAnchor.js +0 -42
  485. package/dist/es/chunks/PopperArrow.js +0 -146
  486. package/dist/es/chunks/PopperContent.js +0 -2029
  487. package/dist/es/chunks/PopperRoot.js +0 -20
  488. package/dist/es/chunks/Presence.js +0 -184
  489. package/dist/es/chunks/Primitive.js +0 -62
  490. package/dist/es/chunks/ProgressIndicator.js +0 -149
  491. package/dist/es/chunks/RadioGroupRoot.js +0 -131
  492. package/dist/es/chunks/RovingFocusGroup.js +0 -135
  493. package/dist/es/chunks/RovingFocusItem.js +0 -108
  494. package/dist/es/chunks/SelectGroup.js +0 -32
  495. package/dist/es/chunks/SelectItemAlignedPosition.js +0 -568
  496. package/dist/es/chunks/TabsRoot.js +0 -102
  497. package/dist/es/chunks/Teleport.js +0 -45
  498. package/dist/es/chunks/ToggleGroupRoot.js +0 -176
  499. package/dist/es/chunks/TooltipProvider.js +0 -75
  500. package/dist/es/chunks/TooltipRoot.js +0 -128
  501. package/dist/es/chunks/VisuallyHidden.js +0 -59
  502. package/dist/es/chunks/VisuallyHiddenInput.js +0 -141
  503. package/dist/es/chunks/clamp.js +0 -64
  504. package/dist/es/chunks/clsx.js +0 -16
  505. package/dist/es/chunks/createContext.js +0 -32
  506. package/dist/es/chunks/defu.js +0 -29
  507. package/dist/es/chunks/dist.js +0 -418
  508. package/dist/es/chunks/dist2.js +0 -461
  509. package/dist/es/chunks/dist3.js +0 -15890
  510. package/dist/es/chunks/getActiveElement.js +0 -9
  511. package/dist/es/chunks/handleAndDispatchCustomEvent.js +0 -13
  512. package/dist/es/chunks/isValueEqualOrExist.js +0 -19
  513. package/dist/es/chunks/menus.js +0 -1368
  514. package/dist/es/chunks/nullish.js +0 -6
  515. package/dist/es/chunks/ohash.D__AXeF1.js +0 -109
  516. package/dist/es/chunks/rolldown-runtime.js +0 -34
  517. package/dist/es/chunks/tinycolor.js +0 -899
  518. package/dist/es/chunks/useArrowNavigation.js +0 -60
  519. package/dist/es/chunks/useCalendar.js +0 -2426
  520. package/dist/es/chunks/useComposing.js +0 -40
  521. package/dist/es/chunks/useDirection.js +0 -14
  522. package/dist/es/chunks/useEmitAsProps.js +0 -28
  523. package/dist/es/chunks/useFocusGuards.js +0 -34
  524. package/dist/es/chunks/useFormControl.js +0 -8
  525. package/dist/es/chunks/useForwardExpose.js +0 -58
  526. package/dist/es/chunks/useForwardProps.js +0 -34
  527. package/dist/es/chunks/useForwardPropsEmits.js +0 -14
  528. package/dist/es/chunks/useForwardScopeId.js +0 -25
  529. package/dist/es/chunks/useHideOthers.js +0 -132
  530. package/dist/es/chunks/useId.js +0 -23
  531. package/dist/es/chunks/useKbd.js +0 -41
  532. package/dist/es/chunks/useLocale.js +0 -14
  533. package/dist/es/chunks/useNonce.js +0 -9
  534. package/dist/es/chunks/usePrimitiveElement.js +0 -12
  535. package/dist/es/chunks/useSize.js +0 -49
  536. package/dist/es/chunks/useTypeahead.js +0 -64
  537. package/dist/es/chunks/utils.js +0 -58
  538. package/dist/es/chunks/utils2.js +0 -44
  539. package/dist/es/chunks/utils3.js +0 -9
@@ -1,1148 +1,8 @@
1
- import { t as clsx } from "./clsx.js";
2
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
3
- import { f as reactiveOmit } from "./dist.js";
4
- import { d as useResizeObserver, s as useEventListener } from "./dist2.js";
5
- import { t as Primitive } from "./Primitive.js";
6
- import { t as DismissableLayer_default } from "./DismissableLayer.js";
7
- import { n as focus, r as useBodyScrollLock, t as FocusScope_default } from "./FocusScope.js";
8
- import { t as useEmitAsProps } from "./useEmitAsProps.js";
9
- import { t as useForwardExpose } from "./useForwardExpose.js";
10
- import { t as useForwardPropsEmits } from "./useForwardPropsEmits.js";
11
- import { t as useHideOthers } from "./useHideOthers.js";
12
- import { t as Presence_default } from "./Presence.js";
13
- import { t as Teleport_default } from "./Teleport.js";
14
- import { a as getDisplacement, i as computeSwipeReleaseScalar, n as injectDrawerRootContext, o as getElementTransform, r as DRAWER_CSS_VARS, s as registerDrawerCssProperties } from "./DrawerRoot.js";
15
- import { computed, createBlock, createCommentVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onMounted, onUnmounted, openBlock, ref, renderSlot, toValue, unref, watch, withCtx } from "vue";
16
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/composables/useDrawerSnapPoints.js
17
- var SNAP_VELOCITY_THRESHOLD = .5;
18
- var SNAP_VELOCITY_MULTIPLIER = 300;
19
- var MAX_SNAP_VELOCITY = 4;
20
- var FAST_SWIPE_VELOCITY = .5;
21
- function parseSnapPoint(value, viewportHeight, rootFontSize) {
22
- let result = null;
23
- if (typeof value === "number") result = value >= 0 && value <= 1 ? value * viewportHeight : value;
24
- else if (value.endsWith("rem")) result = Number.parseFloat(value) * rootFontSize;
25
- else if (value.endsWith("px")) result = Number.parseFloat(value);
26
- if (result == null || !Number.isFinite(result) || result < 0) return null;
27
- return Math.round(result);
28
- }
29
- function useDrawerSnapPoints(options) {
30
- const { snapPoints, activeSnapPoint, popupHeight, viewportRef, onSnapPointChange } = options;
31
- const viewportHeight = ref(typeof window !== "undefined" ? window.innerHeight : 0);
32
- const rootFontSize = ref(typeof document !== "undefined" ? Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16 : 16);
33
- if (typeof window !== "undefined") useEventListener(window, "resize", () => {
34
- viewportHeight.value = window.innerHeight;
35
- });
36
- const resolvedSnapPoints = computed(() => {
37
- const points = snapPoints.value;
38
- if (!points || points.length === 0) return [];
39
- const vh = viewportHeight.value;
40
- const fs = rootFontSize.value;
41
- const ph = popupHeight.value;
42
- const resolved = [];
43
- for (const pt of points) {
44
- const height = parseSnapPoint(pt, vh, fs);
45
- if (height == null) continue;
46
- if (resolved.some((r) => Math.abs(r.height - height) <= 1)) continue;
47
- const clampedHeight = Math.min(height, Math.min(ph, vh));
48
- resolved.push({
49
- value: pt,
50
- height: clampedHeight,
51
- offset: Math.max(0, ph - clampedHeight)
52
- });
53
- }
54
- return resolved.sort((a, b) => a.height - b.height);
55
- });
56
- /**
57
- * Resolve the currently-active snap point to its resolved entry, matching by
58
- * raw value OR by parsed-height equivalence. This lets a controlled drawer use
59
- * interchangeable representations (`'16rem'` vs `256`, `0.5` vs `400`) without
60
- * the release math falling back to offset `0` and jumping to the wrong target.
61
- */
62
- function findActiveResolvedPoint() {
63
- if (!activeSnapPoint.value || resolvedSnapPoints.value.length === 0) return void 0;
64
- const activeHeight = parseSnapPoint(activeSnapPoint.value, viewportHeight.value, rootFontSize.value);
65
- return resolvedSnapPoints.value.find((r) => r.value === activeSnapPoint.value || activeHeight != null && Math.abs(r.height - activeHeight) <= 1);
66
- }
67
- const activeSnapPointOffset = computed(() => findActiveResolvedPoint()?.offset ?? null);
68
- /**
69
- * BaseUI-parity snap release math (ported from `DrawerViewport.tsx` lines ~577-714).
70
- *
71
- * Takes a **dismiss-signed** drag delta (positive = dismiss direction, negative =
72
- * open direction) and the raw velocity vector. Computes a velocity-boosted target
73
- * offset, then either dismisses, snaps to the closest point, or (in sequential
74
- * mode) advances one step based on physical crossing + fast-swipe velocity.
75
- */
76
- function snapToNearest(dragDelta, velocity, direction, sequential) {
77
- const points = resolvedSnapPoints.value;
78
- if (points.length === 0) return;
79
- const ph = popupHeight.value;
80
- const axisVel = direction === "up" || direction === "down" ? velocity.y : velocity.x;
81
- const velSigned = direction === "up" || direction === "left" ? -axisVel : axisVel;
82
- const activePoint = findActiveResolvedPoint();
83
- const currentOffset = activePoint?.offset ?? 0;
84
- const dragTargetOffset = Math.max(0, Math.min(ph, currentOffset + dragDelta));
85
- let targetOffset = dragTargetOffset;
86
- if (Math.abs(velSigned) >= SNAP_VELOCITY_THRESHOLD) targetOffset = dragTargetOffset + Math.max(-4, Math.min(MAX_SNAP_VELOCITY, velSigned)) * SNAP_VELOCITY_MULTIPLIER;
87
- let closest = points[0];
88
- let closestDist = Math.abs(targetOffset - closest.offset);
89
- for (const p of points) {
90
- const d = Math.abs(targetOffset - p.offset);
91
- if (d < closestDist) {
92
- closest = p;
93
- closestDist = d;
94
- }
95
- }
96
- if (Math.abs(targetOffset - ph) < closestDist) {
97
- onSnapPointChange(null);
98
- return;
99
- }
100
- if (sequential) {
101
- const sorted = [...points].sort((a, b) => a.offset - b.offset);
102
- const currentIdx = activePoint ? sorted.indexOf(activePoint) : -1;
103
- if (currentIdx < 0) {
104
- onSnapPointChange(closest.value);
105
- return;
106
- }
107
- const dragDir = Math.sign(dragDelta);
108
- const shouldAdvance = Math.sign(velSigned) === dragDir && Math.abs(velSigned) >= FAST_SWIPE_VELOCITY;
109
- const adjacent = sorted[Math.max(0, Math.min(sorted.length - 1, currentIdx + dragDir))];
110
- if (shouldAdvance) {
111
- onSnapPointChange(adjacent.value);
112
- return;
113
- }
114
- const crossed = dragDir > 0 ? targetOffset > adjacent.offset : targetOffset < adjacent.offset;
115
- onSnapPointChange(crossed ? adjacent.value : activeSnapPoint.value ?? closest.value);
116
- return;
117
- }
118
- onSnapPointChange(closest.value);
119
- }
120
- return {
121
- resolvedSnapPoints,
122
- activeSnapPointOffset,
123
- viewportHeight,
124
- snapToNearest
125
- };
126
- }
127
- //#endregion
128
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/composables/useSwipeDismiss.js
129
- var DEFAULT_SWIPE_THRESHOLD = 40;
130
- var REVERSE_CANCEL_THRESHOLD = 10;
131
- var MIN_DRAG_THRESHOLD = 1;
132
- var AXIS_LOCK_SLOP = 6;
133
- var AXIS_LOCK_BIAS = 2;
134
- var MIN_RELEASE_VELOCITY_DURATION_MS = 16;
135
- var MAX_RELEASE_VELOCITY_AGE_MS = 80;
136
- var DEFAULT_IGNORE_SELECTOR = "button,a,input,select,textarea,label,[role=\"button\"]";
137
- function findScrollableAncestor(el, axis) {
138
- if (!el || el === document.body) return null;
139
- const style = window.getComputedStyle(el);
140
- const overflow = axis === "vertical" ? style.overflowY : style.overflowX;
141
- if ((overflow === "auto" || overflow === "scroll") && (axis === "vertical" ? el.scrollHeight > el.clientHeight : el.scrollWidth > el.clientWidth)) return el;
142
- return findScrollableAncestor(el.parentElement, axis);
143
- }
144
- /**
145
- * Returns whether the user can start a swipe dismiss from a scrollable element
146
- * based on the scroll position and drag direction.
147
- * Ported from BaseUI `useSwipeDismiss.ts:canSwipeFromScrollEdgeOnPendingMove`.
148
- *
149
- * Returns:
150
- * true → swipe is allowed (scroll is at the relevant edge)
151
- * false → swipe is blocked (user is scrolling, not dismissing)
152
- * null → the drag is not along a recognized axis; caller should fall through
153
- */
154
- function canSwipeFromScrollEdge(scrollTarget, deltaX, deltaY, flags) {
155
- const absDx = Math.abs(deltaX);
156
- const absDy = Math.abs(deltaY);
157
- if (flags.hasVertical && deltaY !== 0 && (!flags.hasHorizontal || absDy >= absDx)) {
158
- const maxScrollTop = Math.max(0, scrollTarget.scrollHeight - scrollTarget.clientHeight);
159
- const atTop = scrollTarget.scrollTop <= 0;
160
- const atBottom = scrollTarget.scrollTop >= maxScrollTop;
161
- const movingDown = deltaY > 0;
162
- const movingUp = deltaY < 0;
163
- const canSwipeDown = movingDown && atTop && flags.allowDown;
164
- const canSwipeUp = movingUp && atBottom && flags.allowUp;
165
- return canSwipeDown || canSwipeUp;
166
- }
167
- if (flags.hasHorizontal && deltaX !== 0 && (!flags.hasVertical || absDx > absDy)) {
168
- const maxScrollLeft = Math.max(0, scrollTarget.scrollWidth - scrollTarget.clientWidth);
169
- const atLeft = scrollTarget.scrollLeft <= 0;
170
- const atRight = scrollTarget.scrollLeft >= maxScrollLeft;
171
- const movingRight = deltaX > 0;
172
- const movingLeft = deltaX < 0;
173
- const canSwipeRight = movingRight && atLeft && flags.allowRight;
174
- const canSwipeLeft = movingLeft && atRight && flags.allowLeft;
175
- return canSwipeRight || canSwipeLeft;
176
- }
177
- return null;
178
- }
179
- function useSwipeDismiss(options) {
180
- const { elementRef, directions, movementCssVars, swipeThreshold: swipeThresholdProp, canStart, onDismiss, onProgress, onCancel, onSwipeStart, onRelease, onSwipingChange } = options;
181
- const hasVertical = computed(() => toValue(directions).includes("up") || toValue(directions).includes("down"));
182
- const hasHorizontal = computed(() => toValue(directions).includes("left") || toValue(directions).includes("right"));
183
- const allowUp = computed(() => toValue(directions).includes("up"));
184
- const allowDown = computed(() => toValue(directions).includes("down"));
185
- const allowLeft = computed(() => toValue(directions).includes("left"));
186
- const allowRight = computed(() => toValue(directions).includes("right"));
187
- const drawerAxis = computed(() => {
188
- if (hasVertical.value === hasHorizontal.value) return null;
189
- return hasVertical.value ? "vertical" : "horizontal";
190
- });
191
- const isSwiping = ref(false);
192
- const swipeDirection = ref(void 0);
193
- const dragOffset = ref({
194
- x: 0,
195
- y: 0
196
- });
197
- let dragStartPos = {
198
- x: 0,
199
- y: 0
200
- };
201
- let intendedDirection;
202
- let maxDisplacement = 0;
203
- let cancelledSwipe = false;
204
- let isFirstMove = false;
205
- let pendingSwipe = false;
206
- let pendingSwipeStartPos = null;
207
- let swipeFromScrollable = false;
208
- let scrollableAncestor = null;
209
- let crossAxisScrollable = null;
210
- let drawerAxisAttributed = false;
211
- let preserveNativeCrossAxisScroll = false;
212
- let elementSize = {
213
- width: 0,
214
- height: 0
215
- };
216
- let swipeProgress = 0;
217
- let lastDragSample = null;
218
- let lastVelocity = {
219
- x: 0,
220
- y: 0
221
- };
222
- let lockedAxis = null;
223
- let activePointerId = null;
224
- let pointerStarted = false;
225
- function getThreshold(el, dir) {
226
- if (typeof swipeThresholdProp === "function") return Math.max(0, swipeThresholdProp({
227
- element: el,
228
- direction: dir
229
- }));
230
- return typeof swipeThresholdProp === "number" ? swipeThresholdProp : DEFAULT_SWIPE_THRESHOLD;
231
- }
232
- function setSwiping(next) {
233
- if (isSwiping.value === next) return;
234
- isSwiping.value = next;
235
- onSwipingChange?.(next);
236
- }
237
- function recordSample(offset, time) {
238
- if (lastDragSample && time > lastDragSample.time) {
239
- const dt = Math.max(time - lastDragSample.time, MIN_RELEASE_VELOCITY_DURATION_MS);
240
- lastVelocity = {
241
- x: (offset.x - lastDragSample.x) / dt,
242
- y: (offset.y - lastDragSample.y) / dt
243
- };
244
- }
245
- lastDragSample = {
246
- x: offset.x,
247
- y: offset.y,
248
- time
249
- };
250
- }
251
- function setCssVars(el, x, y) {
252
- el.style.setProperty(movementCssVars.x, `${x}px`);
253
- el.style.setProperty(movementCssVars.y, `${y}px`);
254
- }
255
- function clearCssVars(el) {
256
- el.style.setProperty(movementCssVars.x, "0px");
257
- el.style.setProperty(movementCssVars.y, "0px");
258
- }
259
- /**
260
- * Clears the per-gesture tracking state. Deliberately leaves the pointer
261
- * identity and the touch scroll-guard flags alone, so it is safe to call at
262
- * the start of a gesture as well as at the end of one.
263
- */
264
- function resetGestureState() {
265
- setSwiping(false);
266
- swipeDirection.value = void 0;
267
- dragOffset.value = {
268
- x: 0,
269
- y: 0
270
- };
271
- dragStartPos = {
272
- x: 0,
273
- y: 0
274
- };
275
- intendedDirection = void 0;
276
- maxDisplacement = 0;
277
- cancelledSwipe = false;
278
- isFirstMove = false;
279
- pendingSwipe = false;
280
- pendingSwipeStartPos = null;
281
- elementSize = {
282
- width: 0,
283
- height: 0
284
- };
285
- swipeProgress = 0;
286
- lastDragSample = null;
287
- lastVelocity = {
288
- x: 0,
289
- y: 0
290
- };
291
- lockedAxis = null;
292
- }
293
- function reset() {
294
- resetGestureState();
295
- swipeFromScrollable = false;
296
- scrollableAncestor = null;
297
- crossAxisScrollable = null;
298
- drawerAxisAttributed = false;
299
- preserveNativeCrossAxisScroll = false;
300
- activePointerId = null;
301
- pointerStarted = false;
302
- }
303
- function startSwipe(el, pos) {
304
- resetGestureState();
305
- getElementTransform(el);
306
- dragStartPos = pos;
307
- pendingSwipeStartPos = pos;
308
- elementSize = {
309
- width: el.offsetWidth,
310
- height: el.offsetHeight
311
- };
312
- isFirstMove = true;
313
- pendingSwipe = true;
314
- }
315
- /**
316
- * Applies sqrt-damping to any axis moving in a disallowed direction.
317
- * Axes moving in an allowed direction pass through linearly.
318
- * Ported from BaseUI `useSwipeDismiss.ts:applyDirectionalDamping`.
319
- */
320
- function applyDirectionalDamping(deltaX, deltaY) {
321
- const exponent = (value) => value >= 0 ? value ** .5 : -(Math.abs(value) ** .5);
322
- const dampAxis = (delta, allowNegative, allowPositive) => {
323
- if (!allowNegative && delta < 0) return exponent(delta);
324
- if (!allowPositive && delta > 0) return exponent(delta);
325
- return delta;
326
- };
327
- return {
328
- x: hasHorizontal.value ? dampAxis(deltaX, allowLeft.value, allowRight.value) : exponent(deltaX),
329
- y: hasVertical.value ? dampAxis(deltaY, allowUp.value, allowDown.value) : exponent(deltaY)
330
- };
331
- }
332
- /**
333
- * Arbitrates a touchmove between the drawer swipe and a native scroll on the
334
- * cross axis. Returns `true` when the move must be left alone — the cross axis
335
- * already won the gesture, or neither axis has passed the slop yet.
336
- */
337
- function shouldYieldTouchMove(e, pos) {
338
- if (preserveNativeCrossAxisScroll) return true;
339
- if (drawerAxisAttributed || !crossAxisScrollable || !drawerAxis.value) return false;
340
- if (!e.cancelable) {
341
- preserveNativeCrossAxisScroll = true;
342
- return true;
343
- }
344
- const isVerticalDrawerAxis = drawerAxis.value === "vertical";
345
- const drawerAxisDelta = isVerticalDrawerAxis ? pos.y - dragStartPos.y : pos.x - dragStartPos.x;
346
- const crossAxisDelta = isVerticalDrawerAxis ? pos.x - dragStartPos.x : pos.y - dragStartPos.y;
347
- const absDrawerAxisDelta = Math.abs(drawerAxisDelta);
348
- const absCrossAxisDelta = Math.abs(crossAxisDelta);
349
- if (absCrossAxisDelta >= AXIS_LOCK_SLOP && absCrossAxisDelta > absDrawerAxisDelta + AXIS_LOCK_BIAS) {
350
- preserveNativeCrossAxisScroll = true;
351
- return true;
352
- }
353
- if (absDrawerAxisDelta >= AXIS_LOCK_SLOP) {
354
- drawerAxisAttributed = true;
355
- return false;
356
- }
357
- return true;
358
- }
359
- function processMove(el, pos, time) {
360
- const rawDx = pos.x - dragStartPos.x;
361
- const rawDy = pos.y - dragStartPos.y;
362
- if (isFirstMove) {
363
- isFirstMove = false;
364
- const absX = Math.abs(rawDx);
365
- const absY = Math.abs(rawDy);
366
- if (hasVertical.value && hasHorizontal.value) lockedAxis = absX > absY ? "horizontal" : "vertical";
367
- else if (hasVertical.value) lockedAxis = "vertical";
368
- else lockedAxis = "horizontal";
369
- }
370
- const dx = lockedAxis === "vertical" ? 0 : rawDx;
371
- const dy = lockedAxis === "horizontal" ? 0 : rawDy;
372
- const dir = toValue(directions).find((d) => getDisplacement(d, dx, dy) > 0);
373
- if (pendingSwipe && pendingSwipeStartPos) {
374
- if (Math.max(Math.abs(dx), Math.abs(dy)) < MIN_DRAG_THRESHOLD) return;
375
- pendingSwipe = false;
376
- setSwiping(true);
377
- onSwipeStart?.();
378
- }
379
- if (!isSwiping.value) return;
380
- if (!intendedDirection && dir) {
381
- intendedDirection = dir;
382
- swipeDirection.value = dir;
383
- maxDisplacement = getDisplacement(dir, dx, dy);
384
- }
385
- const currentDir = intendedDirection;
386
- if (currentDir && !cancelledSwipe) {
387
- const displacement = getDisplacement(currentDir, dx, dy);
388
- maxDisplacement = Math.max(maxDisplacement, displacement);
389
- if (maxDisplacement > DEFAULT_SWIPE_THRESHOLD / 2 && maxDisplacement - displacement > REVERSE_CANCEL_THRESHOLD) cancelledSwipe = true;
390
- }
391
- const damped = applyDirectionalDamping(dx, dy);
392
- dragOffset.value = {
393
- x: damped.x,
394
- y: damped.y
395
- };
396
- setCssVars(el, damped.x, damped.y);
397
- recordSample({
398
- x: damped.x,
399
- y: damped.y
400
- }, time);
401
- const currentEl = elementRef.value;
402
- const progressDir = currentDir ?? toValue(directions)[0];
403
- if (currentEl && progressDir) {
404
- const dim = progressDir === "up" || progressDir === "down" ? elementSize.height || currentEl.offsetHeight : elementSize.width || currentEl.offsetWidth;
405
- const threshold = getThreshold(currentEl, progressDir);
406
- const p = Math.min(1, Math.max(0, getDisplacement(progressDir, dx, dy) / (dim + threshold)));
407
- if (p !== swipeProgress) {
408
- swipeProgress = p;
409
- onProgress?.(p, {
410
- deltaX: damped.x,
411
- deltaY: damped.y,
412
- direction: currentDir
413
- });
414
- }
415
- }
416
- }
417
- function finishSwipe(el) {
418
- if (!isSwiping.value) {
419
- reset();
420
- return;
421
- }
422
- const displacement = getDisplacement(intendedDirection ?? toValue(directions)[0], dragOffset.value.x, dragOffset.value.y);
423
- const threshold = getThreshold(el, intendedDirection ?? toValue(directions)[0]);
424
- const now = performance.now();
425
- const velocity = (lastDragSample ? now - lastDragSample.time : Infinity) > MAX_RELEASE_VELOCITY_AGE_MS ? {
426
- x: 0,
427
- y: 0
428
- } : lastVelocity;
429
- if (!(onRelease?.(velocity) === true)) {
430
- const velInDirection = getDisplacement(intendedDirection ?? toValue(directions)[0], velocity.x, velocity.y);
431
- if (!cancelledSwipe && (displacement >= threshold || velInDirection > .3)) {
432
- el.setAttribute("data-swipe-dismissed", "");
433
- onDismiss?.();
434
- } else {
435
- clearCssVars(el);
436
- onCancel?.();
437
- }
438
- }
439
- reset();
440
- }
441
- function onPointerDown(e) {
442
- if (!toValue(options.enabled)) return;
443
- if (e.pointerType === "touch") return;
444
- if (e.button !== 0) return;
445
- if (canStart && !canStart()) return;
446
- if (e.target?.closest(DEFAULT_IGNORE_SELECTOR)) return;
447
- const el = elementRef.value;
448
- if (!el) return;
449
- startSwipe(el, {
450
- x: e.clientX,
451
- y: e.clientY
452
- });
453
- activePointerId = e.pointerId;
454
- pointerStarted = true;
455
- try {
456
- el.setPointerCapture(e.pointerId);
457
- } catch {}
458
- }
459
- function onPointerMove(e) {
460
- if (!pointerStarted || e.pointerId !== activePointerId) return;
461
- const el = elementRef.value;
462
- if (!el) return;
463
- if ((e.buttons & 1) === 0) {
464
- finishSwipe(el);
465
- return;
466
- }
467
- processMove(el, {
468
- x: e.clientX,
469
- y: e.clientY
470
- }, e.timeStamp);
471
- }
472
- function onPointerUp(e) {
473
- if (!pointerStarted || e.pointerId !== activePointerId) return;
474
- const el = elementRef.value;
475
- if (!el) {
476
- reset();
477
- return;
478
- }
479
- finishSwipe(el);
480
- }
481
- /**
482
- * Ends an in-flight pointer drag that can no longer be tracked — pointer
483
- * capture was lost, or the window lost focus mid-drag (which is what happens
484
- * when the release lands over another application). The drawer settles from
485
- * wherever it was last dragged to.
486
- */
487
- function onPointerInterrupted() {
488
- if (!pointerStarted) return;
489
- const el = elementRef.value;
490
- if (!el) {
491
- reset();
492
- return;
493
- }
494
- finishSwipe(el);
495
- }
496
- function onTouchStart(e) {
497
- if (!toValue(options.enabled)) return;
498
- if (canStart && !canStart()) return;
499
- const target = e.target;
500
- if (target?.closest(DEFAULT_IGNORE_SELECTOR)) return;
501
- const el = elementRef.value;
502
- if (!el) return;
503
- crossAxisScrollable = null;
504
- drawerAxisAttributed = false;
505
- preserveNativeCrossAxisScroll = false;
506
- if (!options.ignoreScrollableAncestors) {
507
- const scrollable = findScrollableAncestor(target, hasVertical.value ? "vertical" : "horizontal");
508
- if (scrollable) {
509
- swipeFromScrollable = true;
510
- scrollableAncestor = scrollable;
511
- }
512
- }
513
- if (drawerAxis.value) crossAxisScrollable = findScrollableAncestor(target, drawerAxis.value === "vertical" ? "horizontal" : "vertical");
514
- const t = e.touches[0];
515
- if (!t) return;
516
- startSwipe(el, {
517
- x: t.clientX,
518
- y: t.clientY
519
- });
520
- }
521
- function onTouchMove(e) {
522
- const el = elementRef.value;
523
- if (!el || !pendingSwipe && !isSwiping.value) return;
524
- const t = e.touches[0];
525
- if (!t) return;
526
- const pos = {
527
- x: t.clientX,
528
- y: t.clientY
529
- };
530
- if (shouldYieldTouchMove(e, pos)) return;
531
- if (swipeFromScrollable && pendingSwipe && scrollableAncestor) {
532
- const dx = pos.x - dragStartPos.x;
533
- const dy = pos.y - dragStartPos.y;
534
- const allowed = canSwipeFromScrollEdge(scrollableAncestor, dx, dy, {
535
- hasVertical: hasVertical.value,
536
- hasHorizontal: hasHorizontal.value,
537
- allowUp: allowUp.value,
538
- allowDown: allowDown.value,
539
- allowLeft: allowLeft.value,
540
- allowRight: allowRight.value
541
- });
542
- if (allowed === false) {
543
- reset();
544
- return;
545
- }
546
- if (allowed === true) {
547
- swipeFromScrollable = false;
548
- scrollableAncestor = null;
549
- }
550
- }
551
- const wasSwiping = isSwiping.value;
552
- processMove(el, pos, e.timeStamp);
553
- if (wasSwiping || isSwiping.value) e.preventDefault();
554
- }
555
- function onTouchEnd() {
556
- const el = elementRef.value;
557
- if (!el) return;
558
- finishSwipe(el);
559
- }
560
- const cleanups = [];
561
- watch(() => elementRef.value, (el) => {
562
- cleanups.forEach((fn) => fn());
563
- cleanups.length = 0;
564
- if (!el) return;
565
- const doc = el.ownerDocument;
566
- const win = doc.defaultView;
567
- cleanups.push(useEventListener(el, "pointerdown", onPointerDown), useEventListener(el, "pointermove", onPointerMove), useEventListener(el, "pointerup", onPointerUp), useEventListener(el, "pointercancel", onPointerUp), useEventListener(el, "lostpointercapture", onPointerInterrupted), useEventListener(doc, "pointerup", onPointerUp), useEventListener(doc, "pointercancel", onPointerUp), useEventListener(el, "touchstart", onTouchStart, { passive: true }), useEventListener(el, "touchmove", onTouchMove, { passive: false }), useEventListener(el, "touchend", onTouchEnd), useEventListener(el, "touchcancel", onTouchEnd));
568
- if (win) cleanups.push(useEventListener(win, "blur", onPointerInterrupted));
569
- }, { immediate: true });
570
- onUnmounted(() => {
571
- cleanups.forEach((fn) => fn());
572
- cleanups.length = 0;
573
- reset();
574
- });
575
- return {
576
- isSwiping,
577
- swipeDirection,
578
- dragOffset
579
- };
580
- }
581
- //#endregion
582
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Drawer/DrawerContentImpl.js
583
- var DrawerContentImpl_default = /* @__PURE__ */ defineComponent({
584
- __name: "DrawerContentImpl",
585
- props: {
586
- trapFocus: {
587
- type: Boolean,
588
- required: false
589
- },
590
- initialFocus: {
591
- type: [Boolean, null],
592
- required: false,
593
- skipCheck: true,
594
- default: true
595
- },
596
- finalFocus: {
597
- type: [Boolean, null],
598
- required: false,
599
- skipCheck: true,
600
- default: true
601
- },
602
- disableOutsidePointerEvents: {
603
- type: Boolean,
604
- required: false
605
- },
606
- asChild: {
607
- type: Boolean,
608
- required: false
609
- },
610
- as: {
611
- type: null,
612
- required: false
613
- }
614
- },
615
- emits: [
616
- "escapeKeyDown",
617
- "pointerDownOutside",
618
- "focusOutside",
619
- "interactOutside",
620
- "openAutoFocus",
621
- "closeAutoFocus"
622
- ],
623
- setup(__props, { emit: __emit }) {
624
- const props = __props;
625
- const emits = __emit;
626
- const rootContext = injectDrawerRootContext();
627
- const { forwardRef, currentElement } = useForwardExpose();
628
- registerDrawerCssProperties();
629
- const { activeSnapPointOffset, snapToNearest } = useDrawerSnapPoints({
630
- snapPoints: rootContext.snapPoints,
631
- activeSnapPoint: rootContext.activeSnapPoint,
632
- popupHeight: rootContext.popupHeight,
633
- viewportRef: currentElement,
634
- onSnapPointChange: (point) => {
635
- if (point === null) rootContext.onOpenChange(false);
636
- else rootContext.setActiveSnapPoint(point);
637
- }
638
- });
639
- function writeSnapPointOffset() {
640
- const el = currentElement.value;
641
- if (!el) return;
642
- const offset = activeSnapPointOffset.value;
643
- if (offset != null) {
644
- const dir = rootContext.swipeDirection.value;
645
- const signedOffset = dir === "up" || dir === "left" ? -offset : offset;
646
- el.style.setProperty(DRAWER_CSS_VARS.snapPointOffset, `${signedOffset}px`);
647
- } else el.style.setProperty(DRAWER_CSS_VARS.snapPointOffset, "0px");
648
- }
649
- watch(activeSnapPointOffset, writeSnapPointOffset);
650
- useResizeObserver(currentElement, ([entry]) => {
651
- if (!entry) return;
652
- if (rootContext.hasNestedDrawer.value && rootContext.popupHeight.value > 0) return;
653
- const h$1 = entry.contentRect.height;
654
- rootContext.onPopupHeightChange(h$1);
655
- currentElement.value?.style.setProperty(DRAWER_CSS_VARS.height, `${h$1}px`);
656
- });
657
- watch(() => rootContext.frontmostHeight.value, (h$1) => {
658
- currentElement.value?.style.setProperty(DRAWER_CSS_VARS.frontmostHeight, `${h$1}px`);
659
- });
660
- const hasSnapPoints = computed(() => (rootContext.snapPoints.value?.length ?? 0) > 0);
661
- const swipeDirections = computed(() => {
662
- const dismiss = rootContext.swipeDirection.value;
663
- if (!hasSnapPoints.value) return [dismiss];
664
- return [dismiss, {
665
- up: "down",
666
- down: "up",
667
- left: "right",
668
- right: "left"
669
- }[dismiss]];
670
- });
671
- let lastRawDelta = {
672
- x: 0,
673
- y: 0
674
- };
675
- const { isSwiping, dragOffset } = useSwipeDismiss({
676
- enabled: computed(() => rootContext.open.value),
677
- elementRef: currentElement,
678
- directions: swipeDirections,
679
- movementCssVars: {
680
- x: DRAWER_CSS_VARS.swipeMovementX,
681
- y: DRAWER_CSS_VARS.swipeMovementY
682
- },
683
- canStart: () => !rootContext.nestedSwiping.value,
684
- onDismiss() {
685
- if (!hasSnapPoints.value) rootContext.onOpenChange(false, "swipe");
686
- },
687
- onRelease(velocity) {
688
- const el = currentElement.value;
689
- if (el) {
690
- const dir = rootContext.swipeDirection.value;
691
- const size = dir === "left" || dir === "right" ? el.offsetWidth : el.offsetHeight;
692
- const axisDelta = dir === "left" || dir === "right" ? lastRawDelta.x : lastRawDelta.y;
693
- const releaseVelocity = dir === "left" || dir === "right" ? velocity.x : velocity.y;
694
- const scalar = computeSwipeReleaseScalar({
695
- direction: dir,
696
- size,
697
- axisDelta,
698
- snapPointOffset: activeSnapPointOffset.value ?? 0,
699
- releaseVelocity
700
- });
701
- if (scalar != null) el.style.setProperty(DRAWER_CSS_VARS.swipeStrength, `${scalar}`);
702
- else el.style.setProperty(DRAWER_CSS_VARS.swipeStrength, "1");
703
- }
704
- if (hasSnapPoints.value) {
705
- const dir = rootContext.swipeDirection.value;
706
- const dragDelta = getDisplacement(dir, lastRawDelta.x, lastRawDelta.y);
707
- snapToNearest(dragDelta, velocity, dir, rootContext.snapToSequentialPoints.value);
708
- if (el) {
709
- writeSnapPointOffset();
710
- el.style.setProperty(DRAWER_CSS_VARS.swipeMovementX, "0px");
711
- el.style.setProperty(DRAWER_CSS_VARS.swipeMovementY, "0px");
712
- }
713
- }
714
- return hasSnapPoints.value;
715
- },
716
- onSwipingChange(swiping) {
717
- rootContext.onSwipingChange(swiping);
718
- rootContext.onNestedSwipingChange(swiping);
719
- },
720
- onProgress(progress, details) {
721
- if (details) lastRawDelta = {
722
- x: details.deltaX,
723
- y: details.deltaY
724
- };
725
- rootContext.onNestedSwipeProgressChange(progress);
726
- }
727
- });
728
- let pendingDismissReason;
729
- function onDismiss() {
730
- if (isSwiping.value) return;
731
- rootContext.onOpenChange(false, pendingDismissReason ?? "outside-press");
732
- pendingDismissReason = void 0;
733
- }
734
- function onEscapeKeyDown(event) {
735
- pendingDismissReason = "escape-key";
736
- emits("escapeKeyDown", event);
737
- }
738
- function onPointerDownOutside(event) {
739
- if (isSwiping.value) {
740
- event.preventDefault();
741
- return;
742
- }
743
- pendingDismissReason = "outside-press";
744
- emits("pointerDownOutside", event);
745
- }
746
- function onFocusOutside(event) {
747
- if (isSwiping.value) {
748
- event.preventDefault();
749
- return;
750
- }
751
- emits("focusOutside", event);
752
- }
753
- function onInteractOutside(event) {
754
- if (isSwiping.value) {
755
- event.preventDefault();
756
- return;
757
- }
758
- emits("interactOutside", event);
759
- }
760
- function onMountAutoFocus(event) {
761
- emits("openAutoFocus", event);
762
- if (event.defaultPrevented) return;
763
- if (props.initialFocus === false) event.preventDefault();
764
- else if (props.initialFocus instanceof HTMLElement) {
765
- event.preventDefault();
766
- focus(props.initialFocus, { select: true });
767
- }
768
- }
769
- let openCompleteCleanup;
770
- function clearOpenCompleteListener() {
771
- openCompleteCleanup?.();
772
- openCompleteCleanup = void 0;
773
- }
774
- watch(() => rootContext.open.value, (isOpen) => {
775
- clearOpenCompleteListener();
776
- const el = currentElement.value;
777
- if (!el) {
778
- rootContext.notifyOpenComplete(isOpen);
779
- return;
780
- }
781
- const handler = (event) => {
782
- if (event.target !== el) return;
783
- clearOpenCompleteListener();
784
- rootContext.notifyOpenComplete(isOpen);
785
- };
786
- el.addEventListener("transitionend", handler);
787
- el.addEventListener("animationend", handler);
788
- openCompleteCleanup = () => {
789
- el.removeEventListener("transitionend", handler);
790
- el.removeEventListener("animationend", handler);
791
- };
792
- });
793
- const dataAttributes = computed(() => {
794
- const attrs = {
795
- "data-state": rootContext.open.value ? "open" : "closed",
796
- "data-swipe-direction": rootContext.swipeDirection.value
797
- };
798
- if (isSwiping.value) attrs["data-swiping"] = "";
799
- if (rootContext.hasNestedDrawer.value) attrs["data-nested-drawer-open"] = "";
800
- return attrs;
801
- });
802
- watch(() => rootContext.nestedOpenDrawerCount.value, (n) => {
803
- currentElement.value?.style.setProperty(DRAWER_CSS_VARS.nestedDrawers, `${n}`);
804
- });
805
- let unsubscribeNestedProgress;
806
- onMounted(() => {
807
- rootContext.contentElement.value = currentElement.value;
808
- rootContext.notifyParentHasNestedDrawer?.(true);
809
- currentElement.value?.style.setProperty(DRAWER_CSS_VARS.nestedDrawers, `${rootContext.nestedOpenDrawerCount.value}`);
810
- writeSnapPointOffset();
811
- unsubscribeNestedProgress = rootContext.nestedSwipeProgressStore.subscribe(() => {
812
- const progress = rootContext.nestedSwipeProgressStore.getSnapshot();
813
- currentElement.value?.style.setProperty(DRAWER_CSS_VARS.swipeProgress, `${progress}`);
814
- });
815
- });
816
- onUnmounted(() => {
817
- rootContext.notifyParentHasNestedDrawer?.(false);
818
- unsubscribeNestedProgress?.();
819
- clearOpenCompleteListener();
820
- });
821
- if (process.env.NODE_ENV !== "production") onMounted(() => {
822
- if (!document.getElementById(rootContext.titleId)) console.warn(`Warning: \`DrawerContent\` requires a \`DrawerTitle\` for accessibility.`);
823
- });
824
- return (_ctx, _cache) => {
825
- return openBlock(), createBlock(unref(FocusScope_default), {
826
- "as-child": "",
827
- loop: "",
828
- trapped: props.trapFocus,
829
- onMountAutoFocus,
830
- onUnmountAutoFocus: _cache[0] || (_cache[0] = ($event) => emits("closeAutoFocus", $event))
831
- }, {
832
- default: withCtx(() => [createVNode(unref(DismissableLayer_default), mergeProps({
833
- id: unref(rootContext).contentId,
834
- ref: unref(forwardRef),
835
- as: _ctx.as,
836
- "as-child": _ctx.asChild,
837
- "disable-outside-pointer-events": _ctx.disableOutsidePointerEvents,
838
- role: "dialog",
839
- "aria-describedby": unref(rootContext).descriptionId,
840
- "aria-labelledby": unref(rootContext).titleId
841
- }, {
842
- ...dataAttributes.value,
843
- ..._ctx.$attrs
844
- }, {
845
- onDismiss,
846
- onEscapeKeyDown,
847
- onFocusOutside,
848
- onInteractOutside,
849
- onPointerDownOutside
850
- }), {
851
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
852
- _: 3
853
- }, 16, [
854
- "id",
855
- "as",
856
- "as-child",
857
- "disable-outside-pointer-events",
858
- "aria-describedby",
859
- "aria-labelledby"
860
- ])]),
861
- _: 3
862
- }, 8, ["trapped"]);
863
- };
864
- }
865
- });
866
- //#endregion
867
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Drawer/DrawerContent.js
868
- var DrawerContent_default = /* @__PURE__ */ defineComponent({
869
- __name: "DrawerContent",
870
- props: {
871
- forceMount: {
872
- type: Boolean,
873
- required: false
874
- },
875
- initialFocus: {
876
- type: [Boolean, null],
877
- required: false,
878
- skipCheck: true,
879
- default: true
880
- },
881
- finalFocus: {
882
- type: [Boolean, null],
883
- required: false,
884
- skipCheck: true,
885
- default: true
886
- },
887
- disableOutsidePointerEvents: {
888
- type: Boolean,
889
- required: false
890
- },
891
- asChild: {
892
- type: Boolean,
893
- required: false
894
- },
895
- as: {
896
- type: null,
897
- required: false
898
- }
899
- },
900
- emits: [
901
- "escapeKeyDown",
902
- "pointerDownOutside",
903
- "focusOutside",
904
- "interactOutside",
905
- "openAutoFocus",
906
- "closeAutoFocus"
907
- ],
908
- setup(__props, { emit: __emit }) {
909
- const props = __props;
910
- const emits = __emit;
911
- const rootContext = injectDrawerRootContext();
912
- const emitsAsProps = useEmitAsProps(emits);
913
- const { forwardRef, currentElement } = useForwardExpose();
914
- const hasInteractedOutside = ref(false);
915
- const hasPointerDownOutside = ref(false);
916
- const isFullModal = computed(() => rootContext.modal.value === true);
917
- const isTrapFocusOnly = computed(() => rootContext.modal.value === "trap-focus");
918
- const shouldTrapFocus = computed(() => (isFullModal.value || isTrapFocusOnly.value) && rootContext.open.value);
919
- const shouldHideOthers = computed(() => isFullModal.value ? currentElement.value : void 0);
920
- useHideOthers(shouldHideOthers);
921
- function finalFocusElement() {
922
- if (props.finalFocus === false) return void 0;
923
- if (props.finalFocus instanceof HTMLElement) return props.finalFocus;
924
- return rootContext.triggerElement.value;
925
- }
926
- function onCloseAutoFocusNonModal(e) {
927
- if (!e.defaultPrevented) {
928
- if (!hasInteractedOutside.value) finalFocusElement()?.focus();
929
- e.preventDefault();
930
- }
931
- hasInteractedOutside.value = false;
932
- hasPointerDownOutside.value = false;
933
- }
934
- function onInteractOutsideNonModal(e) {
935
- if (!e.defaultPrevented) {
936
- hasInteractedOutside.value = true;
937
- if (e.detail.originalEvent.type === "pointerdown") hasPointerDownOutside.value = true;
938
- }
939
- const target = e.target;
940
- if (rootContext.triggerElement.value?.contains(target)) e.preventDefault();
941
- if (e.detail.originalEvent.type === "focusin" && hasPointerDownOutside.value) e.preventDefault();
942
- }
943
- return (_ctx, _cache) => {
944
- return openBlock(), createBlock(unref(Presence_default), { present: _ctx.forceMount || unref(rootContext).open.value }, {
945
- default: withCtx(() => [isFullModal.value ? (openBlock(), createBlock(DrawerContentImpl_default, mergeProps({
946
- key: 0,
947
- ref: unref(forwardRef)
948
- }, {
949
- ...props,
950
- ...unref(emitsAsProps),
951
- ..._ctx.$attrs
952
- }, {
953
- "trap-focus": shouldTrapFocus.value,
954
- "disable-outside-pointer-events": true,
955
- onCloseAutoFocus: _cache[0] || (_cache[0] = (e) => {
956
- if (!e.defaultPrevented) {
957
- e.preventDefault();
958
- finalFocusElement()?.focus();
959
- }
960
- }),
961
- onPointerDownOutside: _cache[1] || (_cache[1] = (e) => {
962
- const orig = e.detail.originalEvent;
963
- if (orig.button === 2 || orig.button === 0 && orig.ctrlKey) e.preventDefault();
964
- }),
965
- onFocusOutside: _cache[2] || (_cache[2] = (e) => e.preventDefault())
966
- }), {
967
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
968
- _: 3
969
- }, 16, ["trap-focus"])) : (openBlock(), createBlock(DrawerContentImpl_default, mergeProps({
970
- key: 1,
971
- ref: unref(forwardRef)
972
- }, {
973
- ...props,
974
- ...unref(emitsAsProps),
975
- ..._ctx.$attrs
976
- }, {
977
- "trap-focus": shouldTrapFocus.value,
978
- "disable-outside-pointer-events": false,
979
- onCloseAutoFocus: onCloseAutoFocusNonModal,
980
- onInteractOutside: onInteractOutsideNonModal
981
- }), {
982
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
983
- _: 3
984
- }, 16, ["trap-focus"]))]),
985
- _: 3
986
- }, 8, ["present"]);
987
- };
988
- }
989
- });
990
- //#endregion
991
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Drawer/DrawerHandle.js
992
- var DrawerHandle_default = /* @__PURE__ */ defineComponent({
993
- __name: "DrawerHandle",
994
- props: {
995
- asChild: {
996
- type: Boolean,
997
- required: false
998
- },
999
- as: {
1000
- type: null,
1001
- required: false,
1002
- default: "div"
1003
- }
1004
- },
1005
- setup(__props) {
1006
- const props = __props;
1007
- useForwardExpose();
1008
- const rootContext = injectDrawerRootContext();
1009
- return (_ctx, _cache) => {
1010
- return openBlock(), createBlock(unref(Primitive), mergeProps(props, {
1011
- "aria-hidden": "true",
1012
- "data-state": unref(rootContext).open.value ? "open" : "closed"
1013
- }), {
1014
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1015
- _: 3
1016
- }, 16, ["data-state"]);
1017
- };
1018
- }
1019
- });
1020
- //#endregion
1021
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Drawer/DrawerOverlayImpl.js
1022
- var DrawerOverlayImpl_default = /* @__PURE__ */ defineComponent({
1023
- __name: "DrawerOverlayImpl",
1024
- props: {
1025
- asChild: {
1026
- type: Boolean,
1027
- required: false
1028
- },
1029
- as: {
1030
- type: null,
1031
- required: false
1032
- }
1033
- },
1034
- setup(__props) {
1035
- const rootContext = injectDrawerRootContext();
1036
- const locked = useBodyScrollLock(rootContext.open.value);
1037
- watch(() => rootContext.open.value, (open) => {
1038
- locked.value = open;
1039
- }, { immediate: true });
1040
- useForwardExpose();
1041
- const dataAttributes = computed(() => {
1042
- const attrs = {
1043
- "data-state": rootContext.open.value ? "open" : "closed",
1044
- "data-swipe-direction": rootContext.swipeDirection.value
1045
- };
1046
- if (rootContext.isSwiping.value) attrs["data-swiping"] = "";
1047
- return attrs;
1048
- });
1049
- return (_ctx, _cache) => {
1050
- return openBlock(), createBlock(unref(Primitive), mergeProps({
1051
- as: _ctx.as,
1052
- "as-child": _ctx.asChild
1053
- }, dataAttributes.value, { style: {
1054
- pointerEvents: "auto",
1055
- userSelect: "none",
1056
- [unref(DRAWER_CSS_VARS).swipeProgress]: "0",
1057
- [unref(DRAWER_CSS_VARS).swipeStrength]: "1"
1058
- } }), {
1059
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1060
- _: 3
1061
- }, 16, [
1062
- "as",
1063
- "as-child",
1064
- "style"
1065
- ]);
1066
- };
1067
- }
1068
- });
1069
- //#endregion
1070
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Drawer/DrawerOverlay.js
1071
- var DrawerOverlay_default = /* @__PURE__ */ defineComponent({
1072
- __name: "DrawerOverlay",
1073
- props: {
1074
- forceMount: {
1075
- type: Boolean,
1076
- required: false,
1077
- default: false
1078
- },
1079
- forceRender: {
1080
- type: Boolean,
1081
- required: false,
1082
- default: false
1083
- },
1084
- asChild: {
1085
- type: Boolean,
1086
- required: false
1087
- },
1088
- as: {
1089
- type: null,
1090
- required: false
1091
- }
1092
- },
1093
- setup(__props) {
1094
- const rootContext = injectDrawerRootContext();
1095
- const isNested = !!rootContext.notifyParentHasNestedDrawer;
1096
- const { forwardRef } = useForwardExpose();
1097
- return (_ctx, _cache) => {
1098
- return unref(rootContext).modal.value && (!isNested || _ctx.forceRender) ? (openBlock(), createBlock(unref(Presence_default), {
1099
- key: 0,
1100
- present: _ctx.forceMount || unref(rootContext).open.value
1101
- }, {
1102
- default: withCtx(() => [createVNode(DrawerOverlayImpl_default, mergeProps(_ctx.$attrs, {
1103
- ref: unref(forwardRef),
1104
- as: _ctx.as,
1105
- "as-child": _ctx.asChild
1106
- }), {
1107
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1108
- _: 3
1109
- }, 16, ["as", "as-child"])]),
1110
- _: 3
1111
- }, 8, ["present"])) : createCommentVNode("v-if", true);
1112
- };
1113
- }
1114
- });
1115
- //#endregion
1116
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Drawer/DrawerPortal.js
1117
- var DrawerPortal_default = /* @__PURE__ */ defineComponent({
1118
- __name: "DrawerPortal",
1119
- props: {
1120
- to: {
1121
- type: null,
1122
- required: false
1123
- },
1124
- disabled: {
1125
- type: Boolean,
1126
- required: false
1127
- },
1128
- defer: {
1129
- type: Boolean,
1130
- required: false
1131
- },
1132
- forceMount: {
1133
- type: Boolean,
1134
- required: false
1135
- }
1136
- },
1137
- setup(__props) {
1138
- return (_ctx, _cache) => {
1139
- return openBlock(), createBlock(unref(Teleport_default), normalizeProps(guardReactiveProps(_ctx.$props)), {
1140
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1141
- _: 3
1142
- }, 16);
1143
- };
1144
- }
1145
- });
2
+ import { createBlock, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
3
+ import clsx$1 from "clsx";
4
+ import { DrawerContent, DrawerHandle, DrawerOverlay, DrawerPortal, useForwardPropsEmits } from "reka-ui";
5
+ import { reactiveOmit } from "@vueuse/core";
1146
6
  //#endregion
1147
7
  //#region src/components/drawer/drawer-content.vue
1148
8
  var drawer_content_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -1176,12 +36,12 @@ var drawer_content_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
1176
36
  const emits = __emit;
1177
37
  const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
1178
38
  return (_ctx, _cache) => {
1179
- return openBlock(), createBlock(unref(DrawerPortal_default), null, {
1180
- default: withCtx(() => [createVNode(unref(DrawerOverlay_default), { class: "celeste-drawer-overlay" }), createVNode(unref(DrawerContent_default), mergeProps({ class: unref(clsx)("celeste-drawer-content", props.class) }, {
39
+ return openBlock(), createBlock(unref(DrawerPortal), null, {
40
+ default: withCtx(() => [createVNode(unref(DrawerOverlay), { class: "celeste-drawer-overlay" }), createVNode(unref(DrawerContent), mergeProps({ class: unref(clsx$1)("celeste-drawer-content", props.class) }, {
1181
41
  ...unref(forwarded),
1182
42
  ..._ctx.$attrs
1183
43
  }), {
1184
- default: withCtx(() => [createVNode(unref(DrawerHandle_default), { class: "celeste-drawer-handle" }), renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
44
+ default: withCtx(() => [createVNode(unref(DrawerHandle), { class: "celeste-drawer-handle" }), renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
1185
45
  _: 3
1186
46
  }, 16, ["class"])]),
1187
47
  _: 3