fancy-ui-vue 0.1.1 → 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 +40 -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,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, useTemplateRef, inject, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, renderSlot, unref, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { SIDEBAR_KEY } from "./types.js";
|
|
4
5
|
import { sound } from "../../sound/sound.js";
|
|
@@ -32,7 +33,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
33
|
badge: {},
|
|
33
34
|
badgeLabel: {},
|
|
34
35
|
disabled: { type: Boolean, default: false },
|
|
35
|
-
|
|
36
|
+
onClick: { type: [Function, Array] },
|
|
37
|
+
onclick: { type: [Function, Array] },
|
|
36
38
|
class: { type: [Boolean, null, String, Object, Array] },
|
|
37
39
|
sound: { type: Boolean, default: false }
|
|
38
40
|
},
|
|
@@ -58,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
60
|
return;
|
|
59
61
|
}
|
|
60
62
|
if (__props.sound && !__props.current) sound.play("select");
|
|
61
|
-
__props.onclick
|
|
63
|
+
callListener(__props.onClick ?? __props.onclick, event);
|
|
62
64
|
}
|
|
63
65
|
return (_ctx, _cache) => {
|
|
64
66
|
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
@@ -4,6 +4,10 @@ export interface SliderProps {
|
|
|
4
4
|
value?: number;
|
|
5
5
|
/** Called with the new value on every input event. */
|
|
6
6
|
onValueChange?: (value: number) => void;
|
|
7
|
+
/** A consumer `@input`, run once after the internal value update. */
|
|
8
|
+
onInput?: (event: Event) => void;
|
|
9
|
+
/** A consumer `@change`, run once after the internal handling. */
|
|
10
|
+
onChange?: (event: Event) => void;
|
|
7
11
|
/** Lower bound. */
|
|
8
12
|
min?: number;
|
|
9
13
|
/** Upper bound. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Slider.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c74d57e5"]]);
|
|
5
5
|
export {
|
|
6
6
|
Slider as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, onMounted, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, normalizeStyle, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useAttrs, useModel, useTemplateRef, computed, onMounted, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, normalizeStyle, toDisplayString, mergeProps } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
4
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
@@ -14,6 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
props: /* @__PURE__ */ mergeModels({
|
|
15
15
|
value: {},
|
|
16
16
|
onValueChange: { type: Function },
|
|
17
|
+
onInput: { type: Function },
|
|
18
|
+
onChange: { type: Function },
|
|
17
19
|
min: { default: 0 },
|
|
18
20
|
max: { default: 100 },
|
|
19
21
|
step: { default: 1 },
|
|
@@ -31,6 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
33
|
}),
|
|
32
34
|
emits: ["update:value"],
|
|
33
35
|
setup(__props, { expose: __expose }) {
|
|
36
|
+
const attrs = useAttrs();
|
|
34
37
|
const value = useModel(__props, "value");
|
|
35
38
|
const el = useTemplateRef("el");
|
|
36
39
|
__expose({ ref: el });
|
|
@@ -52,16 +55,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
55
|
const fraction = computed(
|
|
53
56
|
() => __props.max > __props.min ? Math.min(1, Math.max(0, (clampedValue.value - __props.min) / (__props.max - __props.min))) : 0
|
|
54
57
|
);
|
|
58
|
+
function callListener(listener, ...args) {
|
|
59
|
+
if (Array.isArray(listener)) {
|
|
60
|
+
for (const fn of listener) if (typeof fn === "function") fn(...args);
|
|
61
|
+
} else if (typeof listener === "function") {
|
|
62
|
+
listener(...args);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
55
65
|
function handleInput(event) {
|
|
56
66
|
if (effectiveDisabled.value) return;
|
|
57
67
|
const next = Number(event.currentTarget.value);
|
|
58
68
|
value.value = next;
|
|
59
69
|
__props.onValueChange?.(next);
|
|
70
|
+
callListener(__props.onInput, event);
|
|
60
71
|
}
|
|
61
72
|
const playCue = useSoundCue(() => __props.sound);
|
|
62
|
-
function handleChange() {
|
|
73
|
+
function handleChange(event) {
|
|
63
74
|
if (effectiveDisabled.value) return;
|
|
64
75
|
playCue("tick");
|
|
76
|
+
callListener(__props.onChange, event);
|
|
65
77
|
}
|
|
66
78
|
return (_ctx, _cache) => {
|
|
67
79
|
return openBlock(), createElementBlock("div", {
|
|
@@ -77,7 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
89
|
style: normalizeStyle({ left: `${fraction.value * 100}%`, color: "var(--ft-slider-accent-end)" }),
|
|
78
90
|
"aria-hidden": "true"
|
|
79
91
|
}, toDisplayString(clampedValue.value), 5)) : createCommentVNode("", true),
|
|
80
|
-
createElementVNode("input", {
|
|
92
|
+
createElementVNode("input", mergeProps(unref(attrs), {
|
|
81
93
|
ref_key: "el",
|
|
82
94
|
ref: el,
|
|
83
95
|
type: "range",
|
|
@@ -89,16 +101,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
101
|
step: __props.step,
|
|
90
102
|
value: clampedValue.value,
|
|
91
103
|
disabled: effectiveDisabled.value,
|
|
92
|
-
"aria-describedby": unref(field)?.describedBy,
|
|
93
|
-
"aria-invalid": effectiveInvalid.value ? "true" :
|
|
104
|
+
"aria-describedby": [unref(field)?.describedBy, unref(attrs)["aria-describedby"]].filter(Boolean).join(" ") || void 0,
|
|
105
|
+
"aria-invalid": effectiveInvalid.value ? "true" : unref(attrs)["aria-invalid"],
|
|
94
106
|
"aria-valuemin": __props.min,
|
|
95
107
|
"aria-valuemax": __props.max,
|
|
96
108
|
"aria-valuenow": clampedValue.value,
|
|
97
|
-
"aria-label": __props.label,
|
|
98
|
-
style:
|
|
109
|
+
"aria-label": __props.label ?? unref(attrs)["aria-label"],
|
|
110
|
+
style: { "--ft-slider-fill": `${fraction.value * 100}%` },
|
|
99
111
|
onInput: handleInput,
|
|
100
112
|
onChange: handleChange
|
|
101
|
-
}, null,
|
|
113
|
+
}), null, 16, _hoisted_1)
|
|
102
114
|
], 4),
|
|
103
115
|
__props.showBounds ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
104
116
|
createElementVNode("span", null, toDisplayString(__props.min), 1),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SourcesTrigger.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SourcesTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SourcesTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-28d2d62f"]]);
|
|
5
5
|
export {
|
|
6
6
|
SourcesTrigger as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, inject, computed, createElementBlock, openBlock, mergeProps, unref, createCommentVNode, createElementVNode, Fragment, renderList, toDisplayString, normalizeClass } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { monogram, hostOf } from "../../internals/host.js";
|
|
4
4
|
import { SOURCES_CONTEXT_KEY } from "./types.js";
|
|
@@ -17,6 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
18
18
|
},
|
|
19
19
|
setup(__props) {
|
|
20
|
+
const attrs = useAttrs();
|
|
20
21
|
const STACK_LIMIT = 3;
|
|
21
22
|
const sources = inject(SOURCES_CONTEXT_KEY, void 0);
|
|
22
23
|
const count = computed(() => sources?.count ?? 0);
|
|
@@ -24,18 +25,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
25
|
const stack = computed(() => (sources?.sources ?? []).slice(0, STACK_LIMIT));
|
|
25
26
|
const text = computed(() => __props.label ?? `${count.value} ${count.value === 1 ? "source" : "sources"}`);
|
|
26
27
|
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createElementBlock("button", {
|
|
28
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
29
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(sources)?.toggle())
|
|
30
|
+
}, unref(attrs), {
|
|
28
31
|
type: "button",
|
|
29
|
-
class:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__props.class
|
|
33
|
-
)
|
|
32
|
+
class: unref(cn)(
|
|
33
|
+
"ft-sources-trigger text-muted-foreground hover:text-foreground inline-flex items-center gap-2 rounded-full px-2 py-1 text-xs",
|
|
34
|
+
__props.class
|
|
34
35
|
),
|
|
35
36
|
"aria-expanded": isOpen.value,
|
|
36
|
-
"aria-controls": unref(sources)?.listId
|
|
37
|
-
|
|
38
|
-
}, [
|
|
37
|
+
"aria-controls": unref(sources)?.listId
|
|
38
|
+
}), [
|
|
39
39
|
stack.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
40
40
|
(openBlock(true), createElementBlock(Fragment, null, renderList(stack.value, (source) => {
|
|
41
41
|
return openBlock(), createElementBlock("span", {
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
}, [..._cache[1] || (_cache[1] = [
|
|
58
58
|
createElementVNode("path", { d: "m9 6 6 6-6 6" }, null, -1)
|
|
59
59
|
])], 2))
|
|
60
|
-
],
|
|
60
|
+
], 16, _hoisted_1);
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
});
|
|
@@ -15,7 +15,7 @@ export interface SparklesInitOptions {
|
|
|
15
15
|
particleDensity?: number;
|
|
16
16
|
}
|
|
17
17
|
export interface SparklesLiveOptions {
|
|
18
|
-
/** Hex color (e.g. "#ffffff") particles are filled with; re-read every frame. */
|
|
18
|
+
/** Hex color (e.g. "#ffffff") or `currentColor` particles are filled with; re-read every frame. */
|
|
19
19
|
particleColor?: string;
|
|
20
20
|
}
|
|
21
21
|
export interface SparklesEngine {
|
|
@@ -3,6 +3,33 @@ const DEFAULT_MAX_SIZE = 3;
|
|
|
3
3
|
const DEFAULT_SPEED = 4;
|
|
4
4
|
const DEFAULT_PARTICLE_DENSITY = 120;
|
|
5
5
|
const DEFAULT_PARTICLE_COLOR = "#ffffff";
|
|
6
|
+
const CURRENT_COLOR = /^\s*currentcolor\s*$/i;
|
|
7
|
+
function resolveCurrentColor(color, el) {
|
|
8
|
+
if (!CURRENT_COLOR.test(color)) return color;
|
|
9
|
+
const computed = getComputedStyle(el).color;
|
|
10
|
+
let r = 0;
|
|
11
|
+
let g = 0;
|
|
12
|
+
let b = 0;
|
|
13
|
+
const m = /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i.exec(computed);
|
|
14
|
+
if (m) {
|
|
15
|
+
r = Math.round(+m[1]);
|
|
16
|
+
g = Math.round(+m[2]);
|
|
17
|
+
b = Math.round(+m[3]);
|
|
18
|
+
} else if (computed) {
|
|
19
|
+
try {
|
|
20
|
+
const probe = document.createElement("canvas");
|
|
21
|
+
probe.width = probe.height = 1;
|
|
22
|
+
const pctx = probe.getContext("2d", { willReadFrequently: true });
|
|
23
|
+
if (pctx) {
|
|
24
|
+
pctx.fillStyle = computed;
|
|
25
|
+
pctx.fillRect(0, 0, 1, 1);
|
|
26
|
+
[r = 0, g = 0, b = 0] = pctx.getImageData(0, 0, 1, 1).data;
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return `#${[r, g, b].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
32
|
+
}
|
|
6
33
|
function createSparkles(elements, options, random = Math.random) {
|
|
7
34
|
const { canvas, container } = elements;
|
|
8
35
|
let ctx = canvas.getContext("2d");
|
|
@@ -45,6 +72,7 @@ function createSparkles(elements, options, random = Math.random) {
|
|
|
45
72
|
function updateAndDraw() {
|
|
46
73
|
if (!ctx) return;
|
|
47
74
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
75
|
+
const fill = resolveCurrentColor(particleColor, canvas);
|
|
48
76
|
for (const p of particles) {
|
|
49
77
|
p.x += p.vx;
|
|
50
78
|
p.y += p.vy;
|
|
@@ -55,8 +83,14 @@ function createSparkles(elements, options, random = Math.random) {
|
|
|
55
83
|
p.phase = (p.phase + p.phaseSpeed) % (Math.PI * 2);
|
|
56
84
|
const opacity = 0.3 + (Math.sin(p.phase) * 0.3 + 0.3);
|
|
57
85
|
ctx.beginPath();
|
|
58
|
-
ctx.arc(
|
|
59
|
-
|
|
86
|
+
ctx.arc(
|
|
87
|
+
p.x * canvas.width / (100 * dpr),
|
|
88
|
+
p.y * canvas.height / (100 * dpr),
|
|
89
|
+
p.size,
|
|
90
|
+
0,
|
|
91
|
+
Math.PI * 2
|
|
92
|
+
);
|
|
93
|
+
ctx.fillStyle = `${fill}${Math.floor(opacity * 255).toString(16).padStart(2, "0")}`;
|
|
60
94
|
ctx.fill();
|
|
61
95
|
}
|
|
62
96
|
rafId = requestAnimationFrame(updateAndDraw);
|
|
@@ -3,6 +3,8 @@ export type SwitchSize = "sm" | "md" | "lg";
|
|
|
3
3
|
export interface SwitchProps {
|
|
4
4
|
/** Called with the new value whenever the switch is activated. */
|
|
5
5
|
onCheckedChange?: (checked: boolean) => void;
|
|
6
|
+
/** A consumer `@change`, run once after the internal toggle. */
|
|
7
|
+
onChange?: (event: Event) => void;
|
|
6
8
|
/** Blocks interaction; excluded from form submission. Overridden by a surrounding FormField. */
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
/** Native `required`. Overridden by a surrounding FormField. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Switch.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d5a3b899"]]);
|
|
5
5
|
export {
|
|
6
6
|
Switch as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, unref, nextTick } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useAttrs, useModel, useTemplateRef, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, mergeProps, unref, nextTick } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
4
|
import { sound } from "../../sound/sound.js";
|
|
@@ -8,6 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
__name: "Switch",
|
|
9
9
|
props: /* @__PURE__ */ mergeModels({
|
|
10
10
|
onCheckedChange: { type: Function },
|
|
11
|
+
onChange: { type: Function },
|
|
11
12
|
disabled: { type: Boolean, default: false },
|
|
12
13
|
required: { type: Boolean, default: false },
|
|
13
14
|
id: {},
|
|
@@ -23,6 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
24
|
}),
|
|
24
25
|
emits: ["update:checked"],
|
|
25
26
|
setup(__props, { expose: __expose }) {
|
|
27
|
+
const attrs = useAttrs();
|
|
26
28
|
const checked = useModel(__props, "checked");
|
|
27
29
|
const el = useTemplateRef("ref");
|
|
28
30
|
__expose({ ref: el });
|
|
@@ -31,6 +33,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
33
|
const effectiveDisabled = computed(() => field?.disabled ?? __props.disabled);
|
|
32
34
|
const effectiveRequired = computed(() => field?.required ?? __props.required);
|
|
33
35
|
const effectiveInvalid = computed(() => field?.invalid ?? false);
|
|
36
|
+
function callListener(listener, ...args) {
|
|
37
|
+
if (Array.isArray(listener)) {
|
|
38
|
+
for (const fn of listener) if (typeof fn === "function") fn(...args);
|
|
39
|
+
} else if (typeof listener === "function") {
|
|
40
|
+
listener(...args);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
34
43
|
function handleChange(event) {
|
|
35
44
|
const input = event.currentTarget;
|
|
36
45
|
if (effectiveDisabled.value) {
|
|
@@ -41,6 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
50
|
checked.value = next;
|
|
42
51
|
if (__props.sound) sound.play(next ? "toggle-on" : "toggle-off");
|
|
43
52
|
__props.onCheckedChange?.(next);
|
|
53
|
+
callListener(__props.onChange, event);
|
|
44
54
|
nextTick().then(() => {
|
|
45
55
|
input.checked = checked.value;
|
|
46
56
|
});
|
|
@@ -56,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
66
|
return openBlock(), createElementBlock("label", {
|
|
57
67
|
class: normalizeClass(wrapperClasses.value)
|
|
58
68
|
}, [
|
|
59
|
-
createElementVNode("input", {
|
|
69
|
+
createElementVNode("input", mergeProps(unref(attrs), {
|
|
60
70
|
ref: "ref",
|
|
61
71
|
type: "checkbox",
|
|
62
72
|
role: "switch",
|
|
@@ -69,11 +79,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
79
|
disabled: effectiveDisabled.value,
|
|
70
80
|
required: effectiveRequired.value,
|
|
71
81
|
"aria-checked": checked.value,
|
|
72
|
-
"aria-invalid": effectiveInvalid.value ? "true" :
|
|
73
|
-
"aria-describedby": unref(field)?.describedBy,
|
|
74
|
-
"aria-label": __props.label,
|
|
82
|
+
"aria-invalid": effectiveInvalid.value ? "true" : unref(attrs)["aria-invalid"],
|
|
83
|
+
"aria-describedby": [unref(field)?.describedBy, unref(attrs)["aria-describedby"]].filter(Boolean).join(" ") || void 0,
|
|
84
|
+
"aria-label": __props.label ?? unref(attrs)["aria-label"],
|
|
75
85
|
onChange: handleChange
|
|
76
|
-
}, null,
|
|
86
|
+
}), null, 16, _hoisted_1),
|
|
77
87
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
78
88
|
], 2);
|
|
79
89
|
};
|
|
@@ -6,6 +6,12 @@ export interface TabsTriggerProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/** Additional CSS classes. */
|
|
8
8
|
class?: HTMLAttributes["class"];
|
|
9
|
+
/** Called after the component's own handling, never while disabled. */
|
|
10
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
11
|
+
/** Called after the component's own handling, never while disabled. */
|
|
12
|
+
onFocus?: ((event: FocusEvent) => void) | ((event: FocusEvent) => void)[];
|
|
13
|
+
/** Called after the component's own handling, never while disabled. */
|
|
14
|
+
onKeydown?: ((event: KeyboardEvent) => void) | ((event: KeyboardEvent) => void)[];
|
|
9
15
|
}
|
|
10
16
|
declare const _default: typeof __VLS_export;
|
|
11
17
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TabsTrigger.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const TabsTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const TabsTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bea30724"]]);
|
|
5
5
|
export {
|
|
6
6
|
TabsTrigger 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 } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { TABS_KEY } from "./types.js";
|
|
4
5
|
const _hoisted_1 = ["data-value", "data-orientation", "data-variant", "id", "disabled", "aria-selected", "aria-controls", "tabindex"];
|
|
@@ -8,9 +9,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
9
|
props: {
|
|
9
10
|
value: {},
|
|
10
11
|
disabled: { type: Boolean, default: false },
|
|
11
|
-
class: { type: [Boolean, null, String, Object, Array] }
|
|
12
|
+
class: { type: [Boolean, null, String, Object, Array] },
|
|
13
|
+
onClick: { type: [Function, Array] },
|
|
14
|
+
onFocus: { type: [Function, Array] },
|
|
15
|
+
onKeydown: { type: [Function, Array] }
|
|
12
16
|
},
|
|
13
17
|
setup(__props, { expose: __expose }) {
|
|
18
|
+
const attrs = useAttrs();
|
|
14
19
|
const el = useTemplateRef("el");
|
|
15
20
|
__expose({ ref: el });
|
|
16
21
|
const context = TABS_KEY.useOptional();
|
|
@@ -77,18 +82,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
82
|
},
|
|
78
83
|
{ flush: "post" }
|
|
79
84
|
);
|
|
80
|
-
function handleClick() {
|
|
85
|
+
function handleClick(event) {
|
|
81
86
|
if (isDisabled.value) return;
|
|
82
87
|
context?.select(__props.value);
|
|
83
88
|
context?.focus(__props.value);
|
|
84
89
|
el.value?.focus();
|
|
90
|
+
callListener(__props.onClick, event);
|
|
85
91
|
}
|
|
86
|
-
function handleFocus() {
|
|
92
|
+
function handleFocus(event) {
|
|
87
93
|
if (isDisabled.value) return;
|
|
88
94
|
context?.focus(__props.value);
|
|
95
|
+
callListener(__props.onFocus, event);
|
|
89
96
|
}
|
|
90
97
|
function handleKeydown(event) {
|
|
91
|
-
if (
|
|
98
|
+
if (isDisabled.value) return;
|
|
99
|
+
handleNavigationKey(event);
|
|
100
|
+
callListener(__props.onKeydown, event);
|
|
101
|
+
}
|
|
102
|
+
function handleNavigationKey(event) {
|
|
103
|
+
if (!context) return;
|
|
92
104
|
const horizontal = context.orientation === "horizontal";
|
|
93
105
|
switch (event.key) {
|
|
94
106
|
case "ArrowRight":
|
|
@@ -122,27 +134,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
134
|
}
|
|
123
135
|
}
|
|
124
136
|
return (_ctx, _cache) => {
|
|
125
|
-
return openBlock(), createElementBlock("button", {
|
|
137
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
126
138
|
ref_key: "el",
|
|
127
139
|
ref: el,
|
|
140
|
+
onClick: handleClick,
|
|
141
|
+
onFocus: handleFocus,
|
|
142
|
+
onKeydown: handleKeydown
|
|
143
|
+
}, unref(attrs), {
|
|
128
144
|
type: "button",
|
|
129
145
|
role: "tab",
|
|
130
146
|
"data-ft-tabs-trigger": "",
|
|
131
147
|
"data-value": __props.value,
|
|
132
148
|
"data-orientation": orientation.value,
|
|
133
149
|
"data-variant": variant.value,
|
|
134
|
-
id: unref(context)?.triggerId(__props.value),
|
|
135
|
-
class:
|
|
150
|
+
id: unref(context)?.triggerId(__props.value) ?? unref(attrs).id,
|
|
151
|
+
class: classes.value,
|
|
136
152
|
disabled: isDisabled.value,
|
|
137
153
|
"aria-selected": isSelected.value,
|
|
138
|
-
"aria-controls": unref(context)?.panelId(__props.value),
|
|
139
|
-
tabindex: tabIndexAttr.value
|
|
140
|
-
|
|
141
|
-
onFocus: handleFocus,
|
|
142
|
-
onKeydown: handleKeydown
|
|
143
|
-
}, [
|
|
154
|
+
"aria-controls": unref(context)?.panelId(__props.value) ?? unref(attrs)["aria-controls"],
|
|
155
|
+
tabindex: tabIndexAttr.value ?? unref(attrs).tabindex
|
|
156
|
+
}), [
|
|
144
157
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
145
|
-
],
|
|
158
|
+
], 16, _hoisted_1);
|
|
146
159
|
};
|
|
147
160
|
}
|
|
148
161
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TerminalBlock.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const TerminalBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const TerminalBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c2a6f2a"]]);
|
|
5
5
|
export {
|
|
6
6
|
TerminalBlock 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, createCommentVNode, createElementVNode, renderSlot, normalizeStyle, toDisplayString, Fragment, renderList, normalizeClass } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useAutoscroll } from "../../internals/use-autoscroll.js";
|
|
4
4
|
import { parseAnsi } from "./ansi.js";
|
|
@@ -40,6 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
41
41
|
},
|
|
42
42
|
setup(__props, { expose: __expose }) {
|
|
43
|
+
const attrs = useAttrs();
|
|
43
44
|
const el = useTemplateRef("el");
|
|
44
45
|
__expose({ ref: el });
|
|
45
46
|
const log = useTemplateRef("log");
|
|
@@ -87,10 +88,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
88
|
return lines;
|
|
88
89
|
}
|
|
89
90
|
function segmentAttrs(segment) {
|
|
90
|
-
const
|
|
91
|
-
if (segment.bold)
|
|
92
|
-
if (segment.fg !== null)
|
|
93
|
-
return
|
|
91
|
+
const out = {};
|
|
92
|
+
if (segment.bold) out.class = "ft-bold";
|
|
93
|
+
if (segment.fg !== null) out.style = { color: colour(segment.fg) };
|
|
94
|
+
return out;
|
|
94
95
|
}
|
|
95
96
|
function colour(fg) {
|
|
96
97
|
if (fg === null) return void 0;
|
|
@@ -109,11 +110,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
110
|
return `${minutes}m ${seconds < 10 ? "0" : ""}${seconds}s`;
|
|
110
111
|
}
|
|
111
112
|
return (_ctx, _cache) => {
|
|
112
|
-
return openBlock(), createElementBlock("div", {
|
|
113
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
113
114
|
ref_key: "el",
|
|
114
115
|
ref: el,
|
|
115
|
-
class:
|
|
116
|
-
}, [
|
|
116
|
+
class: unref(cn)("ft-terminal overflow-hidden rounded-lg font-mono text-sm", __props.class)
|
|
117
|
+
}), [
|
|
117
118
|
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
118
119
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
119
120
|
])) : createCommentVNode("", true),
|
|
@@ -149,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
149
150
|
createElementVNode("span", null, "exited " + toDisplayString(__props.exitCode), 1),
|
|
150
151
|
duration.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(duration.value), 1)) : createCommentVNode("", true)
|
|
151
152
|
], 2)) : createCommentVNode("", true)
|
|
152
|
-
],
|
|
153
|
+
], 16);
|
|
153
154
|
};
|
|
154
155
|
}
|
|
155
156
|
});
|
|
@@ -38,7 +38,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
isMouseOver.value = true;
|
|
39
39
|
}
|
|
40
40
|
function touchMoveHandler(event) {
|
|
41
|
-
event.preventDefault();
|
|
42
41
|
const card = cardRef.value;
|
|
43
42
|
if (card) {
|
|
44
43
|
const rect = card.getBoundingClientRect();
|
|
@@ -52,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
51
|
ref: cardRef,
|
|
53
52
|
class: normalizeClass(
|
|
54
53
|
unref(cn)(
|
|
55
|
-
"relative w-full max-w-[40rem] overflow-hidden rounded-lg border border-white/[0.08] bg-[#1d1c20] p-4 sm:p-6 md:p-8",
|
|
54
|
+
"relative w-full max-w-[40rem] touch-pan-y touch-pinch-zoom overflow-hidden rounded-lg border border-white/[0.08] bg-[#1d1c20] p-4 sm:p-6 md:p-8",
|
|
56
55
|
__props.class
|
|
57
56
|
)
|
|
58
57
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Textarea.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8739af06"]]);
|
|
5
5
|
export {
|
|
6
6
|
Textarea as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, useTemplateRef, onMounted, watch, createElementBlock, openBlock, createElementVNode, createCommentVNode,
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, useAttrs, useTemplateRef, onMounted, watch, createElementBlock, openBlock, createElementVNode, createCommentVNode, mergeProps, unref, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
|
+
import { mergeIds } from "../../internals/merge-ids.js";
|
|
4
5
|
import { useFancyId } from "../../internals/use-id.js";
|
|
5
6
|
const _hoisted_1 = { class: "ft-textarea-wrapper flex w-full flex-col gap-1.5" };
|
|
6
7
|
const _hoisted_2 = ["id", "placeholder", "name", "autocomplete", "rows", "maxlength", "disabled", "readonly", "required", "aria-invalid", "aria-describedby", "aria-label", "value"];
|
|
@@ -37,13 +38,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
const effectiveDisabled = computed(() => field?.disabled ?? __props.disabled);
|
|
38
39
|
const effectiveRequired = computed(() => field?.required ?? __props.required);
|
|
39
40
|
const effectiveInvalid = computed(() => field?.invalid ?? __props.invalid);
|
|
41
|
+
const attrs = useAttrs();
|
|
42
|
+
const ariaLabelResolved = () => {
|
|
43
|
+
const own = __props.label;
|
|
44
|
+
return own ?? attrs["aria-label"];
|
|
45
|
+
};
|
|
46
|
+
const ariaInvalidResolved = () => effectiveInvalid.value ? "true" : attrs["aria-invalid"];
|
|
47
|
+
const consumerDescribedBy = () => attrs["aria-describedby"];
|
|
40
48
|
const uid = useFancyId();
|
|
41
49
|
const countId = `${uid}-count`;
|
|
42
50
|
const count = computed(() => value.value.length);
|
|
43
51
|
const atLimit = computed(() => __props.maxlength != null && count.value >= __props.maxlength);
|
|
44
|
-
const describedBy =
|
|
45
|
-
() => [field?.describedBy, __props.showCount ? countId : void 0].filter(Boolean).join(" ") || void 0
|
|
46
|
-
);
|
|
52
|
+
const describedBy = () => mergeIds(field?.describedBy, consumerDescribedBy(), __props.showCount ? countId : void 0);
|
|
47
53
|
const classes = computed(
|
|
48
54
|
() => cn(
|
|
49
55
|
"ft-textarea w-full rounded-[8px] border border-input bg-background px-[12px] py-[10px] text-[13px] leading-[1.5] text-foreground transition-colors",
|
|
@@ -102,9 +108,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
108
|
);
|
|
103
109
|
return (_ctx, _cache) => {
|
|
104
110
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
105
|
-
createElementVNode("textarea", {
|
|
111
|
+
createElementVNode("textarea", mergeProps({
|
|
106
112
|
ref_key: "el",
|
|
107
113
|
ref: el,
|
|
114
|
+
onInput: handleInput
|
|
115
|
+
}, unref(attrs), {
|
|
108
116
|
id: effectiveId.value,
|
|
109
117
|
placeholder: __props.placeholder,
|
|
110
118
|
name: __props.name,
|
|
@@ -114,13 +122,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
122
|
disabled: effectiveDisabled.value,
|
|
115
123
|
readonly: __props.readonly,
|
|
116
124
|
required: effectiveRequired.value,
|
|
117
|
-
"aria-invalid":
|
|
118
|
-
"aria-describedby": describedBy
|
|
119
|
-
"aria-label":
|
|
120
|
-
class:
|
|
121
|
-
value: value.value
|
|
122
|
-
|
|
123
|
-
}, null, 42, _hoisted_2),
|
|
125
|
+
"aria-invalid": ariaInvalidResolved(),
|
|
126
|
+
"aria-describedby": describedBy(),
|
|
127
|
+
"aria-label": ariaLabelResolved(),
|
|
128
|
+
class: classes.value,
|
|
129
|
+
value: value.value
|
|
130
|
+
}), null, 16, _hoisted_2),
|
|
124
131
|
__props.showCount ? (openBlock(), createElementBlock("span", {
|
|
125
132
|
key: 0,
|
|
126
133
|
id: countId,
|