@hina-ui/vue 1.1.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 +1062 -528
- package/dist/index.js.map +1 -1
- package/dist/types/components/accordion/AccordionContent.vue.d.ts.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/avatar/AvatarGroup.vue.d.ts.map +1 -1
- package/dist/types/components/avatar/utils/children.d.ts +3 -0
- package/dist/types/components/avatar/utils/children.d.ts.map +1 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.vue.d.ts +32 -29
- package/dist/types/components/checkbox-group/CheckboxGroup.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/collapsible/CollapsibleContent.vue.d.ts.map +1 -1
- package/dist/types/components/combobox/Combobox.vue.d.ts +38 -38
- package/dist/types/components/combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/types/components/combobox/ComboboxList.vue.d.ts +22 -15
- package/dist/types/components/combobox/ComboboxList.vue.d.ts.map +1 -1
- package/dist/types/components/dialog/Dialog.vue.d.ts +22 -16
- package/dist/types/components/dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog.variants.d.ts +32 -2
- package/dist/types/components/dialog/dialog.variants.d.ts.map +1 -1
- 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/image/ImageGroup.vue.d.ts.map +1 -1
- package/dist/types/components/image/composables/useImageGroupState.d.ts +7 -0
- package/dist/types/components/image/composables/useImageGroupState.d.ts.map +1 -0
- package/dist/types/components/input/Input.vue.d.ts +3 -3
- package/dist/types/components/input/Input.vue.d.ts.map +1 -1
- package/dist/types/components/input/InputBase.vue.d.ts +3 -3
- package/dist/types/components/input/InputBase.vue.d.ts.map +1 -1
- package/dist/types/components/input/input.variants.d.ts +52 -6
- package/dist/types/components/input/input.variants.d.ts.map +1 -1
- package/dist/types/components/input-group/InputGroup.vue.d.ts +3 -3
- package/dist/types/components/input-group/InputGroup.vue.d.ts.map +1 -1
- package/dist/types/components/input-group/context.d.ts +2 -1
- package/dist/types/components/input-group/context.d.ts.map +1 -1
- package/dist/types/components/input-group/input-group.variants.d.ts +13 -1
- package/dist/types/components/input-group/input-group.variants.d.ts.map +1 -1
- package/dist/types/components/lightbox/LightboxThumbs.vue.d.ts.map +1 -1
- package/dist/types/components/listbox/Listbox.vue.d.ts +36 -29
- package/dist/types/components/listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/types/components/listbox/ListboxOptionContent.vue.d.ts +31 -0
- package/dist/types/components/listbox/ListboxOptionContent.vue.d.ts.map +1 -0
- package/dist/types/components/listbox/listbox.variants.d.ts +19 -1
- package/dist/types/components/listbox/listbox.variants.d.ts.map +1 -1
- package/dist/types/components/multi-combobox/MultiCombobox.vue.d.ts +41 -43
- package/dist/types/components/multi-combobox/MultiCombobox.vue.d.ts.map +1 -1
- package/dist/types/components/multi-combobox/composables/useMultiCombobox.d.ts +27 -0
- package/dist/types/components/multi-combobox/composables/useMultiCombobox.d.ts.map +1 -0
- package/dist/types/components/multi-select/MultiSelect.vue.d.ts +39 -41
- package/dist/types/components/multi-select/MultiSelect.vue.d.ts.map +1 -1
- package/dist/types/components/number-input/NumberInput.vue.d.ts +3 -3
- package/dist/types/components/number-input/NumberInput.vue.d.ts.map +1 -1
- package/dist/types/components/number-input/number-input.variants.d.ts +10 -1
- package/dist/types/components/number-input/number-input.variants.d.ts.map +1 -1
- package/dist/types/components/password-input/PasswordInput.vue.d.ts +3 -3
- package/dist/types/components/password-input/PasswordInput.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/radio-group/RadioGroup.vue.d.ts +32 -29
- package/dist/types/components/radio-group/RadioGroup.vue.d.ts.map +1 -1
- 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/scroll-area/scroll-restore.d.ts +0 -1
- package/dist/types/components/scroll-area/scroll-restore.d.ts.map +1 -1
- package/dist/types/components/search-input/SearchInput.vue.d.ts +3 -3
- package/dist/types/components/search-input/SearchInput.vue.d.ts.map +1 -1
- package/dist/types/components/segmented-control/SegmentedControl.vue.d.ts +30 -30
- package/dist/types/components/segmented-control/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/types/components/select/Select.vue.d.ts +41 -37
- package/dist/types/components/select/Select.vue.d.ts.map +1 -1
- package/dist/types/components/select/SelectList.vue.d.ts +22 -15
- package/dist/types/components/select/SelectList.vue.d.ts.map +1 -1
- package/dist/types/components/select/composables/useClearTransition.d.ts +10 -0
- package/dist/types/components/select/composables/useClearTransition.d.ts.map +1 -0
- package/dist/types/components/select/select.variants.d.ts +16 -0
- package/dist/types/components/select/select.variants.d.ts.map +1 -1
- package/dist/types/components/select/types.d.ts +7 -7
- package/dist/types/components/select/types.d.ts.map +1 -1
- package/dist/types/components/tabs/TabsTrigger.vue.d.ts.map +1 -1
- package/dist/types/components/textarea/Textarea.vue.d.ts.map +1 -1
- package/dist/types/components/textarea/composables/useTextareaSizing.d.ts +27 -0
- package/dist/types/components/textarea/composables/useTextareaSizing.d.ts.map +1 -0
- package/dist/types/components/textarea/textarea.variants.d.ts +9 -6
- package/dist/types/components/textarea/textarea.variants.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/dist/types/lib/caret.d.ts +0 -4
- package/dist/types/lib/caret.d.ts.map +1 -1
- package/dist/types/lib/collapse.d.ts +2 -0
- package/dist/types/lib/collapse.d.ts.map +1 -1
- package/dist/types/lib/field-focus.d.ts +0 -4
- package/dist/types/lib/field-focus.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/AccordionContent.vue +2 -11
- 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/avatar/AvatarGroup.vue +3 -8
- package/src/components/avatar/utils/children.ts +7 -0
- package/src/components/checkbox-group/CheckboxGroup.vue +3 -3
- 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/collapsible/CollapsibleContent.vue +2 -11
- package/src/components/combobox/Combobox.vue +3 -3
- package/src/components/combobox/ComboboxList.vue +3 -3
- package/src/components/dialog/Dialog.vue +70 -39
- package/src/components/dialog/dialog.variants.ts +9 -3
- 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/image/ImageGroup.vue +2 -30
- package/src/components/image/composables/useImageGroupState.ts +35 -0
- package/src/components/input/Input.vue +3 -3
- package/src/components/input/InputBase.vue +5 -5
- package/src/components/input/input.variants.ts +13 -3
- package/src/components/input-group/InputGroup.vue +11 -4
- package/src/components/input-group/context.ts +2 -1
- package/src/components/input-group/input-group.variants.ts +8 -1
- package/src/components/lightbox/LightboxThumbs.vue +1 -0
- package/src/components/listbox/Listbox.vue +26 -29
- package/src/components/listbox/ListboxOptionContent.vue +28 -0
- package/src/components/listbox/listbox.variants.ts +6 -1
- package/src/components/multi-combobox/MultiCombobox.vue +14 -52
- package/src/components/multi-combobox/composables/useMultiCombobox.ts +63 -0
- package/src/components/multi-select/MultiSelect.vue +3 -4
- package/src/components/number-input/NumberInput.vue +8 -7
- package/src/components/number-input/number-input.variants.ts +5 -1
- package/src/components/password-input/PasswordInput.vue +3 -3
- 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/radio-group/RadioGroup.vue +3 -3
- package/src/components/scroll-area/ScrollArea.vue +7 -5
- package/src/components/scroll-area/composables/useScrollFocus.ts +39 -0
- package/src/components/scroll-area/scroll-restore.ts +0 -5
- package/src/components/search-input/SearchInput.vue +3 -3
- package/src/components/segmented-control/SegmentedControl.vue +9 -4
- package/src/components/select/Select.vue +68 -25
- package/src/components/select/SelectList.vue +3 -3
- package/src/components/select/composables/useClearTransition.ts +25 -0
- package/src/components/select/select.variants.ts +24 -0
- package/src/components/select/types.ts +10 -8
- package/src/components/tabs/TabsTrigger.vue +6 -1
- package/src/components/textarea/Textarea.vue +2 -41
- package/src/components/textarea/composables/useTextareaSizing.ts +54 -0
- package/src/components/textarea/textarea.variants.ts +5 -4
- package/src/lib/anchored-overlay.ts +110 -0
- package/src/lib/caret.ts +0 -4
- package/src/lib/collapse.ts +21 -1
- package/src/lib/field-focus.ts +0 -4
- package/src/styles/interaction.css +4 -2
- 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, injectTabsRootContext, injectTooltipProviderContext, useBodyScrollLock, 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",
|
|
@@ -4296,6 +4342,11 @@ var Avatar_default = /* @__PURE__ */ defineComponent({
|
|
|
4296
4342
|
}
|
|
4297
4343
|
});
|
|
4298
4344
|
//#endregion
|
|
4345
|
+
//#region src/components/avatar/utils/children.ts
|
|
4346
|
+
function flattenChildren(nodes) {
|
|
4347
|
+
return (nodes ?? []).flatMap((node) => node.type === Fragment ? flattenChildren(node.children) : [node]);
|
|
4348
|
+
}
|
|
4349
|
+
//#endregion
|
|
4299
4350
|
//#region src/components/avatar/avatar-group.variants.ts
|
|
4300
4351
|
var avatarGroupItem = tv({
|
|
4301
4352
|
base: "ring-surface first:me-0 ring-2",
|
|
@@ -4319,10 +4370,7 @@ var AvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
4319
4370
|
setup(__props) {
|
|
4320
4371
|
const props = __props;
|
|
4321
4372
|
const slots = useSlots();
|
|
4322
|
-
|
|
4323
|
-
return (nodes ?? []).flatMap((node) => node.type === Fragment ? flatten(node.children) : [node]);
|
|
4324
|
-
}
|
|
4325
|
-
const children = computed(() => flatten(slots.default?.()));
|
|
4373
|
+
const children = computed(() => flattenChildren(slots.default?.()));
|
|
4326
4374
|
const visible = computed(() => props.max && props.max > 0 ? children.value.slice(0, props.max) : children.value);
|
|
4327
4375
|
const hidden = computed(() => children.value.length - visible.value.length);
|
|
4328
4376
|
const item = computed(() => avatarGroupItem({ size: props.size }));
|
|
@@ -4482,7 +4530,7 @@ var indicator = tv({
|
|
|
4482
4530
|
});
|
|
4483
4531
|
//#endregion
|
|
4484
4532
|
//#region src/components/indicator/Indicator.vue?vue&type=script&setup=true&lang.ts
|
|
4485
|
-
var _hoisted_1$
|
|
4533
|
+
var _hoisted_1$81 = {
|
|
4486
4534
|
key: 0,
|
|
4487
4535
|
"aria-hidden": "true",
|
|
4488
4536
|
class: "hn-ping absolute inset-0 rounded-full bg-inherit"
|
|
@@ -4513,7 +4561,7 @@ var Indicator_default = /* @__PURE__ */ defineComponent({
|
|
|
4513
4561
|
size: props.size
|
|
4514
4562
|
}), props.class))
|
|
4515
4563
|
}, {
|
|
4516
|
-
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 }, {
|
|
4517
4565
|
default: withCtx(() => [createTextVNode(toDisplayString(props.label), 1)]),
|
|
4518
4566
|
_: 1
|
|
4519
4567
|
})) : createCommentVNode("", true)]),
|
|
@@ -4565,8 +4613,8 @@ var calloutIcons = {
|
|
|
4565
4613
|
};
|
|
4566
4614
|
//#endregion
|
|
4567
4615
|
//#region src/components/callout/Callout.vue?vue&type=script&setup=true&lang.ts
|
|
4568
|
-
var _hoisted_1$
|
|
4569
|
-
var _hoisted_2$
|
|
4616
|
+
var _hoisted_1$80 = { class: "flex min-w-0 flex-1 flex-col gap-1" };
|
|
4617
|
+
var _hoisted_2$38 = {
|
|
4570
4618
|
key: 0,
|
|
4571
4619
|
class: "text-fg font-medium"
|
|
4572
4620
|
};
|
|
@@ -4594,7 +4642,7 @@ var Callout_default = /* @__PURE__ */ defineComponent({
|
|
|
4594
4642
|
key: 0,
|
|
4595
4643
|
class: normalizeClass(unref(calloutIcon)({ tone: props.tone })),
|
|
4596
4644
|
"aria-hidden": "true"
|
|
4597
|
-
}, 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);
|
|
4598
4646
|
};
|
|
4599
4647
|
}
|
|
4600
4648
|
});
|
|
@@ -4636,21 +4684,31 @@ function useCollapseHooks(axis = "y") {
|
|
|
4636
4684
|
onBeforeUpdate(remember);
|
|
4637
4685
|
return collapseHooks(axis, () => parent);
|
|
4638
4686
|
}
|
|
4687
|
+
function useCollapseGap() {
|
|
4688
|
+
const content = shallowRef(null);
|
|
4689
|
+
function measure() {
|
|
4690
|
+
const el = content.value?.$el;
|
|
4691
|
+
if (el instanceof Element) writeCollapseGap(el, el.parentElement);
|
|
4692
|
+
}
|
|
4693
|
+
onMounted(measure);
|
|
4694
|
+
onBeforeUpdate(measure);
|
|
4695
|
+
return content;
|
|
4696
|
+
}
|
|
4639
4697
|
//#endregion
|
|
4640
4698
|
//#region src/components/alert/Alert.vue?vue&type=script&setup=true&lang.ts
|
|
4641
|
-
var _hoisted_1$
|
|
4699
|
+
var _hoisted_1$79 = {
|
|
4642
4700
|
key: 0,
|
|
4643
4701
|
"data-hn-alert": "",
|
|
4644
4702
|
class: "hn-collapse"
|
|
4645
4703
|
};
|
|
4646
|
-
var _hoisted_2$
|
|
4647
|
-
var _hoisted_3$
|
|
4704
|
+
var _hoisted_2$37 = { class: "hn-collapse-body" };
|
|
4705
|
+
var _hoisted_3$18 = ["role"];
|
|
4648
4706
|
var _hoisted_4$14 = { class: "flex min-w-0 flex-1 flex-col gap-1" };
|
|
4649
|
-
var _hoisted_5$
|
|
4707
|
+
var _hoisted_5$9 = {
|
|
4650
4708
|
key: 0,
|
|
4651
4709
|
class: "text-fg font-medium"
|
|
4652
4710
|
};
|
|
4653
|
-
var _hoisted_6$
|
|
4711
|
+
var _hoisted_6$7 = {
|
|
4654
4712
|
key: 0,
|
|
4655
4713
|
class: "flex shrink-0 items-center gap-2 self-center"
|
|
4656
4714
|
};
|
|
@@ -4694,7 +4752,7 @@ var Alert_default = /* @__PURE__ */ defineComponent({
|
|
|
4694
4752
|
"leave-from-class": "hn-collapse-open",
|
|
4695
4753
|
"leave-to-class": "hn-collapse-closed"
|
|
4696
4754
|
}, toHandlers(unref(hooks))), {
|
|
4697
|
-
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", {
|
|
4698
4756
|
role: role.value,
|
|
4699
4757
|
class: normalizeClass(unref(cn)(unref(callout)({ tone: props.tone }), props.class))
|
|
4700
4758
|
}, [
|
|
@@ -4703,15 +4761,15 @@ var Alert_default = /* @__PURE__ */ defineComponent({
|
|
|
4703
4761
|
class: normalizeClass(unref(calloutIcon)({ tone: props.tone })),
|
|
4704
4762
|
"aria-hidden": "true"
|
|
4705
4763
|
}, null, 8, ["class"])) : createCommentVNode("", true)]),
|
|
4706
|
-
createElementVNode("div", _hoisted_4$14, [props.title ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
4707
|
-
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),
|
|
4708
4766
|
props.closable ? (openBlock(), createBlock(CloseButton_default, {
|
|
4709
4767
|
key: 1,
|
|
4710
4768
|
size: "sm",
|
|
4711
4769
|
class: "-my-0.5 -me-1",
|
|
4712
4770
|
onClick: close
|
|
4713
4771
|
})) : createCommentVNode("", true)
|
|
4714
|
-
], 10, _hoisted_3$
|
|
4772
|
+
], 10, _hoisted_3$18)])])) : createCommentVNode("", true)]),
|
|
4715
4773
|
_: 3
|
|
4716
4774
|
}, 16);
|
|
4717
4775
|
};
|
|
@@ -4719,7 +4777,7 @@ var Alert_default = /* @__PURE__ */ defineComponent({
|
|
|
4719
4777
|
});
|
|
4720
4778
|
//#endregion
|
|
4721
4779
|
//#region src/components/prev-next/PrevNext.vue?vue&type=script&setup=true&lang.ts
|
|
4722
|
-
var _hoisted_1$
|
|
4780
|
+
var _hoisted_1$78 = ["aria-label"];
|
|
4723
4781
|
//#endregion
|
|
4724
4782
|
//#region src/components/prev-next/PrevNext.vue
|
|
4725
4783
|
var PrevNext_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4736,7 +4794,7 @@ var PrevNext_default = /* @__PURE__ */ defineComponent({
|
|
|
4736
4794
|
return openBlock(), createElementBlock("nav", {
|
|
4737
4795
|
"aria-label": props.label ?? unref(t).pagination.navLabel,
|
|
4738
4796
|
class: normalizeClass(unref(cn)("grid gap-4 sm:grid-cols-2", props.class))
|
|
4739
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
4797
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$78);
|
|
4740
4798
|
};
|
|
4741
4799
|
}
|
|
4742
4800
|
});
|
|
@@ -4760,7 +4818,7 @@ var prevNextEyebrow = tv({
|
|
|
4760
4818
|
});
|
|
4761
4819
|
//#endregion
|
|
4762
4820
|
//#region src/components/prev-next/PrevNextLink.vue?vue&type=script&setup=true&lang.ts
|
|
4763
|
-
var _hoisted_1$
|
|
4821
|
+
var _hoisted_1$77 = { class: "text-fg font-medium" };
|
|
4764
4822
|
//#endregion
|
|
4765
4823
|
//#region src/components/prev-next/PrevNextLink.vue
|
|
4766
4824
|
var PrevNextLink_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4796,7 +4854,7 @@ var PrevNextLink_default = /* @__PURE__ */ defineComponent({
|
|
|
4796
4854
|
class: "size-4",
|
|
4797
4855
|
"aria-hidden": "true"
|
|
4798
4856
|
})), createTextVNode(" " + toDisplayString(props.label ?? (props.direction === "prev" ? unref(t).pagination.prev : unref(t).pagination.next)), 1)], 2),
|
|
4799
|
-
createElementVNode("span", _hoisted_1$
|
|
4857
|
+
createElementVNode("span", _hoisted_1$77, [renderSlot(_ctx.$slots, "default")])
|
|
4800
4858
|
]),
|
|
4801
4859
|
_: 3
|
|
4802
4860
|
}, 16, [
|
|
@@ -4873,8 +4931,8 @@ var tableCell = tv({
|
|
|
4873
4931
|
});
|
|
4874
4932
|
//#endregion
|
|
4875
4933
|
//#region src/components/table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4876
|
-
var _hoisted_1$
|
|
4877
|
-
var _hoisted_2$
|
|
4934
|
+
var _hoisted_1$76 = { class: "hn-table" };
|
|
4935
|
+
var _hoisted_2$36 = { key: 0 };
|
|
4878
4936
|
//#endregion
|
|
4879
4937
|
//#region src/components/table/Table.vue
|
|
4880
4938
|
var Table_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4904,7 +4962,7 @@ var Table_default = /* @__PURE__ */ defineComponent({
|
|
|
4904
4962
|
stickyHeader: props.stickyHeader
|
|
4905
4963
|
}), props.class))
|
|
4906
4964
|
}, {
|
|
4907
|
-
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")])]),
|
|
4908
4966
|
_: 3
|
|
4909
4967
|
}, 8, ["direction", "class"]);
|
|
4910
4968
|
};
|
|
@@ -4951,7 +5009,7 @@ var TableRow_default = /* @__PURE__ */ defineComponent({
|
|
|
4951
5009
|
});
|
|
4952
5010
|
//#endregion
|
|
4953
5011
|
//#region src/components/table/TableHead.vue?vue&type=script&setup=true&lang.ts
|
|
4954
|
-
var _hoisted_1$
|
|
5012
|
+
var _hoisted_1$75 = ["scope"];
|
|
4955
5013
|
//#endregion
|
|
4956
5014
|
//#region src/components/table/TableHead.vue
|
|
4957
5015
|
var TableHead_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4976,7 +5034,7 @@ var TableHead_default = /* @__PURE__ */ defineComponent({
|
|
|
4976
5034
|
sticky: props.sticky,
|
|
4977
5035
|
head: true
|
|
4978
5036
|
}), props.class))
|
|
4979
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
5037
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$75);
|
|
4980
5038
|
};
|
|
4981
5039
|
}
|
|
4982
5040
|
});
|
|
@@ -5286,11 +5344,16 @@ var TabsTrigger_default = /* @__PURE__ */ defineComponent({
|
|
|
5286
5344
|
active.value ? (openBlock(), createBlock(Highlight_default, {
|
|
5287
5345
|
key: 0,
|
|
5288
5346
|
id: unref(highlightId),
|
|
5347
|
+
axis: unref(orientation) === "vertical" ? "y" : "x",
|
|
5289
5348
|
class: normalizeClass(unref(tabsHighlight)({
|
|
5290
5349
|
variant: unref(variant),
|
|
5291
5350
|
orientation: unref(orientation)
|
|
5292
5351
|
}))
|
|
5293
|
-
}, null, 8, [
|
|
5352
|
+
}, null, 8, [
|
|
5353
|
+
"id",
|
|
5354
|
+
"axis",
|
|
5355
|
+
"class"
|
|
5356
|
+
])) : createCommentVNode("", true),
|
|
5294
5357
|
createVNode(Ripple_default),
|
|
5295
5358
|
renderSlot(_ctx.$slots, "default")
|
|
5296
5359
|
]),
|
|
@@ -5333,10 +5396,6 @@ function controlOf(node) {
|
|
|
5333
5396
|
const control = node.matches(CONTROL) ? node : node.querySelector(CONTROL);
|
|
5334
5397
|
return control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement ? control : null;
|
|
5335
5398
|
}
|
|
5336
|
-
/**
|
|
5337
|
-
* 点击输入面里非交互的部分(附属格、前后缀、空白)时把焦点交给最近的输入区,返回被聚焦的输入区;点击落在交互元素上或者没有可聚焦的输入区时返回 null。
|
|
5338
|
-
* 点击所在的段自己含输入区时只认它、不动光标(段内的处理器已经定过位);否则先向后找,再向前找;落在点击位置之后的输入区把光标放到开头,之前的放到末尾。
|
|
5339
|
-
*/
|
|
5340
5399
|
function focusFieldFrom(root, target) {
|
|
5341
5400
|
if (target.closest(INTERACTIVE)) return null;
|
|
5342
5401
|
const segments = Array.from(root.children);
|
|
@@ -5361,11 +5420,11 @@ function focusFieldFrom(root, target) {
|
|
|
5361
5420
|
//#endregion
|
|
5362
5421
|
//#region src/components/input/input.variants.ts
|
|
5363
5422
|
var inputHost = tv({
|
|
5364
|
-
base: ["group/hn-field
|
|
5423
|
+
base: ["group/hn-field text-fg flex w-full min-w-0 cursor-text items-stretch overflow-hidden rounded-md border font-medium", "data-disabled:cursor-not-allowed data-disabled:opacity-50"],
|
|
5365
5424
|
variants: {
|
|
5366
5425
|
variant: {
|
|
5367
|
-
primary: "border-line [--hn-field-bg:var(--hn-surface)] [--hn-field-shadow:var(--hn-shadow-sm)]",
|
|
5368
|
-
secondary: "border-transparent [--hn-field-bg:var(--hn-bg-inset)]"
|
|
5426
|
+
primary: "hn-field border-line [--hn-field-bg:var(--hn-surface)] [--hn-field-shadow:var(--hn-shadow-sm)]",
|
|
5427
|
+
secondary: "hn-field border-transparent [--hn-field-bg:var(--hn-bg-inset)]"
|
|
5369
5428
|
},
|
|
5370
5429
|
size: {
|
|
5371
5430
|
sm: "h-[var(--hn-control-h-sm)] text-sm [--hn-input-h:var(--hn-control-h-sm)] [--hn-input-px:var(--hn-control-px-sm)] [--hn-input-icon:0.875rem]",
|
|
@@ -5378,6 +5437,10 @@ var inputHost = tv({
|
|
|
5378
5437
|
size: "md"
|
|
5379
5438
|
}
|
|
5380
5439
|
});
|
|
5440
|
+
var textInputHost = tv({
|
|
5441
|
+
extend: inputHost,
|
|
5442
|
+
variants: { variant: { bare: "rounded-none border-0 bg-transparent shadow-none outline-none" } }
|
|
5443
|
+
});
|
|
5381
5444
|
var inputControl = tv({
|
|
5382
5445
|
base: ["h-full min-w-0 flex-1 bg-transparent px-[var(--hn-input-px)] text-inherit outline-none [font:inherit]", "placeholder:text-faint placeholder:font-normal disabled:cursor-not-allowed"],
|
|
5383
5446
|
variants: {
|
|
@@ -5475,12 +5538,12 @@ function injectInputGroup() {
|
|
|
5475
5538
|
}
|
|
5476
5539
|
//#endregion
|
|
5477
5540
|
//#region src/components/input/InputBase.vue?vue&type=script&setup=true&lang.ts
|
|
5478
|
-
var _hoisted_1$
|
|
5541
|
+
var _hoisted_1$74 = [
|
|
5479
5542
|
"data-invalid",
|
|
5480
5543
|
"data-disabled",
|
|
5481
5544
|
"aria-busy"
|
|
5482
5545
|
];
|
|
5483
|
-
var _hoisted_2$
|
|
5546
|
+
var _hoisted_2$35 = [
|
|
5484
5547
|
"id",
|
|
5485
5548
|
"disabled",
|
|
5486
5549
|
"aria-invalid",
|
|
@@ -5537,7 +5600,7 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
5537
5600
|
"data-invalid": unref(invalid) ? "" : void 0,
|
|
5538
5601
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
5539
5602
|
"aria-busy": props.loading || void 0,
|
|
5540
|
-
class: normalizeClass(unref(cn)(unref(group) ? unref(inputEmbedded)() : unref(
|
|
5603
|
+
class: normalizeClass(unref(cn)(unref(group) ? unref(inputEmbedded)() : unref(textInputHost)({
|
|
5541
5604
|
variant: props.variant,
|
|
5542
5605
|
size: props.size
|
|
5543
5606
|
}), props.class)),
|
|
@@ -5567,7 +5630,7 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
5567
5630
|
leading: !!unref(slots).leading,
|
|
5568
5631
|
trailing: clearing.value || trailingSpinner.value || !!unref(slots).trailing
|
|
5569
5632
|
})
|
|
5570
|
-
}), null, 16, _hoisted_2$
|
|
5633
|
+
}), null, 16, _hoisted_2$35), [[vModelDynamic, model.value]]),
|
|
5571
5634
|
createVNode(Transition, {
|
|
5572
5635
|
"enter-active-class": "hn-transition-base",
|
|
5573
5636
|
"enter-from-class": "scale-90 opacity-0",
|
|
@@ -5603,7 +5666,7 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
5603
5666
|
key: 1,
|
|
5604
5667
|
class: normalizeClass(unref(inputAdornment)())
|
|
5605
5668
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
5606
|
-
], 10, _hoisted_1$
|
|
5669
|
+
], 10, _hoisted_1$74);
|
|
5607
5670
|
};
|
|
5608
5671
|
}
|
|
5609
5672
|
});
|
|
@@ -5696,10 +5759,6 @@ var MIRRORED = [
|
|
|
5696
5759
|
"border-bottom-width",
|
|
5697
5760
|
"border-left-width"
|
|
5698
5761
|
];
|
|
5699
|
-
/**
|
|
5700
|
-
* 量出 textarea 光标所在行的顶边(相对 textarea 自身的边框盒)。
|
|
5701
|
-
* 原生没有光标几何 API,只能用同排版的镜像块把光标前的文字排一遍。
|
|
5702
|
-
*/
|
|
5703
5762
|
function caretTop(node, at = node.selectionEnd) {
|
|
5704
5763
|
const style = getComputedStyle(node);
|
|
5705
5764
|
const mirror = node.ownerDocument.createElement("div");
|
|
@@ -5725,13 +5784,63 @@ function caretTop(node, at = node.selectionEnd) {
|
|
|
5725
5784
|
return top;
|
|
5726
5785
|
}
|
|
5727
5786
|
//#endregion
|
|
5787
|
+
//#region src/components/textarea/composables/useTextareaSizing.ts
|
|
5788
|
+
function useTextareaSizing(props, model) {
|
|
5789
|
+
const el = shallowRef(null);
|
|
5790
|
+
const area = shallowRef();
|
|
5791
|
+
const bounds = computed(() => {
|
|
5792
|
+
const options = props.autosize === true ? {} : props.autosize || null;
|
|
5793
|
+
return {
|
|
5794
|
+
min: options?.minRows ?? props.rows,
|
|
5795
|
+
max: options?.maxRows
|
|
5796
|
+
};
|
|
5797
|
+
});
|
|
5798
|
+
function fit() {
|
|
5799
|
+
const node = el.value;
|
|
5800
|
+
if (!node) return;
|
|
5801
|
+
node.style.height = "auto";
|
|
5802
|
+
node.style.height = `${node.scrollHeight}px`;
|
|
5803
|
+
if (document.activeElement === node) reveal(node);
|
|
5804
|
+
}
|
|
5805
|
+
function reveal(node) {
|
|
5806
|
+
const scroller = area.value?.viewport ?? node.closest("[data-overlayscrollbars-initialize]");
|
|
5807
|
+
if (!scroller) return;
|
|
5808
|
+
const box = scroller.getBoundingClientRect();
|
|
5809
|
+
const top = node.getBoundingClientRect().top + caretTop(node);
|
|
5810
|
+
const bottom = top + parseFloat(getComputedStyle(node).lineHeight);
|
|
5811
|
+
if (bottom > box.bottom) scroller.scrollTop += bottom - box.bottom;
|
|
5812
|
+
else if (top < box.top) scroller.scrollTop -= box.top - top;
|
|
5813
|
+
}
|
|
5814
|
+
function focus(event) {
|
|
5815
|
+
const node = el.value;
|
|
5816
|
+
if (!node || node.disabled || event.target === node) return;
|
|
5817
|
+
node.focus();
|
|
5818
|
+
node.setSelectionRange(node.value.length, node.value.length);
|
|
5819
|
+
}
|
|
5820
|
+
onMounted(fit);
|
|
5821
|
+
watch(() => [
|
|
5822
|
+
model.value,
|
|
5823
|
+
props.size,
|
|
5824
|
+
props.variant,
|
|
5825
|
+
bounds.value.min
|
|
5826
|
+
], () => void nextTick(fit));
|
|
5827
|
+
return {
|
|
5828
|
+
el,
|
|
5829
|
+
area,
|
|
5830
|
+
bounds,
|
|
5831
|
+
fit,
|
|
5832
|
+
focus
|
|
5833
|
+
};
|
|
5834
|
+
}
|
|
5835
|
+
//#endregion
|
|
5728
5836
|
//#region src/components/textarea/textarea.variants.ts
|
|
5729
5837
|
var textarea = tv({
|
|
5730
|
-
base: ["
|
|
5838
|
+
base: ["text-fg flex w-full min-w-0 cursor-text flex-col overflow-hidden rounded-md border font-medium", "data-disabled:cursor-not-allowed data-disabled:opacity-50"],
|
|
5731
5839
|
variants: {
|
|
5732
5840
|
variant: {
|
|
5733
|
-
|
|
5734
|
-
|
|
5841
|
+
bare: "rounded-none border-0 bg-transparent shadow-none outline-none [--hn-textarea-border-w:0px]",
|
|
5842
|
+
primary: "hn-field border-line [--hn-field-bg:var(--hn-surface)] [--hn-field-shadow:var(--hn-shadow-sm)]",
|
|
5843
|
+
secondary: "hn-field border-transparent [--hn-field-bg:var(--hn-bg-inset)]"
|
|
5735
5844
|
},
|
|
5736
5845
|
size: {
|
|
5737
5846
|
sm: "text-sm [--hn-textarea-h:var(--hn-control-h-sm)] [--hn-textarea-px:var(--hn-control-px-sm)]",
|
|
@@ -5756,13 +5865,13 @@ var textarea = tv({
|
|
|
5756
5865
|
});
|
|
5757
5866
|
var textareaField = tv({ base: [
|
|
5758
5867
|
"block w-full resize-none overflow-hidden bg-transparent text-inherit outline-none [font:inherit]",
|
|
5759
|
-
"px-[var(--hn-textarea-px)] py-[calc((var(--hn-textarea-h)_-_1lh)/2_-
|
|
5868
|
+
"px-[var(--hn-textarea-px)] py-[calc((var(--hn-textarea-h)_-_1lh)/2_-_var(--hn-textarea-border-w,1px))]",
|
|
5760
5869
|
"placeholder:text-faint placeholder:font-normal disabled:cursor-not-allowed"
|
|
5761
5870
|
] });
|
|
5762
5871
|
//#endregion
|
|
5763
5872
|
//#region src/components/textarea/Textarea.vue?vue&type=script&setup=true&lang.ts
|
|
5764
|
-
var _hoisted_1$
|
|
5765
|
-
var _hoisted_2$
|
|
5873
|
+
var _hoisted_1$73 = ["data-invalid", "data-disabled"];
|
|
5874
|
+
var _hoisted_2$34 = [
|
|
5766
5875
|
"id",
|
|
5767
5876
|
"rows",
|
|
5768
5877
|
"disabled",
|
|
@@ -5796,51 +5905,15 @@ var Textarea_default = /* @__PURE__ */ defineComponent({
|
|
|
5796
5905
|
});
|
|
5797
5906
|
const props = __props;
|
|
5798
5907
|
const model = useModel(__props, "modelValue");
|
|
5799
|
-
const el =
|
|
5800
|
-
const area = shallowRef();
|
|
5801
|
-
const bounds = computed(() => {
|
|
5802
|
-
const options = props.autosize === true ? {} : props.autosize || null;
|
|
5803
|
-
return {
|
|
5804
|
-
min: options?.minRows ?? props.rows,
|
|
5805
|
-
max: options?.maxRows
|
|
5806
|
-
};
|
|
5807
|
-
});
|
|
5808
|
-
function fit() {
|
|
5809
|
-
const node = el.value;
|
|
5810
|
-
if (!node) return;
|
|
5811
|
-
node.style.height = "auto";
|
|
5812
|
-
node.style.height = `${node.scrollHeight}px`;
|
|
5813
|
-
if (document.activeElement === node) reveal(node);
|
|
5814
|
-
}
|
|
5815
|
-
function reveal(node) {
|
|
5816
|
-
const scroller = area.value?.viewport ?? node.closest("[data-overlayscrollbars-initialize]");
|
|
5817
|
-
if (!scroller) return;
|
|
5818
|
-
const box = scroller.getBoundingClientRect();
|
|
5819
|
-
const top = node.getBoundingClientRect().top + caretTop(node);
|
|
5820
|
-
const bottom = top + parseFloat(getComputedStyle(node).lineHeight);
|
|
5821
|
-
if (bottom > box.bottom) scroller.scrollTop += bottom - box.bottom;
|
|
5822
|
-
else if (top < box.top) scroller.scrollTop -= box.top - top;
|
|
5823
|
-
}
|
|
5824
|
-
function focus(event) {
|
|
5825
|
-
const node = el.value;
|
|
5826
|
-
if (!node || node.disabled || event.target === node) return;
|
|
5827
|
-
node.focus();
|
|
5828
|
-
node.setSelectionRange(node.value.length, node.value.length);
|
|
5829
|
-
}
|
|
5830
|
-
onMounted(fit);
|
|
5831
|
-
watch(() => [
|
|
5832
|
-
model.value,
|
|
5833
|
-
props.size,
|
|
5834
|
-
bounds.value.min
|
|
5835
|
-
], () => void nextTick(fit));
|
|
5908
|
+
const { el, area, bounds, fit, focus } = useTextareaSizing(props, model);
|
|
5836
5909
|
return (_ctx, _cache) => {
|
|
5837
5910
|
return openBlock(), createElementBlock("div", {
|
|
5838
5911
|
"data-hn-textarea": "",
|
|
5839
5912
|
"data-invalid": unref(invalid) ? "" : void 0,
|
|
5840
5913
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
5841
5914
|
style: normalizeStyle({
|
|
5842
|
-
"--hn-textarea-rows": bounds.
|
|
5843
|
-
"--hn-textarea-max-rows": bounds.
|
|
5915
|
+
"--hn-textarea-rows": unref(bounds).min,
|
|
5916
|
+
"--hn-textarea-max-rows": unref(bounds).max
|
|
5844
5917
|
}),
|
|
5845
5918
|
class: normalizeClass(unref(cn)(unref(textarea)({
|
|
5846
5919
|
variant: props.variant,
|
|
@@ -5848,7 +5921,7 @@ var Textarea_default = /* @__PURE__ */ defineComponent({
|
|
|
5848
5921
|
autosize: Boolean(props.autosize),
|
|
5849
5922
|
resize: props.autosize ? "none" : props.resize
|
|
5850
5923
|
}), props.class)),
|
|
5851
|
-
onClick: focus
|
|
5924
|
+
onClick: _cache[2] || (_cache[2] = (...args) => unref(focus) && unref(focus)(...args))
|
|
5852
5925
|
}, [createVNode(ScrollArea_default, {
|
|
5853
5926
|
ref_key: "area",
|
|
5854
5927
|
ref: area,
|
|
@@ -5861,28 +5934,34 @@ var Textarea_default = /* @__PURE__ */ defineComponent({
|
|
|
5861
5934
|
}, _ctx.$attrs, {
|
|
5862
5935
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
5863
5936
|
id: unref(fieldId),
|
|
5864
|
-
rows: bounds.
|
|
5937
|
+
rows: unref(bounds).min,
|
|
5865
5938
|
disabled: unref(disabled),
|
|
5866
5939
|
"aria-invalid": unref(invalid) || void 0,
|
|
5867
5940
|
"aria-describedby": unref(describedBy),
|
|
5868
5941
|
class: unref(textareaField)(),
|
|
5869
|
-
onInput: fit
|
|
5870
|
-
}), null, 16, _hoisted_2$
|
|
5942
|
+
onInput: _cache[1] || (_cache[1] = (...args) => unref(fit) && unref(fit)(...args))
|
|
5943
|
+
}), null, 16, _hoisted_2$34), [[vModelText, model.value]])]),
|
|
5871
5944
|
_: 1
|
|
5872
|
-
}, 512)], 14, _hoisted_1$
|
|
5945
|
+
}, 512)], 14, _hoisted_1$73);
|
|
5873
5946
|
};
|
|
5874
5947
|
}
|
|
5875
5948
|
});
|
|
5876
5949
|
//#endregion
|
|
5877
5950
|
//#region src/components/number-input/number-input.variants.ts
|
|
5878
5951
|
var numberInputStepper = tv({
|
|
5879
|
-
base: "
|
|
5880
|
-
variants: {
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5952
|
+
base: "flex shrink-0 flex-col",
|
|
5953
|
+
variants: {
|
|
5954
|
+
divided: { true: "border-line border-s" },
|
|
5955
|
+
size: {
|
|
5956
|
+
sm: "[&_svg]:size-3",
|
|
5957
|
+
md: "[&_svg]:size-3",
|
|
5958
|
+
lg: "[&_svg]:size-3.5"
|
|
5959
|
+
}
|
|
5960
|
+
},
|
|
5961
|
+
defaultVariants: {
|
|
5962
|
+
size: "md",
|
|
5963
|
+
divided: true
|
|
5964
|
+
}
|
|
5886
5965
|
});
|
|
5887
5966
|
var numberInputStep = tv({
|
|
5888
5967
|
base: [
|
|
@@ -5927,6 +6006,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
5927
6006
|
const emits = __emit;
|
|
5928
6007
|
const t = useUiLocale();
|
|
5929
6008
|
const group = injectInputGroup();
|
|
6009
|
+
const divided = computed(() => (group ? group.variant?.value : props.variant) !== "bare");
|
|
5930
6010
|
const size = computed(() => group ? group.size.value : props.size);
|
|
5931
6011
|
const { id: fieldId, invalid, disabled, describedBy } = useFieldControl({
|
|
5932
6012
|
invalid: () => props.invalid || !!group?.invalid.value,
|
|
@@ -5949,7 +6029,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
5949
6029
|
"data-hn-number-input": "",
|
|
5950
6030
|
"data-invalid": unref(invalid) ? "" : void 0,
|
|
5951
6031
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
5952
|
-
class: unref(cn)(unref(group) ? unref(inputEmbedded)() : unref(
|
|
6032
|
+
class: unref(cn)(unref(group) ? unref(inputEmbedded)() : unref(textInputHost)({
|
|
5953
6033
|
variant: props.variant,
|
|
5954
6034
|
size: props.size
|
|
5955
6035
|
}), props.class)
|
|
@@ -5966,7 +6046,10 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
5966
6046
|
"class"
|
|
5967
6047
|
]), props.controls ? (openBlock(), createElementBlock("div", {
|
|
5968
6048
|
key: 0,
|
|
5969
|
-
class: normalizeClass(unref(numberInputStepper)({
|
|
6049
|
+
class: normalizeClass(unref(numberInputStepper)({
|
|
6050
|
+
size: size.value,
|
|
6051
|
+
divided: divided.value
|
|
6052
|
+
}))
|
|
5970
6053
|
}, [createVNode(unref(NumberFieldIncrement), {
|
|
5971
6054
|
"aria-label": unref(t).numberInput.increase,
|
|
5972
6055
|
class: normalizeClass(unref(numberInputStep)())
|
|
@@ -5975,7 +6058,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
5975
6058
|
_: 1
|
|
5976
6059
|
}, 8, ["aria-label", "class"]), createVNode(unref(NumberFieldDecrement), {
|
|
5977
6060
|
"aria-label": unref(t).numberInput.decrease,
|
|
5978
|
-
class: normalizeClass(unref(numberInputStep)({ divided:
|
|
6061
|
+
class: normalizeClass(unref(numberInputStep)({ divided: divided.value }))
|
|
5979
6062
|
}, {
|
|
5980
6063
|
default: withCtx(() => [createVNode(unref(ChevronDown))]),
|
|
5981
6064
|
_: 1
|
|
@@ -5993,7 +6076,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
5993
6076
|
});
|
|
5994
6077
|
//#endregion
|
|
5995
6078
|
//#region src/components/password-input/PasswordInput.vue?vue&type=script&setup=true&lang.ts
|
|
5996
|
-
var _hoisted_1$
|
|
6079
|
+
var _hoisted_1$72 = { class: "relative inline-flex" };
|
|
5997
6080
|
//#endregion
|
|
5998
6081
|
//#region src/components/password-input/PasswordInput.vue
|
|
5999
6082
|
var PasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6037,7 +6120,7 @@ var PasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
6037
6120
|
disabled: props.disabled,
|
|
6038
6121
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value)
|
|
6039
6122
|
}, {
|
|
6040
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
6123
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$72, [createVNode(Transition, {
|
|
6041
6124
|
"enter-active-class": "hn-transition-base",
|
|
6042
6125
|
"enter-from-class": "scale-90 opacity-0",
|
|
6043
6126
|
"leave-active-class": "hn-transition absolute",
|
|
@@ -6124,15 +6207,15 @@ var SearchInput_default = /* @__PURE__ */ defineComponent({
|
|
|
6124
6207
|
});
|
|
6125
6208
|
//#endregion
|
|
6126
6209
|
//#region src/components/input-group/input-group.variants.ts
|
|
6127
|
-
var inputGroup = tv({
|
|
6128
|
-
"[
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6210
|
+
var inputGroup = tv({
|
|
6211
|
+
base: ["[&>button]:h-auto [&>button]:rounded-none [&>button]:[--hn-press-scale:1]", "[&>button:focus-visible]:-outline-offset-2"],
|
|
6212
|
+
variants: { divided: { true: "[&>*+*]:border-s [&>*+*]:border-s-line" } },
|
|
6213
|
+
defaultVariants: { divided: true }
|
|
6214
|
+
});
|
|
6132
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)]" });
|
|
6133
6216
|
//#endregion
|
|
6134
6217
|
//#region src/components/input-group/InputGroup.vue?vue&type=script&setup=true&lang.ts
|
|
6135
|
-
var _hoisted_1$
|
|
6218
|
+
var _hoisted_1$71 = ["data-invalid", "data-disabled"];
|
|
6136
6219
|
//#endregion
|
|
6137
6220
|
//#region src/components/input-group/InputGroup.vue
|
|
6138
6221
|
var InputGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6149,6 +6232,7 @@ var InputGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
6149
6232
|
const props = __props;
|
|
6150
6233
|
const { disabled } = useFieldControl({ disabled: () => props.disabled });
|
|
6151
6234
|
provideInputGroup({
|
|
6235
|
+
variant: computed(() => props.variant),
|
|
6152
6236
|
size: computed(() => props.size),
|
|
6153
6237
|
disabled,
|
|
6154
6238
|
invalid: computed(() => !!props.invalid)
|
|
@@ -6158,12 +6242,12 @@ var InputGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
6158
6242
|
"data-hn-input-group": "",
|
|
6159
6243
|
"data-invalid": props.invalid ? "" : void 0,
|
|
6160
6244
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
6161
|
-
class: normalizeClass(unref(cn)(unref(
|
|
6245
|
+
class: normalizeClass(unref(cn)(unref(textInputHost)({
|
|
6162
6246
|
variant: props.variant,
|
|
6163
6247
|
size: props.size
|
|
6164
|
-
}), unref(inputGroup)(), props.class)),
|
|
6248
|
+
}), unref(inputGroup)({ divided: props.variant !== "bare" }), props.class)),
|
|
6165
6249
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(focusFieldFrom)($event.currentTarget, $event.target))
|
|
6166
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$
|
|
6250
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$71);
|
|
6167
6251
|
};
|
|
6168
6252
|
}
|
|
6169
6253
|
});
|
|
@@ -6302,6 +6386,11 @@ var selectTrigger = tv({ base: [
|
|
|
6302
6386
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
6303
6387
|
"[&_svg]:size-[var(--hn-input-icon)] [&_svg]:shrink-0"
|
|
6304
6388
|
] });
|
|
6389
|
+
var selectButton = tv({ base: [
|
|
6390
|
+
"group/hn-disclosure flex h-full min-w-0 flex-1 cursor-pointer items-center bg-transparent ps-[var(--hn-input-px)] pe-0 text-start text-inherit outline-none [font:inherit]",
|
|
6391
|
+
"data-placeholder:text-faint data-placeholder:font-normal disabled:cursor-not-allowed",
|
|
6392
|
+
"[&_svg]:size-[var(--hn-input-icon)] [&_svg]:shrink-0"
|
|
6393
|
+
] });
|
|
6305
6394
|
var selectContent = tv({ base: ["hn-anim-pop z-(--hn-z-overlay) flex w-[var(--reka-select-trigger-width)] min-w-40 flex-col overflow-hidden shadow-md outline-none", "[&[data-hn-fresh]_[data-highlighted]:not(:hover)]:[--hn-state-hover-opacity:0]"] });
|
|
6306
6395
|
var selectList = tv({ base: "max-h-[min(20rem,var(--reka-select-content-available-height))]" });
|
|
6307
6396
|
var selectItem = tv({ base: [
|
|
@@ -6313,30 +6402,36 @@ var selectItem = tv({ base: [
|
|
|
6313
6402
|
var selectLabel = tv({ base: "text-muted px-2.5 py-1.5 text-xs font-medium" });
|
|
6314
6403
|
var selectEmpty = tv({ base: "text-muted px-2.5 py-2 text-sm" });
|
|
6315
6404
|
var selectListBody = tv({ base: "flex flex-col p-1" });
|
|
6405
|
+
var selectHost = tv({ base: "relative cursor-pointer" });
|
|
6406
|
+
var selectValue = tv({
|
|
6407
|
+
base: "min-w-0 flex-1 truncate",
|
|
6408
|
+
variants: { clearing: { true: "pe-[var(--hn-input-h)]" } }
|
|
6409
|
+
});
|
|
6410
|
+
var selectClearSlot = tv({ base: [inputActionSlot(), "absolute inset-y-0 end-[var(--hn-input-h)]"] });
|
|
6316
6411
|
//#endregion
|
|
6317
6412
|
//#region src/components/select/types.ts
|
|
6318
6413
|
function isOptionGroup(item) {
|
|
6319
|
-
return "options" in item;
|
|
6414
|
+
return !("value" in item) && "options" in item;
|
|
6320
6415
|
}
|
|
6321
6416
|
function flattenOptions(items) {
|
|
6322
6417
|
return items.flatMap((item) => isOptionGroup(item) ? item.options : [item]);
|
|
6323
6418
|
}
|
|
6324
6419
|
//#endregion
|
|
6325
6420
|
//#region src/components/select/SelectList.vue?vue&type=script&setup=true&lang.ts
|
|
6326
|
-
var _hoisted_1$
|
|
6327
|
-
var _hoisted_2$
|
|
6328
|
-
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 = {
|
|
6329
6424
|
key: 0,
|
|
6330
6425
|
class: "text-muted block truncate text-xs"
|
|
6331
6426
|
};
|
|
6332
6427
|
var _hoisted_4$13 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
6333
|
-
var _hoisted_5$
|
|
6334
|
-
var _hoisted_6$
|
|
6335
|
-
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 = {
|
|
6336
6431
|
key: 0,
|
|
6337
6432
|
class: "text-muted block truncate text-xs"
|
|
6338
6433
|
};
|
|
6339
|
-
var _hoisted_8$
|
|
6434
|
+
var _hoisted_8$1 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
6340
6435
|
//#endregion
|
|
6341
6436
|
//#region src/components/select/SelectList.vue
|
|
6342
6437
|
var SelectList_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6382,7 +6477,7 @@ var SelectList_default = /* @__PURE__ */ defineComponent({
|
|
|
6382
6477
|
class: normalizeClass(unref(selectItem)())
|
|
6383
6478
|
}, {
|
|
6384
6479
|
default: withCtx(() => [createVNode(unref(SelectItemText), { "as-child": "" }, {
|
|
6385
|
-
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)])])]),
|
|
6386
6481
|
_: 2
|
|
6387
6482
|
}, 1024), createElementVNode("span", _hoisted_4$13, [createVNode(unref(SelectItemIndicator), null, {
|
|
6388
6483
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
@@ -6405,9 +6500,9 @@ var SelectList_default = /* @__PURE__ */ defineComponent({
|
|
|
6405
6500
|
class: normalizeClass(unref(selectItem)())
|
|
6406
6501
|
}, {
|
|
6407
6502
|
default: withCtx(() => [createVNode(unref(SelectItemText), { "as-child": "" }, {
|
|
6408
|
-
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)])])]),
|
|
6409
6504
|
_: 2
|
|
6410
|
-
}, 1024), createElementVNode("span", _hoisted_8$
|
|
6505
|
+
}, 1024), createElementVNode("span", _hoisted_8$1, [createVNode(unref(SelectItemIndicator), null, {
|
|
6411
6506
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
6412
6507
|
_: 1
|
|
6413
6508
|
})])]),
|
|
@@ -6434,8 +6529,38 @@ var SelectList_default = /* @__PURE__ */ defineComponent({
|
|
|
6434
6529
|
}
|
|
6435
6530
|
});
|
|
6436
6531
|
//#endregion
|
|
6532
|
+
//#region src/components/select/composables/useClearTransition.ts
|
|
6533
|
+
function useClearTransition(visible) {
|
|
6534
|
+
const leaving = ref(false);
|
|
6535
|
+
const reserved = computed(() => visible() || leaving.value);
|
|
6536
|
+
function beforeEnter(element) {
|
|
6537
|
+
leaving.value = false;
|
|
6538
|
+
element.removeAttribute("inert");
|
|
6539
|
+
}
|
|
6540
|
+
function beforeLeave(element) {
|
|
6541
|
+
leaving.value = true;
|
|
6542
|
+
element.setAttribute("inert", "");
|
|
6543
|
+
}
|
|
6544
|
+
function finishLeave() {
|
|
6545
|
+
leaving.value = false;
|
|
6546
|
+
}
|
|
6547
|
+
return {
|
|
6548
|
+
reserved,
|
|
6549
|
+
hooks: {
|
|
6550
|
+
beforeEnter,
|
|
6551
|
+
beforeLeave,
|
|
6552
|
+
afterLeave: finishLeave,
|
|
6553
|
+
leaveCancelled: finishLeave
|
|
6554
|
+
}
|
|
6555
|
+
};
|
|
6556
|
+
}
|
|
6557
|
+
//#endregion
|
|
6437
6558
|
//#region src/components/select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
6438
|
-
var _hoisted_1$
|
|
6559
|
+
var _hoisted_1$69 = [
|
|
6560
|
+
"dir",
|
|
6561
|
+
"data-invalid",
|
|
6562
|
+
"data-disabled"
|
|
6563
|
+
];
|
|
6439
6564
|
//#endregion
|
|
6440
6565
|
//#region src/components/select/Select.vue
|
|
6441
6566
|
var Select_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6445,6 +6570,7 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
6445
6570
|
props: /*@__PURE__*/ mergeModels({
|
|
6446
6571
|
options: {},
|
|
6447
6572
|
placeholder: {},
|
|
6573
|
+
clearable: { type: Boolean },
|
|
6448
6574
|
name: {},
|
|
6449
6575
|
required: { type: Boolean },
|
|
6450
6576
|
autocomplete: {},
|
|
@@ -6462,19 +6588,31 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
6462
6588
|
},
|
|
6463
6589
|
"openModifiers": {}
|
|
6464
6590
|
}),
|
|
6465
|
-
emits: ["update:modelValue", "update:open"],
|
|
6466
|
-
setup(__props) {
|
|
6591
|
+
emits: /*@__PURE__*/ mergeModels(["clear"], ["update:modelValue", "update:open"]),
|
|
6592
|
+
setup(__props, { emit: __emit }) {
|
|
6467
6593
|
const props = __props;
|
|
6594
|
+
const emit = __emit;
|
|
6468
6595
|
const model = useModel(__props, "modelValue");
|
|
6469
6596
|
const open = useModel(__props, "open");
|
|
6470
6597
|
const t = useUiLocale();
|
|
6471
6598
|
const group = injectInputGroup();
|
|
6599
|
+
const direction = useDirection();
|
|
6472
6600
|
const keyboard = ref(false);
|
|
6601
|
+
const host = shallowRef(null);
|
|
6602
|
+
const trigger = shallowRef(null);
|
|
6473
6603
|
const { id: fieldId, invalid, disabled, describedBy } = useFieldControl({
|
|
6474
6604
|
invalid: () => props.invalid || !!group?.invalid.value,
|
|
6475
6605
|
disabled: () => props.disabled || !!group?.disabled.value
|
|
6476
6606
|
});
|
|
6477
6607
|
const selected = computed(() => flattenOptions(props.options).find((option) => option.value === model.value));
|
|
6608
|
+
const clearing = computed(() => !!props.clearable && model.value != null && model.value !== "" && !disabled.value);
|
|
6609
|
+
const { reserved: clearSpace, hooks: clearTransition } = useClearTransition(() => clearing.value);
|
|
6610
|
+
function clear() {
|
|
6611
|
+
if (disabled.value || model.value == null || model.value === "") return;
|
|
6612
|
+
model.value = null;
|
|
6613
|
+
emit("clear");
|
|
6614
|
+
trigger.value?.$el.focus();
|
|
6615
|
+
}
|
|
6478
6616
|
return (_ctx, _cache) => {
|
|
6479
6617
|
return openBlock(), createBlock(unref(SelectRoot), {
|
|
6480
6618
|
modelValue: model.value,
|
|
@@ -6486,30 +6624,57 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
6486
6624
|
required: props.required,
|
|
6487
6625
|
autocomplete: props.autocomplete
|
|
6488
6626
|
}, {
|
|
6489
|
-
default: withCtx(() => [
|
|
6490
|
-
|
|
6491
|
-
|
|
6627
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
6628
|
+
ref_key: "host",
|
|
6629
|
+
ref: host,
|
|
6630
|
+
dir: unref(direction),
|
|
6492
6631
|
"data-hn-select": "",
|
|
6493
|
-
onKeydown: _cache[0] || (_cache[0] = ($event) => keyboard.value = true),
|
|
6494
|
-
onPointerdown: _cache[1] || (_cache[1] = ($event) => keyboard.value = false),
|
|
6495
6632
|
"data-invalid": unref(invalid) ? "" : void 0,
|
|
6496
6633
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
6497
|
-
|
|
6498
|
-
class: unref(cn)(unref(group) ? unref(inputEmbedded)() : unref(inputHost)({
|
|
6634
|
+
class: normalizeClass(unref(cn)(unref(group) ? unref(inputEmbedded)() : unref(inputHost)({
|
|
6499
6635
|
variant: props.variant,
|
|
6500
6636
|
size: props.size
|
|
6501
|
-
}), unref(
|
|
6637
|
+
}), unref(selectHost)(), props.class))
|
|
6638
|
+
}, [createVNode(unref(SelectTrigger), mergeProps({
|
|
6639
|
+
ref_key: "trigger",
|
|
6640
|
+
ref: trigger
|
|
6641
|
+
}, _ctx.$attrs, {
|
|
6642
|
+
reference: host.value ?? void 0,
|
|
6643
|
+
id: unref(fieldId),
|
|
6644
|
+
"aria-describedby": unref(describedBy),
|
|
6645
|
+
"aria-invalid": unref(invalid) || void 0,
|
|
6646
|
+
"data-hn-select-trigger": "",
|
|
6647
|
+
onKeydown: _cache[0] || (_cache[0] = ($event) => keyboard.value = true),
|
|
6648
|
+
onPointerdown: _cache[1] || (_cache[1] = ($event) => keyboard.value = false),
|
|
6649
|
+
class: unref(selectButton)()
|
|
6502
6650
|
}), {
|
|
6503
|
-
default: withCtx(() => [createElementVNode("span",
|
|
6651
|
+
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(unref(selectValue)({ clearing: unref(clearSpace) })) }, [selected.value ? renderSlot(_ctx.$slots, "value", { option: selected.value }, () => [createTextVNode(toDisplayString(selected.value.label), 1)], void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(props.placeholder ?? unref(t).select.placeholder), 1)], 64))], 2), createElementVNode("span", { class: normalizeClass(unref(inputAdornment)()) }, [createVNode(DisclosureIcon_default)], 2)]),
|
|
6504
6652
|
_: 3
|
|
6505
6653
|
}, 16, [
|
|
6654
|
+
"reference",
|
|
6506
6655
|
"id",
|
|
6507
6656
|
"aria-describedby",
|
|
6508
|
-
"data-invalid",
|
|
6509
|
-
"data-disabled",
|
|
6510
6657
|
"aria-invalid",
|
|
6511
6658
|
"class"
|
|
6512
|
-
]), createVNode(
|
|
6659
|
+
]), createVNode(Transition, mergeProps({
|
|
6660
|
+
"enter-active-class": "hn-transition-base",
|
|
6661
|
+
"enter-from-class": "scale-90 opacity-0",
|
|
6662
|
+
"leave-active-class": "hn-transition",
|
|
6663
|
+
"leave-to-class": "scale-90 opacity-0"
|
|
6664
|
+
}, toHandlers(unref(clearTransition))), {
|
|
6665
|
+
default: withCtx(() => [clearing.value ? (openBlock(), createElementBlock("span", {
|
|
6666
|
+
key: 0,
|
|
6667
|
+
class: normalizeClass(unref(selectClearSlot)())
|
|
6668
|
+
}, [createVNode(InputAction_default, {
|
|
6669
|
+
"data-hn-select-clear": "",
|
|
6670
|
+
label: unref(t).common.clear,
|
|
6671
|
+
onClick: clear
|
|
6672
|
+
}, {
|
|
6673
|
+
default: withCtx(() => [createVNode(unref(X))]),
|
|
6674
|
+
_: 1
|
|
6675
|
+
}, 8, ["label"])], 2)) : createCommentVNode("", true)]),
|
|
6676
|
+
_: 1
|
|
6677
|
+
}, 16)], 10, _hoisted_1$69), createVNode(SelectList_default, {
|
|
6513
6678
|
options: props.options,
|
|
6514
6679
|
keyboard: keyboard.value
|
|
6515
6680
|
}, {
|
|
@@ -6538,12 +6703,12 @@ var multiSelectTrigger = tv({ base: [
|
|
|
6538
6703
|
var multiSelectChips = tv({ base: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden" });
|
|
6539
6704
|
//#endregion
|
|
6540
6705
|
//#region src/components/multi-select/MultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
6541
|
-
var _hoisted_1$
|
|
6542
|
-
var _hoisted_2$
|
|
6706
|
+
var _hoisted_1$68 = { class: "min-w-0 truncate" };
|
|
6707
|
+
var _hoisted_2$32 = {
|
|
6543
6708
|
key: 1,
|
|
6544
6709
|
class: "min-w-0 truncate"
|
|
6545
6710
|
};
|
|
6546
|
-
var _hoisted_3$
|
|
6711
|
+
var _hoisted_3$16 = [
|
|
6547
6712
|
"name",
|
|
6548
6713
|
"required",
|
|
6549
6714
|
"autocomplete",
|
|
@@ -6653,7 +6818,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
6653
6818
|
onClick: isolate,
|
|
6654
6819
|
onRemove: ($event) => remove(option.value)
|
|
6655
6820
|
}, {
|
|
6656
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
6821
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$68, toDisplayString(option.label), 1)]),
|
|
6657
6822
|
_: 2
|
|
6658
6823
|
}, 1032, [
|
|
6659
6824
|
"size",
|
|
@@ -6668,7 +6833,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
6668
6833
|
}, {
|
|
6669
6834
|
default: withCtx(() => [createTextVNode(" +" + toDisplayString(overflow.value), 1)]),
|
|
6670
6835
|
_: 1
|
|
6671
|
-
}, 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),
|
|
6672
6837
|
createVNode(Transition, {
|
|
6673
6838
|
"enter-active-class": "hn-transition-base",
|
|
6674
6839
|
"enter-from-class": "scale-90 opacity-0",
|
|
@@ -6721,7 +6886,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
6721
6886
|
value: option.value,
|
|
6722
6887
|
disabled: option.disabled
|
|
6723
6888
|
}, toDisplayString(option.label), 9, _hoisted_4$12);
|
|
6724
|
-
}), 128))], 8, _hoisted_3$
|
|
6889
|
+
}), 128))], 8, _hoisted_3$16), [[vModelSelect, model.value]])]),
|
|
6725
6890
|
_: 1
|
|
6726
6891
|
})) : createCommentVNode("", true),
|
|
6727
6892
|
createVNode(SelectList_default, {
|
|
@@ -6748,20 +6913,20 @@ var comboboxContent = tv({ base: ["hn-anim-pop z-(--hn-z-overlay) flex w-[var(--
|
|
|
6748
6913
|
var comboboxList = tv({ base: "max-h-[min(20rem,var(--reka-combobox-content-available-height))]" });
|
|
6749
6914
|
//#endregion
|
|
6750
6915
|
//#region src/components/combobox/ComboboxList.vue?vue&type=script&setup=true&lang.ts
|
|
6751
|
-
var _hoisted_1$
|
|
6752
|
-
var _hoisted_2$
|
|
6753
|
-
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 = {
|
|
6754
6919
|
key: 0,
|
|
6755
6920
|
class: "text-muted block truncate text-xs"
|
|
6756
6921
|
};
|
|
6757
6922
|
var _hoisted_4$11 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
6758
|
-
var _hoisted_5$
|
|
6759
|
-
var _hoisted_6$
|
|
6760
|
-
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 = {
|
|
6761
6926
|
key: 0,
|
|
6762
6927
|
class: "text-muted block truncate text-xs"
|
|
6763
6928
|
};
|
|
6764
|
-
var _hoisted_8
|
|
6929
|
+
var _hoisted_8 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
6765
6930
|
//#endregion
|
|
6766
6931
|
//#region src/components/combobox/ComboboxList.vue
|
|
6767
6932
|
var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6806,7 +6971,7 @@ var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
|
6806
6971
|
disabled: option.disabled,
|
|
6807
6972
|
class: normalizeClass(unref(selectItem)())
|
|
6808
6973
|
}, {
|
|
6809
|
-
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, {
|
|
6810
6975
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
6811
6976
|
_: 1
|
|
6812
6977
|
})])]),
|
|
@@ -6826,7 +6991,7 @@ var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
|
6826
6991
|
disabled: item.disabled,
|
|
6827
6992
|
class: normalizeClass(unref(selectItem)())
|
|
6828
6993
|
}, {
|
|
6829
|
-
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, {
|
|
6830
6995
|
default: withCtx(() => [createVNode(unref(Check))]),
|
|
6831
6996
|
_: 1
|
|
6832
6997
|
})])]),
|
|
@@ -6854,7 +7019,7 @@ var ComboboxList_default = /* @__PURE__ */ defineComponent({
|
|
|
6854
7019
|
});
|
|
6855
7020
|
//#endregion
|
|
6856
7021
|
//#region src/components/combobox/Combobox.vue?vue&type=script&setup=true&lang.ts
|
|
6857
|
-
var _hoisted_1$
|
|
7022
|
+
var _hoisted_1$66 = ["data-invalid", "data-disabled"];
|
|
6858
7023
|
//#endregion
|
|
6859
7024
|
//#region src/components/combobox/Combobox.vue
|
|
6860
7025
|
var Combobox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6994,7 +7159,7 @@ var Combobox_default = /* @__PURE__ */ defineComponent({
|
|
|
6994
7159
|
"disabled",
|
|
6995
7160
|
"class"
|
|
6996
7161
|
])
|
|
6997
|
-
], 42, _hoisted_1$
|
|
7162
|
+
], 42, _hoisted_1$66)]),
|
|
6998
7163
|
_: 1
|
|
6999
7164
|
}), createVNode(ComboboxList_default, {
|
|
7000
7165
|
options: props.options,
|
|
@@ -7043,11 +7208,11 @@ var commandItemHint = tv({ base: "ms-auto flex shrink-0 items-center gap-1" });
|
|
|
7043
7208
|
var commandEmpty = tv({ base: "text-muted px-4 py-8 text-center text-sm" });
|
|
7044
7209
|
//#endregion
|
|
7045
7210
|
//#region src/components/command-palette/CommandPaletteItem.vue?vue&type=script&setup=true&lang.ts
|
|
7046
|
-
var _hoisted_1$
|
|
7047
|
-
var _hoisted_2$
|
|
7048
|
-
var _hoisted_3$
|
|
7211
|
+
var _hoisted_1$65 = { class: "truncate" };
|
|
7212
|
+
var _hoisted_2$30 = ["textContent"];
|
|
7213
|
+
var _hoisted_3$14 = ["textContent"];
|
|
7049
7214
|
var _hoisted_4$10 = ["textContent"];
|
|
7050
|
-
var _hoisted_5$
|
|
7215
|
+
var _hoisted_5$6 = {
|
|
7051
7216
|
key: 0,
|
|
7052
7217
|
class: "text-muted truncate text-xs"
|
|
7053
7218
|
};
|
|
@@ -7088,18 +7253,18 @@ var CommandPaletteItem_default = /* @__PURE__ */ defineComponent({
|
|
|
7088
7253
|
"aria-hidden": "true",
|
|
7089
7254
|
class: "text-muted"
|
|
7090
7255
|
})) : createCommentVNode("", true),
|
|
7091
|
-
createElementVNode("span", { class: normalizeClass(unref(commandItemBody)()) }, [createElementVNode("span", _hoisted_1$
|
|
7092
|
-
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),
|
|
7093
7258
|
parts.value[1] ? (openBlock(), createElementBlock("span", {
|
|
7094
7259
|
key: 0,
|
|
7095
7260
|
class: normalizeClass(unref(commandItemMatch)()),
|
|
7096
7261
|
textContent: toDisplayString(parts.value[1])
|
|
7097
|
-
}, null, 10, _hoisted_3$
|
|
7262
|
+
}, null, 10, _hoisted_3$14)) : createCommentVNode("", true),
|
|
7098
7263
|
parts.value[2] ? (openBlock(), createElementBlock("span", {
|
|
7099
7264
|
key: 1,
|
|
7100
7265
|
textContent: toDisplayString(parts.value[2])
|
|
7101
7266
|
}, null, 8, _hoisted_4$10)) : createCommentVNode("", true)
|
|
7102
|
-
]), 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),
|
|
7103
7268
|
props.match.item.kbd?.length ? (openBlock(), createElementBlock("span", {
|
|
7104
7269
|
key: 1,
|
|
7105
7270
|
class: normalizeClass(unref(commandItemHint)())
|
|
@@ -7439,32 +7604,61 @@ var CommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
7439
7604
|
}
|
|
7440
7605
|
});
|
|
7441
7606
|
//#endregion
|
|
7607
|
+
//#region src/components/listbox/ListboxOptionContent.vue?vue&type=script&setup=true&lang.ts
|
|
7608
|
+
var _hoisted_1$64 = { class: "min-w-0 flex-1" };
|
|
7609
|
+
var _hoisted_2$29 = { class: "block truncate" };
|
|
7610
|
+
var _hoisted_3$13 = {
|
|
7611
|
+
key: 0,
|
|
7612
|
+
class: "text-muted block truncate text-xs"
|
|
7613
|
+
};
|
|
7614
|
+
var _hoisted_4$9 = {
|
|
7615
|
+
key: 1,
|
|
7616
|
+
class: "flex size-4 shrink-0 items-center justify-center"
|
|
7617
|
+
};
|
|
7618
|
+
//#endregion
|
|
7619
|
+
//#region src/components/listbox/ListboxOptionContent.vue
|
|
7620
|
+
var ListboxOptionContent_default = /* @__PURE__ */ defineComponent({
|
|
7621
|
+
name: "HnListboxOptionContent",
|
|
7622
|
+
inheritAttrs: false,
|
|
7623
|
+
__name: "ListboxOptionContent",
|
|
7624
|
+
props: { option: {} },
|
|
7625
|
+
setup(__props) {
|
|
7626
|
+
const props = __props;
|
|
7627
|
+
const slots = useSlots();
|
|
7628
|
+
const { isSelected: selected } = injectListboxItemContext();
|
|
7629
|
+
return (_ctx, _cache) => {
|
|
7630
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("span", _hoisted_1$64, [renderSlot(_ctx.$slots, "option", {
|
|
7631
|
+
option: props.option,
|
|
7632
|
+
selected: unref(selected)
|
|
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", {
|
|
7634
|
+
option: props.option,
|
|
7635
|
+
selected: unref(selected)
|
|
7636
|
+
}, void 0, void 0, 0) : (openBlock(), createElementBlock("span", _hoisted_4$9, [createVNode(unref(ListboxItemIndicator), null, {
|
|
7637
|
+
default: withCtx(() => [createVNode(unref(Check))]),
|
|
7638
|
+
_: 1
|
|
7639
|
+
})]))], 64);
|
|
7640
|
+
};
|
|
7641
|
+
}
|
|
7642
|
+
});
|
|
7643
|
+
//#endregion
|
|
7442
7644
|
//#region src/components/listbox/listbox.variants.ts
|
|
7443
7645
|
var listbox = tv({
|
|
7444
7646
|
base: ["flex w-full min-w-0 flex-col overflow-hidden rounded-md data-disabled:opacity-50", "[&:not(:focus-within)_[data-highlighted]:not(:hover)]:[--hn-state-hover-opacity:0]"],
|
|
7445
7647
|
variants: { variant: {
|
|
7446
7648
|
primary: "border-line bg-surface border shadow-sm",
|
|
7447
|
-
secondary: "bg-inset"
|
|
7649
|
+
secondary: "bg-inset",
|
|
7650
|
+
bare: "rounded-none border-0 bg-transparent shadow-none"
|
|
7448
7651
|
} },
|
|
7449
7652
|
defaultVariants: { variant: "primary" }
|
|
7450
7653
|
});
|
|
7451
|
-
var listboxContent = tv({
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
};
|
|
7460
|
-
var _hoisted_4$9 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
7461
|
-
var _hoisted_5$6 = { class: "min-w-0 flex-1" };
|
|
7462
|
-
var _hoisted_6$5 = { class: "block truncate" };
|
|
7463
|
-
var _hoisted_7$4 = {
|
|
7464
|
-
key: 0,
|
|
7465
|
-
class: "text-muted block truncate text-xs"
|
|
7466
|
-
};
|
|
7467
|
-
var _hoisted_8 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
7654
|
+
var listboxContent = tv({
|
|
7655
|
+
base: "flex flex-col outline-none",
|
|
7656
|
+
variants: { padded: {
|
|
7657
|
+
true: "p-1",
|
|
7658
|
+
false: "p-0"
|
|
7659
|
+
} },
|
|
7660
|
+
defaultVariants: { padded: true }
|
|
7661
|
+
});
|
|
7468
7662
|
//#endregion
|
|
7469
7663
|
//#region src/components/listbox/Listbox.vue
|
|
7470
7664
|
var Listbox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7475,6 +7669,10 @@ var Listbox_default = /* @__PURE__ */ defineComponent({
|
|
|
7475
7669
|
options: {},
|
|
7476
7670
|
multiple: { type: Boolean },
|
|
7477
7671
|
maxHeight: { default: "20rem" },
|
|
7672
|
+
padded: {
|
|
7673
|
+
type: Boolean,
|
|
7674
|
+
default: true
|
|
7675
|
+
},
|
|
7478
7676
|
variant: {},
|
|
7479
7677
|
disabled: { type: Boolean },
|
|
7480
7678
|
class: {}
|
|
@@ -7486,6 +7684,7 @@ var Listbox_default = /* @__PURE__ */ defineComponent({
|
|
|
7486
7684
|
setup(__props) {
|
|
7487
7685
|
const props = __props;
|
|
7488
7686
|
const model = useModel(__props, "modelValue");
|
|
7687
|
+
const slots = useSlots();
|
|
7489
7688
|
const t = useUiLocale();
|
|
7490
7689
|
const { labelledBy, invalid, disabled, describedBy } = useFieldControl({ disabled: () => props.disabled });
|
|
7491
7690
|
return (_ctx, _cache) => {
|
|
@@ -7503,7 +7702,7 @@ var Listbox_default = /* @__PURE__ */ defineComponent({
|
|
|
7503
7702
|
class: normalizeClass(unref(cn)(unref(listbox)({ variant: props.variant }), props.class))
|
|
7504
7703
|
}, {
|
|
7505
7704
|
default: withCtx(() => [createVNode(ScrollArea_default, { style: normalizeStyle({ maxHeight: props.maxHeight }) }, {
|
|
7506
|
-
default: withCtx(() => [createVNode(unref(ListboxContent), mergeProps(_ctx.$attrs, { class: unref(listboxContent)() }), {
|
|
7705
|
+
default: withCtx(() => [createVNode(unref(ListboxContent), mergeProps(_ctx.$attrs, { class: unref(listboxContent)({ padded: props.padded }) }), {
|
|
7507
7706
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
|
|
7508
7707
|
return openBlock(), createElementBlock(Fragment, { key: unref(isOptionGroup)(item) ? item.label : item.value }, [unref(isOptionGroup)(item) ? (openBlock(), createBlock(unref(ListboxGroup), { key: 0 }, {
|
|
7509
7708
|
default: withCtx(() => [createVNode(unref(ListboxGroupLabel), { class: normalizeClass(unref(selectLabel)()) }, {
|
|
@@ -7516,10 +7715,15 @@ var Listbox_default = /* @__PURE__ */ defineComponent({
|
|
|
7516
7715
|
disabled: option.disabled,
|
|
7517
7716
|
class: normalizeClass(unref(selectItem)())
|
|
7518
7717
|
}, {
|
|
7519
|
-
default: withCtx(() => [
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7718
|
+
default: withCtx(() => [createVNode(ListboxOptionContent_default, { option }, createSlots({ _: 2 }, [slots.option ? {
|
|
7719
|
+
name: "option",
|
|
7720
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, slotProps))]),
|
|
7721
|
+
key: "0"
|
|
7722
|
+
} : void 0, slots.trailing ? {
|
|
7723
|
+
name: "trailing",
|
|
7724
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "trailing", mergeProps({ ref_for: true }, slotProps))]),
|
|
7725
|
+
key: "1"
|
|
7726
|
+
} : void 0]), 1032, ["option"])]),
|
|
7523
7727
|
_: 2
|
|
7524
7728
|
}, 1032, [
|
|
7525
7729
|
"value",
|
|
@@ -7534,10 +7738,15 @@ var Listbox_default = /* @__PURE__ */ defineComponent({
|
|
|
7534
7738
|
disabled: item.disabled,
|
|
7535
7739
|
class: normalizeClass(unref(selectItem)())
|
|
7536
7740
|
}, {
|
|
7537
|
-
default: withCtx(() => [
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7741
|
+
default: withCtx(() => [createVNode(ListboxOptionContent_default, { option: item }, createSlots({ _: 2 }, [slots.option ? {
|
|
7742
|
+
name: "option",
|
|
7743
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, slotProps))]),
|
|
7744
|
+
key: "0"
|
|
7745
|
+
} : void 0, slots.trailing ? {
|
|
7746
|
+
name: "trailing",
|
|
7747
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "trailing", mergeProps({ ref_for: true }, slotProps))]),
|
|
7748
|
+
key: "1"
|
|
7749
|
+
} : void 0]), 1032, ["option"])]),
|
|
7541
7750
|
_: 2
|
|
7542
7751
|
}, 1032, [
|
|
7543
7752
|
"value",
|
|
@@ -7599,9 +7808,9 @@ function pathTo(nodes, value, trail = []) {
|
|
|
7599
7808
|
}
|
|
7600
7809
|
//#endregion
|
|
7601
7810
|
//#region src/components/tree-select/TreeSelect.vue?vue&type=script&setup=true&lang.ts
|
|
7602
|
-
var _hoisted_1$
|
|
7603
|
-
var _hoisted_2$
|
|
7604
|
-
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 = {
|
|
7605
7814
|
key: 1,
|
|
7606
7815
|
class: "size-5 shrink-0"
|
|
7607
7816
|
};
|
|
@@ -7611,7 +7820,7 @@ var _hoisted_6$4 = {
|
|
|
7611
7820
|
key: 0,
|
|
7612
7821
|
class: "text-muted block truncate text-xs"
|
|
7613
7822
|
};
|
|
7614
|
-
var _hoisted_7$
|
|
7823
|
+
var _hoisted_7$2 = { class: "flex size-4 shrink-0 items-center justify-center" };
|
|
7615
7824
|
//#endregion
|
|
7616
7825
|
//#region src/components/tree-select/TreeSelect.vue
|
|
7617
7826
|
var TreeSelect_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7687,7 +7896,7 @@ var TreeSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
7687
7896
|
size: props.size
|
|
7688
7897
|
}), unref(selectTrigger)(), props.class)
|
|
7689
7898
|
}), {
|
|
7690
|
-
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)]),
|
|
7691
7900
|
_: 1
|
|
7692
7901
|
}, 16, [
|
|
7693
7902
|
"id",
|
|
@@ -7738,9 +7947,9 @@ var TreeSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
7738
7947
|
}, [createVNode(DisclosureIcon_default, {
|
|
7739
7948
|
direction: "end",
|
|
7740
7949
|
open: isExpanded
|
|
7741
|
-
}, null, 8, ["open"])], 10, _hoisted_2$
|
|
7950
|
+
}, null, 8, ["open"])], 10, _hoisted_2$28)) : (openBlock(), createElementBlock("span", _hoisted_3$12)),
|
|
7742
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)])]),
|
|
7743
|
-
createElementVNode("span", _hoisted_7$
|
|
7952
|
+
createElementVNode("span", _hoisted_7$2, [isSelected ? (openBlock(), createBlock(unref(Check), { key: 0 })) : createCommentVNode("", true)])
|
|
7744
7953
|
]),
|
|
7745
7954
|
_: 2
|
|
7746
7955
|
}, 1040, [
|
|
@@ -7861,7 +8070,7 @@ var checkboxDescription = tv({
|
|
|
7861
8070
|
});
|
|
7862
8071
|
//#endregion
|
|
7863
8072
|
//#region src/components/checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
7864
|
-
var _hoisted_1$
|
|
8073
|
+
var _hoisted_1$62 = ["data-disabled"];
|
|
7865
8074
|
//#endregion
|
|
7866
8075
|
//#region src/components/checkbox/Checkbox.vue
|
|
7867
8076
|
var Checkbox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7958,7 +8167,7 @@ var Checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
7958
8167
|
controlPlacement: props.controlPlacement
|
|
7959
8168
|
}))
|
|
7960
8169
|
}, toDisplayString(props.description), 3)) : createCommentVNode("", true)
|
|
7961
|
-
], 10, _hoisted_1$
|
|
8170
|
+
], 10, _hoisted_1$62);
|
|
7962
8171
|
};
|
|
7963
8172
|
}
|
|
7964
8173
|
});
|
|
@@ -8081,7 +8290,7 @@ var CheckboxGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
8081
8290
|
var radioDot = tv({ base: "block size-[calc(var(--hn-checkbox-size)/2)] bg-surface rounded-full" });
|
|
8082
8291
|
//#endregion
|
|
8083
8292
|
//#region src/components/radio-group/RadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
8084
|
-
var _hoisted_1$
|
|
8293
|
+
var _hoisted_1$61 = ["data-disabled"];
|
|
8085
8294
|
//#endregion
|
|
8086
8295
|
//#region src/components/radio-group/RadioGroup.vue
|
|
8087
8296
|
var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8175,7 +8384,7 @@ var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
8175
8384
|
controlPlacement: props.controlPlacement
|
|
8176
8385
|
}))
|
|
8177
8386
|
}, toDisplayString(option.description), 3)) : createCommentVNode("", true)
|
|
8178
|
-
], 10, _hoisted_1$
|
|
8387
|
+
], 10, _hoisted_1$61);
|
|
8179
8388
|
}), 128))]),
|
|
8180
8389
|
_: 3
|
|
8181
8390
|
}, 8, [
|
|
@@ -8216,7 +8425,7 @@ var switchThumb = tv({ base: [
|
|
|
8216
8425
|
] });
|
|
8217
8426
|
//#endregion
|
|
8218
8427
|
//#region src/components/switch/Switch.vue?vue&type=script&setup=true&lang.ts
|
|
8219
|
-
var _hoisted_1$
|
|
8428
|
+
var _hoisted_1$60 = ["data-disabled"];
|
|
8220
8429
|
//#endregion
|
|
8221
8430
|
//#region src/components/switch/Switch.vue
|
|
8222
8431
|
var Switch_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8297,7 +8506,7 @@ var Switch_default = /* @__PURE__ */ defineComponent({
|
|
|
8297
8506
|
controlPlacement: props.controlPlacement
|
|
8298
8507
|
}))
|
|
8299
8508
|
}, toDisplayString(props.description), 3)) : createCommentVNode("", true)
|
|
8300
|
-
], 10, _hoisted_1$
|
|
8509
|
+
], 10, _hoisted_1$60);
|
|
8301
8510
|
};
|
|
8302
8511
|
}
|
|
8303
8512
|
});
|
|
@@ -8443,7 +8652,7 @@ var SliderMarks_default = /* @__PURE__ */ defineComponent({
|
|
|
8443
8652
|
});
|
|
8444
8653
|
//#endregion
|
|
8445
8654
|
//#region src/components/slider/Slider.vue?vue&type=script&setup=true&lang.ts
|
|
8446
|
-
var _hoisted_1$
|
|
8655
|
+
var _hoisted_1$59 = ["data-disabled", "data-dragging"];
|
|
8447
8656
|
//#endregion
|
|
8448
8657
|
//#region src/components/slider/Slider.vue
|
|
8449
8658
|
var Slider_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8553,13 +8762,13 @@ var Slider_default = /* @__PURE__ */ defineComponent({
|
|
|
8553
8762
|
"marks",
|
|
8554
8763
|
"min",
|
|
8555
8764
|
"max"
|
|
8556
|
-
])) : createCommentVNode("", true)], 16, _hoisted_1$
|
|
8765
|
+
])) : createCommentVNode("", true)], 16, _hoisted_1$59);
|
|
8557
8766
|
};
|
|
8558
8767
|
}
|
|
8559
8768
|
});
|
|
8560
8769
|
//#endregion
|
|
8561
8770
|
//#region src/components/range-slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
|
|
8562
|
-
var _hoisted_1$
|
|
8771
|
+
var _hoisted_1$58 = [
|
|
8563
8772
|
"aria-labelledby",
|
|
8564
8773
|
"aria-describedby",
|
|
8565
8774
|
"aria-invalid",
|
|
@@ -8698,7 +8907,7 @@ var RangeSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
8698
8907
|
"marks",
|
|
8699
8908
|
"min",
|
|
8700
8909
|
"max"
|
|
8701
|
-
])) : createCommentVNode("", true)], 16, _hoisted_1$
|
|
8910
|
+
])) : createCommentVNode("", true)], 16, _hoisted_1$58);
|
|
8702
8911
|
};
|
|
8703
8912
|
}
|
|
8704
8913
|
});
|
|
@@ -8715,15 +8924,15 @@ var toggle = tv({
|
|
|
8715
8924
|
});
|
|
8716
8925
|
//#endregion
|
|
8717
8926
|
//#region src/components/toggle/Toggle.vue?vue&type=script&setup=true&lang.ts
|
|
8718
|
-
var _hoisted_1$
|
|
8927
|
+
var _hoisted_1$57 = {
|
|
8719
8928
|
key: "on",
|
|
8720
8929
|
class: "inline-flex items-center justify-center"
|
|
8721
8930
|
};
|
|
8722
|
-
var _hoisted_2$
|
|
8931
|
+
var _hoisted_2$27 = {
|
|
8723
8932
|
key: "off",
|
|
8724
8933
|
class: "inline-flex items-center justify-center"
|
|
8725
8934
|
};
|
|
8726
|
-
var _hoisted_3$
|
|
8935
|
+
var _hoisted_3$11 = {
|
|
8727
8936
|
key: 2,
|
|
8728
8937
|
class: "inline-flex items-center"
|
|
8729
8938
|
};
|
|
@@ -8800,10 +9009,10 @@ var Toggle_default = /* @__PURE__ */ defineComponent({
|
|
|
8800
9009
|
"leave-active-class": "hn-transition absolute",
|
|
8801
9010
|
"leave-to-class": "scale-90 opacity-0"
|
|
8802
9011
|
}, {
|
|
8803
|
-
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 })]))]),
|
|
8804
9013
|
_: 3
|
|
8805
9014
|
})], 2)) : createCommentVNode("", true),
|
|
8806
|
-
unref(slots).default ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
9015
|
+
unref(slots).default ? (openBlock(), createElementBlock("span", _hoisted_3$11, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)
|
|
8807
9016
|
]),
|
|
8808
9017
|
_: 3
|
|
8809
9018
|
}, 16, [
|
|
@@ -8859,7 +9068,7 @@ var tagsInputControl = tv({
|
|
|
8859
9068
|
var tagsInputChip = tv({ base: "max-w-full min-w-0 shrink data-disabled:opacity-100" });
|
|
8860
9069
|
//#endregion
|
|
8861
9070
|
//#region src/components/tags-input/TagsInputChip.vue?vue&type=script&setup=true&lang.ts
|
|
8862
|
-
var _hoisted_1$
|
|
9071
|
+
var _hoisted_1$56 = { class: "min-w-0 truncate" };
|
|
8863
9072
|
//#endregion
|
|
8864
9073
|
//#region src/components/tags-input/TagsInputChip.vue
|
|
8865
9074
|
var TagsInputChip_default = /* @__PURE__ */ defineComponent({
|
|
@@ -8886,7 +9095,7 @@ var TagsInputChip_default = /* @__PURE__ */ defineComponent({
|
|
|
8886
9095
|
onRemove: _cache[0] || (_cache[0] = ($event) => emit("remove"))
|
|
8887
9096
|
}), {
|
|
8888
9097
|
default: withCtx(() => [createVNode(unref(TagsInputItemText), { "as-child": "" }, {
|
|
8889
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
9098
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$56, toDisplayString(props.tag), 1)]),
|
|
8890
9099
|
_: 1
|
|
8891
9100
|
})]),
|
|
8892
9101
|
_: 1
|
|
@@ -8900,7 +9109,7 @@ var TagsInputChip_default = /* @__PURE__ */ defineComponent({
|
|
|
8900
9109
|
});
|
|
8901
9110
|
//#endregion
|
|
8902
9111
|
//#region src/components/tags-input/TagsInput.vue?vue&type=script&setup=true&lang.ts
|
|
8903
|
-
var _hoisted_1$
|
|
9112
|
+
var _hoisted_1$55 = ["data-invalid", "data-disabled"];
|
|
8904
9113
|
//#endregion
|
|
8905
9114
|
//#region src/components/tags-input/TagsInput.vue
|
|
8906
9115
|
var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
@@ -9051,11 +9260,59 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
9051
9260
|
_: 1
|
|
9052
9261
|
}, 8, ["label"])], 2)) : createCommentVNode("", true)]),
|
|
9053
9262
|
_: 1
|
|
9054
|
-
})], 10, _hoisted_1$
|
|
9263
|
+
})], 10, _hoisted_1$55);
|
|
9055
9264
|
};
|
|
9056
9265
|
}
|
|
9057
9266
|
});
|
|
9058
9267
|
//#endregion
|
|
9268
|
+
//#region src/components/multi-combobox/composables/useMultiCombobox.ts
|
|
9269
|
+
function useMultiCombobox(options) {
|
|
9270
|
+
const { model, open } = options;
|
|
9271
|
+
const keyboard = ref(false);
|
|
9272
|
+
const input = shallowRef(null);
|
|
9273
|
+
const labels = reactive(/* @__PURE__ */ new Map());
|
|
9274
|
+
watch(options.options, (options) => {
|
|
9275
|
+
for (const option of flattenOptions(options)) labels.set(option.value, option.label);
|
|
9276
|
+
}, {
|
|
9277
|
+
immediate: true,
|
|
9278
|
+
deep: true
|
|
9279
|
+
});
|
|
9280
|
+
const selected = computed(() => model.value.map((value) => ({
|
|
9281
|
+
value,
|
|
9282
|
+
label: labels.get(value) ?? String(value)
|
|
9283
|
+
})));
|
|
9284
|
+
watch(open, (value) => {
|
|
9285
|
+
if (!value) keyboard.value = false;
|
|
9286
|
+
});
|
|
9287
|
+
function remove(value) {
|
|
9288
|
+
if (options.disabled()) return;
|
|
9289
|
+
model.value = model.value.filter((item) => item !== value);
|
|
9290
|
+
}
|
|
9291
|
+
function clear() {
|
|
9292
|
+
if (!model.value.length) return;
|
|
9293
|
+
model.value = [];
|
|
9294
|
+
options.onClear();
|
|
9295
|
+
input.value?.$el.focus();
|
|
9296
|
+
}
|
|
9297
|
+
function onHostClick(event) {
|
|
9298
|
+
if (focusFieldFrom(event.currentTarget, event.target) && !open.value) open.value = true;
|
|
9299
|
+
}
|
|
9300
|
+
function onInputKeydown(event) {
|
|
9301
|
+
keyboard.value = true;
|
|
9302
|
+
if (event.key !== "Backspace" || event.target.value !== "" || !model.value.length) return;
|
|
9303
|
+
model.value = model.value.slice(0, -1);
|
|
9304
|
+
}
|
|
9305
|
+
return {
|
|
9306
|
+
selected,
|
|
9307
|
+
keyboard,
|
|
9308
|
+
input,
|
|
9309
|
+
remove,
|
|
9310
|
+
clear,
|
|
9311
|
+
onHostClick,
|
|
9312
|
+
onInputKeydown
|
|
9313
|
+
};
|
|
9314
|
+
}
|
|
9315
|
+
//#endregion
|
|
9059
9316
|
//#region src/components/multi-combobox/multi-combobox.variants.ts
|
|
9060
9317
|
var multiComboboxHost = tv({
|
|
9061
9318
|
base: "",
|
|
@@ -9064,12 +9321,12 @@ var multiComboboxHost = tv({
|
|
|
9064
9321
|
var multiComboboxEnd = tv({ base: "absolute inset-y-0 end-0 flex items-stretch" });
|
|
9065
9322
|
//#endregion
|
|
9066
9323
|
//#region src/components/multi-combobox/MultiCombobox.vue?vue&type=script&setup=true&lang.ts
|
|
9067
|
-
var _hoisted_1$
|
|
9324
|
+
var _hoisted_1$54 = [
|
|
9068
9325
|
"data-invalid",
|
|
9069
9326
|
"data-disabled",
|
|
9070
9327
|
"aria-busy"
|
|
9071
9328
|
];
|
|
9072
|
-
var _hoisted_2$
|
|
9329
|
+
var _hoisted_2$26 = { class: "min-w-0 truncate" };
|
|
9073
9330
|
//#endregion
|
|
9074
9331
|
//#region src/components/multi-combobox/MultiCombobox.vue
|
|
9075
9332
|
var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -9114,52 +9371,25 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9114
9371
|
const search = useModel(__props, "search");
|
|
9115
9372
|
const open = useModel(__props, "open");
|
|
9116
9373
|
const t = useUiLocale();
|
|
9117
|
-
const keyboard = ref(false);
|
|
9118
|
-
const input = shallowRef(null);
|
|
9119
9374
|
const { id: fieldId, invalid, disabled, describedBy } = useFieldControl({
|
|
9120
9375
|
invalid: () => props.invalid,
|
|
9121
9376
|
disabled: () => props.disabled
|
|
9122
9377
|
});
|
|
9123
|
-
const
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9378
|
+
const { selected, keyboard, input, remove, clear, onHostClick, onInputKeydown } = useMultiCombobox({
|
|
9379
|
+
options: () => props.options,
|
|
9380
|
+
model,
|
|
9381
|
+
open,
|
|
9382
|
+
disabled: () => disabled.value,
|
|
9383
|
+
onClear: () => emit("clear")
|
|
9129
9384
|
});
|
|
9130
|
-
const selected = computed(() => model.value.map((value) => ({
|
|
9131
|
-
value,
|
|
9132
|
-
label: labels.get(value) ?? String(value)
|
|
9133
|
-
})));
|
|
9134
9385
|
const chipSize = computed(() => props.size === "sm" ? "sm" : "md");
|
|
9135
9386
|
const clearing = computed(() => props.clearable && selected.value.length > 0 && !disabled.value);
|
|
9136
|
-
watch(open, (value) => {
|
|
9137
|
-
if (!value) keyboard.value = false;
|
|
9138
|
-
});
|
|
9139
|
-
function remove(value) {
|
|
9140
|
-
if (disabled.value) return;
|
|
9141
|
-
model.value = model.value.filter((item) => item !== value);
|
|
9142
|
-
}
|
|
9143
|
-
function clear() {
|
|
9144
|
-
if (!model.value.length) return;
|
|
9145
|
-
model.value = [];
|
|
9146
|
-
emit("clear");
|
|
9147
|
-
input.value?.$el.focus();
|
|
9148
|
-
}
|
|
9149
|
-
function onHostClick(event) {
|
|
9150
|
-
if (focusFieldFrom(event.currentTarget, event.target) && !open.value) open.value = true;
|
|
9151
|
-
}
|
|
9152
|
-
function onInputKeydown(event) {
|
|
9153
|
-
keyboard.value = true;
|
|
9154
|
-
if (event.key !== "Backspace" || event.target.value !== "" || !model.value.length) return;
|
|
9155
|
-
model.value = model.value.slice(0, -1);
|
|
9156
|
-
}
|
|
9157
9387
|
return (_ctx, _cache) => {
|
|
9158
9388
|
return openBlock(), createBlock(unref(ComboboxRoot), {
|
|
9159
9389
|
modelValue: model.value,
|
|
9160
|
-
"onUpdate:modelValue": _cache[
|
|
9390
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => model.value = $event),
|
|
9161
9391
|
open: open.value,
|
|
9162
|
-
"onUpdate:open": _cache[
|
|
9392
|
+
"onUpdate:open": _cache[4] || (_cache[4] = ($event) => open.value = $event),
|
|
9163
9393
|
disabled: unref(disabled),
|
|
9164
9394
|
"ignore-filter": props.ignoreFilter,
|
|
9165
9395
|
name: props.name,
|
|
@@ -9179,17 +9409,17 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9179
9409
|
size: props.size,
|
|
9180
9410
|
trailing: true
|
|
9181
9411
|
}), unref(multiComboboxHost)({ clearing: clearing.value }), props.class)),
|
|
9182
|
-
onClick: onHostClick
|
|
9183
|
-
}, [createElementVNode("div", { class: normalizeClass(unref(tagsInputList)()) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(selected
|
|
9412
|
+
onClick: _cache[2] || (_cache[2] = (...args) => unref(onHostClick) && unref(onHostClick)(...args))
|
|
9413
|
+
}, [createElementVNode("div", { class: normalizeClass(unref(tagsInputList)()) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(selected), (option) => {
|
|
9184
9414
|
return openBlock(), createBlock(Chip_default, {
|
|
9185
9415
|
key: option.value,
|
|
9186
9416
|
size: chipSize.value,
|
|
9187
9417
|
removable: "",
|
|
9188
9418
|
disabled: unref(disabled),
|
|
9189
9419
|
class: normalizeClass(unref(tagsInputChip)()),
|
|
9190
|
-
onRemove: ($event) => remove(option.value)
|
|
9420
|
+
onRemove: ($event) => unref(remove)(option.value)
|
|
9191
9421
|
}, {
|
|
9192
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_2$
|
|
9422
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_2$26, toDisplayString(option.label), 1)]),
|
|
9193
9423
|
_: 2
|
|
9194
9424
|
}, 1032, [
|
|
9195
9425
|
"size",
|
|
@@ -9203,13 +9433,13 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9203
9433
|
}, _ctx.$attrs, {
|
|
9204
9434
|
modelValue: search.value,
|
|
9205
9435
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
|
|
9206
|
-
placeholder: selected.
|
|
9436
|
+
placeholder: unref(selected).length ? void 0 : props.placeholder ?? unref(t).combobox.placeholder,
|
|
9207
9437
|
disabled: unref(disabled),
|
|
9208
9438
|
id: unref(fieldId),
|
|
9209
9439
|
"aria-invalid": unref(invalid) || void 0,
|
|
9210
9440
|
"aria-describedby": unref(describedBy),
|
|
9211
9441
|
class: unref(tagsInputControl)({ size: props.size }),
|
|
9212
|
-
onKeydown: onInputKeydown
|
|
9442
|
+
onKeydown: unref(onInputKeydown)
|
|
9213
9443
|
}), null, 16, [
|
|
9214
9444
|
"modelValue",
|
|
9215
9445
|
"placeholder",
|
|
@@ -9217,7 +9447,8 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9217
9447
|
"id",
|
|
9218
9448
|
"aria-invalid",
|
|
9219
9449
|
"aria-describedby",
|
|
9220
|
-
"class"
|
|
9450
|
+
"class",
|
|
9451
|
+
"onKeydown"
|
|
9221
9452
|
])], 2), createElementVNode("span", { class: normalizeClass(unref(multiComboboxEnd)()) }, [createVNode(Transition, {
|
|
9222
9453
|
"enter-active-class": "hn-transition-base",
|
|
9223
9454
|
"enter-from-class": "scale-90 opacity-0",
|
|
@@ -9230,11 +9461,11 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9230
9461
|
class: normalizeClass(unref(inputActionSlot)())
|
|
9231
9462
|
}, [createVNode(InputAction_default, {
|
|
9232
9463
|
label: unref(t).common.clear,
|
|
9233
|
-
onClick: clear
|
|
9464
|
+
onClick: unref(clear)
|
|
9234
9465
|
}, {
|
|
9235
9466
|
default: withCtx(() => [createVNode(unref(X))]),
|
|
9236
9467
|
_: 1
|
|
9237
|
-
}, 8, ["label"])], 2)) : createCommentVNode("", true)]),
|
|
9468
|
+
}, 8, ["label", "onClick"])], 2)) : createCommentVNode("", true)]),
|
|
9238
9469
|
_: 1
|
|
9239
9470
|
}), createVNode(unref(ComboboxTrigger), {
|
|
9240
9471
|
"aria-label": unref(t).combobox.toggle,
|
|
@@ -9255,11 +9486,11 @@ var MultiCombobox_default = /* @__PURE__ */ defineComponent({
|
|
|
9255
9486
|
"aria-label",
|
|
9256
9487
|
"disabled",
|
|
9257
9488
|
"class"
|
|
9258
|
-
])], 2)], 10, _hoisted_1$
|
|
9489
|
+
])], 2)], 10, _hoisted_1$54)]),
|
|
9259
9490
|
_: 1
|
|
9260
9491
|
}), createVNode(ComboboxList_default, {
|
|
9261
9492
|
options: props.options,
|
|
9262
|
-
keyboard: keyboard
|
|
9493
|
+
keyboard: unref(keyboard)
|
|
9263
9494
|
}, {
|
|
9264
9495
|
option: withCtx((slotProps) => [renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps(slotProps)))]),
|
|
9265
9496
|
_: 3
|
|
@@ -9939,7 +10170,7 @@ var dateFieldSegment = tv({
|
|
|
9939
10170
|
});
|
|
9940
10171
|
//#endregion
|
|
9941
10172
|
//#region src/components/date-field/DateField.vue?vue&type=script&setup=true&lang.ts
|
|
9942
|
-
var _hoisted_1$
|
|
10173
|
+
var _hoisted_1$53 = ["data-invalid", "data-disabled"];
|
|
9943
10174
|
//#endregion
|
|
9944
10175
|
//#region src/components/date-field/DateField.vue
|
|
9945
10176
|
var DateField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10096,7 +10327,7 @@ var DateField_default = /* @__PURE__ */ defineComponent({
|
|
|
10096
10327
|
key: 1,
|
|
10097
10328
|
class: normalizeClass(unref(inputAdornment)())
|
|
10098
10329
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
10099
|
-
], 10, _hoisted_1$
|
|
10330
|
+
], 10, _hoisted_1$53);
|
|
10100
10331
|
};
|
|
10101
10332
|
}
|
|
10102
10333
|
});
|
|
@@ -10127,7 +10358,7 @@ var InputGroupScope_default = /* @__PURE__ */ defineComponent({
|
|
|
10127
10358
|
var datePickerContent = tv({ base: "hn-anim-pop z-(--hn-z-overlay) p-2 shadow-md outline-none" });
|
|
10128
10359
|
//#endregion
|
|
10129
10360
|
//#region src/components/date-picker/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
10130
|
-
var _hoisted_1$
|
|
10361
|
+
var _hoisted_1$52 = ["data-invalid", "data-disabled"];
|
|
10131
10362
|
//#endregion
|
|
10132
10363
|
//#region src/components/date-picker/DatePicker.vue
|
|
10133
10364
|
var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10244,7 +10475,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
10244
10475
|
_: 1
|
|
10245
10476
|
}, 8, ["label", "disabled"])]),
|
|
10246
10477
|
_: 1
|
|
10247
|
-
})], 10, _hoisted_1$
|
|
10478
|
+
})], 10, _hoisted_1$52)]),
|
|
10248
10479
|
_: 3
|
|
10249
10480
|
}), createVNode(unref(PopoverPortal), null, {
|
|
10250
10481
|
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
@@ -10309,7 +10540,7 @@ function isRangeInvalid({ start, end }, bounds) {
|
|
|
10309
10540
|
}
|
|
10310
10541
|
//#endregion
|
|
10311
10542
|
//#region src/components/date-range-field/DateRangeField.vue?vue&type=script&setup=true&lang.ts
|
|
10312
|
-
var _hoisted_1$
|
|
10543
|
+
var _hoisted_1$51 = ["data-invalid", "data-disabled"];
|
|
10313
10544
|
//#endregion
|
|
10314
10545
|
//#region src/components/date-range-field/DateRangeField.vue
|
|
10315
10546
|
var DateRangeField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10478,7 +10709,7 @@ var DateRangeField_default = /* @__PURE__ */ defineComponent({
|
|
|
10478
10709
|
key: 1,
|
|
10479
10710
|
class: normalizeClass(unref(inputAdornment)())
|
|
10480
10711
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
10481
|
-
], 10, _hoisted_1$
|
|
10712
|
+
], 10, _hoisted_1$51);
|
|
10482
10713
|
};
|
|
10483
10714
|
}
|
|
10484
10715
|
});
|
|
@@ -10726,7 +10957,7 @@ var RangeCalendar_default = /* @__PURE__ */ defineComponent({
|
|
|
10726
10957
|
});
|
|
10727
10958
|
//#endregion
|
|
10728
10959
|
//#region src/components/date-range-picker/DateRangePicker.vue?vue&type=script&setup=true&lang.ts
|
|
10729
|
-
var _hoisted_1$
|
|
10960
|
+
var _hoisted_1$50 = ["data-invalid", "data-disabled"];
|
|
10730
10961
|
//#endregion
|
|
10731
10962
|
//#region src/components/date-range-picker/DateRangePicker.vue
|
|
10732
10963
|
var DateRangePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10844,7 +11075,7 @@ var DateRangePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
10844
11075
|
_: 1
|
|
10845
11076
|
}, 8, ["label", "disabled"])]),
|
|
10846
11077
|
_: 1
|
|
10847
|
-
})], 10, _hoisted_1$
|
|
11078
|
+
})], 10, _hoisted_1$50)]),
|
|
10848
11079
|
_: 3
|
|
10849
11080
|
}), createVNode(unref(PopoverPortal), null, {
|
|
10850
11081
|
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
@@ -10898,7 +11129,7 @@ var DateRangePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
10898
11129
|
});
|
|
10899
11130
|
//#endregion
|
|
10900
11131
|
//#region src/components/time-field/TimeField.vue?vue&type=script&setup=true&lang.ts
|
|
10901
|
-
var _hoisted_1$
|
|
11132
|
+
var _hoisted_1$49 = ["data-invalid", "data-disabled"];
|
|
10902
11133
|
//#endregion
|
|
10903
11134
|
//#region src/components/time-field/TimeField.vue
|
|
10904
11135
|
var TimeField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11061,7 +11292,7 @@ var TimeField_default = /* @__PURE__ */ defineComponent({
|
|
|
11061
11292
|
key: 1,
|
|
11062
11293
|
class: normalizeClass(unref(inputAdornment)())
|
|
11063
11294
|
}, [renderSlot(_ctx.$slots, "trailing")], 2)) : createCommentVNode("", true)
|
|
11064
|
-
], 10, _hoisted_1$
|
|
11295
|
+
], 10, _hoisted_1$49);
|
|
11065
11296
|
};
|
|
11066
11297
|
}
|
|
11067
11298
|
});
|
|
@@ -11070,7 +11301,7 @@ var TimeField_default = /* @__PURE__ */ defineComponent({
|
|
|
11070
11301
|
var dateTimePickerFooter = tv({ base: "mt-2 flex items-center justify-between gap-2" });
|
|
11071
11302
|
//#endregion
|
|
11072
11303
|
//#region src/components/date-time-picker/DateTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
11073
|
-
var _hoisted_1$
|
|
11304
|
+
var _hoisted_1$48 = ["data-invalid", "data-disabled"];
|
|
11074
11305
|
//#endregion
|
|
11075
11306
|
//#region src/components/date-time-picker/DateTimePicker.vue
|
|
11076
11307
|
var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11203,7 +11434,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
11203
11434
|
_: 1
|
|
11204
11435
|
}, 8, ["label", "disabled"])]),
|
|
11205
11436
|
_: 1
|
|
11206
|
-
})], 10, _hoisted_1$
|
|
11437
|
+
})], 10, _hoisted_1$48)]),
|
|
11207
11438
|
_: 3
|
|
11208
11439
|
}), createVNode(unref(PopoverPortal), null, {
|
|
11209
11440
|
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
@@ -11312,7 +11543,7 @@ function starFill(value, index) {
|
|
|
11312
11543
|
}
|
|
11313
11544
|
//#endregion
|
|
11314
11545
|
//#region src/components/rating/Rating.vue?vue&type=script&setup=true&lang.ts
|
|
11315
|
-
var _hoisted_1$
|
|
11546
|
+
var _hoisted_1$47 = ["aria-label"];
|
|
11316
11547
|
//#endregion
|
|
11317
11548
|
//#region src/components/rating/Rating.vue
|
|
11318
11549
|
var Rating_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11356,7 +11587,7 @@ var Rating_default = /* @__PURE__ */ defineComponent({
|
|
|
11356
11587
|
class: normalizeClass(unref(ratingFill)()),
|
|
11357
11588
|
style: normalizeStyle({ width: unref(starFill)(model.value, index) })
|
|
11358
11589
|
}, [createVNode(unref(Star), { class: normalizeClass(unref(ratingStar)({ active: true })) }, null, 8, ["class"])], 6)], 2);
|
|
11359
|
-
}), 128))], 16, _hoisted_1$
|
|
11590
|
+
}), 128))], 16, _hoisted_1$47)) : (openBlock(), createBlock(unref(RatingRoot), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
11360
11591
|
"data-hn-rating": "",
|
|
11361
11592
|
"data-disabled": unref(disabled) ? "" : void 0,
|
|
11362
11593
|
"data-invalid": unref(invalid) ? "" : void 0,
|
|
@@ -11645,13 +11876,13 @@ function formatSize(tag, bytes) {
|
|
|
11645
11876
|
}
|
|
11646
11877
|
//#endregion
|
|
11647
11878
|
//#region src/components/file-upload/FileUpload.vue?vue&type=script&setup=true&lang.ts
|
|
11648
|
-
var _hoisted_1$
|
|
11879
|
+
var _hoisted_1$46 = [
|
|
11649
11880
|
"name",
|
|
11650
11881
|
"accept",
|
|
11651
11882
|
"multiple",
|
|
11652
11883
|
"disabled"
|
|
11653
11884
|
];
|
|
11654
|
-
var _hoisted_2$
|
|
11885
|
+
var _hoisted_2$25 = [
|
|
11655
11886
|
"id",
|
|
11656
11887
|
"aria-describedby",
|
|
11657
11888
|
"aria-invalid",
|
|
@@ -11660,7 +11891,7 @@ var _hoisted_2$26 = [
|
|
|
11660
11891
|
"aria-busy",
|
|
11661
11892
|
"disabled"
|
|
11662
11893
|
];
|
|
11663
|
-
var _hoisted_3$
|
|
11894
|
+
var _hoisted_3$10 = ["src"];
|
|
11664
11895
|
//#endregion
|
|
11665
11896
|
//#region src/components/file-upload/FileUpload.vue
|
|
11666
11897
|
var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11740,7 +11971,7 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11740
11971
|
multiple: props.multiple,
|
|
11741
11972
|
disabled: unref(disabled),
|
|
11742
11973
|
onChange: _cache[0] || (_cache[0] = (...args) => unref(onChange) && unref(onChange)(...args))
|
|
11743
|
-
}, null, 40, _hoisted_1$
|
|
11974
|
+
}, null, 40, _hoisted_1$46),
|
|
11744
11975
|
props.variant === "area" ? (openBlock(), createElementBlock("button", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
11745
11976
|
type: "button",
|
|
11746
11977
|
"data-hn-file-upload-area": "",
|
|
@@ -11764,7 +11995,7 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11764
11995
|
}, {
|
|
11765
11996
|
default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(Upload), { "aria-hidden": "true" })])]),
|
|
11766
11997
|
_: 3
|
|
11767
|
-
}, 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, {
|
|
11768
11999
|
id: unref(fieldId),
|
|
11769
12000
|
"aria-describedby": unref(describedBy),
|
|
11770
12001
|
"aria-invalid": unref(invalid) || void 0,
|
|
@@ -11796,7 +12027,7 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11796
12027
|
key: 0,
|
|
11797
12028
|
src: unref(urls).get(file),
|
|
11798
12029
|
alt: ""
|
|
11799
|
-
}, null, 8, _hoisted_3$
|
|
12030
|
+
}, null, 8, _hoisted_3$10)) : (openBlock(), createBlock(unref(File), {
|
|
11800
12031
|
key: 1,
|
|
11801
12032
|
"aria-hidden": "true"
|
|
11802
12033
|
}))], 2),
|
|
@@ -11839,31 +12070,38 @@ var FileUpload_default = /* @__PURE__ */ defineComponent({
|
|
|
11839
12070
|
//#endregion
|
|
11840
12071
|
//#region src/components/dialog/dialog.variants.ts
|
|
11841
12072
|
var dialogWrapper = tv({
|
|
11842
|
-
base: "",
|
|
12073
|
+
base: "pointer-events-none fixed inset-0 z-(--hn-z-overlay) grid",
|
|
11843
12074
|
variants: { placement: {
|
|
11844
12075
|
center: "place-items-center p-4",
|
|
12076
|
+
top: "items-start justify-items-center p-4",
|
|
11845
12077
|
bottom: "items-end justify-items-center p-4",
|
|
11846
12078
|
auto: "place-items-center p-4 max-sm:items-end max-sm:justify-items-stretch"
|
|
11847
12079
|
} },
|
|
11848
12080
|
defaultVariants: { placement: "auto" }
|
|
11849
12081
|
});
|
|
11850
12082
|
var dialogCard = tv({
|
|
11851
|
-
base: "",
|
|
12083
|
+
base: "pointer-events-auto flex w-full flex-col shadow-lg outline-none",
|
|
11852
12084
|
variants: {
|
|
12085
|
+
padded: { true: "gap-4 py-(--hn-panel-p)" },
|
|
12086
|
+
fitViewport: { true: "max-h-[calc(100dvh-2rem)]" },
|
|
11853
12087
|
placement: {
|
|
11854
12088
|
center: "hn-anim-modal",
|
|
12089
|
+
top: "hn-anim-sheet-top",
|
|
11855
12090
|
bottom: "hn-anim-sheet-bottom",
|
|
11856
12091
|
auto: "hn-anim-modal max-sm:hn-anim-sheet-bottom max-sm:max-w-none"
|
|
11857
12092
|
},
|
|
11858
12093
|
size: {
|
|
11859
12094
|
sm: "max-w-sm",
|
|
11860
12095
|
md: "max-w-md",
|
|
11861
|
-
lg: "max-w-xl"
|
|
12096
|
+
lg: "max-w-xl",
|
|
12097
|
+
xl: "max-w-2xl",
|
|
12098
|
+
"2xl": "max-w-4xl"
|
|
11862
12099
|
}
|
|
11863
12100
|
},
|
|
11864
12101
|
defaultVariants: {
|
|
11865
12102
|
placement: "auto",
|
|
11866
|
-
size: "md"
|
|
12103
|
+
size: "md",
|
|
12104
|
+
padded: true
|
|
11867
12105
|
}
|
|
11868
12106
|
});
|
|
11869
12107
|
//#endregion
|
|
@@ -11933,13 +12171,71 @@ var Heading_default = /* @__PURE__ */ defineComponent({
|
|
|
11933
12171
|
}
|
|
11934
12172
|
});
|
|
11935
12173
|
//#endregion
|
|
11936
|
-
//#region src/components/alert-dialog/
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
}
|
|
11942
|
-
|
|
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" });
|
|
11943
12239
|
//#endregion
|
|
11944
12240
|
//#region src/components/alert-dialog/AlertDialog.vue
|
|
11945
12241
|
var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
@@ -11949,6 +12245,7 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
11949
12245
|
title: {},
|
|
11950
12246
|
description: {},
|
|
11951
12247
|
confirmText: {},
|
|
12248
|
+
confirmDelay: { default: 0 },
|
|
11952
12249
|
cancelText: {},
|
|
11953
12250
|
tone: { default: "accent" },
|
|
11954
12251
|
size: { default: "sm" },
|
|
@@ -11959,29 +12256,14 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
11959
12256
|
"open": { type: Boolean },
|
|
11960
12257
|
"openModifiers": {}
|
|
11961
12258
|
}),
|
|
11962
|
-
emits: /*@__PURE__*/ mergeModels(["cancel"], ["update:open"]),
|
|
12259
|
+
emits: /*@__PURE__*/ mergeModels(["cancel", "error"], ["update:open"]),
|
|
11963
12260
|
setup(__props, { emit: __emit }) {
|
|
11964
12261
|
const props = __props;
|
|
11965
12262
|
const emit = __emit;
|
|
11966
12263
|
const open = useModel(__props, "open");
|
|
11967
|
-
const busy = ref(false);
|
|
11968
12264
|
const t = useUiLocale();
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
}
|
|
11972
|
-
async function confirm() {
|
|
11973
|
-
if (busy.value) return;
|
|
11974
|
-
const result = props.onConfirm?.();
|
|
11975
|
-
if (result instanceof Promise) {
|
|
11976
|
-
busy.value = true;
|
|
11977
|
-
try {
|
|
11978
|
-
await result;
|
|
11979
|
-
} finally {
|
|
11980
|
-
busy.value = false;
|
|
11981
|
-
}
|
|
11982
|
-
}
|
|
11983
|
-
open.value = false;
|
|
11984
|
-
}
|
|
12265
|
+
const remaining = useConfirmDelay(open, () => props.confirmDelay);
|
|
12266
|
+
const { busy, guard, confirm } = useAlertDialogConfirm(props, open, (error) => emit("error", error), () => remaining.value > 0);
|
|
11985
12267
|
return (_ctx, _cache) => {
|
|
11986
12268
|
return openBlock(), createBlock(unref(AlertDialogRoot), {
|
|
11987
12269
|
open: open.value,
|
|
@@ -11994,21 +12276,21 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
11994
12276
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
11995
12277
|
_: 3
|
|
11996
12278
|
})) : createCommentVNode("", true), createVNode(unref(AlertDialogPortal), null, {
|
|
11997
|
-
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), {
|
|
11998
12280
|
"as-child": "",
|
|
11999
|
-
onEscapeKeyDown: guard
|
|
12281
|
+
onEscapeKeyDown: unref(guard)
|
|
12000
12282
|
}, {
|
|
12001
12283
|
default: withCtx(() => [createVNode(Card_default, {
|
|
12002
12284
|
padded: false,
|
|
12003
12285
|
"data-hn-alert-dialog": "",
|
|
12004
|
-
"aria-busy": busy
|
|
12005
|
-
class: normalizeClass(unref(cn)(
|
|
12286
|
+
"aria-busy": unref(busy) || void 0,
|
|
12287
|
+
class: normalizeClass(unref(cn)(unref(dialogCard)({
|
|
12006
12288
|
placement: props.placement ?? "auto",
|
|
12007
12289
|
size: props.size
|
|
12008
12290
|
}), props.class))
|
|
12009
12291
|
}, {
|
|
12010
12292
|
default: withCtx(() => [
|
|
12011
|
-
createElementVNode("div",
|
|
12293
|
+
createElementVNode("div", { class: normalizeClass(unref(alertDialogHeader)()) }, [createVNode(unref(AlertDialogTitle), { "as-child": "" }, {
|
|
12012
12294
|
default: withCtx(() => [createVNode(Heading_default, {
|
|
12013
12295
|
level: 2,
|
|
12014
12296
|
size: "lg"
|
|
@@ -12026,13 +12308,16 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12026
12308
|
_: 1
|
|
12027
12309
|
})]),
|
|
12028
12310
|
_: 1
|
|
12029
|
-
})) : createCommentVNode("", true)]),
|
|
12030
|
-
_ctx.$slots.content ? (openBlock(), createElementBlock("div",
|
|
12031
|
-
|
|
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": "" }, {
|
|
12032
12317
|
default: withCtx(() => [createVNode(Button_default, {
|
|
12033
12318
|
variant: "soft",
|
|
12034
12319
|
tone: "neutral",
|
|
12035
|
-
disabled: busy
|
|
12320
|
+
disabled: unref(busy),
|
|
12036
12321
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("cancel"))
|
|
12037
12322
|
}, {
|
|
12038
12323
|
default: withCtx(() => [createTextVNode(toDisplayString(props.cancelText ?? unref(t).common.cancel), 1)]),
|
|
@@ -12041,17 +12326,26 @@ var AlertDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
12041
12326
|
_: 1
|
|
12042
12327
|
}), createVNode(Button_default, {
|
|
12043
12328
|
tone: props.tone,
|
|
12044
|
-
loading: busy
|
|
12045
|
-
|
|
12329
|
+
loading: unref(busy),
|
|
12330
|
+
disabled: unref(remaining) > 0,
|
|
12331
|
+
onClick: unref(confirm)
|
|
12046
12332
|
}, {
|
|
12047
|
-
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)]),
|
|
12048
12337
|
_: 1
|
|
12049
|
-
}, 8, [
|
|
12338
|
+
}, 8, [
|
|
12339
|
+
"tone",
|
|
12340
|
+
"loading",
|
|
12341
|
+
"disabled",
|
|
12342
|
+
"onClick"
|
|
12343
|
+
])], 2)
|
|
12050
12344
|
]),
|
|
12051
12345
|
_: 3
|
|
12052
12346
|
}, 8, ["aria-busy", "class"])]),
|
|
12053
12347
|
_: 3
|
|
12054
|
-
})], 2)]),
|
|
12348
|
+
}, 8, ["onEscapeKeyDown"])], 2)]),
|
|
12055
12349
|
_: 3
|
|
12056
12350
|
})]),
|
|
12057
12351
|
_: 3
|
|
@@ -14545,7 +14839,7 @@ var _hoisted_5$3 = {
|
|
|
14545
14839
|
class: "hn-collapse [--hn-collapse-out:var(--hn-duration-fast)]"
|
|
14546
14840
|
};
|
|
14547
14841
|
var _hoisted_6$2 = { class: "hn-collapse-body" };
|
|
14548
|
-
var _hoisted_7$
|
|
14842
|
+
var _hoisted_7$1 = ["id"];
|
|
14549
14843
|
//#endregion
|
|
14550
14844
|
//#region src/components/form-field/FormField.vue
|
|
14551
14845
|
var FormField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -14666,7 +14960,7 @@ var FormField_default = /* @__PURE__ */ defineComponent({
|
|
|
14666
14960
|
id: unref(messageId),
|
|
14667
14961
|
class: normalizeClass(unref(formFieldMessage)()),
|
|
14668
14962
|
"aria-live": "polite"
|
|
14669
|
-
}, toDisplayString(message.value), 11, _hoisted_7$
|
|
14963
|
+
}, toDisplayString(message.value), 11, _hoisted_7$1)])])) : createCommentVNode("", true)]),
|
|
14670
14964
|
_: 1
|
|
14671
14965
|
}, 16)
|
|
14672
14966
|
], 2)], 2)], 46, _hoisted_1$26);
|
|
@@ -14961,8 +15255,13 @@ var SegmentedControl_default = /* @__PURE__ */ defineComponent({
|
|
|
14961
15255
|
option.value === current.value ? (openBlock(), createBlock(Highlight_default, {
|
|
14962
15256
|
key: 0,
|
|
14963
15257
|
id: unref(highlightId),
|
|
15258
|
+
axis: props.orientation === "vertical" ? "y" : "x",
|
|
14964
15259
|
class: normalizeClass(unref(segmentedThumb)())
|
|
14965
|
-
}, null, 8, [
|
|
15260
|
+
}, null, 8, [
|
|
15261
|
+
"id",
|
|
15262
|
+
"axis",
|
|
15263
|
+
"class"
|
|
15264
|
+
])) : createCommentVNode("", true),
|
|
14966
15265
|
createVNode(Ripple_default),
|
|
14967
15266
|
renderSlot(_ctx.$slots, "option", { option }, () => [createTextVNode(toDisplayString(option.label), 1)])
|
|
14968
15267
|
]),
|
|
@@ -15180,17 +15479,43 @@ async function tokenize(code, lang) {
|
|
|
15180
15479
|
}).tokens;
|
|
15181
15480
|
}
|
|
15182
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
|
|
15183
15514
|
//#region src/components/code-block/CodeBlock.vue?vue&type=script&setup=true&lang.ts
|
|
15184
15515
|
var _hoisted_1$23 = ["data-lang"];
|
|
15185
|
-
var _hoisted_2$13 =
|
|
15186
|
-
var _hoisted_3$6 =
|
|
15187
|
-
var _hoisted_4$4 = { key:
|
|
15188
|
-
var _hoisted_5$2 = { key: 2 };
|
|
15189
|
-
var _hoisted_6$1 = { class: "absolute top-2 end-2 flex items-center gap-2" };
|
|
15190
|
-
var _hoisted_7$1 = {
|
|
15191
|
-
key: 0,
|
|
15192
|
-
class: "text-faint font-mono text-xs select-none"
|
|
15193
|
-
};
|
|
15516
|
+
var _hoisted_2$13 = ["innerHTML"];
|
|
15517
|
+
var _hoisted_3$6 = { key: 1 };
|
|
15518
|
+
var _hoisted_4$4 = { key: 2 };
|
|
15194
15519
|
//#endregion
|
|
15195
15520
|
//#region src/components/code-block/CodeBlock.vue
|
|
15196
15521
|
var CodeBlock_default = /* @__PURE__ */ defineComponent({
|
|
@@ -15211,53 +15536,37 @@ var CodeBlock_default = /* @__PURE__ */ defineComponent({
|
|
|
15211
15536
|
const props = __props;
|
|
15212
15537
|
const t = useUiLocale();
|
|
15213
15538
|
const tag = computed(() => props.label ?? props.lang);
|
|
15214
|
-
const tokens =
|
|
15215
|
-
onMounted(() => {
|
|
15216
|
-
watch(() => [
|
|
15217
|
-
props.code,
|
|
15218
|
-
props.lang,
|
|
15219
|
-
props.html
|
|
15220
|
-
], async ([code, lang, html]) => {
|
|
15221
|
-
if (html || !lang) {
|
|
15222
|
-
tokens.value = null;
|
|
15223
|
-
return;
|
|
15224
|
-
}
|
|
15225
|
-
try {
|
|
15226
|
-
const result = await tokenize(code, lang);
|
|
15227
|
-
if (code === props.code && lang === props.lang) tokens.value = result;
|
|
15228
|
-
} catch (error) {
|
|
15229
|
-
tokens.value = null;
|
|
15230
|
-
`${lang}${String(error)}`;
|
|
15231
|
-
}
|
|
15232
|
-
}, { immediate: true });
|
|
15233
|
-
});
|
|
15539
|
+
const tokens = useCodeHighlight(props);
|
|
15234
15540
|
return (_ctx, _cache) => {
|
|
15235
15541
|
return openBlock(), createElementBlock("div", {
|
|
15236
15542
|
"data-lang": props.lang,
|
|
15237
|
-
class: normalizeClass(unref(cn)(
|
|
15543
|
+
class: normalizeClass(unref(cn)(unref(codeBlock)(), props.class))
|
|
15238
15544
|
}, [createVNode(ScrollArea_default, {
|
|
15239
|
-
direction: "
|
|
15545
|
+
direction: "both",
|
|
15240
15546
|
focusable: "",
|
|
15241
15547
|
label: tag.value,
|
|
15242
|
-
class:
|
|
15548
|
+
class: normalizeClass(unref(codeBlockArea)())
|
|
15243
15549
|
}, {
|
|
15244
|
-
default: withCtx(() => [createElementVNode("pre",
|
|
15550
|
+
default: withCtx(() => [createElementVNode("pre", { class: normalizeClass(unref(codeBlockContent)()) }, [props.html ? (openBlock(), createElementBlock("code", {
|
|
15245
15551
|
key: 0,
|
|
15246
15552
|
innerHTML: props.html
|
|
15247
|
-
}, 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) => {
|
|
15248
15554
|
return openBlock(), createElementBlock(Fragment, { key: i }, [createTextVNode(toDisplayString(i ? "\n" : ""), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(line, (tk, j) => {
|
|
15249
15555
|
return openBlock(), createElementBlock("span", {
|
|
15250
15556
|
key: j,
|
|
15251
15557
|
style: normalizeStyle(tk.htmlStyle)
|
|
15252
15558
|
}, toDisplayString(tk.content), 5);
|
|
15253
15559
|
}), 128))], 64);
|
|
15254
|
-
}), 128))])) : (openBlock(), createElementBlock("code",
|
|
15560
|
+
}), 128))])) : (openBlock(), createElementBlock("code", _hoisted_4$4, toDisplayString(__props.code), 1))], 2)]),
|
|
15255
15561
|
_: 1
|
|
15256
|
-
}, 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, {
|
|
15257
15566
|
key: 1,
|
|
15258
15567
|
text: props.code,
|
|
15259
15568
|
label: unref(t).codeblock.copy
|
|
15260
|
-
}, null, 8, ["text", "label"])) : createCommentVNode("", true)])], 10, _hoisted_1$23);
|
|
15569
|
+
}, null, 8, ["text", "label"])) : createCommentVNode("", true)], 2)], 10, _hoisted_1$23);
|
|
15261
15570
|
};
|
|
15262
15571
|
}
|
|
15263
15572
|
});
|
|
@@ -16055,13 +16364,7 @@ var CollapsibleContent_default = /* @__PURE__ */ defineComponent({
|
|
|
16055
16364
|
props: { class: {} },
|
|
16056
16365
|
setup(__props) {
|
|
16057
16366
|
const props = __props;
|
|
16058
|
-
const content =
|
|
16059
|
-
function measure() {
|
|
16060
|
-
const el = content.value?.$el;
|
|
16061
|
-
if (el instanceof Element) writeCollapseGap(el, el.parentElement);
|
|
16062
|
-
}
|
|
16063
|
-
onMounted(measure);
|
|
16064
|
-
onBeforeUpdate(measure);
|
|
16367
|
+
const content = useCollapseGap();
|
|
16065
16368
|
return (_ctx, _cache) => {
|
|
16066
16369
|
return openBlock(), createBlock(unref(CollapsibleContent), {
|
|
16067
16370
|
ref_key: "content",
|
|
@@ -16193,13 +16496,7 @@ var AccordionContent_default = /* @__PURE__ */ defineComponent({
|
|
|
16193
16496
|
props: { class: {} },
|
|
16194
16497
|
setup(__props) {
|
|
16195
16498
|
const props = __props;
|
|
16196
|
-
const content =
|
|
16197
|
-
function measure() {
|
|
16198
|
-
const el = content.value?.$el;
|
|
16199
|
-
if (el instanceof Element) writeCollapseGap(el, el.parentElement);
|
|
16200
|
-
}
|
|
16201
|
-
onMounted(measure);
|
|
16202
|
-
onBeforeUpdate(measure);
|
|
16499
|
+
const content = useCollapseGap();
|
|
16203
16500
|
return (_ctx, _cache) => {
|
|
16204
16501
|
return openBlock(), createBlock(unref(AccordionContent), {
|
|
16205
16502
|
ref_key: "content",
|
|
@@ -16623,11 +16920,11 @@ var _hoisted_3$4 = {
|
|
|
16623
16920
|
class: "hidden h-full shrink-0 lg:block"
|
|
16624
16921
|
};
|
|
16625
16922
|
var _hoisted_4$2 = { class: "flex min-h-0 min-w-0 flex-1 flex-col" };
|
|
16626
|
-
var _hoisted_5$
|
|
16923
|
+
var _hoisted_5$2 = {
|
|
16627
16924
|
key: 0,
|
|
16628
16925
|
class: "border-line bg-canvas shrink-0 border-b"
|
|
16629
16926
|
};
|
|
16630
|
-
var _hoisted_6 = { class: "flex h-14 items-center gap-3 px-4 sm:px-6" };
|
|
16927
|
+
var _hoisted_6$1 = { class: "flex h-14 items-center gap-3 px-4 sm:px-6" };
|
|
16631
16928
|
var _hoisted_7 = { class: "min-h-0 min-w-0 flex-1" };
|
|
16632
16929
|
//#endregion
|
|
16633
16930
|
//#region src/components/app-shell/AppShell.vue
|
|
@@ -16683,7 +16980,7 @@ var AppShell_default = /* @__PURE__ */ defineComponent({
|
|
|
16683
16980
|
return openBlock(), createBlock(TooltipProvider_default, null, {
|
|
16684
16981
|
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cn)("bg-canvas text-fg flex h-screen flex-col overflow-hidden", props.class)) }, [
|
|
16685
16982
|
_ctx.$slots.banner ? (openBlock(), createElementBlock("div", _hoisted_1$14, [renderSlot(_ctx.$slots, "banner")])) : createCommentVNode("", true),
|
|
16686
|
-
createElementVNode("div", _hoisted_2$10, [_ctx.$slots.sidebar ? (openBlock(), createElementBlock("div", _hoisted_3$4, [renderSlot(_ctx.$slots, "sidebar")])) : createCommentVNode("", true), createElementVNode("div", _hoisted_4$2, [_ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_5$
|
|
16983
|
+
createElementVNode("div", _hoisted_2$10, [_ctx.$slots.sidebar ? (openBlock(), createElementBlock("div", _hoisted_3$4, [renderSlot(_ctx.$slots, "sidebar")])) : createCommentVNode("", true), createElementVNode("div", _hoisted_4$2, [_ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_5$2, [createElementVNode("div", _hoisted_6$1, [renderSlot(_ctx.$slots, "header")])])) : createCommentVNode("", true), createElementVNode("main", _hoisted_7, [createVNode(ScrollArea_default, {
|
|
16687
16984
|
ref_key: "main",
|
|
16688
16985
|
ref: main,
|
|
16689
16986
|
"data-scroll-restore": props.restoreKey,
|
|
@@ -16966,6 +17263,7 @@ var Anchor_default = /* @__PURE__ */ defineComponent({
|
|
|
16966
17263
|
default: withCtx(() => [unref(span) ? (openBlock(), createBlock(Highlight_default, {
|
|
16967
17264
|
key: 0,
|
|
16968
17265
|
as: "li",
|
|
17266
|
+
axis: "y",
|
|
16969
17267
|
role: "presentation",
|
|
16970
17268
|
style: normalizeStyle({ gridRow: unref(span) }),
|
|
16971
17269
|
class: "bg-accent col-start-1 -ms-px w-0.5 self-stretch justify-self-start rounded-full"
|
|
@@ -17066,11 +17364,157 @@ var BreadcrumbSeparator_default = /* @__PURE__ */ defineComponent({
|
|
|
17066
17364
|
}
|
|
17067
17365
|
});
|
|
17068
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
|
|
17069
17507
|
//#region src/components/popover/Popover.vue
|
|
17070
17508
|
var Popover_default = /* @__PURE__ */ defineComponent({
|
|
17071
17509
|
name: "HnPopover",
|
|
17510
|
+
inheritAttrs: false,
|
|
17072
17511
|
__name: "Popover",
|
|
17073
17512
|
props: /*@__PURE__*/ mergeModels({
|
|
17513
|
+
anchor: {},
|
|
17514
|
+
modal: {
|
|
17515
|
+
type: Boolean,
|
|
17516
|
+
default: true
|
|
17517
|
+
},
|
|
17074
17518
|
side: { default: "bottom" },
|
|
17075
17519
|
align: { default: "center" },
|
|
17076
17520
|
sideOffset: { default: 8 },
|
|
@@ -17083,10 +17527,19 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17083
17527
|
"open": { type: Boolean },
|
|
17084
17528
|
"openModifiers": {}
|
|
17085
17529
|
}),
|
|
17086
|
-
emits: [
|
|
17087
|
-
|
|
17530
|
+
emits: /*@__PURE__*/ mergeModels([
|
|
17531
|
+
"escapeKeyDown",
|
|
17532
|
+
"pointerDownOutside",
|
|
17533
|
+
"focusOutside",
|
|
17534
|
+
"interactOutside",
|
|
17535
|
+
"openAutoFocus",
|
|
17536
|
+
"closeAutoFocus"
|
|
17537
|
+
], ["update:open"]),
|
|
17538
|
+
setup(__props, { emit: __emit }) {
|
|
17088
17539
|
const props = __props;
|
|
17089
17540
|
const open = useModel(__props, "open");
|
|
17541
|
+
const emit = __emit;
|
|
17542
|
+
const { trigger, reference, visible, events } = useAnchoredOverlay(props, open, emit, (event) => emit("openAutoFocus", event));
|
|
17090
17543
|
const pressOrigin = computed(() => {
|
|
17091
17544
|
if (props.side === "left") return "right";
|
|
17092
17545
|
if (props.side === "right") return "left";
|
|
@@ -17096,23 +17549,30 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17096
17549
|
});
|
|
17097
17550
|
return (_ctx, _cache) => {
|
|
17098
17551
|
return openBlock(), createBlock(unref(PopoverRoot), {
|
|
17099
|
-
open:
|
|
17100
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) =>
|
|
17101
|
-
modal:
|
|
17552
|
+
open: unref(visible),
|
|
17553
|
+
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null),
|
|
17554
|
+
modal: props.modal
|
|
17102
17555
|
}, {
|
|
17103
|
-
default: withCtx(() => [
|
|
17556
|
+
default: withCtx(() => [_ctx.$slots.default ? (openBlock(), createBlock(unref(PopoverTrigger), {
|
|
17557
|
+
key: 0,
|
|
17558
|
+
ref_key: "trigger",
|
|
17559
|
+
ref: trigger,
|
|
17104
17560
|
"as-child": "",
|
|
17105
17561
|
style: normalizeStyle({ transformOrigin: pressOrigin.value })
|
|
17106
17562
|
}, {
|
|
17107
17563
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17108
17564
|
_: 3
|
|
17109
|
-
}, 8, ["style"]), createVNode(unref(PopoverPortal), null, {
|
|
17110
|
-
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),
|
|
17111
17571
|
"as-child": "",
|
|
17112
17572
|
side: props.side,
|
|
17113
17573
|
align: props.align,
|
|
17114
17574
|
"side-offset": props.sideOffset
|
|
17115
|
-
}, {
|
|
17575
|
+
}), {
|
|
17116
17576
|
default: withCtx(() => [createVNode(Card_default, {
|
|
17117
17577
|
padded: props.padded,
|
|
17118
17578
|
class: normalizeClass(unref(cn)("hn-anim-pop z-(--hn-z-overlay) max-w-sm shadow-md outline-none", props.class))
|
|
@@ -17121,7 +17581,8 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17121
17581
|
_: 3
|
|
17122
17582
|
}, 8, ["padded", "class"])]),
|
|
17123
17583
|
_: 3
|
|
17124
|
-
},
|
|
17584
|
+
}, 16, [
|
|
17585
|
+
"reference",
|
|
17125
17586
|
"side",
|
|
17126
17587
|
"align",
|
|
17127
17588
|
"side-offset"
|
|
@@ -17129,7 +17590,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17129
17590
|
_: 3
|
|
17130
17591
|
})]),
|
|
17131
17592
|
_: 3
|
|
17132
|
-
}, 8, ["open"]);
|
|
17593
|
+
}, 8, ["open", "modal"]);
|
|
17133
17594
|
};
|
|
17134
17595
|
}
|
|
17135
17596
|
});
|
|
@@ -17137,9 +17598,16 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
17137
17598
|
//#region src/components/dropdown-menu/DropdownMenu.vue
|
|
17138
17599
|
var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
17139
17600
|
name: "HnDropdownMenu",
|
|
17601
|
+
inheritAttrs: false,
|
|
17140
17602
|
__name: "DropdownMenu",
|
|
17141
17603
|
props: /*@__PURE__*/ mergeModels({
|
|
17142
17604
|
label: {},
|
|
17605
|
+
anchor: {},
|
|
17606
|
+
modal: {
|
|
17607
|
+
type: Boolean,
|
|
17608
|
+
default: true
|
|
17609
|
+
},
|
|
17610
|
+
dir: {},
|
|
17143
17611
|
side: { default: "bottom" },
|
|
17144
17612
|
align: { default: "center" },
|
|
17145
17613
|
sideOffset: { default: 8 },
|
|
@@ -17148,10 +17616,16 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17148
17616
|
"open": { type: Boolean },
|
|
17149
17617
|
"openModifiers": {}
|
|
17150
17618
|
}),
|
|
17151
|
-
emits: [
|
|
17152
|
-
|
|
17619
|
+
emits: /*@__PURE__*/ mergeModels([
|
|
17620
|
+
"escapeKeyDown",
|
|
17621
|
+
"pointerDownOutside",
|
|
17622
|
+
"focusOutside",
|
|
17623
|
+
"interactOutside",
|
|
17624
|
+
"closeAutoFocus"
|
|
17625
|
+
], ["update:open"]),
|
|
17626
|
+
setup(__props, { emit: __emit }) {
|
|
17153
17627
|
const props = __props;
|
|
17154
|
-
const
|
|
17628
|
+
const { trigger, reference, visible, events } = useAnchoredOverlay(props, useModel(__props, "open"), __emit);
|
|
17155
17629
|
const pressOrigin = computed(() => {
|
|
17156
17630
|
if (props.side === "left") return "right";
|
|
17157
17631
|
if (props.side === "right") return "left";
|
|
@@ -17161,25 +17635,33 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17161
17635
|
});
|
|
17162
17636
|
return (_ctx, _cache) => {
|
|
17163
17637
|
return openBlock(), createBlock(unref(DropdownMenuRoot), {
|
|
17164
|
-
open:
|
|
17165
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) =>
|
|
17166
|
-
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
|
|
17167
17642
|
}, {
|
|
17168
|
-
default: withCtx(() => [
|
|
17643
|
+
default: withCtx(() => [_ctx.$slots.default ? (openBlock(), createBlock(unref(DropdownMenuTrigger), {
|
|
17644
|
+
key: 0,
|
|
17645
|
+
ref_key: "trigger",
|
|
17646
|
+
ref: trigger,
|
|
17169
17647
|
"as-child": "",
|
|
17170
17648
|
class: "group/hn-disclosure",
|
|
17171
17649
|
style: normalizeStyle({ transformOrigin: pressOrigin.value })
|
|
17172
17650
|
}, {
|
|
17173
17651
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17174
17652
|
_: 3
|
|
17175
|
-
}, 8, ["style"]), createVNode(unref(DropdownMenuPortal), null, {
|
|
17176
|
-
default: withCtx(() => [
|
|
17177
|
-
"as-child": "",
|
|
17653
|
+
}, 8, ["style"])) : createCommentVNode("", true), createVNode(unref(DropdownMenuPortal), null, {
|
|
17654
|
+
default: withCtx(() => [unref(reference) ? (openBlock(), createBlock(unref(DropdownMenuContent), mergeProps({ key: 0 }, {
|
|
17178
17655
|
"aria-label": props.label,
|
|
17656
|
+
..._ctx.$attrs,
|
|
17657
|
+
...unref(events)
|
|
17658
|
+
}, {
|
|
17659
|
+
reference: unref(reference),
|
|
17660
|
+
"as-child": "",
|
|
17179
17661
|
side: props.side,
|
|
17180
17662
|
align: props.align,
|
|
17181
17663
|
"side-offset": props.sideOffset
|
|
17182
|
-
}, {
|
|
17664
|
+
}), {
|
|
17183
17665
|
default: withCtx(() => [createVNode(Card_default, {
|
|
17184
17666
|
padded: false,
|
|
17185
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))
|
|
@@ -17188,16 +17670,20 @@ var DropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
17188
17670
|
_: 3
|
|
17189
17671
|
}, 8, ["class"])]),
|
|
17190
17672
|
_: 3
|
|
17191
|
-
},
|
|
17192
|
-
"
|
|
17673
|
+
}, 16, [
|
|
17674
|
+
"reference",
|
|
17193
17675
|
"side",
|
|
17194
17676
|
"align",
|
|
17195
17677
|
"side-offset"
|
|
17196
|
-
])]),
|
|
17678
|
+
])) : createCommentVNode("", true)]),
|
|
17197
17679
|
_: 3
|
|
17198
17680
|
})]),
|
|
17199
17681
|
_: 3
|
|
17200
|
-
}, 8, [
|
|
17682
|
+
}, 8, [
|
|
17683
|
+
"open",
|
|
17684
|
+
"modal",
|
|
17685
|
+
"dir"
|
|
17686
|
+
]);
|
|
17201
17687
|
};
|
|
17202
17688
|
}
|
|
17203
17689
|
});
|
|
@@ -17464,11 +17950,20 @@ var DropdownMenuRadioItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17464
17950
|
});
|
|
17465
17951
|
//#endregion
|
|
17466
17952
|
//#region src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
17467
|
-
var _hoisted_1$2 = {
|
|
17953
|
+
var _hoisted_1$2 = {
|
|
17954
|
+
key: 0,
|
|
17955
|
+
class: "flex shrink-0 items-start justify-between gap-4 px-(--hn-panel-p)"
|
|
17956
|
+
};
|
|
17468
17957
|
var _hoisted_2$2 = { class: "flex min-w-0 flex-col gap-1.5" };
|
|
17469
|
-
var _hoisted_3$1 = { class: "
|
|
17958
|
+
var _hoisted_3$1 = { class: "flex min-w-0 items-center gap-2" };
|
|
17470
17959
|
var _hoisted_4$1 = {
|
|
17471
|
-
key:
|
|
17960
|
+
key: 0,
|
|
17961
|
+
class: "text-muted flex shrink-0 [&_svg]:size-5",
|
|
17962
|
+
"aria-hidden": "true"
|
|
17963
|
+
};
|
|
17964
|
+
var _hoisted_5$1 = { class: "px-(--hn-panel-p) py-1" };
|
|
17965
|
+
var _hoisted_6 = {
|
|
17966
|
+
key: 2,
|
|
17472
17967
|
class: "flex shrink-0 justify-end gap-(--hn-inline-gap) px-(--hn-panel-p)"
|
|
17473
17968
|
};
|
|
17474
17969
|
//#endregion
|
|
@@ -17481,6 +17976,14 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
17481
17976
|
description: {},
|
|
17482
17977
|
size: { default: "md" },
|
|
17483
17978
|
placement: {},
|
|
17979
|
+
header: {
|
|
17980
|
+
type: Boolean,
|
|
17981
|
+
default: true
|
|
17982
|
+
},
|
|
17983
|
+
closable: {
|
|
17984
|
+
type: Boolean,
|
|
17985
|
+
default: true
|
|
17986
|
+
},
|
|
17484
17987
|
locked: {
|
|
17485
17988
|
type: Boolean,
|
|
17486
17989
|
default: false
|
|
@@ -17493,11 +17996,11 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
17493
17996
|
emits: ["update:open"],
|
|
17494
17997
|
setup(__props) {
|
|
17495
17998
|
const props = __props;
|
|
17999
|
+
const slots = useSlots();
|
|
17496
18000
|
function guard(e) {
|
|
17497
18001
|
if (props.locked) e.preventDefault();
|
|
17498
18002
|
}
|
|
17499
18003
|
const open = useModel(__props, "open");
|
|
17500
|
-
useUiLocale();
|
|
17501
18004
|
function close() {
|
|
17502
18005
|
open.value = false;
|
|
17503
18006
|
}
|
|
@@ -17513,29 +18016,47 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
17513
18016
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
17514
18017
|
_: 3
|
|
17515
18018
|
})) : createCommentVNode("", true), createVNode(unref(DialogPortal), null, {
|
|
17516
|
-
default: withCtx(() => [createVNode(unref(DialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(
|
|
18019
|
+
default: withCtx(() => [createVNode(unref(DialogOverlay), { class: "hn-scrim" }), createElementVNode("div", { class: normalizeClass(unref(dialogWrapper)({ placement: props.placement ?? "auto" })) }, [createVNode(unref(DialogContent), {
|
|
17517
18020
|
"as-child": "",
|
|
17518
18021
|
onEscapeKeyDown: guard,
|
|
17519
18022
|
onInteractOutside: guard
|
|
17520
18023
|
}, {
|
|
17521
|
-
default: withCtx(() => [createVNode(Card_default, {
|
|
18024
|
+
default: withCtx(() => [createVNode(Card_default, mergeProps(props.description ? {} : { "aria-describedby": void 0 }, {
|
|
17522
18025
|
padded: false,
|
|
17523
|
-
class:
|
|
18026
|
+
class: unref(cn)(unref(dialogCard)({
|
|
17524
18027
|
placement: props.placement ?? "auto",
|
|
17525
|
-
size: props.size
|
|
17526
|
-
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
|
|
18028
|
+
size: props.size,
|
|
18029
|
+
padded: !slots.body,
|
|
18030
|
+
fitViewport: true
|
|
18031
|
+
}), props.class)
|
|
18032
|
+
}), {
|
|
18033
|
+
default: withCtx(() => [!props.header || slots.body ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(DialogTitle), { "as-child": "" }, {
|
|
18034
|
+
default: withCtx(() => [createVNode(Heading_default, {
|
|
18035
|
+
level: 2,
|
|
18036
|
+
class: "sr-only"
|
|
18037
|
+
}, {
|
|
18038
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.title), 1)]),
|
|
18039
|
+
_: 1
|
|
18040
|
+
})]),
|
|
18041
|
+
_: 1
|
|
18042
|
+
}), props.description ? (openBlock(), createBlock(unref(DialogDescription), {
|
|
18043
|
+
key: 0,
|
|
18044
|
+
class: "sr-only"
|
|
18045
|
+
}, {
|
|
18046
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.description), 1)]),
|
|
18047
|
+
_: 1
|
|
18048
|
+
})) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), slots.body ? renderSlot(_ctx.$slots, "body", { close }, void 0, void 0, 1) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
18049
|
+
props.header ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("div", _hoisted_2$2, [createElementVNode("div", _hoisted_3$1, [slots.icon ? (openBlock(), createElementBlock("span", _hoisted_4$1, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true), createVNode(unref(DialogTitle), { "as-child": "" }, {
|
|
17530
18050
|
default: withCtx(() => [createVNode(Heading_default, {
|
|
17531
18051
|
level: 2,
|
|
17532
|
-
size: "lg"
|
|
18052
|
+
size: "lg",
|
|
18053
|
+
class: "min-w-0"
|
|
17533
18054
|
}, {
|
|
17534
|
-
default: withCtx(() => [createTextVNode(toDisplayString(props.title), 1)]),
|
|
17535
|
-
_:
|
|
18055
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(props.title), 1)])]),
|
|
18056
|
+
_: 3
|
|
17536
18057
|
})]),
|
|
17537
|
-
_:
|
|
17538
|
-
}), props.description ? (openBlock(), createBlock(unref(DialogDescription), {
|
|
18058
|
+
_: 3
|
|
18059
|
+
})]), props.description ? (openBlock(), createBlock(unref(DialogDescription), {
|
|
17539
18060
|
key: 0,
|
|
17540
18061
|
"as-child": ""
|
|
17541
18062
|
}, {
|
|
@@ -17544,24 +18065,27 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
17544
18065
|
_: 1
|
|
17545
18066
|
})]),
|
|
17546
18067
|
_: 1
|
|
17547
|
-
})) : createCommentVNode("", true)]),
|
|
18068
|
+
})) : createCommentVNode("", true)]), props.closable ? (openBlock(), createBlock(unref(DialogClose), {
|
|
18069
|
+
key: 0,
|
|
18070
|
+
"as-child": ""
|
|
18071
|
+
}, {
|
|
17548
18072
|
default: withCtx(() => [createVNode(CloseButton_default, {
|
|
17549
18073
|
disabled: props.locked,
|
|
17550
18074
|
class: "-mt-1.5 -me-1.5 shrink-0"
|
|
17551
18075
|
}, null, 8, ["disabled"])]),
|
|
17552
18076
|
_: 1
|
|
17553
|
-
})]),
|
|
18077
|
+
})) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
17554
18078
|
_ctx.$slots.content ? (openBlock(), createBlock(ScrollArea_default, {
|
|
17555
|
-
key:
|
|
18079
|
+
key: 1,
|
|
17556
18080
|
class: "min-h-0"
|
|
17557
18081
|
}, {
|
|
17558
|
-
default: withCtx(() => [createElementVNode("div",
|
|
18082
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_5$1, [renderSlot(_ctx.$slots, "content", { close })])]),
|
|
17559
18083
|
_: 3
|
|
17560
18084
|
})) : createCommentVNode("", true),
|
|
17561
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div",
|
|
17562
|
-
]),
|
|
18085
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "footer", { close })])) : createCommentVNode("", true)
|
|
18086
|
+
], 64))]),
|
|
17563
18087
|
_: 3
|
|
17564
|
-
},
|
|
18088
|
+
}, 16, ["class"])]),
|
|
17565
18089
|
_: 3
|
|
17566
18090
|
})], 2)]),
|
|
17567
18091
|
_: 3
|
|
@@ -18483,6 +19007,39 @@ var Spoiler_default = /* @__PURE__ */ defineComponent({
|
|
|
18483
19007
|
}
|
|
18484
19008
|
});
|
|
18485
19009
|
//#endregion
|
|
19010
|
+
//#region src/components/image/composables/useImageGroupState.ts
|
|
19011
|
+
function useImageGroupState() {
|
|
19012
|
+
const registry = reactive(/* @__PURE__ */ new Map());
|
|
19013
|
+
const open = shallowRef(false);
|
|
19014
|
+
const index = shallowRef(0);
|
|
19015
|
+
function byDom(a, b) {
|
|
19016
|
+
const first = a.source?.();
|
|
19017
|
+
const second = b.source?.();
|
|
19018
|
+
if (!first || !second || first === second) return 0;
|
|
19019
|
+
return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
19020
|
+
}
|
|
19021
|
+
const items = computed(() => [...registry.values()].map((read) => read()).sort(byDom));
|
|
19022
|
+
provideImageGroup({
|
|
19023
|
+
register: (id, item) => {
|
|
19024
|
+
registry.set(id, item);
|
|
19025
|
+
},
|
|
19026
|
+
unregister: (id) => {
|
|
19027
|
+
registry.delete(id);
|
|
19028
|
+
},
|
|
19029
|
+
open: (id) => {
|
|
19030
|
+
const at = items.value.findIndex((item) => item.id === id);
|
|
19031
|
+
if (at < 0) return;
|
|
19032
|
+
index.value = at;
|
|
19033
|
+
open.value = true;
|
|
19034
|
+
}
|
|
19035
|
+
});
|
|
19036
|
+
return {
|
|
19037
|
+
items,
|
|
19038
|
+
open,
|
|
19039
|
+
index
|
|
19040
|
+
};
|
|
19041
|
+
}
|
|
19042
|
+
//#endregion
|
|
18486
19043
|
//#region src/components/image/ImageGroup.vue
|
|
18487
19044
|
var ImageGroup_default = /* @__PURE__ */ defineComponent({
|
|
18488
19045
|
name: "HnImageGroup",
|
|
@@ -18490,37 +19047,14 @@ var ImageGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
18490
19047
|
props: { loop: { type: Boolean } },
|
|
18491
19048
|
setup(__props) {
|
|
18492
19049
|
const props = __props;
|
|
18493
|
-
const
|
|
18494
|
-
const open = shallowRef(false);
|
|
18495
|
-
const index = shallowRef(0);
|
|
18496
|
-
function byDom(a, b) {
|
|
18497
|
-
const first = a.source?.();
|
|
18498
|
-
const second = b.source?.();
|
|
18499
|
-
if (!first || !second || first === second) return 0;
|
|
18500
|
-
return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
18501
|
-
}
|
|
18502
|
-
const items = computed(() => [...registry.values()].map((read) => read()).sort(byDom));
|
|
18503
|
-
provideImageGroup({
|
|
18504
|
-
register: (id, item) => {
|
|
18505
|
-
registry.set(id, item);
|
|
18506
|
-
},
|
|
18507
|
-
unregister: (id) => {
|
|
18508
|
-
registry.delete(id);
|
|
18509
|
-
},
|
|
18510
|
-
open: (id) => {
|
|
18511
|
-
const at = items.value.findIndex((item) => item.id === id);
|
|
18512
|
-
if (at < 0) return;
|
|
18513
|
-
index.value = at;
|
|
18514
|
-
open.value = true;
|
|
18515
|
-
}
|
|
18516
|
-
});
|
|
19050
|
+
const { items, open, index } = useImageGroupState();
|
|
18517
19051
|
return (_ctx, _cache) => {
|
|
18518
19052
|
return openBlock(), createElementBlock(Fragment, null, [renderSlot(_ctx.$slots, "default"), createVNode(Lightbox_default, {
|
|
18519
|
-
open: open
|
|
18520
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
18521
|
-
index: index
|
|
18522
|
-
"onUpdate:index": _cache[1] || (_cache[1] = ($event) => index.value = $event),
|
|
18523
|
-
items: items
|
|
19053
|
+
open: unref(open),
|
|
19054
|
+
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => isRef(open) ? open.value = $event : null),
|
|
19055
|
+
index: unref(index),
|
|
19056
|
+
"onUpdate:index": _cache[1] || (_cache[1] = ($event) => isRef(index) ? index.value = $event : null),
|
|
19057
|
+
items: unref(items),
|
|
18524
19058
|
loop: props.loop
|
|
18525
19059
|
}, null, 8, [
|
|
18526
19060
|
"open",
|