@youcan/celeste 0.21.2 → 0.22.1

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 (542) 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 +3069 -3065
  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 +7 -5
  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 +7 -5
  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 +7 -5
  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 +7 -5
  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 +11 -9
  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 +4 -4
  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 +4 -4
  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 +4 -4
  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 +4 -4
  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 +3 -3
  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/button/button.vue +1 -0
  359. package/src/components/button/fancy-button.vue +1 -0
  360. package/src/components/button/link-button.vue +1 -0
  361. package/src/components/button/social-button.vue +1 -0
  362. package/dist/cjs/chunks/BubbleSelect.cjs +0 -331
  363. package/dist/cjs/chunks/CollapsibleRoot.cjs +0 -89
  364. package/dist/cjs/chunks/Collection.cjs +0 -84
  365. package/dist/cjs/chunks/ComboboxContent.cjs +0 -446
  366. package/dist/cjs/chunks/ComboboxGroup.cjs +0 -89
  367. package/dist/cjs/chunks/ComboboxInput.cjs +0 -269
  368. package/dist/cjs/chunks/ComboboxItem.cjs +0 -202
  369. package/dist/cjs/chunks/ComboboxLabel.cjs +0 -46
  370. package/dist/cjs/chunks/ComboboxRoot.cjs +0 -753
  371. package/dist/cjs/chunks/ComboboxSeparator.cjs +0 -34
  372. package/dist/cjs/chunks/ConfigProvider.cjs +0 -68
  373. package/dist/cjs/chunks/DialogClose.cjs +0 -40
  374. package/dist/cjs/chunks/DialogDescription.cjs +0 -37
  375. package/dist/cjs/chunks/DialogPortal.cjs +0 -524
  376. package/dist/cjs/chunks/DialogRoot.cjs +0 -80
  377. package/dist/cjs/chunks/DialogTitle.cjs +0 -37
  378. package/dist/cjs/chunks/DialogTrigger.cjs +0 -56
  379. package/dist/cjs/chunks/DismissableLayer.cjs +0 -268
  380. package/dist/cjs/chunks/DrawerClose.cjs +0 -40
  381. package/dist/cjs/chunks/DrawerDescription.cjs +0 -37
  382. package/dist/cjs/chunks/DrawerRoot.cjs +0 -366
  383. package/dist/cjs/chunks/DrawerTitle.cjs +0 -37
  384. package/dist/cjs/chunks/DropdownMenuPortal.cjs +0 -72
  385. package/dist/cjs/chunks/DropdownMenuRoot.cjs +0 -86
  386. package/dist/cjs/chunks/FocusScope.cjs +0 -377
  387. package/dist/cjs/chunks/Label.cjs +0 -41
  388. package/dist/cjs/chunks/MenuAnchor.cjs +0 -36
  389. package/dist/cjs/chunks/MenuContentImpl.cjs +0 -371
  390. package/dist/cjs/chunks/MenuGroup.cjs +0 -43
  391. package/dist/cjs/chunks/MenuItemImpl.cjs +0 -100
  392. package/dist/cjs/chunks/MenuRoot.cjs +0 -108
  393. package/dist/cjs/chunks/MenuSub.cjs +0 -67
  394. package/dist/cjs/chunks/PaginationRoot.cjs +0 -100
  395. package/dist/cjs/chunks/PinInputRoot.cjs +0 -152
  396. package/dist/cjs/chunks/PopoverRoot.cjs +0 -72
  397. package/dist/cjs/chunks/PopperAnchor.cjs +0 -47
  398. package/dist/cjs/chunks/PopperArrow.cjs +0 -151
  399. package/dist/cjs/chunks/PopperContent.cjs +0 -2099
  400. package/dist/cjs/chunks/PopperRoot.cjs +0 -31
  401. package/dist/cjs/chunks/Presence.cjs +0 -195
  402. package/dist/cjs/chunks/Primitive.cjs +0 -79
  403. package/dist/cjs/chunks/ProgressIndicator.cjs +0 -160
  404. package/dist/cjs/chunks/RadioGroupRoot.cjs +0 -142
  405. package/dist/cjs/chunks/RovingFocusGroup.cjs +0 -146
  406. package/dist/cjs/chunks/RovingFocusItem.cjs +0 -113
  407. package/dist/cjs/chunks/SelectGroup.cjs +0 -43
  408. package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +0 -597
  409. package/dist/cjs/chunks/TabsRoot.cjs +0 -113
  410. package/dist/cjs/chunks/Teleport.cjs +0 -50
  411. package/dist/cjs/chunks/ToggleGroupRoot.cjs +0 -187
  412. package/dist/cjs/chunks/TooltipProvider.cjs +0 -86
  413. package/dist/cjs/chunks/TooltipRoot.cjs +0 -145
  414. package/dist/cjs/chunks/VisuallyHidden.cjs +0 -64
  415. package/dist/cjs/chunks/VisuallyHiddenInput.cjs +0 -146
  416. package/dist/cjs/chunks/clamp.cjs +0 -75
  417. package/dist/cjs/chunks/clsx.cjs +0 -21
  418. package/dist/cjs/chunks/createContext.cjs +0 -37
  419. package/dist/cjs/chunks/defu.cjs +0 -34
  420. package/dist/cjs/chunks/dist.cjs +0 -543
  421. package/dist/cjs/chunks/dist2.cjs +0 -538
  422. package/dist/cjs/chunks/dist3.cjs +0 -16177
  423. package/dist/cjs/chunks/getActiveElement.cjs +0 -14
  424. package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +0 -18
  425. package/dist/cjs/chunks/isValueEqualOrExist.cjs +0 -24
  426. package/dist/cjs/chunks/menus.cjs +0 -1368
  427. package/dist/cjs/chunks/nullish.cjs +0 -11
  428. package/dist/cjs/chunks/ohash.D__AXeF1.cjs +0 -114
  429. package/dist/cjs/chunks/tinycolor.cjs +0 -904
  430. package/dist/cjs/chunks/useArrowNavigation.cjs +0 -65
  431. package/dist/cjs/chunks/useCalendar.cjs +0 -2533
  432. package/dist/cjs/chunks/useComposing.cjs +0 -45
  433. package/dist/cjs/chunks/useDirection.cjs +0 -19
  434. package/dist/cjs/chunks/useEmitAsProps.cjs +0 -33
  435. package/dist/cjs/chunks/useFocusGuards.cjs +0 -39
  436. package/dist/cjs/chunks/useFormControl.cjs +0 -13
  437. package/dist/cjs/chunks/useForwardExpose.cjs +0 -63
  438. package/dist/cjs/chunks/useForwardProps.cjs +0 -39
  439. package/dist/cjs/chunks/useForwardPropsEmits.cjs +0 -19
  440. package/dist/cjs/chunks/useForwardScopeId.cjs +0 -30
  441. package/dist/cjs/chunks/useHideOthers.cjs +0 -137
  442. package/dist/cjs/chunks/useId.cjs +0 -30
  443. package/dist/cjs/chunks/useKbd.cjs +0 -46
  444. package/dist/cjs/chunks/useLocale.cjs +0 -19
  445. package/dist/cjs/chunks/useNonce.cjs +0 -14
  446. package/dist/cjs/chunks/usePrimitiveElement.cjs +0 -17
  447. package/dist/cjs/chunks/useSize.cjs +0 -54
  448. package/dist/cjs/chunks/useTypeahead.cjs +0 -69
  449. package/dist/cjs/chunks/utils.cjs +0 -117
  450. package/dist/cjs/chunks/utils2.cjs +0 -73
  451. package/dist/cjs/chunks/utils3.cjs +0 -20
  452. package/dist/es/chunks/BubbleSelect.js +0 -290
  453. package/dist/es/chunks/CollapsibleRoot.js +0 -78
  454. package/dist/es/chunks/Collection.js +0 -79
  455. package/dist/es/chunks/ComboboxContent.js +0 -441
  456. package/dist/es/chunks/ComboboxGroup.js +0 -78
  457. package/dist/es/chunks/ComboboxInput.js +0 -264
  458. package/dist/es/chunks/ComboboxItem.js +0 -191
  459. package/dist/es/chunks/ComboboxLabel.js +0 -41
  460. package/dist/es/chunks/ComboboxRoot.js +0 -730
  461. package/dist/es/chunks/ComboboxSeparator.js +0 -29
  462. package/dist/es/chunks/ConfigProvider.js +0 -57
  463. package/dist/es/chunks/DialogClose.js +0 -35
  464. package/dist/es/chunks/DialogDescription.js +0 -32
  465. package/dist/es/chunks/DialogPortal.js +0 -507
  466. package/dist/es/chunks/DialogRoot.js +0 -69
  467. package/dist/es/chunks/DialogTitle.js +0 -32
  468. package/dist/es/chunks/DialogTrigger.js +0 -51
  469. package/dist/es/chunks/DismissableLayer.js +0 -257
  470. package/dist/es/chunks/DrawerClose.js +0 -35
  471. package/dist/es/chunks/DrawerDescription.js +0 -32
  472. package/dist/es/chunks/DrawerRoot.js +0 -325
  473. package/dist/es/chunks/DrawerTitle.js +0 -32
  474. package/dist/es/chunks/DropdownMenuPortal.js +0 -67
  475. package/dist/es/chunks/DropdownMenuRoot.js +0 -75
  476. package/dist/es/chunks/FocusScope.js +0 -360
  477. package/dist/es/chunks/Label.js +0 -36
  478. package/dist/es/chunks/MenuAnchor.js +0 -31
  479. package/dist/es/chunks/MenuContentImpl.js +0 -360
  480. package/dist/es/chunks/MenuGroup.js +0 -32
  481. package/dist/es/chunks/MenuItemImpl.js +0 -95
  482. package/dist/es/chunks/MenuRoot.js +0 -85
  483. package/dist/es/chunks/MenuSub.js +0 -56
  484. package/dist/es/chunks/PaginationRoot.js +0 -89
  485. package/dist/es/chunks/PinInputRoot.js +0 -141
  486. package/dist/es/chunks/PopoverRoot.js +0 -61
  487. package/dist/es/chunks/PopperAnchor.js +0 -42
  488. package/dist/es/chunks/PopperArrow.js +0 -146
  489. package/dist/es/chunks/PopperContent.js +0 -2029
  490. package/dist/es/chunks/PopperRoot.js +0 -20
  491. package/dist/es/chunks/Presence.js +0 -184
  492. package/dist/es/chunks/Primitive.js +0 -62
  493. package/dist/es/chunks/ProgressIndicator.js +0 -149
  494. package/dist/es/chunks/RadioGroupRoot.js +0 -131
  495. package/dist/es/chunks/RovingFocusGroup.js +0 -135
  496. package/dist/es/chunks/RovingFocusItem.js +0 -108
  497. package/dist/es/chunks/SelectGroup.js +0 -32
  498. package/dist/es/chunks/SelectItemAlignedPosition.js +0 -568
  499. package/dist/es/chunks/TabsRoot.js +0 -102
  500. package/dist/es/chunks/Teleport.js +0 -45
  501. package/dist/es/chunks/ToggleGroupRoot.js +0 -176
  502. package/dist/es/chunks/TooltipProvider.js +0 -75
  503. package/dist/es/chunks/TooltipRoot.js +0 -128
  504. package/dist/es/chunks/VisuallyHidden.js +0 -59
  505. package/dist/es/chunks/VisuallyHiddenInput.js +0 -141
  506. package/dist/es/chunks/clamp.js +0 -64
  507. package/dist/es/chunks/clsx.js +0 -16
  508. package/dist/es/chunks/createContext.js +0 -32
  509. package/dist/es/chunks/defu.js +0 -29
  510. package/dist/es/chunks/dist.js +0 -418
  511. package/dist/es/chunks/dist2.js +0 -461
  512. package/dist/es/chunks/dist3.js +0 -15890
  513. package/dist/es/chunks/getActiveElement.js +0 -9
  514. package/dist/es/chunks/handleAndDispatchCustomEvent.js +0 -13
  515. package/dist/es/chunks/isValueEqualOrExist.js +0 -19
  516. package/dist/es/chunks/menus.js +0 -1368
  517. package/dist/es/chunks/nullish.js +0 -6
  518. package/dist/es/chunks/ohash.D__AXeF1.js +0 -109
  519. package/dist/es/chunks/rolldown-runtime.js +0 -34
  520. package/dist/es/chunks/tinycolor.js +0 -899
  521. package/dist/es/chunks/useArrowNavigation.js +0 -60
  522. package/dist/es/chunks/useCalendar.js +0 -2426
  523. package/dist/es/chunks/useComposing.js +0 -40
  524. package/dist/es/chunks/useDirection.js +0 -14
  525. package/dist/es/chunks/useEmitAsProps.js +0 -28
  526. package/dist/es/chunks/useFocusGuards.js +0 -34
  527. package/dist/es/chunks/useFormControl.js +0 -8
  528. package/dist/es/chunks/useForwardExpose.js +0 -58
  529. package/dist/es/chunks/useForwardProps.js +0 -34
  530. package/dist/es/chunks/useForwardPropsEmits.js +0 -14
  531. package/dist/es/chunks/useForwardScopeId.js +0 -25
  532. package/dist/es/chunks/useHideOthers.js +0 -132
  533. package/dist/es/chunks/useId.js +0 -23
  534. package/dist/es/chunks/useKbd.js +0 -41
  535. package/dist/es/chunks/useLocale.js +0 -14
  536. package/dist/es/chunks/useNonce.js +0 -9
  537. package/dist/es/chunks/usePrimitiveElement.js +0 -12
  538. package/dist/es/chunks/useSize.js +0 -49
  539. package/dist/es/chunks/useTypeahead.js +0 -64
  540. package/dist/es/chunks/utils.js +0 -58
  541. package/dist/es/chunks/utils2.js +0 -44
  542. package/dist/es/chunks/utils3.js +0 -9
@@ -1,2099 +0,0 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime.cjs");
2
- const require_createContext = require("./createContext.cjs");
3
- const require_Primitive = require("./Primitive.cjs");
4
- const require_useDirection = require("./useDirection.cjs");
5
- const require_useForwardExpose = require("./useForwardExpose.cjs");
6
- const require_useSize = require("./useSize.cjs");
7
- const require_PopperRoot = require("./PopperRoot.cjs");
8
- let vue = require("vue");
9
- vue = require_rolldown_runtime.__toESM(vue, 1);
10
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Popper/utils.js
11
- function isNotNull(value) {
12
- return value !== null;
13
- }
14
- function transformOrigin(options) {
15
- return {
16
- name: "transformOrigin",
17
- options,
18
- fn(data) {
19
- const { placement, rects, middlewareData } = data;
20
- const isArrowHidden = middlewareData.arrow?.centerOffset !== 0;
21
- const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
22
- const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
23
- const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
24
- const noArrowAlignX = {
25
- start: options.dir === "rtl" ? "100%" : "0%",
26
- center: "50%",
27
- end: options.dir === "rtl" ? "0%" : "100%"
28
- }[placedAlign];
29
- const noArrowAlignY = {
30
- start: "0%",
31
- center: "50%",
32
- end: "100%"
33
- }[placedAlign];
34
- const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
35
- const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
36
- let x = "";
37
- let y = "";
38
- if (placedSide === "bottom") {
39
- x = isArrowHidden ? noArrowAlignX : `${arrowXCenter}px`;
40
- y = `${-arrowHeight}px`;
41
- } else if (placedSide === "top") {
42
- x = isArrowHidden ? noArrowAlignX : `${arrowXCenter}px`;
43
- y = `${rects.floating.height + arrowHeight}px`;
44
- } else if (placedSide === "right") {
45
- x = `${-arrowHeight}px`;
46
- y = isArrowHidden ? noArrowAlignY : `${arrowYCenter}px`;
47
- } else if (placedSide === "left") {
48
- x = `${rects.floating.width + arrowHeight}px`;
49
- y = isArrowHidden ? noArrowAlignY : `${arrowYCenter}px`;
50
- }
51
- return { data: {
52
- x,
53
- y
54
- } };
55
- }
56
- };
57
- }
58
- function getSideAndAlignFromPlacement(placement) {
59
- const [side, align = "center"] = placement.split("-");
60
- return [side, align];
61
- }
62
- //#endregion
63
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
64
- /**
65
- * Custom positioning reference element.
66
- * @see https://floating-ui.com/docs/virtual-elements
67
- */
68
- var sides = [
69
- "top",
70
- "right",
71
- "bottom",
72
- "left"
73
- ];
74
- var alignments = ["start", "end"];
75
- var placements = /*#__PURE__*/ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
76
- var min = Math.min;
77
- var max = Math.max;
78
- var round = Math.round;
79
- var floor = Math.floor;
80
- var createCoords = (v) => ({
81
- x: v,
82
- y: v
83
- });
84
- var oppositeSideMap = {
85
- left: "right",
86
- right: "left",
87
- bottom: "top",
88
- top: "bottom"
89
- };
90
- function clamp(start, value, end) {
91
- return max(start, min(value, end));
92
- }
93
- function evaluate(value, param) {
94
- return typeof value === "function" ? value(param) : value;
95
- }
96
- function getSide(placement) {
97
- return placement.split("-")[0];
98
- }
99
- function getAlignment(placement) {
100
- return placement.split("-")[1];
101
- }
102
- function getOppositeAxis(axis) {
103
- return axis === "x" ? "y" : "x";
104
- }
105
- function getAxisLength(axis) {
106
- return axis === "y" ? "height" : "width";
107
- }
108
- function getSideAxis(placement) {
109
- const firstChar = placement[0];
110
- return firstChar === "t" || firstChar === "b" ? "y" : "x";
111
- }
112
- function getAlignmentAxis(placement) {
113
- return getOppositeAxis(getSideAxis(placement));
114
- }
115
- function getAlignmentSides(placement, rects, rtl) {
116
- if (rtl === void 0) rtl = false;
117
- const alignment = getAlignment(placement);
118
- const alignmentAxis = getAlignmentAxis(placement);
119
- const length = getAxisLength(alignmentAxis);
120
- let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
121
- if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
122
- return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
123
- }
124
- function getExpandedPlacements(placement) {
125
- const oppositePlacement = getOppositePlacement(placement);
126
- return [
127
- getOppositeAlignmentPlacement(placement),
128
- oppositePlacement,
129
- getOppositeAlignmentPlacement(oppositePlacement)
130
- ];
131
- }
132
- function getOppositeAlignmentPlacement(placement) {
133
- return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
134
- }
135
- var lrPlacement = ["left", "right"];
136
- var rlPlacement = ["right", "left"];
137
- var tbPlacement = ["top", "bottom"];
138
- var btPlacement = ["bottom", "top"];
139
- function getSideList(side, isStart, rtl) {
140
- switch (side) {
141
- case "top":
142
- case "bottom":
143
- if (rtl) return isStart ? rlPlacement : lrPlacement;
144
- return isStart ? lrPlacement : rlPlacement;
145
- case "left":
146
- case "right": return isStart ? tbPlacement : btPlacement;
147
- default: return [];
148
- }
149
- }
150
- function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
151
- const alignment = getAlignment(placement);
152
- let list = getSideList(getSide(placement), direction === "start", rtl);
153
- if (alignment) {
154
- list = list.map((side) => side + "-" + alignment);
155
- if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
156
- }
157
- return list;
158
- }
159
- function getOppositePlacement(placement) {
160
- const side = getSide(placement);
161
- return oppositeSideMap[side] + placement.slice(side.length);
162
- }
163
- function expandPaddingObject(padding) {
164
- var _padding$top, _padding$right, _padding$bottom, _padding$left;
165
- return {
166
- top: (_padding$top = padding.top) != null ? _padding$top : 0,
167
- right: (_padding$right = padding.right) != null ? _padding$right : 0,
168
- bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
169
- left: (_padding$left = padding.left) != null ? _padding$left : 0
170
- };
171
- }
172
- function getPaddingObject(padding) {
173
- return typeof padding !== "number" ? expandPaddingObject(padding) : {
174
- top: padding,
175
- right: padding,
176
- bottom: padding,
177
- left: padding
178
- };
179
- }
180
- function rectToClientRect(rect) {
181
- const { x, y, width, height } = rect;
182
- return {
183
- width,
184
- height,
185
- top: y,
186
- left: x,
187
- right: x + width,
188
- bottom: y + height,
189
- x,
190
- y
191
- };
192
- }
193
- //#endregion
194
- //#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
195
- function computeCoordsFromPlacement(_ref, placement, rtl) {
196
- let { reference, floating } = _ref;
197
- const sideAxis = getSideAxis(placement);
198
- const alignmentAxis = getAlignmentAxis(placement);
199
- const alignLength = getAxisLength(alignmentAxis);
200
- const side = getSide(placement);
201
- const isVertical = sideAxis === "y";
202
- const commonX = reference.x + reference.width / 2 - floating.width / 2;
203
- const commonY = reference.y + reference.height / 2 - floating.height / 2;
204
- const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
205
- let coords;
206
- switch (side) {
207
- case "top":
208
- coords = {
209
- x: commonX,
210
- y: reference.y - floating.height
211
- };
212
- break;
213
- case "bottom":
214
- coords = {
215
- x: commonX,
216
- y: reference.y + reference.height
217
- };
218
- break;
219
- case "right":
220
- coords = {
221
- x: reference.x + reference.width,
222
- y: commonY
223
- };
224
- break;
225
- case "left":
226
- coords = {
227
- x: reference.x - floating.width,
228
- y: commonY
229
- };
230
- break;
231
- default: coords = {
232
- x: reference.x,
233
- y: reference.y
234
- };
235
- }
236
- const alignment = getAlignment(placement);
237
- if (alignment) coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
238
- return coords;
239
- }
240
- /**
241
- * Resolves with an object of overflow side offsets that determine how much the
242
- * element is overflowing a given clipping boundary on each side.
243
- * - positive = overflowing the boundary by that number of pixels
244
- * - negative = how many pixels left before it will overflow
245
- * - 0 = lies flush with the boundary
246
- * @see https://floating-ui.com/docs/detectOverflow
247
- */
248
- async function detectOverflow(state, options) {
249
- var _await$platform$isEle;
250
- if (options === void 0) options = {};
251
- const { x, y, platform, rects, elements, strategy } = state;
252
- const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
253
- const paddingObject = getPaddingObject(padding);
254
- const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
255
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
256
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
257
- boundary,
258
- rootBoundary,
259
- strategy
260
- }));
261
- const rect = elementContext === "floating" ? {
262
- x,
263
- y,
264
- width: rects.floating.width,
265
- height: rects.floating.height
266
- } : rects.reference;
267
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
268
- const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) && await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
269
- x: 1,
270
- y: 1
271
- };
272
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
273
- elements,
274
- rect,
275
- offsetParent,
276
- strategy
277
- }) : rect);
278
- return {
279
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
280
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
281
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
282
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
283
- };
284
- }
285
- var MAX_RESET_COUNT = 50;
286
- /**
287
- * Computes the `x` and `y` coordinates that will place the floating element
288
- * next to a given reference element.
289
- *
290
- * This export does not have any `platform` interface logic. You will need to
291
- * write one for the platform you are using Floating UI with.
292
- */
293
- var computePosition$1 = async (reference, floating, config) => {
294
- const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
295
- const platformWithDetectOverflow = platform.detectOverflow ? platform : {
296
- ...platform,
297
- detectOverflow
298
- };
299
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
300
- let rects = await platform.getElementRects({
301
- reference,
302
- floating,
303
- strategy
304
- });
305
- let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
306
- let statefulPlacement = placement;
307
- let resetCount = 0;
308
- const middlewareData = {};
309
- for (let i = 0; i < middleware.length; i++) {
310
- const currentMiddleware = middleware[i];
311
- if (!currentMiddleware) continue;
312
- const { name, fn } = currentMiddleware;
313
- const { x: nextX, y: nextY, data, reset } = await fn({
314
- x,
315
- y,
316
- initialPlacement: placement,
317
- placement: statefulPlacement,
318
- strategy,
319
- middlewareData,
320
- rects,
321
- platform: platformWithDetectOverflow,
322
- elements: {
323
- reference,
324
- floating
325
- }
326
- });
327
- x = nextX != null ? nextX : x;
328
- y = nextY != null ? nextY : y;
329
- middlewareData[name] = {
330
- ...middlewareData[name],
331
- ...data
332
- };
333
- if (reset && resetCount < MAX_RESET_COUNT) {
334
- resetCount++;
335
- if (typeof reset === "object") {
336
- if (reset.placement) statefulPlacement = reset.placement;
337
- if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
338
- reference,
339
- floating,
340
- strategy
341
- }) : reset.rects;
342
- ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
343
- }
344
- i = -1;
345
- }
346
- }
347
- return {
348
- x,
349
- y,
350
- placement: statefulPlacement,
351
- strategy,
352
- middlewareData
353
- };
354
- };
355
- /**
356
- * Provides data to position an inner element of the floating element so that it
357
- * appears centered to the reference element.
358
- * @see https://floating-ui.com/docs/arrow
359
- */
360
- var arrow$2 = (options) => ({
361
- name: "arrow",
362
- options,
363
- async fn(state) {
364
- const { x, y, placement, rects, platform, elements, middlewareData } = state;
365
- const { element, padding = 0 } = evaluate(options, state) || {};
366
- if (element == null) return {};
367
- const paddingObject = getPaddingObject(padding);
368
- const coords = {
369
- x,
370
- y
371
- };
372
- const axis = getAlignmentAxis(placement);
373
- const length = getAxisLength(axis);
374
- const arrowDimensions = await platform.getDimensions(element);
375
- const isYAxis = axis === "y";
376
- const minProp = isYAxis ? "top" : "left";
377
- const maxProp = isYAxis ? "bottom" : "right";
378
- const clientProp = isYAxis ? "clientHeight" : "clientWidth";
379
- const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
380
- const startDiff = coords[axis] - rects.reference[axis];
381
- const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
382
- let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
383
- if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];
384
- const centerToReference = endDiff / 2 - startDiff / 2;
385
- const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
386
- const minPadding = min(paddingObject[minProp], largestPossiblePadding);
387
- const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
388
- const max = clientSize - arrowDimensions[length] - maxPadding;
389
- const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
390
- const offset = clamp(minPadding, center, max);
391
- const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
392
- const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;
393
- return {
394
- [axis]: coords[axis] + alignmentOffset,
395
- data: {
396
- [axis]: offset,
397
- centerOffset: center - offset - alignmentOffset,
398
- ...shouldAddOffset && { alignmentOffset }
399
- },
400
- reset: shouldAddOffset
401
- };
402
- }
403
- });
404
- function getPlacementList(alignment, autoAlignment, allowedPlacements) {
405
- return (alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement)).filter((placement) => {
406
- if (alignment) return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
407
- return true;
408
- });
409
- }
410
- /**
411
- * Optimizes the visibility of the floating element by choosing the placement
412
- * that has the most space available automatically, without needing to specify a
413
- * preferred placement. Alternative to `flip`.
414
- * @see https://floating-ui.com/docs/autoPlacement
415
- */
416
- var autoPlacement$1 = function(options) {
417
- if (options === void 0) options = {};
418
- return {
419
- name: "autoPlacement",
420
- options,
421
- async fn(state) {
422
- var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
423
- const { rects, middlewareData, placement, platform, elements } = state;
424
- const { crossAxis = false, alignment, allowedPlacements = placements, autoAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
425
- const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
426
- const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
427
- const currentPlacement = placements$1[currentIndex];
428
- if (currentPlacement == null) return {};
429
- if (placement !== currentPlacement) return { reset: { placement: placements$1[0] } };
430
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
431
- const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
432
- const currentOverflows = [
433
- overflow[getSide(currentPlacement)],
434
- overflow[alignmentSides[0]],
435
- overflow[alignmentSides[1]]
436
- ];
437
- const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], {
438
- placement: currentPlacement,
439
- overflows: currentOverflows
440
- }];
441
- const nextPlacement = placements$1[currentIndex + 1];
442
- if (nextPlacement) return {
443
- data: {
444
- index: currentIndex + 1,
445
- overflows: allOverflows
446
- },
447
- reset: { placement: nextPlacement }
448
- };
449
- const placementsSortedByMostSpace = allOverflows.map((d) => {
450
- const alignment = getAlignment(d.placement);
451
- return [
452
- d.placement,
453
- alignment && crossAxis ? d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : d.overflows[0],
454
- d.overflows
455
- ];
456
- }).sort((a, b) => a[1] - b[1]);
457
- const resetPlacement = ((_placementsThatFitOnE = placementsSortedByMostSpace.filter((d) => d[2].slice(0, getAlignment(d[0]) ? 2 : 3).every((v) => v <= 0))[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
458
- if (resetPlacement !== placement) return {
459
- data: {
460
- index: currentIndex + 1,
461
- overflows: allOverflows
462
- },
463
- reset: { placement: resetPlacement }
464
- };
465
- return {};
466
- }
467
- };
468
- };
469
- /**
470
- * Optimizes the visibility of the floating element by flipping the `placement`
471
- * in order to keep it in view when the preferred placement(s) will overflow the
472
- * clipping boundary. Alternative to `autoPlacement`.
473
- * @see https://floating-ui.com/docs/flip
474
- */
475
- var flip$1 = function(options) {
476
- if (options === void 0) options = {};
477
- return {
478
- name: "flip",
479
- options,
480
- async fn(state) {
481
- var _middlewareData$arrow, _middlewareData$flip;
482
- const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
483
- const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
484
- if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
485
- const side = getSide(placement);
486
- const initialSideAxis = getSideAxis(initialPlacement);
487
- const isBasePlacement = getSide(initialPlacement) === initialPlacement;
488
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
489
- const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
490
- const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
491
- if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
492
- const placements = [initialPlacement, ...fallbackPlacements];
493
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
494
- const overflows = [];
495
- let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
496
- if (checkMainAxis) overflows.push(overflow[side]);
497
- if (checkCrossAxis) {
498
- const sides = getAlignmentSides(placement, rects, rtl);
499
- overflows.push(overflow[sides[0]], overflow[sides[1]]);
500
- }
501
- overflowsData = [...overflowsData, {
502
- placement,
503
- overflows
504
- }];
505
- if (!overflows.every((side) => side <= 0)) {
506
- var _middlewareData$flip2, _overflowsData$filter;
507
- const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
508
- const nextPlacement = placements[nextIndex];
509
- if (nextPlacement) {
510
- if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
511
- data: {
512
- index: nextIndex,
513
- overflows: overflowsData
514
- },
515
- reset: { placement: nextPlacement }
516
- };
517
- }
518
- let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
519
- if (!resetPlacement) switch (fallbackStrategy) {
520
- case "bestFit": {
521
- var _overflowsData$filter2;
522
- const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
523
- if (hasFallbackAxisSideDirection) {
524
- const currentSideAxis = getSideAxis(d.placement);
525
- return currentSideAxis === initialSideAxis || currentSideAxis === "y";
526
- }
527
- return true;
528
- }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
529
- if (placement) resetPlacement = placement;
530
- break;
531
- }
532
- case "initialPlacement": resetPlacement = initialPlacement;
533
- }
534
- if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
535
- }
536
- return {};
537
- }
538
- };
539
- };
540
- function getSideOffsets(overflow, rect) {
541
- return {
542
- top: overflow.top - rect.height,
543
- right: overflow.right - rect.width,
544
- bottom: overflow.bottom - rect.height,
545
- left: overflow.left - rect.width
546
- };
547
- }
548
- function isAnySideFullyClipped(overflow) {
549
- return sides.some((side) => overflow[side] >= 0);
550
- }
551
- /**
552
- * Provides data to hide the floating element in applicable situations, such as
553
- * when it is not in the same clipping context as the reference element.
554
- * @see https://floating-ui.com/docs/hide
555
- */
556
- var hide$1 = function(options) {
557
- if (options === void 0) options = {};
558
- return {
559
- name: "hide",
560
- options,
561
- async fn(state) {
562
- const { rects, platform } = state;
563
- const { strategy = "referenceHidden", ...detectOverflowOptions } = evaluate(options, state);
564
- switch (strategy) {
565
- case "referenceHidden": {
566
- const offsets = getSideOffsets(await platform.detectOverflow(state, {
567
- ...detectOverflowOptions,
568
- elementContext: "reference"
569
- }), rects.reference);
570
- return { data: {
571
- referenceHiddenOffsets: offsets,
572
- referenceHidden: isAnySideFullyClipped(offsets)
573
- } };
574
- }
575
- case "escaped": {
576
- const offsets = getSideOffsets(await platform.detectOverflow(state, {
577
- ...detectOverflowOptions,
578
- altBoundary: true
579
- }), rects.floating);
580
- return { data: {
581
- escapedOffsets: offsets,
582
- escaped: isAnySideFullyClipped(offsets)
583
- } };
584
- }
585
- default: return {};
586
- }
587
- }
588
- };
589
- };
590
- function getBoundingRect(rects) {
591
- const minX = min(...rects.map((rect) => rect.left));
592
- const minY = min(...rects.map((rect) => rect.top));
593
- const maxX = max(...rects.map((rect) => rect.right));
594
- const maxY = max(...rects.map((rect) => rect.bottom));
595
- return {
596
- x: minX,
597
- y: minY,
598
- width: maxX - minX,
599
- height: maxY - minY
600
- };
601
- }
602
- function getRectsByLine(rects) {
603
- const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
604
- const groups = [];
605
- let prevRect = null;
606
- for (let i = 0; i < sortedRects.length; i++) {
607
- const rect = sortedRects[i];
608
- if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) groups.push([rect]);
609
- else groups[groups.length - 1].push(rect);
610
- prevRect = rect;
611
- }
612
- return groups.map((rect) => rectToClientRect(getBoundingRect(rect)));
613
- }
614
- /**
615
- * Provides improved positioning for inline reference elements that can span
616
- * over multiple lines, such as hyperlinks or range selections.
617
- * @see https://floating-ui.com/docs/inline
618
- */
619
- var inline$1 = function(options) {
620
- if (options === void 0) options = {};
621
- return {
622
- name: "inline",
623
- options,
624
- async fn(state) {
625
- const { placement, elements, rects, platform, strategy } = state;
626
- const { padding = 2, x, y } = evaluate(options, state);
627
- const nativeClientRects = Array.from(await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference)) || []);
628
- if (!nativeClientRects.length) return {};
629
- const clientRects = getRectsByLine(nativeClientRects);
630
- const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
631
- const paddingObject = getPaddingObject(padding);
632
- function getBoundingClientRect() {
633
- if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) return clientRects.find((rect) => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
634
- if (clientRects.length >= 2) {
635
- if (getSideAxis(placement) === "y") {
636
- const firstRect = clientRects[0];
637
- const lastRect = clientRects[clientRects.length - 1];
638
- const isTop = getSide(placement) === "top";
639
- const top = firstRect.top;
640
- const bottom = lastRect.bottom;
641
- const left = isTop ? firstRect.left : lastRect.left;
642
- return rectToClientRect({
643
- x: left,
644
- y: top,
645
- width: (isTop ? firstRect.right : lastRect.right) - left,
646
- height: bottom - top
647
- });
648
- }
649
- const isLeftSide = getSide(placement) === "left";
650
- const maxRight = max(...clientRects.map((rect) => rect.right));
651
- const minLeft = min(...clientRects.map((rect) => rect.left));
652
- const measureRects = clientRects.filter((rect) => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
653
- const top = measureRects[0].top;
654
- const bottom = measureRects[measureRects.length - 1].bottom;
655
- return rectToClientRect({
656
- x: minLeft,
657
- y: top,
658
- width: maxRight - minLeft,
659
- height: bottom - top
660
- });
661
- }
662
- return fallback;
663
- }
664
- const resetRects = await platform.getElementRects({
665
- reference: { getBoundingClientRect },
666
- floating: elements.floating,
667
- strategy
668
- });
669
- if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) return { reset: { rects: resetRects } };
670
- return {};
671
- }
672
- };
673
- };
674
- var originSides = /*#__PURE__*/ new Set(["left", "top"]);
675
- async function convertValueToCoords(state, options) {
676
- const { placement, platform, elements } = state;
677
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
678
- const side = getSide(placement);
679
- const alignment = getAlignment(placement);
680
- const isVertical = getSideAxis(placement) === "y";
681
- const mainAxisMulti = originSides.has(side) ? -1 : 1;
682
- const crossAxisMulti = rtl && isVertical ? -1 : 1;
683
- const rawValue = evaluate(options, state);
684
- let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
685
- mainAxis: rawValue,
686
- crossAxis: 0,
687
- alignmentAxis: null
688
- } : {
689
- mainAxis: rawValue.mainAxis || 0,
690
- crossAxis: rawValue.crossAxis || 0,
691
- alignmentAxis: rawValue.alignmentAxis
692
- };
693
- if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
694
- return isVertical ? {
695
- x: crossAxis * crossAxisMulti,
696
- y: mainAxis * mainAxisMulti
697
- } : {
698
- x: mainAxis * mainAxisMulti,
699
- y: crossAxis * crossAxisMulti
700
- };
701
- }
702
- /**
703
- * Modifies the placement by translating the floating element along the
704
- * specified axes.
705
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
706
- * object may be passed.
707
- * @see https://floating-ui.com/docs/offset
708
- */
709
- var offset$1 = function(options) {
710
- if (options === void 0) options = 0;
711
- return {
712
- name: "offset",
713
- options,
714
- async fn(state) {
715
- var _middlewareData$offse, _middlewareData$arrow;
716
- const { x, y, placement, middlewareData } = state;
717
- const diffCoords = await convertValueToCoords(state, options);
718
- if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
719
- return {
720
- x: x + diffCoords.x,
721
- y: y + diffCoords.y,
722
- data: {
723
- ...diffCoords,
724
- placement
725
- }
726
- };
727
- }
728
- };
729
- };
730
- /**
731
- * Optimizes the visibility of the floating element by shifting it in order to
732
- * keep it in view when it will overflow the clipping boundary.
733
- * @see https://floating-ui.com/docs/shift
734
- */
735
- var shift$1 = function(options) {
736
- if (options === void 0) options = {};
737
- return {
738
- name: "shift",
739
- options,
740
- async fn(state) {
741
- const { x, y, placement, platform } = state;
742
- const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
743
- let { x, y } = _ref;
744
- return {
745
- x,
746
- y
747
- };
748
- } }, ...detectOverflowOptions } = evaluate(options, state);
749
- const coords = {
750
- x,
751
- y
752
- };
753
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
754
- const crossAxis = getSideAxis(placement);
755
- const mainAxis = getOppositeAxis(crossAxis);
756
- let mainAxisCoord = coords[mainAxis];
757
- let crossAxisCoord = coords[crossAxis];
758
- const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
759
- if (checkMainAxis) mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
760
- if (checkCrossAxis) crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
761
- const limitedCoords = limiter.fn({
762
- ...state,
763
- [mainAxis]: mainAxisCoord,
764
- [crossAxis]: crossAxisCoord
765
- });
766
- return {
767
- ...limitedCoords,
768
- data: {
769
- x: limitedCoords.x - x,
770
- y: limitedCoords.y - y,
771
- enabled: {
772
- [mainAxis]: checkMainAxis,
773
- [crossAxis]: checkCrossAxis
774
- }
775
- }
776
- };
777
- }
778
- };
779
- };
780
- /**
781
- * Built-in `limiter` that will stop `shift()` at a certain point.
782
- */
783
- var limitShift$1 = function(options) {
784
- if (options === void 0) options = {};
785
- return {
786
- options,
787
- fn(state) {
788
- var _rawOffset$mainAxis, _rawOffset$crossAxis;
789
- const { x, y, placement, rects, middlewareData } = state;
790
- const { offset = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = evaluate(options, state);
791
- const coords = {
792
- x,
793
- y
794
- };
795
- const crossAxis = getSideAxis(placement);
796
- const mainAxis = getOppositeAxis(crossAxis);
797
- let mainAxisCoord = coords[mainAxis];
798
- let crossAxisCoord = coords[crossAxis];
799
- const rawOffset = evaluate(offset, state);
800
- const computedOffset = typeof rawOffset === "number" ? {
801
- mainAxis: rawOffset,
802
- crossAxis: 0
803
- } : {
804
- mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
805
- crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
806
- };
807
- if (checkMainAxis) {
808
- const len = mainAxis === "y" ? "height" : "width";
809
- const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
810
- const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
811
- if (mainAxisCoord < limitMin) mainAxisCoord = limitMin;
812
- else if (mainAxisCoord > limitMax) mainAxisCoord = limitMax;
813
- }
814
- if (checkCrossAxis) {
815
- var _middlewareData$offse, _middlewareData$offse2;
816
- const len = mainAxis === "y" ? "width" : "height";
817
- const isOriginSide = originSides.has(getSide(placement));
818
- const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
819
- const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
820
- if (crossAxisCoord < limitMin) crossAxisCoord = limitMin;
821
- else if (crossAxisCoord > limitMax) crossAxisCoord = limitMax;
822
- }
823
- return {
824
- [mainAxis]: mainAxisCoord,
825
- [crossAxis]: crossAxisCoord
826
- };
827
- }
828
- };
829
- };
830
- /**
831
- * Provides data that allows you to change the size of the floating element —
832
- * for instance, prevent it from overflowing the clipping boundary or match the
833
- * width of the reference element.
834
- * @see https://floating-ui.com/docs/size
835
- */
836
- var size$1 = function(options) {
837
- if (options === void 0) options = {};
838
- return {
839
- name: "size",
840
- options,
841
- async fn(state) {
842
- const { placement, rects, platform, elements } = state;
843
- const { apply = () => {}, ...detectOverflowOptions } = evaluate(options, state);
844
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
845
- const side = getSide(placement);
846
- const alignment = getAlignment(placement);
847
- const isYAxis = getSideAxis(placement) === "y";
848
- const { width, height } = rects.floating;
849
- let heightSide;
850
- let widthSide;
851
- if (side === "top" || side === "bottom") {
852
- heightSide = side;
853
- widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
854
- } else {
855
- widthSide = side;
856
- heightSide = alignment === "end" ? "top" : "bottom";
857
- }
858
- const maximumClippingHeight = height - overflow.top - overflow.bottom;
859
- const maximumClippingWidth = width - overflow.left - overflow.right;
860
- const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
861
- const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
862
- const shiftData = state.middlewareData.shift;
863
- const noShift = !shiftData;
864
- let availableHeight = overflowAvailableHeight;
865
- let availableWidth = overflowAvailableWidth;
866
- if (shiftData != null && shiftData.enabled.x) availableWidth = maximumClippingWidth;
867
- if (shiftData != null && shiftData.enabled.y) availableHeight = maximumClippingHeight;
868
- if (noShift && !alignment) {
869
- if (isYAxis) availableWidth = width - 2 * max(overflow.left, overflow.right);
870
- else availableHeight = height - 2 * max(overflow.top, overflow.bottom);
871
- }
872
- await apply({
873
- ...state,
874
- availableWidth,
875
- availableHeight
876
- });
877
- const nextDimensions = await platform.getDimensions(elements.floating);
878
- if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } };
879
- return {};
880
- }
881
- };
882
- };
883
- //#endregion
884
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
885
- function hasWindow() {
886
- return typeof window !== "undefined";
887
- }
888
- function getNodeName(node) {
889
- if (isNode(node)) return (node.nodeName || "").toLowerCase();
890
- return "#document";
891
- }
892
- function getWindow(node) {
893
- var _node$ownerDocument;
894
- return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
895
- }
896
- function getDocumentElement(node) {
897
- var _ref;
898
- return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
899
- }
900
- function isNode(value) {
901
- if (!hasWindow()) return false;
902
- return value instanceof Node || value instanceof getWindow(value).Node;
903
- }
904
- function isElement(value) {
905
- if (!hasWindow()) return false;
906
- return value instanceof Element || value instanceof getWindow(value).Element;
907
- }
908
- function isHTMLElement(value) {
909
- if (!hasWindow()) return false;
910
- return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
911
- }
912
- function isShadowRoot(value) {
913
- if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
914
- return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
915
- }
916
- function isOverflowElement(element) {
917
- const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
918
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
919
- }
920
- function isTableElement(element) {
921
- return /^(table|td|th)$/.test(getNodeName(element));
922
- }
923
- function isTopLayer(element) {
924
- try {
925
- if (element.matches(":popover-open")) return true;
926
- } catch (_e) {}
927
- try {
928
- return element.matches(":modal");
929
- } catch (_e) {
930
- return false;
931
- }
932
- }
933
- var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
934
- var containRe = /paint|layout|strict|content/;
935
- var isNotNone = (value) => !!value && value !== "none";
936
- var isWebKitValue;
937
- function isContainingBlock(elementOrCss) {
938
- const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
939
- return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
940
- }
941
- function getContainingBlock(element) {
942
- let currentNode = getParentNode(element);
943
- while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
944
- if (isContainingBlock(currentNode)) return currentNode;
945
- else if (isTopLayer(currentNode)) return null;
946
- currentNode = getParentNode(currentNode);
947
- }
948
- return null;
949
- }
950
- function isWebKit() {
951
- if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
952
- return isWebKitValue;
953
- }
954
- function isLastTraversableNode(node) {
955
- return /^(html|body|#document)$/.test(getNodeName(node));
956
- }
957
- function getComputedStyle$1(element) {
958
- return getWindow(element).getComputedStyle(element);
959
- }
960
- function getNodeScroll(element) {
961
- if (isElement(element)) return {
962
- scrollLeft: element.scrollLeft,
963
- scrollTop: element.scrollTop
964
- };
965
- return {
966
- scrollLeft: element.scrollX,
967
- scrollTop: element.scrollY
968
- };
969
- }
970
- function getParentNode(node) {
971
- if (getNodeName(node) === "html") return node;
972
- const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
973
- return isShadowRoot(result) ? result.host : result;
974
- }
975
- function getNearestOverflowAncestor(node) {
976
- const parentNode = getParentNode(node);
977
- if (isLastTraversableNode(parentNode)) return (node.ownerDocument || node).body;
978
- if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
979
- return getNearestOverflowAncestor(parentNode);
980
- }
981
- function getOverflowAncestors(node, list, traverseIframes) {
982
- var _node$ownerDocument2;
983
- if (list === void 0) list = [];
984
- if (traverseIframes === void 0) traverseIframes = true;
985
- const scrollableAncestor = getNearestOverflowAncestor(node);
986
- const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
987
- const win = getWindow(scrollableAncestor);
988
- if (isBody) {
989
- const frameElement = getFrameElement(win);
990
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
991
- } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
992
- }
993
- function getFrameElement(win) {
994
- return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
995
- }
996
- //#endregion
997
- //#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
998
- function getCssDimensions(element) {
999
- const css = getComputedStyle$1(element);
1000
- let width = parseFloat(css.width) || 0;
1001
- let height = parseFloat(css.height) || 0;
1002
- const hasOffset = isHTMLElement(element);
1003
- const offsetWidth = hasOffset ? element.offsetWidth : width;
1004
- const offsetHeight = hasOffset ? element.offsetHeight : height;
1005
- const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1006
- if (shouldFallback) {
1007
- width = offsetWidth;
1008
- height = offsetHeight;
1009
- }
1010
- return {
1011
- width,
1012
- height,
1013
- $: shouldFallback
1014
- };
1015
- }
1016
- function unwrapElement$1(element) {
1017
- return !isElement(element) ? element.contextElement : element;
1018
- }
1019
- function getScale(element) {
1020
- const domElement = unwrapElement$1(element);
1021
- if (!isHTMLElement(domElement)) return createCoords(1);
1022
- const rect = domElement.getBoundingClientRect();
1023
- const { width, height, $ } = getCssDimensions(domElement);
1024
- let x = ($ ? round(rect.width) : rect.width) / width;
1025
- let y = ($ ? round(rect.height) : rect.height) / height;
1026
- if (!x || !Number.isFinite(x)) x = 1;
1027
- if (!y || !Number.isFinite(y)) y = 1;
1028
- return {
1029
- x,
1030
- y
1031
- };
1032
- }
1033
- var noOffsets = /*#__PURE__*/ createCoords(0);
1034
- function getVisualOffsets(element) {
1035
- const win = getWindow(element);
1036
- if (!isWebKit() || !win.visualViewport) return noOffsets;
1037
- return {
1038
- x: win.visualViewport.offsetLeft,
1039
- y: win.visualViewport.offsetTop
1040
- };
1041
- }
1042
- function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1043
- if (isFixed === void 0) isFixed = false;
1044
- return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
1045
- }
1046
- function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1047
- if (includeScale === void 0) includeScale = false;
1048
- if (isFixedStrategy === void 0) isFixedStrategy = false;
1049
- const clientRect = element.getBoundingClientRect();
1050
- const domElement = unwrapElement$1(element);
1051
- let scale = createCoords(1);
1052
- if (includeScale) {
1053
- if (offsetParent) {
1054
- if (isElement(offsetParent)) scale = getScale(offsetParent);
1055
- } else scale = getScale(element);
1056
- }
1057
- const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1058
- let x = (clientRect.left + visualOffsets.x) / scale.x;
1059
- let y = (clientRect.top + visualOffsets.y) / scale.y;
1060
- let width = clientRect.width / scale.x;
1061
- let height = clientRect.height / scale.y;
1062
- if (domElement && offsetParent) {
1063
- const win = getWindow(domElement);
1064
- const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1065
- let currentWin = win;
1066
- let currentIFrame = getFrameElement(currentWin);
1067
- while (currentIFrame && offsetWin !== currentWin) {
1068
- const iframeScale = getScale(currentIFrame);
1069
- const iframeRect = currentIFrame.getBoundingClientRect();
1070
- const css = getComputedStyle$1(currentIFrame);
1071
- const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1072
- const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1073
- x *= iframeScale.x;
1074
- y *= iframeScale.y;
1075
- width *= iframeScale.x;
1076
- height *= iframeScale.y;
1077
- x += left;
1078
- y += top;
1079
- currentWin = getWindow(currentIFrame);
1080
- currentIFrame = getFrameElement(currentWin);
1081
- }
1082
- }
1083
- return rectToClientRect({
1084
- width,
1085
- height,
1086
- x,
1087
- y
1088
- });
1089
- }
1090
- function getWindowScrollBarX(element, rect) {
1091
- const leftScroll = getNodeScroll(element).scrollLeft;
1092
- if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1093
- return rect.left + leftScroll;
1094
- }
1095
- function getHTMLOffset(documentElement, scroll) {
1096
- const htmlRect = documentElement.getBoundingClientRect();
1097
- return {
1098
- x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
1099
- y: htmlRect.top + scroll.scrollTop
1100
- };
1101
- }
1102
- function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1103
- let { elements, rect, offsetParent, strategy } = _ref;
1104
- const isFixed = strategy === "fixed";
1105
- const documentElement = getDocumentElement(offsetParent);
1106
- const topLayer = elements ? isTopLayer(elements.floating) : false;
1107
- if (offsetParent === documentElement || topLayer && isFixed) return rect;
1108
- let scroll = {
1109
- scrollLeft: 0,
1110
- scrollTop: 0
1111
- };
1112
- let scale = createCoords(1);
1113
- const offsets = createCoords(0);
1114
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
1115
- if (isOffsetParentAnElement || !isFixed) {
1116
- if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
1117
- if (isOffsetParentAnElement) {
1118
- const offsetRect = getBoundingClientRect(offsetParent);
1119
- scale = getScale(offsetParent);
1120
- offsets.x = offsetRect.x + offsetParent.clientLeft;
1121
- offsets.y = offsetRect.y + offsetParent.clientTop;
1122
- }
1123
- }
1124
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1125
- return {
1126
- width: rect.width * scale.x,
1127
- height: rect.height * scale.y,
1128
- x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1129
- y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1130
- };
1131
- }
1132
- function getClientRects(element) {
1133
- return element.getClientRects ? Array.from(element.getClientRects()) : [];
1134
- }
1135
- function getDocumentRect(html) {
1136
- const scroll = getNodeScroll(html);
1137
- const body = html.ownerDocument.body;
1138
- const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1139
- const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1140
- let x = -scroll.scrollLeft + getWindowScrollBarX(html);
1141
- const y = -scroll.scrollTop;
1142
- if (getComputedStyle$1(body).direction === "rtl") x += max(html.clientWidth, body.clientWidth) - width;
1143
- return {
1144
- width,
1145
- height,
1146
- x,
1147
- y
1148
- };
1149
- }
1150
- var SCROLLBAR_MAX = 25;
1151
- function getViewportRect(element, strategy, rootBoundary) {
1152
- if (rootBoundary === void 0) rootBoundary = "viewport";
1153
- const isLayoutViewport = rootBoundary === "layoutViewport";
1154
- const win = getWindow(element);
1155
- const html = getDocumentElement(element);
1156
- const visualViewport = win.visualViewport;
1157
- let width = html.clientWidth;
1158
- let height = html.clientHeight;
1159
- let x = 0;
1160
- let y = 0;
1161
- if (visualViewport) {
1162
- const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
1163
- if (isLayoutViewport) {
1164
- if (!layoutRelativeClientCoords) {
1165
- x = -visualViewport.offsetLeft;
1166
- y = -visualViewport.offsetTop;
1167
- }
1168
- } else {
1169
- width = visualViewport.width;
1170
- height = visualViewport.height;
1171
- if (layoutRelativeClientCoords) {
1172
- x = visualViewport.offsetLeft;
1173
- y = visualViewport.offsetTop;
1174
- }
1175
- }
1176
- }
1177
- if (getWindowScrollBarX(html) <= 0) {
1178
- const doc = html.ownerDocument;
1179
- const body = doc.body;
1180
- const bodyStyles = getComputedStyle(body);
1181
- const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1182
- const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1183
- const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
1184
- if (gutter <= SCROLLBAR_MAX) width -= gutter;
1185
- }
1186
- return {
1187
- width,
1188
- height,
1189
- x,
1190
- y
1191
- };
1192
- }
1193
- function getInnerBoundingClientRect(element, strategy) {
1194
- const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
1195
- const top = clientRect.top + element.clientTop;
1196
- const left = clientRect.left + element.clientLeft;
1197
- const scale = getScale(element);
1198
- return {
1199
- width: element.clientWidth * scale.x,
1200
- height: element.clientHeight * scale.y,
1201
- x: left * scale.x,
1202
- y: top * scale.y
1203
- };
1204
- }
1205
- function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1206
- let rect;
1207
- if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") rect = getViewportRect(element, strategy, clippingAncestor);
1208
- else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
1209
- else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1210
- else {
1211
- const visualOffsets = getVisualOffsets(element);
1212
- rect = {
1213
- x: clippingAncestor.x - visualOffsets.x,
1214
- y: clippingAncestor.y - visualOffsets.y,
1215
- width: clippingAncestor.width,
1216
- height: clippingAncestor.height
1217
- };
1218
- }
1219
- return rectToClientRect(rect);
1220
- }
1221
- function getClippingElementAncestors(element, cache) {
1222
- const cachedResult = cache.get(element);
1223
- if (cachedResult) return cachedResult;
1224
- let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
1225
- let lastKeptComputedStyle = null;
1226
- const elementIsFixed = getComputedStyle$1(element).position === "fixed";
1227
- let currentNode = elementIsFixed ? getParentNode(element) : element;
1228
- while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1229
- const computedStyle = getComputedStyle$1(currentNode);
1230
- const currentNodeIsContaining = isContainingBlock(currentNode);
1231
- const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
1232
- if (!currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static")) result = result.filter((ancestor) => ancestor !== currentNode);
1233
- else lastKeptComputedStyle = computedStyle;
1234
- currentNode = getParentNode(currentNode);
1235
- }
1236
- cache.set(element, result);
1237
- return result;
1238
- }
1239
- function getClippingRect(_ref) {
1240
- let { element, boundary, rootBoundary, strategy } = _ref;
1241
- const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
1242
- const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
1243
- let top = firstRect.top;
1244
- let right = firstRect.right;
1245
- let bottom = firstRect.bottom;
1246
- let left = firstRect.left;
1247
- for (let i = 1; i < clippingAncestors.length; i++) {
1248
- const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
1249
- top = max(rect.top, top);
1250
- right = min(rect.right, right);
1251
- bottom = min(rect.bottom, bottom);
1252
- left = max(rect.left, left);
1253
- }
1254
- return {
1255
- width: right - left,
1256
- height: bottom - top,
1257
- x: left,
1258
- y: top
1259
- };
1260
- }
1261
- function getDimensions(element) {
1262
- const { width, height } = getCssDimensions(element);
1263
- return {
1264
- width,
1265
- height
1266
- };
1267
- }
1268
- function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1269
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
1270
- const documentElement = getDocumentElement(offsetParent);
1271
- const isFixed = strategy === "fixed";
1272
- const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1273
- let scroll = {
1274
- scrollLeft: 0,
1275
- scrollTop: 0
1276
- };
1277
- const offsets = createCoords(0);
1278
- if (isOffsetParentAnElement || !isFixed) {
1279
- if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
1280
- if (isOffsetParentAnElement) {
1281
- const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1282
- offsets.x = offsetRect.x + offsetParent.clientLeft;
1283
- offsets.y = offsetRect.y + offsetParent.clientTop;
1284
- }
1285
- }
1286
- if (!isOffsetParentAnElement && documentElement) offsets.x = getWindowScrollBarX(documentElement);
1287
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1288
- return {
1289
- x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
1290
- y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
1291
- width: rect.width,
1292
- height: rect.height
1293
- };
1294
- }
1295
- function isStaticPositioned(element) {
1296
- return getComputedStyle$1(element).position === "static";
1297
- }
1298
- function getTrueOffsetParent(element, polyfill) {
1299
- if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
1300
- if (polyfill) return polyfill(element);
1301
- let rawOffsetParent = element.offsetParent;
1302
- if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
1303
- return rawOffsetParent;
1304
- }
1305
- function getOffsetParent(element, polyfill) {
1306
- const win = getWindow(element);
1307
- if (isTopLayer(element)) return win;
1308
- if (!isHTMLElement(element)) {
1309
- let svgOffsetParent = getParentNode(element);
1310
- while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1311
- if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
1312
- svgOffsetParent = getParentNode(svgOffsetParent);
1313
- }
1314
- return win;
1315
- }
1316
- let offsetParent = getTrueOffsetParent(element, polyfill);
1317
- while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1318
- if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
1319
- return offsetParent || getContainingBlock(element) || win;
1320
- }
1321
- var getElementRects = async function(data) {
1322
- const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1323
- const getDimensionsFn = this.getDimensions;
1324
- const floatingDimensions = await getDimensionsFn(data.floating);
1325
- return {
1326
- reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1327
- floating: {
1328
- x: 0,
1329
- y: 0,
1330
- width: floatingDimensions.width,
1331
- height: floatingDimensions.height
1332
- }
1333
- };
1334
- };
1335
- function isRTL(element) {
1336
- return getComputedStyle$1(element).direction === "rtl";
1337
- }
1338
- var platform = {
1339
- convertOffsetParentRelativeRectToViewportRelativeRect,
1340
- getDocumentElement,
1341
- getClippingRect,
1342
- getOffsetParent,
1343
- getElementRects,
1344
- getClientRects,
1345
- getDimensions,
1346
- getScale,
1347
- isElement,
1348
- isRTL
1349
- };
1350
- function rectsAreEqual(a, b) {
1351
- return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1352
- }
1353
- function observeMove(element, onMove, ancestorResize) {
1354
- let io = null;
1355
- let timeoutId;
1356
- const root = getDocumentElement(element);
1357
- function cleanup() {
1358
- var _io;
1359
- clearTimeout(timeoutId);
1360
- (_io = io) == null || _io.disconnect();
1361
- io = null;
1362
- }
1363
- function refresh(skip, threshold) {
1364
- if (skip === void 0) skip = false;
1365
- if (threshold === void 0) threshold = 1;
1366
- cleanup();
1367
- const elementRectForRootMargin = element.getBoundingClientRect();
1368
- const { left, top, width, height } = elementRectForRootMargin;
1369
- if (!skip) onMove();
1370
- if (!width || !height) return;
1371
- const insetTop = floor(top);
1372
- const insetRight = floor(root.clientWidth - (left + width));
1373
- const insetBottom = floor(root.clientHeight - (top + height));
1374
- const insetLeft = floor(left);
1375
- const options = {
1376
- rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
1377
- threshold: max(0, min(1, threshold)) || 1
1378
- };
1379
- let isFirstUpdate = true;
1380
- function handleObserve(entries) {
1381
- const ratio = entries[0].intersectionRatio;
1382
- if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) return refresh();
1383
- if (ratio !== threshold) {
1384
- if (!isFirstUpdate) return refresh();
1385
- if (!ratio) timeoutId = setTimeout(() => {
1386
- refresh(false, 1e-7);
1387
- }, 1e3);
1388
- else refresh(false, ratio);
1389
- }
1390
- isFirstUpdate = false;
1391
- }
1392
- try {
1393
- io = new IntersectionObserver(handleObserve, {
1394
- ...options,
1395
- root: root.ownerDocument
1396
- });
1397
- } catch (_e) {
1398
- io = new IntersectionObserver(handleObserve, options);
1399
- }
1400
- io.observe(element);
1401
- }
1402
- const win = getWindow(element);
1403
- const handleResize = () => refresh(ancestorResize);
1404
- win.addEventListener("resize", handleResize);
1405
- refresh(true);
1406
- return () => {
1407
- win.removeEventListener("resize", handleResize);
1408
- cleanup();
1409
- };
1410
- }
1411
- /**
1412
- * Automatically updates the position of the floating element when necessary.
1413
- * Should only be called when the floating element is mounted on the DOM or
1414
- * visible on the screen.
1415
- * @returns cleanup function that should be invoked when the floating element is
1416
- * removed from the DOM or hidden from the screen.
1417
- * @see https://floating-ui.com/docs/autoUpdate
1418
- */
1419
- function autoUpdate(reference, floating, update, options) {
1420
- if (options === void 0) options = {};
1421
- const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
1422
- const referenceEl = unwrapElement$1(reference);
1423
- const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
1424
- ancestors.forEach((ancestor) => {
1425
- ancestorScroll && ancestor.addEventListener("scroll", update);
1426
- ancestorResize && ancestor.addEventListener("resize", update);
1427
- });
1428
- const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
1429
- let reobserveFrame = -1;
1430
- let resizeObserver = null;
1431
- if (elementResize) {
1432
- resizeObserver = new ResizeObserver((_ref) => {
1433
- let [firstEntry] = _ref;
1434
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
1435
- resizeObserver.unobserve(floating);
1436
- cancelAnimationFrame(reobserveFrame);
1437
- reobserveFrame = requestAnimationFrame(() => {
1438
- var _resizeObserver;
1439
- (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1440
- });
1441
- }
1442
- update();
1443
- });
1444
- if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
1445
- if (floating) resizeObserver.observe(floating);
1446
- }
1447
- let frameId;
1448
- let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1449
- if (animationFrame) frameLoop();
1450
- function frameLoop() {
1451
- const nextRefRect = getBoundingClientRect(reference);
1452
- if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
1453
- prevRefRect = nextRefRect;
1454
- frameId = requestAnimationFrame(frameLoop);
1455
- }
1456
- update();
1457
- return () => {
1458
- var _resizeObserver2;
1459
- ancestors.forEach((ancestor) => {
1460
- ancestorScroll && ancestor.removeEventListener("scroll", update);
1461
- ancestorResize && ancestor.removeEventListener("resize", update);
1462
- });
1463
- cleanupIo?.();
1464
- (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1465
- resizeObserver = null;
1466
- if (animationFrame) cancelAnimationFrame(frameId);
1467
- };
1468
- }
1469
- /**
1470
- * Modifies the placement by translating the floating element along the
1471
- * specified axes.
1472
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
1473
- * object may be passed.
1474
- * @see https://floating-ui.com/docs/offset
1475
- */
1476
- var offset = offset$1;
1477
- /**
1478
- * Optimizes the visibility of the floating element by choosing the placement
1479
- * that has the most space available automatically, without needing to specify a
1480
- * preferred placement. Alternative to `flip`.
1481
- * @see https://floating-ui.com/docs/autoPlacement
1482
- */
1483
- var autoPlacement = autoPlacement$1;
1484
- /**
1485
- * Optimizes the visibility of the floating element by shifting it in order to
1486
- * keep it in view when it will overflow the clipping boundary.
1487
- * @see https://floating-ui.com/docs/shift
1488
- */
1489
- var shift = shift$1;
1490
- /**
1491
- * Optimizes the visibility of the floating element by flipping the `placement`
1492
- * in order to keep it in view when the preferred placement(s) will overflow the
1493
- * clipping boundary. Alternative to `autoPlacement`.
1494
- * @see https://floating-ui.com/docs/flip
1495
- */
1496
- var flip = flip$1;
1497
- /**
1498
- * Provides data that allows you to change the size of the floating element —
1499
- * for instance, prevent it from overflowing the clipping boundary or match the
1500
- * width of the reference element.
1501
- * @see https://floating-ui.com/docs/size
1502
- */
1503
- var size = size$1;
1504
- /**
1505
- * Provides data to hide the floating element in applicable situations, such as
1506
- * when it is not in the same clipping context as the reference element.
1507
- * @see https://floating-ui.com/docs/hide
1508
- */
1509
- var hide = hide$1;
1510
- /**
1511
- * Provides data to position an inner element of the floating element so that it
1512
- * appears centered to the reference element.
1513
- * @see https://floating-ui.com/docs/arrow
1514
- */
1515
- var arrow$1 = arrow$2;
1516
- /**
1517
- * Provides improved positioning for inline reference elements that can span
1518
- * over multiple lines, such as hyperlinks or range selections.
1519
- * @see https://floating-ui.com/docs/inline
1520
- */
1521
- var inline = inline$1;
1522
- /**
1523
- * Built-in `limiter` that will stop `shift()` at a certain point.
1524
- */
1525
- var limitShift = limitShift$1;
1526
- /**
1527
- * Computes the `x` and `y` coordinates that will place the floating element
1528
- * next to a given reference element.
1529
- */
1530
- var computePosition = (reference, floating, options) => {
1531
- const cache = /* @__PURE__ */ new Map();
1532
- const mergedOptions = options != null ? options : {};
1533
- const platformWithCache = {
1534
- ...platform,
1535
- ...mergedOptions.platform,
1536
- _c: cache
1537
- };
1538
- return computePosition$1(reference, floating, {
1539
- ...mergedOptions,
1540
- platform: platformWithCache
1541
- });
1542
- };
1543
- //#endregion
1544
- //#region ../../node_modules/.pnpm/vue-demi@0.14.10_vue@3.5.41_typescript@6.0.3_/node_modules/vue-demi/lib/index.mjs
1545
- var lib_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
1546
- Vue: () => vue,
1547
- Vue2: () => void 0,
1548
- del: () => del,
1549
- install: () => install,
1550
- isVue2: () => false,
1551
- isVue3: () => true,
1552
- set: () => set
1553
- });
1554
- require_rolldown_runtime.__reExport(lib_exports, require("vue"));
1555
- function install() {}
1556
- function set(target, key, val) {
1557
- if (Array.isArray(target)) {
1558
- target.length = Math.max(target.length, key);
1559
- target.splice(key, 1, val);
1560
- return val;
1561
- }
1562
- target[key] = val;
1563
- return val;
1564
- }
1565
- function del(target, key) {
1566
- if (Array.isArray(target)) {
1567
- target.splice(key, 1);
1568
- return;
1569
- }
1570
- delete target[key];
1571
- }
1572
- //#endregion
1573
- //#region ../../node_modules/.pnpm/@floating-ui+vue@1.1.11_vue@3.5.41_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
1574
- function isComponentPublicInstance(target) {
1575
- return target != null && typeof target === "object" && "$el" in target;
1576
- }
1577
- function unwrapElement(target) {
1578
- if (isComponentPublicInstance(target)) {
1579
- const element = target.$el;
1580
- return isNode(element) && getNodeName(element) === "#comment" ? null : element;
1581
- }
1582
- return target;
1583
- }
1584
- function toValue(source) {
1585
- return typeof source === "function" ? source() : (0, lib_exports.unref)(source);
1586
- }
1587
- /**
1588
- * Positions an inner element of the floating element such that it is centered to the reference element.
1589
- * @param options The arrow options.
1590
- * @see https://floating-ui.com/docs/arrow
1591
- */
1592
- function arrow(options) {
1593
- return {
1594
- name: "arrow",
1595
- options,
1596
- fn(args) {
1597
- const element = unwrapElement(toValue(options.element));
1598
- if (element == null) return {};
1599
- return arrow$1({
1600
- element,
1601
- padding: options.padding
1602
- }).fn(args);
1603
- }
1604
- };
1605
- }
1606
- function getDPR(element) {
1607
- if (typeof window === "undefined") return 1;
1608
- return (element.ownerDocument.defaultView || window).devicePixelRatio || 1;
1609
- }
1610
- function roundByDPR(element, value) {
1611
- const dpr = getDPR(element);
1612
- return Math.round(value * dpr) / dpr;
1613
- }
1614
- /**
1615
- * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.
1616
- * @param reference The reference template ref.
1617
- * @param floating The floating template ref.
1618
- * @param options The floating options.
1619
- * @see https://floating-ui.com/docs/vue
1620
- */
1621
- function useFloating(reference, floating, options) {
1622
- if (options === void 0) options = {};
1623
- const whileElementsMountedOption = options.whileElementsMounted;
1624
- const openOption = (0, lib_exports.computed)(() => {
1625
- var _toValue;
1626
- return (_toValue = toValue(options.open)) != null ? _toValue : true;
1627
- });
1628
- const middlewareOption = (0, lib_exports.computed)(() => toValue(options.middleware));
1629
- const placementOption = (0, lib_exports.computed)(() => {
1630
- var _toValue2;
1631
- return (_toValue2 = toValue(options.placement)) != null ? _toValue2 : "bottom";
1632
- });
1633
- const strategyOption = (0, lib_exports.computed)(() => {
1634
- var _toValue3;
1635
- return (_toValue3 = toValue(options.strategy)) != null ? _toValue3 : "absolute";
1636
- });
1637
- const transformOption = (0, lib_exports.computed)(() => {
1638
- var _toValue4;
1639
- return (_toValue4 = toValue(options.transform)) != null ? _toValue4 : true;
1640
- });
1641
- const referenceElement = (0, lib_exports.computed)(() => unwrapElement(reference.value));
1642
- const floatingElement = (0, lib_exports.computed)(() => unwrapElement(floating.value));
1643
- const x = (0, lib_exports.ref)(0);
1644
- const y = (0, lib_exports.ref)(0);
1645
- const strategy = (0, lib_exports.ref)(strategyOption.value);
1646
- const placement = (0, lib_exports.ref)(placementOption.value);
1647
- const middlewareData = (0, lib_exports.shallowRef)({});
1648
- const isPositioned = (0, lib_exports.ref)(false);
1649
- const floatingStyles = (0, lib_exports.computed)(() => {
1650
- const initialStyles = {
1651
- position: strategy.value,
1652
- left: "0",
1653
- top: "0"
1654
- };
1655
- if (!floatingElement.value) return initialStyles;
1656
- const xVal = roundByDPR(floatingElement.value, x.value);
1657
- const yVal = roundByDPR(floatingElement.value, y.value);
1658
- if (transformOption.value) return {
1659
- ...initialStyles,
1660
- transform: "translate(" + xVal + "px, " + yVal + "px)",
1661
- ...getDPR(floatingElement.value) >= 1.5 && { willChange: "transform" }
1662
- };
1663
- return {
1664
- position: strategy.value,
1665
- left: xVal + "px",
1666
- top: yVal + "px"
1667
- };
1668
- });
1669
- let whileElementsMountedCleanup;
1670
- function update() {
1671
- if (referenceElement.value == null || floatingElement.value == null) return;
1672
- const open = openOption.value;
1673
- computePosition(referenceElement.value, floatingElement.value, {
1674
- middleware: middlewareOption.value,
1675
- placement: placementOption.value,
1676
- strategy: strategyOption.value
1677
- }).then((position) => {
1678
- x.value = position.x;
1679
- y.value = position.y;
1680
- strategy.value = position.strategy;
1681
- placement.value = position.placement;
1682
- middlewareData.value = position.middlewareData;
1683
- /**
1684
- * The floating element's position may be recomputed while it's closed
1685
- * but still mounted (such as when transitioning out). To ensure
1686
- * `isPositioned` will be `false` initially on the next open, avoid
1687
- * setting it to `true` when `open === false` (must be specified).
1688
- */
1689
- isPositioned.value = open !== false;
1690
- });
1691
- }
1692
- function cleanup() {
1693
- if (typeof whileElementsMountedCleanup === "function") {
1694
- whileElementsMountedCleanup();
1695
- whileElementsMountedCleanup = void 0;
1696
- }
1697
- }
1698
- function attach() {
1699
- cleanup();
1700
- if (whileElementsMountedOption === void 0) {
1701
- update();
1702
- return;
1703
- }
1704
- if (referenceElement.value != null && floatingElement.value != null) {
1705
- whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);
1706
- return;
1707
- }
1708
- }
1709
- function reset() {
1710
- if (!openOption.value) isPositioned.value = false;
1711
- }
1712
- (0, lib_exports.watch)([
1713
- middlewareOption,
1714
- placementOption,
1715
- strategyOption,
1716
- openOption
1717
- ], update, { flush: "sync" });
1718
- (0, lib_exports.watch)([referenceElement, floatingElement], attach, { flush: "sync" });
1719
- (0, lib_exports.watch)(openOption, reset, { flush: "sync" });
1720
- if ((0, lib_exports.getCurrentScope)()) (0, lib_exports.onScopeDispose)(cleanup);
1721
- return {
1722
- x: (0, lib_exports.shallowReadonly)(x),
1723
- y: (0, lib_exports.shallowReadonly)(y),
1724
- strategy: (0, lib_exports.shallowReadonly)(strategy),
1725
- placement: (0, lib_exports.shallowReadonly)(placement),
1726
- middlewareData: (0, lib_exports.shallowReadonly)(middlewareData),
1727
- isPositioned: (0, lib_exports.shallowReadonly)(isPositioned),
1728
- floatingStyles,
1729
- update
1730
- };
1731
- }
1732
- //#endregion
1733
- //#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Popper/PopperContent.js
1734
- var _hoisted_1 = ["dir"];
1735
- var PopperContentPropsDefaultValue = {
1736
- side: "bottom",
1737
- sideOffset: 0,
1738
- sideFlip: true,
1739
- align: "center",
1740
- alignOffset: 0,
1741
- alignFlip: true,
1742
- arrowPadding: 0,
1743
- hideShiftedArrow: true,
1744
- avoidCollisions: true,
1745
- collisionBoundary: () => [],
1746
- collisionPadding: 0,
1747
- sticky: "partial",
1748
- hideWhenDetached: false,
1749
- positionStrategy: "fixed",
1750
- updatePositionStrategy: "optimized",
1751
- prioritizePosition: false
1752
- };
1753
- var [injectPopperContentContext, providePopperContentContext] = /*#__PURE__*/ require_createContext.createContext("PopperContent");
1754
- var PopperContent_default = /* @__PURE__ */ (0, vue.defineComponent)({
1755
- inheritAttrs: false,
1756
- __name: "PopperContent",
1757
- props: /* @__PURE__ */ (0, vue.mergeDefaults)({
1758
- memoDependencies: {
1759
- type: Array,
1760
- required: false
1761
- },
1762
- side: {
1763
- type: null,
1764
- required: false
1765
- },
1766
- sideOffset: {
1767
- type: Number,
1768
- required: false
1769
- },
1770
- sideFlip: {
1771
- type: Boolean,
1772
- required: false
1773
- },
1774
- align: {
1775
- type: null,
1776
- required: false
1777
- },
1778
- alignOffset: {
1779
- type: Number,
1780
- required: false
1781
- },
1782
- alignFlip: {
1783
- type: Boolean,
1784
- required: false
1785
- },
1786
- avoidCollisions: {
1787
- type: Boolean,
1788
- required: false
1789
- },
1790
- collisionBoundary: {
1791
- type: null,
1792
- required: false
1793
- },
1794
- collisionPadding: {
1795
- type: [Number, Object],
1796
- required: false
1797
- },
1798
- arrowPadding: {
1799
- type: Number,
1800
- required: false
1801
- },
1802
- hideShiftedArrow: {
1803
- type: Boolean,
1804
- required: false
1805
- },
1806
- sticky: {
1807
- type: String,
1808
- required: false
1809
- },
1810
- hideWhenDetached: {
1811
- type: Boolean,
1812
- required: false
1813
- },
1814
- positionStrategy: {
1815
- type: String,
1816
- required: false
1817
- },
1818
- updatePositionStrategy: {
1819
- type: String,
1820
- required: false
1821
- },
1822
- disableUpdateOnLayoutShift: {
1823
- type: Boolean,
1824
- required: false
1825
- },
1826
- prioritizePosition: {
1827
- type: Boolean,
1828
- required: false
1829
- },
1830
- reference: {
1831
- type: null,
1832
- required: false
1833
- },
1834
- dir: {
1835
- type: String,
1836
- required: false
1837
- },
1838
- asChild: {
1839
- type: Boolean,
1840
- required: false
1841
- },
1842
- as: {
1843
- type: null,
1844
- required: false
1845
- }
1846
- }, { ...PopperContentPropsDefaultValue }),
1847
- emits: ["placed"],
1848
- setup(__props, { emit: __emit }) {
1849
- const props = __props;
1850
- const emits = __emit;
1851
- const rootContext = require_PopperRoot.injectPopperRootContext();
1852
- const { forwardRef, currentElement: contentElement } = require_useForwardExpose.useForwardExpose();
1853
- const dir = require_useDirection.useDirection((0, vue.computed)(() => props.dir));
1854
- const floatingRef = (0, vue.ref)();
1855
- const arrow$1 = (0, vue.ref)();
1856
- const { width: arrowWidth, height: arrowHeight } = require_useSize.useSize(arrow$1);
1857
- const desiredPlacement = (0, vue.computed)(() => props.side + (props.align !== "center" ? `-${props.align}` : ""));
1858
- const collisionPadding = (0, vue.computed)(() => {
1859
- return typeof props.collisionPadding === "number" ? props.collisionPadding : {
1860
- top: 0,
1861
- right: 0,
1862
- bottom: 0,
1863
- left: 0,
1864
- ...props.collisionPadding
1865
- };
1866
- });
1867
- const boundary = (0, vue.computed)(() => {
1868
- return Array.isArray(props.collisionBoundary) ? props.collisionBoundary : [props.collisionBoundary];
1869
- });
1870
- const detectOverflowOptions = (0, vue.computed)(() => {
1871
- return {
1872
- padding: collisionPadding.value,
1873
- boundary: boundary.value.filter(isNotNull),
1874
- altBoundary: boundary.value.length > 0
1875
- };
1876
- });
1877
- const flipOptions = (0, vue.computed)(() => {
1878
- return {
1879
- mainAxis: props.sideFlip,
1880
- crossAxis: props.alignFlip
1881
- };
1882
- });
1883
- const computedMiddleware = (0, vue.computed)(() => {
1884
- return [
1885
- offset({
1886
- mainAxis: props.sideOffset + arrowHeight.value,
1887
- alignmentAxis: props.alignOffset
1888
- }),
1889
- props.prioritizePosition && props.avoidCollisions && flip({
1890
- ...detectOverflowOptions.value,
1891
- ...flipOptions.value
1892
- }),
1893
- props.avoidCollisions && shift({
1894
- mainAxis: true,
1895
- crossAxis: !!props.prioritizePosition,
1896
- limiter: props.sticky === "partial" ? limitShift() : void 0,
1897
- ...detectOverflowOptions.value
1898
- }),
1899
- !props.prioritizePosition && props.avoidCollisions && flip({
1900
- ...detectOverflowOptions.value,
1901
- ...flipOptions.value
1902
- }),
1903
- size({
1904
- ...detectOverflowOptions.value,
1905
- apply: ({ elements, rects, availableWidth, availableHeight }) => {
1906
- const { width: anchorWidth, height: anchorHeight } = rects.reference;
1907
- const contentStyle = elements.floating.style;
1908
- contentStyle.setProperty("--reka-popper-available-width", `${availableWidth}px`);
1909
- contentStyle.setProperty("--reka-popper-available-height", `${availableHeight}px`);
1910
- contentStyle.setProperty("--reka-popper-anchor-width", `${anchorWidth}px`);
1911
- contentStyle.setProperty("--reka-popper-anchor-height", `${anchorHeight}px`);
1912
- }
1913
- }),
1914
- arrow$1.value && arrow({
1915
- element: arrow$1.value,
1916
- padding: props.arrowPadding
1917
- }),
1918
- transformOrigin({
1919
- arrowWidth: arrowWidth.value,
1920
- arrowHeight: arrowHeight.value,
1921
- dir: dir.value
1922
- }),
1923
- props.hideWhenDetached && hide({
1924
- strategy: "referenceHidden",
1925
- ...detectOverflowOptions.value
1926
- })
1927
- ];
1928
- });
1929
- const { floatingStyles, placement, isPositioned, middlewareData, update } = useFloating((0, vue.computed)(() => props.reference ?? rootContext.anchor.value), floatingRef, {
1930
- strategy: props.positionStrategy,
1931
- placement: desiredPlacement,
1932
- whileElementsMounted: (...args) => {
1933
- return autoUpdate(...args, {
1934
- layoutShift: !props.disableUpdateOnLayoutShift,
1935
- animationFrame: props.updatePositionStrategy === "always"
1936
- });
1937
- },
1938
- middleware: computedMiddleware
1939
- });
1940
- const placedSide = (0, vue.computed)(() => getSideAndAlignFromPlacement(placement.value)[0]);
1941
- const placedAlign = (0, vue.computed)(() => getSideAndAlignFromPlacement(placement.value)[1]);
1942
- (0, vue.watchPostEffect)(() => {
1943
- if (isPositioned.value) emits("placed");
1944
- });
1945
- const shouldHideArrow = (0, vue.computed)(() => {
1946
- const cannotCenterArrow = middlewareData.value.arrow?.centerOffset !== 0;
1947
- return props.hideShiftedArrow && cannotCenterArrow;
1948
- });
1949
- const contentZIndex = (0, vue.ref)("");
1950
- (0, vue.watchEffect)(() => {
1951
- if (contentElement.value) contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;
1952
- });
1953
- providePopperContentContext({
1954
- placedSide,
1955
- onArrowChange: (element) => arrow$1.value = element,
1956
- arrowX: (0, vue.computed)(() => middlewareData.value.arrow?.x ?? 0),
1957
- arrowY: (0, vue.computed)(() => middlewareData.value.arrow?.y ?? 0),
1958
- shouldHideArrow
1959
- });
1960
- return (_ctx, _cache) => {
1961
- return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
1962
- ref_key: "floatingRef",
1963
- ref: floatingRef,
1964
- "data-reka-popper-content-wrapper": "",
1965
- dir: (0, vue.unref)(dir),
1966
- style: (0, vue.normalizeStyle)({
1967
- ...(0, vue.unref)(floatingStyles),
1968
- transform: (0, vue.unref)(isPositioned) ? (0, vue.unref)(floatingStyles).transform : "translate(0, -200%)",
1969
- minWidth: "max-content",
1970
- zIndex: contentZIndex.value,
1971
- ["--reka-popper-transform-origin"]: [(0, vue.unref)(middlewareData).transformOrigin?.x, (0, vue.unref)(middlewareData).transformOrigin?.y].join(" "),
1972
- ...(0, vue.unref)(middlewareData).hide?.referenceHidden && {
1973
- visibility: "hidden",
1974
- pointerEvents: "none"
1975
- }
1976
- })
1977
- }, [props.memoDependencies ? (0, vue.withMemo)([
1978
- props.asChild,
1979
- props.as,
1980
- placedSide.value,
1981
- placedAlign.value,
1982
- (0, vue.unref)(isPositioned),
1983
- ...Object.values(_ctx.$attrs),
1984
- ...props.memoDependencies
1985
- ], () => ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.mergeProps)({
1986
- key: 0,
1987
- ref: (0, vue.unref)(forwardRef)
1988
- }, _ctx.$attrs, {
1989
- "as-child": props.asChild,
1990
- as: props.as,
1991
- "data-side": placedSide.value,
1992
- "data-align": placedAlign.value,
1993
- style: { animation: !(0, vue.unref)(isPositioned) ? "none" : void 0 }
1994
- }), {
1995
- default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
1996
- _: 3
1997
- }, 16, [
1998
- "as-child",
1999
- "as",
2000
- "data-side",
2001
- "data-align",
2002
- "style"
2003
- ])), _cache, 0) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.mergeProps)({
2004
- key: 1,
2005
- ref: (0, vue.unref)(forwardRef)
2006
- }, _ctx.$attrs, {
2007
- "as-child": props.asChild,
2008
- as: props.as,
2009
- "data-side": placedSide.value,
2010
- "data-align": placedAlign.value,
2011
- dir: (0, vue.unref)(dir),
2012
- style: { animation: !(0, vue.unref)(isPositioned) ? "none" : void 0 }
2013
- }), {
2014
- default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
2015
- _: 3
2016
- }, 16, [
2017
- "as-child",
2018
- "as",
2019
- "data-side",
2020
- "data-align",
2021
- "dir",
2022
- "style"
2023
- ]))], 12, _hoisted_1);
2024
- };
2025
- }
2026
- });
2027
- //#endregion
2028
- Object.defineProperty(exports, "PopperContentPropsDefaultValue", {
2029
- enumerable: true,
2030
- get: function() {
2031
- return PopperContentPropsDefaultValue;
2032
- }
2033
- });
2034
- Object.defineProperty(exports, "PopperContent_default", {
2035
- enumerable: true,
2036
- get: function() {
2037
- return PopperContent_default;
2038
- }
2039
- });
2040
- Object.defineProperty(exports, "arrow", {
2041
- enumerable: true,
2042
- get: function() {
2043
- return arrow$1;
2044
- }
2045
- });
2046
- Object.defineProperty(exports, "autoPlacement", {
2047
- enumerable: true,
2048
- get: function() {
2049
- return autoPlacement;
2050
- }
2051
- });
2052
- Object.defineProperty(exports, "computePosition", {
2053
- enumerable: true,
2054
- get: function() {
2055
- return computePosition;
2056
- }
2057
- });
2058
- Object.defineProperty(exports, "flip", {
2059
- enumerable: true,
2060
- get: function() {
2061
- return flip;
2062
- }
2063
- });
2064
- Object.defineProperty(exports, "hide", {
2065
- enumerable: true,
2066
- get: function() {
2067
- return hide;
2068
- }
2069
- });
2070
- Object.defineProperty(exports, "injectPopperContentContext", {
2071
- enumerable: true,
2072
- get: function() {
2073
- return injectPopperContentContext;
2074
- }
2075
- });
2076
- Object.defineProperty(exports, "inline", {
2077
- enumerable: true,
2078
- get: function() {
2079
- return inline;
2080
- }
2081
- });
2082
- Object.defineProperty(exports, "offset", {
2083
- enumerable: true,
2084
- get: function() {
2085
- return offset;
2086
- }
2087
- });
2088
- Object.defineProperty(exports, "shift", {
2089
- enumerable: true,
2090
- get: function() {
2091
- return shift;
2092
- }
2093
- });
2094
- Object.defineProperty(exports, "size", {
2095
- enumerable: true,
2096
- get: function() {
2097
- return size;
2098
- }
2099
- });