fancy-ui-vue 0.2.0 → 0.3.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 +15 -13
- 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/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/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/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/typing-indicator/TypingIndicator.vue.js +1 -1
- package/dist/components/typing-indicator/TypingIndicator.vue2.js +7 -6
- package/dist/index.d.ts +6 -0
- package/dist/index.js +440 -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 +974 -571
- package/package.json +2 -2
- package/tailwind.css +9 -9
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, mergeModels, useAttrs, useModel, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, renderSlot, createCommentVNode } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { sound } from "../../sound/sound.js";
|
|
4
5
|
const _hoisted_1 = ["aria-pressed", "aria-label", "disabled"];
|
|
6
|
+
const _hoisted_2 = ["name", "value", "form"];
|
|
5
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
8
|
...{ name: "Toggle", inheritAttrs: false },
|
|
7
9
|
__name: "Toggle",
|
|
@@ -12,13 +14,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
14
|
variant: { default: "ghost" },
|
|
13
15
|
label: {},
|
|
14
16
|
class: { type: [Boolean, null, String, Object, Array] },
|
|
15
|
-
sound: { type: Boolean, default: false }
|
|
17
|
+
sound: { type: Boolean, default: false },
|
|
18
|
+
name: {},
|
|
19
|
+
value: {},
|
|
20
|
+
form: {},
|
|
21
|
+
onClick: {}
|
|
16
22
|
}, {
|
|
17
23
|
"pressed": { type: Boolean, ...{ default: false } },
|
|
18
24
|
"pressedModifiers": {}
|
|
19
25
|
}),
|
|
20
26
|
emits: ["update:pressed"],
|
|
21
27
|
setup(__props, { expose: __expose }) {
|
|
28
|
+
const attrs = useAttrs();
|
|
22
29
|
const props = __props;
|
|
23
30
|
const pressed = useModel(__props, "pressed");
|
|
24
31
|
const ref = useTemplateRef("ref");
|
|
@@ -44,26 +51,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
51
|
props.class
|
|
45
52
|
)
|
|
46
53
|
);
|
|
47
|
-
function toggle() {
|
|
54
|
+
function toggle(event) {
|
|
48
55
|
if (props.disabled) return;
|
|
49
56
|
const next = !pressed.value;
|
|
50
57
|
pressed.value = next;
|
|
51
58
|
if (props.sound) sound.play(next ? "toggle-on" : "toggle-off");
|
|
52
59
|
props.onPressedChange?.(next);
|
|
60
|
+
callListener(props.onClick, event);
|
|
53
61
|
}
|
|
54
62
|
return (_ctx, _cache) => {
|
|
55
|
-
return openBlock(), createElementBlock("button", {
|
|
63
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
56
64
|
ref_key: "ref",
|
|
57
65
|
ref,
|
|
66
|
+
onClick: toggle
|
|
67
|
+
}, unref(attrs), {
|
|
58
68
|
type: "button",
|
|
59
|
-
class:
|
|
69
|
+
class: classes.value,
|
|
60
70
|
"aria-pressed": pressed.value,
|
|
61
|
-
"aria-label": __props.label,
|
|
62
|
-
disabled: __props.disabled
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
"aria-label": __props.label ?? unref(attrs)["aria-label"],
|
|
72
|
+
disabled: __props.disabled
|
|
73
|
+
}), [
|
|
74
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
75
|
+
__props.name && pressed.value && !__props.disabled ? (openBlock(), createElementBlock("input", {
|
|
76
|
+
key: 0,
|
|
77
|
+
type: "hidden",
|
|
78
|
+
name: __props.name,
|
|
79
|
+
value: __props.value ?? "on",
|
|
80
|
+
form: __props.form
|
|
81
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
82
|
+
], 16, _hoisted_1);
|
|
67
83
|
};
|
|
68
84
|
}
|
|
69
85
|
});
|
|
@@ -19,6 +19,17 @@ export interface ToggleGroupProps {
|
|
|
19
19
|
* default; only audible once the user has enabled sound.
|
|
20
20
|
*/
|
|
21
21
|
sound?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Form field name. When set, one hidden input named `name` is rendered per
|
|
24
|
+
* selected value, so a single group submits its value and a multiple group
|
|
25
|
+
* submits every selected one. Items are `type="button"` and never submit.
|
|
26
|
+
* A disabled group submits nothing. The selection is the group's data, so a
|
|
27
|
+
* selected item that is disabled on its own still submits: disabling an item
|
|
28
|
+
* locks that choice, it does not retract it.
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
/** `id` of the `<form>` the hidden inputs belong to, when not nested in it. */
|
|
32
|
+
form?: string;
|
|
22
33
|
}
|
|
23
34
|
declare const _default: typeof __VLS_export;
|
|
24
35
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ToggleGroup.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ToggleGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ToggleGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d179c149"]]);
|
|
5
5
|
export {
|
|
6
6
|
ToggleGroup as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, ref, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, ref, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createCommentVNode, Fragment, renderList } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { sound } from "../../sound/sound.js";
|
|
4
4
|
import { TOGGLE_GROUP_KEY } from "./types.js";
|
|
5
5
|
const _hoisted_1 = ["data-orientation", "aria-label"];
|
|
6
|
+
const _hoisted_2 = ["name", "value", "form", "disabled"];
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
...{ name: "ToggleGroup", inheritAttrs: false },
|
|
8
9
|
__name: "ToggleGroup",
|
|
@@ -14,7 +15,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
15
|
orientation: { default: "horizontal" },
|
|
15
16
|
label: {},
|
|
16
17
|
class: { type: [Boolean, null, String, Object, Array] },
|
|
17
|
-
sound: { type: Boolean, default: false }
|
|
18
|
+
sound: { type: Boolean, default: false },
|
|
19
|
+
name: { default: () => void 0 },
|
|
20
|
+
form: { default: () => void 0 }
|
|
18
21
|
}, {
|
|
19
22
|
"value": { default: "" },
|
|
20
23
|
"valueModifiers": {}
|
|
@@ -140,7 +143,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
140
143
|
role: "group",
|
|
141
144
|
"aria-label": __props.label
|
|
142
145
|
}, [
|
|
143
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
146
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
147
|
+
__props.name ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(selected.value, (picked) => {
|
|
148
|
+
return openBlock(), createElementBlock("input", {
|
|
149
|
+
key: picked,
|
|
150
|
+
type: "hidden",
|
|
151
|
+
name: __props.name,
|
|
152
|
+
value: picked,
|
|
153
|
+
form: __props.form,
|
|
154
|
+
disabled: __props.disabled || void 0
|
|
155
|
+
}, null, 8, _hoisted_2);
|
|
156
|
+
}), 128)) : createCommentVNode("", true)
|
|
144
157
|
], 10, _hoisted_1);
|
|
145
158
|
};
|
|
146
159
|
}
|
|
@@ -8,6 +8,12 @@ export interface ToggleGroupItemProps {
|
|
|
8
8
|
label?: string;
|
|
9
9
|
/** Additional CSS classes */
|
|
10
10
|
class?: HTMLAttributes["class"];
|
|
11
|
+
/** Called after the component's own handling, never while disabled. */
|
|
12
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
13
|
+
/** Called after the component's own handling, never while disabled. */
|
|
14
|
+
onFocus?: ((event: FocusEvent) => void) | ((event: FocusEvent) => void)[];
|
|
15
|
+
/** Called after the component's own handling, never while disabled. */
|
|
16
|
+
onKeydown?: ((event: KeyboardEvent) => void) | ((event: KeyboardEvent) => void)[];
|
|
11
17
|
}
|
|
12
18
|
declare const _default: typeof __VLS_export;
|
|
13
19
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ToggleGroupItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ToggleGroupItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ToggleGroupItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-463035bc"]]);
|
|
5
5
|
export {
|
|
6
6
|
ToggleGroupItem as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock, mergeProps, unref, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { TOGGLE_GROUP_KEY } from "./types.js";
|
|
4
5
|
const _hoisted_1 = ["data-value", "data-size", "disabled", "aria-pressed", "aria-label", "tabindex"];
|
|
@@ -9,9 +10,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
10
|
value: {},
|
|
10
11
|
disabled: { type: Boolean, default: false },
|
|
11
12
|
label: {},
|
|
12
|
-
class: { type: [Boolean, null, String, Object, Array] }
|
|
13
|
+
class: { type: [Boolean, null, String, Object, Array] },
|
|
14
|
+
onClick: { type: [Function, Array] },
|
|
15
|
+
onFocus: { type: [Function, Array] },
|
|
16
|
+
onKeydown: { type: [Function, Array] }
|
|
13
17
|
},
|
|
14
18
|
setup(__props, { expose: __expose }) {
|
|
19
|
+
const attrs = useAttrs();
|
|
15
20
|
const el = useTemplateRef("el");
|
|
16
21
|
__expose({ ref: el });
|
|
17
22
|
const group = TOGGLE_GROUP_KEY.useOptional();
|
|
@@ -60,18 +65,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
65
|
},
|
|
61
66
|
{ flush: "post" }
|
|
62
67
|
);
|
|
63
|
-
function handleClick() {
|
|
68
|
+
function handleClick(event) {
|
|
64
69
|
if (isDisabled.value) return;
|
|
65
70
|
group?.toggle(__props.value);
|
|
66
71
|
group?.focus(__props.value);
|
|
67
72
|
el.value?.focus();
|
|
73
|
+
callListener(__props.onClick, event);
|
|
68
74
|
}
|
|
69
|
-
function handleFocus() {
|
|
75
|
+
function handleFocus(event) {
|
|
70
76
|
if (isDisabled.value) return;
|
|
71
77
|
group?.focus(__props.value);
|
|
78
|
+
callListener(__props.onFocus, event);
|
|
72
79
|
}
|
|
73
80
|
function handleKeydown(event) {
|
|
74
|
-
if (
|
|
81
|
+
if (isDisabled.value) return;
|
|
82
|
+
handleNavigationKey(event);
|
|
83
|
+
callListener(__props.onKeydown, event);
|
|
84
|
+
}
|
|
85
|
+
function handleNavigationKey(event) {
|
|
86
|
+
if (!group) return;
|
|
75
87
|
switch (event.key) {
|
|
76
88
|
case "ArrowRight":
|
|
77
89
|
case "ArrowDown":
|
|
@@ -94,26 +106,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
106
|
}
|
|
95
107
|
}
|
|
96
108
|
return (_ctx, _cache) => {
|
|
97
|
-
return openBlock(), createElementBlock("button", {
|
|
109
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
98
110
|
ref_key: "el",
|
|
99
111
|
ref: el,
|
|
112
|
+
onClick: handleClick,
|
|
113
|
+
onFocus: handleFocus,
|
|
114
|
+
onKeydown: handleKeydown
|
|
115
|
+
}, unref(attrs), {
|
|
100
116
|
type: "button",
|
|
101
117
|
"data-ft-toggle-item": "",
|
|
102
118
|
"data-value": __props.value,
|
|
103
119
|
"data-size": size.value,
|
|
104
|
-
class:
|
|
120
|
+
class: classes.value,
|
|
105
121
|
disabled: isDisabled.value,
|
|
106
122
|
"aria-pressed": isSelected.value,
|
|
107
|
-
"aria-label": __props.label,
|
|
108
|
-
tabindex: tabIndexAttr.value
|
|
109
|
-
|
|
110
|
-
onFocus: handleFocus,
|
|
111
|
-
onKeydown: handleKeydown
|
|
112
|
-
}, [
|
|
123
|
+
"aria-label": __props.label ?? unref(attrs)["aria-label"],
|
|
124
|
+
tabindex: tabIndexAttr.value ?? unref(attrs).tabindex
|
|
125
|
+
}), [
|
|
113
126
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
114
127
|
createTextVNode(toDisplayString(__props.label ?? __props.value), 1)
|
|
115
128
|
], true)
|
|
116
|
-
],
|
|
129
|
+
], 16, _hoisted_1);
|
|
117
130
|
};
|
|
118
131
|
}
|
|
119
132
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, shallowRef, useTemplateRef, watch, onBeforeUnmount, computed, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, createCommentVNode, normalizeClass, renderSlot, withCtx, normalizeStyle, unref, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
|
+
import { isDev } from "../../internals/env.js";
|
|
3
4
|
import _sfc_main$1 from "../../internals/Portal.vue.js";
|
|
4
5
|
import { useFancyId } from "../../internals/use-id.js";
|
|
5
6
|
import { useAnchorPosition } from "../../internals/use-anchor-position.js";
|
|
@@ -7,6 +8,13 @@ import { useDismissable } from "../../internals/use-dismissable.js";
|
|
|
7
8
|
import { anchored, originFor } from "../../internals/motion/anchored.js";
|
|
8
9
|
import { runTransition } from "../../internals/motion/animate.js";
|
|
9
10
|
const _hoisted_1 = ["id", "data-side", "data-align"];
|
|
11
|
+
function isFocusable(el) {
|
|
12
|
+
if (el.disabled) return false;
|
|
13
|
+
if (["BUTTON", "INPUT", "SELECT", "TEXTAREA"].includes(el.tagName)) return true;
|
|
14
|
+
if (el.tagName === "A" && el.hasAttribute("href")) return true;
|
|
15
|
+
const tabindex = el.getAttribute("tabindex");
|
|
16
|
+
return tabindex !== null && tabindex !== "-1";
|
|
17
|
+
}
|
|
10
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
19
|
...{ name: "Tooltip", inheritAttrs: false },
|
|
12
20
|
__name: "Tooltip",
|
|
@@ -137,6 +145,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
137
145
|
updateVisibility();
|
|
138
146
|
}
|
|
139
147
|
if (!el) return;
|
|
148
|
+
if (isDev && !isFocusable(el)) {
|
|
149
|
+
console.warn(
|
|
150
|
+
"[Tooltip] The first element rendered by `children` is not focusable, so this tooltip is unreachable by keyboard even though it will still open on hover. Render a real interactive element (a <button>, <a href>, or similar) as the first thing inside `children`."
|
|
151
|
+
);
|
|
152
|
+
}
|
|
140
153
|
el.addEventListener("pointerenter", handlePointerEnter);
|
|
141
154
|
el.addEventListener("pointerleave", handlePointerLeave);
|
|
142
155
|
el.addEventListener("focus", handleFocus);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TypingIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const TypingIndicator = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const TypingIndicator = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-427c8a36"]]);
|
|
5
5
|
export {
|
|
6
6
|
TypingIndicator as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
const _hoisted_1 = { class: "sr-only" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -12,6 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
13
13
|
},
|
|
14
14
|
setup(__props, { expose: __expose }) {
|
|
15
|
+
const attrs = useAttrs();
|
|
15
16
|
const el = useTemplateRef("el");
|
|
16
17
|
__expose({ ref: el });
|
|
17
18
|
const cycle = computed(() => Math.max(0.01, __props.speed));
|
|
@@ -27,14 +28,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
() => [0, 1, 2].map((i) => `animation-delay:${Number((i * cycle.value / 6).toFixed(4))}s`)
|
|
28
29
|
);
|
|
29
30
|
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createElementBlock("div", {
|
|
31
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
31
32
|
ref_key: "el",
|
|
32
33
|
ref: el,
|
|
33
|
-
class:
|
|
34
|
-
style:
|
|
34
|
+
class: unref(cn)("inline-flex items-center", __props.class),
|
|
35
|
+
style: rootStyle.value,
|
|
35
36
|
role: "status",
|
|
36
37
|
"aria-live": "polite"
|
|
37
|
-
}, [
|
|
38
|
+
}), [
|
|
38
39
|
(openBlock(true), createElementBlock(Fragment, null, renderList(dotStyles.value, (dotStyle, i) => {
|
|
39
40
|
return openBlock(), createElementBlock("span", {
|
|
40
41
|
key: i,
|
|
@@ -44,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
45
|
}, null, 4);
|
|
45
46
|
}), 128)),
|
|
46
47
|
createElementVNode("span", _hoisted_1, toDisplayString(__props.label), 1)
|
|
47
|
-
],
|
|
48
|
+
], 16);
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { cn } from "./utils.js";
|
|
|
2
2
|
export * from "./sound/index.js";
|
|
3
3
|
export type * from "./internals/ai-types.js";
|
|
4
4
|
export type * from "./internals/motion/types.js";
|
|
5
|
+
export * from "./components/accordion/index.js";
|
|
5
6
|
export * from "./components/agent-plan/index.js";
|
|
6
7
|
export * from "./components/ai-data-table/index.js";
|
|
7
8
|
export * from "./components/alert-dialog/index.js";
|
|
@@ -12,6 +13,8 @@ export * from "./components/apple-card-carousel/index.js";
|
|
|
12
13
|
export * from "./components/approval-card/index.js";
|
|
13
14
|
export * from "./components/artifact-card/index.js";
|
|
14
15
|
export * from "./components/autocomplete/index.js";
|
|
16
|
+
export * from "./components/avatar/index.js";
|
|
17
|
+
export * from "./components/badge/index.js";
|
|
15
18
|
export * from "./components/bento-grid/index.js";
|
|
16
19
|
export * from "./components/bg-falling-stars/index.js";
|
|
17
20
|
export * from "./components/bg-stars/index.js";
|
|
@@ -29,6 +32,7 @@ export * from "./components/chat-message/index.js";
|
|
|
29
32
|
export * from "./components/chat-panel/index.js";
|
|
30
33
|
export * from "./components/checkbox/index.js";
|
|
31
34
|
export * from "./components/code-diff/index.js";
|
|
35
|
+
export * from "./components/collapsible/index.js";
|
|
32
36
|
export * from "./components/colourful-text/index.js";
|
|
33
37
|
export * from "./components/combobox/index.js";
|
|
34
38
|
export * from "./components/command-menu/index.js";
|
|
@@ -57,6 +61,7 @@ export * from "./components/flip-card/index.js";
|
|
|
57
61
|
export * from "./components/flip-words/index.js";
|
|
58
62
|
export * from "./components/fluid-cursor/index.js";
|
|
59
63
|
export * from "./components/focus/index.js";
|
|
64
|
+
export * from "./components/follow-button/index.js";
|
|
60
65
|
export * from "./components/form-field/index.js";
|
|
61
66
|
export * from "./components/frosted-glass/index.js";
|
|
62
67
|
export * from "./components/glare-card/index.js";
|
|
@@ -135,6 +140,7 @@ export * from "./components/text-roll/index.js";
|
|
|
135
140
|
export * from "./components/textarea/index.js";
|
|
136
141
|
export * from "./components/thinking-indicator/index.js";
|
|
137
142
|
export * from "./components/thread-list/index.js";
|
|
143
|
+
export * from "./components/tick-nav/index.js";
|
|
138
144
|
export * from "./components/time-picker/index.js";
|
|
139
145
|
export * from "./components/timeline/index.js";
|
|
140
146
|
export * from "./components/toast/index.js";
|