fancy-ui-vue 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/PORTING.md +123 -2
  2. package/README.md +20 -15
  3. package/dist/components/accordion/Accordion.vue.d.ts +44 -0
  4. package/dist/components/accordion/Accordion.vue.js +88 -0
  5. package/dist/components/accordion/Accordion.vue2.js +4 -0
  6. package/dist/components/accordion/AccordionContent.vue.d.ts +25 -0
  7. package/dist/components/accordion/AccordionContent.vue.js +42 -0
  8. package/dist/components/accordion/AccordionContent.vue2.js +4 -0
  9. package/dist/components/accordion/AccordionItem.vue.d.ts +21 -0
  10. package/dist/components/accordion/AccordionItem.vue.js +66 -0
  11. package/dist/components/accordion/AccordionItem.vue2.js +4 -0
  12. package/dist/components/accordion/AccordionTrigger.vue.d.ts +24 -0
  13. package/dist/components/accordion/AccordionTrigger.vue.js +83 -0
  14. package/dist/components/accordion/AccordionTrigger.vue2.js +4 -0
  15. package/dist/components/accordion/accordion-core.d.ts +35 -0
  16. package/dist/components/accordion/accordion-core.js +44 -0
  17. package/dist/components/accordion/index.d.ts +11 -0
  18. package/dist/components/accordion/types.d.ts +45 -0
  19. package/dist/components/accordion/types.js +7 -0
  20. package/dist/components/alert-dialog/AlertDialog.vue.js +22 -3
  21. package/dist/components/animated-testimonials/AnimatedTestimonials.vue.js +3 -3
  22. package/dist/components/apple-card-carousel/AppleCard.vue.js +1 -1
  23. package/dist/components/autocomplete/Autocomplete.vue.js +1 -1
  24. package/dist/components/autocomplete/Autocomplete.vue2.js +22 -15
  25. package/dist/components/avatar/Avatar.vue.d.ts +27 -0
  26. package/dist/components/avatar/Avatar.vue.js +119 -0
  27. package/dist/components/avatar/Avatar.vue2.js +4 -0
  28. package/dist/components/avatar/avatar-core.d.ts +40 -0
  29. package/dist/components/avatar/avatar-core.js +57 -0
  30. package/dist/components/avatar/index.d.ts +2 -0
  31. package/dist/components/badge/Badge.vue.d.ts +21 -0
  32. package/dist/components/badge/Badge.vue.js +46 -0
  33. package/dist/components/badge/Badge.vue2.js +4 -0
  34. package/dist/components/badge/index.d.ts +2 -0
  35. package/dist/components/bento-grid/BentoFrame.vue.js +1 -1
  36. package/dist/components/bento-grid/BentoFrame.vue2.js +6 -5
  37. package/dist/components/bento-grid/BentoGrid.vue.js +1 -1
  38. package/dist/components/bento-grid/BentoGrid.vue2.js +12 -12
  39. package/dist/components/bento-grid/BentoGridCard.vue.js +6 -5
  40. package/dist/components/bento-grid/BentoGridItem.vue.js +6 -5
  41. package/dist/components/bg-falling-stars/FallingStarsBg.vue.d.ts +1 -1
  42. package/dist/components/bg-falling-stars/FallingStarsBg.vue.js +1 -1
  43. package/dist/components/bg-falling-stars/bg-falling-stars-core.d.ts +1 -1
  44. package/dist/components/bg-falling-stars/bg-falling-stars-core.js +47 -12
  45. package/dist/components/book/Book.vue.js +8 -9
  46. package/dist/components/book/BookDescription.vue.js +6 -5
  47. package/dist/components/book/BookHeader.vue.js +6 -5
  48. package/dist/components/book/BookTitle.vue.js +6 -5
  49. package/dist/components/box-reveal/BoxReveal.vue.js +6 -5
  50. package/dist/components/button/Button.vue.d.ts +6 -4
  51. package/dist/components/button/Button.vue.js +1 -1
  52. package/dist/components/button/Button.vue2.js +50 -22
  53. package/dist/components/card-3d/CardContainer.vue.js +1 -1
  54. package/dist/components/card-3d/CardItem.vue.js +1 -1
  55. package/dist/components/card-spotlight/CardSpotlight.vue.js +1 -1
  56. package/dist/components/chat-message/ChatMessageAction.vue.d.ts +4 -2
  57. package/dist/components/chat-message/ChatMessageAction.vue.js +4 -2
  58. package/dist/components/checkbox/Checkbox.vue.d.ts +2 -0
  59. package/dist/components/checkbox/Checkbox.vue.js +1 -1
  60. package/dist/components/checkbox/Checkbox.vue2.js +17 -7
  61. package/dist/components/collapsible/Collapsible.vue.d.ts +31 -0
  62. package/dist/components/collapsible/Collapsible.vue.js +60 -0
  63. package/dist/components/collapsible/Collapsible.vue2.js +4 -0
  64. package/dist/components/collapsible/CollapsibleContent.vue.d.ts +26 -0
  65. package/dist/components/collapsible/CollapsibleContent.vue.js +81 -0
  66. package/dist/components/collapsible/CollapsibleContent.vue2.js +4 -0
  67. package/dist/components/collapsible/CollapsibleTrigger.vue.d.ts +21 -0
  68. package/dist/components/collapsible/CollapsibleTrigger.vue.js +57 -0
  69. package/dist/components/collapsible/CollapsibleTrigger.vue2.js +4 -0
  70. package/dist/components/collapsible/collapsible-core.d.ts +47 -0
  71. package/dist/components/collapsible/collapsible-core.js +40 -0
  72. package/dist/components/collapsible/index.d.ts +8 -0
  73. package/dist/components/collapsible/types.d.ts +24 -0
  74. package/dist/components/collapsible/types.js +5 -0
  75. package/dist/components/combobox/Combobox.vue.js +1 -1
  76. package/dist/components/combobox/Combobox.vue2.js +24 -16
  77. package/dist/components/command-menu/CommandMenu.vue.d.ts +5 -0
  78. package/dist/components/command-menu/CommandMenu.vue.js +1 -1
  79. package/dist/components/command-menu/CommandMenu.vue2.js +5 -2
  80. package/dist/components/compare/Compare.vue.d.ts +15 -5
  81. package/dist/components/compare/Compare.vue.js +1 -1
  82. package/dist/components/compare/Compare.vue2.js +28 -13
  83. package/dist/components/composer/ComposerInput.vue.js +1 -1
  84. package/dist/components/composer/ComposerInput.vue2.js +11 -11
  85. package/dist/components/composer/ComposerModelPicker.vue.d.ts +4 -0
  86. package/dist/components/composer/ComposerModelPicker.vue.js +1 -1
  87. package/dist/components/composer/ComposerModelPicker.vue2.js +29 -15
  88. package/dist/components/composer/ComposerSubmit.vue.d.ts +2 -0
  89. package/dist/components/composer/ComposerSubmit.vue.js +16 -15
  90. package/dist/components/confetti/ConfettiButton.vue.d.ts +9 -2
  91. package/dist/components/confetti/ConfettiButton.vue.js +24 -6
  92. package/dist/components/container-text-flip/ContainerTextFlip.vue.js +1 -1
  93. package/dist/components/container-text-flip/ContainerTextFlip.vue2.js +12 -13
  94. package/dist/components/copy-button/CopyButton.vue.d.ts +5 -0
  95. package/dist/components/copy-button/CopyButton.vue.js +1 -1
  96. package/dist/components/copy-button/CopyButton.vue2.js +72 -11
  97. package/dist/components/datamosh-transition/DatamoshTransition.vue.d.ts +6 -2
  98. package/dist/components/datamosh-transition/DatamoshTransition.vue.js +7 -4
  99. package/dist/components/date-picker/DatePicker.vue.js +1 -1
  100. package/dist/components/date-picker/DatePicker.vue2.js +27 -21
  101. package/dist/components/dialog/Dialog.vue.js +20 -1
  102. package/dist/components/dialog/DialogSurface.vue.js +1 -1
  103. package/dist/components/dialog/DialogSurface.vue2.js +5 -2
  104. package/dist/components/dialog/types.d.ts +2 -0
  105. package/dist/components/direction-aware-hover/DirectionAwareHover.vue.js +1 -1
  106. package/dist/components/direction-aware-hover/DirectionAwareHover.vue2.js +9 -7
  107. package/dist/components/displacement-text/DisplacementText.vue.d.ts +4 -1
  108. package/dist/components/displacement-text/DisplacementText.vue.js +38 -11
  109. package/dist/components/displacement-text/displacement-text-core.d.ts +94 -4
  110. package/dist/components/displacement-text/displacement-text-core.js +287 -97
  111. package/dist/components/drawer/Drawer.vue.d.ts +5 -0
  112. package/dist/components/drawer/Drawer.vue.js +1 -1
  113. package/dist/components/drawer/Drawer.vue2.js +5 -2
  114. package/dist/components/dropdown-menu/DropdownMenuContent.vue.js +2 -1
  115. package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts +4 -0
  116. package/dist/components/dropdown-menu/DropdownMenuItem.vue.js +17 -10
  117. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +8 -0
  118. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.js +28 -13
  119. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +4 -0
  120. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.js +1 -1
  121. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue2.js +20 -10
  122. package/dist/components/editorial-engine/EditorialEngine.vue.js +1 -1
  123. package/dist/components/editorial-engine/engine.js +13 -0
  124. package/dist/components/file-upload/FileUpload.vue.d.ts +2 -0
  125. package/dist/components/file-upload/FileUpload.vue.js +1 -1
  126. package/dist/components/file-upload/FileUpload.vue2.js +20 -10
  127. package/dist/components/fireworks-hdr/FireworksHdr.vue.js +2 -2
  128. package/dist/components/flickering-grid/FlickeringGrid.vue.d.ts +1 -1
  129. package/dist/components/flickering-grid/FlickeringGrid.vue.js +1 -1
  130. package/dist/components/flickering-grid/flickering-grid-core.d.ts +1 -1
  131. package/dist/components/flickering-grid/flickering-grid-core.js +51 -9
  132. package/dist/components/flip-card/FlipCard.vue.d.ts +3 -1
  133. package/dist/components/flip-card/FlipCard.vue.js +1 -1
  134. package/dist/components/flip-card/FlipCard.vue2.js +5 -3
  135. package/dist/components/fluid-cursor/FluidCursor.vue.js +37 -9
  136. package/dist/components/fluid-cursor/fluid-cursor-core.js +3 -3
  137. package/dist/components/fluid-cursor/webgpu-engine.js +3 -3
  138. package/dist/components/focus/Focus.vue.js +1 -1
  139. package/dist/components/focus/Focus.vue2.js +2 -2
  140. package/dist/components/follow-button/FollowButton.vue.d.ts +69 -0
  141. package/dist/components/follow-button/FollowButton.vue.js +7 -0
  142. package/dist/components/follow-button/FollowButton.vue2.js +239 -0
  143. package/dist/components/follow-button/follow-core.d.ts +83 -0
  144. package/dist/components/follow-button/follow-core.js +92 -0
  145. package/dist/components/follow-button/index.d.ts +2 -0
  146. package/dist/components/frosted-glass/FrostedGlass.vue.js +1 -1
  147. package/dist/components/glare-card/GlareCard.vue.js +1 -1
  148. package/dist/components/glare-card/GlareCard.vue2.js +4 -4
  149. package/dist/components/glowing-effect/GlowingEffect.vue.js +3 -3
  150. package/dist/components/glowing-effect/glowing-effect-core.js +4 -1
  151. package/dist/components/gradient-button/GradientButton.vue.d.ts +6 -4
  152. package/dist/components/gradient-button/GradientButton.vue.js +1 -1
  153. package/dist/components/gradient-button/GradientButton.vue2.js +13 -3
  154. package/dist/components/icon-button/IconButton.vue.d.ts +6 -4
  155. package/dist/components/icon-button/IconButton.vue.js +11 -8
  156. package/dist/components/image-trail-cursor/ImageTrailCursor.vue.js +17 -7
  157. package/dist/components/image-trail-cursor/trail-variants.js +3 -6
  158. package/dist/components/inline-citation/InlineCitation.vue.js +1 -1
  159. package/dist/components/inline-citation/InlineCitation.vue2.js +20 -14
  160. package/dist/components/input/Input.vue.js +1 -1
  161. package/dist/components/input/Input.vue2.js +18 -8
  162. package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue.js +1 -1
  163. package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue2.js +1 -1
  164. package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.d.ts +6 -3
  165. package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.js +1 -1
  166. package/dist/components/interactive-hover-button/InteractiveHoverButton.vue2.js +12 -2
  167. package/dist/components/letter-pullup/LetterPullup.vue.js +4 -4
  168. package/dist/components/line-hover-link/LineHoverLink.vue.js +1 -1
  169. package/dist/components/line-hover-link/LineHoverLink.vue2.js +5 -6
  170. package/dist/components/link/Link.vue.d.ts +4 -2
  171. package/dist/components/link/Link.vue.js +1 -1
  172. package/dist/components/link/Link.vue2.js +11 -8
  173. package/dist/components/magnetic-field/MagnetPuck.vue.d.ts +51 -0
  174. package/dist/components/magnetic-field/MagnetPuck.vue.js +7 -0
  175. package/dist/components/magnetic-field/MagnetPuck.vue2.js +191 -0
  176. package/dist/components/magnetic-field/MagneticField.vue.d.ts +39 -0
  177. package/dist/components/magnetic-field/MagneticField.vue.js +7 -0
  178. package/dist/components/magnetic-field/MagneticField.vue2.js +157 -0
  179. package/dist/components/magnetic-field/MagneticItem.vue.d.ts +28 -0
  180. package/dist/components/magnetic-field/MagneticItem.vue.js +7 -0
  181. package/dist/components/magnetic-field/MagneticItem.vue2.js +72 -0
  182. package/dist/components/magnetic-field/index.d.ts +10 -0
  183. package/dist/components/magnetic-field/magnetic-field-core.d.ts +163 -0
  184. package/dist/components/magnetic-field/magnetic-field-core.js +534 -0
  185. package/dist/components/magnetic-field/magnetic-field-source.d.ts +58 -0
  186. package/dist/components/magnetic-field/magnetic-field-source.js +58 -0
  187. package/dist/components/magnetic-field/types.d.ts +14 -0
  188. package/dist/components/magnetic-field/types.js +5 -0
  189. package/dist/components/mosaic-glow/MosaicGlow.vue.d.ts +6 -0
  190. package/dist/components/mosaic-glow/MosaicGlow.vue.js +53 -9
  191. package/dist/components/mosaic-glow/mosaic-glow-core.d.ts +30 -0
  192. package/dist/components/mosaic-glow/mosaic-glow-core.js +27 -0
  193. package/dist/components/mosaic-glow/mosaic-glow-hdr.d.ts +24 -0
  194. package/dist/components/mosaic-glow/mosaic-glow-hdr.js +200 -0
  195. package/dist/components/navbar/NavbarLink.vue.d.ts +4 -2
  196. package/dist/components/navbar/NavbarLink.vue.js +1 -1
  197. package/dist/components/navbar/NavbarLink.vue2.js +16 -13
  198. package/dist/components/navigation-menu/NavigationMenu.vue.js +6 -3
  199. package/dist/components/navigation-menu/NavigationMenuLink.vue.js +1 -1
  200. package/dist/components/navigation-menu/NavigationMenuLink.vue2.js +8 -8
  201. package/dist/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +15 -0
  202. package/dist/components/navigation-menu/NavigationMenuTrigger.vue.js +1 -1
  203. package/dist/components/navigation-menu/NavigationMenuTrigger.vue2.js +36 -15
  204. package/dist/components/neon-border/NeonBorder.vue.js +1 -1
  205. package/dist/components/neon-border/NeonBorder.vue2.js +10 -11
  206. package/dist/components/number-input/NumberInput.vue.js +1 -1
  207. package/dist/components/number-input/NumberInput.vue2.js +22 -12
  208. package/dist/components/password-input/PasswordInput.vue.js +1 -1
  209. package/dist/components/password-input/PasswordInput.vue2.js +18 -11
  210. package/dist/components/pixel-loader/PixelLoader.vue.js +1 -1
  211. package/dist/components/pixel-loader/PixelLoader.vue2.js +6 -6
  212. package/dist/components/pixel-scene/PixelScene.vue.d.ts +60 -0
  213. package/dist/components/pixel-scene/PixelScene.vue.js +184 -0
  214. package/dist/components/pixel-scene/PixelScene.vue2.js +4 -0
  215. package/dist/components/pixel-scene/index.d.ts +4 -0
  216. package/dist/components/pixel-scene/pixel-scene-core.d.ts +256 -0
  217. package/dist/components/pixel-scene/pixel-scene-core.js +878 -0
  218. package/dist/components/pixel-scene/pixel-scene-hdr.d.ts +68 -0
  219. package/dist/components/pixel-scene/pixel-scene-hdr.js +312 -0
  220. package/dist/components/pixel-scene/pixel-scene-scenes.d.ts +31 -0
  221. package/dist/components/pixel-scene/pixel-scene-scenes.js +1074 -0
  222. package/dist/components/popover/Popover.vue.d.ts +4 -0
  223. package/dist/components/popover/Popover.vue.js +1 -1
  224. package/dist/components/popover/Popover.vue2.js +8 -6
  225. package/dist/components/popover/PopoverContent.vue.js +6 -2
  226. package/dist/components/pulse-beam/PulseBeam.vue.d.ts +6 -2
  227. package/dist/components/pulse-beam/PulseBeam.vue.js +1 -1
  228. package/dist/components/pulse-beam/PulseBeam.vue2.js +7 -4
  229. package/dist/components/radio-group/RadioGroup.vue.js +12 -11
  230. package/dist/components/radio-group/RadioGroupItem.vue.d.ts +2 -0
  231. package/dist/components/radio-group/RadioGroupItem.vue.js +1 -1
  232. package/dist/components/radio-group/RadioGroupItem.vue2.js +20 -7
  233. package/dist/components/rainbow-button/RainbowButton.vue.d.ts +11 -2
  234. package/dist/components/rainbow-button/RainbowButton.vue.js +1 -1
  235. package/dist/components/rainbow-button/RainbowButton.vue2.js +35 -18
  236. package/dist/components/ripple-button/RippleButton.vue.d.ts +6 -4
  237. package/dist/components/ripple-button/RippleButton.vue.js +1 -1
  238. package/dist/components/ripple-button/RippleButton.vue2.js +10 -5
  239. package/dist/components/search-input/SearchInput.vue.js +1 -1
  240. package/dist/components/search-input/SearchInput.vue2.js +19 -9
  241. package/dist/components/select/Select.vue.d.ts +1 -1
  242. package/dist/components/select/Select.vue.js +1 -1
  243. package/dist/components/select/Select.vue2.js +25 -17
  244. package/dist/components/sheet/Sheet.vue.d.ts +5 -0
  245. package/dist/components/sheet/Sheet.vue.js +5 -2
  246. package/dist/components/shimmer-button/ShimmerButton.vue.d.ts +2 -2
  247. package/dist/components/shimmer-button/ShimmerButton.vue.js +1 -1
  248. package/dist/components/shimmer-button/ShimmerButton.vue2.js +14 -6
  249. package/dist/components/sidebar/SidebarItem.vue.d.ts +4 -2
  250. package/dist/components/sidebar/SidebarItem.vue.js +1 -1
  251. package/dist/components/sidebar/SidebarItem.vue2.js +4 -2
  252. package/dist/components/slider/Slider.vue.d.ts +4 -0
  253. package/dist/components/slider/Slider.vue.js +1 -1
  254. package/dist/components/slider/Slider.vue2.js +20 -8
  255. package/dist/components/sources/SourcesTrigger.vue.js +1 -1
  256. package/dist/components/sources/SourcesTrigger.vue2.js +11 -11
  257. package/dist/components/sparkles/sparkles-core.d.ts +1 -1
  258. package/dist/components/sparkles/sparkles-core.js +36 -2
  259. package/dist/components/story-thread/StoryNode.vue.d.ts +11 -0
  260. package/dist/components/story-thread/StoryNode.vue.js +7 -0
  261. package/dist/components/story-thread/StoryNode.vue2.js +23 -0
  262. package/dist/components/story-thread/StoryThread.vue.d.ts +56 -0
  263. package/dist/components/story-thread/StoryThread.vue.js +7 -0
  264. package/dist/components/story-thread/StoryThread.vue2.js +103 -0
  265. package/dist/components/story-thread/index.d.ts +5 -0
  266. package/dist/components/story-thread/story-thread-core.d.ts +119 -0
  267. package/dist/components/story-thread/story-thread-core.js +491 -0
  268. package/dist/components/story-thread/types.d.ts +1 -0
  269. package/dist/components/sun-switch/SunSwitch.vue.d.ts +61 -0
  270. package/dist/components/sun-switch/SunSwitch.vue.js +7 -0
  271. package/dist/components/sun-switch/SunSwitch.vue2.js +559 -0
  272. package/dist/components/sun-switch/index.d.ts +4 -0
  273. package/dist/components/sun-switch/pixel-wave-core.d.ts +82 -0
  274. package/dist/components/sun-switch/pixel-wave-core.js +508 -0
  275. package/dist/components/sun-switch/sun-switch-core.d.ts +251 -0
  276. package/dist/components/sun-switch/sun-switch-core.js +546 -0
  277. package/dist/components/sun-switch/sun-switch-hdr.d.ts +70 -0
  278. package/dist/components/sun-switch/sun-switch-hdr.js +311 -0
  279. package/dist/components/switch/Switch.vue.d.ts +2 -0
  280. package/dist/components/switch/Switch.vue.js +1 -1
  281. package/dist/components/switch/Switch.vue2.js +16 -6
  282. package/dist/components/tabs/TabsTrigger.vue.d.ts +6 -0
  283. package/dist/components/tabs/TabsTrigger.vue.js +1 -1
  284. package/dist/components/tabs/TabsTrigger.vue2.js +28 -15
  285. package/dist/components/terminal-block/TerminalBlock.vue.js +1 -1
  286. package/dist/components/terminal-block/TerminalBlock.vue2.js +10 -9
  287. package/dist/components/text-reveal-card/TextRevealCard.vue.js +1 -2
  288. package/dist/components/textarea/Textarea.vue.js +1 -1
  289. package/dist/components/textarea/Textarea.vue2.js +19 -12
  290. package/dist/components/tick-nav/TickNav.vue.d.ts +71 -0
  291. package/dist/components/tick-nav/TickNav.vue.js +7 -0
  292. package/dist/components/tick-nav/TickNav.vue2.js +285 -0
  293. package/dist/components/tick-nav/index.d.ts +3 -0
  294. package/dist/components/tick-nav/tick-nav-core.d.ts +102 -0
  295. package/dist/components/tick-nav/tick-nav-core.js +398 -0
  296. package/dist/components/tick-nav/tick-nav-hdr.d.ts +60 -0
  297. package/dist/components/tick-nav/tick-nav-hdr.js +284 -0
  298. package/dist/components/tick-nav/types.d.ts +13 -0
  299. package/dist/components/time-picker/TimePicker.vue.js +1 -1
  300. package/dist/components/time-picker/TimePicker.vue2.js +25 -17
  301. package/dist/components/toast/Toast.vue.js +1 -1
  302. package/dist/components/toast/Toast.vue2.js +16 -4
  303. package/dist/components/toast/index.d.ts +1 -1
  304. package/dist/components/toast/store.d.ts +23 -0
  305. package/dist/components/toast/store.js +35 -7
  306. package/dist/components/toggle/Toggle.vue.d.ts +12 -0
  307. package/dist/components/toggle/Toggle.vue.js +1 -1
  308. package/dist/components/toggle/Toggle.vue2.js +27 -11
  309. package/dist/components/toggle-group/ToggleGroup.vue.d.ts +11 -0
  310. package/dist/components/toggle-group/ToggleGroup.vue.js +1 -1
  311. package/dist/components/toggle-group/ToggleGroup.vue2.js +16 -3
  312. package/dist/components/toggle-group/ToggleGroupItem.vue.d.ts +6 -0
  313. package/dist/components/toggle-group/ToggleGroupItem.vue.js +1 -1
  314. package/dist/components/toggle-group/ToggleGroupItem.vue2.js +27 -14
  315. package/dist/components/tooltip/Tooltip.vue.js +13 -0
  316. package/dist/components/tracing-beam/TracingBeam.vue.d.ts +20 -1
  317. package/dist/components/tracing-beam/TracingBeam.vue.js +5 -164
  318. package/dist/components/tracing-beam/TracingBeam.vue2.js +168 -1
  319. package/dist/components/typing-indicator/TypingIndicator.vue.js +1 -1
  320. package/dist/components/typing-indicator/TypingIndicator.vue2.js +7 -6
  321. package/dist/index.d.ts +10 -0
  322. package/dist/index.js +466 -413
  323. package/dist/internals/anchor-position.js +3 -0
  324. package/dist/internals/call-listener.d.ts +11 -0
  325. package/dist/internals/call-listener.js +31 -0
  326. package/dist/internals/dismissable.d.ts +17 -0
  327. package/dist/internals/dismissable.js +44 -1
  328. package/dist/internals/env.d.ts +1 -0
  329. package/dist/internals/env.js +11 -0
  330. package/dist/internals/focus-trap.js +29 -4
  331. package/dist/internals/merge-ids.d.ts +6 -0
  332. package/dist/internals/merge-ids.js +11 -0
  333. package/dist/internals/motion/presence-core.d.ts +1 -1
  334. package/dist/sound/engine.js +23 -9
  335. package/dist/sound/themes.d.ts +4 -3
  336. package/dist/sound/themes.js +49 -211
  337. package/dist/sound/types.d.ts +9 -1
  338. package/dist/sound/types.js +2 -2
  339. package/dist/styles.css +1473 -571
  340. package/package.json +2 -2
  341. package/tailwind.css +9 -9
package/PORTING.md CHANGED
@@ -51,7 +51,8 @@ reduced-motion gate, visibility gating and sound hooks — nothing else.
51
51
  argument order and literals.
52
52
  - **`defineOptions({ name: '<Name>', inheritAttrs: false })` on every SFC**; the
53
53
  name is read by a dist gate, closed attrs match Svelte. `v-bind="attrs"` goes
54
- **only** on the element Svelte spreads `{...restProps}` onto.
54
+ **only** on the element Svelte spreads `{...restProps}` onto (see "Native
55
+ attributes" below).
55
56
  - **`defineExpose({ ref })` exactly where Svelte has `ref = $bindable(null)`**,
56
57
  on the same node, exposing nothing else; no Svelte ref, no Vue ref. `ref` is a
57
58
  reserved vnode key: neither prop nor model, absent from `<Name>Props`.
@@ -72,6 +73,53 @@ reduced-motion gate, visibility gating and sound hooks — nothing else.
72
73
  deterministic PRNG, with the React package's defaults. Media queries and the
73
74
  sound store hydrate in `onMounted`; production hydration does not patch
74
75
  attribute mismatches, so a wrong value stays wrong on screen.
76
+ - **`forceMount` on `CollapsibleContent` / `AccordionContent` defaults to
77
+ `true`** (closed content stays in the DOM, `inert` and hidden, rendered on the
78
+ server; `forceMount={false}` unmounts it once the collapse has finished). It
79
+ is the inverse of `TabsContent` and of common expectations: stable
80
+ `aria-controls` targets, SSR, no height measurement. State the default and
81
+ the reason in the prop's JSDoc, and keep the same default in all three
82
+ packages.
83
+
84
+ ## Native attributes
85
+
86
+ Components that render a native element let consumers pass what they would put
87
+ on it: `id`, `name`, `aria-*`, `data-*`, `autocomplete`, `@blur`, `@keydown`.
88
+ Svelte is the reference: open it there, then spread at the same position here.
89
+
90
+ - **Target.** `v-bind="attrs"` goes on the primary native element: the
91
+ `<button>` / `<a>` of a button, the `<input>` / `<textarea>` of a field, the
92
+ focusable trigger of a choice control. `class` keeps its current target.
93
+ - **Order.** Bind `attrs` first, then everything the component needs for
94
+ correctness (`role`, computed `aria-*`, inert `tabindex`, fixed `type`, id
95
+ links, controlled `value`), so consumers can add but not break. Where a
96
+ consumer value is legitimate and unmanaged, fall back to it
97
+ (`:tabindex="inert ? -1 : attrs.tabindex"`); never overwrite it with
98
+ `undefined`, which Vue treats as a value.
99
+ - **Handlers.** A listener the component does not handle just rides in `attrs`.
100
+ One it handles itself is written `@event` BEFORE `v-bind="attrs"`, so Vue
101
+ merges both, internal first. Only when a guard must block the consumer
102
+ (disabled, loading) declare a camelCase prop (`onClick`) and call it through
103
+ `callListener` (`internals/call-listener.ts`), never a lowercase prop. Modified
104
+ forms (`@click.once`, `.capture`) compile to `onClickOnce` and the like, which
105
+ bind past that guard, so drop every `onClick*` attr while the control is inert.
106
+ - **Order, in practice.** Write `@event` before `v-bind="attrs"`, and the
107
+ managed bindings after it. Where a managed binding has a legitimate consumer
108
+ value, fall back per key (`:tabindex="inert ? -1 : attrs.tabindex"`,
109
+ `$attrs['aria-label']`), never by overwriting with `undefined`.
110
+ - **Reading `attrs`.** Never wrap `useAttrs()` in `computed` or `watch`: the
111
+ proxy has no `ownKeys` trap, so a derived value goes stale. Read it inside
112
+ the template or in a plain function called from it.
113
+ - **Pickers.** Select, Combobox, Autocomplete, DatePicker and TimePicker bind
114
+ the result of a function that merges the component's invariants after
115
+ `attrs`; their listeners are written before it.
116
+ - **Descriptions.** A consumer `aria-describedby` is merged (space-joined) with
117
+ the component's own description or error id, not replaced.
118
+ - **Types.** Props stay own-only; native attributes are untyped, as above.
119
+ - **Tests.** Per component, with the consumer form `attrs: { ... }`: `id`,
120
+ `aria-describedby` and `data-testid` reach the element, an unhandled listener
121
+ fires once, a handled one fires once after the internal logic, and invariants
122
+ survive a consumer override.
75
123
 
76
124
  ## Rune → Composition API
77
125
 
@@ -147,12 +195,64 @@ hydration and media-query `start()` in `onMounted`.
147
195
  stock Tailwind either, but unlike rule 4's per-component utilities they are a
148
196
  shared vocabulary — redeclaring them per component would fight itself. The
149
197
  package stylesheet maps them with `@theme inline` and ships defaults in
150
- `@layer base`. A new semantic name in a ported component is added there too.
198
+ `@layer base`. A new semantic name in a ported component is added to all
199
+ three entries (see [What a consumer imports](#what-a-consumer-imports)).
151
200
 
152
201
  The shared stylesheets that are not SFC-scoped (markdown, stream-text, sound
153
202
  toggle, cameleon, the skin sheets) stay plain `import "./x.css"` from their
154
203
  `.ts` module, anchored on a root class.
155
204
 
205
+ ## What a consumer imports
206
+
207
+ The distribution contract. It is the same for the three packages, so a porter
208
+ who adds a file, a stylesheet or a module-scope statement knows which promise
209
+ it touches. `pnpm check:dist-env` (after the builds), `pnpm check:tailwind` and
210
+ publint enforce the mechanical half.
211
+
212
+ | Specifier | Svelte | React | Vue |
213
+ | -------------------- | ----------------------------------------------------------------------------------------- | -------------- | -------------- |
214
+ | `<pkg>` | every component, hook, `sound`, `toast` | same | same |
215
+ | `<pkg>/cameleon` | `FancyProvider`, primitives, skins; plus `cameleon/retro-kit` and a `cameleon/*` wildcard | barrel only | barrel only |
216
+ | `<pkg>/tailwind.css` | `@source` + dark variant + 18 tokens | same body | same body |
217
+ | `<pkg>/styles.css` | none: each component's styles compile with it | required, once | required, once |
218
+ | `<pkg>/package.json` | yes | yes | yes |
219
+
220
+ - **CSS entry.** `tailwind.css` is the only file a consumer's Tailwind reads.
221
+ Below their `@source` lines the three entries are one body, byte for byte
222
+ (`pnpm check:tailwind` fails on drift), so a token, a variant or a comment
223
+ changes in all three in the same commit. No comment in a shipped file names a
224
+ third-party product: describe the behaviour instead.
225
+ - **`styles.css`.** Vue component CSS is aggregated into `dist/styles.css` at
226
+ build time; no shipped JavaScript module imports CSS, which is why
227
+ `sideEffects` lists `**/*.css` and nothing else. Keep it that way: a CSS
228
+ import inside a component module would land in the consumer's graph twice.
229
+ - **Cameleon subpath.** `fancy-ui-vue/cameleon` is a barrel: engine, primitives
230
+ and the five skins. It must run in any Vue app, with or without a
231
+ meta-framework, so it imports nothing framework-private
232
+ (`pnpm check:dist-env` rejects `$app/*` and `$env/*` in the Svelte tarball,
233
+ where that bug happened once).
234
+ - **No environment reads.** No raw `import.meta.env` in shipped code: dev-only
235
+ branches read the literal `process.env.NODE_ENV` inside a `try`, as
236
+ `internals/env.ts` does.
237
+ - **SSR: nothing at module or setup time touches the browser.** Importing any
238
+ module, and running a component's `setup()`, must not read `window`,
239
+ `document`, `navigator`, `matchMedia` or storage, nor register a listener.
240
+ Browser work starts in `onMounted`. `scripts/smoke-dist.mjs` imports every
241
+ emitted module in a bare Node process and server-renders every export after
242
+ each build; `examples/nuxt-app` is generated in CI with `failOnError` on.
243
+ - **Import cost: the barrel is the API.** There are no per-component subpaths,
244
+ on purpose. Measured on 2026-10-21 against packed tarballs in a bare Vite
245
+ app, `import { Button } from "<pkg>"` and an import of the component's own
246
+ dist file emit the same JavaScript to within 0.1 kB gzip in all three
247
+ packages (Svelte 30.8 vs 30.7, React 82.1 vs 82.1, Vue 42.6 vs 42.6 kB gzip,
248
+ framework runtime included), and a WebGL component pulls `three` only when it
249
+ is imported. That holds only while component modules have no module-scope
250
+ side effects: a top-level registration, a global listener or a polyfill in
251
+ one component would be paid by every barrel import. The Svelte manifest also
252
+ lists `**/*.svelte` in `sideEffects`, so no bundler drops a used component's
253
+ style request; the same measurement with CSS alone listed gives identical
254
+ output, so that entry costs nothing.
255
+
156
256
  ## Tests
157
257
 
158
258
  Vitest + `@testing-library/vue`, jsdom, globals on. Tests are `.ts` importing
@@ -207,3 +307,24 @@ Run with `npx vitest run src/components/<slug>` from `vue/`.
207
307
  silently changing the API.
208
308
  - Before reporting done: the component appears in `vue/src/index.ts` and passes
209
309
  `npx vue-tsc --noEmit` plus its own vitest file.
310
+
311
+ ## Interaction contracts
312
+
313
+ The rules live in `src/lib/fancy-ui/_internals/CONTRACTS.md` (state ownership, async feedback,
314
+ live announcements, keyboard and touch, reduced motion, width stability). This is how each one
315
+ lands in Vue.
316
+
317
+ | Contract | Svelte | Vue |
318
+ | --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
319
+ | Consumer-ownable state | `value = $bindable(d)` + `onValueChange` | `defineModel<T>("value", { default: d })` → `v-model:value`, plus the `onValueChange` prop, called after the model write; a consumer that omits `v-model` gets the uncontrolled copy, so there is no `defaultValue` prop |
320
+ | Mount-only prop | `untrack(() => resetMs)` | read the destructured prop once in setup (`const resetWindow = resetMs`), never through `computed` or `watch` |
321
+ | Attempt ticket | plain `let attempt = 0` | plain `let attempt = 0` in setup; destructured props are live getters, so snapshot the value before the first `await` |
322
+ | Timer and instance teardown | `$effect` cleanup | `onScopeDispose` in composables (`vue/src/internals/use-copy.ts`), `onBeforeUnmount` in components, `onCleanup` in `watch` |
323
+ | Live region | `use:portal` | `<Portal>` from `vue/src/internals/Portal.vue` |
324
+ | Reduced motion in JS | `createReducedMotion()` / `prefersReducedMotion()` | `useReducedMotion()` from `vue/src/internals/motion/use-media-query.ts` (started in `onMounted`) / `prefersReducedMotion()` from `vue/src/internals/motion/anchored.ts` |
325
+ | Pending | `aria-busy`, guard in the handler | same: `:aria-busy`, guard in the `@click` handler, never `:disabled="pending"` |
326
+
327
+ The full triad is `vue/src/components/switch/Switch.vue` (`v-model:checked` + `onCheckedChange`);
328
+ `vue/src/components/copy-button/CopyButton.vue` shows the ticket and the value snapshot. CSS
329
+ gating (`no-preference`, `(hover: hover)`, grid-cell width reservation) moves verbatim into
330
+ `<style scoped>`.
package/README.md CHANGED
@@ -10,7 +10,7 @@ Animated UI components for **Vue 3.5+**, styled with Tailwind CSS v4 &mdash; the
10
10
  ![Vue](https://img.shields.io/badge/Vue-3.5+-42B883?logo=vuedotjs&logoColor=white)
11
11
  ![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-4-06B6D4?logo=tailwindcss&logoColor=white)
12
12
  ![TypeScript](https://img.shields.io/badge/TypeScript-5-3178C6?logo=typescript&logoColor=white)
13
- ![Components](https://img.shields.io/badge/Components-145-8B5CF6)
13
+ ![Components](https://img.shields.io/badge/Components-155-8B5CF6)
14
14
  ![MIT License](https://img.shields.io/badge/License-MIT-green)
15
15
 
16
16
  <p align="center">
@@ -40,10 +40,10 @@ Animated UI components for **Vue 3.5+**, styled with Tailwind CSS v4 &mdash; the
40
40
 
41
41
  ## Features
42
42
 
43
- - **145 components** &mdash; core primitives (forms, navigation, overlays) alongside buttons, text animations, backgrounds, cursors, AI/chat building blocks and a micro-interactions collection
43
+ - **155 components** &mdash; core primitives (forms, navigation, overlays) alongside buttons, text animations, backgrounds, cursors, AI/chat building blocks and a micro-interactions collection
44
44
  - **Motion that feels physical** &mdash; beams of light, liquid-metal and neon borders, a physical flip card, a before/after slider with a motion trail, a datamosh page transition; springs and WebGL where they earn their keep
45
45
  - **Idiomatic Vue 3.5** &mdash; `<script setup>` single-file components, reactive props destructuring, `defineModel` for every bindable (`v-model:<name>`), snippets as named and scoped slots, `defineExpose` wherever the Svelte source exposes a `ref`; every other prop keeps its Svelte name
46
- - **Same components, three frameworks** &mdash; All 145 components of `fancy-ui-svelte` are ported, under the same names and with the same visual contract; the [Svelte package](https://github.com/RamaHerbin/fancy-ui#readme) is the reference, [`fancy-ui-react`](https://github.com/RamaHerbin/fancy-ui/tree/main/react#readme) the React edition, and parity is checked in CI
46
+ - **Same components, three frameworks** &mdash; All 155 components of `fancy-ui-svelte` are ported, under the same names and with the same visual contract; the [Svelte package](https://github.com/RamaHerbin/fancy-ui#readme) is the reference, [`fancy-ui-react`](https://github.com/RamaHerbin/fancy-ui/tree/main/react#readme) the React edition, and parity is checked in CI
47
47
  - **Tailwind CSS v4** &mdash; one CSS import, semantic colour tokens, light and dark themes that follow the OS or a `.dark` class
48
48
  - **Accessible and SSR-safe** &mdash; keyboard support where it applies, `prefers-reduced-motion` respected, a `seed` prop wherever the source randomises in render so server and client agree, clean hydration under Nuxt, canvas and WebGL work deferred to mount
49
49
  - **Opt-in sound** &mdash; eleven synthesised interface cues, a `SoundToggle` switch and the `useSound` / `useSoundFeedback` composables; silent until the user turns it on
@@ -87,6 +87,8 @@ import { RainbowButton, BorderBeam } from "fancy-ui-vue";
87
87
 
88
88
  Props keep their Svelte names; snippets become named slots and every bindable prop is a `v-model:<name>`. Every deliberate difference is listed under [Divergences](#divergences-from-the-svelte-api).
89
89
 
90
+ Importing one component from the package root costs the same as importing its own file: the rest tree-shakes away, so there are no per-component subpaths. The four entry points are listed under [Package shape](#package-shape).
91
+
90
92
  **Or browse and copy a component:**
91
93
 
92
94
  1. Find the component you need in the [live demo](https://fancy-ui.rama.app)
@@ -151,6 +153,10 @@ Out of the box the package follows the operating-system preference: `dark:` util
151
153
 
152
154
  `tailwind.css` is what makes that work, in three parts: it declares the `.dark` token block, it declares a `dark` variant that matches a `.dark` ancestor OR the media query (unless a `.light` ancestor opts out), and it sets `color-scheme: light dark` on `:root` with `.dark` / `.light` overrides so the components' `light-dark()` colours &mdash; and the browser's own form controls, scrollbars and caret &mdash; resolve the same way. An app that declares its own `@custom-variant dark` after the import keeps its own definition.
153
155
 
156
+ ### Nuxt
157
+
158
+ The setup above works as-is in Nuxt (add `@tailwindcss/vite` to `vite.plugins`). A Nuxt module, [`fancy-ui-nuxt`](https://github.com/RamaHerbin/fancy-ui/tree/main/nuxt#readme), auto-imports every component as `<Fancy…>`, adds `styles.css` and auto-imports the sound composables; it lives in this repo and is not yet published to npm.
159
+
154
160
  ### Server rendering
155
161
 
156
162
  The package is written for SSR: the `examples/nuxt-app` consumer in this repo is generated in CI with `failOnError` on, so a component that breaks server rendering or hydration fails the build. Three rules follow from that and are worth knowing:
@@ -182,8 +188,8 @@ The docs site serves documentation built for coding agents, following the [llms.
182
188
 
183
189
  - [fancy-ui.rama.app/llms.txt](https://fancy-ui.rama.app/llms.txt) &mdash; setup guide, usage rules, a Vue section and an index of every component
184
190
  - [fancy-ui.rama.app/llms-full.txt](https://fancy-ui.rama.app/llms-full.txt) &mdash; full reference: import, props and a working example per component
185
- - `https://fancy-ui.rama.app/docs/components/<slug>.md` &mdash; one component as Markdown, with every docs example (e.g. [compare.md](https://fancy-ui.rama.app/docs/components/compare.md)); each docs page also has a **Copy as Markdown** button
186
- - [fancy-ui.rama.app/registry.json](https://fancy-ui.rama.app/registry.json) &mdash; every component as JSON: import names, props, snippets, links
191
+ - `https://fancy-ui.rama.app/docs/components/vue/<slug>.md` &mdash; one component as Markdown, written for Vue: the names the Vue port takes (models, listeners, slots), its props and its Vue example when there is one (e.g. [vue/compare.md](https://fancy-ui.rama.app/docs/components/vue/compare.md)); each docs page also has a **Copy as Markdown** button
192
+ - [fancy-ui.rama.app/registry.json](https://fancy-ui.rama.app/registry.json) &mdash; every component as JSON: for each framework (Svelte, React, Vue) the import names, Markdown page, copy-source item and availability, plus props, snippets and links
187
193
 
188
194
  To make your coding agent use fancy-ui correctly, add this to your project's `CLAUDE.md`, `AGENTS.md`, or `.cursorrules`:
189
195
 
@@ -280,10 +286,10 @@ Components are named by their exported Vue name.
280
286
  ### Package-level rules
281
287
 
282
288
  - **props**: `<Name>Props` hold the component's own props only, never a `ButtonHTMLAttributes`-style intersection or Svelte's `Omit<HTMLAttributes<…>, …>` fold-in, so native attributes are untyped. Every component sets `inheritAttrs: false` and writes `v-bind="attrs"` only where the Svelte source spreads `{...restProps}`, at the same position, so attributes the component sets after it (`data-state`, `data-position`, `data-panel-side`) still win.
283
- - Forward native attributes and listeners: DatamoshTransition, DimSiblings, GradientButton, InteractiveHoverButton, Magnetic (outer wrapper), MosaicGlow, Presence, Pressable, PulseBeam, Reveal, RippleButton, ScrollProgress, ShimmerButton, Skeleton, StatusMorph, StickyScroll, TextRoll. A consumer `style` merges with the component's own custom properties (`mergeProps`) instead of overwriting them the way a later `{...restProps}` would.
284
- - Every other component is closed, exactly as in Svelte: an `id`, `data-*`, `aria-*` or `@click` put on it is dropped silently (`<Dialog id="x" data-foo="bar">` renders neither), which differs from Vue's default fallthrough.
289
+ - These components forward native attributes and listeners (rules in [PORTING.md](https://github.com/RamaHerbin/fancy-ui/blob/main/vue/PORTING.md#native-attributes)): Autocomplete, BentoGrid, BentoGridCard, BentoGridItem, Book, BookDescription, BookHeader, BookTitle, BoxReveal, Button, Checkbox, Combobox, ComposerInput, ComposerModelPicker, ComposerSubmit, ConfettiButton, ContainerTextFlip, CopyButton, DatamoshTransition, DatePicker, DimSiblings, DropdownMenuItem, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, GradientButton, IconButton, InlineCitation, Input, InteractiveHoverButton, LetterPullup, LineHoverLink, Link, MagnetPuck, Magnetic (outer wrapper), MagneticField, MagneticItem (outer wrapper), MosaicGlow, NavbarLink, NavigationMenuLink, NavigationMenuTrigger, NeonBorder, NumberInput, PasswordInput, PixelLoader, Popover, Presence, Pressable, PulseBeam, RadioGroup, RadioGroupItem, RainbowButton, Reveal, RippleButton, ScrollProgress, SearchInput, Select, ShimmerButton, Skeleton, Slider, SourcesTrigger, StatusMorph, StickyScroll, Switch, TabsTrigger, TerminalBlock, Textarea, TextRoll, TimePicker, Toggle, ToggleGroupItem, TypingIndicator. Button, CopyButton and IconButton land them on the `<button>` (Button and IconButton on the `<a>` once `href` is set). Capture-phase listeners (`@click.capture`) are stripped while Button or IconButton is disabled or loading; the Svelte and React ports do not guard capture-phase listeners. Targets: Input, Textarea, PasswordInput, SearchInput and NumberInput → inner `<input>` / `<textarea>`; Link, LineHoverLink, NavbarLink, NavigationMenuLink and InlineCitation → their anchor (InlineCitation's marker is a `<button>` when unlinked), where the managed `aria-current`, `aria-disabled`, `tabindex`, `target`, `rel` and label win while they apply; Book, BookHeader, BookTitle and BookDescription → their own element; the other display components (BoxReveal, BentoGrid, BentoGridItem, BentoGridCard, ContainerTextFlip, LetterPullup, NeonBorder, PixelLoader, TerminalBlock, TypingIndicator) → their root, where managed `role`, `aria-live` and `data-state` win and a consumer `style` merges; Checkbox, Switch, Slider, RadioGroup, RadioGroupItem and FileUpload → their native input or group, where `@change` / `@input` are declared camelCase `onChange` (Slider also `onInput`); Select, Combobox, Autocomplete, DatePicker and TimePicker → trigger or input, with the component's invariants merged after the attributes. Triggers and items: DropdownMenuTrigger, DropdownMenuItem, DropdownMenuSubTrigger, TabsTrigger, NavigationMenuTrigger, SourcesTrigger, Toggle, ToggleGroupItem, Popover (trigger button; `class` and `ref` still target the panel) and ComposerSubmit and ComposerModelPicker → their button, ComposerInput → textarea; they declare camelCase `onClick`, `onKeydown`, `onFocus`, `onMouseenter` and `onMouseleave` (skipped while disabled), and managed `role`, `type`, `aria-expanded`, `aria-controls`, `aria-selected`, `aria-pressed` and roving `tabindex` win. A consumer `style` merges with the component's own custom properties (`mergeProps`) instead of overwriting them the way a later `{...restProps}` would.
290
+ - Every component not listed above is closed, exactly as in Svelte: an `id`, `data-*`, `aria-*` or `@click` put on it is dropped silently (`<Dialog id="x" data-foo="bar">` renders neither), which differs from Vue's default fallthrough.
285
291
  - **boolean props**: a DOM attribute the component reads is a declared Boolean prop rather than a value read off `$attrs`, so a bare `<RippleButton disabled>` is `true`, not the falsy string `""` that would let the sound cue play: `disabled` on GradientButton, InteractiveHoverButton, RippleButton, ShimmerButton. Vue's Boolean casting applies to every Boolean prop: `<ChatMessageAction active="">` is `true` where Svelte renders `aria-pressed=""` (`active` keeps three states through an explicit `undefined` default), and ReasoningPanel's bare `open` is `true`.
286
- - **class**: `class` is a declared prop typed `HTMLAttributes["class"]` (string, array or object) rather than `string`, merged once by `cn()` at the Svelte call site and argument position and never doubled through `$attrs`. Exceptions: ReviewCard (Marquee) and ConfettiButton declare no `class`, as in Svelte, so a `class` on them is dropped, and the renderless roots ContextMenu, DropdownMenu and DropdownMenuSub have none; LiquidGlass keeps `containerClass` a `string`; FrostedGlass's `class` still targets the content layer and `containerClass` the outer container.
292
+ - **class**: `class` is a declared prop typed `HTMLAttributes["class"]` (string, array or object) rather than `string`, merged once by `cn()` at the Svelte call site and argument position and never doubled through `$attrs`. Exceptions: ReviewCard (Marquee) declares no `class`, as in Svelte, so a `class` on it is dropped, and the renderless roots ContextMenu, DropdownMenu and DropdownMenuSub have none; LiquidGlass keeps `containerClass` a `string`; FrostedGlass's `class` still targets the content layer and `containerClass` the outer container.
287
293
  - **ref**: Svelte's `ref = $bindable(null)` becomes `defineExpose({ ref })` on the same node. `ref` is a reserved vnode key, so it is absent from every `<Name>Props` and there is no `bind:ref` or `v-model:ref`: put a template ref on the component and read `.ref` (`wrapper.vm.ref` in tests).
288
294
  - Nodes worth knowing: Button, CopyButton and IconButton expose whichever of `<a>` / `<button>` `href` selected (CopyButton and IconButton forward Button's own `ref`); Popover re-exposes `PopoverContent`'s panel; Select, DatePicker, TimePicker and Tooltip expose the trigger; Checkbox, Combobox, Autocomplete, NumberInput, Slider (`<input type="range">`) and RadioGroupItem the native `<input>`; Textarea the `<textarea>`; Magnetic its static outer wrapper; Toast `.ft-toast` and Toaster `.ft-toaster`; Composer's parts the form, the textarea and the menu div; NavigationMenu, NavigationMenuList, NavigationMenuTrigger and NavigationMenuContent (NavigationMenuItem and NavigationMenuLink expose none, as in Svelte).
289
295
  - `null` while nothing renders: Presence and ComposerCommandMenu while closed, Skeleton in standalone mode with `loading=false`.
@@ -299,7 +305,7 @@ Components are named by their exported Vue name.
299
305
  - `v-model:checked`: Checkbox, Switch; `v-model:phase`: DatamoshTransition (output-only, see below); `v-model:indeterminate`: Checkbox; `v-model:state`: ApprovalCard, RecommendationCard, StatusMorph; `v-model:pressed`: Toggle; `v-model:current`: Stepper; `v-model:page`: Pagination; `v-model:files`: FileUpload; `v-model:attachments`: Composer; `v-model:collapsed`: CodeDiff; `v-model:activeIndex`: StickyScroll; `v-model:activeId`: ThreadList; `v-model:active`: VoiceInput; `v-model:query`: CommandMenu.
300
306
  - Passing the value AND an `@update:<name>` listener hands ownership to the parent, where Svelte's bindable always writes locally. A listener that never writes the value back leaves Dialog open (`data-state` stays `open` after `onOpenChange(false)`), Pagination unmoved, and ApprovalCard and RecommendationCard pending with live buttons (a one-tick latch still resolves a decision exactly once, even for two clicks in one tick). The rendered state never disagrees with the model, though: after a press the parent declined, Switch and RadioGroup put their native controls back on the model in the next tick (so `aria-checked`, the visible track and the callbacks all describe the model), and VoiceInput's start guard follows the model rather than a latch of its own. A value passed with no listener still drives itself. Exception: NavigationMenu keeps an eager internal mirror of `value`, so it moves even when `update:value` is ignored.
301
307
  - **callbacks**: callback props stay props, called as `props.onX?.()` rather than emitted, so devtools shows no event pane for them. The compiler still turns a listener spelling into the prop: `@value-change`, `@open-change`, `@files-change`, `@stick-change`, `@toggle`, `@select`, `@enter-end` / `@exit-end` reach `onValueChange`, `onOpenChange`, `onCheckedChange` (Checkbox, Switch), `onCurrentChange` (Stepper), `onQueryChange` (CommandMenu), `onFilesChange` (FileUpload), `onStickChange` (ScrollAnchor), `onToggle` (ToolCall), `onSelect` (PromptSuggestions, called with `(suggestion, index)`) and Presence's `onEnterEnd` / `onExitEnd`. AppleCard's `onExpand` / `onCollapse` are passed as `:on-expand` / `:on-collapse`.
302
- - A lowercase `onclick` stays a declared prop, passed as `:onclick="fn"`: Button, ChatMessageAction, GradientButton, IconButton (forwarded straight to Button), InteractiveHoverButton, Link, NavbarLink, RippleButton, SidebarItem — and the other lowercase callback names of Compare, DatamoshTransition and PulseBeam (listed below). On the closed ones an `@click` is dropped with the other attributes, and on Button it would bypass the `disabled` / `loading` guard anyway.
308
+ - `@click` (the camelCase `onClick` prop) is a declared listener on Button, ChatMessageAction, CopyButton (no lowercase alias; it runs right after the copy starts), GradientButton, IconButton (forwarded to Button), InteractiveHoverButton, Link, NavbarLink, RippleButton and SidebarItem, called exactly once per activation and still behind the component's existing guards and press cue. Link, NavbarLink and the other anchor components pass their other native listeners (`@focus`, `@keydown`, …) through to the anchor too. The lowercase `onclick` prop (`:onclick="fn"`) stays as a deprecated alias, called only when `onClick` is absent. A closed component without a declared listener still drops `@click` with the other attributes.
303
309
  - Exceptions riding in `$attrs`: ShimmerButton's `onclick` is plain `@click` fallthrough, merged after the press cue in Svelte's order; ShimmerButton's `onpointermove` is likewise plain `@pointermove` fallthrough, merged after the component's own pointer tracking (which writes --mx/--my), as in Svelte; Reveal's `onfocusin` is a caller's `@focusin`, fired after the component's own handler.
304
310
  - **context keys**: exported context keys are Vue injection keys, not bare `unique symbol`s for `setContext` / `getContext`; the context value shapes are unchanged.
305
311
  - Helper objects built by `createInternalContext` (`.key`, `.provide()`, `.useRequired()`, `.useOptional()`): `BUTTON_GROUP_CONTEXT` (Svelte's bare `BUTTON_GROUP_CONTEXT_KEY` symbol has no Vue export under that name), `CONTEXT_MENU_KEY` with the re-exported `MENU_KEY` / `SUB_KEY`, `NAVIGATION_MENU_KEY` / `NAVIGATION_MENU_ITEM_KEY`, `STEPPER_KEY`, `TABS_KEY`, `TOGGLE_GROUP_KEY`. A hand-written leaf calls `MENU_KEY.useRequired()` instead of `getContext(MENU_KEY)`.
@@ -334,7 +340,7 @@ Components are named by their exported Vue name.
334
340
  - **composables**: composables expose no `destroy()`; cleanup runs through `onScopeDispose`. Focus-trap composables return a handle (`returnFocusNow` / `rearm`) instead of imperative action methods. Media-query and similar composables keep an explicit `start` / `stop` pair and accept getter-shaped options, as the Svelte actions do.
335
341
  - **hydration**: sound preferences hydrate explicitly in `onMounted` (`hydrateSound()`) rather than reading `localStorage` during setup, because Vue's production hydration does not patch an attribute mismatch introduced by an eagerly read client-only preference.
336
342
  - **vue floor**: Vue 3.5 is the floor, not just the minimum peer range: the port relies on reactive props destructuring, `useTemplateRef`, `onWatcherCleanup` and `<Teleport defer>`.
337
- - **upstream fixes**: a handful of proven bugs surfaced while porting `fancy-ui-react` were fixed on the Svelte source itself, and the Vue port inherits those fixes. The review of the Vue port surfaced more, fixed here first with Svelte parity pending (each listed under its component below): animated-testimonials, animated-tooltip, autocomplete, compare, confetti, copy-button, focus, inline-citation, number-input, rainbow-button, select, text-generate-effect, tooltip, tracing-beam.
343
+ - **upstream fixes**: a handful of proven bugs surfaced while porting `fancy-ui-react` were fixed on the Svelte source itself, and the Vue port inherits those fixes. The review of the Vue port surfaced more, fixed here first with Svelte parity pending (each listed under its component below): animated-testimonials, animated-tooltip, autocomplete, compare, confetti, copy-button, focus, inline-citation, number-input, rainbow-button, select, text-generate-effect, tooltip.
338
344
  - **not listed**: implementation-only differences with no consumer surface (template duplication, style-object plumbing, internal helper types, test-fixture transpositions) are not recorded here. A component without a bullet below differs from Svelte only through the rules above.
339
345
 
340
346
  ### Per component
@@ -354,13 +360,13 @@ Components are named by their exported Vue name.
354
360
  - **border-beam**: The `bb-travel` and `bb-ignite` keyframes stay in the scoped block. They are only referenced from scoped `animation` declarations, so the compiler renames them with the scope hash and rewrites those references consistently. This means an outside stylesheet cannot target the keyframes by their bare names.
355
361
  - **compare**: autoplay keeps a single frame loop: `startAutoplay` stops the running loop first, so mount, hover leave, drag end and prop restarts no longer stack loops, and unmount cancels it (upstream fix, Svelte parity pending).
356
362
  - **composer**: `ComposerCommandMenu` attaches its textarea `keydown` listener in the CAPTURE phase (in Vue every listener sits on the textarea itself, so a bubble-phase `stopPropagation()` would arrive too late to stop Enter-to-send). A consumer's own `keydown` listener on the textarea therefore runs after the menu's while it is open.
357
- - **compare**: the lowercase callbacks `onpercentagechange`, `ondragstart`, `ondragend`, `onhoverenter`, `onhoverleave` stay declared props, passed as `:ondragstart="fn"` and so on; the `@dragstart` / `@hoverenter` spellings compile to `onDragstart` / `onHoverenter` and are dropped with the other attributes, so they never fire.
363
+ - **compare**: the callbacks are the camelCase props `onPercentageChange`, `onDragStart`, `onDragEnd`, `onHoverEnter`, `onHoverLeave`, so `@percentage-change`, `@drag-start`, `@drag-end`, `@hover-enter` and `@hover-leave` work. The lowercase `onpercentagechange`, `ondragstart`, `ondragend`, `onhoverenter`, `onhoverleave` stay as deprecated aliases (`:ondragstart="fn"`), called only when the camelCase prop is absent; the run-together `@dragstart` / `@hoverenter` spellings compile to `onDragstart` / `onHoverenter` and are dropped with the other attributes.
358
364
  - **confetti**: Reassigning `options` and calling `fire()` in the same tick bursts with the PREVIOUS object: Vue hands a reassigned prop to the child only on the parent's next render, where Svelte bursts with the new one. Mutating the object already passed as `options` behaves identically, and the next `fire()` after the re-render uses the reassignment.
359
- - **confetti**: `ConfettiButton` renders `type="button"`: the Svelte source renders a bare `<button>`, which defaults to submit inside a form, and `inheritAttrs: false` leaves consumers no way to override it (upstream fix, Svelte parity pending).
365
+ - **confetti**: `ConfettiButton` follows the same contract as Svelte: `type` defaults to `"button"` and is overridable through `attrs`, `class` is merged, native attributes are forwarded, and `onClick` is a declared prop (arrays accepted) called once after the burst.
360
366
  - **container-scroll**: the source's `:global(.dark) .cs-root` and `:global(html:not(.dark)) .cs-root` selectors are written as plain ancestor selectors (`.dark .cs-root`, `html:not(.dark) .cs-root`) in the scoped style block, because the scoped compiler would otherwise emit the wrapped part alone; the matched elements and the values are identical.
361
367
  - **context-menu**: `openAt` drops the source's imperative `anchorRef.style.setProperty("left"/"top")` writes and relies on the anchor span's `:style` binding landing ahead of the `flush: "post"` recompute. A consumer reading `ctx.anchorRef.style.left` synchronously inside `onOpenChange` sees the PREVIOUS coordinates in Vue and the new ones in Svelte.
362
368
  - **copy-button**: `onCopy` reports the value captured when the copy started, not the prop's later value, when the prop changes while the clipboard write is pending (upstream fix, Svelte parity pending).
363
- - **datamosh-transition**: `phase` is output-only: `v-model:phase` hears every change, but a value the parent writes back is ignored, where Svelte's bindable adopts it. The lowercase callbacks `oncovered` / `onrevealed` stay declared props, passed as `:oncovered` / `:onrevealed`; a `@covered` / `@revealed` listener compiles to `onCovered` / `onRevealed`, lands on the overlay as a native listener and never fires. `cover()` / `reveal()` / `play()` are called through a template ref.
369
+ - **datamosh-transition**: `phase` is output-only: `v-model:phase` hears every change, but a value the parent writes back is ignored, where Svelte's bindable adopts it. `@covered` / `@revealed` (the `onCovered` / `onRevealed` props) are the callbacks; the lowercase `oncovered` / `onrevealed` stay as deprecated aliases, called only when the camelCase prop is absent. `cover()` / `reveal()` / `play()` are called through a template ref.
364
370
  - **dim-siblings**: Svelte's child `:global(...)` selector becomes `:slotted(...)`: only direct children that arrived through the default slot dim. DOM injected into the root from outside the slot does not participate, where Svelte's rule would still catch it.
365
371
  - **direction-aware-hover**: The two `:global()` rules keep their declarations verbatim but lose their document-wide reach: the `.group\/card` 44px min-box and the `prefers-reduced-motion: reduce` `transition-duration: 0.1s` override apply to this component's own elements plus its whole slot subtree, because every scoped style ships in the one `styles.css` each consumer imports once, and would otherwise force both on apps that never render the component. Under reduced motion the 0.1s override therefore reaches this component's slot content only, not the rest of the host page. Matches the React package's identical narrowing.
366
372
  - **dock**: Svelte throws when a DockIcon or DockSeparator is mounted outside a Dock. The Vue port degrades instead, through a frozen fallback context: `magnify: false`, `orientation: "horizontal"`, the pointer at `Infinity` and `reflection: true` (the prop default). A lone icon renders at its resting 40px with the reflection hook, and a lone separator is a vertical `role=separator` hairline.
@@ -379,7 +385,7 @@ Components are named by their exported Vue name.
379
385
  - **pagination**: when the visible run of pages shifts, the numbers glide with the list's CSS move transition (300ms, cubic-bezier(0.16, 1, 0.3, 1), off under reduced motion) instead of a JS-sampled expo-out FLIP; the sliding current-page pill is identical.
380
386
  - **password-input**: Cross-fade exit easing differs from the source, package-wide and shared with the React port: the icon cross-fade's EXIT leg resolves to `JS_EASINGS.in`, because the presence core passes a real per-leg direction, where the source's bidirectional `transition:iconFade` reports direction "both" and eases both legs with `JS_EASINGS.out`.
381
387
  - **pressable**: `PressableProps` no longer blocks the seven listeners the wrapper owns (`onpointerdown`, `onpointerup`, `onpointercancel`, `onpointerleave`, `onfocusout`, `onkeydown`, `onkeyup`): passed through `$attrs`, a same-named handler is MERGED and fires alongside the wrapper's own (caller's first) rather than being silently overridden. Put your own handlers for those on the child; the guidance is advisory here, not type-enforced.
382
- - **pulse-beam**: the lowercase callbacks `onfadein` / `onfadeout` stay declared props, passed as `:onfadein="fn"` / `:onfadeout="fn"`; a `@fadein` / `@fadeout` listener compiles to `onFadein` / `onFadeout`, lands on the host as a native listener and never fires. The computed `--pb-*` custom properties win over a consumer `style`.
388
+ - **pulse-beam**: the callbacks are the camelCase props `onFadeIn` / `onFadeOut` (`@fade-in` / `@fade-out`); the lowercase `onfadein` / `onfadeout` stay as deprecated aliases, called only when the camelCase prop is absent. The computed `--pb-*` custom properties win over a consumer `style`.
383
389
  - **radio-group**: The generated `name` reads `v-0-name`, `v-1-name`, … from Vue's `useId()`, whose counter is per APP, not per page: two RadioGroups mounted in two SEPARATE Vue apps on one page both get `v-0-name` and fight over each other's selection. Inside one app they are distinct and SSR-stable. Consumers mounting several apps must set `app.config.idPrefix` per app, or pass an explicit `name`; the Svelte and React packages have no equivalent hazard.
384
390
  - **rainbow-button**: a disabled `href` anchor calls `preventDefault()` on click, so it no longer navigates; the Svelte source only returns early, and `aria-disabled` / `tabindex=-1` do not stop a pointer click from following the href (upstream fix, Svelte parity pending).
385
391
  - **reveal**: Changing `once`, `threshold` or `rootMargin` no longer tears down and rebuilds the observer: `useInView` routes them through the core's `update()`, and a spent `once: true` observer does not re-fire (same as the React port).
@@ -396,7 +402,6 @@ Components are named by their exported Vue name.
396
402
  - **toast**: The entrance and exit move from `<Toast>` to `<Toaster>`: a `<Toast>` rendered directly by a consumer paints at rest and no longer animates itself in or out. Through `<Toaster>` the motion is unchanged — same preset, 300ms/8px arrival, 200ms/4px departure, same reduced-motion collapse (parity with the React port).
397
403
  - **tool-call**: The auto-open for a failure is keyed on the `call.status` VALUE, not on the `call` object identity: handing the card a fresh `call` object whose status is still `"error"` does not re-fire the auto-open. Observable only when a consumer drives `open` from outside AND re-creates the `call` object (same as the React port).
398
404
  - **tooltip**: the tooltip appends its id to the trigger's existing `aria-describedby` list and removes only that id on close, instead of overwriting the attribute and then deleting it; it also rewires its listeners and `aria-describedby` onto a replacement trigger when the slot swaps its first element (upstream fixes, Svelte parity pending).
399
- - **tracing-beam**: each instance uses its own generated gradient id (`useFancyId()`) for the gradient and its stroke reference, so two beams on one page no longer share one spring-animated gradient (upstream fix, Svelte parity pending).
400
405
 
401
406
  ## Tech Stack
402
407
 
@@ -0,0 +1,44 @@
1
+ import type { HTMLAttributes } from "vue";
2
+ import type { AccordionOrientation, AccordionType, AccordionValue } from "./accordion-core.js";
3
+ export interface AccordionProps {
4
+ /** `"single"` keeps one item open at a time, `"multiple"` lets any number be. Defaults to `"single"`. */
5
+ type?: AccordionType;
6
+ /** Called with the new value each time an item toggles. A string for `"single"`, an array for `"multiple"`. */
7
+ onValueChange?: (value: AccordionValue) => void;
8
+ /** With `type="single"`, lets the open item be closed again. Without it one item stays open once opened. Ignored for `"multiple"`. */
9
+ collapsible?: boolean;
10
+ /** Disables every item. */
11
+ disabled?: boolean;
12
+ /** The axis the items stack on, and which arrow-key pair moves focus. Defaults to `"vertical"`. */
13
+ orientation?: AccordionOrientation;
14
+ /** Additional CSS classes. */
15
+ class?: HTMLAttributes["class"];
16
+ }
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<AccordionProps & {
20
+ /**
21
+ * The open item, bindable. A string for `type="single"` (`""` when none is
22
+ * open), a string array for `type="multiple"`.
23
+ */
24
+ value?: AccordionValue;
25
+ }, {
26
+ ref: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
27
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ "update:value": (value: AccordionValue) => any;
29
+ }, string, import("vue").PublicProps, Readonly<AccordionProps & {
30
+ /**
31
+ * The open item, bindable. A string for `type="single"` (`""` when none is
32
+ * open), a string array for `type="multiple"`.
33
+ */
34
+ value?: AccordionValue;
35
+ }> & Readonly<{
36
+ "onUpdate:value"?: ((value: AccordionValue) => any) | undefined;
37
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
38
+ default?(): unknown;
39
+ }>;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,88 @@
1
+ import { defineComponent, mergeModels, useAttrs, useModel, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
2
+ import { cn } from "../../utils.js";
3
+ import { useFancyId } from "../../internals/use-id.js";
4
+ import { openValues, navigationTarget, targetIndex, toggleItem, valueFor, canClose } from "./accordion-core.js";
5
+ import { ACCORDION_KEY } from "./types.js";
6
+ const _hoisted_1 = ["data-orientation", "data-disabled"];
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "Accordion", inheritAttrs: false },
9
+ __name: "Accordion",
10
+ props: /* @__PURE__ */ mergeModels({
11
+ type: { default: "single" },
12
+ onValueChange: { type: Function },
13
+ collapsible: { type: Boolean, default: false },
14
+ disabled: { type: Boolean, default: false },
15
+ orientation: { default: "vertical" },
16
+ class: { type: [Boolean, null, String, Object, Array] }
17
+ }, {
18
+ "value": { default: "" },
19
+ "valueModifiers": {}
20
+ }),
21
+ emits: ["update:value"],
22
+ setup(__props, { expose: __expose }) {
23
+ const attrs = useAttrs();
24
+ const value = useModel(__props, "value");
25
+ const el = useTemplateRef("el");
26
+ __expose({ ref: el });
27
+ const uid = useFancyId();
28
+ const open = computed(() => openValues(__props.type, value.value));
29
+ function enabledTriggers() {
30
+ const root = el.value;
31
+ if (!root) return [];
32
+ return Array.from(
33
+ root.querySelectorAll("[data-ft-accordion-trigger]:not(:disabled)")
34
+ ).filter((button) => button.closest("[data-ft-accordion]") === root);
35
+ }
36
+ const context = {
37
+ get type() {
38
+ return __props.type;
39
+ },
40
+ get orientation() {
41
+ return __props.orientation;
42
+ },
43
+ get disabled() {
44
+ return __props.disabled;
45
+ },
46
+ isOpen: (itemValue) => open.value.includes(itemValue),
47
+ isLocked: (itemValue) => open.value.includes(itemValue) && !canClose(__props.type, __props.collapsible),
48
+ // The only place `value` changes. A plain function, not a watcher: writing
49
+ // `value` from one would read and write the same state in one pass and
50
+ // fight a caller's own `v-model:value`.
51
+ toggle(itemValue) {
52
+ const next = toggleItem(__props.type, __props.collapsible, open.value, itemValue);
53
+ if (next === null) return;
54
+ const emitted = valueFor(__props.type, next);
55
+ value.value = emitted;
56
+ __props.onValueChange?.(emitted);
57
+ },
58
+ triggerId: (itemValue) => `${uid}-trigger-${itemValue}`,
59
+ contentId: (itemValue) => `${uid}-content-${itemValue}`,
60
+ navigate(origin, key) {
61
+ const target = navigationTarget(__props.orientation, key);
62
+ if (!target) return false;
63
+ const buttons = enabledTriggers();
64
+ const index = targetIndex(buttons.length, buttons.indexOf(origin), target);
65
+ if (index < 0) return false;
66
+ buttons[index]?.focus();
67
+ return true;
68
+ }
69
+ };
70
+ ACCORDION_KEY.provide(context);
71
+ return (_ctx, _cache) => {
72
+ return openBlock(), createElementBlock("div", mergeProps({
73
+ ref_key: "el",
74
+ ref: el
75
+ }, unref(attrs), {
76
+ class: unref(cn)("ft-accordion w-full", __props.class),
77
+ "data-ft-accordion": "",
78
+ "data-orientation": __props.orientation,
79
+ "data-disabled": __props.disabled ? "" : void 0
80
+ }), [
81
+ renderSlot(_ctx.$slots, "default")
82
+ ], 16, _hoisted_1);
83
+ };
84
+ }
85
+ });
86
+ export {
87
+ _sfc_main as default
88
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./Accordion.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,25 @@
1
+ import type { HTMLAttributes } from "vue";
2
+ export interface AccordionContentProps {
3
+ /**
4
+ * Keeps the children mounted while the item is closed. On by default; pass
5
+ * `false` to unmount them once the collapse has finished and mount them
6
+ * again on open. Defaults to `true`, as on `CollapsibleContent`: the trigger's `aria-controls` always points at an element that exists, the closed markup is server-rendered, and nothing has to be measured.
7
+ * See `CollapsibleContent`.
8
+ */
9
+ forceMount?: boolean;
10
+ /** Additional CSS classes, merged onto the inner body so padding collapses with the panel. */
11
+ class?: HTMLAttributes["class"];
12
+ }
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<AccordionContentProps, {
16
+ /** The region element that animates. */
17
+ readonly ref: HTMLDivElement | null;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
19
+ default?(): unknown;
20
+ }>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent, useAttrs, useTemplateRef, createBlock, openBlock, mergeProps, unref, withCtx, renderSlot } from "vue";
2
+ import { cn } from "../../utils.js";
3
+ import _sfc_main$1 from "../collapsible/CollapsibleContent.vue.js";
4
+ import { COLLAPSIBLE_KEY } from "../collapsible/types.js";
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ ...{ name: "AccordionContent", inheritAttrs: false },
7
+ __name: "AccordionContent",
8
+ props: {
9
+ forceMount: { type: Boolean, default: true },
10
+ class: { type: [Boolean, null, String, Object, Array] }
11
+ },
12
+ setup(__props, { expose: __expose }) {
13
+ const attrs = useAttrs();
14
+ const el = useTemplateRef("el");
15
+ __expose({
16
+ /** The region element that animates. */
17
+ get ref() {
18
+ return el.value?.ref ?? null;
19
+ }
20
+ });
21
+ const context = COLLAPSIBLE_KEY.useOptional();
22
+ return (_ctx, _cache) => {
23
+ return openBlock(), createBlock(_sfc_main$1, mergeProps({
24
+ ref_key: "el",
25
+ ref: el
26
+ }, unref(attrs), {
27
+ "force-mount": __props.forceMount,
28
+ class: unref(cn)("ft-accordion-content text-muted-foreground pb-4 text-sm", __props.class),
29
+ role: "region",
30
+ "aria-labelledby": unref(context)?.triggerId
31
+ }), {
32
+ default: withCtx(() => [
33
+ renderSlot(_ctx.$slots, "default")
34
+ ]),
35
+ _: 3
36
+ }, 16, ["force-mount", "class", "aria-labelledby"]);
37
+ };
38
+ }
39
+ });
40
+ export {
41
+ _sfc_main as default
42
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./AccordionContent.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,21 @@
1
+ import type { HTMLAttributes } from "vue";
2
+ export interface AccordionItemProps {
3
+ /** This item's value: what `Accordion`'s `value` holds while it is open. */
4
+ value: string;
5
+ /** Disables just this item. Its trigger is skipped by the arrow keys. */
6
+ disabled?: boolean;
7
+ /** Additional CSS classes. */
8
+ class?: HTMLAttributes["class"];
9
+ }
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<AccordionItemProps, {
13
+ ref: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
14
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
15
+ default?(): unknown;
16
+ }>;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,66 @@
1
+ import { defineComponent, useAttrs, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
2
+ import { cn } from "../../utils.js";
3
+ import { COLLAPSIBLE_KEY } from "../collapsible/types.js";
4
+ import { ACCORDION_KEY, ACCORDION_ITEM_KEY } from "./types.js";
5
+ const _hoisted_1 = ["data-state", "data-orientation", "data-disabled"];
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{ name: "AccordionItem", inheritAttrs: false },
8
+ __name: "AccordionItem",
9
+ props: {
10
+ value: {},
11
+ disabled: { type: Boolean, default: false },
12
+ class: { type: [Boolean, null, String, Object, Array] }
13
+ },
14
+ setup(__props, { expose: __expose }) {
15
+ const attrs = useAttrs();
16
+ const el = useTemplateRef("el");
17
+ __expose({ ref: el });
18
+ const root = ACCORDION_KEY.useOptional();
19
+ const isOpen = computed(() => root?.isOpen(__props.value) ?? false);
20
+ const isDisabled = computed(() => (root?.disabled ?? false) || __props.disabled);
21
+ const itemContext = {
22
+ get value() {
23
+ return __props.value;
24
+ },
25
+ get disabled() {
26
+ return isDisabled.value;
27
+ }
28
+ };
29
+ const collapsible = {
30
+ get open() {
31
+ return isOpen.value;
32
+ },
33
+ get disabled() {
34
+ return isDisabled.value;
35
+ },
36
+ toggle() {
37
+ if (isDisabled.value) return;
38
+ root?.toggle(__props.value);
39
+ },
40
+ get triggerId() {
41
+ return root?.triggerId(__props.value) ?? `ft-accordion-trigger-${__props.value}`;
42
+ },
43
+ get contentId() {
44
+ return root?.contentId(__props.value) ?? `ft-accordion-content-${__props.value}`;
45
+ }
46
+ };
47
+ ACCORDION_ITEM_KEY.provide(itemContext);
48
+ COLLAPSIBLE_KEY.provide(collapsible);
49
+ return (_ctx, _cache) => {
50
+ return openBlock(), createElementBlock("div", mergeProps({
51
+ ref_key: "el",
52
+ ref: el
53
+ }, unref(attrs), {
54
+ class: unref(cn)("ft-accordion-item border-border border-b", __props.class),
55
+ "data-state": isOpen.value ? "open" : "closed",
56
+ "data-orientation": unref(root)?.orientation ?? "vertical",
57
+ "data-disabled": isDisabled.value ? "" : void 0
58
+ }), [
59
+ renderSlot(_ctx.$slots, "default")
60
+ ], 16, _hoisted_1);
61
+ };
62
+ }
63
+ });
64
+ export {
65
+ _sfc_main as default
66
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./AccordionItem.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };