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
|
@@ -6,6 +6,8 @@ export interface RadioGroupItemProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/** Visible label text, rendered next to the control. Falls back to the default slot, then to `value`. */
|
|
8
8
|
label?: string;
|
|
9
|
+
/** A consumer `@change`, run once after the group selection. */
|
|
10
|
+
onChange?: (event: Event) => void;
|
|
9
11
|
/** Additional CSS classes, merged onto the wrapping `<label>`. */
|
|
10
12
|
class?: HTMLAttributes["class"];
|
|
11
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./RadioGroupItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const RadioGroupItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const RadioGroupItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e8ac259"]]);
|
|
5
5
|
export {
|
|
6
6
|
RadioGroupItem as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, inject, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, unref, createTextVNode, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, inject, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, mergeProps, unref, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { RADIO_GROUP_KEY } from "./types.js";
|
|
4
4
|
const _hoisted_1 = ["value", "checked", "disabled", "required", "name"];
|
|
@@ -9,17 +9,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
value: {},
|
|
10
10
|
disabled: { type: Boolean, default: false },
|
|
11
11
|
label: {},
|
|
12
|
+
onChange: { type: Function },
|
|
12
13
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
13
14
|
},
|
|
14
15
|
setup(__props, { expose: __expose }) {
|
|
16
|
+
const attrs = useAttrs();
|
|
15
17
|
const el = useTemplateRef("el");
|
|
16
18
|
__expose({ ref: el });
|
|
17
19
|
const group = inject(RADIO_GROUP_KEY, void 0);
|
|
18
20
|
const isDisabled = computed(() => __props.disabled || (group?.disabled ?? false));
|
|
19
21
|
const isChecked = computed(() => group?.isSelected(__props.value) ?? false);
|
|
20
|
-
function
|
|
22
|
+
function callListener(listener, ...args) {
|
|
23
|
+
if (Array.isArray(listener)) {
|
|
24
|
+
for (const fn of listener) if (typeof fn === "function") fn(...args);
|
|
25
|
+
} else if (typeof listener === "function") {
|
|
26
|
+
listener(...args);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function isRequired() {
|
|
30
|
+
return !!group?.required || attrs.required !== void 0 && attrs.required !== false && attrs.required !== "false";
|
|
31
|
+
}
|
|
32
|
+
function handleChange(event) {
|
|
21
33
|
if (isDisabled.value) return;
|
|
22
34
|
group?.select(__props.value);
|
|
35
|
+
callListener(__props.onChange, event);
|
|
23
36
|
}
|
|
24
37
|
const labelClasses = computed(
|
|
25
38
|
() => cn(
|
|
@@ -38,18 +51,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
51
|
return openBlock(), createElementBlock("label", {
|
|
39
52
|
class: normalizeClass(labelClasses.value)
|
|
40
53
|
}, [
|
|
41
|
-
createElementVNode("input", {
|
|
54
|
+
createElementVNode("input", mergeProps(unref(attrs), {
|
|
42
55
|
ref_key: "el",
|
|
43
56
|
ref: el,
|
|
44
57
|
type: "radio",
|
|
45
|
-
class:
|
|
58
|
+
class: controlClasses.value,
|
|
46
59
|
value: __props.value,
|
|
47
60
|
checked: isChecked.value,
|
|
48
61
|
disabled: isDisabled.value,
|
|
49
|
-
required:
|
|
50
|
-
name: unref(group)?.name,
|
|
62
|
+
required: isRequired(),
|
|
63
|
+
name: unref(group)?.name ?? unref(attrs).name,
|
|
51
64
|
onChange: handleChange
|
|
52
|
-
}, null,
|
|
65
|
+
}), null, 16, _hoisted_1),
|
|
53
66
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
54
67
|
createTextVNode(toDisplayString(__props.label ?? __props.value), 1)
|
|
55
68
|
], true)
|
|
@@ -6,15 +6,22 @@ export interface RainbowButtonProps {
|
|
|
6
6
|
class?: HTMLAttributes["class"];
|
|
7
7
|
/** Render as anchor element */
|
|
8
8
|
href?: string;
|
|
9
|
+
/** Anchor `target` (dropped while a link is disabled) */
|
|
10
|
+
target?: string;
|
|
9
11
|
/** Native button type (ignored when `href` is set) */
|
|
10
12
|
type?: "button" | "submit" | "reset";
|
|
11
13
|
/** Disables the button / marks the link aria-disabled */
|
|
12
14
|
disabled?: boolean;
|
|
13
15
|
/**
|
|
14
|
-
* Plays the
|
|
15
|
-
* default; only audible once the user has enabled sound.
|
|
16
|
+
* Plays the `hover` cue on mouse/pen pointer enter and the `press` cue on
|
|
17
|
+
* click. Off by default; only audible once the user has enabled sound.
|
|
16
18
|
*/
|
|
17
19
|
sound?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Click handler. Declared as a prop so it runs after the disabled guard and
|
|
22
|
+
* the cue, exactly once, and is never forwarded through `attrs` as well.
|
|
23
|
+
*/
|
|
24
|
+
onClick?: (event: MouseEvent) => void;
|
|
18
25
|
}
|
|
19
26
|
declare const _default: typeof __VLS_export;
|
|
20
27
|
export default _default;
|
|
@@ -22,9 +29,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Rainbo
|
|
|
22
29
|
ref: Readonly<import("vue").ShallowRef<HTMLButtonElement | HTMLAnchorElement | null>>;
|
|
23
30
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RainbowButtonProps> & Readonly<{}>, {
|
|
24
31
|
type: "button" | "submit" | "reset";
|
|
32
|
+
onClick: (event: MouseEvent) => void;
|
|
25
33
|
disabled: boolean;
|
|
26
34
|
sound: boolean;
|
|
27
35
|
href: string;
|
|
36
|
+
target: string;
|
|
28
37
|
speed: number;
|
|
29
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
30
39
|
default?: () => unknown;
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./RainbowButton.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const RainbowButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const RainbowButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4b3a9e7a"]]);
|
|
6
6
|
export {
|
|
7
7
|
RainbowButton as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, createElementVNode, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
|
+
import { useSoundFeedback } from "../../sound/use-sound-feedback.js";
|
|
3
4
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
4
|
-
const _hoisted_1 = ["href", "aria-disabled", "role", "tabindex"];
|
|
5
|
+
const _hoisted_1 = ["href", "target", "aria-disabled", "role", "tabindex"];
|
|
5
6
|
const _hoisted_2 = ["type", "disabled"];
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
...{ name: "RainbowButton", inheritAttrs: false },
|
|
@@ -10,15 +11,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
11
|
speed: { default: 2 },
|
|
11
12
|
class: { type: [Boolean, null, String, Object, Array] },
|
|
12
13
|
href: { default: void 0 },
|
|
14
|
+
target: { default: void 0 },
|
|
13
15
|
type: { default: "button" },
|
|
14
16
|
disabled: { type: Boolean, default: void 0 },
|
|
15
|
-
sound: { type: Boolean, default: false }
|
|
17
|
+
sound: { type: Boolean, default: false },
|
|
18
|
+
onClick: { type: Function, default: void 0 }
|
|
16
19
|
},
|
|
17
20
|
setup(__props, { expose: __expose }) {
|
|
18
21
|
const props = __props;
|
|
22
|
+
const attrs = useAttrs();
|
|
23
|
+
function forwardedAttrs() {
|
|
24
|
+
const { style: _style, ...rest } = attrs;
|
|
25
|
+
if (!props.disabled) return rest;
|
|
26
|
+
return Object.fromEntries(Object.entries(rest).filter(([key]) => !/^onClick/.test(key)));
|
|
27
|
+
}
|
|
19
28
|
const el = useTemplateRef("el");
|
|
20
29
|
__expose({ ref: el });
|
|
21
30
|
const playCue = useSoundCue(() => props.sound);
|
|
31
|
+
useSoundFeedback(el, () => ({
|
|
32
|
+
on: props.sound ? { pointerenter: "hover" } : {},
|
|
33
|
+
disabled: props.disabled
|
|
34
|
+
}));
|
|
22
35
|
const speedStyle = computed(() => ({ "--rainbow-speed": `${props.speed}s` }));
|
|
23
36
|
function handleClick(event) {
|
|
24
37
|
if (props.disabled) {
|
|
@@ -26,6 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
39
|
return;
|
|
27
40
|
}
|
|
28
41
|
playCue("press");
|
|
42
|
+
props.onClick?.(event);
|
|
29
43
|
}
|
|
30
44
|
const baseClasses = computed(
|
|
31
45
|
() => cn(
|
|
@@ -41,18 +55,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
55
|
)
|
|
42
56
|
);
|
|
43
57
|
return (_ctx, _cache) => {
|
|
44
|
-
return __props.href ? (openBlock(), createElementBlock("a", {
|
|
58
|
+
return __props.href ? (openBlock(), createElementBlock("a", mergeProps({
|
|
45
59
|
key: 0,
|
|
46
60
|
ref_key: "el",
|
|
47
|
-
ref: el
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
ref: el
|
|
62
|
+
}, forwardedAttrs(), {
|
|
63
|
+
class: baseClasses.value,
|
|
64
|
+
style: [speedStyle.value, unref(attrs).style],
|
|
65
|
+
href: __props.disabled ? void 0 : __props.href,
|
|
66
|
+
target: __props.disabled ? void 0 : __props.target,
|
|
67
|
+
"aria-disabled": __props.disabled ? "true" : unref(attrs)["aria-disabled"],
|
|
68
|
+
role: __props.disabled ? "link" : unref(attrs).role,
|
|
69
|
+
tabindex: __props.disabled ? -1 : unref(attrs).tabindex,
|
|
54
70
|
onClick: handleClick
|
|
55
|
-
}, [
|
|
71
|
+
}), [
|
|
56
72
|
_cache[0] || (_cache[0] = createElementVNode("span", {
|
|
57
73
|
class: "rainbow-button__glow",
|
|
58
74
|
"aria-hidden": "true"
|
|
@@ -64,16 +80,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
80
|
"aria-hidden": "true"
|
|
65
81
|
}, null, -1)),
|
|
66
82
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
67
|
-
],
|
|
83
|
+
], 16, _hoisted_1)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
68
84
|
key: 1,
|
|
69
85
|
ref_key: "el",
|
|
70
|
-
ref: el
|
|
71
|
-
|
|
72
|
-
|
|
86
|
+
ref: el
|
|
87
|
+
}, forwardedAttrs(), {
|
|
88
|
+
class: baseClasses.value,
|
|
89
|
+
style: [speedStyle.value, unref(attrs).style],
|
|
73
90
|
type: __props.type,
|
|
74
91
|
disabled: __props.disabled,
|
|
75
92
|
onClick: handleClick
|
|
76
|
-
}, [
|
|
93
|
+
}), [
|
|
77
94
|
_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
78
95
|
class: "rainbow-button__glow",
|
|
79
96
|
"aria-hidden": "true"
|
|
@@ -85,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
102
|
"aria-hidden": "true"
|
|
86
103
|
}, null, -1)),
|
|
87
104
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
88
|
-
],
|
|
105
|
+
], 16, _hoisted_2));
|
|
89
106
|
};
|
|
90
107
|
}
|
|
91
108
|
});
|
|
@@ -7,14 +7,16 @@ export interface RippleButtonProps {
|
|
|
7
7
|
/** Animation duration in milliseconds */
|
|
8
8
|
duration?: number;
|
|
9
9
|
/**
|
|
10
|
-
* Plays the
|
|
11
|
-
* default; only audible once the user has enabled sound.
|
|
10
|
+
* Plays the `hover` cue on mouse/pen pointer enter and the `press` cue on
|
|
11
|
+
* click. Off by default; only audible once the user has enabled sound.
|
|
12
12
|
*/
|
|
13
13
|
sound?: boolean;
|
|
14
14
|
/** Native `disabled`, read to guard the sound cue. */
|
|
15
15
|
disabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/** Click handler, called after the sound cue. `@click` reaches it. */
|
|
17
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
18
|
+
/** @deprecated Use `@click` / `onClick`. Only called when `onClick` is absent. */
|
|
19
|
+
onclick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Where a ripple starts and how big it grows: from the pointer, or from the
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./RippleButton.vue2.js";
|
|
|
2
2
|
import { rippleGeometry } from "./RippleButton.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const RippleButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const RippleButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-eb0fdfa4"]]);
|
|
6
6
|
export {
|
|
7
7
|
RippleButton as default,
|
|
8
8
|
rippleGeometry
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, useTemplateRef, ref, createElementBlock, openBlock, mergeProps, unref, createElementVNode, renderSlot, Fragment, renderList, normalizeStyle } 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";
|
|
5
|
+
import { useSoundFeedback } from "../../sound/use-sound-feedback.js";
|
|
4
6
|
const _hoisted_1 = ["data-rippling", "disabled"];
|
|
5
7
|
const _hoisted_2 = { class: "relative z-10" };
|
|
6
8
|
const _hoisted_3 = {
|
|
@@ -25,19 +27,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
27
|
duration: { default: 900 },
|
|
26
28
|
sound: { type: Boolean, default: false },
|
|
27
29
|
disabled: { type: Boolean, default: false },
|
|
28
|
-
|
|
30
|
+
onClick: { type: [Function, Array] },
|
|
31
|
+
onclick: { type: [Function, Array] }
|
|
29
32
|
},
|
|
30
33
|
setup(__props) {
|
|
31
34
|
const attrs = useAttrs();
|
|
32
35
|
const buttonRef = useTemplateRef("buttonRef");
|
|
36
|
+
useSoundFeedback(buttonRef, () => ({
|
|
37
|
+
on: __props.sound ? { pointerenter: "hover" } : {},
|
|
38
|
+
disabled: __props.disabled
|
|
39
|
+
}));
|
|
33
40
|
const ripples = ref([]);
|
|
34
41
|
let nextRippleKey = 0;
|
|
35
42
|
function handleClick(event) {
|
|
36
43
|
if (__props.sound && !__props.disabled) sound.play("press");
|
|
37
44
|
createRipple(event);
|
|
38
|
-
|
|
39
|
-
__props.onclick(event);
|
|
40
|
-
}
|
|
45
|
+
callListener(__props.onClick ?? __props.onclick, event);
|
|
41
46
|
}
|
|
42
47
|
function handlePointerMove(event) {
|
|
43
48
|
const el = event.currentTarget;
|
|
@@ -63,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
68
|
"ripple-button relative isolate flex cursor-pointer items-center justify-center overflow-hidden",
|
|
64
69
|
"bg-background text-foreground border-border rounded-lg border px-5 py-2.5 text-center font-medium",
|
|
65
70
|
"shadow-[inset_0_1px_0_rgb(255_255_255/0.06),0_1px_2px_rgb(0_0_0/0.08)]",
|
|
66
|
-
"transition-[
|
|
71
|
+
"duration-300 ease-out transition-[border-color,background-color] motion-safe:transition-[transform,border-color,background-color]",
|
|
67
72
|
"hover:bg-muted/40 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50",
|
|
68
73
|
__props.class
|
|
69
74
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SearchInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4318e5e7"]]);
|
|
5
5
|
export {
|
|
6
6
|
SearchInput as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, onMounted, onBeforeUnmount, createElementBlock, openBlock, normalizeClass, createElementVNode, createVNode, unref, Transition, withCtx, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, useAttrs, onMounted, onBeforeUnmount, createElementBlock, openBlock, normalizeClass, createElementVNode, createVNode, mergeProps, unref, Transition, withCtx, createCommentVNode } 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 { preset } from "../../internals/motion/transitions.js";
|
|
5
6
|
import { prefersReducedMotion } from "../../internals/motion/anchored.js";
|
|
6
7
|
import { DURATIONS } from "../../internals/motion/tokens.js";
|
|
@@ -41,6 +42,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
const effectiveDisabled = computed(() => field?.disabled ?? __props.disabled);
|
|
42
43
|
const effectiveRequired = computed(() => field?.required ?? __props.required);
|
|
43
44
|
const effectiveInvalid = computed(() => field?.invalid ?? __props.invalid);
|
|
45
|
+
const attrs = useAttrs();
|
|
46
|
+
const ariaLabelResolved = () => {
|
|
47
|
+
const own = __props.label;
|
|
48
|
+
return own ?? attrs["aria-label"];
|
|
49
|
+
};
|
|
50
|
+
const ariaInvalidResolved = () => effectiveInvalid.value ? "true" : attrs["aria-invalid"];
|
|
51
|
+
const consumerDescribedBy = () => attrs["aria-describedby"];
|
|
52
|
+
const describedBy = () => mergeIds(field?.describedBy, consumerDescribedBy());
|
|
44
53
|
const canClear = computed(
|
|
45
54
|
() => __props.clearable && !effectiveDisabled.value && !__props.readonly && value.value !== ""
|
|
46
55
|
);
|
|
@@ -131,9 +140,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
140
|
})
|
|
132
141
|
])
|
|
133
142
|
], -1)),
|
|
134
|
-
createElementVNode("input", {
|
|
143
|
+
createElementVNode("input", mergeProps({
|
|
135
144
|
ref_key: "inputEl",
|
|
136
145
|
ref: inputEl,
|
|
146
|
+
onInput: handleInput,
|
|
147
|
+
onKeydown: handleKeydown
|
|
148
|
+
}, unref(attrs), {
|
|
137
149
|
type: "search",
|
|
138
150
|
placeholder: __props.placeholder,
|
|
139
151
|
name: __props.name,
|
|
@@ -142,13 +154,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
142
154
|
disabled: effectiveDisabled.value,
|
|
143
155
|
readonly: __props.readonly,
|
|
144
156
|
required: effectiveRequired.value,
|
|
145
|
-
"aria-invalid":
|
|
146
|
-
"aria-describedby":
|
|
147
|
-
"aria-label":
|
|
148
|
-
class: "ft-search-input-field text-foreground placeholder:text-muted-foreground min-w-0 flex-1 border-0 bg-transparent p-0 outline-none disabled:cursor-not-allowed"
|
|
149
|
-
|
|
150
|
-
onKeydown: handleKeydown
|
|
151
|
-
}, null, 40, _hoisted_1),
|
|
157
|
+
"aria-invalid": ariaInvalidResolved(),
|
|
158
|
+
"aria-describedby": describedBy(),
|
|
159
|
+
"aria-label": ariaLabelResolved(),
|
|
160
|
+
class: "ft-search-input-field text-foreground placeholder:text-muted-foreground min-w-0 flex-1 border-0 bg-transparent p-0 outline-none disabled:cursor-not-allowed"
|
|
161
|
+
}), null, 16, _hoisted_1),
|
|
152
162
|
createVNode(Transition, {
|
|
153
163
|
css: false,
|
|
154
164
|
onEnter: onClearEnter
|
|
@@ -50,8 +50,8 @@ declare const __VLS_export: import("vue").DefineComponent<SelectProps & {
|
|
|
50
50
|
}>, {
|
|
51
51
|
invalid: boolean;
|
|
52
52
|
disabled: boolean;
|
|
53
|
+
required: boolean;
|
|
53
54
|
sound: boolean;
|
|
54
55
|
side: Side;
|
|
55
56
|
align: Align;
|
|
56
|
-
required: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Select.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-eb8efa25"]]);
|
|
5
5
|
export {
|
|
6
6
|
Select as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, ref, useTemplateRef, watch, createElementBlock, openBlock, Fragment, createElementVNode, createCommentVNode, createVNode, normalizeClass, unref, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useAttrs, useModel, computed, ref, useTemplateRef, watch, createElementBlock, openBlock, Fragment, createElementVNode, createCommentVNode, createVNode, mergeProps, normalizeClass, unref, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
4
|
import { useListbox } from "../../internals/listbox.js";
|
|
@@ -6,8 +6,8 @@ import { useFancyId } from "../../internals/use-id.js";
|
|
|
6
6
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
7
7
|
import SelectPanel from "./SelectPanel.vue.js";
|
|
8
8
|
import { SELECT_CONTEXT } from "./types.js";
|
|
9
|
-
const _hoisted_1 = ["id", "
|
|
10
|
-
const _hoisted_2 = ["name", "^value", "disabled"];
|
|
9
|
+
const _hoisted_1 = ["id", "disabled"];
|
|
10
|
+
const _hoisted_2 = ["name", "form", "^value", "disabled"];
|
|
11
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
12
|
...{ name: "Select", inheritAttrs: false },
|
|
13
13
|
__name: "Select",
|
|
@@ -32,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
}),
|
|
33
33
|
emits: ["update:value"],
|
|
34
34
|
setup(__props, { expose: __expose }) {
|
|
35
|
+
const attrs = useAttrs();
|
|
35
36
|
const props = __props;
|
|
36
37
|
const value = useModel(__props, "value");
|
|
37
38
|
const field = useField();
|
|
@@ -234,27 +235,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
234
235
|
props.class
|
|
235
236
|
)
|
|
236
237
|
);
|
|
238
|
+
function triggerAttrs() {
|
|
239
|
+
const describedBy = [field?.describedBy, attrs["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
240
|
+
return {
|
|
241
|
+
...attrs,
|
|
242
|
+
type: "button",
|
|
243
|
+
role: "combobox",
|
|
244
|
+
"aria-haspopup": "listbox",
|
|
245
|
+
"aria-expanded": open.value,
|
|
246
|
+
"aria-controls": open.value ? panelId : void 0,
|
|
247
|
+
"aria-activedescendant": open.value && listbox.activeIndex !== -1 ? optionId(listbox.activeIndex) : void 0,
|
|
248
|
+
"aria-invalid": effectiveInvalid.value ? "true" : attrs["aria-invalid"],
|
|
249
|
+
"aria-required": effectiveRequired.value ? "true" : attrs["aria-required"],
|
|
250
|
+
"aria-describedby": describedBy,
|
|
251
|
+
"aria-label": props.label ?? attrs["aria-label"]
|
|
252
|
+
};
|
|
253
|
+
}
|
|
237
254
|
return (_ctx, _cache) => {
|
|
238
255
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
239
|
-
createElementVNode("button", {
|
|
256
|
+
createElementVNode("button", mergeProps({
|
|
240
257
|
ref_key: "trigger",
|
|
241
258
|
ref: trigger,
|
|
242
259
|
id: effectiveId.value,
|
|
243
|
-
type: "button",
|
|
244
|
-
role: "combobox",
|
|
245
|
-
"aria-haspopup": "listbox",
|
|
246
|
-
"aria-expanded": open.value,
|
|
247
|
-
"aria-controls": open.value ? panelId : void 0,
|
|
248
|
-
"aria-activedescendant": open.value && unref(listbox).activeIndex !== -1 ? optionId(unref(listbox).activeIndex) : void 0,
|
|
249
|
-
"aria-invalid": effectiveInvalid.value ? "true" : void 0,
|
|
250
|
-
"aria-required": effectiveRequired.value ? "true" : void 0,
|
|
251
|
-
"aria-describedby": unref(field)?.describedBy,
|
|
252
|
-
"aria-label": props.label,
|
|
253
260
|
disabled: effectiveDisabled.value,
|
|
254
|
-
class:
|
|
261
|
+
class: classes.value,
|
|
255
262
|
onClick: handleTriggerClick,
|
|
256
263
|
onKeydown: handleTriggerKeydown
|
|
257
|
-
}, [
|
|
264
|
+
}, triggerAttrs()), [
|
|
258
265
|
createElementVNode("span", {
|
|
259
266
|
class: normalizeClass(unref(cn)("truncate", !selectedOption.value && "text-muted-foreground"))
|
|
260
267
|
}, toDisplayString(selectedOption.value?.label ?? props.placeholder ?? ""), 3),
|
|
@@ -262,11 +269,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
262
269
|
"aria-hidden": "true",
|
|
263
270
|
class: "ft-select-caret text-muted-foreground text-[9px]"
|
|
264
271
|
}, "▼", -1))
|
|
265
|
-
],
|
|
272
|
+
], 16, _hoisted_1),
|
|
266
273
|
props.name ? (openBlock(), createElementBlock("input", {
|
|
267
274
|
key: 0,
|
|
268
275
|
type: "hidden",
|
|
269
276
|
name: props.name,
|
|
277
|
+
form: unref(attrs).form,
|
|
270
278
|
"^value": value.value,
|
|
271
279
|
disabled: effectiveDisabled.value
|
|
272
280
|
}, null, 8, _hoisted_2)) : createCommentVNode("", true),
|
|
@@ -22,6 +22,11 @@ export interface SheetProps {
|
|
|
22
22
|
dismissible?: boolean;
|
|
23
23
|
/** Panel width (left/right sides) or height (top/bottom sides). */
|
|
24
24
|
size?: SheetSize;
|
|
25
|
+
/**
|
|
26
|
+
* The panel's `id`. A trigger the caller renders outside the component
|
|
27
|
+
* points its `aria-controls` at it while the panel is open.
|
|
28
|
+
*/
|
|
29
|
+
id?: string;
|
|
25
30
|
/** Additional CSS classes merged onto the panel. */
|
|
26
31
|
class?: HTMLAttributes["class"];
|
|
27
32
|
/**
|
|
@@ -10,7 +10,7 @@ import { anchored, prefersReducedMotion } from "../../internals/motion/anchored.
|
|
|
10
10
|
import { usePresence } from "../../internals/motion/presence.js";
|
|
11
11
|
import { DURATIONS, JS_EASINGS } from "../../internals/motion/tokens.js";
|
|
12
12
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
13
|
-
const _hoisted_1 = ["aria-labelledby", "aria-label", "aria-describedby", "data-state", "data-side"];
|
|
13
|
+
const _hoisted_1 = ["id", "aria-labelledby", "aria-label", "aria-describedby", "data-state", "data-side"];
|
|
14
14
|
const _hoisted_2 = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "ft-sheet-header flex items-start justify-between gap-4"
|
|
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
ariaLabel: {},
|
|
35
35
|
dismissible: { type: Boolean, default: true },
|
|
36
36
|
size: { default: "md" },
|
|
37
|
+
id: {},
|
|
37
38
|
class: { type: [Boolean, null, String, Object, Array] },
|
|
38
39
|
sound: { type: Boolean, default: false }
|
|
39
40
|
}, {
|
|
@@ -79,7 +80,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
80
|
onDismiss: close,
|
|
80
81
|
escape: __props.dismissible,
|
|
81
82
|
outsideClick: __props.dismissible,
|
|
82
|
-
active: () => open.value
|
|
83
|
+
active: () => open.value,
|
|
84
|
+
keepFocus: true
|
|
83
85
|
}));
|
|
84
86
|
function edgeSlide(_node, params) {
|
|
85
87
|
const reduced = prefersReducedMotion();
|
|
@@ -153,6 +155,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
155
|
ref: unref(panelRef),
|
|
154
156
|
class: normalizeClass(panelClasses.value),
|
|
155
157
|
role: "dialog",
|
|
158
|
+
id: __props.id,
|
|
156
159
|
"aria-modal": "true",
|
|
157
160
|
"aria-labelledby": titleId.value,
|
|
158
161
|
"aria-label": titleId.value ? void 0 : __props.ariaLabel,
|
|
@@ -13,8 +13,8 @@ export interface ShimmerButtonProps {
|
|
|
13
13
|
/** Custom CSS class */
|
|
14
14
|
class?: HTMLAttributes["class"];
|
|
15
15
|
/**
|
|
16
|
-
* Plays the
|
|
17
|
-
* default; only audible once the user has enabled sound.
|
|
16
|
+
* Plays the `hover` cue on mouse/pen pointer enter and the `press` cue on
|
|
17
|
+
* click. Off by default; only audible once the user has enabled sound.
|
|
18
18
|
*/
|
|
19
19
|
sound?: boolean;
|
|
20
20
|
/** Native `disabled`, read to guard the sound cue. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ShimmerButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ShimmerButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ShimmerButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3892394c"]]);
|
|
5
5
|
export {
|
|
6
6
|
ShimmerButton as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, computed, createElementBlock, openBlock, mergeProps, unref, createElementVNode, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, useTemplateRef, useAttrs, computed, createElementBlock, openBlock, mergeProps, unref, createElementVNode, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useSoundCue } from "../../sound/use-sound.js";
|
|
4
|
+
import { useSoundFeedback } from "../../sound/use-sound-feedback.js";
|
|
4
5
|
const _hoisted_1 = ["disabled"];
|
|
5
6
|
const _hoisted_2 = { class: "relative z-10" };
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -17,6 +18,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
disabled: { type: Boolean, default: false }
|
|
18
19
|
},
|
|
19
20
|
setup(__props) {
|
|
21
|
+
const el = useTemplateRef("el");
|
|
22
|
+
useSoundFeedback(el, () => ({
|
|
23
|
+
on: __props.sound ? { pointerenter: "hover" } : {},
|
|
24
|
+
disabled: __props.disabled
|
|
25
|
+
}));
|
|
20
26
|
const attrs = useAttrs();
|
|
21
27
|
const playCue = useSoundCue(() => __props.sound);
|
|
22
28
|
const styleVars = computed(() => ({
|
|
@@ -30,16 +36,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
36
|
if (!__props.disabled) playCue("press");
|
|
31
37
|
}
|
|
32
38
|
function handlePointerMove(event) {
|
|
33
|
-
const
|
|
34
|
-
const rect =
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
const el2 = event.currentTarget;
|
|
40
|
+
const rect = el2.getBoundingClientRect();
|
|
41
|
+
el2.style.setProperty("--mx", `${event.clientX - rect.left}px`);
|
|
42
|
+
el2.style.setProperty("--my", `${event.clientY - rect.top}px`);
|
|
37
43
|
}
|
|
38
44
|
return (_ctx, _cache) => {
|
|
39
45
|
return openBlock(), createElementBlock("button", mergeProps({
|
|
46
|
+
ref_key: "el",
|
|
47
|
+
ref: el,
|
|
40
48
|
class: unref(cn)(
|
|
41
49
|
"shimmer-button group relative isolate flex cursor-pointer items-center justify-center overflow-hidden [border-radius:var(--radius)] px-6 py-3 whitespace-nowrap text-white/90",
|
|
42
|
-
"transform-gpu
|
|
50
|
+
"transform-gpu duration-300 ease-out hover:text-white active:scale-[0.98] transition-[color] motion-safe:transition-[transform,color]",
|
|
43
51
|
__props.class
|
|
44
52
|
),
|
|
45
53
|
style: styleVars.value,
|
|
@@ -16,8 +16,10 @@ export interface SidebarItemProps {
|
|
|
16
16
|
badgeLabel?: string;
|
|
17
17
|
/** Disables both the click and keyboard-activation paths. */
|
|
18
18
|
disabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/** Click handler. Never called while `disabled`. `@click` reaches it. */
|
|
20
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
21
|
+
/** @deprecated Use `@click` / `onClick`. Only called when `onClick` is absent. */
|
|
22
|
+
onclick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
21
23
|
/** Additional CSS classes */
|
|
22
24
|
class?: HTMLAttributes["class"];
|
|
23
25
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SidebarItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SidebarItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SidebarItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-941b2caf"]]);
|
|
5
5
|
export {
|
|
6
6
|
SidebarItem as default
|
|
7
7
|
};
|