@youcan/celeste 0.9.3 → 0.10.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 (534) hide show
  1. package/dist/celeste.css +1030 -634
  2. package/dist/cjs/bar-chart.cjs +2 -0
  3. package/dist/cjs/chart-card.cjs +2 -0
  4. package/dist/cjs/chart-legend.cjs +2 -0
  5. package/dist/cjs/chart-plot.cjs +2 -0
  6. package/dist/cjs/chart-tooltip.cjs +25 -0
  7. package/dist/cjs/chart.cjs +38 -0
  8. package/dist/cjs/chunks/BubbleSelect.cjs +5 -6
  9. package/dist/cjs/chunks/CollapsibleRoot.cjs +3 -4
  10. package/dist/cjs/chunks/Collection.cjs +3 -4
  11. package/dist/cjs/chunks/ComboboxContent.cjs +7 -7
  12. package/dist/cjs/chunks/ComboboxGroup.cjs +4 -5
  13. package/dist/cjs/chunks/ComboboxInput.cjs +3 -4
  14. package/dist/cjs/chunks/ComboboxItem.cjs +7 -7
  15. package/dist/cjs/chunks/ComboboxLabel.cjs +1 -2
  16. package/dist/cjs/chunks/ComboboxRoot.cjs +17 -14
  17. package/dist/cjs/chunks/ComboboxSeparator.cjs +1 -2
  18. package/dist/cjs/chunks/ConfigProvider.cjs +2 -2
  19. package/dist/cjs/chunks/DialogClose.cjs +1 -2
  20. package/dist/cjs/chunks/DialogDescription.cjs +1 -2
  21. package/dist/cjs/chunks/DialogPortal.cjs +10 -10
  22. package/dist/cjs/chunks/DialogRoot.cjs +3 -4
  23. package/dist/cjs/chunks/DialogTitle.cjs +1 -2
  24. package/dist/cjs/chunks/DialogTrigger.cjs +1 -2
  25. package/dist/cjs/chunks/DismissableLayer.cjs +5 -5
  26. package/dist/cjs/chunks/DropdownMenuPortal.cjs +2 -3
  27. package/dist/cjs/chunks/DropdownMenuRoot.cjs +3 -4
  28. package/dist/cjs/chunks/FocusScope.cjs +7 -7
  29. package/dist/cjs/chunks/Label.cjs +1 -2
  30. package/dist/cjs/chunks/MenuAnchor.cjs +1 -2
  31. package/dist/cjs/chunks/MenuContentImpl.cjs +4 -4
  32. package/dist/cjs/chunks/MenuGroup.cjs +2 -3
  33. package/dist/cjs/chunks/MenuItemImpl.cjs +1 -2
  34. package/dist/cjs/chunks/MenuRoot.cjs +8 -8
  35. package/dist/cjs/chunks/MenuSub.cjs +3 -4
  36. package/dist/cjs/chunks/PaginationRoot.cjs +3 -4
  37. package/dist/cjs/chunks/PinInputRoot.cjs +3 -4
  38. package/dist/cjs/chunks/PopoverRoot.cjs +3 -4
  39. package/dist/cjs/chunks/PopperAnchor.cjs +1 -2
  40. package/dist/cjs/chunks/PopperArrow.cjs +2 -3
  41. package/dist/cjs/chunks/PopperContent.cjs +263 -298
  42. package/dist/cjs/chunks/PopperRoot.cjs +2 -3
  43. package/dist/cjs/chunks/Presence.cjs +7 -7
  44. package/dist/cjs/chunks/Primitive.cjs +5 -6
  45. package/dist/cjs/chunks/ProgressIndicator.cjs +4 -5
  46. package/dist/cjs/chunks/RadioGroupRoot.cjs +3 -4
  47. package/dist/cjs/chunks/RovingFocusGroup.cjs +6 -6
  48. package/dist/cjs/chunks/RovingFocusItem.cjs +1 -2
  49. package/dist/cjs/chunks/SelectGroup.cjs +2 -3
  50. package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +9 -9
  51. package/dist/cjs/chunks/TabsRoot.cjs +4 -5
  52. package/dist/cjs/chunks/Teleport.cjs +2 -3
  53. package/dist/cjs/chunks/ToggleGroupRoot.cjs +4 -5
  54. package/dist/cjs/chunks/TooltipProvider.cjs +2 -3
  55. package/dist/cjs/chunks/TooltipRoot.cjs +5 -5
  56. package/dist/cjs/chunks/VisuallyHidden.cjs +1 -2
  57. package/dist/cjs/chunks/VisuallyHiddenInput.cjs +4 -4
  58. package/dist/cjs/chunks/alert.cjs +17 -12
  59. package/dist/cjs/chunks/alpha-slider.cjs +1 -4
  60. package/dist/cjs/chunks/badge.cjs +18 -13
  61. package/dist/cjs/chunks/bar-chart.cjs +10322 -0
  62. package/dist/cjs/chunks/button.cjs +12 -7
  63. package/dist/cjs/chunks/calendar.cjs +39 -33
  64. package/dist/cjs/chunks/chart-card.cjs +69 -0
  65. package/dist/cjs/chunks/chart-legend.cjs +88 -0
  66. package/dist/cjs/chunks/chart-plot.cjs +92 -0
  67. package/dist/cjs/chunks/checkbox-card.cjs +15 -10
  68. package/dist/cjs/chunks/checkbox-label.cjs +11 -6
  69. package/dist/cjs/chunks/checkbox.cjs +18 -12
  70. package/dist/cjs/chunks/clamp.cjs +1 -1
  71. package/dist/cjs/chunks/collapsible-content.cjs +9 -4
  72. package/dist/cjs/chunks/collapsible-trigger.cjs +1 -2
  73. package/dist/cjs/chunks/collapsible.cjs +0 -1
  74. package/dist/cjs/chunks/color-area.cjs +3 -4
  75. package/dist/cjs/chunks/color-picker.cjs +69 -42
  76. package/dist/cjs/chunks/color-swatch.cjs +4 -5
  77. package/dist/cjs/chunks/combobox-anchor.cjs +11 -5
  78. package/dist/cjs/chunks/combobox-empty.cjs +10 -5
  79. package/dist/cjs/chunks/combobox-group.cjs +11 -6
  80. package/dist/cjs/chunks/combobox-input.cjs +11 -6
  81. package/dist/cjs/chunks/combobox-item.cjs +23 -17
  82. package/dist/cjs/chunks/combobox-list.cjs +14 -8
  83. package/dist/cjs/chunks/combobox-root.cjs +2 -3
  84. package/dist/cjs/chunks/combobox-separator.cjs +9 -4
  85. package/dist/cjs/chunks/combobox-trigger.cjs +14 -8
  86. package/dist/cjs/chunks/combobox.cjs +14 -14
  87. package/dist/cjs/chunks/compact-button.cjs +13 -8
  88. package/dist/cjs/chunks/components.cjs +20 -4
  89. package/dist/cjs/chunks/content-divider.cjs +14 -9
  90. package/dist/cjs/chunks/counter-input.cjs +145 -111
  91. package/dist/cjs/chunks/createContext.cjs +1 -2
  92. package/dist/cjs/chunks/date-picker.cjs +14 -9
  93. package/dist/cjs/chunks/digit-input-group.cjs +12 -6
  94. package/dist/cjs/chunks/digit-input-slot.cjs +13 -7
  95. package/dist/cjs/chunks/digit-input.cjs +13 -7
  96. package/dist/cjs/chunks/dist.cjs +120 -230
  97. package/dist/cjs/chunks/dist2.cjs +459 -15492
  98. package/dist/cjs/chunks/dist3.cjs +16177 -0
  99. package/dist/cjs/chunks/dropdown-menu-content.cjs +15 -9
  100. package/dist/cjs/chunks/dropdown-menu-group.cjs +3 -4
  101. package/dist/cjs/chunks/dropdown-menu-item.cjs +13 -7
  102. package/dist/cjs/chunks/dropdown-menu-label.cjs +13 -7
  103. package/dist/cjs/chunks/dropdown-menu-separator.cjs +11 -6
  104. package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +13 -7
  105. package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +13 -7
  106. package/dist/cjs/chunks/dropdown-menu-sub.cjs +2 -3
  107. package/dist/cjs/chunks/dropdown-menu-trigger.cjs +3 -4
  108. package/dist/cjs/chunks/dropdown-menu.cjs +11 -5
  109. package/dist/cjs/chunks/extra-settings.cjs +3 -7
  110. package/dist/cjs/chunks/fancy-button.cjs +12 -7
  111. package/dist/cjs/chunks/file-upload-area.cjs +24 -17
  112. package/dist/cjs/chunks/getActiveElement.cjs +1 -1
  113. package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +1 -1
  114. package/dist/cjs/chunks/hint-text.cjs +13 -8
  115. package/dist/cjs/chunks/hue-slider.cjs +3 -6
  116. package/dist/cjs/chunks/isValueEqualOrExist.cjs +1 -1
  117. package/dist/cjs/chunks/label2.cjs +15 -10
  118. package/dist/cjs/chunks/link-bubble.cjs +12 -15
  119. package/dist/cjs/chunks/link-button.cjs +14 -9
  120. package/dist/cjs/chunks/menus.cjs +236 -42
  121. package/dist/cjs/chunks/modal-body.cjs +9 -4
  122. package/dist/cjs/chunks/modal-close.cjs +0 -1
  123. package/dist/cjs/chunks/modal-content.cjs +18 -6
  124. package/dist/cjs/chunks/modal-footer.cjs +9 -4
  125. package/dist/cjs/chunks/modal-header.cjs +18 -13
  126. package/dist/cjs/chunks/modal-trigger.cjs +0 -1
  127. package/dist/cjs/chunks/modal.cjs +0 -1
  128. package/dist/cjs/chunks/nullish.cjs +1 -1
  129. package/dist/cjs/chunks/ohash.D__AXeF1.cjs +1 -1
  130. package/dist/cjs/chunks/pagination-content.cjs +14 -9
  131. package/dist/cjs/chunks/pagination-ellipsis.cjs +12 -7
  132. package/dist/cjs/chunks/pagination-first.cjs +11 -5
  133. package/dist/cjs/chunks/pagination-item.cjs +10 -5
  134. package/dist/cjs/chunks/pagination-last.cjs +11 -5
  135. package/dist/cjs/chunks/pagination-next.cjs +11 -5
  136. package/dist/cjs/chunks/pagination-previous.cjs +11 -5
  137. package/dist/cjs/chunks/pagination.cjs +12 -6
  138. package/dist/cjs/chunks/popover-content.cjs +27 -21
  139. package/dist/cjs/chunks/popover-trigger.cjs +3 -4
  140. package/dist/cjs/chunks/popover.cjs +0 -1
  141. package/dist/cjs/chunks/progress-bar.cjs +14 -9
  142. package/dist/cjs/chunks/progress-circle.cjs +10 -5
  143. package/dist/cjs/chunks/radio-group-card.cjs +15 -10
  144. package/dist/cjs/chunks/radio-group-item.cjs +15 -9
  145. package/dist/cjs/chunks/radio-group-label.cjs +11 -6
  146. package/dist/cjs/chunks/radio-group.cjs +9 -3
  147. package/dist/cjs/chunks/range-calendar.cjs +56 -47
  148. package/dist/cjs/chunks/range-picker.cjs +19 -14
  149. package/dist/cjs/chunks/rich-editor.cjs +1130 -262
  150. package/dist/cjs/chunks/{chunk.cjs → rolldown-runtime.cjs} +8 -1
  151. package/dist/cjs/chunks/scroll-area.cjs +13 -8
  152. package/dist/cjs/chunks/scroll-bar.cjs +43 -29
  153. package/dist/cjs/chunks/segmented-control-item.cjs +12 -7
  154. package/dist/cjs/chunks/segmented-control.cjs +11 -5
  155. package/dist/cjs/chunks/select-content.cjs +16 -10
  156. package/dist/cjs/chunks/select-group.cjs +0 -1
  157. package/dist/cjs/chunks/select-icon.cjs +9 -4
  158. package/dist/cjs/chunks/select-item.cjs +17 -11
  159. package/dist/cjs/chunks/select-label.cjs +10 -5
  160. package/dist/cjs/chunks/select-separator.cjs +10 -5
  161. package/dist/cjs/chunks/select-trigger.cjs +12 -7
  162. package/dist/cjs/chunks/select-value.cjs +10 -5
  163. package/dist/cjs/chunks/select.cjs +9 -3
  164. package/dist/cjs/chunks/sheet-close.cjs +9 -4
  165. package/dist/cjs/chunks/sheet-content.cjs +13 -7
  166. package/dist/cjs/chunks/sheet-description.cjs +11 -6
  167. package/dist/cjs/chunks/sheet-footer.cjs +9 -4
  168. package/dist/cjs/chunks/sheet-header.cjs +9 -4
  169. package/dist/cjs/chunks/sheet-title.cjs +11 -6
  170. package/dist/cjs/chunks/sheet-trigger.cjs +0 -1
  171. package/dist/cjs/chunks/sheet.cjs +0 -1
  172. package/dist/cjs/chunks/sidebar-content.cjs +7 -2
  173. package/dist/cjs/chunks/sidebar-element.cjs +8 -3
  174. package/dist/cjs/chunks/sidebar-footer.cjs +7 -2
  175. package/dist/cjs/chunks/sidebar-group-content.cjs +9 -4
  176. package/dist/cjs/chunks/sidebar-group-label.cjs +9 -4
  177. package/dist/cjs/chunks/sidebar-group.cjs +7 -2
  178. package/dist/cjs/chunks/sidebar-header.cjs +7 -2
  179. package/dist/cjs/chunks/sidebar-menu-action.cjs +10 -5
  180. package/dist/cjs/chunks/sidebar-menu-badge.cjs +11 -6
  181. package/dist/cjs/chunks/sidebar-menu-button.cjs +11 -6
  182. package/dist/cjs/chunks/sidebar-menu-item.cjs +7 -2
  183. package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +12 -7
  184. package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +7 -2
  185. package/dist/cjs/chunks/sidebar-menu-sub.cjs +7 -2
  186. package/dist/cjs/chunks/sidebar-menu.cjs +7 -2
  187. package/dist/cjs/chunks/sidebar-provider.cjs +14 -8
  188. package/dist/cjs/chunks/sidebar-trigger.cjs +10 -5
  189. package/dist/cjs/chunks/sidebar.cjs +11 -6
  190. package/dist/cjs/chunks/slider.cjs +38 -24
  191. package/dist/cjs/chunks/social-button.cjs +5 -6
  192. package/dist/cjs/chunks/sonner-alert.cjs +2 -3
  193. package/dist/cjs/chunks/sonner.cjs +4 -4
  194. package/dist/cjs/chunks/status-badge.cjs +13 -8
  195. package/dist/cjs/chunks/switch.cjs +13 -7
  196. package/dist/cjs/chunks/tab-menu-content.cjs +10 -5
  197. package/dist/cjs/chunks/tab-menu-item.cjs +12 -6
  198. package/dist/cjs/chunks/tab-menu-list.cjs +10 -5
  199. package/dist/cjs/chunks/tab-menu.cjs +2 -3
  200. package/dist/cjs/chunks/table-body.cjs +9 -4
  201. package/dist/cjs/chunks/table-caption.cjs +9 -4
  202. package/dist/cjs/chunks/table-cell.cjs +9 -4
  203. package/dist/cjs/chunks/table-footer.cjs +9 -4
  204. package/dist/cjs/chunks/table-head.cjs +9 -4
  205. package/dist/cjs/chunks/table-header.cjs +7 -2
  206. package/dist/cjs/chunks/table-row.cjs +9 -4
  207. package/dist/cjs/chunks/table.cjs +9 -4
  208. package/dist/cjs/chunks/table2.cjs +9 -4
  209. package/dist/cjs/chunks/tag.cjs +16 -11
  210. package/dist/cjs/chunks/text-input-affix.cjs +9 -4
  211. package/dist/cjs/chunks/text-input-button.cjs +9 -4
  212. package/dist/cjs/chunks/text-input.cjs +10 -10
  213. package/dist/cjs/chunks/textarea.cjs +15 -10
  214. package/dist/cjs/chunks/tooltip-content.cjs +38 -32
  215. package/dist/cjs/chunks/tooltip-provider.cjs +0 -1
  216. package/dist/cjs/chunks/tooltip-root.cjs +2 -2
  217. package/dist/cjs/chunks/tooltip-trigger.cjs +1 -2
  218. package/dist/cjs/chunks/tooltip.cjs +17 -11
  219. package/dist/cjs/chunks/use-color-model.cjs +7 -12
  220. package/dist/cjs/chunks/useArrowNavigation.cjs +1 -1
  221. package/dist/cjs/chunks/useCalendar.cjs +669 -598
  222. package/dist/cjs/chunks/useComposing.cjs +1 -2
  223. package/dist/cjs/chunks/useDirection.cjs +1 -2
  224. package/dist/cjs/chunks/useEmitAsProps.cjs +1 -2
  225. package/dist/cjs/chunks/useFocusGuards.cjs +1 -2
  226. package/dist/cjs/chunks/useFormControl.cjs +2 -3
  227. package/dist/cjs/chunks/useForwardExpose.cjs +2 -3
  228. package/dist/cjs/chunks/useForwardProps.cjs +1 -2
  229. package/dist/cjs/chunks/useForwardPropsEmits.cjs +1 -2
  230. package/dist/cjs/chunks/useForwardScopeId.cjs +1 -2
  231. package/dist/cjs/chunks/useHideOthers.cjs +4 -5
  232. package/dist/cjs/chunks/useId.cjs +3 -3
  233. package/dist/cjs/chunks/useKbd.cjs +1 -1
  234. package/dist/cjs/chunks/useLocale.cjs +1 -2
  235. package/dist/cjs/chunks/useNonce.cjs +1 -2
  236. package/dist/cjs/chunks/usePrimitiveElement.cjs +2 -3
  237. package/dist/cjs/chunks/useSize.cjs +2 -3
  238. package/dist/cjs/chunks/useTypeahead.cjs +1 -1
  239. package/dist/cjs/chunks/utils.cjs +1 -1
  240. package/dist/cjs/chunks/utils2.cjs +1 -1
  241. package/dist/cjs/chunks/utils3.cjs +1 -1
  242. package/dist/cjs/color.cjs +1 -3
  243. package/dist/cjs/command-group.cjs +11 -6
  244. package/dist/cjs/command-input.cjs +12 -6
  245. package/dist/cjs/command-item.cjs +10 -4
  246. package/dist/cjs/command-list.cjs +10 -4
  247. package/dist/cjs/command-root.cjs +10 -4
  248. package/dist/cjs/command-separator.cjs +9 -4
  249. package/dist/cjs/config.cjs +0 -1
  250. package/dist/cjs/index.cjs +21 -1
  251. package/dist/cjs/use-chart-motion.cjs +17 -0
  252. package/dist/cjs/use-delegated-props.cjs +0 -1
  253. package/dist/cjs/use-locale.cjs +8 -0
  254. package/dist/cjs/use-sidebar.cjs +1 -1
  255. package/dist/cjs/use-user-select.cjs +0 -1
  256. package/dist/components/chart/bar-chart.d.ts +39 -0
  257. package/dist/components/chart/chart-card.d.ts +26 -0
  258. package/dist/components/chart/chart-legend.d.ts +32 -0
  259. package/dist/components/chart/chart-plot.d.ts +35 -0
  260. package/dist/components/chart/chart-tooltip.d.ts +11 -0
  261. package/dist/components/chart/index.d.ts +9 -0
  262. package/dist/components/color-picker/hue-slider.d.ts +1 -4
  263. package/dist/components/digit-input/digit-input.d.ts +1 -1
  264. package/dist/components/index.d.ts +1 -0
  265. package/dist/components/popover/popover-content.d.ts +1 -1
  266. package/dist/components/progress/progress-bar.d.ts +1 -1
  267. package/dist/components/text-input/text-input.d.ts +1 -0
  268. package/dist/composables/index.d.ts +2 -0
  269. package/dist/composables/use-chart-motion.d.ts +7 -0
  270. package/dist/composables/use-locale.d.ts +2 -0
  271. package/dist/es/bar-chart.js +2 -0
  272. package/dist/es/chart-card.js +2 -0
  273. package/dist/es/chart-legend.js +2 -0
  274. package/dist/es/chart-plot.js +2 -0
  275. package/dist/es/chart-tooltip.js +24 -0
  276. package/dist/es/chart.js +33 -0
  277. package/dist/es/chunks/BubbleSelect.js +5 -5
  278. package/dist/es/chunks/CollapsibleRoot.js +3 -3
  279. package/dist/es/chunks/Collection.js +3 -3
  280. package/dist/es/chunks/ComboboxContent.js +9 -8
  281. package/dist/es/chunks/ComboboxGroup.js +4 -4
  282. package/dist/es/chunks/ComboboxInput.js +3 -3
  283. package/dist/es/chunks/ComboboxItem.js +7 -6
  284. package/dist/es/chunks/ComboboxLabel.js +1 -1
  285. package/dist/es/chunks/ComboboxRoot.js +15 -11
  286. package/dist/es/chunks/ComboboxSeparator.js +1 -1
  287. package/dist/es/chunks/ConfigProvider.js +2 -2
  288. package/dist/es/chunks/DialogClose.js +1 -1
  289. package/dist/es/chunks/DialogDescription.js +1 -1
  290. package/dist/es/chunks/DialogPortal.js +10 -9
  291. package/dist/es/chunks/DialogRoot.js +3 -3
  292. package/dist/es/chunks/DialogTitle.js +1 -1
  293. package/dist/es/chunks/DialogTrigger.js +1 -1
  294. package/dist/es/chunks/DismissableLayer.js +5 -4
  295. package/dist/es/chunks/DropdownMenuPortal.js +2 -2
  296. package/dist/es/chunks/DropdownMenuRoot.js +3 -3
  297. package/dist/es/chunks/FocusScope.js +7 -6
  298. package/dist/es/chunks/Label.js +1 -1
  299. package/dist/es/chunks/MenuAnchor.js +1 -1
  300. package/dist/es/chunks/MenuContentImpl.js +5 -4
  301. package/dist/es/chunks/MenuGroup.js +2 -2
  302. package/dist/es/chunks/MenuItemImpl.js +1 -1
  303. package/dist/es/chunks/MenuRoot.js +6 -5
  304. package/dist/es/chunks/MenuSub.js +3 -3
  305. package/dist/es/chunks/PaginationRoot.js +3 -3
  306. package/dist/es/chunks/PinInputRoot.js +3 -3
  307. package/dist/es/chunks/PopoverRoot.js +3 -3
  308. package/dist/es/chunks/PopperAnchor.js +1 -1
  309. package/dist/es/chunks/PopperArrow.js +3 -3
  310. package/dist/es/chunks/PopperContent.js +261 -321
  311. package/dist/es/chunks/PopperRoot.js +2 -2
  312. package/dist/es/chunks/Presence.js +6 -5
  313. package/dist/es/chunks/Primitive.js +5 -5
  314. package/dist/es/chunks/ProgressIndicator.js +4 -4
  315. package/dist/es/chunks/RadioGroupRoot.js +3 -3
  316. package/dist/es/chunks/RovingFocusGroup.js +6 -5
  317. package/dist/es/chunks/RovingFocusItem.js +1 -1
  318. package/dist/es/chunks/SelectGroup.js +2 -2
  319. package/dist/es/chunks/SelectItemAlignedPosition.js +10 -9
  320. package/dist/es/chunks/TabsRoot.js +4 -4
  321. package/dist/es/chunks/Teleport.js +2 -2
  322. package/dist/es/chunks/ToggleGroupRoot.js +4 -4
  323. package/dist/es/chunks/TooltipProvider.js +2 -2
  324. package/dist/es/chunks/TooltipRoot.js +5 -4
  325. package/dist/es/chunks/VisuallyHidden.js +1 -1
  326. package/dist/es/chunks/VisuallyHiddenInput.js +4 -3
  327. package/dist/es/chunks/alert.js +16 -10
  328. package/dist/es/chunks/alpha-slider.js +1 -3
  329. package/dist/es/chunks/badge.js +17 -11
  330. package/dist/es/chunks/bar-chart.js +10314 -0
  331. package/dist/es/chunks/button.js +11 -5
  332. package/dist/es/chunks/calendar.js +39 -32
  333. package/dist/es/chunks/chart-card.js +63 -0
  334. package/dist/es/chunks/chart-legend.js +82 -0
  335. package/dist/es/chunks/chart-plot.js +87 -0
  336. package/dist/es/chunks/checkbox-card.js +14 -8
  337. package/dist/es/chunks/checkbox-label.js +10 -4
  338. package/dist/es/chunks/checkbox.js +18 -11
  339. package/dist/es/chunks/clamp.js +1 -1
  340. package/dist/es/chunks/collapsible-content.js +9 -3
  341. package/dist/es/chunks/collapsible-trigger.js +1 -1
  342. package/dist/es/chunks/color-area.js +7 -5
  343. package/dist/es/chunks/color-picker.js +68 -40
  344. package/dist/es/chunks/color-swatch.js +3 -3
  345. package/dist/es/chunks/combobox-anchor.js +11 -4
  346. package/dist/es/chunks/combobox-empty.js +9 -3
  347. package/dist/es/chunks/combobox-group.js +10 -4
  348. package/dist/es/chunks/combobox-input.js +10 -4
  349. package/dist/es/chunks/combobox-item.js +22 -15
  350. package/dist/es/chunks/combobox-list.js +13 -6
  351. package/dist/es/chunks/combobox-root.js +1 -1
  352. package/dist/es/chunks/combobox-separator.js +8 -2
  353. package/dist/es/chunks/combobox-trigger.js +13 -6
  354. package/dist/es/chunks/combobox.js +13 -12
  355. package/dist/es/chunks/compact-button.js +12 -6
  356. package/dist/es/chunks/components.js +19 -3
  357. package/dist/es/chunks/content-divider.js +14 -8
  358. package/dist/es/chunks/counter-input.js +141 -106
  359. package/dist/es/chunks/createContext.js +1 -1
  360. package/dist/es/chunks/date-picker.js +13 -7
  361. package/dist/es/chunks/digit-input-group.js +11 -4
  362. package/dist/es/chunks/digit-input-slot.js +12 -5
  363. package/dist/es/chunks/digit-input.js +12 -5
  364. package/dist/es/chunks/dist.js +90 -205
  365. package/dist/es/chunks/dist2.js +434 -15275
  366. package/dist/es/chunks/dist3.js +15890 -0
  367. package/dist/es/chunks/dropdown-menu-content.js +14 -7
  368. package/dist/es/chunks/dropdown-menu-group.js +2 -2
  369. package/dist/es/chunks/dropdown-menu-item.js +12 -5
  370. package/dist/es/chunks/dropdown-menu-label.js +12 -5
  371. package/dist/es/chunks/dropdown-menu-separator.js +10 -4
  372. package/dist/es/chunks/dropdown-menu-sub-content.js +12 -5
  373. package/dist/es/chunks/dropdown-menu-sub-trigger.js +12 -5
  374. package/dist/es/chunks/dropdown-menu-sub.js +2 -2
  375. package/dist/es/chunks/dropdown-menu-trigger.js +2 -2
  376. package/dist/es/chunks/dropdown-menu.js +10 -3
  377. package/dist/es/chunks/extra-settings.js +2 -5
  378. package/dist/es/chunks/fancy-button.js +11 -5
  379. package/dist/es/chunks/file-upload-area.js +23 -15
  380. package/dist/es/chunks/getActiveElement.js +1 -1
  381. package/dist/es/chunks/handleAndDispatchCustomEvent.js +1 -1
  382. package/dist/es/chunks/hint-text.js +12 -6
  383. package/dist/es/chunks/hue-slider.js +3 -5
  384. package/dist/es/chunks/isValueEqualOrExist.js +1 -1
  385. package/dist/es/chunks/label2.js +14 -8
  386. package/dist/es/chunks/link-bubble.js +11 -13
  387. package/dist/es/chunks/link-button.js +13 -7
  388. package/dist/es/chunks/menus.js +236 -41
  389. package/dist/es/chunks/modal-body.js +8 -2
  390. package/dist/es/chunks/modal-content.js +17 -4
  391. package/dist/es/chunks/modal-footer.js +8 -2
  392. package/dist/es/chunks/modal-header.js +17 -11
  393. package/dist/es/chunks/nullish.js +1 -1
  394. package/dist/es/chunks/ohash.D__AXeF1.js +1 -1
  395. package/dist/es/chunks/pagination-content.js +12 -6
  396. package/dist/es/chunks/pagination-ellipsis.js +10 -4
  397. package/dist/es/chunks/pagination-first.js +11 -4
  398. package/dist/es/chunks/pagination-item.js +9 -3
  399. package/dist/es/chunks/pagination-last.js +11 -4
  400. package/dist/es/chunks/pagination-next.js +11 -4
  401. package/dist/es/chunks/pagination-previous.js +11 -4
  402. package/dist/es/chunks/pagination.js +11 -4
  403. package/dist/es/chunks/popover-content.js +28 -21
  404. package/dist/es/chunks/popover-trigger.js +2 -2
  405. package/dist/es/chunks/progress-bar.js +13 -7
  406. package/dist/es/chunks/progress-circle.js +9 -3
  407. package/dist/es/chunks/radio-group-card.js +14 -8
  408. package/dist/es/chunks/radio-group-item.js +15 -8
  409. package/dist/es/chunks/radio-group-label.js +10 -4
  410. package/dist/es/chunks/radio-group.js +9 -2
  411. package/dist/es/chunks/range-calendar.js +56 -46
  412. package/dist/es/chunks/range-picker.js +19 -13
  413. package/dist/es/chunks/rich-editor.js +1129 -260
  414. package/dist/es/chunks/rolldown-runtime.js +34 -0
  415. package/dist/es/chunks/scroll-area.js +12 -6
  416. package/dist/es/chunks/scroll-bar.js +39 -24
  417. package/dist/es/chunks/segmented-control-item.js +11 -5
  418. package/dist/es/chunks/segmented-control.js +10 -3
  419. package/dist/es/chunks/select-content.js +15 -8
  420. package/dist/es/chunks/select-icon.js +8 -2
  421. package/dist/es/chunks/select-item.js +16 -9
  422. package/dist/es/chunks/select-label.js +9 -3
  423. package/dist/es/chunks/select-separator.js +9 -3
  424. package/dist/es/chunks/select-trigger.js +11 -5
  425. package/dist/es/chunks/select-value.js +9 -3
  426. package/dist/es/chunks/select.js +9 -2
  427. package/dist/es/chunks/sheet-close.js +8 -2
  428. package/dist/es/chunks/sheet-content.js +12 -5
  429. package/dist/es/chunks/sheet-description.js +9 -3
  430. package/dist/es/chunks/sheet-footer.js +8 -2
  431. package/dist/es/chunks/sheet-header.js +8 -2
  432. package/dist/es/chunks/sheet-title.js +9 -3
  433. package/dist/es/chunks/sidebar-content.js +7 -1
  434. package/dist/es/chunks/sidebar-element.js +8 -2
  435. package/dist/es/chunks/sidebar-footer.js +7 -1
  436. package/dist/es/chunks/sidebar-group-content.js +8 -2
  437. package/dist/es/chunks/sidebar-group-label.js +9 -3
  438. package/dist/es/chunks/sidebar-group.js +7 -1
  439. package/dist/es/chunks/sidebar-header.js +7 -1
  440. package/dist/es/chunks/sidebar-menu-action.js +10 -4
  441. package/dist/es/chunks/sidebar-menu-badge.js +11 -5
  442. package/dist/es/chunks/sidebar-menu-button.js +10 -4
  443. package/dist/es/chunks/sidebar-menu-item.js +7 -1
  444. package/dist/es/chunks/sidebar-menu-sub-button.js +12 -6
  445. package/dist/es/chunks/sidebar-menu-sub-item.js +7 -1
  446. package/dist/es/chunks/sidebar-menu-sub.js +7 -1
  447. package/dist/es/chunks/sidebar-menu.js +7 -1
  448. package/dist/es/chunks/sidebar-provider.js +10 -3
  449. package/dist/es/chunks/sidebar-trigger.js +9 -3
  450. package/dist/es/chunks/sidebar.js +11 -5
  451. package/dist/es/chunks/slider.js +38 -23
  452. package/dist/es/chunks/social-button.js +4 -4
  453. package/dist/es/chunks/sonner-alert.js +1 -1
  454. package/dist/es/chunks/sonner.js +4 -3
  455. package/dist/es/chunks/status-badge.js +12 -6
  456. package/dist/es/chunks/switch.js +13 -6
  457. package/dist/es/chunks/tab-menu-content.js +9 -3
  458. package/dist/es/chunks/tab-menu-item.js +11 -4
  459. package/dist/es/chunks/tab-menu-list.js +9 -3
  460. package/dist/es/chunks/tab-menu.js +1 -1
  461. package/dist/es/chunks/table-body.js +8 -2
  462. package/dist/es/chunks/table-caption.js +8 -2
  463. package/dist/es/chunks/table-cell.js +8 -2
  464. package/dist/es/chunks/table-footer.js +8 -2
  465. package/dist/es/chunks/table-head.js +8 -2
  466. package/dist/es/chunks/table-header.js +7 -1
  467. package/dist/es/chunks/table-row.js +8 -2
  468. package/dist/es/chunks/table.js +8 -2
  469. package/dist/es/chunks/table2.js +8 -2
  470. package/dist/es/chunks/tag.js +15 -9
  471. package/dist/es/chunks/text-input-affix.js +8 -2
  472. package/dist/es/chunks/text-input-button.js +8 -2
  473. package/dist/es/chunks/text-input.js +10 -9
  474. package/dist/es/chunks/textarea.js +14 -8
  475. package/dist/es/chunks/tooltip-content.js +38 -31
  476. package/dist/es/chunks/tooltip-root.js +2 -1
  477. package/dist/es/chunks/tooltip-trigger.js +1 -1
  478. package/dist/es/chunks/tooltip.js +17 -10
  479. package/dist/es/chunks/use-color-model.js +7 -11
  480. package/dist/es/chunks/useArrowNavigation.js +1 -1
  481. package/dist/es/chunks/useCalendar.js +656 -584
  482. package/dist/es/chunks/useComposing.js +1 -1
  483. package/dist/es/chunks/useDirection.js +1 -1
  484. package/dist/es/chunks/useEmitAsProps.js +1 -1
  485. package/dist/es/chunks/useFocusGuards.js +2 -2
  486. package/dist/es/chunks/useFormControl.js +2 -2
  487. package/dist/es/chunks/useForwardExpose.js +2 -2
  488. package/dist/es/chunks/useForwardProps.js +1 -1
  489. package/dist/es/chunks/useForwardPropsEmits.js +1 -1
  490. package/dist/es/chunks/useForwardScopeId.js +1 -1
  491. package/dist/es/chunks/useHideOthers.js +4 -4
  492. package/dist/es/chunks/useId.js +1 -1
  493. package/dist/es/chunks/useKbd.js +1 -1
  494. package/dist/es/chunks/useLocale.js +1 -1
  495. package/dist/es/chunks/useNonce.js +1 -1
  496. package/dist/es/chunks/usePrimitiveElement.js +2 -2
  497. package/dist/es/chunks/useSize.js +2 -2
  498. package/dist/es/chunks/useTypeahead.js +2 -2
  499. package/dist/es/chunks/utils.js +1 -1
  500. package/dist/es/chunks/utils2.js +1 -1
  501. package/dist/es/chunks/utils3.js +1 -1
  502. package/dist/es/color.js +1 -3
  503. package/dist/es/command-group.js +10 -4
  504. package/dist/es/command-input.js +11 -4
  505. package/dist/es/command-item.js +10 -3
  506. package/dist/es/command-list.js +10 -3
  507. package/dist/es/command-root.js +10 -3
  508. package/dist/es/command-separator.js +8 -2
  509. package/dist/es/index.js +9 -1
  510. package/dist/es/use-chart-motion.js +15 -0
  511. package/dist/es/use-locale.js +8 -0
  512. package/dist/es/use-sidebar.js +1 -1
  513. package/dist/utils/chart.d.ts +6 -0
  514. package/dist/utils/index.d.ts +1 -0
  515. package/package.json +46 -44
  516. package/src/components/chart/bar-chart.vue +383 -0
  517. package/src/components/chart/chart-card.vue +99 -0
  518. package/src/components/chart/chart-legend.vue +164 -0
  519. package/src/components/chart/chart-plot.vue +350 -0
  520. package/src/components/chart/chart-tooltip.ts +35 -0
  521. package/src/components/chart/index.ts +13 -0
  522. package/src/components/chart/stories/bar-chart.stories.ts +319 -0
  523. package/src/components/color-picker/hue-slider.vue +1 -1
  524. package/src/components/file-upload/file-upload-area.vue +1 -1
  525. package/src/components/index.ts +1 -0
  526. package/src/components/text-input/text-input.vue +1 -0
  527. package/src/components/tooltip/tooltip-content.vue +5 -1
  528. package/src/composables/index.ts +2 -0
  529. package/src/composables/use-chart-motion.ts +18 -0
  530. package/src/composables/use-locale.ts +8 -0
  531. package/src/utils/chart.ts +42 -0
  532. package/src/utils/index.ts +1 -0
  533. package/dist/cjs/chunks/core.cjs +0 -325
  534. package/dist/es/chunks/core.js +0 -289
@@ -1,325 +0,0 @@
1
- require("./chunk.cjs");
2
- let vue = require("vue");
3
- //#region ../../node_modules/.pnpm/@vueuse+shared@13.9.0_vue@3.5.13_typescript@6.0.3_/node_modules/@vueuse/shared/index.mjs
4
- function tryOnScopeDispose(fn) {
5
- if ((0, vue.getCurrentScope)()) {
6
- (0, vue.onScopeDispose)(fn);
7
- return true;
8
- }
9
- return false;
10
- }
11
- var localProvidedStateMap = /* @__PURE__ */ new WeakMap();
12
- var injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
13
- var _a;
14
- const key = args[0];
15
- const instance = (_a = (0, vue.getCurrentInstance)()) == null ? void 0 : _a.proxy;
16
- if (instance == null && !(0, vue.hasInjectionContext)()) throw new Error("injectLocal must be called in setup");
17
- if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) return localProvidedStateMap.get(instance)[key];
18
- return (0, vue.inject)(...args);
19
- };
20
- function toReactive(objectRef) {
21
- if (!(0, vue.isRef)(objectRef)) return (0, vue.reactive)(objectRef);
22
- return (0, vue.reactive)(new Proxy({}, {
23
- get(_, p, receiver) {
24
- return (0, vue.unref)(Reflect.get(objectRef.value, p, receiver));
25
- },
26
- set(_, p, value) {
27
- if ((0, vue.isRef)(objectRef.value[p]) && !(0, vue.isRef)(value)) objectRef.value[p].value = value;
28
- else objectRef.value[p] = value;
29
- return true;
30
- },
31
- deleteProperty(_, p) {
32
- return Reflect.deleteProperty(objectRef.value, p);
33
- },
34
- has(_, p) {
35
- return Reflect.has(objectRef.value, p);
36
- },
37
- ownKeys() {
38
- return Object.keys(objectRef.value);
39
- },
40
- getOwnPropertyDescriptor() {
41
- return {
42
- enumerable: true,
43
- configurable: true
44
- };
45
- }
46
- }));
47
- }
48
- function reactiveComputed(fn) {
49
- return toReactive((0, vue.computed)(fn));
50
- }
51
- function reactiveOmit(obj, ...keys) {
52
- const flatKeys = keys.flat();
53
- const predicate = flatKeys[0];
54
- return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries((0, vue.toRefs)(obj)).filter(([k, v]) => !predicate((0, vue.toValue)(v), k))) : Object.fromEntries(Object.entries((0, vue.toRefs)(obj)).filter((e) => !flatKeys.includes(e[0]))));
55
- }
56
- var isClient = typeof window !== "undefined" && typeof document !== "undefined";
57
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
58
- var isDef = (val) => typeof val !== "undefined";
59
- var toString = Object.prototype.toString;
60
- var isObject = (val) => toString.call(val) === "[object Object]";
61
- function pxValue(px) {
62
- return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
63
- }
64
- function toArray(value) {
65
- return Array.isArray(value) ? value : [value];
66
- }
67
- function watchImmediate(source, cb, options) {
68
- return (0, vue.watch)(source, cb, {
69
- ...options,
70
- immediate: true
71
- });
72
- }
73
- //#endregion
74
- //#region ../../node_modules/.pnpm/@vueuse+core@13.9.0_vue@3.5.13_typescript@6.0.3_/node_modules/@vueuse/core/index.mjs
75
- var defaultWindow = isClient ? window : void 0;
76
- var defaultDocument = isClient ? window.document : void 0;
77
- isClient && window.navigator;
78
- isClient && window.location;
79
- function unrefElement(elRef) {
80
- var _a;
81
- const plain = (0, vue.toValue)(elRef);
82
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
83
- }
84
- function useEventListener(...args) {
85
- const cleanups = [];
86
- const cleanup = () => {
87
- cleanups.forEach((fn) => fn());
88
- cleanups.length = 0;
89
- };
90
- const register = (el, event, listener, options) => {
91
- el.addEventListener(event, listener, options);
92
- return () => el.removeEventListener(event, listener, options);
93
- };
94
- const firstParamTargets = (0, vue.computed)(() => {
95
- const test = toArray((0, vue.toValue)(args[0])).filter((e) => e != null);
96
- return test.every((e) => typeof e !== "string") ? test : void 0;
97
- });
98
- const stopWatch = watchImmediate(() => {
99
- var _a, _b;
100
- return [
101
- (_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null),
102
- toArray((0, vue.toValue)(firstParamTargets.value ? args[1] : args[0])),
103
- toArray((0, vue.unref)(firstParamTargets.value ? args[2] : args[1])),
104
- (0, vue.toValue)(firstParamTargets.value ? args[3] : args[2])
105
- ];
106
- }, ([raw_targets, raw_events, raw_listeners, raw_options]) => {
107
- cleanup();
108
- if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return;
109
- const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
110
- cleanups.push(...raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)))));
111
- }, { flush: "post" });
112
- const stop = () => {
113
- stopWatch();
114
- cleanup();
115
- };
116
- tryOnScopeDispose(cleanup);
117
- return stop;
118
- }
119
- /* @__NO_SIDE_EFFECTS__ */
120
- function useMounted() {
121
- const isMounted = (0, vue.shallowRef)(false);
122
- const instance = (0, vue.getCurrentInstance)();
123
- if (instance) (0, vue.onMounted)(() => {
124
- isMounted.value = true;
125
- }, instance);
126
- return isMounted;
127
- }
128
- /* @__NO_SIDE_EFFECTS__ */
129
- function useSupported(callback) {
130
- const isMounted = /* @__PURE__ */ useMounted();
131
- return (0, vue.computed)(() => {
132
- isMounted.value;
133
- return Boolean(callback());
134
- });
135
- }
136
- var ssrWidthSymbol = Symbol("vueuse-ssr-width");
137
- /* @__NO_SIDE_EFFECTS__ */
138
- function useSSRWidth() {
139
- const ssrWidth = (0, vue.hasInjectionContext)() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
140
- return typeof ssrWidth === "number" ? ssrWidth : void 0;
141
- }
142
- function useMediaQuery(query, options = {}) {
143
- const { window = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
144
- const isSupported = /* @__PURE__ */ useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
145
- const ssrSupport = (0, vue.shallowRef)(typeof ssrWidth === "number");
146
- const mediaQuery = (0, vue.shallowRef)();
147
- const matches = (0, vue.shallowRef)(false);
148
- const handler = (event) => {
149
- matches.value = event.matches;
150
- };
151
- (0, vue.watchEffect)(() => {
152
- if (ssrSupport.value) {
153
- ssrSupport.value = !isSupported.value;
154
- matches.value = (0, vue.toValue)(query).split(",").some((queryString) => {
155
- const not = queryString.includes("not all");
156
- const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
157
- const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
158
- let res = Boolean(minWidth || maxWidth);
159
- if (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);
160
- if (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);
161
- return not ? !res : res;
162
- });
163
- return;
164
- }
165
- if (!isSupported.value) return;
166
- mediaQuery.value = window.matchMedia((0, vue.toValue)(query));
167
- matches.value = mediaQuery.value.matches;
168
- });
169
- useEventListener(mediaQuery, "change", handler, { passive: true });
170
- return (0, vue.computed)(() => matches.value);
171
- }
172
- function cloneFnJSON(source) {
173
- return JSON.parse(JSON.stringify(source));
174
- }
175
- function useDropZone(target, options = {}) {
176
- var _a, _b;
177
- const isOverDropZone = (0, vue.shallowRef)(false);
178
- const files = (0, vue.shallowRef)(null);
179
- let counter = 0;
180
- let isValid = true;
181
- if (isClient) {
182
- const _options = typeof options === "function" ? { onDrop: options } : options;
183
- const multiple = (_a = _options.multiple) != null ? _a : true;
184
- const preventDefaultForUnhandled = (_b = _options.preventDefaultForUnhandled) != null ? _b : false;
185
- const getFiles = (event) => {
186
- var _a2, _b2;
187
- const list = Array.from((_b2 = (_a2 = event.dataTransfer) == null ? void 0 : _a2.files) != null ? _b2 : []);
188
- return list.length === 0 ? null : multiple ? list : [list[0]];
189
- };
190
- const checkDataTypes = (types) => {
191
- const dataTypes = (0, vue.unref)(_options.dataTypes);
192
- if (typeof dataTypes === "function") return dataTypes(types);
193
- if (!(dataTypes == null ? void 0 : dataTypes.length)) return true;
194
- if (types.length === 0) return false;
195
- return types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));
196
- };
197
- const checkValidity = (items) => {
198
- const dataTypesValid = checkDataTypes(Array.from(items != null ? items : []).map((item) => item.type));
199
- const multipleFilesValid = multiple || items.length <= 1;
200
- return dataTypesValid && multipleFilesValid;
201
- };
202
- const isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !("chrome" in window);
203
- const handleDragEvent = (event, eventType) => {
204
- var _a2, _b2, _c, _d, _e, _f;
205
- const dataTransferItemList = (_a2 = event.dataTransfer) == null ? void 0 : _a2.items;
206
- isValid = (_b2 = dataTransferItemList && checkValidity(dataTransferItemList)) != null ? _b2 : false;
207
- if (preventDefaultForUnhandled) event.preventDefault();
208
- if (!isSafari() && !isValid) {
209
- if (event.dataTransfer) event.dataTransfer.dropEffect = "none";
210
- return;
211
- }
212
- event.preventDefault();
213
- if (event.dataTransfer) event.dataTransfer.dropEffect = "copy";
214
- const currentFiles = getFiles(event);
215
- switch (eventType) {
216
- case "enter":
217
- counter += 1;
218
- isOverDropZone.value = true;
219
- (_c = _options.onEnter) == null || _c.call(_options, null, event);
220
- break;
221
- case "over":
222
- (_d = _options.onOver) == null || _d.call(_options, null, event);
223
- break;
224
- case "leave":
225
- counter -= 1;
226
- if (counter === 0) isOverDropZone.value = false;
227
- (_e = _options.onLeave) == null || _e.call(_options, null, event);
228
- break;
229
- case "drop":
230
- counter = 0;
231
- isOverDropZone.value = false;
232
- if (isValid) {
233
- files.value = currentFiles;
234
- (_f = _options.onDrop) == null || _f.call(_options, currentFiles, event);
235
- }
236
- break;
237
- }
238
- };
239
- useEventListener(target, "dragenter", (event) => handleDragEvent(event, "enter"));
240
- useEventListener(target, "dragover", (event) => handleDragEvent(event, "over"));
241
- useEventListener(target, "dragleave", (event) => handleDragEvent(event, "leave"));
242
- useEventListener(target, "drop", (event) => handleDragEvent(event, "drop"));
243
- }
244
- return {
245
- files,
246
- isOverDropZone
247
- };
248
- }
249
- Number.POSITIVE_INFINITY;
250
- /* @__NO_SIDE_EFFECTS__ */
251
- function useVModel(props, key, emit, options = {}) {
252
- var _a, _b, _c;
253
- const { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;
254
- const vm = (0, vue.getCurrentInstance)();
255
- const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
256
- let event = eventName;
257
- if (!key) key = "modelValue";
258
- event = event || `update:${key.toString()}`;
259
- const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
260
- const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
261
- const triggerEmit = (value) => {
262
- if (shouldEmit) {
263
- if (shouldEmit(value)) _emit(event, value);
264
- } else _emit(event, value);
265
- };
266
- if (passive) {
267
- const proxy = (0, vue.ref)(getValue());
268
- let isUpdating = false;
269
- (0, vue.watch)(() => props[key], (v) => {
270
- if (!isUpdating) {
271
- isUpdating = true;
272
- proxy.value = cloneFn(v);
273
- (0, vue.nextTick)(() => isUpdating = false);
274
- }
275
- });
276
- (0, vue.watch)(proxy, (v) => {
277
- if (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);
278
- }, { deep });
279
- return proxy;
280
- } else return (0, vue.computed)({
281
- get() {
282
- return getValue();
283
- },
284
- set(value) {
285
- triggerEmit(value);
286
- }
287
- });
288
- }
289
- //#endregion
290
- Object.defineProperty(exports, "defaultDocument", {
291
- enumerable: true,
292
- get: function() {
293
- return defaultDocument;
294
- }
295
- });
296
- Object.defineProperty(exports, "reactiveOmit", {
297
- enumerable: true,
298
- get: function() {
299
- return reactiveOmit;
300
- }
301
- });
302
- Object.defineProperty(exports, "useDropZone", {
303
- enumerable: true,
304
- get: function() {
305
- return useDropZone;
306
- }
307
- });
308
- Object.defineProperty(exports, "useEventListener", {
309
- enumerable: true,
310
- get: function() {
311
- return useEventListener;
312
- }
313
- });
314
- Object.defineProperty(exports, "useMediaQuery", {
315
- enumerable: true,
316
- get: function() {
317
- return useMediaQuery;
318
- }
319
- });
320
- Object.defineProperty(exports, "useVModel", {
321
- enumerable: true,
322
- get: function() {
323
- return useVModel;
324
- }
325
- });
@@ -1,289 +0,0 @@
1
- import { computed, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isRef, nextTick, onMounted, onScopeDispose, reactive, ref, shallowRef, toRefs, toValue, unref, watch, watchEffect } from "vue";
2
- //#region ../../node_modules/.pnpm/@vueuse+shared@13.9.0_vue@3.5.13_typescript@6.0.3_/node_modules/@vueuse/shared/index.mjs
3
- function tryOnScopeDispose(fn) {
4
- if (getCurrentScope()) {
5
- onScopeDispose(fn);
6
- return true;
7
- }
8
- return false;
9
- }
10
- var localProvidedStateMap = /* @__PURE__ */ new WeakMap();
11
- var injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
12
- var _a;
13
- const key = args[0];
14
- const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
15
- if (instance == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
16
- if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) return localProvidedStateMap.get(instance)[key];
17
- return inject(...args);
18
- };
19
- function toReactive(objectRef) {
20
- if (!isRef(objectRef)) return reactive(objectRef);
21
- return reactive(new Proxy({}, {
22
- get(_, p, receiver) {
23
- return unref(Reflect.get(objectRef.value, p, receiver));
24
- },
25
- set(_, p, value) {
26
- if (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;
27
- else objectRef.value[p] = value;
28
- return true;
29
- },
30
- deleteProperty(_, p) {
31
- return Reflect.deleteProperty(objectRef.value, p);
32
- },
33
- has(_, p) {
34
- return Reflect.has(objectRef.value, p);
35
- },
36
- ownKeys() {
37
- return Object.keys(objectRef.value);
38
- },
39
- getOwnPropertyDescriptor() {
40
- return {
41
- enumerable: true,
42
- configurable: true
43
- };
44
- }
45
- }));
46
- }
47
- function reactiveComputed(fn) {
48
- return toReactive(computed(fn));
49
- }
50
- function reactiveOmit(obj, ...keys) {
51
- const flatKeys = keys.flat();
52
- const predicate = flatKeys[0];
53
- return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs(obj)).filter((e) => !flatKeys.includes(e[0]))));
54
- }
55
- var isClient = typeof window !== "undefined" && typeof document !== "undefined";
56
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
57
- var isDef = (val) => typeof val !== "undefined";
58
- var toString = Object.prototype.toString;
59
- var isObject = (val) => toString.call(val) === "[object Object]";
60
- function pxValue(px) {
61
- return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
62
- }
63
- function toArray(value) {
64
- return Array.isArray(value) ? value : [value];
65
- }
66
- function watchImmediate(source, cb, options) {
67
- return watch(source, cb, {
68
- ...options,
69
- immediate: true
70
- });
71
- }
72
- //#endregion
73
- //#region ../../node_modules/.pnpm/@vueuse+core@13.9.0_vue@3.5.13_typescript@6.0.3_/node_modules/@vueuse/core/index.mjs
74
- var defaultWindow = isClient ? window : void 0;
75
- var defaultDocument = isClient ? window.document : void 0;
76
- isClient && window.navigator;
77
- isClient && window.location;
78
- function unrefElement(elRef) {
79
- var _a;
80
- const plain = toValue(elRef);
81
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
82
- }
83
- function useEventListener(...args) {
84
- const cleanups = [];
85
- const cleanup = () => {
86
- cleanups.forEach((fn) => fn());
87
- cleanups.length = 0;
88
- };
89
- const register = (el, event, listener, options) => {
90
- el.addEventListener(event, listener, options);
91
- return () => el.removeEventListener(event, listener, options);
92
- };
93
- const firstParamTargets = computed(() => {
94
- const test = toArray(toValue(args[0])).filter((e) => e != null);
95
- return test.every((e) => typeof e !== "string") ? test : void 0;
96
- });
97
- const stopWatch = watchImmediate(() => {
98
- var _a, _b;
99
- return [
100
- (_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null),
101
- toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
102
- toArray(unref(firstParamTargets.value ? args[2] : args[1])),
103
- toValue(firstParamTargets.value ? args[3] : args[2])
104
- ];
105
- }, ([raw_targets, raw_events, raw_listeners, raw_options]) => {
106
- cleanup();
107
- if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return;
108
- const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
109
- cleanups.push(...raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)))));
110
- }, { flush: "post" });
111
- const stop = () => {
112
- stopWatch();
113
- cleanup();
114
- };
115
- tryOnScopeDispose(cleanup);
116
- return stop;
117
- }
118
- /* @__NO_SIDE_EFFECTS__ */
119
- function useMounted() {
120
- const isMounted = shallowRef(false);
121
- const instance = getCurrentInstance();
122
- if (instance) onMounted(() => {
123
- isMounted.value = true;
124
- }, instance);
125
- return isMounted;
126
- }
127
- /* @__NO_SIDE_EFFECTS__ */
128
- function useSupported(callback) {
129
- const isMounted = /* @__PURE__ */ useMounted();
130
- return computed(() => {
131
- isMounted.value;
132
- return Boolean(callback());
133
- });
134
- }
135
- var ssrWidthSymbol = Symbol("vueuse-ssr-width");
136
- /* @__NO_SIDE_EFFECTS__ */
137
- function useSSRWidth() {
138
- const ssrWidth = hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
139
- return typeof ssrWidth === "number" ? ssrWidth : void 0;
140
- }
141
- function useMediaQuery(query, options = {}) {
142
- const { window = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
143
- const isSupported = /* @__PURE__ */ useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
144
- const ssrSupport = shallowRef(typeof ssrWidth === "number");
145
- const mediaQuery = shallowRef();
146
- const matches = shallowRef(false);
147
- const handler = (event) => {
148
- matches.value = event.matches;
149
- };
150
- watchEffect(() => {
151
- if (ssrSupport.value) {
152
- ssrSupport.value = !isSupported.value;
153
- matches.value = toValue(query).split(",").some((queryString) => {
154
- const not = queryString.includes("not all");
155
- const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
156
- const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
157
- let res = Boolean(minWidth || maxWidth);
158
- if (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);
159
- if (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);
160
- return not ? !res : res;
161
- });
162
- return;
163
- }
164
- if (!isSupported.value) return;
165
- mediaQuery.value = window.matchMedia(toValue(query));
166
- matches.value = mediaQuery.value.matches;
167
- });
168
- useEventListener(mediaQuery, "change", handler, { passive: true });
169
- return computed(() => matches.value);
170
- }
171
- function cloneFnJSON(source) {
172
- return JSON.parse(JSON.stringify(source));
173
- }
174
- function useDropZone(target, options = {}) {
175
- var _a, _b;
176
- const isOverDropZone = shallowRef(false);
177
- const files = shallowRef(null);
178
- let counter = 0;
179
- let isValid = true;
180
- if (isClient) {
181
- const _options = typeof options === "function" ? { onDrop: options } : options;
182
- const multiple = (_a = _options.multiple) != null ? _a : true;
183
- const preventDefaultForUnhandled = (_b = _options.preventDefaultForUnhandled) != null ? _b : false;
184
- const getFiles = (event) => {
185
- var _a2, _b2;
186
- const list = Array.from((_b2 = (_a2 = event.dataTransfer) == null ? void 0 : _a2.files) != null ? _b2 : []);
187
- return list.length === 0 ? null : multiple ? list : [list[0]];
188
- };
189
- const checkDataTypes = (types) => {
190
- const dataTypes = unref(_options.dataTypes);
191
- if (typeof dataTypes === "function") return dataTypes(types);
192
- if (!(dataTypes == null ? void 0 : dataTypes.length)) return true;
193
- if (types.length === 0) return false;
194
- return types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));
195
- };
196
- const checkValidity = (items) => {
197
- const dataTypesValid = checkDataTypes(Array.from(items != null ? items : []).map((item) => item.type));
198
- const multipleFilesValid = multiple || items.length <= 1;
199
- return dataTypesValid && multipleFilesValid;
200
- };
201
- const isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !("chrome" in window);
202
- const handleDragEvent = (event, eventType) => {
203
- var _a2, _b2, _c, _d, _e, _f;
204
- const dataTransferItemList = (_a2 = event.dataTransfer) == null ? void 0 : _a2.items;
205
- isValid = (_b2 = dataTransferItemList && checkValidity(dataTransferItemList)) != null ? _b2 : false;
206
- if (preventDefaultForUnhandled) event.preventDefault();
207
- if (!isSafari() && !isValid) {
208
- if (event.dataTransfer) event.dataTransfer.dropEffect = "none";
209
- return;
210
- }
211
- event.preventDefault();
212
- if (event.dataTransfer) event.dataTransfer.dropEffect = "copy";
213
- const currentFiles = getFiles(event);
214
- switch (eventType) {
215
- case "enter":
216
- counter += 1;
217
- isOverDropZone.value = true;
218
- (_c = _options.onEnter) == null || _c.call(_options, null, event);
219
- break;
220
- case "over":
221
- (_d = _options.onOver) == null || _d.call(_options, null, event);
222
- break;
223
- case "leave":
224
- counter -= 1;
225
- if (counter === 0) isOverDropZone.value = false;
226
- (_e = _options.onLeave) == null || _e.call(_options, null, event);
227
- break;
228
- case "drop":
229
- counter = 0;
230
- isOverDropZone.value = false;
231
- if (isValid) {
232
- files.value = currentFiles;
233
- (_f = _options.onDrop) == null || _f.call(_options, currentFiles, event);
234
- }
235
- break;
236
- }
237
- };
238
- useEventListener(target, "dragenter", (event) => handleDragEvent(event, "enter"));
239
- useEventListener(target, "dragover", (event) => handleDragEvent(event, "over"));
240
- useEventListener(target, "dragleave", (event) => handleDragEvent(event, "leave"));
241
- useEventListener(target, "drop", (event) => handleDragEvent(event, "drop"));
242
- }
243
- return {
244
- files,
245
- isOverDropZone
246
- };
247
- }
248
- Number.POSITIVE_INFINITY;
249
- /* @__NO_SIDE_EFFECTS__ */
250
- function useVModel(props, key, emit, options = {}) {
251
- var _a, _b, _c;
252
- const { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;
253
- const vm = getCurrentInstance();
254
- const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
255
- let event = eventName;
256
- if (!key) key = "modelValue";
257
- event = event || `update:${key.toString()}`;
258
- const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
259
- const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
260
- const triggerEmit = (value) => {
261
- if (shouldEmit) {
262
- if (shouldEmit(value)) _emit(event, value);
263
- } else _emit(event, value);
264
- };
265
- if (passive) {
266
- const proxy = ref(getValue());
267
- let isUpdating = false;
268
- watch(() => props[key], (v) => {
269
- if (!isUpdating) {
270
- isUpdating = true;
271
- proxy.value = cloneFn(v);
272
- nextTick(() => isUpdating = false);
273
- }
274
- });
275
- watch(proxy, (v) => {
276
- if (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);
277
- }, { deep });
278
- return proxy;
279
- } else return computed({
280
- get() {
281
- return getValue();
282
- },
283
- set(value) {
284
- triggerEmit(value);
285
- }
286
- });
287
- }
288
- //#endregion
289
- export { useVModel as a, useMediaQuery as i, useDropZone as n, reactiveOmit as o, useEventListener as r, defaultDocument as t };