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.
- package/PORTING.md +123 -2
- package/README.md +20 -15
- package/dist/components/accordion/Accordion.vue.d.ts +44 -0
- package/dist/components/accordion/Accordion.vue.js +88 -0
- package/dist/components/accordion/Accordion.vue2.js +4 -0
- package/dist/components/accordion/AccordionContent.vue.d.ts +25 -0
- package/dist/components/accordion/AccordionContent.vue.js +42 -0
- package/dist/components/accordion/AccordionContent.vue2.js +4 -0
- package/dist/components/accordion/AccordionItem.vue.d.ts +21 -0
- package/dist/components/accordion/AccordionItem.vue.js +66 -0
- package/dist/components/accordion/AccordionItem.vue2.js +4 -0
- package/dist/components/accordion/AccordionTrigger.vue.d.ts +24 -0
- package/dist/components/accordion/AccordionTrigger.vue.js +83 -0
- package/dist/components/accordion/AccordionTrigger.vue2.js +4 -0
- package/dist/components/accordion/accordion-core.d.ts +35 -0
- package/dist/components/accordion/accordion-core.js +44 -0
- package/dist/components/accordion/index.d.ts +11 -0
- package/dist/components/accordion/types.d.ts +45 -0
- package/dist/components/accordion/types.js +7 -0
- package/dist/components/alert-dialog/AlertDialog.vue.js +22 -3
- package/dist/components/animated-testimonials/AnimatedTestimonials.vue.js +3 -3
- package/dist/components/apple-card-carousel/AppleCard.vue.js +1 -1
- package/dist/components/autocomplete/Autocomplete.vue.js +1 -1
- package/dist/components/autocomplete/Autocomplete.vue2.js +22 -15
- package/dist/components/avatar/Avatar.vue.d.ts +27 -0
- package/dist/components/avatar/Avatar.vue.js +119 -0
- package/dist/components/avatar/Avatar.vue2.js +4 -0
- package/dist/components/avatar/avatar-core.d.ts +40 -0
- package/dist/components/avatar/avatar-core.js +57 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/badge/Badge.vue.d.ts +21 -0
- package/dist/components/badge/Badge.vue.js +46 -0
- package/dist/components/badge/Badge.vue2.js +4 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/bento-grid/BentoFrame.vue.js +1 -1
- package/dist/components/bento-grid/BentoFrame.vue2.js +6 -5
- package/dist/components/bento-grid/BentoGrid.vue.js +1 -1
- package/dist/components/bento-grid/BentoGrid.vue2.js +12 -12
- package/dist/components/bento-grid/BentoGridCard.vue.js +6 -5
- package/dist/components/bento-grid/BentoGridItem.vue.js +6 -5
- package/dist/components/bg-falling-stars/FallingStarsBg.vue.d.ts +1 -1
- package/dist/components/bg-falling-stars/FallingStarsBg.vue.js +1 -1
- package/dist/components/bg-falling-stars/bg-falling-stars-core.d.ts +1 -1
- package/dist/components/bg-falling-stars/bg-falling-stars-core.js +47 -12
- package/dist/components/book/Book.vue.js +8 -9
- package/dist/components/book/BookDescription.vue.js +6 -5
- package/dist/components/book/BookHeader.vue.js +6 -5
- package/dist/components/book/BookTitle.vue.js +6 -5
- package/dist/components/box-reveal/BoxReveal.vue.js +6 -5
- package/dist/components/button/Button.vue.d.ts +6 -4
- package/dist/components/button/Button.vue.js +1 -1
- package/dist/components/button/Button.vue2.js +50 -22
- package/dist/components/card-3d/CardContainer.vue.js +1 -1
- package/dist/components/card-3d/CardItem.vue.js +1 -1
- package/dist/components/card-spotlight/CardSpotlight.vue.js +1 -1
- package/dist/components/chat-message/ChatMessageAction.vue.d.ts +4 -2
- package/dist/components/chat-message/ChatMessageAction.vue.js +4 -2
- package/dist/components/checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/components/checkbox/Checkbox.vue.js +1 -1
- package/dist/components/checkbox/Checkbox.vue2.js +17 -7
- package/dist/components/collapsible/Collapsible.vue.d.ts +31 -0
- package/dist/components/collapsible/Collapsible.vue.js +60 -0
- package/dist/components/collapsible/Collapsible.vue2.js +4 -0
- package/dist/components/collapsible/CollapsibleContent.vue.d.ts +26 -0
- package/dist/components/collapsible/CollapsibleContent.vue.js +81 -0
- package/dist/components/collapsible/CollapsibleContent.vue2.js +4 -0
- package/dist/components/collapsible/CollapsibleTrigger.vue.d.ts +21 -0
- package/dist/components/collapsible/CollapsibleTrigger.vue.js +57 -0
- package/dist/components/collapsible/CollapsibleTrigger.vue2.js +4 -0
- package/dist/components/collapsible/collapsible-core.d.ts +47 -0
- package/dist/components/collapsible/collapsible-core.js +40 -0
- package/dist/components/collapsible/index.d.ts +8 -0
- package/dist/components/collapsible/types.d.ts +24 -0
- package/dist/components/collapsible/types.js +5 -0
- package/dist/components/combobox/Combobox.vue.js +1 -1
- package/dist/components/combobox/Combobox.vue2.js +24 -16
- package/dist/components/command-menu/CommandMenu.vue.d.ts +5 -0
- package/dist/components/command-menu/CommandMenu.vue.js +1 -1
- package/dist/components/command-menu/CommandMenu.vue2.js +5 -2
- package/dist/components/compare/Compare.vue.d.ts +15 -5
- package/dist/components/compare/Compare.vue.js +1 -1
- package/dist/components/compare/Compare.vue2.js +28 -13
- package/dist/components/composer/ComposerInput.vue.js +1 -1
- package/dist/components/composer/ComposerInput.vue2.js +11 -11
- package/dist/components/composer/ComposerModelPicker.vue.d.ts +4 -0
- package/dist/components/composer/ComposerModelPicker.vue.js +1 -1
- package/dist/components/composer/ComposerModelPicker.vue2.js +29 -15
- package/dist/components/composer/ComposerSubmit.vue.d.ts +2 -0
- package/dist/components/composer/ComposerSubmit.vue.js +16 -15
- package/dist/components/confetti/ConfettiButton.vue.d.ts +9 -2
- package/dist/components/confetti/ConfettiButton.vue.js +24 -6
- package/dist/components/container-text-flip/ContainerTextFlip.vue.js +1 -1
- package/dist/components/container-text-flip/ContainerTextFlip.vue2.js +12 -13
- package/dist/components/copy-button/CopyButton.vue.d.ts +5 -0
- package/dist/components/copy-button/CopyButton.vue.js +1 -1
- package/dist/components/copy-button/CopyButton.vue2.js +72 -11
- package/dist/components/datamosh-transition/DatamoshTransition.vue.d.ts +6 -2
- package/dist/components/datamosh-transition/DatamoshTransition.vue.js +7 -4
- package/dist/components/date-picker/DatePicker.vue.js +1 -1
- package/dist/components/date-picker/DatePicker.vue2.js +27 -21
- package/dist/components/dialog/Dialog.vue.js +20 -1
- package/dist/components/dialog/DialogSurface.vue.js +1 -1
- package/dist/components/dialog/DialogSurface.vue2.js +5 -2
- package/dist/components/dialog/types.d.ts +2 -0
- package/dist/components/direction-aware-hover/DirectionAwareHover.vue.js +1 -1
- package/dist/components/direction-aware-hover/DirectionAwareHover.vue2.js +9 -7
- package/dist/components/displacement-text/DisplacementText.vue.d.ts +4 -1
- package/dist/components/displacement-text/DisplacementText.vue.js +38 -11
- package/dist/components/displacement-text/displacement-text-core.d.ts +94 -4
- package/dist/components/displacement-text/displacement-text-core.js +287 -97
- package/dist/components/drawer/Drawer.vue.d.ts +5 -0
- package/dist/components/drawer/Drawer.vue.js +1 -1
- package/dist/components/drawer/Drawer.vue2.js +5 -2
- package/dist/components/dropdown-menu/DropdownMenuContent.vue.js +2 -1
- package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts +4 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.vue.js +17 -10
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +8 -0
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.js +28 -13
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +4 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue2.js +20 -10
- package/dist/components/editorial-engine/EditorialEngine.vue.js +1 -1
- package/dist/components/editorial-engine/engine.js +13 -0
- package/dist/components/file-upload/FileUpload.vue.d.ts +2 -0
- package/dist/components/file-upload/FileUpload.vue.js +1 -1
- package/dist/components/file-upload/FileUpload.vue2.js +20 -10
- package/dist/components/fireworks-hdr/FireworksHdr.vue.js +2 -2
- package/dist/components/flickering-grid/FlickeringGrid.vue.d.ts +1 -1
- package/dist/components/flickering-grid/FlickeringGrid.vue.js +1 -1
- package/dist/components/flickering-grid/flickering-grid-core.d.ts +1 -1
- package/dist/components/flickering-grid/flickering-grid-core.js +51 -9
- package/dist/components/flip-card/FlipCard.vue.d.ts +3 -1
- package/dist/components/flip-card/FlipCard.vue.js +1 -1
- package/dist/components/flip-card/FlipCard.vue2.js +5 -3
- package/dist/components/fluid-cursor/FluidCursor.vue.js +37 -9
- package/dist/components/fluid-cursor/fluid-cursor-core.js +3 -3
- package/dist/components/fluid-cursor/webgpu-engine.js +3 -3
- package/dist/components/focus/Focus.vue.js +1 -1
- package/dist/components/focus/Focus.vue2.js +2 -2
- package/dist/components/follow-button/FollowButton.vue.d.ts +69 -0
- package/dist/components/follow-button/FollowButton.vue.js +7 -0
- package/dist/components/follow-button/FollowButton.vue2.js +239 -0
- package/dist/components/follow-button/follow-core.d.ts +83 -0
- package/dist/components/follow-button/follow-core.js +92 -0
- package/dist/components/follow-button/index.d.ts +2 -0
- package/dist/components/frosted-glass/FrostedGlass.vue.js +1 -1
- package/dist/components/glare-card/GlareCard.vue.js +1 -1
- package/dist/components/glare-card/GlareCard.vue2.js +4 -4
- package/dist/components/glowing-effect/GlowingEffect.vue.js +3 -3
- package/dist/components/glowing-effect/glowing-effect-core.js +4 -1
- package/dist/components/gradient-button/GradientButton.vue.d.ts +6 -4
- package/dist/components/gradient-button/GradientButton.vue.js +1 -1
- package/dist/components/gradient-button/GradientButton.vue2.js +13 -3
- package/dist/components/icon-button/IconButton.vue.d.ts +6 -4
- package/dist/components/icon-button/IconButton.vue.js +11 -8
- package/dist/components/image-trail-cursor/ImageTrailCursor.vue.js +17 -7
- package/dist/components/image-trail-cursor/trail-variants.js +3 -6
- package/dist/components/inline-citation/InlineCitation.vue.js +1 -1
- package/dist/components/inline-citation/InlineCitation.vue2.js +20 -14
- package/dist/components/input/Input.vue.js +1 -1
- package/dist/components/input/Input.vue2.js +18 -8
- package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue.js +1 -1
- package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue2.js +1 -1
- package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.d.ts +6 -3
- package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.js +1 -1
- package/dist/components/interactive-hover-button/InteractiveHoverButton.vue2.js +12 -2
- package/dist/components/letter-pullup/LetterPullup.vue.js +4 -4
- package/dist/components/line-hover-link/LineHoverLink.vue.js +1 -1
- package/dist/components/line-hover-link/LineHoverLink.vue2.js +5 -6
- package/dist/components/link/Link.vue.d.ts +4 -2
- package/dist/components/link/Link.vue.js +1 -1
- package/dist/components/link/Link.vue2.js +11 -8
- package/dist/components/magnetic-field/MagnetPuck.vue.d.ts +51 -0
- package/dist/components/magnetic-field/MagnetPuck.vue.js +7 -0
- package/dist/components/magnetic-field/MagnetPuck.vue2.js +191 -0
- package/dist/components/magnetic-field/MagneticField.vue.d.ts +39 -0
- package/dist/components/magnetic-field/MagneticField.vue.js +7 -0
- package/dist/components/magnetic-field/MagneticField.vue2.js +157 -0
- package/dist/components/magnetic-field/MagneticItem.vue.d.ts +28 -0
- package/dist/components/magnetic-field/MagneticItem.vue.js +7 -0
- package/dist/components/magnetic-field/MagneticItem.vue2.js +72 -0
- package/dist/components/magnetic-field/index.d.ts +10 -0
- package/dist/components/magnetic-field/magnetic-field-core.d.ts +163 -0
- package/dist/components/magnetic-field/magnetic-field-core.js +534 -0
- package/dist/components/magnetic-field/magnetic-field-source.d.ts +58 -0
- package/dist/components/magnetic-field/magnetic-field-source.js +58 -0
- package/dist/components/magnetic-field/types.d.ts +14 -0
- package/dist/components/magnetic-field/types.js +5 -0
- package/dist/components/mosaic-glow/MosaicGlow.vue.d.ts +6 -0
- package/dist/components/mosaic-glow/MosaicGlow.vue.js +53 -9
- package/dist/components/mosaic-glow/mosaic-glow-core.d.ts +30 -0
- package/dist/components/mosaic-glow/mosaic-glow-core.js +27 -0
- package/dist/components/mosaic-glow/mosaic-glow-hdr.d.ts +24 -0
- package/dist/components/mosaic-glow/mosaic-glow-hdr.js +200 -0
- package/dist/components/navbar/NavbarLink.vue.d.ts +4 -2
- package/dist/components/navbar/NavbarLink.vue.js +1 -1
- package/dist/components/navbar/NavbarLink.vue2.js +16 -13
- package/dist/components/navigation-menu/NavigationMenu.vue.js +6 -3
- package/dist/components/navigation-menu/NavigationMenuLink.vue.js +1 -1
- package/dist/components/navigation-menu/NavigationMenuLink.vue2.js +8 -8
- package/dist/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +15 -0
- package/dist/components/navigation-menu/NavigationMenuTrigger.vue.js +1 -1
- package/dist/components/navigation-menu/NavigationMenuTrigger.vue2.js +36 -15
- package/dist/components/neon-border/NeonBorder.vue.js +1 -1
- package/dist/components/neon-border/NeonBorder.vue2.js +10 -11
- package/dist/components/number-input/NumberInput.vue.js +1 -1
- package/dist/components/number-input/NumberInput.vue2.js +22 -12
- package/dist/components/password-input/PasswordInput.vue.js +1 -1
- package/dist/components/password-input/PasswordInput.vue2.js +18 -11
- package/dist/components/pixel-loader/PixelLoader.vue.js +1 -1
- package/dist/components/pixel-loader/PixelLoader.vue2.js +6 -6
- package/dist/components/pixel-scene/PixelScene.vue.d.ts +60 -0
- package/dist/components/pixel-scene/PixelScene.vue.js +184 -0
- package/dist/components/pixel-scene/PixelScene.vue2.js +4 -0
- package/dist/components/pixel-scene/index.d.ts +4 -0
- package/dist/components/pixel-scene/pixel-scene-core.d.ts +256 -0
- package/dist/components/pixel-scene/pixel-scene-core.js +878 -0
- package/dist/components/pixel-scene/pixel-scene-hdr.d.ts +68 -0
- package/dist/components/pixel-scene/pixel-scene-hdr.js +312 -0
- package/dist/components/pixel-scene/pixel-scene-scenes.d.ts +31 -0
- package/dist/components/pixel-scene/pixel-scene-scenes.js +1074 -0
- package/dist/components/popover/Popover.vue.d.ts +4 -0
- package/dist/components/popover/Popover.vue.js +1 -1
- package/dist/components/popover/Popover.vue2.js +8 -6
- package/dist/components/popover/PopoverContent.vue.js +6 -2
- package/dist/components/pulse-beam/PulseBeam.vue.d.ts +6 -2
- package/dist/components/pulse-beam/PulseBeam.vue.js +1 -1
- package/dist/components/pulse-beam/PulseBeam.vue2.js +7 -4
- package/dist/components/radio-group/RadioGroup.vue.js +12 -11
- package/dist/components/radio-group/RadioGroupItem.vue.d.ts +2 -0
- package/dist/components/radio-group/RadioGroupItem.vue.js +1 -1
- package/dist/components/radio-group/RadioGroupItem.vue2.js +20 -7
- package/dist/components/rainbow-button/RainbowButton.vue.d.ts +11 -2
- package/dist/components/rainbow-button/RainbowButton.vue.js +1 -1
- package/dist/components/rainbow-button/RainbowButton.vue2.js +35 -18
- package/dist/components/ripple-button/RippleButton.vue.d.ts +6 -4
- package/dist/components/ripple-button/RippleButton.vue.js +1 -1
- package/dist/components/ripple-button/RippleButton.vue2.js +10 -5
- package/dist/components/search-input/SearchInput.vue.js +1 -1
- package/dist/components/search-input/SearchInput.vue2.js +19 -9
- package/dist/components/select/Select.vue.d.ts +1 -1
- package/dist/components/select/Select.vue.js +1 -1
- package/dist/components/select/Select.vue2.js +25 -17
- package/dist/components/sheet/Sheet.vue.d.ts +5 -0
- package/dist/components/sheet/Sheet.vue.js +5 -2
- package/dist/components/shimmer-button/ShimmerButton.vue.d.ts +2 -2
- package/dist/components/shimmer-button/ShimmerButton.vue.js +1 -1
- package/dist/components/shimmer-button/ShimmerButton.vue2.js +14 -6
- package/dist/components/sidebar/SidebarItem.vue.d.ts +4 -2
- package/dist/components/sidebar/SidebarItem.vue.js +1 -1
- package/dist/components/sidebar/SidebarItem.vue2.js +4 -2
- package/dist/components/slider/Slider.vue.d.ts +4 -0
- package/dist/components/slider/Slider.vue.js +1 -1
- package/dist/components/slider/Slider.vue2.js +20 -8
- package/dist/components/sources/SourcesTrigger.vue.js +1 -1
- package/dist/components/sources/SourcesTrigger.vue2.js +11 -11
- package/dist/components/sparkles/sparkles-core.d.ts +1 -1
- package/dist/components/sparkles/sparkles-core.js +36 -2
- package/dist/components/story-thread/StoryNode.vue.d.ts +11 -0
- package/dist/components/story-thread/StoryNode.vue.js +7 -0
- package/dist/components/story-thread/StoryNode.vue2.js +23 -0
- package/dist/components/story-thread/StoryThread.vue.d.ts +56 -0
- package/dist/components/story-thread/StoryThread.vue.js +7 -0
- package/dist/components/story-thread/StoryThread.vue2.js +103 -0
- package/dist/components/story-thread/index.d.ts +5 -0
- package/dist/components/story-thread/story-thread-core.d.ts +119 -0
- package/dist/components/story-thread/story-thread-core.js +491 -0
- package/dist/components/story-thread/types.d.ts +1 -0
- package/dist/components/sun-switch/SunSwitch.vue.d.ts +61 -0
- package/dist/components/sun-switch/SunSwitch.vue.js +7 -0
- package/dist/components/sun-switch/SunSwitch.vue2.js +559 -0
- package/dist/components/sun-switch/index.d.ts +4 -0
- package/dist/components/sun-switch/pixel-wave-core.d.ts +82 -0
- package/dist/components/sun-switch/pixel-wave-core.js +508 -0
- package/dist/components/sun-switch/sun-switch-core.d.ts +251 -0
- package/dist/components/sun-switch/sun-switch-core.js +546 -0
- package/dist/components/sun-switch/sun-switch-hdr.d.ts +70 -0
- package/dist/components/sun-switch/sun-switch-hdr.js +311 -0
- package/dist/components/switch/Switch.vue.d.ts +2 -0
- package/dist/components/switch/Switch.vue.js +1 -1
- package/dist/components/switch/Switch.vue2.js +16 -6
- package/dist/components/tabs/TabsTrigger.vue.d.ts +6 -0
- package/dist/components/tabs/TabsTrigger.vue.js +1 -1
- package/dist/components/tabs/TabsTrigger.vue2.js +28 -15
- package/dist/components/terminal-block/TerminalBlock.vue.js +1 -1
- package/dist/components/terminal-block/TerminalBlock.vue2.js +10 -9
- package/dist/components/text-reveal-card/TextRevealCard.vue.js +1 -2
- package/dist/components/textarea/Textarea.vue.js +1 -1
- package/dist/components/textarea/Textarea.vue2.js +19 -12
- package/dist/components/tick-nav/TickNav.vue.d.ts +71 -0
- package/dist/components/tick-nav/TickNav.vue.js +7 -0
- package/dist/components/tick-nav/TickNav.vue2.js +285 -0
- package/dist/components/tick-nav/index.d.ts +3 -0
- package/dist/components/tick-nav/tick-nav-core.d.ts +102 -0
- package/dist/components/tick-nav/tick-nav-core.js +398 -0
- package/dist/components/tick-nav/tick-nav-hdr.d.ts +60 -0
- package/dist/components/tick-nav/tick-nav-hdr.js +284 -0
- package/dist/components/tick-nav/types.d.ts +13 -0
- package/dist/components/time-picker/TimePicker.vue.js +1 -1
- package/dist/components/time-picker/TimePicker.vue2.js +25 -17
- package/dist/components/toast/Toast.vue.js +1 -1
- package/dist/components/toast/Toast.vue2.js +16 -4
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/store.d.ts +23 -0
- package/dist/components/toast/store.js +35 -7
- package/dist/components/toggle/Toggle.vue.d.ts +12 -0
- package/dist/components/toggle/Toggle.vue.js +1 -1
- package/dist/components/toggle/Toggle.vue2.js +27 -11
- package/dist/components/toggle-group/ToggleGroup.vue.d.ts +11 -0
- package/dist/components/toggle-group/ToggleGroup.vue.js +1 -1
- package/dist/components/toggle-group/ToggleGroup.vue2.js +16 -3
- package/dist/components/toggle-group/ToggleGroupItem.vue.d.ts +6 -0
- package/dist/components/toggle-group/ToggleGroupItem.vue.js +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.vue2.js +27 -14
- package/dist/components/tooltip/Tooltip.vue.js +13 -0
- package/dist/components/tracing-beam/TracingBeam.vue.d.ts +20 -1
- package/dist/components/tracing-beam/TracingBeam.vue.js +5 -164
- package/dist/components/tracing-beam/TracingBeam.vue2.js +168 -1
- package/dist/components/typing-indicator/TypingIndicator.vue.js +1 -1
- package/dist/components/typing-indicator/TypingIndicator.vue2.js +7 -6
- package/dist/index.d.ts +10 -0
- package/dist/index.js +466 -413
- package/dist/internals/anchor-position.js +3 -0
- package/dist/internals/call-listener.d.ts +11 -0
- package/dist/internals/call-listener.js +31 -0
- package/dist/internals/dismissable.d.ts +17 -0
- package/dist/internals/dismissable.js +44 -1
- package/dist/internals/env.d.ts +1 -0
- package/dist/internals/env.js +11 -0
- package/dist/internals/focus-trap.js +29 -4
- package/dist/internals/merge-ids.d.ts +6 -0
- package/dist/internals/merge-ids.js +11 -0
- package/dist/internals/motion/presence-core.d.ts +1 -1
- package/dist/sound/engine.js +23 -9
- package/dist/sound/themes.d.ts +4 -3
- package/dist/sound/themes.js +49 -211
- package/dist/sound/types.d.ts +9 -1
- package/dist/sound/types.js +2 -2
- package/dist/styles.css +1473 -571
- package/package.json +2 -2
- package/tailwind.css +9 -9
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
1
2
|
import type { Options as ConfettiOptions } from "canvas-confetti";
|
|
2
3
|
export interface ConfettiButtonProps {
|
|
3
4
|
/** Confetti options for this button, merged over the surrounding root's options. */
|
|
4
5
|
options?: ConfettiOptions;
|
|
5
6
|
/**
|
|
6
|
-
* Plays the
|
|
7
|
-
* default; only audible once the user has enabled sound.
|
|
7
|
+
* Plays the `hover` cue on mouse/pen pointer enter and the `press` cue on
|
|
8
|
+
* click. Off by default; only audible once the user has enabled sound.
|
|
8
9
|
*/
|
|
9
10
|
sound?: boolean;
|
|
11
|
+
/** Custom CSS class */
|
|
12
|
+
class?: HTMLAttributes["class"];
|
|
13
|
+
/** Native `disabled`, read to guard the burst and the consumer callback. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Native click handler, kept as a prop and re-dispatched after the burst. */
|
|
16
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
10
17
|
}
|
|
11
18
|
declare const _default: typeof __VLS_export;
|
|
12
19
|
export default _default;
|
|
@@ -1,17 +1,31 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, renderSlot, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, createElementBlock, openBlock, mergeProps, unref, renderSlot, createCommentVNode } from "vue";
|
|
2
|
+
import { cn } from "../../utils.js";
|
|
2
3
|
import confettiModule from "canvas-confetti";
|
|
3
4
|
import { sound } from "../../sound/sound.js";
|
|
5
|
+
import { useSoundFeedback } from "../../sound/use-sound-feedback.js";
|
|
6
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
4
7
|
import { CONFETTI_CONTEXT } from "./context.js";
|
|
8
|
+
const _hoisted_1 = ["disabled"];
|
|
5
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
10
|
...{ name: "ConfettiButton", inheritAttrs: false },
|
|
7
11
|
__name: "ConfettiButton",
|
|
8
12
|
props: {
|
|
9
13
|
options: { default: () => ({}) },
|
|
10
|
-
sound: { type: Boolean, default: false }
|
|
14
|
+
sound: { type: Boolean, default: false },
|
|
15
|
+
class: { type: [Boolean, null, String, Object, Array] },
|
|
16
|
+
disabled: { type: Boolean, default: false },
|
|
17
|
+
onClick: { type: [Function, Array] }
|
|
11
18
|
},
|
|
12
19
|
setup(__props) {
|
|
20
|
+
const attrs = useAttrs();
|
|
13
21
|
const confettiContext = CONFETTI_CONTEXT.useOptional();
|
|
22
|
+
const el = useTemplateRef("el");
|
|
23
|
+
useSoundFeedback(el, () => ({
|
|
24
|
+
on: __props.sound ? { pointerenter: "hover" } : {},
|
|
25
|
+
disabled: __props.disabled
|
|
26
|
+
}));
|
|
14
27
|
function handleClick(event) {
|
|
28
|
+
if (__props.disabled) return;
|
|
15
29
|
if (__props.sound) sound.play("press");
|
|
16
30
|
const target = event.currentTarget;
|
|
17
31
|
const rect = target.getBoundingClientRect();
|
|
@@ -26,14 +40,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
40
|
} else {
|
|
27
41
|
confettiModule({ ...__props.options, origin });
|
|
28
42
|
}
|
|
43
|
+
callListener(__props.onClick, event);
|
|
29
44
|
}
|
|
30
45
|
return (_ctx, _cache) => {
|
|
31
|
-
return openBlock(), createElementBlock("button", {
|
|
46
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
47
|
+
ref_key: "el",
|
|
48
|
+
ref: el,
|
|
49
|
+
class: unref(cn)(__props.class),
|
|
32
50
|
type: "button",
|
|
33
|
-
|
|
34
|
-
}, [
|
|
51
|
+
disabled: __props.disabled
|
|
52
|
+
}, unref(attrs), { onClick: handleClick }), [
|
|
35
53
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : createCommentVNode("", true)
|
|
36
|
-
]);
|
|
54
|
+
], 16, _hoisted_1);
|
|
37
55
|
};
|
|
38
56
|
}
|
|
39
57
|
});
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./ContainerTextFlip.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const ContainerTextFlip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const ContainerTextFlip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-58f10267"]]);
|
|
6
6
|
export {
|
|
7
7
|
ContainerTextFlip as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted, onBeforeUnmount, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, ref, computed, onMounted, onBeforeUnmount, createElementBlock, openBlock, mergeProps, unref, createElementVNode, normalizeClass, Fragment, renderList, normalizeStyle, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
const _hoisted_1 = { class: "inline-block" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -12,6 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
textClass: { type: [Boolean, null, String, Object, Array] }
|
|
13
13
|
},
|
|
14
14
|
setup(__props) {
|
|
15
|
+
const attrs = useAttrs();
|
|
15
16
|
const currentWordIndex = ref(0);
|
|
16
17
|
const currentWord = computed(() => __props.words[currentWordIndex.value] ?? "");
|
|
17
18
|
const letters = computed(() => currentWord.value.split(""));
|
|
@@ -22,18 +23,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
onBeforeUnmount(() => clearInterval(id));
|
|
23
24
|
});
|
|
24
25
|
return (_ctx, _cache) => {
|
|
25
|
-
return openBlock(), createElementBlock("p", {
|
|
26
|
-
class:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
__props.class
|
|
34
|
-
)
|
|
26
|
+
return openBlock(), createElementBlock("p", mergeProps(unref(attrs), {
|
|
27
|
+
class: unref(cn)(
|
|
28
|
+
"relative inline-block rounded-lg px-4 pt-2 pb-3 text-center text-4xl font-bold text-black md:text-7xl dark:text-white",
|
|
29
|
+
"[background:linear-gradient(to_bottom,#f3f4f6,#e5e7eb)]",
|
|
30
|
+
"shadow-[inset_0_-1px_#d1d5db,inset_0_0_0_1px_#d1d5db,_0_4px_8px_#d1d5db]",
|
|
31
|
+
"dark:[background:linear-gradient(to_bottom,#374151,#1f2937)]",
|
|
32
|
+
"dark:shadow-[inset_0_-1px_#10171e,inset_0_0_0_1px_hsla(205,89%,46%,.24),_0_4px_8px_#00000052]",
|
|
33
|
+
__props.class
|
|
35
34
|
)
|
|
36
|
-
}, [
|
|
35
|
+
}), [
|
|
37
36
|
createElementVNode("span", {
|
|
38
37
|
class: normalizeClass(unref(cn)("inline-block", __props.textClass))
|
|
39
38
|
}, [
|
|
@@ -50,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
49
|
}), 128))
|
|
51
50
|
])
|
|
52
51
|
], 2)
|
|
53
|
-
],
|
|
52
|
+
], 16);
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
55
|
});
|
|
@@ -21,6 +21,11 @@ export interface CopyButtonProps {
|
|
|
21
21
|
iconOnly?: boolean;
|
|
22
22
|
/** Called with the value and whether the write actually succeeded */
|
|
23
23
|
onCopy?: (value: string, ok: boolean) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Fires on activation, right after the copy starts. Never called while
|
|
26
|
+
* `disabled`. `@click` reaches it.
|
|
27
|
+
*/
|
|
28
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
24
29
|
/** Additional CSS classes */
|
|
25
30
|
class?: HTMLAttributes["class"];
|
|
26
31
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./CopyButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const CopyButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const CopyButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-faf475ce"]]);
|
|
5
5
|
export {
|
|
6
6
|
CopyButton as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import { defineComponent, useSlots, useTemplateRef, computed, ref, watch, createBlock, openBlock, unref,
|
|
1
|
+
import { defineComponent, useSlots, useAttrs, useTemplateRef, computed, ref, watch, onBeforeUnmount, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createElementBlock, toDisplayString, createElementVNode, createCommentVNode, createVNode } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { useCopy } from "../../internals/use-copy.js";
|
|
4
5
|
import { sound } from "../../sound/sound.js";
|
|
6
|
+
import { prefersReducedMotion } from "../../internals/motion/anchored.js";
|
|
5
7
|
import Button from "../button/Button.vue.js";
|
|
6
8
|
import StatusMorph from "../status-morph/StatusMorph.vue.js";
|
|
7
9
|
const _hoisted_1 = ["aria-live"];
|
|
10
|
+
const _hoisted_2 = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "ft-copybtn__label"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_3 = {
|
|
15
|
+
class: "ft-copybtn__ghost",
|
|
16
|
+
"aria-hidden": "true"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_4 = {
|
|
19
|
+
class: "ft-copybtn__ghost",
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_5 = {
|
|
23
|
+
class: "ft-copybtn__ghost",
|
|
24
|
+
"aria-hidden": "true"
|
|
25
|
+
};
|
|
26
|
+
const _hoisted_6 = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "ft-copybtn__leave",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_7 = ["data-swapped"];
|
|
8
32
|
const MORPH_STYLE = {
|
|
9
33
|
width: "1rem",
|
|
10
34
|
height: "1rem",
|
|
@@ -25,11 +49,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
49
|
disabled: { type: Boolean, default: false },
|
|
26
50
|
iconOnly: { type: Boolean, default: false },
|
|
27
51
|
onCopy: { type: Function },
|
|
52
|
+
onClick: { type: [Function, Array] },
|
|
28
53
|
class: { type: [Boolean, null, String, Object, Array] },
|
|
29
54
|
sound: { type: Boolean, default: false }
|
|
30
55
|
},
|
|
31
56
|
setup(__props, { expose: __expose }) {
|
|
32
57
|
const slots = useSlots();
|
|
58
|
+
const attrs = useAttrs();
|
|
33
59
|
const btn = useTemplateRef("btn");
|
|
34
60
|
__expose({ ref: computed(() => btn.value?.ref ?? null) });
|
|
35
61
|
const resetWindow = __props.resetMs;
|
|
@@ -50,18 +76,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
76
|
__props.class
|
|
51
77
|
)
|
|
52
78
|
);
|
|
53
|
-
async function handleClick() {
|
|
79
|
+
async function handleClick(event) {
|
|
54
80
|
if (__props.sound && sound.enabled) void sound.unlock();
|
|
55
81
|
morphState.value = "idle";
|
|
56
82
|
const mine = ++attempt;
|
|
57
83
|
const attempted = __props.value;
|
|
58
|
-
const
|
|
84
|
+
const pending = copyState.copy(attempted);
|
|
85
|
+
callListener(__props.onClick, event);
|
|
86
|
+
const ok = await pending;
|
|
59
87
|
if (mine === attempt) {
|
|
60
88
|
morphState.value = ok ? "success" : "error";
|
|
61
89
|
if (__props.sound) sound.play(ok ? "copy" : "error");
|
|
62
90
|
}
|
|
63
91
|
__props.onCopy?.(attempted, ok);
|
|
64
92
|
}
|
|
93
|
+
const LEAVE_MS = 80;
|
|
94
|
+
const swapped = ref(false);
|
|
95
|
+
const leaving = ref(null);
|
|
96
|
+
let leaveTimer;
|
|
97
|
+
watch(currentLabel, (next, previous) => {
|
|
98
|
+
if (next === previous) return;
|
|
99
|
+
swapped.value = true;
|
|
100
|
+
if (leaving.value !== null) return;
|
|
101
|
+
clearTimeout(leaveTimer);
|
|
102
|
+
if (prefersReducedMotion()) {
|
|
103
|
+
leaving.value = null;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
leaving.value = previous;
|
|
107
|
+
leaveTimer = setTimeout(() => {
|
|
108
|
+
leaving.value = null;
|
|
109
|
+
}, LEAVE_MS);
|
|
110
|
+
});
|
|
111
|
+
onBeforeUnmount(() => clearTimeout(leaveTimer));
|
|
65
112
|
watch(
|
|
66
113
|
[hasChildren, morphState],
|
|
67
114
|
([has, current], _previous, onCleanup) => {
|
|
@@ -77,21 +124,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
124
|
{ flush: "post" }
|
|
78
125
|
);
|
|
79
126
|
return (_ctx, _cache) => {
|
|
80
|
-
return openBlock(), createBlock(unref(Button), {
|
|
127
|
+
return openBlock(), createBlock(unref(Button), mergeProps({
|
|
81
128
|
ref_key: "btn",
|
|
82
|
-
ref: btn
|
|
129
|
+
ref: btn
|
|
130
|
+
}, unref(attrs), {
|
|
131
|
+
type: "button",
|
|
83
132
|
variant: __props.variant,
|
|
84
133
|
size: __props.size,
|
|
85
134
|
disabled: __props.disabled,
|
|
86
135
|
label: __props.iconOnly ? currentLabel.value : void 0,
|
|
87
|
-
class:
|
|
88
|
-
|
|
89
|
-
}, createSlots({
|
|
136
|
+
class: classes.value,
|
|
137
|
+
onClick: handleClick
|
|
138
|
+
}), createSlots({
|
|
90
139
|
default: withCtx(() => [
|
|
91
140
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
92
|
-
|
|
141
|
+
__props.iconOnly || _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
142
|
+
key: 0,
|
|
143
|
+
class: "ft-copybtn__live sr-only",
|
|
93
144
|
"aria-live": _ctx.$slots.default ? morphState.value === "error" ? "assertive" : "polite" : void 0
|
|
94
|
-
},
|
|
145
|
+
}, toDisplayString(currentLabel.value), 9, _hoisted_1)) : (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
146
|
+
createElementVNode("span", _hoisted_3, toDisplayString(__props.label), 1),
|
|
147
|
+
createElementVNode("span", _hoisted_4, toDisplayString(__props.copiedLabel), 1),
|
|
148
|
+
createElementVNode("span", _hoisted_5, toDisplayString(__props.errorLabel), 1),
|
|
149
|
+
leaving.value !== null ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(leaving.value), 1)) : createCommentVNode("", true),
|
|
150
|
+
(openBlock(), createElementBlock("span", {
|
|
151
|
+
key: currentLabel.value,
|
|
152
|
+
class: "ft-copybtn__live",
|
|
153
|
+
"data-swapped": swapped.value ? "" : void 0
|
|
154
|
+
}, toDisplayString(currentLabel.value), 9, _hoisted_7))
|
|
155
|
+
]))
|
|
95
156
|
]),
|
|
96
157
|
_: 2
|
|
97
158
|
}, [
|
|
@@ -133,7 +194,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
133
194
|
]),
|
|
134
195
|
key: "0"
|
|
135
196
|
} : void 0
|
|
136
|
-
]),
|
|
197
|
+
]), 1040, ["variant", "size", "disabled", "label", "class"]);
|
|
137
198
|
};
|
|
138
199
|
}
|
|
139
200
|
});
|
|
@@ -53,9 +53,13 @@ export interface DatamoshTransitionProps {
|
|
|
53
53
|
/** Current phase (read-only, `v-model:phase`) */
|
|
54
54
|
phase?: DatamoshTransitionPhase;
|
|
55
55
|
/** Called once the page is fully covered */
|
|
56
|
-
|
|
56
|
+
onCovered?: (() => void) | (() => void)[];
|
|
57
|
+
/** @deprecated Use `@covered` / `onCovered`. Only called when `onCovered` is absent. */
|
|
58
|
+
oncovered?: (() => void) | (() => void)[];
|
|
57
59
|
/** Called once the page is fully revealed */
|
|
58
|
-
|
|
60
|
+
onRevealed?: (() => void) | (() => void)[];
|
|
61
|
+
/** @deprecated Use `@revealed` / `onRevealed`. Only called when `onRevealed` is absent. */
|
|
62
|
+
onrevealed?: (() => void) | (() => void)[];
|
|
59
63
|
}
|
|
60
64
|
declare const _default: typeof __VLS_export;
|
|
61
65
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, mergeModels, useModel, useAttrs, computed, useTemplateRef, shallowRef, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock, mergeProps, unref, createElementVNode } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { useReducedMotion } from "../../internals/motion/use-media-query.js";
|
|
4
5
|
import { resolvePalette, DEFAULT_COLUMNS, DEFAULT_POWER, oddTiles, buildStrip, columnDelays, paletteRoles, createCoverage, DEFAULT_TILES, settleCoverage, columnEdges, stepCoverage, CYCLE, FALL_STAGGER, columnBand, easeEdge, columnTiles, sourceSlot, stripIndex, coverFit, sampleSource, columnFlow, BLEED } from "./datamosh-transition-core.js";
|
|
@@ -27,8 +28,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
contained: { type: Boolean, default: false },
|
|
28
29
|
zIndex: { default: 9999 },
|
|
29
30
|
phase: {},
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
onCovered: { type: [Function, Array] },
|
|
32
|
+
oncovered: { type: [Function, Array] },
|
|
33
|
+
onRevealed: { type: [Function, Array] },
|
|
34
|
+
onrevealed: { type: [Function, Array] }
|
|
32
35
|
}, {
|
|
33
36
|
"phase": { default: "idle" },
|
|
34
37
|
"phaseModifiers": {}
|
|
@@ -99,8 +102,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
99
102
|
draw();
|
|
100
103
|
}
|
|
101
104
|
settlePending();
|
|
102
|
-
if (dir === "cover") __props.oncovered
|
|
103
|
-
else __props.onrevealed
|
|
105
|
+
if (dir === "cover") callListener(__props.onCovered ?? __props.oncovered);
|
|
106
|
+
else callListener(__props.onRevealed ?? __props.onrevealed);
|
|
104
107
|
}
|
|
105
108
|
function run(dir) {
|
|
106
109
|
settlePending();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./DatePicker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-848a88a9"]]);
|
|
5
5
|
export {
|
|
6
6
|
DatePicker as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, ref, shallowRef, useTemplateRef, watch, createElementBlock, openBlock, Fragment, createElementVNode, createCommentVNode, createBlock,
|
|
1
|
+
import { defineComponent, mergeModels, useAttrs, useModel, computed, ref, shallowRef, useTemplateRef, watch, createElementBlock, openBlock, Fragment, createElementVNode, createCommentVNode, createBlock, mergeProps, normalizeProps, guardReactiveProps, toDisplayString, unref, withCtx, normalizeStyle, renderList, normalizeClass } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
4
|
import _sfc_main$1 from "../../internals/Portal.vue.js";
|
|
@@ -11,8 +11,8 @@ import { useFancyId } from "../../internals/use-id.js";
|
|
|
11
11
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
12
12
|
import { getMonthGrid, isSameDay, formatISODate, addMonths, clampDate } from "../../internals/calendar-core.js";
|
|
13
13
|
import { getWeekdayNames, formatMonthYear, formatTriggerDate, formatDayAccessibleName, isDayInRange, findEnabledDay, dayOnly, findEnabledInRow, addDays } from "./date-utils.js";
|
|
14
|
-
const _hoisted_1 = ["id", "name", "disabled"
|
|
15
|
-
const _hoisted_2 = ["name", "value", "disabled"];
|
|
14
|
+
const _hoisted_1 = ["id", "name", "disabled"];
|
|
15
|
+
const _hoisted_2 = ["name", "form", "value", "disabled"];
|
|
16
16
|
const _hoisted_3 = ["data-state", "data-side"];
|
|
17
17
|
const _hoisted_4 = { class: "flex items-center justify-between gap-2 text-[12px] font-semibold" };
|
|
18
18
|
const _hoisted_5 = ["aria-label"];
|
|
@@ -48,6 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
}),
|
|
49
49
|
emits: ["update:value"],
|
|
50
50
|
setup(__props, { expose: __expose }) {
|
|
51
|
+
const attrs = useAttrs();
|
|
51
52
|
const value = useModel(__props, "value");
|
|
52
53
|
const field = useField();
|
|
53
54
|
const effectiveId = computed(() => field?.controlId ?? __props.id);
|
|
@@ -70,9 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
71
|
() => viewDate.value ? getMonthGrid(viewDate.value.getFullYear(), viewDate.value.getMonth(), __props.weekStartsOn) : []
|
|
71
72
|
);
|
|
72
73
|
const weekdayNames = computed(() => getWeekdayNames(__props.weekStartsOn, __props.locale));
|
|
73
|
-
const monthLabel = computed(
|
|
74
|
-
() => viewDate.value ? formatMonthYear(viewDate.value, __props.locale) : ""
|
|
75
|
-
);
|
|
74
|
+
const monthLabel = computed(() => viewDate.value ? formatMonthYear(viewDate.value, __props.locale) : "");
|
|
76
75
|
const triggerLabel = computed(() => formatTriggerDate(value.value, __props.locale));
|
|
77
76
|
const rows = computed(() => {
|
|
78
77
|
const focused = focusedDate.value;
|
|
@@ -229,36 +228,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
229
228
|
cell.selected && "bg-accent text-accent-foreground"
|
|
230
229
|
);
|
|
231
230
|
}
|
|
231
|
+
function triggerAttrs() {
|
|
232
|
+
const describedBy = [field?.describedBy, attrs["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
233
|
+
return {
|
|
234
|
+
...attrs,
|
|
235
|
+
type: "button",
|
|
236
|
+
role: "combobox",
|
|
237
|
+
"aria-haspopup": "grid",
|
|
238
|
+
"aria-expanded": open.value,
|
|
239
|
+
"aria-controls": open.value ? panelId : void 0,
|
|
240
|
+
"aria-invalid": effectiveInvalid.value ? "true" : attrs["aria-invalid"],
|
|
241
|
+
"aria-required": effectiveRequired.value ? "true" : attrs["aria-required"],
|
|
242
|
+
"aria-describedby": describedBy,
|
|
243
|
+
"aria-label": __props.label ?? attrs["aria-label"]
|
|
244
|
+
};
|
|
245
|
+
}
|
|
232
246
|
return (_ctx, _cache) => {
|
|
233
247
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
234
|
-
createElementVNode("button", {
|
|
248
|
+
createElementVNode("button", mergeProps({
|
|
235
249
|
ref_key: "trigger",
|
|
236
250
|
ref: trigger,
|
|
237
|
-
type: "button",
|
|
238
|
-
role: "combobox",
|
|
239
251
|
id: effectiveId.value,
|
|
240
252
|
name: __props.name,
|
|
241
|
-
class:
|
|
253
|
+
class: classes.value,
|
|
242
254
|
disabled: effectiveDisabled.value,
|
|
243
|
-
"aria-haspopup": "grid",
|
|
244
|
-
"aria-expanded": open.value,
|
|
245
|
-
"aria-controls": open.value ? panelId : void 0,
|
|
246
|
-
"aria-required": effectiveRequired.value ? "true" : void 0,
|
|
247
|
-
"aria-invalid": effectiveInvalid.value ? "true" : void 0,
|
|
248
|
-
"aria-describedby": unref(field)?.describedBy,
|
|
249
|
-
"aria-label": __props.label,
|
|
250
255
|
onClick: toggle
|
|
251
|
-
}, [
|
|
256
|
+
}, triggerAttrs()), [
|
|
252
257
|
createElementVNode("span", normalizeProps(guardReactiveProps(triggerLabel.value ? {} : { class: "text-muted-foreground" })), toDisplayString(triggerLabel.value ?? __props.placeholder), 17),
|
|
253
258
|
_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
254
259
|
"aria-hidden": "true",
|
|
255
260
|
class: "text-muted-foreground"
|
|
256
261
|
}, "📅", -1))
|
|
257
|
-
],
|
|
262
|
+
], 16, _hoisted_1),
|
|
258
263
|
__props.name ? (openBlock(), createElementBlock("input", {
|
|
259
264
|
key: 0,
|
|
260
265
|
type: "hidden",
|
|
261
266
|
name: __props.name,
|
|
267
|
+
form: unref(attrs).form,
|
|
262
268
|
value: value.value ? unref(formatISODate)(value.value) : "",
|
|
263
269
|
disabled: effectiveDisabled.value
|
|
264
270
|
}, null, 8, _hoisted_2)) : createCommentVNode("", true),
|
|
@@ -279,14 +285,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
279
285
|
class: "ft-date-picker-nav text-muted-foreground cursor-pointer",
|
|
280
286
|
"aria-label": "Previous month",
|
|
281
287
|
onClick: _cache[0] || (_cache[0] = ($event) => moveMonths(-1))
|
|
282
|
-
}, "‹"),
|
|
288
|
+
}, " ‹ "),
|
|
283
289
|
createElementVNode("span", null, toDisplayString(monthLabel.value), 1),
|
|
284
290
|
createElementVNode("button", {
|
|
285
291
|
type: "button",
|
|
286
292
|
class: "ft-date-picker-nav text-muted-foreground cursor-pointer",
|
|
287
293
|
"aria-label": "Next month",
|
|
288
294
|
onClick: _cache[1] || (_cache[1] = ($event) => moveMonths(1))
|
|
289
|
-
}, "›")
|
|
295
|
+
}, " › ")
|
|
290
296
|
]),
|
|
291
297
|
createElementVNode("table", {
|
|
292
298
|
role: "grid",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, createElementBlock, openBlock, Fragment, createCommentVNode, createVNode, renderSlot, unref, withCtx, createElementVNode, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, watch, createElementBlock, openBlock, Fragment, createCommentVNode, createVNode, renderSlot, unref, withCtx, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useFancyId } from "../../internals/use-id.js";
|
|
4
4
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
@@ -50,6 +50,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
const uid = useFancyId();
|
|
51
51
|
const titleId = computed(() => props.title ? `${uid}-title` : void 0);
|
|
52
52
|
const descriptionId = computed(() => props.description ? `${uid}-description` : void 0);
|
|
53
|
+
const panelId = `${uid}-panel`;
|
|
54
|
+
watch(
|
|
55
|
+
[triggerRef, open],
|
|
56
|
+
([wrapper, isOpen], _prev, onCleanup) => {
|
|
57
|
+
const el = wrapper?.firstElementChild;
|
|
58
|
+
if (!el) return;
|
|
59
|
+
el.setAttribute("aria-haspopup", "dialog");
|
|
60
|
+
el.setAttribute("aria-expanded", String(isOpen));
|
|
61
|
+
if (isOpen) el.setAttribute("aria-controls", panelId);
|
|
62
|
+
else el.removeAttribute("aria-controls");
|
|
63
|
+
onCleanup(() => {
|
|
64
|
+
el.removeAttribute("aria-haspopup");
|
|
65
|
+
el.removeAttribute("aria-expanded");
|
|
66
|
+
el.removeAttribute("aria-controls");
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
{ immediate: true, flush: "post" }
|
|
70
|
+
);
|
|
53
71
|
return (_ctx, _cache) => {
|
|
54
72
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
55
73
|
_ctx.$slots.trigger ? (openBlock(), createElementBlock("span", {
|
|
@@ -64,6 +82,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
82
|
createVNode(DialogSurface, {
|
|
65
83
|
ref_key: "surface",
|
|
66
84
|
ref: surface,
|
|
85
|
+
id: panelId,
|
|
67
86
|
open: open.value,
|
|
68
87
|
role: "dialog",
|
|
69
88
|
"title-id": titleId.value,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./DialogSurface.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const DialogSurface = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const DialogSurface = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3044d5de"]]);
|
|
5
5
|
export {
|
|
6
6
|
DialogSurface as default
|
|
7
7
|
};
|
|
@@ -8,12 +8,13 @@ import { useScrollLock } from "../../internals/use-scroll-lock.js";
|
|
|
8
8
|
import { anchored } from "../../internals/motion/anchored.js";
|
|
9
9
|
import { usePresence } from "../../internals/motion/presence.js";
|
|
10
10
|
import { DURATIONS } from "../../internals/motion/tokens.js";
|
|
11
|
-
const _hoisted_1 = ["role", "aria-labelledby", "aria-describedby", "data-state"];
|
|
11
|
+
const _hoisted_1 = ["id", "role", "aria-labelledby", "aria-describedby", "data-state"];
|
|
12
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
13
|
...{ name: "DialogSurface", inheritAttrs: false },
|
|
14
14
|
__name: "DialogSurface",
|
|
15
15
|
props: {
|
|
16
16
|
open: { type: Boolean },
|
|
17
|
+
id: {},
|
|
17
18
|
role: {},
|
|
18
19
|
titleId: {},
|
|
19
20
|
descriptionId: {},
|
|
@@ -56,7 +57,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
57
|
escape: props.escape,
|
|
57
58
|
outsideClick: props.outsideClick,
|
|
58
59
|
exclude: props.exclude,
|
|
59
|
-
active: () => props.open
|
|
60
|
+
active: () => props.open,
|
|
61
|
+
keepFocus: true
|
|
60
62
|
}));
|
|
61
63
|
const panelRef = composeRefs(
|
|
62
64
|
panel,
|
|
@@ -84,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
86
|
}, null, 512),
|
|
85
87
|
createElementVNode("div", {
|
|
86
88
|
ref: unref(panelRef),
|
|
89
|
+
id: props.id,
|
|
87
90
|
role: props.role,
|
|
88
91
|
"aria-modal": "true",
|
|
89
92
|
"aria-labelledby": props.titleId,
|
|
@@ -30,6 +30,8 @@ import type { HTMLAttributes } from "vue";
|
|
|
30
30
|
export interface DialogSurfaceProps {
|
|
31
31
|
/** Whether the surface is mounted and interactive. */
|
|
32
32
|
open: boolean;
|
|
33
|
+
/** The panel's `id` — what the trigger's `aria-controls` points at while the surface is open. */
|
|
34
|
+
id?: string;
|
|
33
35
|
/** Forwarded verbatim to the panel's `role`. */
|
|
34
36
|
role: "dialog" | "alertdialog";
|
|
35
37
|
/** Id of the element that labels the surface, or undefined when there is none to point at. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./DirectionAwareHover.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const DirectionAwareHover = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const DirectionAwareHover = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ee0fc1f6"]]);
|
|
5
5
|
export {
|
|
6
6
|
DirectionAwareHover as default
|
|
7
7
|
};
|
|
@@ -2,6 +2,7 @@ import { defineComponent, useTemplateRef, ref, computed, onMounted, onBeforeUnmo
|
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { composeRefs } from "../../internals/dom/compose-refs.js";
|
|
4
4
|
import { linear } from "../../internals/motion/easing.js";
|
|
5
|
+
import { prefersReducedMotion } from "../../internals/motion/anchored.js";
|
|
5
6
|
import { usePresence } from "../../internals/motion/presence.js";
|
|
6
7
|
const _hoisted_1 = { class: "relative size-full overflow-hidden" };
|
|
7
8
|
const _hoisted_2 = ["src", "alt"];
|
|
@@ -26,7 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
27
|
memoNode = node;
|
|
27
28
|
memoSpec = {
|
|
28
29
|
delay: 0,
|
|
29
|
-
|
|
30
|
+
// JS-timed fade collapses to 0 under reduced motion, read live at leg start.
|
|
31
|
+
duration: prefersReducedMotion() ? 0 : 300,
|
|
30
32
|
easing: linear,
|
|
31
33
|
css: (t) => `opacity: ${t * o}`
|
|
32
34
|
};
|
|
@@ -107,7 +109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
109
|
}
|
|
108
110
|
const containerClass = computed(
|
|
109
111
|
() => cn(
|
|
110
|
-
"group/card relative overflow-hidden rounded-lg bg-transparent transition-all duration-300",
|
|
112
|
+
"group/card relative overflow-hidden rounded-lg bg-transparent motion-safe:transition-all motion-safe:duration-300",
|
|
111
113
|
"h-48 w-48",
|
|
112
114
|
"sm:h-64 sm:w-64",
|
|
113
115
|
"md:h-80 md:w-80",
|
|
@@ -121,7 +123,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
121
123
|
);
|
|
122
124
|
const imageClass = computed(
|
|
123
125
|
() => cn(
|
|
124
|
-
"h-full w-full object-cover transition-transform duration-300",
|
|
126
|
+
"h-full w-full object-cover motion-safe:transition-transform motion-safe:duration-300",
|
|
125
127
|
"scale-125",
|
|
126
128
|
"sm:scale-[1.35]",
|
|
127
129
|
"md:scale-150",
|
|
@@ -130,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
132
|
);
|
|
131
133
|
const childrenClass = computed(
|
|
132
134
|
() => cn(
|
|
133
|
-
"absolute z-40 text-white transition-opacity duration-300",
|
|
135
|
+
"absolute z-40 text-white motion-safe:transition-opacity motion-safe:duration-300",
|
|
134
136
|
"bottom-2 left-2 text-sm",
|
|
135
137
|
"sm:bottom-3 sm:left-3 sm:text-base",
|
|
136
138
|
"md:bottom-4 md:left-4 md:text-lg",
|
|
@@ -139,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
139
141
|
);
|
|
140
142
|
const overlayDirection = computed(() => direction.value ?? lastDirection.value);
|
|
141
143
|
const overlayClass = computed(() => {
|
|
142
|
-
const baseClasses = "absolute inset-0 z-10 transition-all duration-300";
|
|
144
|
+
const baseClasses = "absolute inset-0 z-10 motion-safe:transition-all motion-safe:duration-300";
|
|
143
145
|
const backgroundClasses = "bg-black/40 dark:bg-black/60";
|
|
144
146
|
let transformClasses = "";
|
|
145
147
|
switch (overlayDirection.value) {
|
|
@@ -161,7 +163,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
161
163
|
return cn(baseClasses, backgroundClasses, transformClasses);
|
|
162
164
|
});
|
|
163
165
|
const imageContainerClass = computed(
|
|
164
|
-
() => cn("relative size-full bg-gray-50 transition-transform duration-300 dark:bg-black", {
|
|
166
|
+
() => cn("relative size-full bg-gray-50 motion-safe:transition-transform motion-safe:duration-300 dark:bg-black", {
|
|
165
167
|
"translate-y-2 md:translate-y-5": direction.value === "top",
|
|
166
168
|
"-translate-y-2 md:-translate-y-5": direction.value === "bottom",
|
|
167
169
|
"translate-x-2 md:translate-x-5": direction.value === "left",
|
|
@@ -221,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
221
223
|
ref: unref(contentRef),
|
|
222
224
|
class: normalizeClass(childrenClass.value)
|
|
223
225
|
}, [
|
|
224
|
-
renderSlot(_ctx.$slots, "default")
|
|
226
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
225
227
|
], 2)) : createCommentVNode("", true)
|
|
226
228
|
])
|
|
227
229
|
], 34);
|