@brumaombra/ui-vintage 0.1.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/LICENSE +21 -0
- package/README.md +78 -0
- package/dist/AlertDialogTitle.vue_vue_type_script_setup_true_lang-CWCr2erD.js +360 -0
- package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-vNwxOYhM.js +158 -0
- package/dist/BackgroundGrid-Cxvbtefm.js +13 -0
- package/dist/Busy-B65Nd9ec.js +62 -0
- package/dist/BusyIndicator-CnWzSMDb.js +4 -0
- package/dist/BusyIndicator.vue_vue_type_script_setup_true_lang-CYeXMI_V.js +66 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-C-WnFnvj.js +3805 -0
- package/dist/Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js +27 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-DVAd7AWF.js +112 -0
- package/dist/Collection-CmOoLBo7.js +76 -0
- package/dist/ConfigProvider-D2O0Jles.js +6 -0
- package/dist/ConfirmDialog-DEsvF0b_.js +4 -0
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-BAd1l1zF.js +230 -0
- package/dist/DashboardShell.vue_vue_type_script_setup_true_lang-CT2SQBXv.js +171 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-D8mev2ha.js +92 -0
- package/dist/DialogClose-BNlqG4G2.js +36 -0
- package/dist/DialogTitle-DXj0nkXn.js +522 -0
- package/dist/DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js +174 -0
- package/dist/DialogTrigger-CpyKnu11.js +52 -0
- package/dist/DialogTrigger.vue_vue_type_script_setup_true_lang-DLrFiCsw.js +141 -0
- package/dist/FocusScope-C3mcVwsf.js +454 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-U778IWa0.js +37 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-B_fwvfJ-.js +65 -0
- package/dist/MessageDialog-BrowppID.js +4 -0
- package/dist/MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js +242 -0
- package/dist/NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js +73 -0
- package/dist/PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js +61 -0
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-KTcg6Jnl.js +798 -0
- package/dist/PopperContent-BiM0YLO3.js +2144 -0
- package/dist/Primitive-D3IcFg81.js +61 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-DGAI4hw5.js +2124 -0
- package/dist/Separator-CFm_M4pb.js +87 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js +29 -0
- package/dist/SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js +175 -0
- package/dist/SheetTrigger.vue_vue_type_script_setup_true_lang-CE2XJNHy.js +62 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-BSbVyZz7.js +20 -0
- package/dist/Slider.vue_vue_type_script_setup_true_lang-D-cAN-4Q.js +802 -0
- package/dist/SliderFormComponent.vue_vue_type_script_setup_true_lang-KPzC_Lmr.js +59 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js +226 -0
- package/dist/SwitchFormComponent.vue_vue_type_script_setup_true_lang-XOBEs3pa.js +39 -0
- package/dist/Teleport-CuUn4UkG.js +493 -0
- package/dist/TooltipProvider.vue_vue_type_script_setup_true_lang-DwIfCQjY.js +28 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js +1117 -0
- package/dist/VisuallyHidden-udQT2Fmo.js +60 -0
- package/dist/VisuallyHiddenInput-DLAsRwUw.js +142 -0
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +13 -0
- package/dist/alert.d.ts +2 -0
- package/dist/alert.js +76 -0
- package/dist/background-grid.d.ts +6 -0
- package/dist/background-grid.js +5 -0
- package/dist/busy-indicator.d.ts +2 -0
- package/dist/busy-indicator.js +6 -0
- package/dist/busy.d.ts +2 -0
- package/dist/busy.js +4 -0
- package/dist/button.d.ts +2 -0
- package/dist/button.js +63 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/calendar.js +15 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +11 -0
- package/dist/check-iejznCzf.js +11 -0
- package/dist/chevron-down-DP-oz-sL.js +13 -0
- package/dist/clamp-D5Ye0kJT.js +6 -0
- package/dist/command.d.ts +2 -0
- package/dist/command.js +1122 -0
- package/dist/components/background-grid/BackgroundGrid.vue.d.ts +2 -0
- package/dist/components/background-grid/index.d.ts +2 -0
- package/dist/components/busy-indicator/BusyIndicator.vue.d.ts +2 -0
- package/dist/components/busy-indicator/busy-indicator-state.d.ts +15 -0
- package/dist/components/busy-indicator/index.d.ts +3 -0
- package/dist/components/confirm-dialog/ConfirmDialog.vue.d.ts +2 -0
- package/dist/components/confirm-dialog/confirm-dialog-state.d.ts +37 -0
- package/dist/components/confirm-dialog/index.d.ts +3 -0
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +54 -0
- package/dist/components/dashboard-shell/index.d.ts +2 -0
- package/dist/components/message-dialog/MessageDialog.vue.d.ts +2 -0
- package/dist/components/message-dialog/index.d.ts +3 -0
- package/dist/components/message-dialog/message-dialog-state.d.ts +28 -0
- package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +23 -0
- package/dist/components/slider-form-component/index.d.ts +2 -0
- package/dist/components/switch-form-component/SwitchFormComponent.vue.d.ts +12 -0
- package/dist/components/switch-form-component/index.d.ts +2 -0
- package/dist/components/ui/alert/Alert.vue.d.ts +23 -0
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +21 -0
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +21 -0
- package/dist/components/ui/alert/index.d.ts +8 -0
- package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +25 -0
- package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +36 -0
- package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +21 -0
- package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/alert-dialog/index.d.ts +9 -0
- package/dist/components/ui/busy/Busy.vue.d.ts +27 -0
- package/dist/components/ui/busy/index.d.ts +1 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +7 -0
- package/dist/components/ui/calendar/Calendar.vue.d.ts +44 -0
- package/dist/components/ui/calendar/CalendarCell.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarCellTrigger.vue.d.ts +24 -0
- package/dist/components/ui/calendar/CalendarGrid.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarGridBody.vue.d.ts +18 -0
- package/dist/components/ui/calendar/CalendarGridHead.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarGridRow.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeadCell.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeader.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeading.vue.d.ts +28 -0
- package/dist/components/ui/calendar/CalendarNextButton.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarPrevButton.vue.d.ts +22 -0
- package/dist/components/ui/calendar/index.d.ts +13 -0
- package/dist/components/ui/card/Card.vue.d.ts +21 -0
- package/dist/components/ui/card/CardAction.vue.d.ts +21 -0
- package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
- package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
- package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
- package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
- package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/command/Command.vue.d.ts +40 -0
- package/dist/components/ui/command/CommandDialog.vue.d.ts +32 -0
- package/dist/components/ui/command/CommandEmpty.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandGroup.vue.d.ts +23 -0
- package/dist/components/ui/command/CommandInput.vue.d.ts +7 -0
- package/dist/components/ui/command/CommandItem.vue.d.ts +30 -0
- package/dist/components/ui/command/CommandList.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandSeparator.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandShortcut.vue.d.ts +21 -0
- package/dist/components/ui/command/index.d.ts +90 -0
- package/dist/components/ui/date-picker/DatePicker.vue.d.ts +19 -0
- package/dist/components/ui/date-picker/index.d.ts +2 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +24 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dialog/index.d.ts +10 -0
- package/dist/components/ui/field/Field.vue.d.ts +23 -0
- package/dist/components/ui/field/FieldContent.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldDescription.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldError.vue.d.ts +24 -0
- package/dist/components/ui/field/FieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldLabel.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldLegend.vue.d.ts +22 -0
- package/dist/components/ui/field/FieldSeparator.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldSet.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldTitle.vue.d.ts +21 -0
- package/dist/components/ui/field/index.d.ts +15 -0
- package/dist/components/ui/input/Input.vue.d.ts +12 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/label/Label.vue.d.ts +22 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/native-select/NativeSelect.vue.d.ts +27 -0
- package/dist/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +21 -0
- package/dist/components/ui/native-select/NativeSelectOption.vue.d.ts +21 -0
- package/dist/components/ui/native-select/index.d.ts +3 -0
- package/dist/components/ui/popover/Popover.vue.d.ts +25 -0
- package/dist/components/ui/popover/PopoverAnchor.vue.d.ts +18 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +39 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +18 -0
- package/dist/components/ui/popover/index.d.ts +4 -0
- package/dist/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +32 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +24 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +10 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/sheet/Sheet.vue.d.ts +25 -0
- package/dist/components/ui/sheet/SheetClose.vue.d.ts +18 -0
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +39 -0
- package/dist/components/ui/sheet/SheetDescription.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetFooter.vue.d.ts +21 -0
- package/dist/components/ui/sheet/SheetHeader.vue.d.ts +21 -0
- package/dist/components/ui/sheet/SheetOverlay.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetTitle.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetTrigger.vue.d.ts +18 -0
- package/dist/components/ui/sheet/index.d.ts +8 -0
- package/dist/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +22 -0
- package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +22 -0
- package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +7 -0
- package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/index.d.ts +37 -0
- package/dist/components/ui/sidebar/utils.d.ts +56 -0
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +6 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +29 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +30 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/confirm-dialog.d.ts +2 -0
- package/dist/confirm-dialog.js +9 -0
- package/dist/createLucideIcon-CCMB2vDW.js +130 -0
- package/dist/dashboard-shell.d.ts +6 -0
- package/dist/dashboard-shell.js +5 -0
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +5 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +14 -0
- package/dist/field.d.ts +2 -0
- package/dist/field.js +294 -0
- package/dist/index-C1_fxYhb.js +251 -0
- package/dist/index-Dfi5ESP2.js +299 -0
- package/dist/index-FpH8cK6B.js +44 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +171 -0
- package/dist/info-DZrSmi42.js +15 -0
- package/dist/input.d.ts +2 -0
- package/dist/input.js +4 -0
- package/dist/label.d.ts +2 -0
- package/dist/label.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/message-dialog.d.ts +2 -0
- package/dist/message-dialog.js +8 -0
- package/dist/native-select.d.ts +2 -0
- package/dist/native-select.js +25 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +8 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +14 -0
- package/dist/separator.d.ts +2 -0
- package/dist/separator.js +4 -0
- package/dist/sheet.d.ts +2 -0
- package/dist/sheet.js +12 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/sidebar.js +813 -0
- package/dist/skeleton.d.ts +2 -0
- package/dist/skeleton.js +4 -0
- package/dist/slider-form-component.d.ts +6 -0
- package/dist/slider-form-component.js +5 -0
- package/dist/slider.d.ts +2 -0
- package/dist/slider.js +4 -0
- package/dist/style.css +4021 -0
- package/dist/switch-form-component.d.ts +6 -0
- package/dist/switch-form-component.js +5 -0
- package/dist/switch.d.ts +2 -0
- package/dist/switch.js +4 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +8 -0
- package/dist/useDirection-SIyEYNxv.js +12 -0
- package/dist/useFocusGuards-tgErlvMF.js +29 -0
- package/dist/useFormControl-7ytzz-r7.js +11 -0
- package/dist/useForwardExpose-CNVHwdF2.js +58 -0
- package/dist/useForwardPropsEmits-DmumnZO5.js +63 -0
- package/dist/useKbd-JjFOu4f7.js +41 -0
- package/dist/usePrimitiveElement-CijaRBgF.js +16 -0
- package/dist/useSize-DO9Z3wC4.js +51 -0
- package/dist/useTypeahead-Dqe1QXq1.js +159 -0
- package/dist/utils-Bz4m9VPB.js +3192 -0
- package/dist/utils-RRmyeqLm.js +16 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +4 -0
- package/dist/x-2_VzbDS9.js +48 -0
- package/package.json +186 -0
|
@@ -0,0 +1,1117 @@
|
|
|
1
|
+
import { ref, watchEffect, defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createElementBlock, computed, normalizeStyle, createVNode, normalizeProps, guardReactiveProps, toRefs, watch, onMounted, withModifiers, createTextVNode, toDisplayString, resolveDynamicComponent, toHandlers } from "vue";
|
|
2
|
+
import { c as createContext, a as useForwardProps, u as useForwardPropsEmits } from "./useForwardPropsEmits-DmumnZO5.js";
|
|
3
|
+
import { u as useForwardExpose } from "./useForwardExpose-CNVHwdF2.js";
|
|
4
|
+
import { P as Primitive } from "./Primitive-D3IcFg81.js";
|
|
5
|
+
import { i as injectPopperContentContext, a as PopperRoot_default, b as PopperContent_default, P as PopperAnchor_default } from "./PopperContent-BiM0YLO3.js";
|
|
6
|
+
import { d as defu, D as DismissableLayer_default, P as Presence_default, T as Teleport_default, u as useId } from "./Teleport-CuUn4UkG.js";
|
|
7
|
+
import { V as VisuallyHidden_default } from "./VisuallyHidden-udQT2Fmo.js";
|
|
8
|
+
import { u as useVModel, b as useEventListener } from "./index-C1_fxYhb.js";
|
|
9
|
+
import { g as refAutoReset, e as tryOnScopeDispose, o as createEventHook, u as useTimeoutFn, r as reactiveOmit } from "./index-Dfi5ESP2.js";
|
|
10
|
+
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
11
|
+
function useGraceArea(triggerElement, containerElement) {
|
|
12
|
+
const isPointerInTransit = refAutoReset(false, 300);
|
|
13
|
+
tryOnScopeDispose(() => {
|
|
14
|
+
isPointerInTransit.value = false;
|
|
15
|
+
});
|
|
16
|
+
const pointerGraceArea = ref(null);
|
|
17
|
+
const pointerExit = createEventHook();
|
|
18
|
+
function handleRemoveGraceArea() {
|
|
19
|
+
pointerGraceArea.value = null;
|
|
20
|
+
isPointerInTransit.value = false;
|
|
21
|
+
}
|
|
22
|
+
function handleCreateGraceArea(event, hoverTarget) {
|
|
23
|
+
const currentTarget = event.currentTarget;
|
|
24
|
+
const exitPoint = {
|
|
25
|
+
x: event.clientX,
|
|
26
|
+
y: event.clientY
|
|
27
|
+
};
|
|
28
|
+
const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
|
|
29
|
+
const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide, 1);
|
|
30
|
+
const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());
|
|
31
|
+
const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);
|
|
32
|
+
pointerGraceArea.value = graceArea;
|
|
33
|
+
isPointerInTransit.value = true;
|
|
34
|
+
}
|
|
35
|
+
watchEffect((cleanupFn) => {
|
|
36
|
+
if (triggerElement.value && containerElement.value) {
|
|
37
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, containerElement.value);
|
|
38
|
+
const handleContentLeave = (event) => handleCreateGraceArea(event, triggerElement.value);
|
|
39
|
+
triggerElement.value.addEventListener("pointerleave", handleTriggerLeave);
|
|
40
|
+
containerElement.value.addEventListener("pointerleave", handleContentLeave);
|
|
41
|
+
cleanupFn(() => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
(_a = triggerElement.value) == null ? void 0 : _a.removeEventListener("pointerleave", handleTriggerLeave);
|
|
44
|
+
(_b = containerElement.value) == null ? void 0 : _b.removeEventListener("pointerleave", handleContentLeave);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
watchEffect((cleanupFn) => {
|
|
49
|
+
var _a;
|
|
50
|
+
if (pointerGraceArea.value) {
|
|
51
|
+
const handleTrackPointerGrace = (event) => {
|
|
52
|
+
var _a2, _b;
|
|
53
|
+
if (!pointerGraceArea.value || !(event.target instanceof Element)) return;
|
|
54
|
+
const target = event.target;
|
|
55
|
+
const pointerPosition = {
|
|
56
|
+
x: event.clientX,
|
|
57
|
+
y: event.clientY
|
|
58
|
+
};
|
|
59
|
+
const hasEnteredTarget = ((_a2 = triggerElement.value) == null ? void 0 : _a2.contains(target)) || ((_b = containerElement.value) == null ? void 0 : _b.contains(target));
|
|
60
|
+
const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea.value);
|
|
61
|
+
const isAnotherGraceAreaTrigger = !!target.closest("[data-grace-area-trigger]");
|
|
62
|
+
if (hasEnteredTarget) handleRemoveGraceArea();
|
|
63
|
+
else if (isPointerOutsideGraceArea || isAnotherGraceAreaTrigger) {
|
|
64
|
+
handleRemoveGraceArea();
|
|
65
|
+
pointerExit.trigger();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
(_a = triggerElement.value) == null ? void 0 : _a.ownerDocument.addEventListener("pointermove", handleTrackPointerGrace);
|
|
69
|
+
cleanupFn(() => {
|
|
70
|
+
var _a2;
|
|
71
|
+
return (_a2 = triggerElement.value) == null ? void 0 : _a2.ownerDocument.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
isPointerInTransit,
|
|
77
|
+
onPointerExit: pointerExit.on
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function getExitSideFromRect(point, rect) {
|
|
81
|
+
const top = Math.abs(rect.top - point.y);
|
|
82
|
+
const bottom = Math.abs(rect.bottom - point.y);
|
|
83
|
+
const right = Math.abs(rect.right - point.x);
|
|
84
|
+
const left = Math.abs(rect.left - point.x);
|
|
85
|
+
switch (Math.min(top, bottom, right, left)) {
|
|
86
|
+
case left:
|
|
87
|
+
return "left";
|
|
88
|
+
case right:
|
|
89
|
+
return "right";
|
|
90
|
+
case top:
|
|
91
|
+
return "top";
|
|
92
|
+
case bottom:
|
|
93
|
+
return "bottom";
|
|
94
|
+
default:
|
|
95
|
+
throw new Error("unreachable");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
|
99
|
+
const paddedExitPoints = [];
|
|
100
|
+
switch (exitSide) {
|
|
101
|
+
case "top":
|
|
102
|
+
paddedExitPoints.push({
|
|
103
|
+
x: exitPoint.x - padding,
|
|
104
|
+
y: exitPoint.y + padding
|
|
105
|
+
}, {
|
|
106
|
+
x: exitPoint.x + padding,
|
|
107
|
+
y: exitPoint.y + padding
|
|
108
|
+
});
|
|
109
|
+
break;
|
|
110
|
+
case "bottom":
|
|
111
|
+
paddedExitPoints.push({
|
|
112
|
+
x: exitPoint.x - padding,
|
|
113
|
+
y: exitPoint.y - padding
|
|
114
|
+
}, {
|
|
115
|
+
x: exitPoint.x + padding,
|
|
116
|
+
y: exitPoint.y - padding
|
|
117
|
+
});
|
|
118
|
+
break;
|
|
119
|
+
case "left":
|
|
120
|
+
paddedExitPoints.push({
|
|
121
|
+
x: exitPoint.x + padding,
|
|
122
|
+
y: exitPoint.y - padding
|
|
123
|
+
}, {
|
|
124
|
+
x: exitPoint.x + padding,
|
|
125
|
+
y: exitPoint.y + padding
|
|
126
|
+
});
|
|
127
|
+
break;
|
|
128
|
+
case "right":
|
|
129
|
+
paddedExitPoints.push({
|
|
130
|
+
x: exitPoint.x - padding,
|
|
131
|
+
y: exitPoint.y - padding
|
|
132
|
+
}, {
|
|
133
|
+
x: exitPoint.x - padding,
|
|
134
|
+
y: exitPoint.y + padding
|
|
135
|
+
});
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
return paddedExitPoints;
|
|
139
|
+
}
|
|
140
|
+
function getPointsFromRect(rect) {
|
|
141
|
+
const { top, right, bottom, left } = rect;
|
|
142
|
+
return [
|
|
143
|
+
{
|
|
144
|
+
x: left,
|
|
145
|
+
y: top
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
x: right,
|
|
149
|
+
y: top
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
x: right,
|
|
153
|
+
y: bottom
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
x: left,
|
|
157
|
+
y: bottom
|
|
158
|
+
}
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
function isPointInPolygon(point, polygon) {
|
|
162
|
+
const { x, y } = point;
|
|
163
|
+
let inside = false;
|
|
164
|
+
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
|
165
|
+
const xi = polygon[i].x;
|
|
166
|
+
const yi = polygon[i].y;
|
|
167
|
+
const xj = polygon[j].x;
|
|
168
|
+
const yj = polygon[j].y;
|
|
169
|
+
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
170
|
+
if (intersect) inside = !inside;
|
|
171
|
+
}
|
|
172
|
+
return inside;
|
|
173
|
+
}
|
|
174
|
+
function getHull(points) {
|
|
175
|
+
const newPoints = points.slice();
|
|
176
|
+
newPoints.sort((a, b) => {
|
|
177
|
+
if (a.x < b.x) return -1;
|
|
178
|
+
else if (a.x > b.x) return 1;
|
|
179
|
+
else if (a.y < b.y) return -1;
|
|
180
|
+
else if (a.y > b.y) return 1;
|
|
181
|
+
else return 0;
|
|
182
|
+
});
|
|
183
|
+
return getHullPresorted(newPoints);
|
|
184
|
+
}
|
|
185
|
+
function getHullPresorted(points) {
|
|
186
|
+
if (points.length <= 1) return points.slice();
|
|
187
|
+
const upperHull = [];
|
|
188
|
+
for (let i = 0; i < points.length; i++) {
|
|
189
|
+
const p = points[i];
|
|
190
|
+
while (upperHull.length >= 2) {
|
|
191
|
+
const q = upperHull[upperHull.length - 1];
|
|
192
|
+
const r = upperHull[upperHull.length - 2];
|
|
193
|
+
if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();
|
|
194
|
+
else break;
|
|
195
|
+
}
|
|
196
|
+
upperHull.push(p);
|
|
197
|
+
}
|
|
198
|
+
upperHull.pop();
|
|
199
|
+
const lowerHull = [];
|
|
200
|
+
for (let i = points.length - 1; i >= 0; i--) {
|
|
201
|
+
const p = points[i];
|
|
202
|
+
while (lowerHull.length >= 2) {
|
|
203
|
+
const q = lowerHull[lowerHull.length - 1];
|
|
204
|
+
const r = lowerHull[lowerHull.length - 2];
|
|
205
|
+
if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();
|
|
206
|
+
else break;
|
|
207
|
+
}
|
|
208
|
+
lowerHull.push(p);
|
|
209
|
+
}
|
|
210
|
+
lowerHull.pop();
|
|
211
|
+
if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) return upperHull;
|
|
212
|
+
else return upperHull.concat(lowerHull);
|
|
213
|
+
}
|
|
214
|
+
const _hoisted_1 = {
|
|
215
|
+
key: 0,
|
|
216
|
+
d: "M0 0L6 6L12 0"
|
|
217
|
+
};
|
|
218
|
+
const _hoisted_2 = {
|
|
219
|
+
key: 1,
|
|
220
|
+
d: "M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"
|
|
221
|
+
};
|
|
222
|
+
var Arrow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
223
|
+
__name: "Arrow",
|
|
224
|
+
props: {
|
|
225
|
+
width: {
|
|
226
|
+
type: Number,
|
|
227
|
+
required: false,
|
|
228
|
+
default: 10
|
|
229
|
+
},
|
|
230
|
+
height: {
|
|
231
|
+
type: Number,
|
|
232
|
+
required: false,
|
|
233
|
+
default: 5
|
|
234
|
+
},
|
|
235
|
+
rounded: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
required: false
|
|
238
|
+
},
|
|
239
|
+
asChild: {
|
|
240
|
+
type: Boolean,
|
|
241
|
+
required: false
|
|
242
|
+
},
|
|
243
|
+
as: {
|
|
244
|
+
type: null,
|
|
245
|
+
required: false,
|
|
246
|
+
default: "svg"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
setup(__props) {
|
|
250
|
+
const props = __props;
|
|
251
|
+
useForwardExpose();
|
|
252
|
+
return (_ctx, _cache) => {
|
|
253
|
+
return openBlock(), createBlock(unref(Primitive), mergeProps(props, {
|
|
254
|
+
width: _ctx.width,
|
|
255
|
+
height: _ctx.height,
|
|
256
|
+
viewBox: _ctx.asChild ? void 0 : "0 0 12 6",
|
|
257
|
+
preserveAspectRatio: _ctx.asChild ? void 0 : "none"
|
|
258
|
+
}), {
|
|
259
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [!_ctx.rounded ? (openBlock(), createElementBlock("path", _hoisted_1)) : (openBlock(), createElementBlock("path", _hoisted_2))])]),
|
|
260
|
+
_: 3
|
|
261
|
+
}, 16, [
|
|
262
|
+
"width",
|
|
263
|
+
"height",
|
|
264
|
+
"viewBox",
|
|
265
|
+
"preserveAspectRatio"
|
|
266
|
+
]);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
var Arrow_default = Arrow_vue_vue_type_script_setup_true_lang_default;
|
|
271
|
+
const OPPOSITE_SIDE = {
|
|
272
|
+
top: "bottom",
|
|
273
|
+
right: "left",
|
|
274
|
+
bottom: "top",
|
|
275
|
+
left: "right"
|
|
276
|
+
};
|
|
277
|
+
var PopperArrow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
278
|
+
inheritAttrs: false,
|
|
279
|
+
__name: "PopperArrow",
|
|
280
|
+
props: {
|
|
281
|
+
width: {
|
|
282
|
+
type: Number,
|
|
283
|
+
required: false
|
|
284
|
+
},
|
|
285
|
+
height: {
|
|
286
|
+
type: Number,
|
|
287
|
+
required: false
|
|
288
|
+
},
|
|
289
|
+
rounded: {
|
|
290
|
+
type: Boolean,
|
|
291
|
+
required: false
|
|
292
|
+
},
|
|
293
|
+
asChild: {
|
|
294
|
+
type: Boolean,
|
|
295
|
+
required: false
|
|
296
|
+
},
|
|
297
|
+
as: {
|
|
298
|
+
type: null,
|
|
299
|
+
required: false,
|
|
300
|
+
default: "svg"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
setup(__props) {
|
|
304
|
+
const { forwardRef } = useForwardExpose();
|
|
305
|
+
const contentContext = injectPopperContentContext();
|
|
306
|
+
const baseSide = computed(() => OPPOSITE_SIDE[contentContext.placedSide.value]);
|
|
307
|
+
return (_ctx, _cache) => {
|
|
308
|
+
var _a, _b, _c, _d;
|
|
309
|
+
return openBlock(), createElementBlock("span", {
|
|
310
|
+
ref: (el) => {
|
|
311
|
+
unref(contentContext).onArrowChange(el);
|
|
312
|
+
return void 0;
|
|
313
|
+
},
|
|
314
|
+
style: normalizeStyle({
|
|
315
|
+
position: "absolute",
|
|
316
|
+
left: ((_a = unref(contentContext).arrowX) == null ? void 0 : _a.value) ? `${(_b = unref(contentContext).arrowX) == null ? void 0 : _b.value}px` : void 0,
|
|
317
|
+
top: ((_c = unref(contentContext).arrowY) == null ? void 0 : _c.value) ? `${(_d = unref(contentContext).arrowY) == null ? void 0 : _d.value}px` : void 0,
|
|
318
|
+
[baseSide.value]: 0,
|
|
319
|
+
transformOrigin: {
|
|
320
|
+
top: "",
|
|
321
|
+
right: "0 0",
|
|
322
|
+
bottom: "center 0",
|
|
323
|
+
left: "100% 0"
|
|
324
|
+
}[unref(contentContext).placedSide.value],
|
|
325
|
+
transform: {
|
|
326
|
+
top: "translateY(100%)",
|
|
327
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
328
|
+
bottom: `rotate(180deg)`,
|
|
329
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
330
|
+
}[unref(contentContext).placedSide.value],
|
|
331
|
+
visibility: unref(contentContext).shouldHideArrow.value ? "hidden" : void 0
|
|
332
|
+
})
|
|
333
|
+
}, [createVNode(Arrow_default, mergeProps(_ctx.$attrs, {
|
|
334
|
+
ref: unref(forwardRef),
|
|
335
|
+
style: { display: "block" },
|
|
336
|
+
as: _ctx.as,
|
|
337
|
+
"as-child": _ctx.asChild,
|
|
338
|
+
rounded: _ctx.rounded,
|
|
339
|
+
width: _ctx.width,
|
|
340
|
+
height: _ctx.height
|
|
341
|
+
}), {
|
|
342
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
343
|
+
_: 3
|
|
344
|
+
}, 16, [
|
|
345
|
+
"as",
|
|
346
|
+
"as-child",
|
|
347
|
+
"rounded",
|
|
348
|
+
"width",
|
|
349
|
+
"height"
|
|
350
|
+
])], 4);
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
var PopperArrow_default = PopperArrow_vue_vue_type_script_setup_true_lang_default;
|
|
355
|
+
var TooltipArrow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
356
|
+
__name: "TooltipArrow",
|
|
357
|
+
props: {
|
|
358
|
+
width: {
|
|
359
|
+
type: Number,
|
|
360
|
+
required: false,
|
|
361
|
+
default: 10
|
|
362
|
+
},
|
|
363
|
+
height: {
|
|
364
|
+
type: Number,
|
|
365
|
+
required: false,
|
|
366
|
+
default: 5
|
|
367
|
+
},
|
|
368
|
+
asChild: {
|
|
369
|
+
type: Boolean,
|
|
370
|
+
required: false
|
|
371
|
+
},
|
|
372
|
+
as: {
|
|
373
|
+
type: null,
|
|
374
|
+
required: false,
|
|
375
|
+
default: "svg"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
setup(__props) {
|
|
379
|
+
const props = __props;
|
|
380
|
+
useForwardExpose();
|
|
381
|
+
return (_ctx, _cache) => {
|
|
382
|
+
return openBlock(), createBlock(unref(PopperArrow_default), normalizeProps(guardReactiveProps(props)), {
|
|
383
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
384
|
+
_: 3
|
|
385
|
+
}, 16);
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
var TooltipArrow_default = TooltipArrow_vue_vue_type_script_setup_true_lang_default;
|
|
390
|
+
const [injectTooltipProviderContext, provideTooltipProviderContext] = createContext("TooltipProvider");
|
|
391
|
+
var TooltipProvider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
392
|
+
inheritAttrs: false,
|
|
393
|
+
__name: "TooltipProvider",
|
|
394
|
+
props: {
|
|
395
|
+
delayDuration: {
|
|
396
|
+
type: Number,
|
|
397
|
+
required: false,
|
|
398
|
+
default: 700
|
|
399
|
+
},
|
|
400
|
+
skipDelayDuration: {
|
|
401
|
+
type: Number,
|
|
402
|
+
required: false,
|
|
403
|
+
default: 300
|
|
404
|
+
},
|
|
405
|
+
disableHoverableContent: {
|
|
406
|
+
type: Boolean,
|
|
407
|
+
required: false,
|
|
408
|
+
default: false
|
|
409
|
+
},
|
|
410
|
+
disableClosingTrigger: {
|
|
411
|
+
type: Boolean,
|
|
412
|
+
required: false
|
|
413
|
+
},
|
|
414
|
+
disabled: {
|
|
415
|
+
type: Boolean,
|
|
416
|
+
required: false
|
|
417
|
+
},
|
|
418
|
+
ignoreNonKeyboardFocus: {
|
|
419
|
+
type: Boolean,
|
|
420
|
+
required: false,
|
|
421
|
+
default: false
|
|
422
|
+
},
|
|
423
|
+
content: {
|
|
424
|
+
type: Object,
|
|
425
|
+
required: false
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
setup(__props) {
|
|
429
|
+
const props = __props;
|
|
430
|
+
const { delayDuration, skipDelayDuration, disableHoverableContent, disableClosingTrigger, ignoreNonKeyboardFocus, disabled, content } = toRefs(props);
|
|
431
|
+
useForwardExpose();
|
|
432
|
+
const isOpenDelayed = ref(true);
|
|
433
|
+
const isPointerInTransitRef = ref(false);
|
|
434
|
+
const { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {
|
|
435
|
+
isOpenDelayed.value = true;
|
|
436
|
+
}, skipDelayDuration, { immediate: false });
|
|
437
|
+
provideTooltipProviderContext({
|
|
438
|
+
isOpenDelayed,
|
|
439
|
+
delayDuration,
|
|
440
|
+
onOpen() {
|
|
441
|
+
clearTimer();
|
|
442
|
+
isOpenDelayed.value = false;
|
|
443
|
+
},
|
|
444
|
+
onClose() {
|
|
445
|
+
startTimer();
|
|
446
|
+
},
|
|
447
|
+
isPointerInTransitRef,
|
|
448
|
+
disableHoverableContent,
|
|
449
|
+
disableClosingTrigger,
|
|
450
|
+
disabled,
|
|
451
|
+
ignoreNonKeyboardFocus,
|
|
452
|
+
content
|
|
453
|
+
});
|
|
454
|
+
return (_ctx, _cache) => {
|
|
455
|
+
return renderSlot(_ctx.$slots, "default");
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
var TooltipProvider_default = TooltipProvider_vue_vue_type_script_setup_true_lang_default;
|
|
460
|
+
const TOOLTIP_OPEN = "tooltip.open";
|
|
461
|
+
const [injectTooltipRootContext, provideTooltipRootContext] = createContext("TooltipRoot");
|
|
462
|
+
var TooltipRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
463
|
+
__name: "TooltipRoot",
|
|
464
|
+
props: {
|
|
465
|
+
defaultOpen: {
|
|
466
|
+
type: Boolean,
|
|
467
|
+
required: false,
|
|
468
|
+
default: false
|
|
469
|
+
},
|
|
470
|
+
open: {
|
|
471
|
+
type: Boolean,
|
|
472
|
+
required: false,
|
|
473
|
+
default: void 0
|
|
474
|
+
},
|
|
475
|
+
delayDuration: {
|
|
476
|
+
type: Number,
|
|
477
|
+
required: false,
|
|
478
|
+
default: void 0
|
|
479
|
+
},
|
|
480
|
+
disableHoverableContent: {
|
|
481
|
+
type: Boolean,
|
|
482
|
+
required: false,
|
|
483
|
+
default: void 0
|
|
484
|
+
},
|
|
485
|
+
disableClosingTrigger: {
|
|
486
|
+
type: Boolean,
|
|
487
|
+
required: false,
|
|
488
|
+
default: void 0
|
|
489
|
+
},
|
|
490
|
+
disabled: {
|
|
491
|
+
type: Boolean,
|
|
492
|
+
required: false,
|
|
493
|
+
default: void 0
|
|
494
|
+
},
|
|
495
|
+
ignoreNonKeyboardFocus: {
|
|
496
|
+
type: Boolean,
|
|
497
|
+
required: false,
|
|
498
|
+
default: void 0
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
emits: ["update:open"],
|
|
502
|
+
setup(__props, { emit: __emit }) {
|
|
503
|
+
const props = __props;
|
|
504
|
+
const emit = __emit;
|
|
505
|
+
useForwardExpose();
|
|
506
|
+
const providerContext = injectTooltipProviderContext();
|
|
507
|
+
const disableHoverableContent = computed(() => props.disableHoverableContent ?? providerContext.disableHoverableContent.value);
|
|
508
|
+
const disableClosingTrigger = computed(() => props.disableClosingTrigger ?? providerContext.disableClosingTrigger.value);
|
|
509
|
+
const disableTooltip = computed(() => props.disabled ?? providerContext.disabled.value);
|
|
510
|
+
const delayDuration = computed(() => props.delayDuration ?? providerContext.delayDuration.value);
|
|
511
|
+
const ignoreNonKeyboardFocus = computed(() => props.ignoreNonKeyboardFocus ?? providerContext.ignoreNonKeyboardFocus.value);
|
|
512
|
+
const open = useVModel(props, "open", emit, {
|
|
513
|
+
defaultValue: props.defaultOpen,
|
|
514
|
+
passive: props.open === void 0
|
|
515
|
+
});
|
|
516
|
+
watch(open, (isOpen) => {
|
|
517
|
+
if (!providerContext.onClose) return;
|
|
518
|
+
if (isOpen) {
|
|
519
|
+
providerContext.onOpen();
|
|
520
|
+
document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));
|
|
521
|
+
} else providerContext.onClose();
|
|
522
|
+
});
|
|
523
|
+
const wasOpenDelayedRef = ref(false);
|
|
524
|
+
const trigger = ref();
|
|
525
|
+
const stateAttribute = computed(() => {
|
|
526
|
+
if (!open.value) return "closed";
|
|
527
|
+
return wasOpenDelayedRef.value ? "delayed-open" : "instant-open";
|
|
528
|
+
});
|
|
529
|
+
const { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {
|
|
530
|
+
wasOpenDelayedRef.value = true;
|
|
531
|
+
open.value = true;
|
|
532
|
+
}, delayDuration, { immediate: false });
|
|
533
|
+
function handleOpen() {
|
|
534
|
+
clearTimer();
|
|
535
|
+
wasOpenDelayedRef.value = false;
|
|
536
|
+
open.value = true;
|
|
537
|
+
}
|
|
538
|
+
function handleClose() {
|
|
539
|
+
clearTimer();
|
|
540
|
+
open.value = false;
|
|
541
|
+
}
|
|
542
|
+
function handleDelayedOpen() {
|
|
543
|
+
startTimer();
|
|
544
|
+
}
|
|
545
|
+
provideTooltipRootContext({
|
|
546
|
+
contentId: "",
|
|
547
|
+
open,
|
|
548
|
+
stateAttribute,
|
|
549
|
+
trigger,
|
|
550
|
+
onTriggerChange(el) {
|
|
551
|
+
trigger.value = el;
|
|
552
|
+
},
|
|
553
|
+
onTriggerEnter() {
|
|
554
|
+
if (providerContext.isOpenDelayed.value) handleDelayedOpen();
|
|
555
|
+
else handleOpen();
|
|
556
|
+
},
|
|
557
|
+
onTriggerLeave() {
|
|
558
|
+
if (disableHoverableContent.value) handleClose();
|
|
559
|
+
else clearTimer();
|
|
560
|
+
},
|
|
561
|
+
onOpen: handleOpen,
|
|
562
|
+
onClose: handleClose,
|
|
563
|
+
disableHoverableContent,
|
|
564
|
+
disableClosingTrigger,
|
|
565
|
+
disabled: disableTooltip,
|
|
566
|
+
ignoreNonKeyboardFocus
|
|
567
|
+
});
|
|
568
|
+
return (_ctx, _cache) => {
|
|
569
|
+
return openBlock(), createBlock(unref(PopperRoot_default), null, {
|
|
570
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", { open: unref(open) })]),
|
|
571
|
+
_: 3
|
|
572
|
+
});
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
var TooltipRoot_default = TooltipRoot_vue_vue_type_script_setup_true_lang_default;
|
|
577
|
+
var TooltipContentImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
578
|
+
__name: "TooltipContentImpl",
|
|
579
|
+
props: {
|
|
580
|
+
ariaLabel: {
|
|
581
|
+
type: String,
|
|
582
|
+
required: false
|
|
583
|
+
},
|
|
584
|
+
asChild: {
|
|
585
|
+
type: Boolean,
|
|
586
|
+
required: false,
|
|
587
|
+
default: void 0
|
|
588
|
+
},
|
|
589
|
+
as: {
|
|
590
|
+
type: null,
|
|
591
|
+
required: false
|
|
592
|
+
},
|
|
593
|
+
side: {
|
|
594
|
+
type: null,
|
|
595
|
+
required: false
|
|
596
|
+
},
|
|
597
|
+
sideOffset: {
|
|
598
|
+
type: Number,
|
|
599
|
+
required: false
|
|
600
|
+
},
|
|
601
|
+
align: {
|
|
602
|
+
type: null,
|
|
603
|
+
required: false
|
|
604
|
+
},
|
|
605
|
+
alignOffset: {
|
|
606
|
+
type: Number,
|
|
607
|
+
required: false
|
|
608
|
+
},
|
|
609
|
+
avoidCollisions: {
|
|
610
|
+
type: Boolean,
|
|
611
|
+
required: false,
|
|
612
|
+
default: void 0
|
|
613
|
+
},
|
|
614
|
+
collisionBoundary: {
|
|
615
|
+
type: null,
|
|
616
|
+
required: false
|
|
617
|
+
},
|
|
618
|
+
collisionPadding: {
|
|
619
|
+
type: [Number, Object],
|
|
620
|
+
required: false
|
|
621
|
+
},
|
|
622
|
+
arrowPadding: {
|
|
623
|
+
type: Number,
|
|
624
|
+
required: false
|
|
625
|
+
},
|
|
626
|
+
sticky: {
|
|
627
|
+
type: String,
|
|
628
|
+
required: false
|
|
629
|
+
},
|
|
630
|
+
hideWhenDetached: {
|
|
631
|
+
type: Boolean,
|
|
632
|
+
required: false,
|
|
633
|
+
default: void 0
|
|
634
|
+
},
|
|
635
|
+
positionStrategy: {
|
|
636
|
+
type: String,
|
|
637
|
+
required: false
|
|
638
|
+
},
|
|
639
|
+
updatePositionStrategy: {
|
|
640
|
+
type: String,
|
|
641
|
+
required: false
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
emits: ["escapeKeyDown", "pointerDownOutside"],
|
|
645
|
+
setup(__props, { emit: __emit }) {
|
|
646
|
+
const props = __props;
|
|
647
|
+
const emits = __emit;
|
|
648
|
+
const rootContext = injectTooltipRootContext();
|
|
649
|
+
const providerContext = injectTooltipProviderContext();
|
|
650
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
651
|
+
const ariaLabel = computed(() => {
|
|
652
|
+
var _a;
|
|
653
|
+
return props.ariaLabel || ((_a = currentElement.value) == null ? void 0 : _a.textContent);
|
|
654
|
+
});
|
|
655
|
+
const popperContentProps = computed(() => {
|
|
656
|
+
const { ariaLabel: _, ...restProps } = props;
|
|
657
|
+
return defu(restProps, providerContext.content.value ?? {}, {
|
|
658
|
+
side: "top",
|
|
659
|
+
sideOffset: 0,
|
|
660
|
+
align: "center",
|
|
661
|
+
avoidCollisions: true,
|
|
662
|
+
collisionBoundary: [],
|
|
663
|
+
collisionPadding: 0,
|
|
664
|
+
arrowPadding: 0,
|
|
665
|
+
sticky: "partial",
|
|
666
|
+
hideWhenDetached: false
|
|
667
|
+
});
|
|
668
|
+
});
|
|
669
|
+
onMounted(() => {
|
|
670
|
+
useEventListener(window, "scroll", (event) => {
|
|
671
|
+
const target = event.target;
|
|
672
|
+
if (target == null ? void 0 : target.contains(rootContext.trigger.value)) rootContext.onClose();
|
|
673
|
+
});
|
|
674
|
+
useEventListener(window, TOOLTIP_OPEN, rootContext.onClose);
|
|
675
|
+
});
|
|
676
|
+
return (_ctx, _cache) => {
|
|
677
|
+
return openBlock(), createBlock(unref(DismissableLayer_default), {
|
|
678
|
+
"as-child": "",
|
|
679
|
+
"disable-outside-pointer-events": false,
|
|
680
|
+
onEscapeKeyDown: _cache[0] || (_cache[0] = ($event) => emits("escapeKeyDown", $event)),
|
|
681
|
+
onPointerDownOutside: _cache[1] || (_cache[1] = (event) => {
|
|
682
|
+
var _a;
|
|
683
|
+
if (unref(rootContext).disableClosingTrigger.value && ((_a = unref(rootContext).trigger.value) == null ? void 0 : _a.contains(event.target))) event.preventDefault();
|
|
684
|
+
emits("pointerDownOutside", event);
|
|
685
|
+
}),
|
|
686
|
+
onFocusOutside: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
687
|
+
}, ["prevent"])),
|
|
688
|
+
onDismiss: _cache[3] || (_cache[3] = ($event) => unref(rootContext).onClose())
|
|
689
|
+
}, {
|
|
690
|
+
default: withCtx(() => [createVNode(unref(PopperContent_default), mergeProps({
|
|
691
|
+
ref: unref(forwardRef),
|
|
692
|
+
"data-state": unref(rootContext).stateAttribute.value
|
|
693
|
+
}, {
|
|
694
|
+
..._ctx.$attrs,
|
|
695
|
+
...popperContentProps.value
|
|
696
|
+
}, { style: {
|
|
697
|
+
"--reka-tooltip-content-transform-origin": "var(--reka-popper-transform-origin)",
|
|
698
|
+
"--reka-tooltip-content-available-width": "var(--reka-popper-available-width)",
|
|
699
|
+
"--reka-tooltip-content-available-height": "var(--reka-popper-available-height)",
|
|
700
|
+
"--reka-tooltip-trigger-width": "var(--reka-popper-anchor-width)",
|
|
701
|
+
"--reka-tooltip-trigger-height": "var(--reka-popper-anchor-height)"
|
|
702
|
+
} }), {
|
|
703
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default"), createVNode(unref(VisuallyHidden_default), {
|
|
704
|
+
id: unref(rootContext).contentId,
|
|
705
|
+
role: "tooltip"
|
|
706
|
+
}, {
|
|
707
|
+
default: withCtx(() => [createTextVNode(toDisplayString(ariaLabel.value), 1)]),
|
|
708
|
+
_: 1
|
|
709
|
+
}, 8, ["id"])]),
|
|
710
|
+
_: 3
|
|
711
|
+
}, 16, ["data-state"])]),
|
|
712
|
+
_: 3
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
var TooltipContentImpl_default = TooltipContentImpl_vue_vue_type_script_setup_true_lang_default;
|
|
718
|
+
var TooltipContentHoverable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
719
|
+
__name: "TooltipContentHoverable",
|
|
720
|
+
props: {
|
|
721
|
+
ariaLabel: {
|
|
722
|
+
type: String,
|
|
723
|
+
required: false
|
|
724
|
+
},
|
|
725
|
+
asChild: {
|
|
726
|
+
type: Boolean,
|
|
727
|
+
required: false
|
|
728
|
+
},
|
|
729
|
+
as: {
|
|
730
|
+
type: null,
|
|
731
|
+
required: false
|
|
732
|
+
},
|
|
733
|
+
side: {
|
|
734
|
+
type: null,
|
|
735
|
+
required: false
|
|
736
|
+
},
|
|
737
|
+
sideOffset: {
|
|
738
|
+
type: Number,
|
|
739
|
+
required: false
|
|
740
|
+
},
|
|
741
|
+
align: {
|
|
742
|
+
type: null,
|
|
743
|
+
required: false
|
|
744
|
+
},
|
|
745
|
+
alignOffset: {
|
|
746
|
+
type: Number,
|
|
747
|
+
required: false
|
|
748
|
+
},
|
|
749
|
+
avoidCollisions: {
|
|
750
|
+
type: Boolean,
|
|
751
|
+
required: false
|
|
752
|
+
},
|
|
753
|
+
collisionBoundary: {
|
|
754
|
+
type: null,
|
|
755
|
+
required: false
|
|
756
|
+
},
|
|
757
|
+
collisionPadding: {
|
|
758
|
+
type: [Number, Object],
|
|
759
|
+
required: false
|
|
760
|
+
},
|
|
761
|
+
arrowPadding: {
|
|
762
|
+
type: Number,
|
|
763
|
+
required: false
|
|
764
|
+
},
|
|
765
|
+
sticky: {
|
|
766
|
+
type: String,
|
|
767
|
+
required: false
|
|
768
|
+
},
|
|
769
|
+
hideWhenDetached: {
|
|
770
|
+
type: Boolean,
|
|
771
|
+
required: false
|
|
772
|
+
},
|
|
773
|
+
positionStrategy: {
|
|
774
|
+
type: String,
|
|
775
|
+
required: false
|
|
776
|
+
},
|
|
777
|
+
updatePositionStrategy: {
|
|
778
|
+
type: String,
|
|
779
|
+
required: false
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
setup(__props) {
|
|
783
|
+
const props = __props;
|
|
784
|
+
const forwardedProps = useForwardProps(props);
|
|
785
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
786
|
+
const { trigger, onClose } = injectTooltipRootContext();
|
|
787
|
+
const providerContext = injectTooltipProviderContext();
|
|
788
|
+
const { isPointerInTransit, onPointerExit } = useGraceArea(trigger, currentElement);
|
|
789
|
+
providerContext.isPointerInTransitRef = isPointerInTransit;
|
|
790
|
+
onPointerExit(() => {
|
|
791
|
+
onClose();
|
|
792
|
+
});
|
|
793
|
+
return (_ctx, _cache) => {
|
|
794
|
+
return openBlock(), createBlock(TooltipContentImpl_default, mergeProps({ ref: unref(forwardRef) }, unref(forwardedProps)), {
|
|
795
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
796
|
+
_: 3
|
|
797
|
+
}, 16);
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
var TooltipContentHoverable_default = TooltipContentHoverable_vue_vue_type_script_setup_true_lang_default;
|
|
802
|
+
var TooltipContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
803
|
+
__name: "TooltipContent",
|
|
804
|
+
props: {
|
|
805
|
+
forceMount: {
|
|
806
|
+
type: Boolean,
|
|
807
|
+
required: false
|
|
808
|
+
},
|
|
809
|
+
ariaLabel: {
|
|
810
|
+
type: String,
|
|
811
|
+
required: false
|
|
812
|
+
},
|
|
813
|
+
asChild: {
|
|
814
|
+
type: Boolean,
|
|
815
|
+
required: false
|
|
816
|
+
},
|
|
817
|
+
as: {
|
|
818
|
+
type: null,
|
|
819
|
+
required: false
|
|
820
|
+
},
|
|
821
|
+
side: {
|
|
822
|
+
type: null,
|
|
823
|
+
required: false
|
|
824
|
+
},
|
|
825
|
+
sideOffset: {
|
|
826
|
+
type: Number,
|
|
827
|
+
required: false
|
|
828
|
+
},
|
|
829
|
+
align: {
|
|
830
|
+
type: null,
|
|
831
|
+
required: false
|
|
832
|
+
},
|
|
833
|
+
alignOffset: {
|
|
834
|
+
type: Number,
|
|
835
|
+
required: false
|
|
836
|
+
},
|
|
837
|
+
avoidCollisions: {
|
|
838
|
+
type: Boolean,
|
|
839
|
+
required: false
|
|
840
|
+
},
|
|
841
|
+
collisionBoundary: {
|
|
842
|
+
type: null,
|
|
843
|
+
required: false
|
|
844
|
+
},
|
|
845
|
+
collisionPadding: {
|
|
846
|
+
type: [Number, Object],
|
|
847
|
+
required: false
|
|
848
|
+
},
|
|
849
|
+
arrowPadding: {
|
|
850
|
+
type: Number,
|
|
851
|
+
required: false
|
|
852
|
+
},
|
|
853
|
+
sticky: {
|
|
854
|
+
type: String,
|
|
855
|
+
required: false
|
|
856
|
+
},
|
|
857
|
+
hideWhenDetached: {
|
|
858
|
+
type: Boolean,
|
|
859
|
+
required: false
|
|
860
|
+
},
|
|
861
|
+
positionStrategy: {
|
|
862
|
+
type: String,
|
|
863
|
+
required: false
|
|
864
|
+
},
|
|
865
|
+
updatePositionStrategy: {
|
|
866
|
+
type: String,
|
|
867
|
+
required: false
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
emits: ["escapeKeyDown", "pointerDownOutside"],
|
|
871
|
+
setup(__props, { emit: __emit }) {
|
|
872
|
+
const props = __props;
|
|
873
|
+
const emits = __emit;
|
|
874
|
+
const rootContext = injectTooltipRootContext();
|
|
875
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
876
|
+
const { forwardRef } = useForwardExpose();
|
|
877
|
+
return (_ctx, _cache) => {
|
|
878
|
+
return openBlock(), createBlock(unref(Presence_default), { present: _ctx.forceMount || unref(rootContext).open.value }, {
|
|
879
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(rootContext).disableHoverableContent.value ? TooltipContentImpl_default : TooltipContentHoverable_default), mergeProps({ ref: unref(forwardRef) }, unref(forwarded)), {
|
|
880
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
881
|
+
_: 3
|
|
882
|
+
}, 16))]),
|
|
883
|
+
_: 3
|
|
884
|
+
}, 8, ["present"]);
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
var TooltipContent_default = TooltipContent_vue_vue_type_script_setup_true_lang_default;
|
|
889
|
+
var TooltipPortal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
890
|
+
__name: "TooltipPortal",
|
|
891
|
+
props: {
|
|
892
|
+
to: {
|
|
893
|
+
type: null,
|
|
894
|
+
required: false
|
|
895
|
+
},
|
|
896
|
+
disabled: {
|
|
897
|
+
type: Boolean,
|
|
898
|
+
required: false
|
|
899
|
+
},
|
|
900
|
+
defer: {
|
|
901
|
+
type: Boolean,
|
|
902
|
+
required: false
|
|
903
|
+
},
|
|
904
|
+
forceMount: {
|
|
905
|
+
type: Boolean,
|
|
906
|
+
required: false
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
setup(__props) {
|
|
910
|
+
const props = __props;
|
|
911
|
+
return (_ctx, _cache) => {
|
|
912
|
+
return openBlock(), createBlock(unref(Teleport_default), normalizeProps(guardReactiveProps(props)), {
|
|
913
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
914
|
+
_: 3
|
|
915
|
+
}, 16);
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
var TooltipPortal_default = TooltipPortal_vue_vue_type_script_setup_true_lang_default;
|
|
920
|
+
var TooltipTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
921
|
+
__name: "TooltipTrigger",
|
|
922
|
+
props: {
|
|
923
|
+
reference: {
|
|
924
|
+
type: null,
|
|
925
|
+
required: false
|
|
926
|
+
},
|
|
927
|
+
asChild: {
|
|
928
|
+
type: Boolean,
|
|
929
|
+
required: false
|
|
930
|
+
},
|
|
931
|
+
as: {
|
|
932
|
+
type: null,
|
|
933
|
+
required: false,
|
|
934
|
+
default: "button"
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
setup(__props) {
|
|
938
|
+
const props = __props;
|
|
939
|
+
const rootContext = injectTooltipRootContext();
|
|
940
|
+
const providerContext = injectTooltipProviderContext();
|
|
941
|
+
rootContext.contentId || (rootContext.contentId = useId(void 0, "reka-tooltip-content"));
|
|
942
|
+
const { forwardRef, currentElement: triggerElement } = useForwardExpose();
|
|
943
|
+
const isPointerDown = ref(false);
|
|
944
|
+
const hasPointerMoveOpened = ref(false);
|
|
945
|
+
const tooltipListeners = computed(() => {
|
|
946
|
+
if (rootContext.disabled.value) return {};
|
|
947
|
+
return {
|
|
948
|
+
click: handleClick,
|
|
949
|
+
focus: handleFocus,
|
|
950
|
+
pointermove: handlePointerMove,
|
|
951
|
+
pointerleave: handlePointerLeave,
|
|
952
|
+
pointerdown: handlePointerDown,
|
|
953
|
+
blur: handleBlur
|
|
954
|
+
};
|
|
955
|
+
});
|
|
956
|
+
onMounted(() => {
|
|
957
|
+
rootContext.onTriggerChange(triggerElement.value);
|
|
958
|
+
});
|
|
959
|
+
function handlePointerUp() {
|
|
960
|
+
setTimeout(() => {
|
|
961
|
+
isPointerDown.value = false;
|
|
962
|
+
}, 1);
|
|
963
|
+
}
|
|
964
|
+
function handlePointerDown() {
|
|
965
|
+
if (rootContext.open && !rootContext.disableClosingTrigger.value) rootContext.onClose();
|
|
966
|
+
isPointerDown.value = true;
|
|
967
|
+
document.addEventListener("pointerup", handlePointerUp, { once: true });
|
|
968
|
+
}
|
|
969
|
+
function handlePointerMove(event) {
|
|
970
|
+
if (event.pointerType === "touch") return;
|
|
971
|
+
if (!hasPointerMoveOpened.value && !providerContext.isPointerInTransitRef.value) {
|
|
972
|
+
rootContext.onTriggerEnter();
|
|
973
|
+
hasPointerMoveOpened.value = true;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
function handlePointerLeave() {
|
|
977
|
+
rootContext.onTriggerLeave();
|
|
978
|
+
hasPointerMoveOpened.value = false;
|
|
979
|
+
}
|
|
980
|
+
function handleFocus(event) {
|
|
981
|
+
var _a, _b;
|
|
982
|
+
if (isPointerDown.value) return;
|
|
983
|
+
if (rootContext.ignoreNonKeyboardFocus.value && !((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, ":focus-visible"))) return;
|
|
984
|
+
rootContext.onOpen();
|
|
985
|
+
}
|
|
986
|
+
function handleBlur() {
|
|
987
|
+
rootContext.onClose();
|
|
988
|
+
}
|
|
989
|
+
function handleClick() {
|
|
990
|
+
if (!rootContext.disableClosingTrigger.value) rootContext.onClose();
|
|
991
|
+
}
|
|
992
|
+
return (_ctx, _cache) => {
|
|
993
|
+
return openBlock(), createBlock(unref(PopperAnchor_default), {
|
|
994
|
+
"as-child": "",
|
|
995
|
+
reference: _ctx.reference
|
|
996
|
+
}, {
|
|
997
|
+
default: withCtx(() => [createVNode(unref(Primitive), mergeProps({
|
|
998
|
+
ref: unref(forwardRef),
|
|
999
|
+
"aria-describedby": unref(rootContext).open.value ? unref(rootContext).contentId : void 0,
|
|
1000
|
+
"data-state": unref(rootContext).stateAttribute.value,
|
|
1001
|
+
as: _ctx.as,
|
|
1002
|
+
"as-child": props.asChild,
|
|
1003
|
+
"data-grace-area-trigger": ""
|
|
1004
|
+
}, toHandlers(tooltipListeners.value)), {
|
|
1005
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1006
|
+
_: 3
|
|
1007
|
+
}, 16, [
|
|
1008
|
+
"aria-describedby",
|
|
1009
|
+
"data-state",
|
|
1010
|
+
"as",
|
|
1011
|
+
"as-child"
|
|
1012
|
+
])]),
|
|
1013
|
+
_: 3
|
|
1014
|
+
}, 8, ["reference"]);
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
var TooltipTrigger_default = TooltipTrigger_vue_vue_type_script_setup_true_lang_default;
|
|
1019
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1020
|
+
__name: "Tooltip",
|
|
1021
|
+
props: {
|
|
1022
|
+
defaultOpen: { type: Boolean },
|
|
1023
|
+
open: { type: Boolean },
|
|
1024
|
+
delayDuration: {},
|
|
1025
|
+
disableHoverableContent: { type: Boolean },
|
|
1026
|
+
disableClosingTrigger: { type: Boolean },
|
|
1027
|
+
disabled: { type: Boolean },
|
|
1028
|
+
ignoreNonKeyboardFocus: { type: Boolean }
|
|
1029
|
+
},
|
|
1030
|
+
emits: ["update:open"],
|
|
1031
|
+
setup(__props, { emit: __emit }) {
|
|
1032
|
+
const props = __props;
|
|
1033
|
+
const emits = __emit;
|
|
1034
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
1035
|
+
return (_ctx, _cache) => {
|
|
1036
|
+
return openBlock(), createBlock(unref(TooltipRoot_default), mergeProps({ "data-slot": "tooltip" }, unref(forwarded)), {
|
|
1037
|
+
default: withCtx((slotProps) => [
|
|
1038
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps)))
|
|
1039
|
+
]),
|
|
1040
|
+
_: 3
|
|
1041
|
+
}, 16);
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1046
|
+
...{
|
|
1047
|
+
inheritAttrs: false
|
|
1048
|
+
},
|
|
1049
|
+
__name: "TooltipContent",
|
|
1050
|
+
props: {
|
|
1051
|
+
forceMount: { type: Boolean },
|
|
1052
|
+
ariaLabel: {},
|
|
1053
|
+
asChild: { type: Boolean },
|
|
1054
|
+
as: {},
|
|
1055
|
+
side: {},
|
|
1056
|
+
sideOffset: { default: 4 },
|
|
1057
|
+
align: {},
|
|
1058
|
+
alignOffset: {},
|
|
1059
|
+
avoidCollisions: { type: Boolean },
|
|
1060
|
+
collisionBoundary: {},
|
|
1061
|
+
collisionPadding: {},
|
|
1062
|
+
arrowPadding: {},
|
|
1063
|
+
sticky: {},
|
|
1064
|
+
hideWhenDetached: { type: Boolean },
|
|
1065
|
+
positionStrategy: {},
|
|
1066
|
+
updatePositionStrategy: {},
|
|
1067
|
+
class: {}
|
|
1068
|
+
},
|
|
1069
|
+
emits: ["escapeKeyDown", "pointerDownOutside"],
|
|
1070
|
+
setup(__props, { emit: __emit }) {
|
|
1071
|
+
const props = __props;
|
|
1072
|
+
const emits = __emit;
|
|
1073
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
1074
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
1075
|
+
return (_ctx, _cache) => {
|
|
1076
|
+
return openBlock(), createBlock(unref(TooltipPortal_default), null, {
|
|
1077
|
+
default: withCtx(() => [
|
|
1078
|
+
createVNode(unref(TooltipContent_default), mergeProps({ "data-slot": "tooltip-content" }, { ...unref(forwarded), ..._ctx.$attrs }, {
|
|
1079
|
+
class: unref(cn)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance", props.class)
|
|
1080
|
+
}), {
|
|
1081
|
+
default: withCtx(() => [
|
|
1082
|
+
renderSlot(_ctx.$slots, "default"),
|
|
1083
|
+
createVNode(unref(TooltipArrow_default), { class: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
1084
|
+
]),
|
|
1085
|
+
_: 3
|
|
1086
|
+
}, 16, ["class"])
|
|
1087
|
+
]),
|
|
1088
|
+
_: 3
|
|
1089
|
+
});
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1094
|
+
__name: "TooltipTrigger",
|
|
1095
|
+
props: {
|
|
1096
|
+
reference: {},
|
|
1097
|
+
asChild: { type: Boolean },
|
|
1098
|
+
as: {}
|
|
1099
|
+
},
|
|
1100
|
+
setup(__props) {
|
|
1101
|
+
const props = __props;
|
|
1102
|
+
return (_ctx, _cache) => {
|
|
1103
|
+
return openBlock(), createBlock(unref(TooltipTrigger_default), mergeProps({ "data-slot": "tooltip-trigger" }, props), {
|
|
1104
|
+
default: withCtx(() => [
|
|
1105
|
+
renderSlot(_ctx.$slots, "default")
|
|
1106
|
+
]),
|
|
1107
|
+
_: 3
|
|
1108
|
+
}, 16);
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
export {
|
|
1113
|
+
TooltipProvider_default as T,
|
|
1114
|
+
_sfc_main$2 as _,
|
|
1115
|
+
_sfc_main$1 as a,
|
|
1116
|
+
_sfc_main as b
|
|
1117
|
+
};
|