@hina-ui/vue 1.2.0 → 1.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/dist/index.js +613 -302
- package/dist/index.js.map +1 -1
- package/dist/types/components/alert-dialog/AlertDialog.vue.d.ts +4 -0
- package/dist/types/components/alert-dialog/AlertDialog.vue.d.ts.map +1 -1
- package/dist/types/components/alert-dialog/alert-dialog.variants.d.ts +5 -0
- package/dist/types/components/alert-dialog/alert-dialog.variants.d.ts.map +1 -0
- package/dist/types/components/alert-dialog/composables/useAlertDialogConfirm.d.ts +9 -0
- package/dist/types/components/alert-dialog/composables/useAlertDialogConfirm.d.ts.map +1 -0
- package/dist/types/components/alert-dialog/composables/useConfirmDelay.d.ts +3 -0
- package/dist/types/components/alert-dialog/composables/useConfirmDelay.d.ts.map +1 -0
- package/dist/types/components/anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/types/components/code-block/CodeBlock.vue.d.ts.map +1 -1
- package/dist/types/components/code-block/code-block.variants.d.ts +6 -0
- package/dist/types/components/code-block/code-block.variants.d.ts.map +1 -0
- package/dist/types/components/code-block/composables/useCodeHighlight.d.ts +7 -0
- package/dist/types/components/code-block/composables/useCodeHighlight.d.ts.map +1 -0
- package/dist/types/components/dropdown-menu/DropdownMenu.vue.d.ts +18 -6
- package/dist/types/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -1
- package/dist/types/components/highlight/Highlight.vue.d.ts +2 -0
- package/dist/types/components/highlight/Highlight.vue.d.ts.map +1 -1
- package/dist/types/components/highlight/composables/useHighlightMotion.d.ts +10 -0
- package/dist/types/components/highlight/composables/useHighlightMotion.d.ts.map +1 -0
- package/dist/types/components/lightbox/LightboxThumbs.vue.d.ts.map +1 -1
- package/dist/types/components/popover/Popover.vue.d.ts +19 -6
- package/dist/types/components/popover/Popover.vue.d.ts.map +1 -1
- package/dist/types/components/popover/PopoverContent.vue.d.ts +29 -0
- package/dist/types/components/popover/PopoverContent.vue.d.ts.map +1 -0
- package/dist/types/components/popover/composables/usePopoverCloseFocus.d.ts +2 -0
- package/dist/types/components/popover/composables/usePopoverCloseFocus.d.ts.map +1 -0
- package/dist/types/components/scroll-area/ScrollArea.vue.d.ts.map +1 -1
- package/dist/types/components/scroll-area/composables/useScrollFocus.d.ts +17 -0
- package/dist/types/components/scroll-area/composables/useScrollFocus.d.ts.map +1 -0
- package/dist/types/components/segmented-control/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/types/components/tabs/TabsTrigger.vue.d.ts.map +1 -1
- package/dist/types/lib/anchored-overlay.d.ts +23 -0
- package/dist/types/lib/anchored-overlay.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/alert-dialog/AlertDialog.vue +24 -36
- package/src/components/alert-dialog/alert-dialog.variants.ts +17 -0
- package/src/components/alert-dialog/composables/useAlertDialogConfirm.ts +29 -0
- package/src/components/alert-dialog/composables/useConfirmDelay.ts +37 -0
- package/src/components/anchor/Anchor.vue +1 -0
- package/src/components/code-block/CodeBlock.vue +15 -30
- package/src/components/code-block/code-block.variants.ts +21 -0
- package/src/components/code-block/composables/useCodeHighlight.ts +30 -0
- package/src/components/dropdown-menu/DropdownMenu.vue +16 -4
- package/src/components/highlight/Highlight.vue +5 -4
- package/src/components/highlight/composables/useHighlightMotion.ts +22 -0
- package/src/components/lightbox/LightboxThumbs.vue +1 -0
- package/src/components/popover/Popover.vue +21 -5
- package/src/components/popover/PopoverContent.vue +25 -0
- package/src/components/popover/composables/usePopoverCloseFocus.ts +17 -0
- package/src/components/scroll-area/ScrollArea.vue +7 -5
- package/src/components/scroll-area/composables/useScrollFocus.ts +39 -0
- package/src/components/segmented-control/SegmentedControl.vue +6 -1
- package/src/components/tabs/TabsTrigger.vue +6 -1
- package/src/lib/anchored-overlay.ts +110 -0
- package/src/styles/typography.css +9 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
3
|
import { createTV } from "tailwind-variants";
|
|
4
|
-
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isRef, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRef, toValue, unref, useAttrs, useId, useModel, useSlots, vModelDynamic, vModelSelect, vModelText, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
5
|
-
import { AccordionContent, AccordionHeader, AccordionItem, AccordionRoot, AccordionTrigger, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, AspectRatio, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarNext, CalendarPrev, CalendarRoot, CheckboxGroupRoot, CheckboxRoot, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ComboboxAnchor, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxPortal, ComboboxRoot, ComboboxTrigger, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRoot, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DateFieldInput, DateFieldRoot, DateRangeFieldInput, DateRangeFieldRoot, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCardContent, HoverCardPortal, HoverCardRoot, HoverCardTrigger, ListboxContent, ListboxFilter, ListboxGroup, ListboxGroupLabel, ListboxItem, ListboxItemIndicator, ListboxRoot, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarItemIndicator, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarRoot, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MonthPickerCell, MonthPickerCellTrigger, MonthPickerGrid, MonthPickerGridBody, MonthPickerGridRow, MonthPickerNext, MonthPickerPrev, MonthPickerRoot, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, NumberFieldRoot, PinInputInput, PinInputRoot, PopoverAnchor, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, Primitive, ProgressIndicator, ProgressRoot, RadioGroupItem, RadioGroupRoot, RangeCalendarCell, RangeCalendarCellTrigger, RangeCalendarGrid, RangeCalendarGridBody, RangeCalendarGridHead, RangeCalendarGridRow, RangeCalendarHeadCell, RangeCalendarNext, RangeCalendarPrev, RangeCalendarRoot, RatingItem, RatingItemIndicator, RatingRoot, SelectContent, SelectGroup, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectPortal, SelectRoot, SelectTrigger, Separator, SliderRoot, SliderThumb, SliderTrack, SplitterGroup, SplitterPanel, SplitterResizeHandle, SwitchRoot, TabsContent, TabsList, TabsRoot, TabsTrigger, TagsInputInput, TagsInputItem, TagsInputItemText, TagsInputRoot, TimeFieldInput, TimeFieldRoot, ToastClose, ToastDescription, ToastPortal, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toggle, ToggleGroupItem, ToggleGroupRoot, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TreeItem, TreeRoot, VisuallyHidden, YearPickerCell, YearPickerCellTrigger, YearPickerGrid, YearPickerGridBody, YearPickerGridRow, YearPickerNext, YearPickerPrev, YearPickerRoot, injectListboxItemContext, injectTabsRootContext, injectTooltipProviderContext, useBodyScrollLock, useDirection, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isRef, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onScopeDispose, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRef, toValue, unref, useAttrs, useId, useModel, useSlots, vModelDynamic, vModelSelect, vModelText, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
5
|
+
import { AccordionContent, AccordionHeader, AccordionItem, AccordionRoot, AccordionTrigger, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, AspectRatio, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarNext, CalendarPrev, CalendarRoot, CheckboxGroupRoot, CheckboxRoot, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ComboboxAnchor, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxPortal, ComboboxRoot, ComboboxTrigger, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRoot, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DateFieldInput, DateFieldRoot, DateRangeFieldInput, DateRangeFieldRoot, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCardContent, HoverCardPortal, HoverCardRoot, HoverCardTrigger, ListboxContent, ListboxFilter, ListboxGroup, ListboxGroupLabel, ListboxItem, ListboxItemIndicator, ListboxRoot, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarItemIndicator, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarRoot, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MonthPickerCell, MonthPickerCellTrigger, MonthPickerGrid, MonthPickerGridBody, MonthPickerGridRow, MonthPickerNext, MonthPickerPrev, MonthPickerRoot, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, NumberFieldRoot, PinInputInput, PinInputRoot, PopoverAnchor, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, Primitive, ProgressIndicator, ProgressRoot, RadioGroupItem, RadioGroupRoot, RangeCalendarCell, RangeCalendarCellTrigger, RangeCalendarGrid, RangeCalendarGridBody, RangeCalendarGridHead, RangeCalendarGridRow, RangeCalendarHeadCell, RangeCalendarNext, RangeCalendarPrev, RangeCalendarRoot, RatingItem, RatingItemIndicator, RatingRoot, SelectContent, SelectGroup, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectPortal, SelectRoot, SelectTrigger, Separator, SliderRoot, SliderThumb, SliderTrack, SplitterGroup, SplitterPanel, SplitterResizeHandle, SwitchRoot, TabsContent, TabsList, TabsRoot, TabsTrigger, TagsInputInput, TagsInputItem, TagsInputItemText, TagsInputRoot, TimeFieldInput, TimeFieldRoot, ToastClose, ToastDescription, ToastPortal, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toggle, ToggleGroupItem, ToggleGroupRoot, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TreeItem, TreeRoot, VisuallyHidden, YearPickerCell, YearPickerCellTrigger, YearPickerGrid, YearPickerGridBody, YearPickerGridRow, YearPickerNext, YearPickerPrev, YearPickerRoot, injectListboxItemContext, injectPopoverRootContext, injectTabsRootContext, injectTooltipProviderContext, useBodyScrollLock, useDirection, useForwardPropsEmits } from "reka-ui";
|
|
6
6
|
import { ArrowLeft, ArrowRight, CalendarClock, CalendarDays, CalendarRange, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, CircleCheck, CircleX, Copy, Download, Eye, EyeOff, File, Inbox, Info, Lightbulb, Megaphone, Minus, PanelLeft, RotateCw, Search, Shrink, Star, TrendingDown, TrendingUp, TriangleAlert, Upload, User, X, ZoomIn, ZoomOut } from "@lucide/vue";
|
|
7
7
|
import { Motion, animate, useMotionValue, useTransform } from "motion-v";
|
|
8
8
|
import { createSharedComposable, useDocumentVisibility, useEventListener, useIntersectionObserver, useIntervalFn, useMediaQuery, useMutationObserver } from "@vueuse/core";
|
|
@@ -674,7 +674,7 @@ var spinner = tv({
|
|
|
674
674
|
});
|
|
675
675
|
//#endregion
|
|
676
676
|
//#region src/components/spinner/Spinner.vue?vue&type=script&setup=true&lang.ts
|
|
677
|
-
var _hoisted_1$
|
|
677
|
+
var _hoisted_1$94 = ["aria-label"];
|
|
678
678
|
//#endregion
|
|
679
679
|
//#region src/components/spinner/Spinner.vue
|
|
680
680
|
var Spinner_default = /* @__PURE__ */ defineComponent({
|
|
@@ -694,13 +694,13 @@ var Spinner_default = /* @__PURE__ */ defineComponent({
|
|
|
694
694
|
"aria-label": props.label ?? unref(t).common.loading,
|
|
695
695
|
class: unref(cn)(unref(spinner)({ size: props.size })),
|
|
696
696
|
style: { animation: "hn-spin var(--hn-spin-duration) var(--hn-ease-linear) infinite" }
|
|
697
|
-
}), null, 16, _hoisted_1$
|
|
697
|
+
}), null, 16, _hoisted_1$94);
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
700
|
});
|
|
701
701
|
//#endregion
|
|
702
702
|
//#region src/components/button/IconSlot.vue?vue&type=script&setup=true&lang.ts
|
|
703
|
-
var _hoisted_1$
|
|
703
|
+
var _hoisted_1$93 = {
|
|
704
704
|
key: 0,
|
|
705
705
|
"aria-hidden": "true",
|
|
706
706
|
class: "absolute inset-0 inline-flex items-center justify-center"
|
|
@@ -724,7 +724,7 @@ var IconSlot_default$1 = /* @__PURE__ */ defineComponent({
|
|
|
724
724
|
"leave-active-class": "hn-transition",
|
|
725
725
|
"leave-to-class": "scale-90 opacity-0"
|
|
726
726
|
}, {
|
|
727
|
-
default: withCtx(() => [props.swapped ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
727
|
+
default: withCtx(() => [props.swapped ? (openBlock(), createElementBlock("span", _hoisted_1$93, [createVNode(Spinner_default, { size: props.spinnerSize }, null, 8, ["size"])])) : createCommentVNode("", true)]),
|
|
728
728
|
_: 1
|
|
729
729
|
})], 2);
|
|
730
730
|
};
|
|
@@ -920,7 +920,7 @@ function useRipple(container, surface, isDisabled) {
|
|
|
920
920
|
}
|
|
921
921
|
//#endregion
|
|
922
922
|
//#region src/components/ripple/Ripple.vue?vue&type=script&setup=true&lang.ts
|
|
923
|
-
var _hoisted_1$
|
|
923
|
+
var _hoisted_1$92 = ["data-pressed"];
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region src/components/ripple/Ripple.vue
|
|
926
926
|
var Ripple_default = /* @__PURE__ */ defineComponent({
|
|
@@ -943,13 +943,13 @@ var Ripple_default = /* @__PURE__ */ defineComponent({
|
|
|
943
943
|
ref: surface,
|
|
944
944
|
class: "hn-ripple-surface",
|
|
945
945
|
"data-pressed": unref(pressed) ? "" : void 0
|
|
946
|
-
}, null, 8, _hoisted_1$
|
|
946
|
+
}, null, 8, _hoisted_1$92)], 512);
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
949
|
});
|
|
950
950
|
//#endregion
|
|
951
951
|
//#region src/components/button/Button.vue?vue&type=script&setup=true&lang.ts
|
|
952
|
-
var _hoisted_1$
|
|
952
|
+
var _hoisted_1$91 = {
|
|
953
953
|
key: 0,
|
|
954
954
|
"aria-hidden": "true",
|
|
955
955
|
class: "absolute inset-0 flex items-center justify-center"
|
|
@@ -1060,7 +1060,7 @@ var Button_default = /* @__PURE__ */ defineComponent({
|
|
|
1060
1060
|
"leave-active-class": "hn-transition",
|
|
1061
1061
|
"leave-to-class": "opacity-0"
|
|
1062
1062
|
}, {
|
|
1063
|
-
default: withCtx(() => [props.loading && spinnerAt.value === "center" ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
1063
|
+
default: withCtx(() => [props.loading && spinnerAt.value === "center" ? (openBlock(), createElementBlock("span", _hoisted_1$91, [createVNode(Spinner_default, { size: spinnerSize.value }, null, 8, ["size"])])) : createCommentVNode("", true)]),
|
|
1064
1064
|
_: 1
|
|
1065
1065
|
})
|
|
1066
1066
|
], 64))]),
|
|
@@ -1284,7 +1284,7 @@ function useCopy(text, onCopied, resetAfter = () => COPIED_RESET_MS) {
|
|
|
1284
1284
|
}
|
|
1285
1285
|
//#endregion
|
|
1286
1286
|
//#region src/components/copy-button/CopyButton.vue?vue&type=script&setup=true&lang.ts
|
|
1287
|
-
var _hoisted_1$
|
|
1287
|
+
var _hoisted_1$90 = { class: "relative inline-flex size-[1em]" };
|
|
1288
1288
|
//#endregion
|
|
1289
1289
|
//#region src/components/copy-button/CopyButton.vue
|
|
1290
1290
|
var CopyButton_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1316,7 +1316,7 @@ var CopyButton_default = /* @__PURE__ */ defineComponent({
|
|
|
1316
1316
|
class: props.class,
|
|
1317
1317
|
onClick: unref(copy)
|
|
1318
1318
|
}), {
|
|
1319
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
1319
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$90, [createVNode(Transition, {
|
|
1320
1320
|
"enter-active-class": "hn-transition-base",
|
|
1321
1321
|
"enter-from-class": "scale-90 opacity-0",
|
|
1322
1322
|
"leave-active-class": "hn-transition",
|
|
@@ -1391,7 +1391,7 @@ var buttonGroup = tv({
|
|
|
1391
1391
|
});
|
|
1392
1392
|
//#endregion
|
|
1393
1393
|
//#region src/components/button-group/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1394
|
-
var _hoisted_1$
|
|
1394
|
+
var _hoisted_1$89 = ["aria-label", "aria-orientation"];
|
|
1395
1395
|
//#endregion
|
|
1396
1396
|
//#region src/components/button-group/ButtonGroup.vue
|
|
1397
1397
|
var ButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1422,7 +1422,7 @@ var ButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1422
1422
|
block: props.block,
|
|
1423
1423
|
divider: props.divider
|
|
1424
1424
|
}), props.class))
|
|
1425
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
1425
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$89);
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
1428
|
});
|
|
@@ -1656,8 +1656,8 @@ var chipRemove = tv({
|
|
|
1656
1656
|
});
|
|
1657
1657
|
//#endregion
|
|
1658
1658
|
//#region src/components/chip/IconSlot.vue?vue&type=script&setup=true&lang.ts
|
|
1659
|
-
var _hoisted_1$
|
|
1660
|
-
var _hoisted_2$
|
|
1659
|
+
var _hoisted_1$88 = { class: "hn-collapse-body" };
|
|
1660
|
+
var _hoisted_2$44 = {
|
|
1661
1661
|
key: 0,
|
|
1662
1662
|
"aria-hidden": "true",
|
|
1663
1663
|
class: "absolute inset-0 inline-flex items-center justify-center"
|
|
@@ -1678,7 +1678,7 @@ var IconSlot_default = /* @__PURE__ */ defineComponent({
|
|
|
1678
1678
|
return openBlock(), createElementBlock("span", {
|
|
1679
1679
|
"data-hn-icon": "",
|
|
1680
1680
|
class: normalizeClass(["hn-collapse-x", props.icon || props.checked ? "hn-collapse-open" : "hn-collapse-closed"])
|
|
1681
|
-
}, [createElementVNode("span", _hoisted_1$
|
|
1681
|
+
}, [createElementVNode("span", _hoisted_1$88, [createElementVNode("span", { class: normalizeClass(unref(chipIcon)({ size: props.size })) }, [props.icon ? (openBlock(), createElementBlock("span", {
|
|
1682
1682
|
key: 0,
|
|
1683
1683
|
class: normalizeClass(["hn-transition inline-flex items-center justify-center", props.checked ? "scale-90 opacity-0" : "scale-100 opacity-100"])
|
|
1684
1684
|
}, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("", true), createVNode(Transition, {
|
|
@@ -1687,7 +1687,7 @@ var IconSlot_default = /* @__PURE__ */ defineComponent({
|
|
|
1687
1687
|
"leave-active-class": "hn-transition",
|
|
1688
1688
|
"leave-to-class": "scale-90 opacity-0"
|
|
1689
1689
|
}, {
|
|
1690
|
-
default: withCtx(() => [props.checked ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
1690
|
+
default: withCtx(() => [props.checked ? (openBlock(), createElementBlock("span", _hoisted_2$44, [createVNode(unref(Check))])) : createCommentVNode("", true)]),
|
|
1691
1691
|
_: 1
|
|
1692
1692
|
})], 2)])], 2);
|
|
1693
1693
|
};
|
|
@@ -1874,13 +1874,13 @@ var VisuallyHidden_default = /* @__PURE__ */ defineComponent({
|
|
|
1874
1874
|
});
|
|
1875
1875
|
//#endregion
|
|
1876
1876
|
//#region src/components/lightbox/LightboxStrip.vue?vue&type=script&setup=true&lang.ts
|
|
1877
|
-
var _hoisted_1$
|
|
1877
|
+
var _hoisted_1$87 = [
|
|
1878
1878
|
"src",
|
|
1879
1879
|
"alt",
|
|
1880
1880
|
"onLoad"
|
|
1881
1881
|
];
|
|
1882
|
-
var _hoisted_2$
|
|
1883
|
-
var _hoisted_3$
|
|
1882
|
+
var _hoisted_2$43 = ["src"];
|
|
1883
|
+
var _hoisted_3$21 = [
|
|
1884
1884
|
"src",
|
|
1885
1885
|
"alt",
|
|
1886
1886
|
"onLoad"
|
|
@@ -1941,7 +1941,7 @@ var LightboxStrip_default = /* @__PURE__ */ defineComponent({
|
|
|
1941
1941
|
draggable: "false",
|
|
1942
1942
|
class: "block size-full object-contain",
|
|
1943
1943
|
onLoad: ($event) => emit("learn", slide.item.id, $event.target)
|
|
1944
|
-
}, null, 40, _hoisted_1$
|
|
1944
|
+
}, null, 40, _hoisted_1$87), createVNode(Transition, {
|
|
1945
1945
|
"enter-active-class": "hn-transition-base",
|
|
1946
1946
|
"enter-from-class": "opacity-0",
|
|
1947
1947
|
"leave-active-class": "hn-transition",
|
|
@@ -1954,7 +1954,7 @@ var LightboxStrip_default = /* @__PURE__ */ defineComponent({
|
|
|
1954
1954
|
"aria-hidden": "true",
|
|
1955
1955
|
draggable: "false",
|
|
1956
1956
|
class: "absolute inset-0 size-full object-contain"
|
|
1957
|
-
}, null, 8, _hoisted_2$
|
|
1957
|
+
}, null, 8, _hoisted_2$43)) : createCommentVNode("", true)]),
|
|
1958
1958
|
_: 1
|
|
1959
1959
|
})]),
|
|
1960
1960
|
_: 2
|
|
@@ -1976,7 +1976,7 @@ var LightboxStrip_default = /* @__PURE__ */ defineComponent({
|
|
|
1976
1976
|
draggable: "false",
|
|
1977
1977
|
class: "block size-full object-contain",
|
|
1978
1978
|
onLoad: ($event) => emit("learn", slide.item.id, $event.target)
|
|
1979
|
-
}, null, 40, _hoisted_3$
|
|
1979
|
+
}, null, 40, _hoisted_3$21)]),
|
|
1980
1980
|
_: 2
|
|
1981
1981
|
}, 1032, [
|
|
1982
1982
|
"style",
|
|
@@ -2172,16 +2172,37 @@ function useLayerLock(viewport) {
|
|
|
2172
2172
|
onBeforeUnmount(() => release?.());
|
|
2173
2173
|
}
|
|
2174
2174
|
//#endregion
|
|
2175
|
+
//#region src/components/scroll-area/composables/useScrollFocus.ts
|
|
2176
|
+
function useScrollFocus(host, viewport, options) {
|
|
2177
|
+
function attributes(enabled) {
|
|
2178
|
+
const { focusable, label } = options();
|
|
2179
|
+
return {
|
|
2180
|
+
tabindex: enabled && focusable ? 0 : void 0,
|
|
2181
|
+
role: enabled && focusable ? "region" : void 0,
|
|
2182
|
+
"aria-label": enabled && focusable ? label : void 0
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
const hostFocus = computed(() => attributes(!viewport.value));
|
|
2186
|
+
const viewportFocus = computed(() => attributes(!!viewport.value));
|
|
2187
|
+
watch(viewport, async (element) => {
|
|
2188
|
+
const target = host.value;
|
|
2189
|
+
if (!element || !target || !options().focusable) return;
|
|
2190
|
+
if (target.ownerDocument.activeElement !== target) return;
|
|
2191
|
+
await nextTick();
|
|
2192
|
+
const active = target.ownerDocument.activeElement;
|
|
2193
|
+
if (options().focusable && element.isConnected && (active === target || active === target.ownerDocument.body)) element.focus({ preventScroll: true });
|
|
2194
|
+
}, { flush: "sync" });
|
|
2195
|
+
return {
|
|
2196
|
+
hostFocus,
|
|
2197
|
+
viewportFocus
|
|
2198
|
+
};
|
|
2199
|
+
}
|
|
2200
|
+
//#endregion
|
|
2175
2201
|
//#region src/components/scroll-area/ScrollArea.vue?vue&type=script&setup=true&lang.ts
|
|
2176
|
-
var _hoisted_1$
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
"aria-label"
|
|
2180
|
-
];
|
|
2181
|
-
var _hoisted_2$43 = ["data-visible"];
|
|
2182
|
-
var _hoisted_3$21 = ["data-visible"];
|
|
2202
|
+
var _hoisted_1$86 = ["data-visible"];
|
|
2203
|
+
var _hoisted_2$42 = ["data-visible"];
|
|
2204
|
+
var _hoisted_3$20 = ["data-visible"];
|
|
2183
2205
|
var _hoisted_4$15 = ["data-visible"];
|
|
2184
|
-
var _hoisted_5$11 = ["data-visible"];
|
|
2185
2206
|
//#endregion
|
|
2186
2207
|
//#region src/components/scroll-area/ScrollArea.vue
|
|
2187
2208
|
var ScrollArea_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2242,6 +2263,10 @@ var ScrollArea_default = /* @__PURE__ */ defineComponent({
|
|
|
2242
2263
|
};
|
|
2243
2264
|
}
|
|
2244
2265
|
const { viewport, instance, onEvent } = useOverlayScrollbars(host, content, options);
|
|
2266
|
+
const { hostFocus, viewportFocus } = useScrollFocus(host, viewport, () => ({
|
|
2267
|
+
focusable: props.focusable,
|
|
2268
|
+
label: props.label ?? t.value.scroll.regionLabel
|
|
2269
|
+
}));
|
|
2245
2270
|
const { showXStart, showXEnd, showYStart, showYEnd, updateEdges } = useEdgeShadow(viewport, () => ({
|
|
2246
2271
|
direction: props.direction,
|
|
2247
2272
|
shadow: props.shadow
|
|
@@ -2264,62 +2289,80 @@ var ScrollArea_default = /* @__PURE__ */ defineComponent({
|
|
|
2264
2289
|
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("hn-scroll-area relative flex flex-col overflow-hidden", props.class)) }, [createElementVNode("div", mergeProps({
|
|
2265
2290
|
ref_key: "host",
|
|
2266
2291
|
ref: host
|
|
2267
|
-
},
|
|
2292
|
+
}, {
|
|
2293
|
+
..._ctx.$attrs,
|
|
2294
|
+
...unref(hostFocus)
|
|
2295
|
+
}, {
|
|
2268
2296
|
"data-overlayscrollbars-initialize": "",
|
|
2269
|
-
tabindex: props.focusable ? 0 : void 0,
|
|
2270
|
-
role: props.focusable ? "region" : void 0,
|
|
2271
|
-
"aria-label": props.focusable ? props.label ?? unref(t).scroll.regionLabel : void 0,
|
|
2272
2297
|
class: "w-full min-h-0 grow"
|
|
2273
|
-
}), [createElementVNode("div", {
|
|
2298
|
+
}), [createElementVNode("div", mergeProps({
|
|
2274
2299
|
ref_key: "content",
|
|
2275
|
-
ref: content
|
|
2276
|
-
|
|
2277
|
-
}, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$87), props.shadow ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2300
|
+
ref: content
|
|
2301
|
+
}, unref(viewportFocus), { "data-overlayscrollbars-contents": "" }), [renderSlot(_ctx.$slots, "default")], 16)], 16), props.shadow ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2278
2302
|
props.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
|
|
2279
2303
|
key: 0,
|
|
2280
2304
|
class: "hn-scroll-shadow",
|
|
2281
2305
|
"data-side": "x-start",
|
|
2282
2306
|
"data-visible": unref(showXStart) ? "" : void 0,
|
|
2283
2307
|
"aria-hidden": "true"
|
|
2284
|
-
}, null, 8,
|
|
2308
|
+
}, null, 8, _hoisted_1$86)) : createCommentVNode("", true),
|
|
2285
2309
|
props.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
|
|
2286
2310
|
key: 1,
|
|
2287
2311
|
class: "hn-scroll-shadow",
|
|
2288
2312
|
"data-side": "x-end",
|
|
2289
2313
|
"data-visible": unref(showXEnd) ? "" : void 0,
|
|
2290
2314
|
"aria-hidden": "true"
|
|
2291
|
-
}, null, 8,
|
|
2315
|
+
}, null, 8, _hoisted_2$42)) : createCommentVNode("", true),
|
|
2292
2316
|
props.direction !== "horizontal" ? (openBlock(), createElementBlock("div", {
|
|
2293
2317
|
key: 2,
|
|
2294
2318
|
class: "hn-scroll-shadow",
|
|
2295
2319
|
"data-side": "y-start",
|
|
2296
2320
|
"data-visible": unref(showYStart) ? "" : void 0,
|
|
2297
2321
|
"aria-hidden": "true"
|
|
2298
|
-
}, null, 8,
|
|
2322
|
+
}, null, 8, _hoisted_3$20)) : createCommentVNode("", true),
|
|
2299
2323
|
props.direction !== "horizontal" ? (openBlock(), createElementBlock("div", {
|
|
2300
2324
|
key: 3,
|
|
2301
2325
|
class: "hn-scroll-shadow",
|
|
2302
2326
|
"data-side": "y-end",
|
|
2303
2327
|
"data-visible": unref(showYEnd) ? "" : void 0,
|
|
2304
2328
|
"aria-hidden": "true"
|
|
2305
|
-
}, null, 8,
|
|
2329
|
+
}, null, 8, _hoisted_4$15)) : createCommentVNode("", true)
|
|
2306
2330
|
], 64)) : createCommentVNode("", true)], 2);
|
|
2307
2331
|
};
|
|
2308
2332
|
}
|
|
2309
2333
|
});
|
|
2310
2334
|
//#endregion
|
|
2335
|
+
//#region src/components/highlight/composables/useHighlightMotion.ts
|
|
2336
|
+
function useHighlightMotion(axis) {
|
|
2337
|
+
return {
|
|
2338
|
+
transition: computed(() => prefersReducedMotion() ? { duration: 0 } : TRANSITION.layout),
|
|
2339
|
+
transformTemplate: computed(() => {
|
|
2340
|
+
const direction = axis();
|
|
2341
|
+
if (direction === "both") return void 0;
|
|
2342
|
+
return (_, generated) => {
|
|
2343
|
+
if (!generated || generated === "none" || typeof DOMMatrix === "undefined") return generated;
|
|
2344
|
+
const matrix = new DOMMatrix(generated);
|
|
2345
|
+
if (direction === "x") matrix.m42 = 0;
|
|
2346
|
+
else matrix.m41 = 0;
|
|
2347
|
+
return matrix.toString();
|
|
2348
|
+
};
|
|
2349
|
+
})
|
|
2350
|
+
};
|
|
2351
|
+
}
|
|
2352
|
+
//#endregion
|
|
2311
2353
|
//#region src/components/highlight/Highlight.vue
|
|
2312
2354
|
var Highlight_default = /* @__PURE__ */ defineComponent({
|
|
2313
2355
|
name: "HnHighlight",
|
|
2314
2356
|
__name: "Highlight",
|
|
2315
2357
|
props: {
|
|
2316
2358
|
id: { default: void 0 },
|
|
2359
|
+
axis: { default: "both" },
|
|
2317
2360
|
as: { default: "div" },
|
|
2318
2361
|
class: {}
|
|
2319
2362
|
},
|
|
2320
2363
|
setup(__props) {
|
|
2321
2364
|
const props = __props;
|
|
2322
|
-
const transition =
|
|
2365
|
+
const { transition, transformTemplate } = useHighlightMotion(() => props.axis);
|
|
2323
2366
|
return (_ctx, _cache) => {
|
|
2324
2367
|
return openBlock(), createBlock(unref(Motion), {
|
|
2325
2368
|
as: props.as,
|
|
@@ -2327,12 +2370,14 @@ var Highlight_default = /* @__PURE__ */ defineComponent({
|
|
|
2327
2370
|
"layout-id": props.id,
|
|
2328
2371
|
"aria-hidden": "true",
|
|
2329
2372
|
"data-hn-highlight": "",
|
|
2330
|
-
transition: transition
|
|
2373
|
+
transition: unref(transition),
|
|
2374
|
+
"transform-template": unref(transformTemplate),
|
|
2331
2375
|
class: normalizeClass(unref(cn)("pointer-events-none", props.class))
|
|
2332
2376
|
}, null, 8, [
|
|
2333
2377
|
"as",
|
|
2334
2378
|
"layout-id",
|
|
2335
2379
|
"transition",
|
|
2380
|
+
"transform-template",
|
|
2336
2381
|
"class"
|
|
2337
2382
|
]);
|
|
2338
2383
|
};
|
|
@@ -2340,16 +2385,16 @@ var Highlight_default = /* @__PURE__ */ defineComponent({
|
|
|
2340
2385
|
});
|
|
2341
2386
|
//#endregion
|
|
2342
2387
|
//#region src/components/lightbox/LightboxThumbs.vue?vue&type=script&setup=true&lang.ts
|
|
2343
|
-
var _hoisted_1$
|
|
2388
|
+
var _hoisted_1$85 = {
|
|
2344
2389
|
"data-hn-thumbs": "",
|
|
2345
2390
|
class: "relative isolate flex w-max gap-2 px-4 py-3"
|
|
2346
2391
|
};
|
|
2347
|
-
var _hoisted_2$
|
|
2392
|
+
var _hoisted_2$41 = [
|
|
2348
2393
|
"aria-label",
|
|
2349
2394
|
"aria-current",
|
|
2350
2395
|
"onClick"
|
|
2351
2396
|
];
|
|
2352
|
-
var _hoisted_3$
|
|
2397
|
+
var _hoisted_3$19 = ["src"];
|
|
2353
2398
|
//#endregion
|
|
2354
2399
|
//#region src/components/lightbox/LightboxThumbs.vue
|
|
2355
2400
|
var LightboxThumbs_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2385,7 +2430,7 @@ var LightboxThumbs_default = /* @__PURE__ */ defineComponent({
|
|
|
2385
2430
|
scrollbar: false,
|
|
2386
2431
|
class: "max-w-full"
|
|
2387
2432
|
}, {
|
|
2388
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
2433
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$85, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.items, (item, at) => {
|
|
2389
2434
|
return openBlock(), createElementBlock("button", {
|
|
2390
2435
|
key: item.id,
|
|
2391
2436
|
ref_for: true,
|
|
@@ -2402,13 +2447,14 @@ var LightboxThumbs_default = /* @__PURE__ */ defineComponent({
|
|
|
2402
2447
|
alt: "",
|
|
2403
2448
|
draggable: "false",
|
|
2404
2449
|
class: "relative -z-10 size-full object-cover"
|
|
2405
|
-
}, null, 8, _hoisted_3$
|
|
2450
|
+
}, null, 8, _hoisted_3$19),
|
|
2406
2451
|
at === props.index ? (openBlock(), createBlock(Highlight_default, {
|
|
2407
2452
|
key: 0,
|
|
2408
2453
|
id: unref(highlightId),
|
|
2454
|
+
axis: "x",
|
|
2409
2455
|
class: "ring-accent absolute inset-0 rounded-md ring-2 ring-inset"
|
|
2410
2456
|
}, null, 8, ["id"])) : createCommentVNode("", true)
|
|
2411
|
-
], 10, _hoisted_2$
|
|
2457
|
+
], 10, _hoisted_2$41);
|
|
2412
2458
|
}), 128))])]),
|
|
2413
2459
|
_: 1
|
|
2414
2460
|
});
|
|
@@ -2417,8 +2463,8 @@ var LightboxThumbs_default = /* @__PURE__ */ defineComponent({
|
|
|
2417
2463
|
});
|
|
2418
2464
|
//#endregion
|
|
2419
2465
|
//#region src/components/lightbox/LightboxToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2420
|
-
var _hoisted_1$
|
|
2421
|
-
var _hoisted_2$
|
|
2466
|
+
var _hoisted_1$84 = { class: "flex flex-col items-center gap-1 pb-3" };
|
|
2467
|
+
var _hoisted_2$40 = { class: "flex items-center gap-1" };
|
|
2422
2468
|
//#endregion
|
|
2423
2469
|
//#region src/components/lightbox/LightboxToolbar.vue
|
|
2424
2470
|
var LightboxToolbar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2442,12 +2488,12 @@ var LightboxToolbar_default = /* @__PURE__ */ defineComponent({
|
|
|
2442
2488
|
const emit = __emit;
|
|
2443
2489
|
const t = useUiLocale();
|
|
2444
2490
|
return (_ctx, _cache) => {
|
|
2445
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2491
|
+
return openBlock(), createElementBlock("div", _hoisted_1$84, [props.items.length > 1 ? (openBlock(), createBlock(LightboxThumbs_default, {
|
|
2446
2492
|
key: 0,
|
|
2447
2493
|
items: props.items,
|
|
2448
2494
|
index: props.index,
|
|
2449
2495
|
onSelect: _cache[0] || (_cache[0] = ($event) => emit("select", $event))
|
|
2450
|
-
}, null, 8, ["items", "index"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_2$
|
|
2496
|
+
}, null, 8, ["items", "index"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_2$40, [
|
|
2451
2497
|
createVNode(IconButton_default, {
|
|
2452
2498
|
label: unref(t).lightbox.zoomOut,
|
|
2453
2499
|
variant: "soft",
|
|
@@ -3725,8 +3771,8 @@ async function saveImage(url) {
|
|
|
3725
3771
|
}
|
|
3726
3772
|
//#endregion
|
|
3727
3773
|
//#region src/components/lightbox/Lightbox.vue?vue&type=script&setup=true&lang.ts
|
|
3728
|
-
var _hoisted_1$
|
|
3729
|
-
var _hoisted_2$
|
|
3774
|
+
var _hoisted_1$83 = ["data-hn-phase"];
|
|
3775
|
+
var _hoisted_2$39 = {
|
|
3730
3776
|
"aria-hidden": "true",
|
|
3731
3777
|
class: "pointer-events-none absolute inset-0 isolate"
|
|
3732
3778
|
};
|
|
@@ -3887,7 +3933,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
3887
3933
|
onWheel: _cache[9] || (_cache[9] = (...args) => unref(gesture).onWheel && unref(gesture).onWheel(...args)),
|
|
3888
3934
|
onKeydown
|
|
3889
3935
|
}, [
|
|
3890
|
-
createElementVNode("div", _hoisted_2$
|
|
3936
|
+
createElementVNode("div", _hoisted_2$39, [createVNode(unref(Motion), {
|
|
3891
3937
|
class: "hn-scrim",
|
|
3892
3938
|
style: normalizeStyle({ opacity: unref(motion).presence })
|
|
3893
3939
|
}, null, 8, ["style"])]),
|
|
@@ -3952,7 +3998,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
3952
3998
|
"hint",
|
|
3953
3999
|
"presence"
|
|
3954
4000
|
])
|
|
3955
|
-
], 42, _hoisted_1$
|
|
4001
|
+
], 42, _hoisted_1$83)]),
|
|
3956
4002
|
_: 1
|
|
3957
4003
|
})]),
|
|
3958
4004
|
_: 1
|
|
@@ -4113,7 +4159,7 @@ function useImageGroup() {
|
|
|
4113
4159
|
}
|
|
4114
4160
|
//#endregion
|
|
4115
4161
|
//#region src/components/image/Image.vue?vue&type=script&setup=true&lang.ts
|
|
4116
|
-
var _hoisted_1$
|
|
4162
|
+
var _hoisted_1$82 = [
|
|
4117
4163
|
"src",
|
|
4118
4164
|
"alt",
|
|
4119
4165
|
"decoding",
|
|
@@ -4203,7 +4249,7 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
4203
4249
|
fetchpriority: props.eager ? "high" : void 0,
|
|
4204
4250
|
draggable: props.draggable,
|
|
4205
4251
|
class: unref(cn)(unref(image)({ fit: props.fit }), props.lazy ? !unref(revealed) && "opacity-0" : "relative z-10", props.imageClass)
|
|
4206
|
-
}), null, 16, _hoisted_1$
|
|
4252
|
+
}), null, 16, _hoisted_1$82)) : unref(failed) ? renderSlot(_ctx.$slots, "error", {}, void 0, void 0, 1) : renderSlot(_ctx.$slots, "empty", {}, void 0, void 0, 2),
|
|
4207
4253
|
unref(showSkeleton) ? (openBlock(), createElementBlock("span", {
|
|
4208
4254
|
key: 3,
|
|
4209
4255
|
ref_key: "skeletonEl",
|
|
@@ -4484,7 +4530,7 @@ var indicator = tv({
|
|
|
4484
4530
|
});
|
|
4485
4531
|
//#endregion
|
|
4486
4532
|
//#region src/components/indicator/Indicator.vue?vue&type=script&setup=true&lang.ts
|
|
4487
|
-
var _hoisted_1$
|
|
4533
|
+
var _hoisted_1$81 = {
|
|
4488
4534
|
key: 0,
|
|
4489
4535
|
"aria-hidden": "true",
|
|
4490
4536
|
class: "hn-ping absolute inset-0 rounded-full bg-inherit"
|
|
@@ -4515,7 +4561,7 @@ var Indicator_default = /* @__PURE__ */ defineComponent({
|
|
|
4515
4561
|
size: props.size
|
|
4516
4562
|
}), props.class))
|
|
4517
4563
|
}, {
|
|
4518
|
-
default: withCtx(() => [props.pulse ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
4564
|
+
default: withCtx(() => [props.pulse ? (openBlock(), createElementBlock("span", _hoisted_1$81)) : createCommentVNode("", true), props.label ? (openBlock(), createBlock(VisuallyHidden_default, { key: 1 }, {
|
|
4519
4565
|
default: withCtx(() => [createTextVNode(toDisplayString(props.label), 1)]),
|
|
4520
4566
|
_: 1
|
|
4521
4567
|
})) : createCommentVNode("", true)]),
|
|
@@ -4567,8 +4613,8 @@ var calloutIcons = {
|
|
|
4567
4613
|
};
|
|
4568
4614
|
//#endregion
|
|
4569
4615
|
//#region src/components/callout/Callout.vue?vue&type=script&setup=true&lang.ts
|
|
4570
|
-
var _hoisted_1$
|
|
4571
|
-
var _hoisted_2$
|
|
4616
|
+
var _hoisted_1$80 = { class: "flex min-w-0 flex-1 flex-col gap-1" };
|
|
4617
|
+
var _hoisted_2$38 = {
|
|
4572
4618
|
key: 0,
|
|
4573
4619
|
class: "text-fg font-medium"
|
|
4574
4620
|
};
|
|
@@ -4596,7 +4642,7 @@ var Callout_default = /* @__PURE__ */ defineComponent({
|
|
|
4596
4642
|
key: 0,
|
|
4597
4643
|
class: normalizeClass(unref(calloutIcon)({ tone: props.tone })),
|
|
4598
4644
|
"aria-hidden": "true"
|
|
4599
|
-
}, null, 8, ["class"])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_1$
|
|
4645
|
+
}, null, 8, ["class"])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_1$80, [props.title ? (openBlock(), createElementBlock("p", _hoisted_2$38, toDisplayString(props.title), 1)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")])], 2);
|
|
4600
4646
|
};
|
|
4601
4647
|
}
|
|
4602
4648
|
});
|
|
@@ -4650,19 +4696,19 @@ function useCollapseGap() {
|
|
|
4650
4696
|
}
|
|
4651
4697
|
//#endregion
|
|
4652
4698
|
//#region src/components/alert/Alert.vue?vue&type=script&setup=true&lang.ts
|
|
4653
|
-
var _hoisted_1$
|
|
4699
|
+
var _hoisted_1$79 = {
|
|
4654
4700
|
key: 0,
|
|
4655
4701
|
"data-hn-alert": "",
|
|
4656
4702
|
class: "hn-collapse"
|
|
4657
4703
|
};
|
|
4658
|
-
var _hoisted_2$
|
|
4659
|
-
var _hoisted_3$
|
|
4704
|
+
var _hoisted_2$37 = { class: "hn-collapse-body" };
|
|
4705
|
+
var _hoisted_3$18 = ["role"];
|
|
4660
4706
|
var _hoisted_4$14 = { class: "flex min-w-0 flex-1 flex-col gap-1" };
|
|
4661
|
-
var _hoisted_5$
|
|
4707
|
+
var _hoisted_5$9 = {
|
|
4662
4708
|
key: 0,
|
|
4663
4709
|
class: "text-fg font-medium"
|
|
4664
4710
|
};
|
|
4665
|
-
var _hoisted_6$
|
|
4711
|
+
var _hoisted_6$7 = {
|
|
4666
4712
|
key: 0,
|
|
4667
4713
|
class: "flex shrink-0 items-center gap-2 self-center"
|
|
4668
4714
|
};
|
|
@@ -4706,7 +4752,7 @@ var Alert_default = /* @__PURE__ */ defineComponent({
|
|
|
4706
4752
|
"leave-from-class": "hn-collapse-open",
|
|
4707
4753
|
"leave-to-class": "hn-collapse-closed"
|
|
4708
4754
|
}, toHandlers(unref(hooks))), {
|
|
4709
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4755
|
+
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$79, [createElementVNode("div", _hoisted_2$37, [createElementVNode("div", {
|
|
4710
4756
|
role: role.value,
|
|
4711
4757
|
class: normalizeClass(unref(cn)(unref(callout)({ tone: props.tone }), props.class))
|
|
4712
4758
|
}, [
|
|
@@ -4715,15 +4761,15 @@ var Alert_default = /* @__PURE__ */ defineComponent({
|
|
|
4715
4761
|
class: normalizeClass(unref(calloutIcon)({ tone: props.tone })),
|
|
4716
4762
|
"aria-hidden": "true"
|
|
4717
4763
|
}, null, 8, ["class"])) : createCommentVNode("", true)]),
|
|
4718
|
-
createElementVNode("div", _hoisted_4$14, [props.title ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
4719
|
-
unref(slots).actions ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
4764
|
+
createElementVNode("div", _hoisted_4$14, [props.title ? (openBlock(), createElementBlock("p", _hoisted_5$9, toDisplayString(props.title), 1)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")]),
|
|
4765
|
+
unref(slots).actions ? (openBlock(), createElementBlock("div", _hoisted_6$7, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true),
|
|
4720
4766
|
props.closable ? (openBlock(), createBlock(CloseButton_default, {
|
|
4721
4767
|
key: 1,
|
|
4722
4768
|
size: "sm",
|
|
4723
4769
|
class: "-my-0.5 -me-1",
|
|
4724
4770
|
onClick: close
|
|
4725
4771
|
})) : createCommentVNode("", true)
|
|
4726
|
-
], 10, _hoisted_3$
|
|
4772
|
+
], 10, _hoisted_3$18)])])) : createCommentVNode("", true)]),
|
|
4727
4773
|
_: 3
|
|
4728
4774
|
}, 16);
|
|
4729
4775
|
};
|
|
@@ -4731,7 +4777,7 @@ var Alert_default = /* @__PURE__ */ defineComponent({
|
|
|
4731
4777
|
});
|
|
4732
4778
|
//#endregion
|
|
4733
4779
|
//#region src/components/prev-next/PrevNext.vue?vue&type=script&setup=true&lang.ts
|
|
4734
|
-
var _hoisted_1$
|
|
4780
|
+
var _hoisted_1$78 = ["aria-label"];
|
|
4735
4781
|
//#endregion
|
|
4736
4782
|
//#region src/components/prev-next/PrevNext.vue
|
|
4737
4783
|
var PrevNext_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4748,7 +4794,7 @@ var PrevNext_default = /* @__PURE__ */ defineComponent({
|
|
|
4748
4794
|
return openBlock(), createElementBlock("nav", {
|
|
4749
4795
|
"aria-label": props.label ?? unref(t).pagination.navLabel,
|
|
4750
4796
|
class: normalizeClass(unref(cn)("grid gap-4 sm:grid-cols-2", props.class))
|
|
4751
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
4797
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$78);
|
|
4752
4798
|
};
|
|
4753
4799
|
}
|
|
4754
4800
|
});
|
|
@@ -4772,7 +4818,7 @@ var prevNextEyebrow = tv({
|
|
|
4772
4818
|
});
|
|
4773
4819
|
//#endregion
|
|
4774
4820
|
//#region src/components/prev-next/PrevNextLink.vue?vue&type=script&setup=true&lang.ts
|
|
4775
|
-
var _hoisted_1$
|
|
4821
|
+
var _hoisted_1$77 = { class: "text-fg font-medium" };
|
|
4776
4822
|
//#endregion
|
|
4777
4823
|
//#region src/components/prev-next/PrevNextLink.vue
|
|
4778
4824
|
var PrevNextLink_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4808,7 +4854,7 @@ var PrevNextLink_default = /* @__PURE__ */ defineComponent({
|
|
|
4808
4854
|
class: "size-4",
|
|
4809
4855
|
"aria-hidden": "true"
|
|
4810
4856
|
})), createTextVNode(" " + toDisplayString(props.label ?? (props.direction === "prev" ? unref(t).pagination.prev : unref(t).pagination.next)), 1)], 2),
|
|
4811
|
-
createElementVNode("span", _hoisted_1$
|
|
4857
|
+
createElementVNode("span", _hoisted_1$77, [renderSlot(_ctx.$slots, "default")])
|
|
4812
4858
|
]),
|
|
4813
4859
|
_: 3
|
|
4814
4860
|
}, 16, [
|
|
@@ -4885,8 +4931,8 @@ var tableCell = tv({
|
|
|
4885
4931
|
});
|
|
4886
4932
|
//#endregion
|
|
4887
4933
|
//#region src/components/table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4888
|
-
var _hoisted_1$
|
|
4889
|
-
var _hoisted_2$
|
|
4934
|
+
var _hoisted_1$76 = { class: "hn-table" };
|
|
4935
|
+
var _hoisted_2$36 = { key: 0 };
|
|
4890
4936
|
//#endregion
|
|
4891
4937
|
//#region src/components/table/Table.vue
|
|
4892
4938
|
var Table_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4916,7 +4962,7 @@ var Table_default = /* @__PURE__ */ defineComponent({
|
|
|
4916
4962
|
stickyHeader: props.stickyHeader
|
|
4917
4963
|
}), props.class))
|
|
4918
4964
|
}, {
|
|
4919
|
-
default: withCtx(() => [createElementVNode("table", _hoisted_1$
|
|
4965
|
+
default: withCtx(() => [createElementVNode("table", _hoisted_1$76, [props.caption ? (openBlock(), createElementBlock("caption", _hoisted_2$36, [createElementVNode("span", null, toDisplayString(props.caption), 1)])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")])]),
|
|
4920
4966
|
_: 3
|
|
4921
4967
|
}, 8, ["direction", "class"]);
|
|
4922
4968
|
};
|
|
@@ -4963,7 +5009,7 @@ var TableRow_default = /* @__PURE__ */ defineComponent({
|
|
|
4963
5009
|
});
|
|
4964
5010
|
//#endregion
|
|
4965
5011
|
//#region src/components/table/TableHead.vue?vue&type=script&setup=true&lang.ts
|
|
4966
|
-
var _hoisted_1$
|
|
5012
|
+
var _hoisted_1$75 = ["scope"];
|
|
4967
5013
|
//#endregion
|
|
4968
5014
|
//#region src/components/table/TableHead.vue
|
|
4969
5015
|
var TableHead_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4988,7 +5034,7 @@ var TableHead_default = /* @__PURE__ */ defineComponent({
|
|
|
4988
5034
|
sticky: props.sticky,
|
|
4989
5035
|
head: true
|
|
4990
5036
|
}), props.class))
|
|
4991
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
5037
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$75);
|
|
4992
5038
|
};
|
|
4993
5039
|
}
|
|
4994
5040
|
});
|
|
@@ -5298,11 +5344,16 @@ var TabsTrigger_default = /* @__PURE__ */ defineComponent({
|
|
|
5298
5344
|
active.value ? (openBlock(), createBlock(Highlight_default, {
|
|
5299
5345
|
key: 0,
|
|
5300
5346
|
id: unref(highlightId),
|
|
5347
|
+
axis: unref(orientation) === "vertical" ? "y" : "x",
|
|
5301
5348
|
class: normalizeClass(unref(tabsHighlight)({
|
|
5302
5349
|
variant: unref(variant),
|
|
5303
5350
|
orientation: unref(orientation)
|
|
5304
5351
|
}))
|
|
5305
|
-
}, null, 8, [
|
|
5352
|
+
}, null, 8, [
|
|
5353
|
+
"id",
|
|
5354
|
+
"axis",
|
|
5355
|
+
"class"
|
|
5356
|
+
])) : createCommentVNode("", true),
|
|
5306
5357
|
createVNode(Ripple_default),
|
|
5307
5358
|
renderSlot(_ctx.$slots, "default")
|
|
5308
5359
|
]),
|
|
@@ -5487,12 +5538,12 @@ function injectInputGroup() {
|
|
|
5487
5538
|
}
|
|
5488
5539
|
//#endregion
|
|
5489
5540
|
//#region src/components/input/InputBase.vue?vue&type=script&setup=true&lang.ts
|
|
5490
|
-
var _hoisted_1$
|
|
5541
|
+
var _hoisted_1$74 = [
|
|
5491
5542
|
"data-invalid",
|
|
5492
5543
|
"data-disabled",
|
|
5493
5544
|
"aria-busy"
|
|
5494
5545
|
];
|
|
5495
|
-
var _hoisted_2$
|
|
5546
|
+
var _hoisted_2$35 = [
|
|
5496
5547
|
"id",
|
|
5497
5548
|
"disabled",
|
|
5498
5549
|
"aria-invalid",
|
|
@@ -5579,7 +5630,7 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
5579
5630
|
leading: !!unref(slots).leading,
|
|
5580
5631
|
trailing: clearing.value || trailingSpinner.value || !!unref(slots).trailing
|
|
5581
5632
|
})
|
|
5582
|
-
}), null, 16, _hoisted_2$
|
|
5633
|
+
}), null, 16, _hoisted_2$35), [[vModelDynamic, model.value]]),
|
|
5583
5634
|
createVNode(Transition, {
|
|
5584
5635
|
"enter-active-class": "hn-transition-base",
|
|
5585
5636
|
"enter-from-class": "scale-90 opacity-0",
|
|
@@ -5615,7 +5666,7 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
5615
5666
|
key: 1,
|
|
5616
5667
|
class: normalizeClass(unref(inputAdornment)())
|
|
5617
5668
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
5618
|
-
], 10, _hoisted_1$
|
|
5669
|
+
], 10, _hoisted_1$74);
|
|
5619
5670
|
};
|
|
5620
5671
|
}
|
|
5621
5672
|
});
|
|
@@ -5819,8 +5870,8 @@ var textareaField = tv({ base: [
|
|
|
5819
5870
|
] });
|
|
5820
5871
|
//#endregion
|
|
5821
5872
|
//#region src/components/textarea/Textarea.vue?vue&type=script&setup=true&lang.ts
|
|
5822
|
-
var _hoisted_1$
|
|
5823
|
-
var _hoisted_2$
|
|
5873
|
+
var _hoisted_1$73 = ["data-invalid", "data-disabled"];
|
|
5874
|
+
var _hoisted_2$34 = [
|
|
5824
5875
|
"id",
|
|
5825
5876
|
"rows",
|
|
5826
5877
|
"disabled",
|
|
@@ -5889,9 +5940,9 @@ var Textarea_default = /* @__PURE__ */ defineComponent({
|
|
|
5889
5940
|
"aria-describedby": unref(describedBy),
|
|
5890
5941
|
class: unref(textareaField)(),
|
|
5891
5942
|
onInput: _cache[1] || (_cache[1] = (...args) => unref(fit) && unref(fit)(...args))
|
|
5892
|
-
}), null, 16, _hoisted_2$
|
|
5943
|
+
}), null, 16, _hoisted_2$34), [[vModelText, model.value]])]),
|
|
5893
5944
|
_: 1
|
|
5894
|
-
}, 512)], 14, _hoisted_1$
|
|
5945
|
+
}, 512)], 14, _hoisted_1$73);
|
|
5895
5946
|
};
|
|
5896
5947
|
}
|
|
5897
5948
|
});
|
|
@@ -6025,7 +6076,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
6025
6076
|
});
|
|
6026
6077
|
//#endregion
|
|
6027
6078
|
//#region src/components/password-input/PasswordInput.vue?vue&type=script&setup=true&lang.ts
|
|
6028
|
-
var _hoisted_1$
|
|
6079
|
+
var _hoisted_1$72 = { class: "relative inline-flex" };
|
|
6029
6080
|
//#endregion
|
|
6030
6081
|
//#region src/components/password-input/PasswordInput.vue
|
|
6031
6082
|
var PasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6069,7 +6120,7 @@ var PasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
6069
6120
|
disabled: props.disabled,
|
|
6070
6121
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value)
|
|
6071
6122
|
}, {
|
|
6072
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
6123
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$72, [createVNode(Transition, {
|
|
6073
6124
|
"enter-active-class": "hn-transition-base",
|
|
6074
6125
|
"enter-from-class": "scale-90 opacity-0",
|
|
6075
6126
|
"leave-active-class": "hn-transition absolute",
|
|
@@ -6164,7 +6215,7 @@ var inputGroup = tv({
|
|
|
6164
6215
|
var inputGroupAddon = tv({ base: "text-muted flex shrink-0 items-center gap-2 px-[var(--hn-input-px)] whitespace-nowrap [&>svg]:size-[var(--hn-input-icon)]" });
|
|
6165
6216
|
//#endregion
|
|
6166
6217
|
//#region src/components/input-group/InputGroup.vue?vue&type=script&setup=true&lang.ts
|
|
6167
|
-
var _hoisted_1$
|
|
6218
|
+
var _hoisted_1$71 = ["data-invalid", "data-disabled"];
|
|
6168
6219
|
//#endregion
|
|
6169
6220
|
//#region src/components/input-group/InputGroup.vue
|
|
6170
6221
|
var InputGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6196,7 +6247,7 @@ var InputGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
6196
6247
|
size: props.size
|
|
6197
6248
|
}), unref(inputGroup)({ divided: props.variant !== "bare" }), props.class)),
|
|
6198
6249
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(focusFieldFrom)($event.currentTarget, $event.target))
|
|
6199
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
6250
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$71);
|
|
6200
6251
|
};
|
|
6201
6252
|
}
|
|
6202
6253
|
});
|
|
@@ -6367,16 +6418,16 @@ function flattenOptions(items) {
|
|
|
6367
6418
|
}
|
|
6368
6419
|
//#endregion
|
|
6369
6420
|
//#region src/components/select/SelectList.vue?vue&type=script&setup=true&lang.ts
|
|
6370
|
-
var _hoisted_1$
|
|
6371
|
-
var _hoisted_2$
|
|
6372
|
-
var _hoisted_3$
|
|
6421
|
+
var _hoisted_1$70 = { class: "min-w-0 flex-1" };
|
|
6422
|
+
var _hoisted_2$33 = { class: "block truncate" };
|
|
6423
|
+
var _hoisted_3$17 = {
|
|
6373
6424
|
key: 0,
|
|
6374
6425
|
class: "text-muted block truncate text-xs"
|
|
6375
6426
|
};
|
|
6376
6427
|
var _hoisted_4$13 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
6377
|
-
var _hoisted_5$
|
|
6378
|
-
var _hoisted_6$
|
|
6379
|
-
var _hoisted_7$
|
|
6428
|
+
var _hoisted_5$8 = { class: "min-w-0 flex-1" };
|
|
6429
|
+
var _hoisted_6$6 = { class: "block truncate" };
|
|
6430
|
+
var _hoisted_7$4 = {
|
|
6380
6431
|
key: 0,
|
|
6381
6432
|
class: "text-muted block truncate text-xs"
|
|
6382
6433
|
};
|
|
@@ -6426,7 +6477,7 @@ var SelectList_default = /* @__PURE__ */ defineComponent({
|
|
|
6426
6477
|
class: normalizeClass(unref(selectItem)())
|
|
6427
6478
|
}, {
|
|
6428
6479
|
default: withCtx(() => [createVNode(unref(SelectItemText), { "as-child": "" }, {
|
|
6429
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
6480
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$70, [renderSlot(_ctx.$slots, "option", { option }, () => [createElementVNode("span", _hoisted_2$33, toDisplayString(option.label), 1), option.description ? (openBlock(), createElementBlock("span", _hoisted_3$17, toDisplayString(option.description), 1)) : createCommentVNode("", true)])])]),
|
|
6430
6481
|
_: 2
|
|
6431
6482
|
}, 1024), createElementVNode("span", _hoisted_4$13, [createVNode(unref(SelectItemIndicator), null, {
|
|
6432
6483
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
@@ -6449,7 +6500,7 @@ var SelectList_default = /* @__PURE__ */ defineComponent({
|
|
|
6449
6500
|
class: normalizeClass(unref(selectItem)())
|
|
6450
6501
|
}, {
|
|
6451
6502
|
default: withCtx(() => [createVNode(unref(SelectItemText), { "as-child": "" }, {
|
|
6452
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_5$
|
|
6503
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_5$8, [renderSlot(_ctx.$slots, "option", { option: item }, () => [createElementVNode("span", _hoisted_6$6, toDisplayString(item.label), 1), item.description ? (openBlock(), createElementBlock("span", _hoisted_7$4, toDisplayString(item.description), 1)) : createCommentVNode("", true)])])]),
|
|
6453
6504
|
_: 2
|
|
6454
6505
|
}, 1024), createElementVNode("span", _hoisted_8$1, [createVNode(unref(SelectItemIndicator), null, {
|
|
6455
6506
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
@@ -6505,7 +6556,7 @@ function useClearTransition(visible) {
|
|
|
6505
6556
|
}
|
|
6506
6557
|
//#endregion
|
|
6507
6558
|
//#region src/components/select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
6508
|
-
var _hoisted_1$
|
|
6559
|
+
var _hoisted_1$69 = [
|
|
6509
6560
|
"dir",
|
|
6510
6561
|
"data-invalid",
|
|
6511
6562
|
"data-disabled"
|
|
@@ -6623,7 +6674,7 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
6623
6674
|
_: 1
|
|
6624
6675
|
}, 8, ["label"])], 2)) : createCommentVNode("", true)]),
|
|
6625
6676
|
_: 1
|
|
6626
|
-
}, 16)], 10, _hoisted_1$
|
|
6677
|
+
}, 16)], 10, _hoisted_1$69), createVNode(SelectList_default, {
|
|
6627
6678
|
options: props.options,
|
|
6628
6679
|
keyboard: keyboard.value
|
|
6629
6680
|
}, {
|
|
@@ -6652,12 +6703,12 @@ var multiSelectTrigger = tv({ base: [
|
|
|
6652
6703
|
var multiSelectChips = tv({ base: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden" });
|
|
6653
6704
|
//#endregion
|
|
6654
6705
|
//#region src/components/multi-select/MultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
6655
|
-
var _hoisted_1$
|
|
6656
|
-
var _hoisted_2$
|
|
6706
|
+
var _hoisted_1$68 = { class: "min-w-0 truncate" };
|
|
6707
|
+
var _hoisted_2$32 = {
|
|
6657
6708
|
key: 1,
|
|
6658
6709
|
class: "min-w-0 truncate"
|
|
6659
6710
|
};
|
|
6660
|
-
var _hoisted_3$
|
|
6711
|
+
var _hoisted_3$16 = [
|
|
6661
6712
|
"name",
|
|
6662
6713
|
"required",
|
|
6663
6714
|
"autocomplete",
|
|
@@ -6767,7 +6818,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
6767
6818
|
onClick: isolate,
|
|
6768
6819
|
onRemove: ($event) => remove(option.value)
|
|
6769
6820
|
}, {
|
|
6770
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
6821
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$68, toDisplayString(option.label), 1)]),
|
|
6771
6822
|
_: 2
|
|
6772
6823
|
}, 1032, [
|
|
6773
6824
|
"size",
|
|
@@ -6782,7 +6833,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
6782
6833
|
}, {
|
|
6783
6834
|
default: withCtx(() => [createTextVNode(" +" + toDisplayString(overflow.value), 1)]),
|
|
6784
6835
|
_: 1
|
|
6785
|
-
}, 8, ["size", "disabled"])) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("span", _hoisted_2$
|
|
6836
|
+
}, 8, ["size", "disabled"])) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("span", _hoisted_2$32, toDisplayString(props.placeholder ?? unref(t).select.placeholder), 1))], 2),
|
|
6786
6837
|
createVNode(Transition, {
|
|
6787
6838
|
"enter-active-class": "hn-transition-base",
|
|
6788
6839
|
"enter-from-class": "scale-90 opacity-0",
|
|
@@ -6835,7 +6886,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
6835
6886
|
value: option.value,
|
|
6836
6887
|
disabled: option.disabled
|
|
6837
6888
|
}, toDisplayString(option.label), 9, _hoisted_4$12);
|
|
6838
|
-
}), 128))], 8, _hoisted_3$
|
|
6889
|
+
}), 128))], 8, _hoisted_3$16), [[vModelSelect, model.value]])]),
|
|
6839
6890
|
_: 1
|
|
6840
6891
|
})) : createCommentVNode("", true),
|
|
6841
6892
|
createVNode(SelectList_default, {
|
|
@@ -6862,16 +6913,16 @@ var comboboxContent = tv({ base: ["hn-anim-pop z-(--hn-z-overlay) flex w-[var(--
|
|
|
6862
6913
|
var comboboxList = tv({ base: "max-h-[min(20rem,var(--reka-combobox-content-available-height))]" });
|
|
6863
6914
|
//#endregion
|
|
6864
6915
|
//#region src/components/combobox/ComboboxList.vue?vue&type=script&setup=true&lang.ts
|
|
6865
|
-
var _hoisted_1$
|
|
6866
|
-
var _hoisted_2$
|
|
6867
|
-
var _hoisted_3$
|
|
6916
|
+
var _hoisted_1$67 = { class: "min-w-0 flex-1" };
|
|
6917
|
+
var _hoisted_2$31 = { class: "block truncate" };
|
|
6918
|
+
var _hoisted_3$15 = {
|
|
6868
6919
|
key: 0,
|
|
6869
6920
|
class: "text-muted block truncate text-xs"
|
|
6870
6921
|
};
|
|
6871
6922
|
var _hoisted_4$11 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
6872
|
-
var _hoisted_5$
|
|
6873
|
-
var _hoisted_6$
|
|
6874
|
-
var _hoisted_7$
|
|
6923
|
+
var _hoisted_5$7 = { class: "min-w-0 flex-1" };
|
|
6924
|
+
var _hoisted_6$5 = { class: "block truncate" };
|
|
6925
|
+
var _hoisted_7$3 = {
|
|
6875
6926
|
key: 0,
|
|
6876
6927
|
class: "text-muted block truncate text-xs"
|
|
6877
6928
|
};
|
|
@@ -6920,7 +6971,7 @@ var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
|
6920
6971
|
disabled: option.disabled,
|
|
6921
6972
|
class: normalizeClass(unref(selectItem)())
|
|
6922
6973
|
}, {
|
|
6923
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
6974
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$67, [renderSlot(_ctx.$slots, "option", { option }, () => [createElementVNode("span", _hoisted_2$31, toDisplayString(option.label), 1), option.description ? (openBlock(), createElementBlock("span", _hoisted_3$15, toDisplayString(option.description), 1)) : createCommentVNode("", true)])]), createElementVNode("span", _hoisted_4$11, [createVNode(unref(ComboboxItemIndicator), null, {
|
|
6924
6975
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
6925
6976
|
_: 1
|
|
6926
6977
|
})])]),
|
|
@@ -6940,7 +6991,7 @@ var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
|
6940
6991
|
disabled: item.disabled,
|
|
6941
6992
|
class: normalizeClass(unref(selectItem)())
|
|
6942
6993
|
}, {
|
|
6943
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_5$
|
|
6994
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_5$7, [renderSlot(_ctx.$slots, "option", { option: item }, () => [createElementVNode("span", _hoisted_6$5, toDisplayString(item.label), 1), item.description ? (openBlock(), createElementBlock("span", _hoisted_7$3, toDisplayString(item.description), 1)) : createCommentVNode("", true)])]), createElementVNode("span", _hoisted_8, [createVNode(unref(ComboboxItemIndicator), null, {
|
|
6944
6995
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
6945
6996
|
_: 1
|
|
6946
6997
|
})])]),
|
|
@@ -6968,7 +7019,7 @@ var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
|
6968
7019
|
});
|
|
6969
7020
|
//#endregion
|
|
6970
7021
|
//#region src/components/combobox/Combobox.vue?vue&type=script&setup=true&lang.ts
|
|
6971
|
-
var _hoisted_1$
|
|
7022
|
+
var _hoisted_1$66 = ["data-invalid", "data-disabled"];
|
|
6972
7023
|
//#endregion
|
|
6973
7024
|
//#region src/components/combobox/Combobox.vue
|
|
6974
7025
|
var Combobox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7108,7 +7159,7 @@ var Combobox_default = /* @__PURE__ */ defineComponent({
|
|
|
7108
7159
|
"disabled",
|
|
7109
7160
|
"class"
|
|
7110
7161
|
])
|
|
7111
|
-
], 42, _hoisted_1$
|
|
7162
|
+
], 42, _hoisted_1$66)]),
|
|
7112
7163
|
_: 1
|
|
7113
7164
|
}), createVNode(ComboboxList_default, {
|
|
7114
7165
|
options: props.options,
|
|
@@ -7157,11 +7208,11 @@ var commandItemHint = tv({ base: "ms-auto flex shrink-0 items-center gap-1" });
|
|
|
7157
7208
|
var commandEmpty = tv({ base: "text-muted px-4 py-8 text-center text-sm" });
|
|
7158
7209
|
//#endregion
|
|
7159
7210
|
//#region src/components/command-palette/CommandPaletteItem.vue?vue&type=script&setup=true&lang.ts
|
|
7160
|
-
var _hoisted_1$
|
|
7161
|
-
var _hoisted_2$
|
|
7162
|
-
var _hoisted_3$
|
|
7211
|
+
var _hoisted_1$65 = { class: "truncate" };
|
|
7212
|
+
var _hoisted_2$30 = ["textContent"];
|
|
7213
|
+
var _hoisted_3$14 = ["textContent"];
|
|
7163
7214
|
var _hoisted_4$10 = ["textContent"];
|
|
7164
|
-
var _hoisted_5$
|
|
7215
|
+
var _hoisted_5$6 = {
|
|
7165
7216
|
key: 0,
|
|
7166
7217
|
class: "text-muted truncate text-xs"
|
|
7167
7218
|
};
|
|
@@ -7202,18 +7253,18 @@ var CommandPaletteItem_default = /* @__PURE__ */ defineComponent({
|
|
|
7202
7253
|
"aria-hidden": "true",
|
|
7203
7254
|
class: "text-muted"
|
|
7204
7255
|
})) : createCommentVNode("", true),
|
|
7205
|
-
createElementVNode("span", { class: normalizeClass(unref(commandItemBody)()) }, [createElementVNode("span", _hoisted_1$
|
|
7206
|
-
createElementVNode("span", { textContent: toDisplayString(parts.value[0]) }, null, 8, _hoisted_2$
|
|
7256
|
+
createElementVNode("span", { class: normalizeClass(unref(commandItemBody)()) }, [createElementVNode("span", _hoisted_1$65, [
|
|
7257
|
+
createElementVNode("span", { textContent: toDisplayString(parts.value[0]) }, null, 8, _hoisted_2$30),
|
|
7207
7258
|
parts.value[1] ? (openBlock(), createElementBlock("span", {
|
|
7208
7259
|
key: 0,
|
|
7209
7260
|
class: normalizeClass(unref(commandItemMatch)()),
|
|
7210
7261
|
textContent: toDisplayString(parts.value[1])
|
|
7211
|
-
}, null, 10, _hoisted_3$
|
|
7262
|
+
}, null, 10, _hoisted_3$14)) : createCommentVNode("", true),
|
|
7212
7263
|
parts.value[2] ? (openBlock(), createElementBlock("span", {
|
|
7213
7264
|
key: 1,
|
|
7214
7265
|
textContent: toDisplayString(parts.value[2])
|
|
7215
7266
|
}, null, 8, _hoisted_4$10)) : createCommentVNode("", true)
|
|
7216
|
-
]), props.match.item.description ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
7267
|
+
]), props.match.item.description ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(props.match.item.description), 1)) : createCommentVNode("", true)], 2),
|
|
7217
7268
|
props.match.item.kbd?.length ? (openBlock(), createElementBlock("span", {
|
|
7218
7269
|
key: 1,
|
|
7219
7270
|
class: normalizeClass(unref(commandItemHint)())
|
|
@@ -7554,9 +7605,9 @@ var CommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
7554
7605
|
});
|
|
7555
7606
|
//#endregion
|
|
7556
7607
|
//#region src/components/listbox/ListboxOptionContent.vue?vue&type=script&setup=true&lang.ts
|
|
7557
|
-
var _hoisted_1$
|
|
7558
|
-
var _hoisted_2$
|
|
7559
|
-
var _hoisted_3$
|
|
7608
|
+
var _hoisted_1$64 = { class: "min-w-0 flex-1" };
|
|
7609
|
+
var _hoisted_2$29 = { class: "block truncate" };
|
|
7610
|
+
var _hoisted_3$13 = {
|
|
7560
7611
|
key: 0,
|
|
7561
7612
|
class: "text-muted block truncate text-xs"
|
|
7562
7613
|
};
|
|
@@ -7576,10 +7627,10 @@ var ListboxOptionContent_default = /* @__PURE__ */ defineComponent({
|
|
|
7576
7627
|
const slots = useSlots();
|
|
7577
7628
|
const { isSelected: selected } = injectListboxItemContext();
|
|
7578
7629
|
return (_ctx, _cache) => {
|
|
7579
|
-
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("span", _hoisted_1$
|
|
7630
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("span", _hoisted_1$64, [renderSlot(_ctx.$slots, "option", {
|
|
7580
7631
|
option: props.option,
|
|
7581
7632
|
selected: unref(selected)
|
|
7582
|
-
}, () => [createElementVNode("span", _hoisted_2$
|
|
7633
|
+
}, () => [createElementVNode("span", _hoisted_2$29, toDisplayString(props.option.label), 1), props.option.description ? (openBlock(), createElementBlock("span", _hoisted_3$13, toDisplayString(props.option.description), 1)) : createCommentVNode("", true)])]), slots.trailing ? renderSlot(_ctx.$slots, "trailing", {
|
|
7583
7634
|
option: props.option,
|
|
7584
7635
|
selected: unref(selected)
|
|
7585
7636
|
}, void 0, void 0, 0) : (openBlock(), createElementBlock("span", _hoisted_4$9, [createVNode(unref(ListboxItemIndicator), null, {
|
|
@@ -7757,19 +7808,19 @@ function pathTo(nodes, value, trail = []) {
|
|
|
7757
7808
|
}
|
|
7758
7809
|
//#endregion
|
|
7759
7810
|
//#region src/components/tree-select/TreeSelect.vue?vue&type=script&setup=true&lang.ts
|
|
7760
|
-
var _hoisted_1$
|
|
7761
|
-
var _hoisted_2$
|
|
7762
|
-
var _hoisted_3$
|
|
7811
|
+
var _hoisted_1$63 = { class: "min-w-0 flex-1 truncate" };
|
|
7812
|
+
var _hoisted_2$28 = ["onClick"];
|
|
7813
|
+
var _hoisted_3$12 = {
|
|
7763
7814
|
key: 1,
|
|
7764
7815
|
class: "size-5 shrink-0"
|
|
7765
7816
|
};
|
|
7766
7817
|
var _hoisted_4$8 = { class: "min-w-0 flex-1" };
|
|
7767
|
-
var _hoisted_5$
|
|
7768
|
-
var _hoisted_6$
|
|
7818
|
+
var _hoisted_5$5 = { class: "block truncate" };
|
|
7819
|
+
var _hoisted_6$4 = {
|
|
7769
7820
|
key: 0,
|
|
7770
7821
|
class: "text-muted block truncate text-xs"
|
|
7771
7822
|
};
|
|
7772
|
-
var _hoisted_7$
|
|
7823
|
+
var _hoisted_7$2 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
7773
7824
|
//#endregion
|
|
7774
7825
|
//#region src/components/tree-select/TreeSelect.vue
|
|
7775
7826
|
var TreeSelect_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7845,7 +7896,7 @@ var TreeSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
7845
7896
|
size: props.size
|
|
7846
7897
|
}), unref(selectTrigger)(), props.class)
|
|
7847
7898
|
}), {
|
|
7848
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
7899
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$63, toDisplayString(selected.value ? selected.value.label : props.placeholder ?? unref(t).select.placeholder), 1), createElementVNode("span", { class: normalizeClass(unref(inputAdornment)()) }, [createVNode(DisclosureIcon_default)], 2)]),
|
|
7849
7900
|
_: 1
|
|
7850
7901
|
}, 16, [
|
|
7851
7902
|
"id",
|
|
@@ -7896,9 +7947,9 @@ var TreeSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
7896
7947
|
}, [createVNode(DisclosureIcon_default, {
|
|
7897
7948
|
direction: "end",
|
|
7898
7949
|
open: isExpanded
|
|
7899
|
-
}, null, 8, ["open"])], 10, _hoisted_2$
|
|
7900
|
-
createElementVNode("span", _hoisted_4$8, [renderSlot(_ctx.$slots, "node", { node: item.value }, () => [createElementVNode("span", _hoisted_5$
|
|
7901
|
-
createElementVNode("span", _hoisted_7$
|
|
7950
|
+
}, null, 8, ["open"])], 10, _hoisted_2$28)) : (openBlock(), createElementBlock("span", _hoisted_3$12)),
|
|
7951
|
+
createElementVNode("span", _hoisted_4$8, [renderSlot(_ctx.$slots, "node", { node: item.value }, () => [createElementVNode("span", _hoisted_5$5, toDisplayString(item.value.label), 1), item.value.description ? (openBlock(), createElementBlock("span", _hoisted_6$4, toDisplayString(item.value.description), 1)) : createCommentVNode("", true)])]),
|
|
7952
|
+
createElementVNode("span", _hoisted_7$2, [isSelected ? (openBlock(), createBlock(unref(Check), { key: 0 })) : createCommentVNode("", true)])
|
|
7902
7953
|
]),
|
|
7903
7954
|
_: 2
|
|
7904
7955
|
}, 1040, [
|
|
@@ -8019,7 +8070,7 @@ var checkboxDescription = tv({
|
|
|
8019
8070
|
});
|
|
8020
8071
|
//#endregion
|
|
8021
8072
|
//#region src/components/checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
8022
|
-
var _hoisted_1$
|
|
8073
|
+
var _hoisted_1$62 = ["data-disabled"];
|
|
8023
8074
|
//#endregion
|
|
8024
8075
|
//#region src/components/checkbox/Checkbox.vue
|
|
8025
8076
|
var Checkbox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8116,7 +8167,7 @@ var Checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
8116
8167
|
controlPlacement: props.controlPlacement
|
|
8117
8168
|
}))
|
|
8118
8169
|
}, toDisplayString(props.description), 3)) : createCommentVNode("", true)
|
|
8119
|
-
], 10, _hoisted_1$
|
|
8170
|
+
], 10, _hoisted_1$62);
|
|
8120
8171
|
};
|
|
8121
8172
|
}
|
|
8122
8173
|
});
|
|
@@ -8239,7 +8290,7 @@ var CheckboxGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
8239
8290
|
var radioDot = tv({ base: "block size-[calc(var(--hn-checkbox-size)/2)] bg-surface rounded-full" });
|
|
8240
8291
|
//#endregion
|
|
8241
8292
|
//#region src/components/radio-group/RadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
8242
|
-
var _hoisted_1$
|
|
8293
|
+
var _hoisted_1$61 = ["data-disabled"];
|
|
8243
8294
|
//#endregion
|
|
8244
8295
|
//#region src/components/radio-group/RadioGroup.vue
|
|
8245
8296
|
var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8333,7 +8384,7 @@ var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
8333
8384
|
controlPlacement: props.controlPlacement
|
|
8334
8385
|
}))
|
|
8335
8386
|
}, toDisplayString(option.description), 3)) : createCommentVNode("", true)
|
|
8336
|
-
], 10, _hoisted_1$
|
|
8387
|
+
], 10, _hoisted_1$61);
|
|
8337
8388
|
}), 128))]),
|
|
8338
8389
|
_: 3
|
|
8339
8390
|
}, 8, [
|
|
@@ -8374,7 +8425,7 @@ var switchThumb = tv({ base: [
|
|
|
8374
8425
|
] });
|
|
8375
8426
|
//#endregion
|
|
8376
8427
|
//#region src/components/switch/Switch.vue?vue&type=script&setup=true&lang.ts
|
|
8377
|
-
var _hoisted_1$
|
|
8428
|
+
var _hoisted_1$60 = ["data-disabled"];
|
|
8378
8429
|
//#endregion
|
|
8379
8430
|
//#region src/components/switch/Switch.vue
|
|
8380
8431
|
var Switch_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8455,7 +8506,7 @@ var Switch_default = /* @__PURE__ */ defineComponent({
|
|
|
8455
8506
|
controlPlacement: props.controlPlacement
|
|
8456
8507
|
}))
|
|
8457
8508
|
}, toDisplayString(props.description), 3)) : createCommentVNode("", true)
|
|
8458
|
-
], 10, _hoisted_1$
|
|
8509
|
+
], 10, _hoisted_1$60);
|
|
8459
8510
|
};
|
|
8460
8511
|
}
|
|
8461
8512
|
});
|
|
@@ -8601,7 +8652,7 @@ var SliderMarks_default = /* @__PURE__ */ defineComponent({
|
|
|
8601
8652
|
});
|
|
8602
8653
|
//#endregion
|
|
8603
8654
|
//#region src/components/slider/Slider.vue?vue&type=script&setup=true&lang.ts
|
|
8604
|
-
var _hoisted_1$
|
|
8655
|
+
var _hoisted_1$59 = ["data-disabled", "data-dragging"];
|
|
8605
8656
|
//#endregion
|
|
8606
8657
|
//#region src/components/slider/Slider.vue
|
|
8607
8658
|
var Slider_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8711,13 +8762,13 @@ var Slider_default = /* @__PURE__ */ defineComponent({
|
|
|
8711
8762
|
"marks",
|
|
8712
8763
|
"min",
|
|
8713
8764
|
"max"
|
|
8714
|
-
])) : createCommentVNode("", true)], 16, _hoisted_1$
|
|
8765
|
+
])) : createCommentVNode("", true)], 16, _hoisted_1$59);
|
|
8715
8766
|
};
|
|
8716
8767
|
}
|
|
8717
8768
|
});
|
|
8718
8769
|
//#endregion
|
|
8719
8770
|
//#region src/components/range-slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
|
|
8720
|
-
var _hoisted_1$
|
|
8771
|
+
var _hoisted_1$58 = [
|
|
8721
8772
|
"aria-labelledby",
|
|
8722
8773
|
"aria-describedby",
|
|
8723
8774
|
"aria-invalid",
|
|
@@ -8856,7 +8907,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
8856
8907
|
"marks",
|
|
8857
8908
|
"min",
|
|
8858
8909
|
"max"
|
|
8859
|
-
])) : createCommentVNode("", true)], 16, _hoisted_1$
|
|
8910
|
+
])) : createCommentVNode("", true)], 16, _hoisted_1$58);
|
|
8860
8911
|
};
|
|
8861
8912
|
}
|
|
8862
8913
|
});
|
|
@@ -8873,15 +8924,15 @@ var toggle = tv({
|
|
|
8873
8924
|
});
|
|
8874
8925
|
//#endregion
|
|
8875
8926
|
//#region src/components/toggle/Toggle.vue?vue&type=script&setup=true&lang.ts
|
|
8876
|
-
var _hoisted_1$
|
|
8927
|
+
var _hoisted_1$57 = {
|
|
8877
8928
|
key: "on",
|
|
8878
8929
|
class: "inline-flex items-center justify-center"
|
|
8879
8930
|
};
|
|
8880
|
-
var _hoisted_2$
|
|
8931
|
+
var _hoisted_2$27 = {
|
|
8881
8932
|
key: "off",
|
|
8882
8933
|
class: "inline-flex items-center justify-center"
|
|
8883
8934
|
};
|
|
8884
|
-
var _hoisted_3$
|
|
8935
|
+
var _hoisted_3$11 = {
|
|
8885
8936
|
key: 2,
|
|
8886
8937
|
class: "inline-flex items-center"
|
|
8887
8938
|
};
|
|
@@ -8958,10 +9009,10 @@ var Toggle_default = /* @__PURE__ */ defineComponent({
|
|
|
8958
9009
|
"leave-active-class": "hn-transition absolute",
|
|
8959
9010
|
"leave-to-class": "scale-90 opacity-0"
|
|
8960
9011
|
}, {
|
|
8961
|
-
default: withCtx(() => [swapped.value ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
9012
|
+
default: withCtx(() => [swapped.value ? (openBlock(), createElementBlock("span", _hoisted_1$57, [renderSlot(_ctx.$slots, "pressed-icon")])) : (openBlock(), createElementBlock("span", _hoisted_2$27, [renderSlot(_ctx.$slots, "icon", { pressed: pressed.value })]))]),
|
|
8962
9013
|
_: 3
|
|
8963
9014
|
})], 2)) : createCommentVNode("", true),
|
|
8964
|
-
unref(slots).default ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
9015
|
+
unref(slots).default ? (openBlock(), createElementBlock("span", _hoisted_3$11, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)
|
|
8965
9016
|
]),
|
|
8966
9017
|
_: 3
|
|
8967
9018
|
}, 16, [
|
|
@@ -9017,7 +9068,7 @@ var tagsInputControl = tv({
|
|
|
9017
9068
|
var tagsInputChip = tv({ base: "max-w-full min-w-0 shrink data-disabled:opacity-100" });
|
|
9018
9069
|
//#endregion
|
|
9019
9070
|
//#region src/components/tags-input/TagsInputChip.vue?vue&type=script&setup=true&lang.ts
|
|
9020
|
-
var _hoisted_1$
|
|
9071
|
+
var _hoisted_1$56 = { class: "min-w-0 truncate" };
|
|
9021
9072
|
//#endregion
|
|
9022
9073
|
//#region src/components/tags-input/TagsInputChip.vue
|
|
9023
9074
|
var TagsInputChip_default = /* @__PURE__ */ defineComponent({
|
|
@@ -9044,7 +9095,7 @@ var TagsInputChip_default = /* @__PURE__ */ defineComponent({
|
|
|
9044
9095
|
onRemove: _cache[0] || (_cache[0] = ($event) => emit("remove"))
|
|
9045
9096
|
}), {
|
|
9046
9097
|
default: withCtx(() => [createVNode(unref(TagsInputItemText), { "as-child": "" }, {
|
|
9047
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
9098
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$56, toDisplayString(props.tag), 1)]),
|
|
9048
9099
|
_: 1
|
|
9049
9100
|
})]),
|
|
9050
9101
|
_: 1
|
|
@@ -9058,7 +9109,7 @@ var TagsInputChip_default = /* @__PURE__ */ defineComponent({
|
|
|
9058
9109
|
});
|
|
9059
9110
|
//#endregion
|
|
9060
9111
|
//#region src/components/tags-input/TagsInput.vue?vue&type=script&setup=true&lang.ts
|
|
9061
|
-
var _hoisted_1$
|
|
9112
|
+
var _hoisted_1$55 = ["data-invalid", "data-disabled"];
|
|
9062
9113
|
//#endregion
|
|
9063
9114
|
//#region src/components/tags-input/TagsInput.vue
|
|
9064
9115
|
var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
@@ -9209,7 +9260,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
9209
9260
|
_: 1
|
|
9210
9261
|
}, 8, ["label"])], 2)) : createCommentVNode("", true)]),
|
|
9211
9262
|
_: 1
|
|
9212
|
-
})], 10, _hoisted_1$
|
|
9263
|
+
})], 10, _hoisted_1$55);
|
|
9213
9264
|
};
|
|
9214
9265
|
}
|
|
9215
9266
|
});
|
|
@@ -9270,12 +9321,12 @@ var multiComboboxHost = tv({
|
|
|
9270
9321
|
var multiComboboxEnd = tv({ base: "absolute inset-y-0 end-0 flex items-stretch" });
|
|
9271
9322
|
//#endregion
|
|
9272
9323
|
//#region src/components/multi-combobox/MultiCombobox.vue?vue&type=script&setup=true&lang.ts
|
|
9273
|
-
var _hoisted_1$
|
|
9324
|
+
var _hoisted_1$54 = [
|
|
9274
9325
|
"data-invalid",
|
|
9275
9326
|
"data-disabled",
|
|
9276
9327
|
"aria-busy"
|
|
9277
9328
|
];
|
|
9278
|
-
var _hoisted_2$
|
|
9329
|
+
var _hoisted_2$26 = { class: "min-w-0 truncate" };
|
|
9279
9330
|
//#endregion
|
|
9280
9331
|
//#region src/components/multi-combobox/MultiCombobox.vue
|
|
9281
9332
|
var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -9368,7 +9419,7 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9368
9419
|
class: normalizeClass(unref(tagsInputChip)()),
|
|
9369
9420
|
onRemove: ($event) => unref(remove)(option.value)
|
|
9370
9421
|
}, {
|
|
9371
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_2$
|
|
9422
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_2$26, toDisplayString(option.label), 1)]),
|
|
9372
9423
|
_: 2
|
|
9373
9424
|
}, 1032, [
|
|
9374
9425
|
"size",
|
|
@@ -9435,7 +9486,7 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9435
9486
|
"aria-label",
|
|
9436
9487
|
"disabled",
|
|
9437
9488
|
"class"
|
|
9438
|
-
])], 2)], 10, _hoisted_1$
|
|
9489
|
+
])], 2)], 10, _hoisted_1$54)]),
|
|
9439
9490
|
_: 1
|
|
9440
9491
|
}), createVNode(ComboboxList_default, {
|
|
9441
9492
|
options: props.options,
|
|
@@ -10119,7 +10170,7 @@ var dateFieldSegment = tv({
|
|
|
10119
10170
|
});
|
|
10120
10171
|
//#endregion
|
|
10121
10172
|
//#region src/components/date-field/DateField.vue?vue&type=script&setup=true&lang.ts
|
|
10122
|
-
var _hoisted_1$
|
|
10173
|
+
var _hoisted_1$53 = ["data-invalid", "data-disabled"];
|
|
10123
10174
|
//#endregion
|
|
10124
10175
|
//#region src/components/date-field/DateField.vue
|
|
10125
10176
|
var DateField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10276,7 +10327,7 @@ var DateField_default = /* @__PURE__ */ defineComponent({
|
|
|
10276
10327
|
key: 1,
|
|
10277
10328
|
class: normalizeClass(unref(inputAdornment)())
|
|
10278
10329
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
10279
|
-
], 10, _hoisted_1$
|
|
10330
|
+
], 10, _hoisted_1$53);
|
|
10280
10331
|
};
|
|
10281
10332
|
}
|
|
10282
10333
|
});
|
|
@@ -10307,7 +10358,7 @@ var InputGroupScope_default = /* @__PURE__ */ defineComponent({
|
|
|
10307
10358
|
var datePickerContent = tv({ base: "hn-anim-pop z-(--hn-z-overlay) p-2 shadow-md outline-none" });
|
|
10308
10359
|
//#endregion
|
|
10309
10360
|
//#region src/components/date-picker/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
10310
|
-
var _hoisted_1$
|
|
10361
|
+
var _hoisted_1$52 = ["data-invalid", "data-disabled"];
|
|
10311
10362
|
//#endregion
|
|
10312
10363
|
//#region src/components/date-picker/DatePicker.vue
|
|
10313
10364
|
var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10424,7 +10475,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
10424
10475
|
_: 1
|
|
10425
10476
|
}, 8, ["label", "disabled"])]),
|
|
10426
10477
|
_: 1
|
|
10427
|
-
})], 10, _hoisted_1$
|
|
10478
|
+
})], 10, _hoisted_1$52)]),
|
|
10428
10479
|
_: 3
|
|
10429
10480
|
}), createVNode(unref(PopoverPortal), null, {
|
|
10430
10481
|
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
@@ -10489,7 +10540,7 @@ function isRangeInvalid({ start, end }, bounds) {
|
|
|
10489
10540
|
}
|
|
10490
10541
|
//#endregion
|
|
10491
10542
|
//#region src/components/date-range-field/DateRangeField.vue?vue&type=script&setup=true&lang.ts
|
|
10492
|
-
var _hoisted_1$
|
|
10543
|
+
var _hoisted_1$51 = ["data-invalid", "data-disabled"];
|
|
10493
10544
|
//#endregion
|
|
10494
10545
|
//#region src/components/date-range-field/DateRangeField.vue
|
|
10495
10546
|
var DateRangeField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10658,7 +10709,7 @@ var DateRangeField_default = /* @__PURE__ */ defineComponent({
|
|
|
10658
10709
|
key: 1,
|
|
10659
10710
|
class: normalizeClass(unref(inputAdornment)())
|
|
10660
10711
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
10661
|
-
], 10, _hoisted_1$
|
|
10712
|
+
], 10, _hoisted_1$51);
|
|
10662
10713
|
};
|
|
10663
10714
|
}
|
|
10664
10715
|
});
|
|
@@ -10906,7 +10957,7 @@ var RangeCalendar_default = /* @__PURE__ */ defineComponent({
|
|
|
10906
10957
|
});
|
|
10907
10958
|
//#endregion
|
|
10908
10959
|
//#region src/components/date-range-picker/DateRangePicker.vue?vue&type=script&setup=true&lang.ts
|
|
10909
|
-
var _hoisted_1$
|
|
10960
|
+
var _hoisted_1$50 = ["data-invalid", "data-disabled"];
|
|
10910
10961
|
//#endregion
|
|
10911
10962
|
//#region src/components/date-range-picker/DateRangePicker.vue
|
|
10912
10963
|
var DateRangePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11024,7 +11075,7 @@ var DateRangePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
11024
11075
|
_: 1
|
|
11025
11076
|
}, 8, ["label", "disabled"])]),
|
|
11026
11077
|
_: 1
|
|
11027
|
-
})], 10, _hoisted_1$
|
|
11078
|
+
})], 10, _hoisted_1$50)]),
|
|
11028
11079
|
_: 3
|
|
11029
11080
|
}), createVNode(unref(PopoverPortal), null, {
|
|
11030
11081
|
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
@@ -11078,7 +11129,7 @@ var DateRangePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
11078
11129
|
});
|
|
11079
11130
|
//#endregion
|
|
11080
11131
|
//#region src/components/time-field/TimeField.vue?vue&type=script&setup=true&lang.ts
|
|
11081
|
-
var _hoisted_1$
|
|
11132
|
+
var _hoisted_1$49 = ["data-invalid", "data-disabled"];
|
|
11082
11133
|
//#endregion
|
|
11083
11134
|
//#region src/components/time-field/TimeField.vue
|
|
11084
11135
|
var TimeField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11241,7 +11292,7 @@ var TimeField_default = /* @__PURE__ */ defineComponent({
|
|
|
11241
11292
|
key: 1,
|
|
11242
11293
|
class: normalizeClass(unref(inputAdornment)())
|
|
11243
11294
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
11244
|
-
], 10, _hoisted_1$
|
|
11295
|
+
], 10, _hoisted_1$49);
|
|
11245
11296
|
};
|
|
11246
11297
|
}
|
|
11247
11298
|
});
|
|
@@ -11250,7 +11301,7 @@ var TimeField_default = /* @__PURE__ */ defineComponent({
|
|
|
11250
11301
|
var dateTimePickerFooter = tv({ base: "mt-2 flex items-center justify-between gap-2" });
|
|
11251
11302
|
//#endregion
|
|
11252
11303
|
//#region src/components/date-time-picker/DateTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
11253
|
-
var _hoisted_1$
|
|
11304
|
+
var _hoisted_1$48 = ["data-invalid", "data-disabled"];
|
|
11254
11305
|
//#endregion
|
|
11255
11306
|
//#region src/components/date-time-picker/DateTimePicker.vue
|
|
11256
11307
|
var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11383,7 +11434,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
11383
11434
|
_: 1
|
|
11384
11435
|
}, 8, ["label", "disabled"])]),
|
|
11385
11436
|
_: 1
|
|
11386
|
-
})], 10, _hoisted_1$
|
|
11437
|
+
})], 10, _hoisted_1$48)]),
|
|
11387
11438
|
_: 3
|
|
11388
11439
|
}), createVNode(unref(PopoverPortal), null, {
|
|
11389
11440
|
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
@@ -11492,7 +11543,7 @@ function starFill(value, index) {
|
|
|
11492
11543
|
}
|
|
11493
11544
|
//#endregion
|
|
11494
11545
|
//#region src/components/rating/Rating.vue?vue&type=script&setup=true&lang.ts
|
|
11495
|
-
var _hoisted_1$
|
|
11546
|
+
var _hoisted_1$47 = ["aria-label"];
|
|
11496
11547
|
//#endregion
|
|
11497
11548
|
//#region src/components/rating/Rating.vue
|
|
11498
11549
|
var Rating_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11536,7 +11587,7 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
11536
11587
|
class: normalizeClass(unref(ratingFill)()),
|
|
11537
11588
|
style: normalizeStyle({ width: unref(starFill)(model.value, index) })
|
|
11538
11589
|
}, [createVNode(unref(Star), { class: normalizeClass(unref(ratingStar)({ active: true })) }, null, 8, ["class"])], 6)], 2);
|
|
11539
|
-
}), 128))], 16, _hoisted_1$
|
|
11590
|
+
}), 128))], 16, _hoisted_1$47)) : (openBlock(), createBlock(unref(RatingRoot), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
11540
11591
|
"data-hn-rating": "",
|
|
11541
11592
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
11542
11593
|
"data-invalid": unref(invalid) ? "" : void 0,
|
|
@@ -11825,13 +11876,13 @@ function formatSize(tag, bytes) {
|
|
|
11825
11876
|
}
|
|
11826
11877
|
//#endregion
|
|
11827
11878
|
//#region src/components/file-upload/FileUpload.vue?vue&type=script&setup=true&lang.ts
|
|
11828
|
-
var _hoisted_1$
|
|
11879
|
+
var _hoisted_1$46 = [
|
|
11829
11880
|
"name",
|
|
11830
11881
|
"accept",
|
|
11831
11882
|
"multiple",
|
|
11832
11883
|
"disabled"
|
|
11833
11884
|
];
|
|
11834
|
-
var _hoisted_2$
|
|
11885
|
+
var _hoisted_2$25 = [
|
|
11835
11886
|
"id",
|
|
11836
11887
|
"aria-describedby",
|
|
11837
11888
|
"aria-invalid",
|
|
@@ -11840,7 +11891,7 @@ var _hoisted_2$26 = [
|
|
|
11840
11891
|
"aria-busy",
|
|
11841
11892
|
"disabled"
|
|
11842
11893
|
];
|
|
11843
|
-
var _hoisted_3$
|
|
11894
|
+
var _hoisted_3$10 = ["src"];
|
|
11844
11895
|
//#endregion
|
|
11845
11896
|
//#region src/components/file-upload/FileUpload.vue
|
|
11846
11897
|
var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11920,7 +11971,7 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11920
11971
|
multiple: props.multiple,
|
|
11921
11972
|
disabled: unref(disabled),
|
|
11922
11973
|
onChange: _cache[0] || (_cache[0] = (...args) => unref(onChange) && unref(onChange)(...args))
|
|
11923
|
-
}, null, 40, _hoisted_1$
|
|
11974
|
+
}, null, 40, _hoisted_1$46),
|
|
11924
11975
|
props.variant === "area" ? (openBlock(), createElementBlock("button", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
11925
11976
|
type: "button",
|
|
11926
11977
|
"data-hn-file-upload-area": "",
|
|
@@ -11944,7 +11995,7 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11944
11995
|
}, {
|
|
11945
11996
|
default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(Upload), { "aria-hidden": "true" })])]),
|
|
11946
11997
|
_: 3
|
|
11947
|
-
}, 8, ["swapped"]), renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(t).upload.dropHint), 1)])], 16, _hoisted_2$
|
|
11998
|
+
}, 8, ["swapped"]), renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(t).upload.dropHint), 1)])], 16, _hoisted_2$25)) : (openBlock(), createBlock(Button_default, mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
11948
11999
|
id: unref(fieldId),
|
|
11949
12000
|
"aria-describedby": unref(describedBy),
|
|
11950
12001
|
"aria-invalid": unref(invalid) || void 0,
|
|
@@ -11976,7 +12027,7 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11976
12027
|
key: 0,
|
|
11977
12028
|
src: unref(urls).get(file),
|
|
11978
12029
|
alt: ""
|
|
11979
|
-
}, null, 8, _hoisted_3$
|
|
12030
|
+
}, null, 8, _hoisted_3$10)) : (openBlock(), createBlock(unref(File), {
|
|
11980
12031
|
key: 1,
|
|
11981
12032
|
"aria-hidden": "true"
|
|
11982
12033
|
}))], 2),
|
|
@@ -12120,13 +12171,71 @@ var Heading_default = /* @__PURE__ */ defineComponent({
|
|
|
12120
12171
|
}
|
|
12121
12172
|
});
|
|
12122
12173
|
//#endregion
|
|
12123
|
-
//#region src/components/alert-dialog/
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
}
|
|
12129
|
-
|
|
12174
|
+
//#region src/components/alert-dialog/composables/useAlertDialogConfirm.ts
|
|
12175
|
+
function useAlertDialogConfirm(props, open, onError, blocked = () => false) {
|
|
12176
|
+
const busy = ref(false);
|
|
12177
|
+
function guard(event) {
|
|
12178
|
+
if (busy.value) event.preventDefault();
|
|
12179
|
+
}
|
|
12180
|
+
async function confirm() {
|
|
12181
|
+
if (!open.value || busy.value || blocked()) return;
|
|
12182
|
+
busy.value = true;
|
|
12183
|
+
try {
|
|
12184
|
+
await props.onConfirm?.();
|
|
12185
|
+
open.value = false;
|
|
12186
|
+
} catch (error) {
|
|
12187
|
+
onError(error);
|
|
12188
|
+
} finally {
|
|
12189
|
+
busy.value = false;
|
|
12190
|
+
}
|
|
12191
|
+
}
|
|
12192
|
+
return {
|
|
12193
|
+
busy,
|
|
12194
|
+
guard,
|
|
12195
|
+
confirm
|
|
12196
|
+
};
|
|
12197
|
+
}
|
|
12198
|
+
//#endregion
|
|
12199
|
+
//#region src/components/alert-dialog/composables/useConfirmDelay.ts
|
|
12200
|
+
function useConfirmDelay(open, delay) {
|
|
12201
|
+
const remaining = ref(0);
|
|
12202
|
+
let mounted = false;
|
|
12203
|
+
let timer;
|
|
12204
|
+
function stop() {
|
|
12205
|
+
clearTimeout(timer);
|
|
12206
|
+
timer = void 0;
|
|
12207
|
+
}
|
|
12208
|
+
function restart() {
|
|
12209
|
+
stop();
|
|
12210
|
+
if (!open.value) return;
|
|
12211
|
+
const seconds = Math.ceil(delay());
|
|
12212
|
+
remaining.value = Number.isFinite(seconds) && seconds > 0 ? seconds : 0;
|
|
12213
|
+
if (!mounted || !remaining.value) return;
|
|
12214
|
+
const deadline = performance.now() + remaining.value * 1e3;
|
|
12215
|
+
function tick() {
|
|
12216
|
+
const milliseconds = deadline - performance.now();
|
|
12217
|
+
remaining.value = Math.max(0, Math.ceil(milliseconds / 1e3));
|
|
12218
|
+
timer = remaining.value > 0 ? setTimeout(tick, Math.min(1e3, milliseconds)) : void 0;
|
|
12219
|
+
}
|
|
12220
|
+
tick();
|
|
12221
|
+
}
|
|
12222
|
+
watch([open, delay], restart, {
|
|
12223
|
+
immediate: true,
|
|
12224
|
+
flush: "sync"
|
|
12225
|
+
});
|
|
12226
|
+
onMounted(() => {
|
|
12227
|
+
mounted = true;
|
|
12228
|
+
restart();
|
|
12229
|
+
});
|
|
12230
|
+
onScopeDispose(stop);
|
|
12231
|
+
return remaining;
|
|
12232
|
+
}
|
|
12233
|
+
//#endregion
|
|
12234
|
+
//#region src/components/alert-dialog/alert-dialog.variants.ts
|
|
12235
|
+
var alertDialogHeader = tv({ base: "flex min-w-0 flex-col gap-1.5 px-(--hn-panel-p)" });
|
|
12236
|
+
var alertDialogContent = tv({ base: "px-(--hn-panel-p)" });
|
|
12237
|
+
var alertDialogActions = tv({ base: "flex justify-end gap-(--hn-inline-gap) px-(--hn-panel-p)" });
|
|
12238
|
+
var alertDialogCountdown = tv({ base: "tabular-nums" });
|
|
12130
12239
|
//#endregion
|
|
12131
12240
|
//#region src/components/alert-dialog/AlertDialog.vue
|
|
12132
12241
|
var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
@@ -12136,6 +12245,7 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12136
12245
|
title: {},
|
|
12137
12246
|
description: {},
|
|
12138
12247
|
confirmText: {},
|
|
12248
|
+
confirmDelay: { default: 0 },
|
|
12139
12249
|
cancelText: {},
|
|
12140
12250
|
tone: { default: "accent" },
|
|
12141
12251
|
size: { default: "sm" },
|
|
@@ -12146,29 +12256,14 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12146
12256
|
"open": { type: Boolean },
|
|
12147
12257
|
"openModifiers": {}
|
|
12148
12258
|
}),
|
|
12149
|
-
emits: /*@__PURE__*/ mergeModels(["cancel"], ["update:open"]),
|
|
12259
|
+
emits: /*@__PURE__*/ mergeModels(["cancel", "error"], ["update:open"]),
|
|
12150
12260
|
setup(__props, { emit: __emit }) {
|
|
12151
12261
|
const props = __props;
|
|
12152
12262
|
const emit = __emit;
|
|
12153
12263
|
const open = useModel(__props, "open");
|
|
12154
|
-
const busy = ref(false);
|
|
12155
12264
|
const t = useUiLocale();
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
}
|
|
12159
|
-
async function confirm() {
|
|
12160
|
-
if (busy.value) return;
|
|
12161
|
-
const result = props.onConfirm?.();
|
|
12162
|
-
if (result instanceof Promise) {
|
|
12163
|
-
busy.value = true;
|
|
12164
|
-
try {
|
|
12165
|
-
await result;
|
|
12166
|
-
} finally {
|
|
12167
|
-
busy.value = false;
|
|
12168
|
-
}
|
|
12169
|
-
}
|
|
12170
|
-
open.value = false;
|
|
12171
|
-
}
|
|
12265
|
+
const remaining = useConfirmDelay(open, () => props.confirmDelay);
|
|
12266
|
+
const { busy, guard, confirm } = useAlertDialogConfirm(props, open, (error) => emit("error", error), () => remaining.value > 0);
|
|
12172
12267
|
return (_ctx, _cache) => {
|
|
12173
12268
|
return openBlock(), createBlock(unref(AlertDialogRoot), {
|
|
12174
12269
|
open: open.value,
|
|
@@ -12181,21 +12276,21 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12181
12276
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
12182
12277
|
_: 3
|
|
12183
12278
|
})) : createCommentVNode("", true), createVNode(unref(AlertDialogPortal), null, {
|
|
12184
|
-
default: withCtx(() => [createVNode(unref(AlertDialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(
|
|
12279
|
+
default: withCtx(() => [createVNode(unref(AlertDialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(dialogWrapper)({ placement: props.placement ?? "auto" })) }, [createVNode(unref(AlertDialogContent), {
|
|
12185
12280
|
"as-child": "",
|
|
12186
|
-
onEscapeKeyDown: guard
|
|
12281
|
+
onEscapeKeyDown: unref(guard)
|
|
12187
12282
|
}, {
|
|
12188
12283
|
default: withCtx(() => [createVNode(Card_default, {
|
|
12189
12284
|
padded: false,
|
|
12190
12285
|
"data-hn-alert-dialog": "",
|
|
12191
|
-
"aria-busy": busy
|
|
12192
|
-
class: normalizeClass(unref(cn)(
|
|
12286
|
+
"aria-busy": unref(busy) || void 0,
|
|
12287
|
+
class: normalizeClass(unref(cn)(unref(dialogCard)({
|
|
12193
12288
|
placement: props.placement ?? "auto",
|
|
12194
12289
|
size: props.size
|
|
12195
12290
|
}), props.class))
|
|
12196
12291
|
}, {
|
|
12197
12292
|
default: withCtx(() => [
|
|
12198
|
-
createElementVNode("div",
|
|
12293
|
+
createElementVNode("div", { class: normalizeClass(unref(alertDialogHeader)()) }, [createVNode(unref(AlertDialogTitle), { "as-child": "" }, {
|
|
12199
12294
|
default: withCtx(() => [createVNode(Heading_default, {
|
|
12200
12295
|
level: 2,
|
|
12201
12296
|
size: "lg"
|
|
@@ -12213,13 +12308,16 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12213
12308
|
_: 1
|
|
12214
12309
|
})]),
|
|
12215
12310
|
_: 1
|
|
12216
|
-
})) : createCommentVNode("", true)]),
|
|
12217
|
-
_ctx.$slots.content ? (openBlock(), createElementBlock("div",
|
|
12218
|
-
|
|
12311
|
+
})) : createCommentVNode("", true)], 2),
|
|
12312
|
+
_ctx.$slots.content ? (openBlock(), createElementBlock("div", {
|
|
12313
|
+
key: 0,
|
|
12314
|
+
class: normalizeClass(unref(alertDialogContent)())
|
|
12315
|
+
}, [renderSlot(_ctx.$slots, "content")], 2)) : createCommentVNode("", true),
|
|
12316
|
+
createElementVNode("div", { class: normalizeClass(unref(alertDialogActions)()) }, [createVNode(unref(AlertDialogCancel), { "as-child": "" }, {
|
|
12219
12317
|
default: withCtx(() => [createVNode(Button_default, {
|
|
12220
12318
|
variant: "soft",
|
|
12221
12319
|
tone: "neutral",
|
|
12222
|
-
disabled: busy
|
|
12320
|
+
disabled: unref(busy),
|
|
12223
12321
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("cancel"))
|
|
12224
12322
|
}, {
|
|
12225
12323
|
default: withCtx(() => [createTextVNode(toDisplayString(props.cancelText ?? unref(t).common.cancel), 1)]),
|
|
@@ -12228,17 +12326,26 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12228
12326
|
_: 1
|
|
12229
12327
|
}), createVNode(Button_default, {
|
|
12230
12328
|
tone: props.tone,
|
|
12231
|
-
loading: busy
|
|
12232
|
-
|
|
12329
|
+
loading: unref(busy),
|
|
12330
|
+
disabled: unref(remaining) > 0,
|
|
12331
|
+
onClick: unref(confirm)
|
|
12233
12332
|
}, {
|
|
12234
|
-
default: withCtx(() => [createTextVNode(toDisplayString(props.confirmText ?? unref(t).common.confirm), 1)
|
|
12333
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.confirmText ?? unref(t).common.confirm) + " ", 1), unref(remaining) > 0 ? (openBlock(), createElementBlock("span", {
|
|
12334
|
+
key: 0,
|
|
12335
|
+
class: normalizeClass(unref(alertDialogCountdown)())
|
|
12336
|
+
}, "(" + toDisplayString(unref(remaining)) + ")", 3)) : createCommentVNode("", true)]),
|
|
12235
12337
|
_: 1
|
|
12236
|
-
}, 8, [
|
|
12338
|
+
}, 8, [
|
|
12339
|
+
"tone",
|
|
12340
|
+
"loading",
|
|
12341
|
+
"disabled",
|
|
12342
|
+
"onClick"
|
|
12343
|
+
])], 2)
|
|
12237
12344
|
]),
|
|
12238
12345
|
_: 3
|
|
12239
12346
|
}, 8, ["aria-busy", "class"])]),
|
|
12240
12347
|
_: 3
|
|
12241
|
-
})], 2)]),
|
|
12348
|
+
}, 8, ["onEscapeKeyDown"])], 2)]),
|
|
12242
12349
|
_: 3
|
|
12243
12350
|
})]),
|
|
12244
12351
|
_: 3
|
|
@@ -12849,8 +12956,8 @@ var _hoisted_1$40 = ["data-dragging"];
|
|
|
12849
12956
|
var _hoisted_2$21 = ["data-disabled"];
|
|
12850
12957
|
var _hoisted_3$9 = { class: "flex items-start justify-between gap-4 px-(--hn-panel-p)" };
|
|
12851
12958
|
var _hoisted_4$7 = { class: "flex min-w-0 flex-col gap-1.5" };
|
|
12852
|
-
var _hoisted_5$
|
|
12853
|
-
var _hoisted_6$
|
|
12959
|
+
var _hoisted_5$4 = { class: "px-(--hn-panel-p) py-1" };
|
|
12960
|
+
var _hoisted_6$3 = {
|
|
12854
12961
|
key: 1,
|
|
12855
12962
|
class: "flex shrink-0 justify-end gap-(--hn-inline-gap) px-(--hn-panel-p)"
|
|
12856
12963
|
};
|
|
@@ -12965,10 +13072,10 @@ var Sheet_default = /* @__PURE__ */ defineComponent({
|
|
|
12965
13072
|
key: 0,
|
|
12966
13073
|
class: "min-h-0 grow"
|
|
12967
13074
|
}, {
|
|
12968
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_5$
|
|
13075
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_5$4, [renderSlot(_ctx.$slots, "content", { close })])]),
|
|
12969
13076
|
_: 3
|
|
12970
13077
|
})) : createCommentVNode("", true),
|
|
12971
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
13078
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$3, [renderSlot(_ctx.$slots, "footer", { close })])) : createCommentVNode("", true)
|
|
12972
13079
|
]),
|
|
12973
13080
|
_: 3
|
|
12974
13081
|
}, 8, [
|
|
@@ -14726,13 +14833,13 @@ var _hoisted_1$26 = [
|
|
|
14726
14833
|
var _hoisted_2$15 = ["id", "for"];
|
|
14727
14834
|
var _hoisted_3$7 = ["id"];
|
|
14728
14835
|
var _hoisted_4$5 = ["id"];
|
|
14729
|
-
var _hoisted_5$
|
|
14836
|
+
var _hoisted_5$3 = {
|
|
14730
14837
|
key: 0,
|
|
14731
14838
|
"data-hn-form-field-message": "",
|
|
14732
14839
|
class: "hn-collapse [--hn-collapse-out:var(--hn-duration-fast)]"
|
|
14733
14840
|
};
|
|
14734
|
-
var _hoisted_6$
|
|
14735
|
-
var _hoisted_7$
|
|
14841
|
+
var _hoisted_6$2 = { class: "hn-collapse-body" };
|
|
14842
|
+
var _hoisted_7$1 = ["id"];
|
|
14736
14843
|
//#endregion
|
|
14737
14844
|
//#region src/components/form-field/FormField.vue
|
|
14738
14845
|
var FormField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -14849,11 +14956,11 @@ var FormField_default = /* @__PURE__ */ defineComponent({
|
|
|
14849
14956
|
"leave-from-class": "hn-collapse-open",
|
|
14850
14957
|
"leave-to-class": "hn-collapse-closed"
|
|
14851
14958
|
}, toHandlers(unref(hooks))), {
|
|
14852
|
-
default: withCtx(() => [message.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
14959
|
+
default: withCtx(() => [message.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [createElementVNode("div", _hoisted_6$2, [createElementVNode("p", {
|
|
14853
14960
|
id: unref(messageId),
|
|
14854
14961
|
class: normalizeClass(unref(formFieldMessage)()),
|
|
14855
14962
|
"aria-live": "polite"
|
|
14856
|
-
}, toDisplayString(message.value), 11, _hoisted_7$
|
|
14963
|
+
}, toDisplayString(message.value), 11, _hoisted_7$1)])])) : createCommentVNode("", true)]),
|
|
14857
14964
|
_: 1
|
|
14858
14965
|
}, 16)
|
|
14859
14966
|
], 2)], 2)], 46, _hoisted_1$26);
|
|
@@ -15148,8 +15255,13 @@ var SegmentedControl_default = /* @__PURE__ */ defineComponent({
|
|
|
15148
15255
|
option.value === current.value ? (openBlock(), createBlock(Highlight_default, {
|
|
15149
15256
|
key: 0,
|
|
15150
15257
|
id: unref(highlightId),
|
|
15258
|
+
axis: props.orientation === "vertical" ? "y" : "x",
|
|
15151
15259
|
class: normalizeClass(unref(segmentedThumb)())
|
|
15152
|
-
}, null, 8, [
|
|
15260
|
+
}, null, 8, [
|
|
15261
|
+
"id",
|
|
15262
|
+
"axis",
|
|
15263
|
+
"class"
|
|
15264
|
+
])) : createCommentVNode("", true),
|
|
15153
15265
|
createVNode(Ripple_default),
|
|
15154
15266
|
renderSlot(_ctx.$slots, "option", { option }, () => [createTextVNode(toDisplayString(option.label), 1)])
|
|
15155
15267
|
]),
|
|
@@ -15367,17 +15479,43 @@ async function tokenize(code, lang) {
|
|
|
15367
15479
|
}).tokens;
|
|
15368
15480
|
}
|
|
15369
15481
|
//#endregion
|
|
15482
|
+
//#region src/components/code-block/composables/useCodeHighlight.ts
|
|
15483
|
+
function useCodeHighlight(props) {
|
|
15484
|
+
const tokens = shallowRef(null);
|
|
15485
|
+
onMounted(() => {
|
|
15486
|
+
watch(() => [
|
|
15487
|
+
props.code,
|
|
15488
|
+
props.lang,
|
|
15489
|
+
props.html
|
|
15490
|
+
], async ([code, lang, html]) => {
|
|
15491
|
+
if (html || !lang) {
|
|
15492
|
+
tokens.value = null;
|
|
15493
|
+
return;
|
|
15494
|
+
}
|
|
15495
|
+
try {
|
|
15496
|
+
const result = await tokenize(code, lang);
|
|
15497
|
+
if (code === props.code && lang === props.lang) tokens.value = result;
|
|
15498
|
+
} catch (error) {
|
|
15499
|
+
tokens.value = null;
|
|
15500
|
+
`${lang}${String(error)}`;
|
|
15501
|
+
}
|
|
15502
|
+
}, { immediate: true });
|
|
15503
|
+
});
|
|
15504
|
+
return tokens;
|
|
15505
|
+
}
|
|
15506
|
+
//#endregion
|
|
15507
|
+
//#region src/components/code-block/code-block.variants.ts
|
|
15508
|
+
var codeBlock = tv({ base: "relative flex min-h-0 min-w-0 flex-col" });
|
|
15509
|
+
var codeBlockArea = tv({ base: "hn-pre min-h-0 grow p-0" });
|
|
15510
|
+
var codeBlockContent = tv({ base: "hn-pre-content m-0 w-max min-w-full" });
|
|
15511
|
+
var codeBlockActions = tv({ base: "absolute top-2 end-2 flex items-center gap-2" });
|
|
15512
|
+
var codeBlockLabel = tv({ base: "text-faint font-mono text-xs select-none" });
|
|
15513
|
+
//#endregion
|
|
15370
15514
|
//#region src/components/code-block/CodeBlock.vue?vue&type=script&setup=true&lang.ts
|
|
15371
15515
|
var _hoisted_1$23 = ["data-lang"];
|
|
15372
|
-
var _hoisted_2$13 =
|
|
15373
|
-
var _hoisted_3$6 =
|
|
15374
|
-
var _hoisted_4$4 = { key:
|
|
15375
|
-
var _hoisted_5$3 = { key: 2 };
|
|
15376
|
-
var _hoisted_6$2 = { class: "absolute top-2 end-2 flex items-center gap-2" };
|
|
15377
|
-
var _hoisted_7$1 = {
|
|
15378
|
-
key: 0,
|
|
15379
|
-
class: "text-faint font-mono text-xs select-none"
|
|
15380
|
-
};
|
|
15516
|
+
var _hoisted_2$13 = ["innerHTML"];
|
|
15517
|
+
var _hoisted_3$6 = { key: 1 };
|
|
15518
|
+
var _hoisted_4$4 = { key: 2 };
|
|
15381
15519
|
//#endregion
|
|
15382
15520
|
//#region src/components/code-block/CodeBlock.vue
|
|
15383
15521
|
var CodeBlock_default = /* @__PURE__ */ defineComponent({
|
|
@@ -15398,53 +15536,37 @@ var CodeBlock_default = /* @__PURE__ */ defineComponent({
|
|
|
15398
15536
|
const props = __props;
|
|
15399
15537
|
const t = useUiLocale();
|
|
15400
15538
|
const tag = computed(() => props.label ?? props.lang);
|
|
15401
|
-
const tokens =
|
|
15402
|
-
onMounted(() => {
|
|
15403
|
-
watch(() => [
|
|
15404
|
-
props.code,
|
|
15405
|
-
props.lang,
|
|
15406
|
-
props.html
|
|
15407
|
-
], async ([code, lang, html]) => {
|
|
15408
|
-
if (html || !lang) {
|
|
15409
|
-
tokens.value = null;
|
|
15410
|
-
return;
|
|
15411
|
-
}
|
|
15412
|
-
try {
|
|
15413
|
-
const result = await tokenize(code, lang);
|
|
15414
|
-
if (code === props.code && lang === props.lang) tokens.value = result;
|
|
15415
|
-
} catch (error) {
|
|
15416
|
-
tokens.value = null;
|
|
15417
|
-
`${lang}${String(error)}`;
|
|
15418
|
-
}
|
|
15419
|
-
}, { immediate: true });
|
|
15420
|
-
});
|
|
15539
|
+
const tokens = useCodeHighlight(props);
|
|
15421
15540
|
return (_ctx, _cache) => {
|
|
15422
15541
|
return openBlock(), createElementBlock("div", {
|
|
15423
15542
|
"data-lang": props.lang,
|
|
15424
|
-
class: normalizeClass(unref(cn)(
|
|
15543
|
+
class: normalizeClass(unref(cn)(unref(codeBlock)(), props.class))
|
|
15425
15544
|
}, [createVNode(ScrollArea_default, {
|
|
15426
|
-
direction: "
|
|
15545
|
+
direction: "both",
|
|
15427
15546
|
focusable: "",
|
|
15428
15547
|
label: tag.value,
|
|
15429
|
-
class:
|
|
15548
|
+
class: normalizeClass(unref(codeBlockArea)())
|
|
15430
15549
|
}, {
|
|
15431
|
-
default: withCtx(() => [createElementVNode("pre",
|
|
15550
|
+
default: withCtx(() => [createElementVNode("pre", { class: normalizeClass(unref(codeBlockContent)()) }, [props.html ? (openBlock(), createElementBlock("code", {
|
|
15432
15551
|
key: 0,
|
|
15433
15552
|
innerHTML: props.html
|
|
15434
|
-
}, null, 8,
|
|
15553
|
+
}, null, 8, _hoisted_2$13)) : unref(tokens) ? (openBlock(), createElementBlock("code", _hoisted_3$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tokens), (line, i) => {
|
|
15435
15554
|
return openBlock(), createElementBlock(Fragment, { key: i }, [createTextVNode(toDisplayString(i ? "\n" : ""), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(line, (tk, j) => {
|
|
15436
15555
|
return openBlock(), createElementBlock("span", {
|
|
15437
15556
|
key: j,
|
|
15438
15557
|
style: normalizeStyle(tk.htmlStyle)
|
|
15439
15558
|
}, toDisplayString(tk.content), 5);
|
|
15440
15559
|
}), 128))], 64);
|
|
15441
|
-
}), 128))])) : (openBlock(), createElementBlock("code",
|
|
15560
|
+
}), 128))])) : (openBlock(), createElementBlock("code", _hoisted_4$4, toDisplayString(__props.code), 1))], 2)]),
|
|
15442
15561
|
_: 1
|
|
15443
|
-
}, 8, ["label"]), createElementVNode("div",
|
|
15562
|
+
}, 8, ["label", "class"]), createElementVNode("div", { class: normalizeClass(unref(codeBlockActions)()) }, [tag.value ? (openBlock(), createElementBlock("span", {
|
|
15563
|
+
key: 0,
|
|
15564
|
+
class: normalizeClass(unref(codeBlockLabel)())
|
|
15565
|
+
}, toDisplayString(tag.value), 3)) : createCommentVNode("", true), __props.copyable ? (openBlock(), createBlock(CopyButton_default, {
|
|
15444
15566
|
key: 1,
|
|
15445
15567
|
text: props.code,
|
|
15446
15568
|
label: unref(t).codeblock.copy
|
|
15447
|
-
}, null, 8, ["text", "label"])) : createCommentVNode("", true)])], 10, _hoisted_1$23);
|
|
15569
|
+
}, null, 8, ["text", "label"])) : createCommentVNode("", true)], 2)], 10, _hoisted_1$23);
|
|
15448
15570
|
};
|
|
15449
15571
|
}
|
|
15450
15572
|
});
|
|
@@ -17141,6 +17263,7 @@ var Anchor_default = /* @__PURE__ */ defineComponent({
|
|
|
17141
17263
|
default: withCtx(() => [unref(span) ? (openBlock(), createBlock(Highlight_default, {
|
|
17142
17264
|
key: 0,
|
|
17143
17265
|
as: "li",
|
|
17266
|
+
axis: "y",
|
|
17144
17267
|
role: "presentation",
|
|
17145
17268
|
style: normalizeStyle({ gridRow: unref(span) }),
|
|
17146
17269
|
class: "bg-accent col-start-1 -ms-px w-0.5 self-stretch justify-self-start rounded-full"
|
|
@@ -17241,11 +17364,157 @@ var BreadcrumbSeparator_default = /* @__PURE__ */ defineComponent({
|
|
|
17241
17364
|
}
|
|
17242
17365
|
});
|
|
17243
17366
|
//#endregion
|
|
17367
|
+
//#region src/components/popover/composables/usePopoverCloseFocus.ts
|
|
17368
|
+
function usePopoverCloseFocus(emit) {
|
|
17369
|
+
const root = injectPopoverRootContext();
|
|
17370
|
+
return (event) => {
|
|
17371
|
+
emit("closeAutoFocus", event);
|
|
17372
|
+
if (!event.defaultPrevented || !root.triggerElement.value) return;
|
|
17373
|
+
const trigger = root.triggerElement.value;
|
|
17374
|
+
root.triggerElement.value = void 0;
|
|
17375
|
+
nextTick(() => {
|
|
17376
|
+
root.triggerElement.value ??= trigger;
|
|
17377
|
+
});
|
|
17378
|
+
};
|
|
17379
|
+
}
|
|
17380
|
+
//#endregion
|
|
17381
|
+
//#region src/components/popover/PopoverContent.vue
|
|
17382
|
+
var PopoverContent_default = /* @__PURE__ */ defineComponent({
|
|
17383
|
+
name: "HnPopoverContent",
|
|
17384
|
+
__name: "PopoverContent",
|
|
17385
|
+
props: {
|
|
17386
|
+
forceMount: { type: Boolean },
|
|
17387
|
+
memoDependencies: {},
|
|
17388
|
+
side: {},
|
|
17389
|
+
sideOffset: {},
|
|
17390
|
+
sideFlip: { type: Boolean },
|
|
17391
|
+
align: {},
|
|
17392
|
+
alignOffset: {},
|
|
17393
|
+
alignFlip: { type: Boolean },
|
|
17394
|
+
avoidCollisions: { type: Boolean },
|
|
17395
|
+
collisionBoundary: {},
|
|
17396
|
+
collisionPadding: {},
|
|
17397
|
+
arrowPadding: {},
|
|
17398
|
+
hideShiftedArrow: { type: Boolean },
|
|
17399
|
+
sticky: {},
|
|
17400
|
+
hideWhenDetached: { type: Boolean },
|
|
17401
|
+
positionStrategy: {},
|
|
17402
|
+
updatePositionStrategy: {},
|
|
17403
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
17404
|
+
prioritizePosition: { type: Boolean },
|
|
17405
|
+
reference: {},
|
|
17406
|
+
dir: {},
|
|
17407
|
+
asChild: { type: Boolean },
|
|
17408
|
+
as: {},
|
|
17409
|
+
disableOutsidePointerEvents: { type: Boolean }
|
|
17410
|
+
},
|
|
17411
|
+
emits: [
|
|
17412
|
+
"escapeKeyDown",
|
|
17413
|
+
"pointerDownOutside",
|
|
17414
|
+
"focusOutside",
|
|
17415
|
+
"interactOutside",
|
|
17416
|
+
"openAutoFocus",
|
|
17417
|
+
"closeAutoFocus"
|
|
17418
|
+
],
|
|
17419
|
+
setup(__props, { emit: __emit }) {
|
|
17420
|
+
const props = __props;
|
|
17421
|
+
const emit = __emit;
|
|
17422
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
17423
|
+
const closeAutoFocus = usePopoverCloseFocus(emit);
|
|
17424
|
+
return (_ctx, _cache) => {
|
|
17425
|
+
return openBlock(), createBlock(unref(PopoverContent), mergeProps({
|
|
17426
|
+
...unref(forwarded),
|
|
17427
|
+
onCloseAutoFocus: unref(closeAutoFocus)
|
|
17428
|
+
}, { reference: props.reference }), {
|
|
17429
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17430
|
+
_: 3
|
|
17431
|
+
}, 16, ["reference"]);
|
|
17432
|
+
};
|
|
17433
|
+
}
|
|
17434
|
+
});
|
|
17435
|
+
//#endregion
|
|
17436
|
+
//#region src/lib/anchored-overlay.ts
|
|
17437
|
+
function useAnchoredOverlay(props, open, emit, openAutoFocus) {
|
|
17438
|
+
const trigger = shallowRef(null);
|
|
17439
|
+
const triggerElement = computed(() => trigger.value?.$el?.nodeType === 1 ? trigger.value.$el : void 0);
|
|
17440
|
+
const retainedAnchor = shallowRef();
|
|
17441
|
+
const reference = computed(() => props.anchor ?? (open.value ? triggerElement.value ?? retainedAnchor.value : retainedAnchor.value ?? triggerElement.value));
|
|
17442
|
+
const visible = computed({
|
|
17443
|
+
get: () => !!open.value && !!(props.anchor || triggerElement.value),
|
|
17444
|
+
set: (value) => {
|
|
17445
|
+
open.value = value;
|
|
17446
|
+
}
|
|
17447
|
+
});
|
|
17448
|
+
watch(() => props.anchor, (anchor) => {
|
|
17449
|
+
if (anchor) retainedAnchor.value = anchor;
|
|
17450
|
+
}, {
|
|
17451
|
+
immediate: true,
|
|
17452
|
+
flush: "sync"
|
|
17453
|
+
});
|
|
17454
|
+
let previousFocus = null;
|
|
17455
|
+
let interactedOutside = false;
|
|
17456
|
+
function once(handler) {
|
|
17457
|
+
const handled = /* @__PURE__ */ new WeakSet();
|
|
17458
|
+
return (event) => {
|
|
17459
|
+
if (handled.has(event)) return;
|
|
17460
|
+
handled.add(event);
|
|
17461
|
+
handler(event);
|
|
17462
|
+
};
|
|
17463
|
+
}
|
|
17464
|
+
watch(visible, (active) => {
|
|
17465
|
+
if (!active) return;
|
|
17466
|
+
previousFocus = (props.anchor?.ownerDocument ?? triggerElement.value?.ownerDocument)?.activeElement;
|
|
17467
|
+
interactedOutside = false;
|
|
17468
|
+
}, {
|
|
17469
|
+
immediate: true,
|
|
17470
|
+
flush: "sync"
|
|
17471
|
+
});
|
|
17472
|
+
const onCloseAutoFocus = once((event) => {
|
|
17473
|
+
emit("closeAutoFocus", event);
|
|
17474
|
+
const cancelled = event.defaultPrevented;
|
|
17475
|
+
event.preventDefault();
|
|
17476
|
+
const panel = event.target;
|
|
17477
|
+
const target = triggerElement.value ?? previousFocus;
|
|
17478
|
+
const restore = !cancelled && !interactedOutside;
|
|
17479
|
+
nextTick(() => {
|
|
17480
|
+
const active = panel.ownerDocument.activeElement;
|
|
17481
|
+
if (restore && !visible.value && target?.isConnected && (active === panel.ownerDocument.body || panel.contains(active))) target.focus({ preventScroll: true });
|
|
17482
|
+
if (!visible.value) retainedAnchor.value = void 0;
|
|
17483
|
+
});
|
|
17484
|
+
});
|
|
17485
|
+
const onInteractOutside = once((event) => {
|
|
17486
|
+
if (!triggerElement.value && props.anchor?.contains(event.target)) event.preventDefault();
|
|
17487
|
+
emit("interactOutside", event);
|
|
17488
|
+
const original = event.detail.originalEvent;
|
|
17489
|
+
const rightClick = "button" in original && (original.button === 2 || original.button === 0 && original.ctrlKey);
|
|
17490
|
+
if (!event.defaultPrevented && (!props.modal || rightClick)) interactedOutside = true;
|
|
17491
|
+
});
|
|
17492
|
+
return {
|
|
17493
|
+
trigger,
|
|
17494
|
+
reference,
|
|
17495
|
+
visible,
|
|
17496
|
+
events: {
|
|
17497
|
+
...openAutoFocus ? { onOpenAutoFocus: once(openAutoFocus) } : {},
|
|
17498
|
+
onCloseAutoFocus,
|
|
17499
|
+
onInteractOutside,
|
|
17500
|
+
onPointerDownOutside: once((event) => emit("pointerDownOutside", event)),
|
|
17501
|
+
onFocusOutside: once((event) => emit("focusOutside", event)),
|
|
17502
|
+
onEscapeKeyDown: once((event) => emit("escapeKeyDown", event))
|
|
17503
|
+
}
|
|
17504
|
+
};
|
|
17505
|
+
}
|
|
17506
|
+
//#endregion
|
|
17244
17507
|
//#region src/components/popover/Popover.vue
|
|
17245
17508
|
var Popover_default = /* @__PURE__ */ defineComponent({
|
|
17246
17509
|
name: "HnPopover",
|
|
17510
|
+
inheritAttrs: false,
|
|
17247
17511
|
__name: "Popover",
|
|
17248
17512
|
props: /*@__PURE__*/ mergeModels({
|
|
17513
|
+
anchor: {},
|
|
17514
|
+
modal: {
|
|
17515
|
+
type: Boolean,
|
|
17516
|
+
default: true
|
|
17517
|
+
},
|
|
17249
17518
|
side: { default: "bottom" },
|
|
17250
17519
|
align: { default: "center" },
|
|
17251
17520
|
sideOffset: { default: 8 },
|
|
@@ -17258,10 +17527,19 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17258
17527
|
"open": { type: Boolean },
|
|
17259
17528
|
"openModifiers": {}
|
|
17260
17529
|
}),
|
|
17261
|
-
emits: [
|
|
17262
|
-
|
|
17530
|
+
emits: /*@__PURE__*/ mergeModels([
|
|
17531
|
+
"escapeKeyDown",
|
|
17532
|
+
"pointerDownOutside",
|
|
17533
|
+
"focusOutside",
|
|
17534
|
+
"interactOutside",
|
|
17535
|
+
"openAutoFocus",
|
|
17536
|
+
"closeAutoFocus"
|
|
17537
|
+
], ["update:open"]),
|
|
17538
|
+
setup(__props, { emit: __emit }) {
|
|
17263
17539
|
const props = __props;
|
|
17264
17540
|
const open = useModel(__props, "open");
|
|
17541
|
+
const emit = __emit;
|
|
17542
|
+
const { trigger, reference, visible, events } = useAnchoredOverlay(props, open, emit, (event) => emit("openAutoFocus", event));
|
|
17265
17543
|
const pressOrigin = computed(() => {
|
|
17266
17544
|
if (props.side === "left") return "right";
|
|
17267
17545
|
if (props.side === "right") return "left";
|
|
@@ -17271,23 +17549,30 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17271
17549
|
});
|
|
17272
17550
|
return (_ctx, _cache) => {
|
|
17273
17551
|
return openBlock(), createBlock(unref(PopoverRoot), {
|
|
17274
|
-
open:
|
|
17275
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) =>
|
|
17276
|
-
modal:
|
|
17552
|
+
open: unref(visible),
|
|
17553
|
+
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null),
|
|
17554
|
+
modal: props.modal
|
|
17277
17555
|
}, {
|
|
17278
|
-
default: withCtx(() => [
|
|
17556
|
+
default: withCtx(() => [_ctx.$slots.default ? (openBlock(), createBlock(unref(PopoverTrigger), {
|
|
17557
|
+
key: 0,
|
|
17558
|
+
ref_key: "trigger",
|
|
17559
|
+
ref: trigger,
|
|
17279
17560
|
"as-child": "",
|
|
17280
17561
|
style: normalizeStyle({ transformOrigin: pressOrigin.value })
|
|
17281
17562
|
}, {
|
|
17282
17563
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17283
17564
|
_: 3
|
|
17284
|
-
}, 8, ["style"]), createVNode(unref(PopoverPortal), null, {
|
|
17285
|
-
default: withCtx(() => [createVNode(
|
|
17565
|
+
}, 8, ["style"])) : createCommentVNode("", true), createVNode(unref(PopoverPortal), null, {
|
|
17566
|
+
default: withCtx(() => [createVNode(PopoverContent_default, mergeProps({
|
|
17567
|
+
..._ctx.$attrs,
|
|
17568
|
+
...unref(events)
|
|
17569
|
+
}, {
|
|
17570
|
+
reference: unref(reference),
|
|
17286
17571
|
"as-child": "",
|
|
17287
17572
|
side: props.side,
|
|
17288
17573
|
align: props.align,
|
|
17289
17574
|
"side-offset": props.sideOffset
|
|
17290
|
-
}, {
|
|
17575
|
+
}), {
|
|
17291
17576
|
default: withCtx(() => [createVNode(Card_default, {
|
|
17292
17577
|
padded: props.padded,
|
|
17293
17578
|
class: normalizeClass(unref(cn)("hn-anim-pop z-(--hn-z-overlay) max-w-sm shadow-md outline-none", props.class))
|
|
@@ -17296,7 +17581,8 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17296
17581
|
_: 3
|
|
17297
17582
|
}, 8, ["padded", "class"])]),
|
|
17298
17583
|
_: 3
|
|
17299
|
-
},
|
|
17584
|
+
}, 16, [
|
|
17585
|
+
"reference",
|
|
17300
17586
|
"side",
|
|
17301
17587
|
"align",
|
|
17302
17588
|
"side-offset"
|
|
@@ -17304,7 +17590,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17304
17590
|
_: 3
|
|
17305
17591
|
})]),
|
|
17306
17592
|
_: 3
|
|
17307
|
-
}, 8, ["open"]);
|
|
17593
|
+
}, 8, ["open", "modal"]);
|
|
17308
17594
|
};
|
|
17309
17595
|
}
|
|
17310
17596
|
});
|
|
@@ -17312,9 +17598,16 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17312
17598
|
//#region src/components/dropdown-menu/DropdownMenu.vue
|
|
17313
17599
|
var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
17314
17600
|
name: "HnDropdownMenu",
|
|
17601
|
+
inheritAttrs: false,
|
|
17315
17602
|
__name: "DropdownMenu",
|
|
17316
17603
|
props: /*@__PURE__*/ mergeModels({
|
|
17317
17604
|
label: {},
|
|
17605
|
+
anchor: {},
|
|
17606
|
+
modal: {
|
|
17607
|
+
type: Boolean,
|
|
17608
|
+
default: true
|
|
17609
|
+
},
|
|
17610
|
+
dir: {},
|
|
17318
17611
|
side: { default: "bottom" },
|
|
17319
17612
|
align: { default: "center" },
|
|
17320
17613
|
sideOffset: { default: 8 },
|
|
@@ -17323,10 +17616,16 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17323
17616
|
"open": { type: Boolean },
|
|
17324
17617
|
"openModifiers": {}
|
|
17325
17618
|
}),
|
|
17326
|
-
emits: [
|
|
17327
|
-
|
|
17619
|
+
emits: /*@__PURE__*/ mergeModels([
|
|
17620
|
+
"escapeKeyDown",
|
|
17621
|
+
"pointerDownOutside",
|
|
17622
|
+
"focusOutside",
|
|
17623
|
+
"interactOutside",
|
|
17624
|
+
"closeAutoFocus"
|
|
17625
|
+
], ["update:open"]),
|
|
17626
|
+
setup(__props, { emit: __emit }) {
|
|
17328
17627
|
const props = __props;
|
|
17329
|
-
const
|
|
17628
|
+
const { trigger, reference, visible, events } = useAnchoredOverlay(props, useModel(__props, "open"), __emit);
|
|
17330
17629
|
const pressOrigin = computed(() => {
|
|
17331
17630
|
if (props.side === "left") return "right";
|
|
17332
17631
|
if (props.side === "right") return "left";
|
|
@@ -17336,25 +17635,33 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17336
17635
|
});
|
|
17337
17636
|
return (_ctx, _cache) => {
|
|
17338
17637
|
return openBlock(), createBlock(unref(DropdownMenuRoot), {
|
|
17339
|
-
open:
|
|
17340
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) =>
|
|
17341
|
-
modal:
|
|
17638
|
+
open: unref(visible),
|
|
17639
|
+
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null),
|
|
17640
|
+
modal: props.modal,
|
|
17641
|
+
dir: props.dir
|
|
17342
17642
|
}, {
|
|
17343
|
-
default: withCtx(() => [
|
|
17643
|
+
default: withCtx(() => [_ctx.$slots.default ? (openBlock(), createBlock(unref(DropdownMenuTrigger), {
|
|
17644
|
+
key: 0,
|
|
17645
|
+
ref_key: "trigger",
|
|
17646
|
+
ref: trigger,
|
|
17344
17647
|
"as-child": "",
|
|
17345
17648
|
class: "group/hn-disclosure",
|
|
17346
17649
|
style: normalizeStyle({ transformOrigin: pressOrigin.value })
|
|
17347
17650
|
}, {
|
|
17348
17651
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17349
17652
|
_: 3
|
|
17350
|
-
}, 8, ["style"]), createVNode(unref(DropdownMenuPortal), null, {
|
|
17351
|
-
default: withCtx(() => [
|
|
17352
|
-
"as-child": "",
|
|
17653
|
+
}, 8, ["style"])) : createCommentVNode("", true), createVNode(unref(DropdownMenuPortal), null, {
|
|
17654
|
+
default: withCtx(() => [unref(reference) ? (openBlock(), createBlock(unref(DropdownMenuContent), mergeProps({ key: 0 }, {
|
|
17353
17655
|
"aria-label": props.label,
|
|
17656
|
+
..._ctx.$attrs,
|
|
17657
|
+
...unref(events)
|
|
17658
|
+
}, {
|
|
17659
|
+
reference: unref(reference),
|
|
17660
|
+
"as-child": "",
|
|
17354
17661
|
side: props.side,
|
|
17355
17662
|
align: props.align,
|
|
17356
17663
|
"side-offset": props.sideOffset
|
|
17357
|
-
}, {
|
|
17664
|
+
}), {
|
|
17358
17665
|
default: withCtx(() => [createVNode(Card_default, {
|
|
17359
17666
|
padded: false,
|
|
17360
17667
|
class: normalizeClass(unref(cn)("hn-anim-pop z-(--hn-z-overlay) flex min-w-40 flex-col gap-0.5 p-1 shadow-md outline-none", props.class))
|
|
@@ -17363,16 +17670,20 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17363
17670
|
_: 3
|
|
17364
17671
|
}, 8, ["class"])]),
|
|
17365
17672
|
_: 3
|
|
17366
|
-
},
|
|
17367
|
-
"
|
|
17673
|
+
}, 16, [
|
|
17674
|
+
"reference",
|
|
17368
17675
|
"side",
|
|
17369
17676
|
"align",
|
|
17370
17677
|
"side-offset"
|
|
17371
|
-
])]),
|
|
17678
|
+
])) : createCommentVNode("", true)]),
|
|
17372
17679
|
_: 3
|
|
17373
17680
|
})]),
|
|
17374
17681
|
_: 3
|
|
17375
|
-
}, 8, [
|
|
17682
|
+
}, 8, [
|
|
17683
|
+
"open",
|
|
17684
|
+
"modal",
|
|
17685
|
+
"dir"
|
|
17686
|
+
]);
|
|
17376
17687
|
};
|
|
17377
17688
|
}
|
|
17378
17689
|
});
|