@hina-ui/vue 1.3.0 → 1.3.1
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 +276 -54
- package/dist/index.js.map +1 -1
- package/dist/types/components/alert-dialog/AlertDialog.vue.d.ts +2 -2
- package/dist/types/components/alert-dialog/AlertDialog.vue.d.ts.map +1 -1
- package/dist/types/components/dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/types/components/dialog/ModalContent.vue.d.ts +21 -0
- package/dist/types/components/dialog/ModalContent.vue.d.ts.map +1 -0
- package/dist/types/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -1
- package/dist/types/components/file-upload/FileUpload.vue.d.ts +1 -1
- package/dist/types/components/file-upload/FileUpload.vue.d.ts.map +1 -1
- package/dist/types/components/image/Image.vue.d.ts +5 -2
- package/dist/types/components/image/Image.vue.d.ts.map +1 -1
- package/dist/types/components/image/composables/useImage.d.ts.map +1 -1
- package/dist/types/components/image/image.variants.d.ts +23 -1
- package/dist/types/components/image/image.variants.d.ts.map +1 -1
- package/dist/types/components/lightbox/composables/useLightboxMotion.d.ts.map +1 -1
- package/dist/types/components/lightbox/composables/useLightboxPose.d.ts.map +1 -1
- package/dist/types/components/lightbox/utils/clip.d.ts +16 -0
- package/dist/types/components/lightbox/utils/clip.d.ts.map +1 -0
- package/dist/types/components/lightbox/utils/pose.d.ts +2 -2
- package/dist/types/components/lightbox/utils/pose.d.ts.map +1 -1
- package/dist/types/components/popover/Popover.vue.d.ts.map +1 -1
- package/dist/types/components/scroll-area/composables/useLayerLock.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/anchored-overlay.d.ts +3 -7
- package/dist/types/lib/anchored-overlay.d.ts.map +1 -1
- package/dist/types/lib/dialog-focus.d.ts +2 -0
- package/dist/types/lib/dialog-focus.d.ts.map +1 -0
- package/dist/types/lib/overlay-portal.d.ts +6 -0
- package/dist/types/lib/overlay-portal.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/alert-dialog/AlertDialog.vue +7 -4
- package/src/components/dialog/Dialog.vue +7 -4
- package/src/components/dialog/ModalContent.vue +19 -0
- package/src/components/dropdown-menu/DropdownMenu.vue +1 -1
- package/src/components/image/Image.vue +9 -12
- package/src/components/image/composables/useImage.ts +6 -3
- package/src/components/image/image.variants.ts +13 -1
- package/src/components/lightbox/composables/useLightboxMotion.ts +3 -1
- package/src/components/lightbox/composables/useLightboxPose.ts +5 -2
- package/src/components/lightbox/utils/clip.ts +117 -0
- package/src/components/lightbox/utils/pose.ts +23 -13
- package/src/components/popover/Popover.vue +6 -2
- package/src/components/scroll-area/composables/useLayerLock.ts +8 -9
- package/src/components/scroll-area/composables/useWheelRedirect.ts +1 -1
- package/src/components/skeleton/LICENSE +24 -0
- package/src/index.ts +2 -0
- package/src/lib/anchored-overlay.ts +2 -5
- package/src/lib/dialog-focus.ts +13 -0
- package/src/lib/overlay-portal.ts +8 -0
- package/src/styles/interaction.css +26 -3
- package/src/styles/motion.css +14 -2
- package/src/styles/semantic.css +5 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { clsx } from "clsx";
|
|
|
2
2
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
3
|
import { createTV } from "tailwind-variants";
|
|
4
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";
|
|
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, injectDialogRootContext, injectListboxItemContext, injectPopoverRootContext, injectTabsRootContext, injectTooltipProviderContext, useBodyScrollLock, useDirection, useForwardExpose, 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";
|
|
@@ -2116,7 +2116,7 @@ function useEdgeShadow(viewport, opts) {
|
|
|
2116
2116
|
//#region src/components/scroll-area/composables/useWheelRedirect.ts
|
|
2117
2117
|
function useWheelRedirect(viewport, enabled) {
|
|
2118
2118
|
function onWheel(event) {
|
|
2119
|
-
if (!enabled()) return;
|
|
2119
|
+
if (event.defaultPrevented || !enabled()) return;
|
|
2120
2120
|
const el = viewport.value;
|
|
2121
2121
|
if (!el) return;
|
|
2122
2122
|
if (Math.abs(event.deltaY) <= Math.abs(event.deltaX)) return;
|
|
@@ -2150,9 +2150,6 @@ var useBodyPointerLock = createSharedComposable(() => {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
return locked;
|
|
2152
2152
|
});
|
|
2153
|
-
function block(event) {
|
|
2154
|
-
event.preventDefault();
|
|
2155
|
-
}
|
|
2156
2153
|
function useLayerLock(viewport) {
|
|
2157
2154
|
const locked = useBodyPointerLock();
|
|
2158
2155
|
let release;
|
|
@@ -2160,12 +2157,21 @@ function useLayerLock(viewport) {
|
|
|
2160
2157
|
release?.();
|
|
2161
2158
|
release = void 0;
|
|
2162
2159
|
const el = viewport.value;
|
|
2163
|
-
if (!el || !locked.value
|
|
2164
|
-
|
|
2165
|
-
|
|
2160
|
+
if (!el || !locked.value) return;
|
|
2161
|
+
const block = (event) => {
|
|
2162
|
+
if (getComputedStyle(el).pointerEvents === "none") event.preventDefault();
|
|
2163
|
+
};
|
|
2164
|
+
el.addEventListener("wheel", block, {
|
|
2165
|
+
passive: false,
|
|
2166
|
+
capture: true
|
|
2167
|
+
});
|
|
2168
|
+
el.addEventListener("touchmove", block, {
|
|
2169
|
+
passive: false,
|
|
2170
|
+
capture: true
|
|
2171
|
+
});
|
|
2166
2172
|
release = () => {
|
|
2167
|
-
el.removeEventListener("wheel", block);
|
|
2168
|
-
el.removeEventListener("touchmove", block);
|
|
2173
|
+
el.removeEventListener("wheel", block, true);
|
|
2174
|
+
el.removeEventListener("touchmove", block, true);
|
|
2169
2175
|
};
|
|
2170
2176
|
}
|
|
2171
2177
|
watch([locked, viewport], apply, { flush: "post" });
|
|
@@ -2765,7 +2771,7 @@ var REST_POSE = {
|
|
|
2765
2771
|
y: 0,
|
|
2766
2772
|
scale: 1,
|
|
2767
2773
|
rotate: 0,
|
|
2768
|
-
clipPath: "inset(0px 0px 0px 0px round 0px)"
|
|
2774
|
+
clipPath: "inset(0px 0px 0px 0px round 0px 0px 0px 0px / 0px 0px 0px 0px)"
|
|
2769
2775
|
};
|
|
2770
2776
|
var TRAVEL_SPRING = {
|
|
2771
2777
|
type: "spring",
|
|
@@ -2816,22 +2822,41 @@ function intersect(a, b) {
|
|
|
2816
2822
|
height: Math.max(0, bottom - y)
|
|
2817
2823
|
};
|
|
2818
2824
|
}
|
|
2819
|
-
function openPose(frame, box, natural, fit, radius = 0) {
|
|
2825
|
+
function openPose(frame, box, natural, fit, radius = 0, clipBox = box) {
|
|
2820
2826
|
const rendered = renderedRect(box, natural, fit);
|
|
2821
2827
|
if (frame.width <= 0 || frame.height <= 0 || rendered.width <= 0) return REST_POSE;
|
|
2822
2828
|
const scale = rendered.width / frame.width;
|
|
2823
|
-
const visible = intersect(box, rendered);
|
|
2829
|
+
const visible = intersect(intersect(box, clipBox), rendered);
|
|
2824
2830
|
const top = (visible.y - rendered.y) / scale;
|
|
2825
2831
|
const left = (visible.x - rendered.x) / scale;
|
|
2826
2832
|
const right = (rendered.x + rendered.width - visible.x - visible.width) / scale;
|
|
2827
2833
|
const bottom = (rendered.y + rendered.height - visible.y - visible.height) / scale;
|
|
2828
|
-
const
|
|
2834
|
+
const corners = typeof radius === "number" ? Array.from({ length: 4 }, () => ({
|
|
2835
|
+
x: radius,
|
|
2836
|
+
y: radius
|
|
2837
|
+
})) : radius;
|
|
2838
|
+
const leftEdge = Math.abs(visible.x - clipBox.x) <= .5;
|
|
2839
|
+
const topEdge = Math.abs(visible.y - clipBox.y) <= .5;
|
|
2840
|
+
const rightEdge = Math.abs(visible.x + visible.width - clipBox.x - clipBox.width) <= .5;
|
|
2841
|
+
const bottomEdge = Math.abs(visible.y + visible.height - clipBox.y - clipBox.height) <= .5;
|
|
2842
|
+
const touches = [
|
|
2843
|
+
leftEdge && topEdge,
|
|
2844
|
+
rightEdge && topEdge,
|
|
2845
|
+
rightEdge && bottomEdge,
|
|
2846
|
+
leftEdge && bottomEdge
|
|
2847
|
+
];
|
|
2848
|
+
const clipped = corners.map((corner, index) => touches[index] ? corner : {
|
|
2849
|
+
x: 0,
|
|
2850
|
+
y: 0
|
|
2851
|
+
});
|
|
2852
|
+
const horizontal = clipped.map((corner) => px(Math.max(0, corner.x) / scale)).join(" ");
|
|
2853
|
+
const vertical = clipped.map((corner) => px(Math.max(0, corner.y) / scale)).join(" ");
|
|
2829
2854
|
return {
|
|
2830
2855
|
x: rendered.x + rendered.width / 2 - (frame.x + frame.width / 2),
|
|
2831
2856
|
y: rendered.y + rendered.height / 2 - (frame.y + frame.height / 2),
|
|
2832
2857
|
scale,
|
|
2833
2858
|
rotate: 0,
|
|
2834
|
-
clipPath: `inset(${px(top)} ${px(right)} ${px(bottom)} ${px(left)} round ${
|
|
2859
|
+
clipPath: `inset(${px(top)} ${px(right)} ${px(bottom)} ${px(left)} round ${horizontal} / ${vertical})`
|
|
2835
2860
|
};
|
|
2836
2861
|
}
|
|
2837
2862
|
function baseScale(frame, stage, rotation) {
|
|
@@ -2840,13 +2865,6 @@ function baseScale(frame, stage, rotation) {
|
|
|
2840
2865
|
if (rotation % 180 === 0) return 1;
|
|
2841
2866
|
return Math.min(stage.width / visual.width, stage.height / visual.height);
|
|
2842
2867
|
}
|
|
2843
|
-
function radiusOf(el) {
|
|
2844
|
-
for (let node = el, depth = 0; node && depth < 2; node = node.parentElement, depth += 1) {
|
|
2845
|
-
const value = Number.parseFloat(getComputedStyle(node).borderTopLeftRadius);
|
|
2846
|
-
if (value > 0) return value;
|
|
2847
|
-
}
|
|
2848
|
-
return 0;
|
|
2849
|
-
}
|
|
2850
2868
|
function dismissProgress(offsetY, stageHeight) {
|
|
2851
2869
|
if (stageHeight <= 0) return 0;
|
|
2852
2870
|
return Math.min(1, Math.max(0, offsetY) / (stageHeight * DISMISS_TRAVEL));
|
|
@@ -2931,7 +2949,7 @@ function useLightboxMotion(stageHeight, restScale) {
|
|
|
2931
2949
|
function leave(to) {
|
|
2932
2950
|
stop();
|
|
2933
2951
|
const t = to ? timing(RETURN_SPRING) : transition("exit");
|
|
2934
|
-
return settle([...to ? poseTo(to, t) : [animate(scale, FADE_POSE.scale, t), animate(opacity, 0, t)], animate(presence, 0, t)]);
|
|
2952
|
+
return settle([...to ? poseTo(to, t) : [animate(scale, Math.min(scale.get(), FADE_POSE.scale), t), animate(opacity, 0, t)], animate(presence, 0, t)]);
|
|
2935
2953
|
}
|
|
2936
2954
|
function dismissMove(offsetY) {
|
|
2937
2955
|
y.set(offsetY < 0 ? rubberBand(offsetY, 0, Infinity, stageHeight()) : offsetY);
|
|
@@ -3577,6 +3595,131 @@ function useLightboxLarge(item, active) {
|
|
|
3577
3595
|
};
|
|
3578
3596
|
}
|
|
3579
3597
|
//#endregion
|
|
3598
|
+
//#region src/components/lightbox/utils/clip.ts
|
|
3599
|
+
function emptyCorners() {
|
|
3600
|
+
return [
|
|
3601
|
+
{
|
|
3602
|
+
x: 0,
|
|
3603
|
+
y: 0
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
x: 0,
|
|
3607
|
+
y: 0
|
|
3608
|
+
},
|
|
3609
|
+
{
|
|
3610
|
+
x: 0,
|
|
3611
|
+
y: 0
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
x: 0,
|
|
3615
|
+
y: 0
|
|
3616
|
+
}
|
|
3617
|
+
];
|
|
3618
|
+
}
|
|
3619
|
+
function length(value, size) {
|
|
3620
|
+
const number = Number.parseFloat(value) || 0;
|
|
3621
|
+
return value.endsWith("%") ? number * size / 100 : number;
|
|
3622
|
+
}
|
|
3623
|
+
function cornersOf(style, width, height) {
|
|
3624
|
+
const corners = [
|
|
3625
|
+
style.borderTopLeftRadius,
|
|
3626
|
+
style.borderTopRightRadius,
|
|
3627
|
+
style.borderBottomRightRadius,
|
|
3628
|
+
style.borderBottomLeftRadius
|
|
3629
|
+
].map((value) => {
|
|
3630
|
+
const [x = "0", y = x] = value.split(/\s+/);
|
|
3631
|
+
return {
|
|
3632
|
+
x: length(x, width),
|
|
3633
|
+
y: length(y, height)
|
|
3634
|
+
};
|
|
3635
|
+
});
|
|
3636
|
+
const [tl, tr, br, bl] = corners;
|
|
3637
|
+
const factor = Math.min(1, width / (tl.x + tr.x || 1), width / (bl.x + br.x || 1), height / (tl.y + bl.y || 1), height / (tr.y + br.y || 1));
|
|
3638
|
+
return corners.map((corner) => ({
|
|
3639
|
+
x: corner.x * factor,
|
|
3640
|
+
y: corner.y * factor
|
|
3641
|
+
}));
|
|
3642
|
+
}
|
|
3643
|
+
function paddingBox(node, style) {
|
|
3644
|
+
const box = node.getBoundingClientRect();
|
|
3645
|
+
const width = node instanceof HTMLElement ? node.offsetWidth : box.width;
|
|
3646
|
+
const height = node instanceof HTMLElement ? node.offsetHeight : box.height;
|
|
3647
|
+
const sx = width ? box.width / width : 1;
|
|
3648
|
+
const sy = height ? box.height / height : 1;
|
|
3649
|
+
const left = Number.parseFloat(style.borderLeftWidth) || 0;
|
|
3650
|
+
const right = Number.parseFloat(style.borderRightWidth) || 0;
|
|
3651
|
+
const top = Number.parseFloat(style.borderTopWidth) || 0;
|
|
3652
|
+
const bottom = Number.parseFloat(style.borderBottomWidth) || 0;
|
|
3653
|
+
const corners = cornersOf(style, width, height);
|
|
3654
|
+
const borders = [
|
|
3655
|
+
[left, top],
|
|
3656
|
+
[right, top],
|
|
3657
|
+
[right, bottom],
|
|
3658
|
+
[left, bottom]
|
|
3659
|
+
];
|
|
3660
|
+
return {
|
|
3661
|
+
rect: {
|
|
3662
|
+
x: box.x + left * sx,
|
|
3663
|
+
y: box.y + top * sy,
|
|
3664
|
+
width: Math.max(0, box.width - (left + right) * sx),
|
|
3665
|
+
height: Math.max(0, box.height - (top + bottom) * sy)
|
|
3666
|
+
},
|
|
3667
|
+
corners: corners.map((corner, index) => ({
|
|
3668
|
+
x: Math.max(0, corner.x - borders[index][0]) * sx,
|
|
3669
|
+
y: Math.max(0, corner.y - borders[index][1]) * sy
|
|
3670
|
+
}))
|
|
3671
|
+
};
|
|
3672
|
+
}
|
|
3673
|
+
function points(rect) {
|
|
3674
|
+
return [
|
|
3675
|
+
[rect.x, rect.y],
|
|
3676
|
+
[rect.x + rect.width, rect.y],
|
|
3677
|
+
[rect.x + rect.width, rect.y + rect.height],
|
|
3678
|
+
[rect.x, rect.y + rect.height]
|
|
3679
|
+
];
|
|
3680
|
+
}
|
|
3681
|
+
function clipOf(el, box) {
|
|
3682
|
+
let rect = {
|
|
3683
|
+
x: box.x,
|
|
3684
|
+
y: box.y,
|
|
3685
|
+
width: box.width,
|
|
3686
|
+
height: box.height
|
|
3687
|
+
};
|
|
3688
|
+
const clips = [];
|
|
3689
|
+
for (let node = el; node; node = node.parentElement) {
|
|
3690
|
+
const style = getComputedStyle(node);
|
|
3691
|
+
const clipX = node === el || /^(hidden|clip|scroll|auto)$/.test(style.overflowX);
|
|
3692
|
+
const clipY = node === el || /^(hidden|clip|scroll|auto)$/.test(style.overflowY);
|
|
3693
|
+
if (!clipX && !clipY) continue;
|
|
3694
|
+
const clip = paddingBox(node, style);
|
|
3695
|
+
const x = clipX ? Math.max(rect.x, clip.rect.x) : rect.x;
|
|
3696
|
+
const y = clipY ? Math.max(rect.y, clip.rect.y) : rect.y;
|
|
3697
|
+
const right = clipX ? Math.min(rect.x + rect.width, clip.rect.x + clip.rect.width) : rect.x + rect.width;
|
|
3698
|
+
const bottom = clipY ? Math.min(rect.y + rect.height, clip.rect.y + clip.rect.height) : rect.y + rect.height;
|
|
3699
|
+
rect = {
|
|
3700
|
+
x,
|
|
3701
|
+
y,
|
|
3702
|
+
width: Math.max(0, right - x),
|
|
3703
|
+
height: Math.max(0, bottom - y)
|
|
3704
|
+
};
|
|
3705
|
+
if (clipX && clipY) clips.push(clip);
|
|
3706
|
+
}
|
|
3707
|
+
const corners = emptyCorners();
|
|
3708
|
+
const visible = points(rect);
|
|
3709
|
+
for (const clip of clips) {
|
|
3710
|
+
const edges = points(clip.rect);
|
|
3711
|
+
for (let index = 0; index < 4; index += 1) {
|
|
3712
|
+
if (visible[index].some((value, axis) => Math.abs(value - edges[index][axis]) > .5)) continue;
|
|
3713
|
+
corners[index].x = Math.max(corners[index].x, clip.corners[index].x);
|
|
3714
|
+
corners[index].y = Math.max(corners[index].y, clip.corners[index].y);
|
|
3715
|
+
}
|
|
3716
|
+
}
|
|
3717
|
+
return {
|
|
3718
|
+
rect,
|
|
3719
|
+
corners
|
|
3720
|
+
};
|
|
3721
|
+
}
|
|
3722
|
+
//#endregion
|
|
3580
3723
|
//#region src/components/lightbox/composables/useLightboxPose.ts
|
|
3581
3724
|
function useLightboxPose(frames, current) {
|
|
3582
3725
|
function sourceBox() {
|
|
@@ -3598,7 +3741,9 @@ function useLightboxPose(frames, current) {
|
|
|
3598
3741
|
const box = sourceBox();
|
|
3599
3742
|
const natural = frames.naturalOf(item);
|
|
3600
3743
|
if (!box || !natural) return null;
|
|
3601
|
-
|
|
3744
|
+
const clip = clipOf(item?.source?.(), box);
|
|
3745
|
+
if (clip.rect.width <= 0 || clip.rect.height <= 0) return null;
|
|
3746
|
+
return openPose(frames.frameOf(item), box, natural, item?.fit, clip.corners, clip.rect);
|
|
3602
3747
|
}
|
|
3603
3748
|
return { fromSource };
|
|
3604
3749
|
}
|
|
@@ -4010,15 +4155,22 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
|
|
|
4010
4155
|
});
|
|
4011
4156
|
//#endregion
|
|
4012
4157
|
//#region src/components/image/image.variants.ts
|
|
4158
|
+
var imageRoot = tv({
|
|
4159
|
+
base: "relative block w-full overflow-hidden",
|
|
4160
|
+
variants: { preview: { true: "hn-focus-ring cursor-zoom-in" } }
|
|
4161
|
+
});
|
|
4013
4162
|
var image = tv({
|
|
4014
|
-
base: "block size-full",
|
|
4015
|
-
variants: {
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4163
|
+
base: "relative z-10 block size-full",
|
|
4164
|
+
variants: {
|
|
4165
|
+
lazy: { true: "transition-opacity duration-(--hn-duration-base) ease-enter motion-reduce:transition-none" },
|
|
4166
|
+
fit: {
|
|
4167
|
+
cover: "object-cover",
|
|
4168
|
+
contain: "object-contain",
|
|
4169
|
+
fill: "object-fill",
|
|
4170
|
+
none: "object-none",
|
|
4171
|
+
"scale-down": "object-scale-down"
|
|
4172
|
+
}
|
|
4173
|
+
},
|
|
4022
4174
|
defaultVariants: { fit: "cover" }
|
|
4023
4175
|
});
|
|
4024
4176
|
//#endregion
|
|
@@ -4079,7 +4231,7 @@ function useImage(props, emit) {
|
|
|
4079
4231
|
const style = getComputedStyle(el);
|
|
4080
4232
|
try {
|
|
4081
4233
|
return el.animate(frames, {
|
|
4082
|
-
duration: Number.parseFloat(style.getPropertyValue("--hn-duration-
|
|
4234
|
+
duration: Number.parseFloat(style.getPropertyValue("--hn-duration-fast")) || 0,
|
|
4083
4235
|
easing: style.getPropertyValue("--hn-ease-enter").trim() || "linear",
|
|
4084
4236
|
fill: "forwards"
|
|
4085
4237
|
});
|
|
@@ -4091,13 +4243,17 @@ function useImage(props, emit) {
|
|
|
4091
4243
|
return new Promise((res) => requestAnimationFrame(() => requestAnimationFrame(() => res())));
|
|
4092
4244
|
}
|
|
4093
4245
|
async function reveal() {
|
|
4094
|
-
revealed.value = true;
|
|
4095
4246
|
if (!props.lazy) {
|
|
4247
|
+
revealed.value = true;
|
|
4096
4248
|
skeletonMounted.value = false;
|
|
4097
4249
|
return;
|
|
4098
4250
|
}
|
|
4251
|
+
const img = imageEl.value;
|
|
4252
|
+
const at = src.value;
|
|
4099
4253
|
await nextTick();
|
|
4100
4254
|
await afterPaint();
|
|
4255
|
+
if (imageEl.value !== img || src.value !== at) return;
|
|
4256
|
+
revealed.value = true;
|
|
4101
4257
|
const layer = skeletonEl.value;
|
|
4102
4258
|
const anim = layer && play(layer, [{ opacity: 1 }, { opacity: 0 }]);
|
|
4103
4259
|
if (!anim) {
|
|
@@ -4197,7 +4353,21 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
4197
4353
|
},
|
|
4198
4354
|
draggable: { type: Boolean },
|
|
4199
4355
|
class: {},
|
|
4200
|
-
|
|
4356
|
+
style: { type: [
|
|
4357
|
+
Boolean,
|
|
4358
|
+
null,
|
|
4359
|
+
String,
|
|
4360
|
+
Object,
|
|
4361
|
+
Array
|
|
4362
|
+
] },
|
|
4363
|
+
imageClass: {},
|
|
4364
|
+
imageStyle: { type: [
|
|
4365
|
+
Boolean,
|
|
4366
|
+
null,
|
|
4367
|
+
String,
|
|
4368
|
+
Object,
|
|
4369
|
+
Array
|
|
4370
|
+
] }
|
|
4201
4371
|
},
|
|
4202
4372
|
emits: ["load", "error"],
|
|
4203
4373
|
setup(__props, { emit: __emit }) {
|
|
@@ -4233,8 +4403,8 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
4233
4403
|
ref: rootEl,
|
|
4234
4404
|
as: props.preview ? "button" : "span",
|
|
4235
4405
|
type: props.preview ? "button" : void 0,
|
|
4236
|
-
class: normalizeClass(unref(cn)(
|
|
4237
|
-
style: normalizeStyle(props.ratio ? { aspectRatio: String(props.ratio) } : void 0),
|
|
4406
|
+
class: normalizeClass(unref(cn)(unref(imageRoot)({ preview: !!props.preview }), props.class)),
|
|
4407
|
+
style: normalizeStyle([props.ratio ? { aspectRatio: String(props.ratio) } : void 0, props.style]),
|
|
4238
4408
|
onClick: openPreview
|
|
4239
4409
|
}, {
|
|
4240
4410
|
default: withCtx(() => [
|
|
@@ -4243,12 +4413,16 @@ var Image_default = /* @__PURE__ */ defineComponent({
|
|
|
4243
4413
|
ref_key: "imageEl",
|
|
4244
4414
|
ref: imageEl
|
|
4245
4415
|
}, _ctx.$attrs, {
|
|
4416
|
+
style: props.imageStyle,
|
|
4246
4417
|
src: unref(src),
|
|
4247
4418
|
alt: props.alt,
|
|
4248
4419
|
decoding: props.eager ? "sync" : "async",
|
|
4249
4420
|
fetchpriority: props.eager ? "high" : void 0,
|
|
4250
4421
|
draggable: props.draggable,
|
|
4251
|
-
class: unref(cn)(unref(image)({
|
|
4422
|
+
class: unref(cn)(unref(image)({
|
|
4423
|
+
fit: props.fit,
|
|
4424
|
+
lazy: props.lazy
|
|
4425
|
+
}), props.lazy && !unref(revealed) && "opacity-0", props.imageClass)
|
|
4252
4426
|
}), 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),
|
|
4253
4427
|
unref(showSkeleton) ? (openBlock(), createElementBlock("span", {
|
|
4254
4428
|
key: 3,
|
|
@@ -12068,6 +12242,46 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
12068
12242
|
}
|
|
12069
12243
|
});
|
|
12070
12244
|
//#endregion
|
|
12245
|
+
//#region src/lib/overlay-portal.ts
|
|
12246
|
+
function useOverlayPortal(open) {
|
|
12247
|
+
const content = shallowRef(null);
|
|
12248
|
+
return {
|
|
12249
|
+
content,
|
|
12250
|
+
present: computed(() => !!open.value || !!content.value)
|
|
12251
|
+
};
|
|
12252
|
+
}
|
|
12253
|
+
//#endregion
|
|
12254
|
+
//#region src/lib/dialog-focus.ts
|
|
12255
|
+
function useDialogCloseFocus(onCloseAutoFocus) {
|
|
12256
|
+
const context = injectDialogRootContext();
|
|
12257
|
+
return (event) => {
|
|
12258
|
+
onCloseAutoFocus(event);
|
|
12259
|
+
if (event.defaultPrevented) return;
|
|
12260
|
+
event.preventDefault();
|
|
12261
|
+
const target = context.triggerElement.value;
|
|
12262
|
+
if (target?.isConnected) target.focus({ preventScroll: true });
|
|
12263
|
+
};
|
|
12264
|
+
}
|
|
12265
|
+
//#endregion
|
|
12266
|
+
//#region src/components/dialog/ModalContent.vue
|
|
12267
|
+
var ModalContent_default = /* @__PURE__ */ defineComponent({
|
|
12268
|
+
name: "HnModalContent",
|
|
12269
|
+
__name: "ModalContent",
|
|
12270
|
+
props: { alert: { type: Boolean } },
|
|
12271
|
+
emits: ["closeAutoFocus"],
|
|
12272
|
+
setup(__props, { emit: __emit }) {
|
|
12273
|
+
const props = __props;
|
|
12274
|
+
const emit = __emit;
|
|
12275
|
+
const closeAutoFocus = useDialogCloseFocus((event) => emit("closeAutoFocus", event));
|
|
12276
|
+
return (_ctx, _cache) => {
|
|
12277
|
+
return openBlock(), createBlock(resolveDynamicComponent(props.alert ? unref(AlertDialogContent) : unref(DialogContent)), { onCloseAutoFocus: unref(closeAutoFocus) }, {
|
|
12278
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
12279
|
+
_: 3
|
|
12280
|
+
}, 40, ["onCloseAutoFocus"]);
|
|
12281
|
+
};
|
|
12282
|
+
}
|
|
12283
|
+
});
|
|
12284
|
+
//#endregion
|
|
12071
12285
|
//#region src/components/dialog/dialog.variants.ts
|
|
12072
12286
|
var dialogWrapper = tv({
|
|
12073
12287
|
base: "pointer-events-none fixed inset-0 z-(--hn-z-overlay) grid",
|
|
@@ -12261,6 +12475,7 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12261
12475
|
const props = __props;
|
|
12262
12476
|
const emit = __emit;
|
|
12263
12477
|
const open = useModel(__props, "open");
|
|
12478
|
+
const { content, present } = useOverlayPortal(open);
|
|
12264
12479
|
const t = useUiLocale();
|
|
12265
12480
|
const remaining = useConfirmDelay(open, () => props.confirmDelay);
|
|
12266
12481
|
const { busy, guard, confirm } = useAlertDialogConfirm(props, open, (error) => emit("error", error), () => remaining.value > 0);
|
|
@@ -12275,12 +12490,15 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12275
12490
|
}, {
|
|
12276
12491
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
12277
12492
|
_: 3
|
|
12278
|
-
})) : createCommentVNode("", true),
|
|
12279
|
-
default: withCtx(() => [createVNode(unref(AlertDialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(dialogWrapper)({ placement: props.placement ?? "auto" })) }, [createVNode(
|
|
12493
|
+
})) : createCommentVNode("", true), unref(present) ? (openBlock(), createBlock(unref(AlertDialogPortal), { key: 1 }, {
|
|
12494
|
+
default: withCtx(() => [createVNode(unref(AlertDialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(dialogWrapper)({ placement: props.placement ?? "auto" })) }, [createVNode(ModalContent_default, {
|
|
12495
|
+
alert: "",
|
|
12280
12496
|
"as-child": "",
|
|
12281
12497
|
onEscapeKeyDown: unref(guard)
|
|
12282
12498
|
}, {
|
|
12283
12499
|
default: withCtx(() => [createVNode(Card_default, {
|
|
12500
|
+
ref_key: "content",
|
|
12501
|
+
ref: content,
|
|
12284
12502
|
padded: false,
|
|
12285
12503
|
"data-hn-alert-dialog": "",
|
|
12286
12504
|
"aria-busy": unref(busy) || void 0,
|
|
@@ -12347,7 +12565,7 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12347
12565
|
_: 3
|
|
12348
12566
|
}, 8, ["onEscapeKeyDown"])], 2)]),
|
|
12349
12567
|
_: 3
|
|
12350
|
-
})]),
|
|
12568
|
+
})) : createCommentVNode("", true)]),
|
|
12351
12569
|
_: 3
|
|
12352
12570
|
}, 8, ["open"]);
|
|
12353
12571
|
};
|
|
@@ -17435,8 +17653,7 @@ var PopoverContent_default = /* @__PURE__ */ defineComponent({
|
|
|
17435
17653
|
//#endregion
|
|
17436
17654
|
//#region src/lib/anchored-overlay.ts
|
|
17437
17655
|
function useAnchoredOverlay(props, open, emit, openAutoFocus) {
|
|
17438
|
-
const trigger =
|
|
17439
|
-
const triggerElement = computed(() => trigger.value?.$el?.nodeType === 1 ? trigger.value.$el : void 0);
|
|
17656
|
+
const { forwardRef: trigger, currentElement: triggerElement } = useForwardExpose();
|
|
17440
17657
|
const retainedAnchor = shallowRef();
|
|
17441
17658
|
const reference = computed(() => props.anchor ?? (open.value ? triggerElement.value ?? retainedAnchor.value : retainedAnchor.value ?? triggerElement.value));
|
|
17442
17659
|
const visible = computed({
|
|
@@ -17540,6 +17757,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17540
17757
|
const open = useModel(__props, "open");
|
|
17541
17758
|
const emit = __emit;
|
|
17542
17759
|
const { trigger, reference, visible, events } = useAnchoredOverlay(props, open, emit, (event) => emit("openAutoFocus", event));
|
|
17760
|
+
const { content, present } = useOverlayPortal(visible);
|
|
17543
17761
|
const pressOrigin = computed(() => {
|
|
17544
17762
|
if (props.side === "left") return "right";
|
|
17545
17763
|
if (props.side === "right") return "left";
|
|
@@ -17555,14 +17773,13 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17555
17773
|
}, {
|
|
17556
17774
|
default: withCtx(() => [_ctx.$slots.default ? (openBlock(), createBlock(unref(PopoverTrigger), {
|
|
17557
17775
|
key: 0,
|
|
17558
|
-
|
|
17559
|
-
ref: trigger,
|
|
17776
|
+
ref: unref(trigger),
|
|
17560
17777
|
"as-child": "",
|
|
17561
17778
|
style: normalizeStyle({ transformOrigin: pressOrigin.value })
|
|
17562
17779
|
}, {
|
|
17563
17780
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17564
17781
|
_: 3
|
|
17565
|
-
}, 8, ["style"])) : createCommentVNode("", true),
|
|
17782
|
+
}, 8, ["style"])) : createCommentVNode("", true), unref(present) ? (openBlock(), createBlock(unref(PopoverPortal), { key: 1 }, {
|
|
17566
17783
|
default: withCtx(() => [createVNode(PopoverContent_default, mergeProps({
|
|
17567
17784
|
..._ctx.$attrs,
|
|
17568
17785
|
...unref(events)
|
|
@@ -17574,6 +17791,8 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17574
17791
|
"side-offset": props.sideOffset
|
|
17575
17792
|
}), {
|
|
17576
17793
|
default: withCtx(() => [createVNode(Card_default, {
|
|
17794
|
+
ref_key: "content",
|
|
17795
|
+
ref: content,
|
|
17577
17796
|
padded: props.padded,
|
|
17578
17797
|
class: normalizeClass(unref(cn)("hn-anim-pop z-(--hn-z-overlay) max-w-sm shadow-md outline-none", props.class))
|
|
17579
17798
|
}, {
|
|
@@ -17588,7 +17807,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17588
17807
|
"side-offset"
|
|
17589
17808
|
])]),
|
|
17590
17809
|
_: 3
|
|
17591
|
-
})]),
|
|
17810
|
+
})) : createCommentVNode("", true)]),
|
|
17592
17811
|
_: 3
|
|
17593
17812
|
}, 8, ["open", "modal"]);
|
|
17594
17813
|
};
|
|
@@ -17642,8 +17861,7 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17642
17861
|
}, {
|
|
17643
17862
|
default: withCtx(() => [_ctx.$slots.default ? (openBlock(), createBlock(unref(DropdownMenuTrigger), {
|
|
17644
17863
|
key: 0,
|
|
17645
|
-
|
|
17646
|
-
ref: trigger,
|
|
17864
|
+
ref: unref(trigger),
|
|
17647
17865
|
"as-child": "",
|
|
17648
17866
|
class: "group/hn-disclosure",
|
|
17649
17867
|
style: normalizeStyle({ transformOrigin: pressOrigin.value })
|
|
@@ -18001,6 +18219,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
18001
18219
|
if (props.locked) e.preventDefault();
|
|
18002
18220
|
}
|
|
18003
18221
|
const open = useModel(__props, "open");
|
|
18222
|
+
const { content, present } = useOverlayPortal(open);
|
|
18004
18223
|
function close() {
|
|
18005
18224
|
open.value = false;
|
|
18006
18225
|
}
|
|
@@ -18015,13 +18234,16 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
18015
18234
|
}, {
|
|
18016
18235
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
18017
18236
|
_: 3
|
|
18018
|
-
})) : createCommentVNode("", true),
|
|
18019
|
-
default: withCtx(() => [createVNode(unref(DialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(dialogWrapper)({ placement: props.placement ?? "auto" })) }, [createVNode(
|
|
18237
|
+
})) : createCommentVNode("", true), unref(present) ? (openBlock(), createBlock(unref(DialogPortal), { key: 1 }, {
|
|
18238
|
+
default: withCtx(() => [createVNode(unref(DialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(dialogWrapper)({ placement: props.placement ?? "auto" })) }, [createVNode(ModalContent_default, {
|
|
18020
18239
|
"as-child": "",
|
|
18021
18240
|
onEscapeKeyDown: guard,
|
|
18022
18241
|
onInteractOutside: guard
|
|
18023
18242
|
}, {
|
|
18024
|
-
default: withCtx(() => [createVNode(Card_default, mergeProps(
|
|
18243
|
+
default: withCtx(() => [createVNode(Card_default, mergeProps({
|
|
18244
|
+
ref_key: "content",
|
|
18245
|
+
ref: content
|
|
18246
|
+
}, props.description ? {} : { "aria-describedby": void 0 }, {
|
|
18025
18247
|
padded: false,
|
|
18026
18248
|
class: unref(cn)(unref(dialogCard)({
|
|
18027
18249
|
placement: props.placement ?? "auto",
|
|
@@ -18089,7 +18311,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
18089
18311
|
_: 3
|
|
18090
18312
|
})], 2)]),
|
|
18091
18313
|
_: 3
|
|
18092
|
-
})]),
|
|
18314
|
+
})) : createCommentVNode("", true)]),
|
|
18093
18315
|
_: 3
|
|
18094
18316
|
}, 8, ["open"]);
|
|
18095
18317
|
};
|
|
@@ -19180,6 +19402,6 @@ function createScrollRestorer(key, ports) {
|
|
|
19180
19402
|
};
|
|
19181
19403
|
}
|
|
19182
19404
|
//#endregion
|
|
19183
|
-
export { Accordion_default as Accordion, AccordionContent_default as AccordionContent, AccordionItem_default as AccordionItem, AccordionTrigger_default as AccordionTrigger, Alert_default as Alert, AlertDialog_default as AlertDialog, Anchor_default as Anchor, AppShell_default as AppShell, AspectRatio_default as AspectRatio, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Badge_default as Badge, Banner_default as Banner, Blockquote_default as Blockquote, Breadcrumb_default as Breadcrumb, BreadcrumbItem_default as BreadcrumbItem, BreadcrumbSeparator_default as BreadcrumbSeparator, Button_default as Button, ButtonGroup_default as ButtonGroup, Calendar_default as Calendar, Callout_default as Callout, Card_default as Card, Center_default as Center, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, Chip_default as Chip, CloseButton_default as CloseButton, Code_default as Code, CodeBlock_default as CodeBlock, Collapsible_default as Collapsible, CollapsibleContent_default as CollapsibleContent, CollapsibleTrigger_default as CollapsibleTrigger, Combobox_default as Combobox, CommandPalette_default as CommandPalette, Container_default as Container, ContextMenu_default as ContextMenu, ContextMenuCheckboxItem_default as ContextMenuCheckboxItem, ContextMenuGroup_default as ContextMenuGroup, ContextMenuItem_default as ContextMenuItem, ContextMenuLabel_default as ContextMenuLabel, ContextMenuRadioGroup_default as ContextMenuRadioGroup, ContextMenuRadioItem_default as ContextMenuRadioItem, ContextMenuSeparator_default as ContextMenuSeparator, ContextMenuSub_default as ContextMenuSub, CopyButton_default as CopyButton, DURATION, DateField_default as DateField, DatePicker_default as DatePicker, DateRangeField_default as DateRangeField, DateRangePicker_default as DateRangePicker, DateTimePicker_default as DateTimePicker, DescriptionDetails_default as DescriptionDetails, DescriptionList_default as DescriptionList, DescriptionTerm_default as DescriptionTerm, Dialog_default as Dialog, DisclosureIcon_default as DisclosureIcon, Divider_default as Divider, Drawer_default as Drawer, DropdownMenu_default as DropdownMenu, DropdownMenuCheckboxItem_default as DropdownMenuCheckboxItem, DropdownMenuGroup_default as DropdownMenuGroup, DropdownMenuItem_default as DropdownMenuItem, DropdownMenuLabel_default as DropdownMenuLabel, DropdownMenuRadioGroup_default as DropdownMenuRadioGroup, DropdownMenuRadioItem_default as DropdownMenuRadioItem, DropdownMenuSeparator_default as DropdownMenuSeparator, DropdownMenuSub_default as DropdownMenuSub, EASE, Empty_default as Empty, FileUpload_default as FileUpload, Flex_default as Flex, Form_default as Form, FormField_default as FormField, FormLayout_default as FormLayout, Grid_default as Grid, Heading_default as Heading, Highlight_default as Highlight, HoverCard_default as HoverCard, IconButton_default as IconButton, Image_default as Image, ImageGroup_default as ImageGroup, Indicator_default as Indicator, Inline_default as Inline, Input_default as Input, InputGroup_default as InputGroup, InputGroupAddon_default as InputGroupAddon, Kbd_default as Kbd, Link_default as Link, List_default as List, ListItem_default as ListItem, Listbox_default as Listbox, LoadingOverlay_default as LoadingOverlay, Mark_default as Mark, Menubar_default as Menubar, MenubarCheckboxItem_default as MenubarCheckboxItem, MenubarGroup_default as MenubarGroup, MenubarItem_default as MenubarItem, MenubarLabel_default as MenubarLabel, MenubarMenu_default as MenubarMenu, MenubarRadioGroup_default as MenubarRadioGroup, MenubarRadioItem_default as MenubarRadioItem, MenubarSeparator_default as MenubarSeparator, MenubarSub_default as MenubarSub, MeterGroup_default as MeterGroup, MultiCombobox_default as MultiCombobox, MultiSelect_default as MultiSelect, NavLink_default as NavLink, NumberFormat_default as NumberFormat, NumberInput_default as NumberInput, Page_default as Page, PageAside_default as PageAside, PageBody_default as PageBody, PageHeader_default as PageHeader, Panel_default as Panel, PasswordInput_default as PasswordInput, PinInput_default as PinInput, Popconfirm_default as Popconfirm, Popover_default as Popover, PrevNext_default as PrevNext, PrevNextLink_default as PrevNextLink, Progress_default as Progress, Prose_default as Prose, REQUIRED_SINGLETONS, RESTORE_DEADLINE_MS, RadioGroup_default as RadioGroup, RangeCalendar_default as RangeCalendar, RangeSlider_default as RangeSlider, Rating_default as Rating, Result_default as Result, RingProgress_default as RingProgress, Ripple_default as Ripple, SAVE_THROTTLE_MS, SCROLL_ATOP_ATTR, SCROLL_ATOP_HIDE_PX, SCROLL_AT_ATTR, SCROLL_RESTORE_ATTR, SCROLL_STATE_FIELD, STAGGER, ScrollArea_default as ScrollArea, SearchInput_default as SearchInput, Section_default as Section, SegmentedControl_default as SegmentedControl, Select_default as Select, Sheet_default as Sheet, Sidebar_default as Sidebar, SidebarGroup_default as SidebarGroup, SidebarTrigger_default as SidebarTrigger, SimpleGrid_default as SimpleGrid, Skeleton_default as Skeleton, Slider_default as Slider, Space_default as Space, Spinner_default as Spinner, Splitter_default as Splitter, SplitterHandle_default as SplitterHandle, SplitterPanel_default as SplitterPanel, Spoiler_default as Spoiler, Stack_default as Stack, Statistic_default as Statistic, Switch_default as Switch, TRANSITION, TRAVEL, Table_default as Table, TableBody_default as TableBody, TableCell_default as TableCell, TableHead_default as TableHead, TableHeader_default as TableHeader, TableRow_default as TableRow, Tabs_default as Tabs, TabsContent_default as TabsContent, TabsList_default as TabsList, TabsTrigger_default as TabsTrigger, Tag_default as Tag, TagsInput_default as TagsInput, Text_default as Text, Textarea_default as Textarea, Time_default as Time, TimeField_default as TimeField, Toaster_default as Toaster, Toggle_default as Toggle, Tooltip_default as Tooltip, TooltipProvider_default as TooltipProvider, TreeSelect_default as TreeSelect, VisuallyHidden_default as VisuallyHidden, atopOff, cn, createScrollRestorer, cssEase, enUS, firstPaintRestoreScript, provideImageResolver, provideUiLocale, readScrollRecord, toast, tokenize, tokensToHtml, tv, useImageResolver, useUiLocale, writeScrollRecord, zhCN };
|
|
19405
|
+
export { Accordion_default as Accordion, AccordionContent_default as AccordionContent, AccordionItem_default as AccordionItem, AccordionTrigger_default as AccordionTrigger, Alert_default as Alert, AlertDialog_default as AlertDialog, Anchor_default as Anchor, AppShell_default as AppShell, AspectRatio_default as AspectRatio, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Badge_default as Badge, Banner_default as Banner, Blockquote_default as Blockquote, Breadcrumb_default as Breadcrumb, BreadcrumbItem_default as BreadcrumbItem, BreadcrumbSeparator_default as BreadcrumbSeparator, Button_default as Button, ButtonGroup_default as ButtonGroup, Calendar_default as Calendar, Callout_default as Callout, Card_default as Card, Center_default as Center, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, Chip_default as Chip, CloseButton_default as CloseButton, Code_default as Code, CodeBlock_default as CodeBlock, Collapsible_default as Collapsible, CollapsibleContent_default as CollapsibleContent, CollapsibleTrigger_default as CollapsibleTrigger, Combobox_default as Combobox, CommandPalette_default as CommandPalette, Container_default as Container, ContextMenu_default as ContextMenu, ContextMenuCheckboxItem_default as ContextMenuCheckboxItem, ContextMenuGroup_default as ContextMenuGroup, ContextMenuItem_default as ContextMenuItem, ContextMenuLabel_default as ContextMenuLabel, ContextMenuRadioGroup_default as ContextMenuRadioGroup, ContextMenuRadioItem_default as ContextMenuRadioItem, ContextMenuSeparator_default as ContextMenuSeparator, ContextMenuSub_default as ContextMenuSub, CopyButton_default as CopyButton, DURATION, DateField_default as DateField, DatePicker_default as DatePicker, DateRangeField_default as DateRangeField, DateRangePicker_default as DateRangePicker, DateTimePicker_default as DateTimePicker, DescriptionDetails_default as DescriptionDetails, DescriptionList_default as DescriptionList, DescriptionTerm_default as DescriptionTerm, Dialog_default as Dialog, DisclosureIcon_default as DisclosureIcon, Divider_default as Divider, Drawer_default as Drawer, DropdownMenu_default as DropdownMenu, DropdownMenuCheckboxItem_default as DropdownMenuCheckboxItem, DropdownMenuGroup_default as DropdownMenuGroup, DropdownMenuItem_default as DropdownMenuItem, DropdownMenuLabel_default as DropdownMenuLabel, DropdownMenuRadioGroup_default as DropdownMenuRadioGroup, DropdownMenuRadioItem_default as DropdownMenuRadioItem, DropdownMenuSeparator_default as DropdownMenuSeparator, DropdownMenuSub_default as DropdownMenuSub, EASE, Empty_default as Empty, FileUpload_default as FileUpload, Flex_default as Flex, Form_default as Form, FormField_default as FormField, FormLayout_default as FormLayout, Grid_default as Grid, Heading_default as Heading, Highlight_default as Highlight, HoverCard_default as HoverCard, IconButton_default as IconButton, Image_default as Image, ImageGroup_default as ImageGroup, Indicator_default as Indicator, Inline_default as Inline, Input_default as Input, InputGroup_default as InputGroup, InputGroupAddon_default as InputGroupAddon, Kbd_default as Kbd, Lightbox_default as Lightbox, Link_default as Link, List_default as List, ListItem_default as ListItem, Listbox_default as Listbox, LoadingOverlay_default as LoadingOverlay, Mark_default as Mark, Menubar_default as Menubar, MenubarCheckboxItem_default as MenubarCheckboxItem, MenubarGroup_default as MenubarGroup, MenubarItem_default as MenubarItem, MenubarLabel_default as MenubarLabel, MenubarMenu_default as MenubarMenu, MenubarRadioGroup_default as MenubarRadioGroup, MenubarRadioItem_default as MenubarRadioItem, MenubarSeparator_default as MenubarSeparator, MenubarSub_default as MenubarSub, MeterGroup_default as MeterGroup, MultiCombobox_default as MultiCombobox, MultiSelect_default as MultiSelect, NavLink_default as NavLink, NumberFormat_default as NumberFormat, NumberInput_default as NumberInput, Page_default as Page, PageAside_default as PageAside, PageBody_default as PageBody, PageHeader_default as PageHeader, Panel_default as Panel, PasswordInput_default as PasswordInput, PinInput_default as PinInput, Popconfirm_default as Popconfirm, Popover_default as Popover, PrevNext_default as PrevNext, PrevNextLink_default as PrevNextLink, Progress_default as Progress, Prose_default as Prose, REQUIRED_SINGLETONS, RESTORE_DEADLINE_MS, RadioGroup_default as RadioGroup, RangeCalendar_default as RangeCalendar, RangeSlider_default as RangeSlider, Rating_default as Rating, Result_default as Result, RingProgress_default as RingProgress, Ripple_default as Ripple, SAVE_THROTTLE_MS, SCROLL_ATOP_ATTR, SCROLL_ATOP_HIDE_PX, SCROLL_AT_ATTR, SCROLL_RESTORE_ATTR, SCROLL_STATE_FIELD, STAGGER, ScrollArea_default as ScrollArea, SearchInput_default as SearchInput, Section_default as Section, SegmentedControl_default as SegmentedControl, Select_default as Select, Sheet_default as Sheet, Sidebar_default as Sidebar, SidebarGroup_default as SidebarGroup, SidebarTrigger_default as SidebarTrigger, SimpleGrid_default as SimpleGrid, Skeleton_default as Skeleton, Slider_default as Slider, Space_default as Space, Spinner_default as Spinner, Splitter_default as Splitter, SplitterHandle_default as SplitterHandle, SplitterPanel_default as SplitterPanel, Spoiler_default as Spoiler, Stack_default as Stack, Statistic_default as Statistic, Switch_default as Switch, TRANSITION, TRAVEL, Table_default as Table, TableBody_default as TableBody, TableCell_default as TableCell, TableHead_default as TableHead, TableHeader_default as TableHeader, TableRow_default as TableRow, Tabs_default as Tabs, TabsContent_default as TabsContent, TabsList_default as TabsList, TabsTrigger_default as TabsTrigger, Tag_default as Tag, TagsInput_default as TagsInput, Text_default as Text, Textarea_default as Textarea, Time_default as Time, TimeField_default as TimeField, Toaster_default as Toaster, Toggle_default as Toggle, Tooltip_default as Tooltip, TooltipProvider_default as TooltipProvider, TreeSelect_default as TreeSelect, VisuallyHidden_default as VisuallyHidden, atopOff, cn, createScrollRestorer, cssEase, enUS, firstPaintRestoreScript, provideImageResolver, provideUiLocale, readScrollRecord, toast, tokenize, tokensToHtml, tv, useImageResolver, useUiLocale, writeScrollRecord, zhCN };
|
|
19184
19406
|
|
|
19185
19407
|
//# sourceMappingURL=index.js.map
|