@brumaombra/ui-vintage 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/dist/AlertDialogTitle.vue_vue_type_script_setup_true_lang-CWCr2erD.js +360 -0
- package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-vNwxOYhM.js +158 -0
- package/dist/BackgroundGrid-Cxvbtefm.js +13 -0
- package/dist/Busy-B65Nd9ec.js +62 -0
- package/dist/BusyIndicator-CnWzSMDb.js +4 -0
- package/dist/BusyIndicator.vue_vue_type_script_setup_true_lang-CYeXMI_V.js +66 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-C-WnFnvj.js +3805 -0
- package/dist/Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js +27 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-DVAd7AWF.js +112 -0
- package/dist/Collection-CmOoLBo7.js +76 -0
- package/dist/ConfigProvider-D2O0Jles.js +6 -0
- package/dist/ConfirmDialog-DEsvF0b_.js +4 -0
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-BAd1l1zF.js +230 -0
- package/dist/DashboardShell.vue_vue_type_script_setup_true_lang-CT2SQBXv.js +171 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-D8mev2ha.js +92 -0
- package/dist/DialogClose-BNlqG4G2.js +36 -0
- package/dist/DialogTitle-DXj0nkXn.js +522 -0
- package/dist/DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js +174 -0
- package/dist/DialogTrigger-CpyKnu11.js +52 -0
- package/dist/DialogTrigger.vue_vue_type_script_setup_true_lang-DLrFiCsw.js +141 -0
- package/dist/FocusScope-C3mcVwsf.js +454 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-U778IWa0.js +37 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-B_fwvfJ-.js +65 -0
- package/dist/MessageDialog-BrowppID.js +4 -0
- package/dist/MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js +242 -0
- package/dist/NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js +73 -0
- package/dist/PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js +61 -0
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-KTcg6Jnl.js +798 -0
- package/dist/PopperContent-BiM0YLO3.js +2144 -0
- package/dist/Primitive-D3IcFg81.js +61 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-DGAI4hw5.js +2124 -0
- package/dist/Separator-CFm_M4pb.js +87 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js +29 -0
- package/dist/SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js +175 -0
- package/dist/SheetTrigger.vue_vue_type_script_setup_true_lang-CE2XJNHy.js +62 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-BSbVyZz7.js +20 -0
- package/dist/Slider.vue_vue_type_script_setup_true_lang-D-cAN-4Q.js +802 -0
- package/dist/SliderFormComponent.vue_vue_type_script_setup_true_lang-KPzC_Lmr.js +59 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js +226 -0
- package/dist/SwitchFormComponent.vue_vue_type_script_setup_true_lang-XOBEs3pa.js +39 -0
- package/dist/Teleport-CuUn4UkG.js +493 -0
- package/dist/TooltipProvider.vue_vue_type_script_setup_true_lang-DwIfCQjY.js +28 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js +1117 -0
- package/dist/VisuallyHidden-udQT2Fmo.js +60 -0
- package/dist/VisuallyHiddenInput-DLAsRwUw.js +142 -0
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +13 -0
- package/dist/alert.d.ts +2 -0
- package/dist/alert.js +76 -0
- package/dist/background-grid.d.ts +6 -0
- package/dist/background-grid.js +5 -0
- package/dist/busy-indicator.d.ts +2 -0
- package/dist/busy-indicator.js +6 -0
- package/dist/busy.d.ts +2 -0
- package/dist/busy.js +4 -0
- package/dist/button.d.ts +2 -0
- package/dist/button.js +63 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/calendar.js +15 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +11 -0
- package/dist/check-iejznCzf.js +11 -0
- package/dist/chevron-down-DP-oz-sL.js +13 -0
- package/dist/clamp-D5Ye0kJT.js +6 -0
- package/dist/command.d.ts +2 -0
- package/dist/command.js +1122 -0
- package/dist/components/background-grid/BackgroundGrid.vue.d.ts +2 -0
- package/dist/components/background-grid/index.d.ts +2 -0
- package/dist/components/busy-indicator/BusyIndicator.vue.d.ts +2 -0
- package/dist/components/busy-indicator/busy-indicator-state.d.ts +15 -0
- package/dist/components/busy-indicator/index.d.ts +3 -0
- package/dist/components/confirm-dialog/ConfirmDialog.vue.d.ts +2 -0
- package/dist/components/confirm-dialog/confirm-dialog-state.d.ts +37 -0
- package/dist/components/confirm-dialog/index.d.ts +3 -0
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +54 -0
- package/dist/components/dashboard-shell/index.d.ts +2 -0
- package/dist/components/message-dialog/MessageDialog.vue.d.ts +2 -0
- package/dist/components/message-dialog/index.d.ts +3 -0
- package/dist/components/message-dialog/message-dialog-state.d.ts +28 -0
- package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +23 -0
- package/dist/components/slider-form-component/index.d.ts +2 -0
- package/dist/components/switch-form-component/SwitchFormComponent.vue.d.ts +12 -0
- package/dist/components/switch-form-component/index.d.ts +2 -0
- package/dist/components/ui/alert/Alert.vue.d.ts +23 -0
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +21 -0
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +21 -0
- package/dist/components/ui/alert/index.d.ts +8 -0
- package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +25 -0
- package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +36 -0
- package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +21 -0
- package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/alert-dialog/index.d.ts +9 -0
- package/dist/components/ui/busy/Busy.vue.d.ts +27 -0
- package/dist/components/ui/busy/index.d.ts +1 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +7 -0
- package/dist/components/ui/calendar/Calendar.vue.d.ts +44 -0
- package/dist/components/ui/calendar/CalendarCell.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarCellTrigger.vue.d.ts +24 -0
- package/dist/components/ui/calendar/CalendarGrid.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarGridBody.vue.d.ts +18 -0
- package/dist/components/ui/calendar/CalendarGridHead.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarGridRow.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeadCell.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeader.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeading.vue.d.ts +28 -0
- package/dist/components/ui/calendar/CalendarNextButton.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarPrevButton.vue.d.ts +22 -0
- package/dist/components/ui/calendar/index.d.ts +13 -0
- package/dist/components/ui/card/Card.vue.d.ts +21 -0
- package/dist/components/ui/card/CardAction.vue.d.ts +21 -0
- package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
- package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
- package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
- package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
- package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/command/Command.vue.d.ts +40 -0
- package/dist/components/ui/command/CommandDialog.vue.d.ts +32 -0
- package/dist/components/ui/command/CommandEmpty.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandGroup.vue.d.ts +23 -0
- package/dist/components/ui/command/CommandInput.vue.d.ts +7 -0
- package/dist/components/ui/command/CommandItem.vue.d.ts +30 -0
- package/dist/components/ui/command/CommandList.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandSeparator.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandShortcut.vue.d.ts +21 -0
- package/dist/components/ui/command/index.d.ts +90 -0
- package/dist/components/ui/date-picker/DatePicker.vue.d.ts +19 -0
- package/dist/components/ui/date-picker/index.d.ts +2 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +24 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dialog/index.d.ts +10 -0
- package/dist/components/ui/field/Field.vue.d.ts +23 -0
- package/dist/components/ui/field/FieldContent.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldDescription.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldError.vue.d.ts +24 -0
- package/dist/components/ui/field/FieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldLabel.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldLegend.vue.d.ts +22 -0
- package/dist/components/ui/field/FieldSeparator.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldSet.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldTitle.vue.d.ts +21 -0
- package/dist/components/ui/field/index.d.ts +15 -0
- package/dist/components/ui/input/Input.vue.d.ts +12 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/label/Label.vue.d.ts +22 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/native-select/NativeSelect.vue.d.ts +27 -0
- package/dist/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +21 -0
- package/dist/components/ui/native-select/NativeSelectOption.vue.d.ts +21 -0
- package/dist/components/ui/native-select/index.d.ts +3 -0
- package/dist/components/ui/popover/Popover.vue.d.ts +25 -0
- package/dist/components/ui/popover/PopoverAnchor.vue.d.ts +18 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +39 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +18 -0
- package/dist/components/ui/popover/index.d.ts +4 -0
- package/dist/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +32 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +24 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +10 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/sheet/Sheet.vue.d.ts +25 -0
- package/dist/components/ui/sheet/SheetClose.vue.d.ts +18 -0
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +39 -0
- package/dist/components/ui/sheet/SheetDescription.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetFooter.vue.d.ts +21 -0
- package/dist/components/ui/sheet/SheetHeader.vue.d.ts +21 -0
- package/dist/components/ui/sheet/SheetOverlay.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetTitle.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetTrigger.vue.d.ts +18 -0
- package/dist/components/ui/sheet/index.d.ts +8 -0
- package/dist/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +22 -0
- package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +22 -0
- package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +7 -0
- package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/index.d.ts +37 -0
- package/dist/components/ui/sidebar/utils.d.ts +56 -0
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +6 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +29 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +30 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/confirm-dialog.d.ts +2 -0
- package/dist/confirm-dialog.js +9 -0
- package/dist/createLucideIcon-CCMB2vDW.js +130 -0
- package/dist/dashboard-shell.d.ts +6 -0
- package/dist/dashboard-shell.js +5 -0
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +5 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +14 -0
- package/dist/field.d.ts +2 -0
- package/dist/field.js +294 -0
- package/dist/index-C1_fxYhb.js +251 -0
- package/dist/index-Dfi5ESP2.js +299 -0
- package/dist/index-FpH8cK6B.js +44 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +171 -0
- package/dist/info-DZrSmi42.js +15 -0
- package/dist/input.d.ts +2 -0
- package/dist/input.js +4 -0
- package/dist/label.d.ts +2 -0
- package/dist/label.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/message-dialog.d.ts +2 -0
- package/dist/message-dialog.js +8 -0
- package/dist/native-select.d.ts +2 -0
- package/dist/native-select.js +25 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +8 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +14 -0
- package/dist/separator.d.ts +2 -0
- package/dist/separator.js +4 -0
- package/dist/sheet.d.ts +2 -0
- package/dist/sheet.js +12 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/sidebar.js +813 -0
- package/dist/skeleton.d.ts +2 -0
- package/dist/skeleton.js +4 -0
- package/dist/slider-form-component.d.ts +6 -0
- package/dist/slider-form-component.js +5 -0
- package/dist/slider.d.ts +2 -0
- package/dist/slider.js +4 -0
- package/dist/style.css +4021 -0
- package/dist/switch-form-component.d.ts +6 -0
- package/dist/switch-form-component.js +5 -0
- package/dist/switch.d.ts +2 -0
- package/dist/switch.js +4 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +8 -0
- package/dist/useDirection-SIyEYNxv.js +12 -0
- package/dist/useFocusGuards-tgErlvMF.js +29 -0
- package/dist/useFormControl-7ytzz-r7.js +11 -0
- package/dist/useForwardExpose-CNVHwdF2.js +58 -0
- package/dist/useForwardPropsEmits-DmumnZO5.js +63 -0
- package/dist/useKbd-JjFOu4f7.js +41 -0
- package/dist/usePrimitiveElement-CijaRBgF.js +16 -0
- package/dist/useSize-DO9Z3wC4.js +51 -0
- package/dist/useTypeahead-Dqe1QXq1.js +159 -0
- package/dist/utils-Bz4m9VPB.js +3192 -0
- package/dist/utils-RRmyeqLm.js +16 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +4 -0
- package/dist/x-2_VzbDS9.js +48 -0
- package/package.json +186 -0
package/dist/sidebar.js
ADDED
|
@@ -0,0 +1,813 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { c as cva } from "./index-FpH8cK6B.js";
|
|
3
|
+
import { defineComponent, openBlock, createElementBlock, mergeProps, unref, renderSlot, createBlock, withCtx, createVNode, normalizeStyle, createTextVNode, createElementVNode, normalizeClass, normalizeProps, guardReactiveProps, Fragment, toDisplayString, resolveDynamicComponent, computed, createCommentVNode, ref } from "vue";
|
|
4
|
+
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
5
|
+
import { _ as _sfc_main$o, a as _sfc_main$p, c as _sfc_main$q, d as _sfc_main$r, b as _sfc_main$s } from "./SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js";
|
|
6
|
+
import { c as createContext } from "./useForwardPropsEmits-DmumnZO5.js";
|
|
7
|
+
import { P as Primitive } from "./Primitive-D3IcFg81.js";
|
|
8
|
+
import { _ as _sfc_main$t } from "./Input.vue_vue_type_script_setup_true_lang-U778IWa0.js";
|
|
9
|
+
import { _ as _sfc_main$u, b as _sfc_main$v, a as _sfc_main$w, T as TooltipProvider_default } from "./TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js";
|
|
10
|
+
import { _ as _sfc_main$x } from "./Skeleton.vue_vue_type_script_setup_true_lang-BSbVyZz7.js";
|
|
11
|
+
import { f as useMediaQuery, u as useVModel, b as useEventListener, g as defaultDocument } from "./index-C1_fxYhb.js";
|
|
12
|
+
import { _ as _sfc_main$y } from "./Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js";
|
|
13
|
+
import { Button as _sfc_main$z } from "./button.js";
|
|
14
|
+
import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
|
|
15
|
+
import { r as reactiveOmit } from "./index-Dfi5ESP2.js";
|
|
16
|
+
/**
|
|
17
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
const PanelLeft = createLucideIcon("panel-left", [
|
|
23
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
24
|
+
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
25
|
+
]);
|
|
26
|
+
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
27
|
+
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
28
|
+
const SIDEBAR_WIDTH = "16rem";
|
|
29
|
+
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
30
|
+
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
31
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
32
|
+
const [useSidebar, provideSidebarContext] = createContext("Sidebar");
|
|
33
|
+
const _hoisted_1 = ["data-state", "data-collapsible", "data-variant", "data-side"];
|
|
34
|
+
const _hoisted_2 = {
|
|
35
|
+
"data-sidebar": "sidebar",
|
|
36
|
+
class: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
|
37
|
+
};
|
|
38
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
39
|
+
...{
|
|
40
|
+
inheritAttrs: false
|
|
41
|
+
},
|
|
42
|
+
__name: "Sidebar",
|
|
43
|
+
props: {
|
|
44
|
+
side: { default: "left" },
|
|
45
|
+
variant: { default: "sidebar" },
|
|
46
|
+
collapsible: { default: "offcanvas" },
|
|
47
|
+
class: {}
|
|
48
|
+
},
|
|
49
|
+
setup(__props) {
|
|
50
|
+
const props = __props;
|
|
51
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
52
|
+
function handleMobileSidebarClick(event) {
|
|
53
|
+
const target = event.target;
|
|
54
|
+
if (target == null ? void 0 : target.closest('[data-sidebar="menu-button"]')) {
|
|
55
|
+
setOpenMobile(false);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
return _ctx.collapsible === "none" ? (openBlock(), createElementBlock("div", mergeProps({
|
|
60
|
+
key: 0,
|
|
61
|
+
"data-slot": "sidebar",
|
|
62
|
+
class: unref(cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", props.class)
|
|
63
|
+
}, _ctx.$attrs), [
|
|
64
|
+
renderSlot(_ctx.$slots, "default")
|
|
65
|
+
], 16)) : unref(isMobile) ? (openBlock(), createBlock(unref(_sfc_main$o), mergeProps({
|
|
66
|
+
key: 1,
|
|
67
|
+
open: unref(openMobile)
|
|
68
|
+
}, _ctx.$attrs, { "onUpdate:open": unref(setOpenMobile) }), {
|
|
69
|
+
default: withCtx(() => [
|
|
70
|
+
createVNode(unref(_sfc_main$p), {
|
|
71
|
+
"data-sidebar": "sidebar",
|
|
72
|
+
"data-slot": "sidebar",
|
|
73
|
+
"data-mobile": "true",
|
|
74
|
+
side: _ctx.side,
|
|
75
|
+
class: "border-sidebar-border bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
76
|
+
style: normalizeStyle({
|
|
77
|
+
"--sidebar-width": unref(SIDEBAR_WIDTH_MOBILE)
|
|
78
|
+
})
|
|
79
|
+
}, {
|
|
80
|
+
default: withCtx(() => [
|
|
81
|
+
createVNode(_sfc_main$q, { class: "sr-only" }, {
|
|
82
|
+
default: withCtx(() => [
|
|
83
|
+
createVNode(_sfc_main$r, null, {
|
|
84
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
85
|
+
createTextVNode("Sidebar")
|
|
86
|
+
])),
|
|
87
|
+
_: 1
|
|
88
|
+
}),
|
|
89
|
+
createVNode(_sfc_main$s, null, {
|
|
90
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
91
|
+
createTextVNode("Displays the mobile sidebar.")
|
|
92
|
+
])),
|
|
93
|
+
_: 1
|
|
94
|
+
})
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}),
|
|
98
|
+
createElementVNode("div", {
|
|
99
|
+
class: "flex h-full w-full flex-col",
|
|
100
|
+
onClick: handleMobileSidebarClick
|
|
101
|
+
}, [
|
|
102
|
+
renderSlot(_ctx.$slots, "default")
|
|
103
|
+
])
|
|
104
|
+
]),
|
|
105
|
+
_: 3
|
|
106
|
+
}, 8, ["side", "style"])
|
|
107
|
+
]),
|
|
108
|
+
_: 3
|
|
109
|
+
}, 16, ["open", "onUpdate:open"])) : (openBlock(), createElementBlock("div", {
|
|
110
|
+
key: 2,
|
|
111
|
+
class: "group peer text-sidebar-foreground hidden md:block",
|
|
112
|
+
"data-slot": "sidebar",
|
|
113
|
+
"data-state": unref(state),
|
|
114
|
+
"data-collapsible": unref(state) === "collapsed" ? _ctx.collapsible : "",
|
|
115
|
+
"data-variant": _ctx.variant,
|
|
116
|
+
"data-side": _ctx.side
|
|
117
|
+
}, [
|
|
118
|
+
createElementVNode("div", {
|
|
119
|
+
class: normalizeClass(unref(cn)(
|
|
120
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
121
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
122
|
+
"group-data-[side=right]:rotate-180",
|
|
123
|
+
_ctx.variant === "floating" || _ctx.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
124
|
+
))
|
|
125
|
+
}, null, 2),
|
|
126
|
+
createElementVNode("div", mergeProps({
|
|
127
|
+
class: unref(cn)(
|
|
128
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
129
|
+
_ctx.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
130
|
+
// Adjust the padding for floating and inset variants.
|
|
131
|
+
_ctx.variant === "floating" || _ctx.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "border-sidebar-border group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
132
|
+
props.class
|
|
133
|
+
)
|
|
134
|
+
}, _ctx.$attrs), [
|
|
135
|
+
createElementVNode("div", _hoisted_2, [
|
|
136
|
+
renderSlot(_ctx.$slots, "default")
|
|
137
|
+
])
|
|
138
|
+
], 16)
|
|
139
|
+
], 8, _hoisted_1));
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
144
|
+
__name: "SidebarContent",
|
|
145
|
+
props: {
|
|
146
|
+
class: {}
|
|
147
|
+
},
|
|
148
|
+
setup(__props) {
|
|
149
|
+
const props = __props;
|
|
150
|
+
return (_ctx, _cache) => {
|
|
151
|
+
return openBlock(), createElementBlock("div", {
|
|
152
|
+
"data-slot": "sidebar-content",
|
|
153
|
+
"data-sidebar": "content",
|
|
154
|
+
class: normalizeClass(unref(cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", props.class))
|
|
155
|
+
}, [
|
|
156
|
+
renderSlot(_ctx.$slots, "default")
|
|
157
|
+
], 2);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
162
|
+
__name: "SidebarFooter",
|
|
163
|
+
props: {
|
|
164
|
+
class: {}
|
|
165
|
+
},
|
|
166
|
+
setup(__props) {
|
|
167
|
+
const props = __props;
|
|
168
|
+
return (_ctx, _cache) => {
|
|
169
|
+
return openBlock(), createElementBlock("div", {
|
|
170
|
+
"data-slot": "sidebar-footer",
|
|
171
|
+
"data-sidebar": "footer",
|
|
172
|
+
class: normalizeClass(unref(cn)("flex flex-col gap-2 p-2", props.class))
|
|
173
|
+
}, [
|
|
174
|
+
renderSlot(_ctx.$slots, "default")
|
|
175
|
+
], 2);
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
180
|
+
__name: "SidebarGroup",
|
|
181
|
+
props: {
|
|
182
|
+
class: {}
|
|
183
|
+
},
|
|
184
|
+
setup(__props) {
|
|
185
|
+
const props = __props;
|
|
186
|
+
return (_ctx, _cache) => {
|
|
187
|
+
return openBlock(), createElementBlock("div", {
|
|
188
|
+
"data-slot": "sidebar-group",
|
|
189
|
+
"data-sidebar": "group",
|
|
190
|
+
class: normalizeClass(unref(cn)("relative flex w-full min-w-0 flex-col p-2", props.class))
|
|
191
|
+
}, [
|
|
192
|
+
renderSlot(_ctx.$slots, "default")
|
|
193
|
+
], 2);
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
198
|
+
__name: "SidebarGroupAction",
|
|
199
|
+
props: {
|
|
200
|
+
asChild: { type: Boolean },
|
|
201
|
+
as: {},
|
|
202
|
+
class: {}
|
|
203
|
+
},
|
|
204
|
+
setup(__props) {
|
|
205
|
+
const props = __props;
|
|
206
|
+
return (_ctx, _cache) => {
|
|
207
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
208
|
+
"data-slot": "sidebar-group-action",
|
|
209
|
+
"data-sidebar": "group-action",
|
|
210
|
+
as: _ctx.as,
|
|
211
|
+
"as-child": _ctx.asChild,
|
|
212
|
+
class: normalizeClass(unref(cn)(
|
|
213
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
214
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
215
|
+
"group-data-[collapsible=icon]:hidden",
|
|
216
|
+
props.class
|
|
217
|
+
))
|
|
218
|
+
}, {
|
|
219
|
+
default: withCtx(() => [
|
|
220
|
+
renderSlot(_ctx.$slots, "default")
|
|
221
|
+
]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 8, ["as", "as-child", "class"]);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
228
|
+
__name: "SidebarGroupContent",
|
|
229
|
+
props: {
|
|
230
|
+
class: {}
|
|
231
|
+
},
|
|
232
|
+
setup(__props) {
|
|
233
|
+
const props = __props;
|
|
234
|
+
return (_ctx, _cache) => {
|
|
235
|
+
return openBlock(), createElementBlock("div", {
|
|
236
|
+
"data-slot": "sidebar-group-content",
|
|
237
|
+
"data-sidebar": "group-content",
|
|
238
|
+
class: normalizeClass(unref(cn)("w-full text-sm", props.class))
|
|
239
|
+
}, [
|
|
240
|
+
renderSlot(_ctx.$slots, "default")
|
|
241
|
+
], 2);
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
246
|
+
__name: "SidebarGroupLabel",
|
|
247
|
+
props: {
|
|
248
|
+
asChild: { type: Boolean },
|
|
249
|
+
as: {},
|
|
250
|
+
class: {}
|
|
251
|
+
},
|
|
252
|
+
setup(__props) {
|
|
253
|
+
const props = __props;
|
|
254
|
+
return (_ctx, _cache) => {
|
|
255
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
256
|
+
"data-slot": "sidebar-group-label",
|
|
257
|
+
"data-sidebar": "group-label",
|
|
258
|
+
as: _ctx.as,
|
|
259
|
+
"as-child": _ctx.asChild,
|
|
260
|
+
class: normalizeClass(unref(cn)(
|
|
261
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
262
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
263
|
+
props.class
|
|
264
|
+
))
|
|
265
|
+
}, {
|
|
266
|
+
default: withCtx(() => [
|
|
267
|
+
renderSlot(_ctx.$slots, "default")
|
|
268
|
+
]),
|
|
269
|
+
_: 3
|
|
270
|
+
}, 8, ["as", "as-child", "class"]);
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
275
|
+
__name: "SidebarHeader",
|
|
276
|
+
props: {
|
|
277
|
+
class: {}
|
|
278
|
+
},
|
|
279
|
+
setup(__props) {
|
|
280
|
+
const props = __props;
|
|
281
|
+
return (_ctx, _cache) => {
|
|
282
|
+
return openBlock(), createElementBlock("div", {
|
|
283
|
+
"data-slot": "sidebar-header",
|
|
284
|
+
"data-sidebar": "header",
|
|
285
|
+
class: normalizeClass(unref(cn)("flex flex-col gap-2 p-2", props.class))
|
|
286
|
+
}, [
|
|
287
|
+
renderSlot(_ctx.$slots, "default")
|
|
288
|
+
], 2);
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
293
|
+
__name: "SidebarInput",
|
|
294
|
+
props: {
|
|
295
|
+
class: {}
|
|
296
|
+
},
|
|
297
|
+
setup(__props) {
|
|
298
|
+
const props = __props;
|
|
299
|
+
return (_ctx, _cache) => {
|
|
300
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
301
|
+
"data-slot": "sidebar-input",
|
|
302
|
+
"data-sidebar": "input",
|
|
303
|
+
class: normalizeClass(unref(cn)(
|
|
304
|
+
"bg-background h-8 w-full shadow-none",
|
|
305
|
+
props.class
|
|
306
|
+
))
|
|
307
|
+
}, {
|
|
308
|
+
default: withCtx(() => [
|
|
309
|
+
renderSlot(_ctx.$slots, "default")
|
|
310
|
+
]),
|
|
311
|
+
_: 3
|
|
312
|
+
}, 8, ["class"]);
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
317
|
+
__name: "SidebarInset",
|
|
318
|
+
props: {
|
|
319
|
+
class: {}
|
|
320
|
+
},
|
|
321
|
+
setup(__props) {
|
|
322
|
+
const props = __props;
|
|
323
|
+
return (_ctx, _cache) => {
|
|
324
|
+
return openBlock(), createElementBlock("main", {
|
|
325
|
+
"data-slot": "sidebar-inset",
|
|
326
|
+
class: normalizeClass(unref(cn)(
|
|
327
|
+
"bg-background relative flex w-full flex-1 flex-col",
|
|
328
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
329
|
+
props.class
|
|
330
|
+
))
|
|
331
|
+
}, [
|
|
332
|
+
renderSlot(_ctx.$slots, "default")
|
|
333
|
+
], 2);
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
338
|
+
__name: "SidebarMenu",
|
|
339
|
+
props: {
|
|
340
|
+
class: {}
|
|
341
|
+
},
|
|
342
|
+
setup(__props) {
|
|
343
|
+
const props = __props;
|
|
344
|
+
return (_ctx, _cache) => {
|
|
345
|
+
return openBlock(), createElementBlock("ul", {
|
|
346
|
+
"data-slot": "sidebar-menu",
|
|
347
|
+
"data-sidebar": "menu",
|
|
348
|
+
class: normalizeClass(unref(cn)("flex w-full min-w-0 flex-col gap-1", props.class))
|
|
349
|
+
}, [
|
|
350
|
+
renderSlot(_ctx.$slots, "default")
|
|
351
|
+
], 2);
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
356
|
+
__name: "SidebarMenuAction",
|
|
357
|
+
props: {
|
|
358
|
+
asChild: { type: Boolean },
|
|
359
|
+
as: { default: "button" },
|
|
360
|
+
showOnHover: { type: Boolean },
|
|
361
|
+
class: {}
|
|
362
|
+
},
|
|
363
|
+
setup(__props) {
|
|
364
|
+
const props = __props;
|
|
365
|
+
return (_ctx, _cache) => {
|
|
366
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
367
|
+
"data-slot": "sidebar-menu-action",
|
|
368
|
+
"data-sidebar": "menu-action",
|
|
369
|
+
class: normalizeClass(unref(cn)(
|
|
370
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
371
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
372
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
373
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
374
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
375
|
+
"group-data-[collapsible=icon]:hidden",
|
|
376
|
+
_ctx.showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
377
|
+
props.class
|
|
378
|
+
)),
|
|
379
|
+
as: _ctx.as,
|
|
380
|
+
"as-child": _ctx.asChild
|
|
381
|
+
}, {
|
|
382
|
+
default: withCtx(() => [
|
|
383
|
+
renderSlot(_ctx.$slots, "default")
|
|
384
|
+
]),
|
|
385
|
+
_: 3
|
|
386
|
+
}, 8, ["class", "as", "as-child"]);
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
391
|
+
__name: "SidebarMenuBadge",
|
|
392
|
+
props: {
|
|
393
|
+
class: {}
|
|
394
|
+
},
|
|
395
|
+
setup(__props) {
|
|
396
|
+
const props = __props;
|
|
397
|
+
return (_ctx, _cache) => {
|
|
398
|
+
return openBlock(), createElementBlock("div", {
|
|
399
|
+
"data-slot": "sidebar-menu-badge",
|
|
400
|
+
"data-sidebar": "menu-badge",
|
|
401
|
+
class: normalizeClass(unref(cn)(
|
|
402
|
+
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
403
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
404
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
405
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
406
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
407
|
+
"group-data-[collapsible=icon]:hidden",
|
|
408
|
+
props.class
|
|
409
|
+
))
|
|
410
|
+
}, [
|
|
411
|
+
renderSlot(_ctx.$slots, "default")
|
|
412
|
+
], 2);
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
417
|
+
__name: "SidebarMenuButtonChild",
|
|
418
|
+
props: {
|
|
419
|
+
variant: { default: "default" },
|
|
420
|
+
size: { default: "default" },
|
|
421
|
+
isActive: { type: Boolean },
|
|
422
|
+
class: {},
|
|
423
|
+
asChild: { type: Boolean },
|
|
424
|
+
as: { default: "button" }
|
|
425
|
+
},
|
|
426
|
+
setup(__props) {
|
|
427
|
+
const props = __props;
|
|
428
|
+
return (_ctx, _cache) => {
|
|
429
|
+
return openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
430
|
+
"data-slot": "sidebar-menu-button",
|
|
431
|
+
"data-sidebar": "menu-button",
|
|
432
|
+
"data-size": _ctx.size,
|
|
433
|
+
"data-active": _ctx.isActive,
|
|
434
|
+
class: unref(cn)(unref(sidebarMenuButtonVariants)({ variant: _ctx.variant, size: _ctx.size }), props.class),
|
|
435
|
+
as: _ctx.as,
|
|
436
|
+
"as-child": _ctx.asChild
|
|
437
|
+
}, _ctx.$attrs), {
|
|
438
|
+
default: withCtx(() => [
|
|
439
|
+
renderSlot(_ctx.$slots, "default")
|
|
440
|
+
]),
|
|
441
|
+
_: 3
|
|
442
|
+
}, 16, ["data-size", "data-active", "class", "as", "as-child"]);
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
447
|
+
...{
|
|
448
|
+
inheritAttrs: false
|
|
449
|
+
},
|
|
450
|
+
__name: "SidebarMenuButton",
|
|
451
|
+
props: {
|
|
452
|
+
variant: { default: "default" },
|
|
453
|
+
size: { default: "default" },
|
|
454
|
+
isActive: { type: Boolean },
|
|
455
|
+
class: {},
|
|
456
|
+
asChild: { type: Boolean },
|
|
457
|
+
as: { default: "button" },
|
|
458
|
+
tooltip: {}
|
|
459
|
+
},
|
|
460
|
+
setup(__props) {
|
|
461
|
+
const props = __props;
|
|
462
|
+
const { isMobile, state } = useSidebar();
|
|
463
|
+
const delegatedProps = reactiveOmit(props, "tooltip");
|
|
464
|
+
return (_ctx, _cache) => {
|
|
465
|
+
return !_ctx.tooltip ? (openBlock(), createBlock(_sfc_main$a, normalizeProps(mergeProps({ key: 0 }, { ...unref(delegatedProps), ..._ctx.$attrs })), {
|
|
466
|
+
default: withCtx(() => [
|
|
467
|
+
renderSlot(_ctx.$slots, "default")
|
|
468
|
+
]),
|
|
469
|
+
_: 3
|
|
470
|
+
}, 16)) : (openBlock(), createBlock(unref(_sfc_main$u), { key: 1 }, {
|
|
471
|
+
default: withCtx(() => [
|
|
472
|
+
createVNode(unref(_sfc_main$v), { "as-child": "" }, {
|
|
473
|
+
default: withCtx(() => [
|
|
474
|
+
createVNode(_sfc_main$a, normalizeProps(guardReactiveProps({ ...unref(delegatedProps), ..._ctx.$attrs })), {
|
|
475
|
+
default: withCtx(() => [
|
|
476
|
+
renderSlot(_ctx.$slots, "default")
|
|
477
|
+
]),
|
|
478
|
+
_: 3
|
|
479
|
+
}, 16)
|
|
480
|
+
]),
|
|
481
|
+
_: 3
|
|
482
|
+
}),
|
|
483
|
+
createVNode(unref(_sfc_main$w), {
|
|
484
|
+
side: "right",
|
|
485
|
+
align: "center",
|
|
486
|
+
hidden: unref(state) !== "collapsed" || unref(isMobile)
|
|
487
|
+
}, {
|
|
488
|
+
default: withCtx(() => [
|
|
489
|
+
typeof _ctx.tooltip === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
490
|
+
createTextVNode(toDisplayString(_ctx.tooltip), 1)
|
|
491
|
+
], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.tooltip), { key: 1 }))
|
|
492
|
+
]),
|
|
493
|
+
_: 1
|
|
494
|
+
}, 8, ["hidden"])
|
|
495
|
+
]),
|
|
496
|
+
_: 3
|
|
497
|
+
}));
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
502
|
+
__name: "SidebarMenuItem",
|
|
503
|
+
props: {
|
|
504
|
+
class: {}
|
|
505
|
+
},
|
|
506
|
+
setup(__props) {
|
|
507
|
+
const props = __props;
|
|
508
|
+
return (_ctx, _cache) => {
|
|
509
|
+
return openBlock(), createElementBlock("li", {
|
|
510
|
+
"data-slot": "sidebar-menu-item",
|
|
511
|
+
"data-sidebar": "menu-item",
|
|
512
|
+
class: normalizeClass(unref(cn)("group/menu-item relative", props.class))
|
|
513
|
+
}, [
|
|
514
|
+
renderSlot(_ctx.$slots, "default")
|
|
515
|
+
], 2);
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
520
|
+
__name: "SidebarMenuSkeleton",
|
|
521
|
+
props: {
|
|
522
|
+
showIcon: { type: Boolean },
|
|
523
|
+
class: {}
|
|
524
|
+
},
|
|
525
|
+
setup(__props) {
|
|
526
|
+
const props = __props;
|
|
527
|
+
const width = computed(() => {
|
|
528
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
529
|
+
});
|
|
530
|
+
return (_ctx, _cache) => {
|
|
531
|
+
return openBlock(), createElementBlock("div", {
|
|
532
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
533
|
+
"data-sidebar": "menu-skeleton",
|
|
534
|
+
class: normalizeClass(unref(cn)("flex h-8 items-center gap-2 rounded-md px-2", props.class))
|
|
535
|
+
}, [
|
|
536
|
+
_ctx.showIcon ? (openBlock(), createBlock(unref(_sfc_main$x), {
|
|
537
|
+
key: 0,
|
|
538
|
+
class: "size-4 rounded-md",
|
|
539
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
540
|
+
})) : createCommentVNode("", true),
|
|
541
|
+
createVNode(unref(_sfc_main$x), {
|
|
542
|
+
class: "h-4 max-w-(--skeleton-width) flex-1",
|
|
543
|
+
"data-sidebar": "menu-skeleton-text",
|
|
544
|
+
style: normalizeStyle({ "--skeleton-width": width.value })
|
|
545
|
+
}, null, 8, ["style"])
|
|
546
|
+
], 2);
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
551
|
+
__name: "SidebarMenuSub",
|
|
552
|
+
props: {
|
|
553
|
+
class: {}
|
|
554
|
+
},
|
|
555
|
+
setup(__props) {
|
|
556
|
+
const props = __props;
|
|
557
|
+
return (_ctx, _cache) => {
|
|
558
|
+
return openBlock(), createElementBlock("ul", {
|
|
559
|
+
"data-slot": "sidebar-menu-sub",
|
|
560
|
+
"data-sidebar": "menu-badge",
|
|
561
|
+
class: normalizeClass(unref(cn)(
|
|
562
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
563
|
+
"group-data-[collapsible=icon]:hidden",
|
|
564
|
+
props.class
|
|
565
|
+
))
|
|
566
|
+
}, [
|
|
567
|
+
renderSlot(_ctx.$slots, "default")
|
|
568
|
+
], 2);
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
573
|
+
__name: "SidebarMenuSubButton",
|
|
574
|
+
props: {
|
|
575
|
+
asChild: { type: Boolean },
|
|
576
|
+
as: { default: "a" },
|
|
577
|
+
size: { default: "md" },
|
|
578
|
+
isActive: { type: Boolean },
|
|
579
|
+
class: {}
|
|
580
|
+
},
|
|
581
|
+
setup(__props) {
|
|
582
|
+
const props = __props;
|
|
583
|
+
return (_ctx, _cache) => {
|
|
584
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
585
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
586
|
+
"data-sidebar": "menu-sub-button",
|
|
587
|
+
as: _ctx.as,
|
|
588
|
+
"as-child": _ctx.asChild,
|
|
589
|
+
"data-size": _ctx.size,
|
|
590
|
+
"data-active": _ctx.isActive,
|
|
591
|
+
class: normalizeClass(unref(cn)(
|
|
592
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
593
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
594
|
+
_ctx.size === "sm" && "text-xs",
|
|
595
|
+
_ctx.size === "md" && "text-sm",
|
|
596
|
+
"group-data-[collapsible=icon]:hidden",
|
|
597
|
+
props.class
|
|
598
|
+
))
|
|
599
|
+
}, {
|
|
600
|
+
default: withCtx(() => [
|
|
601
|
+
renderSlot(_ctx.$slots, "default")
|
|
602
|
+
]),
|
|
603
|
+
_: 3
|
|
604
|
+
}, 8, ["as", "as-child", "data-size", "data-active", "class"]);
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
609
|
+
__name: "SidebarMenuSubItem",
|
|
610
|
+
props: {
|
|
611
|
+
class: {}
|
|
612
|
+
},
|
|
613
|
+
setup(__props) {
|
|
614
|
+
const props = __props;
|
|
615
|
+
return (_ctx, _cache) => {
|
|
616
|
+
return openBlock(), createElementBlock("li", {
|
|
617
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
618
|
+
"data-sidebar": "menu-sub-item",
|
|
619
|
+
class: normalizeClass(unref(cn)("group/menu-sub-item relative", props.class))
|
|
620
|
+
}, [
|
|
621
|
+
renderSlot(_ctx.$slots, "default")
|
|
622
|
+
], 2);
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
627
|
+
__name: "SidebarProvider",
|
|
628
|
+
props: {
|
|
629
|
+
defaultOpen: { type: Boolean, default: !((_a = defaultDocument) == null ? void 0 : _a.cookie.includes(`${SIDEBAR_COOKIE_NAME}=false`)) },
|
|
630
|
+
open: { type: Boolean, default: void 0 },
|
|
631
|
+
class: {}
|
|
632
|
+
},
|
|
633
|
+
emits: ["update:open"],
|
|
634
|
+
setup(__props, { emit: __emit }) {
|
|
635
|
+
const props = __props;
|
|
636
|
+
const emits = __emit;
|
|
637
|
+
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
638
|
+
const openMobile = ref(false);
|
|
639
|
+
const open = useVModel(props, "open", emits, {
|
|
640
|
+
defaultValue: props.defaultOpen ?? false,
|
|
641
|
+
passive: props.open === void 0
|
|
642
|
+
});
|
|
643
|
+
function setOpen(value) {
|
|
644
|
+
open.value = value;
|
|
645
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${open.value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
646
|
+
}
|
|
647
|
+
function setOpenMobile(value) {
|
|
648
|
+
openMobile.value = value;
|
|
649
|
+
}
|
|
650
|
+
function toggleSidebar() {
|
|
651
|
+
return isMobile.value ? setOpenMobile(!openMobile.value) : setOpen(!open.value);
|
|
652
|
+
}
|
|
653
|
+
useEventListener("keydown", (event) => {
|
|
654
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
655
|
+
event.preventDefault();
|
|
656
|
+
toggleSidebar();
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
const state = computed(() => open.value ? "expanded" : "collapsed");
|
|
660
|
+
provideSidebarContext({
|
|
661
|
+
state,
|
|
662
|
+
open,
|
|
663
|
+
setOpen,
|
|
664
|
+
isMobile,
|
|
665
|
+
openMobile,
|
|
666
|
+
setOpenMobile,
|
|
667
|
+
toggleSidebar
|
|
668
|
+
});
|
|
669
|
+
return (_ctx, _cache) => {
|
|
670
|
+
return openBlock(), createBlock(unref(TooltipProvider_default), { "delay-duration": 0 }, {
|
|
671
|
+
default: withCtx(() => [
|
|
672
|
+
createElementVNode("div", mergeProps({
|
|
673
|
+
"data-slot": "sidebar-wrapper",
|
|
674
|
+
style: {
|
|
675
|
+
"--sidebar-width": unref(SIDEBAR_WIDTH),
|
|
676
|
+
"--sidebar-width-icon": unref(SIDEBAR_WIDTH_ICON)
|
|
677
|
+
},
|
|
678
|
+
class: unref(cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", props.class)
|
|
679
|
+
}, _ctx.$attrs), [
|
|
680
|
+
renderSlot(_ctx.$slots, "default")
|
|
681
|
+
], 16)
|
|
682
|
+
]),
|
|
683
|
+
_: 3
|
|
684
|
+
});
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
689
|
+
__name: "SidebarRail",
|
|
690
|
+
props: {
|
|
691
|
+
class: {}
|
|
692
|
+
},
|
|
693
|
+
setup(__props) {
|
|
694
|
+
const props = __props;
|
|
695
|
+
const { toggleSidebar } = useSidebar();
|
|
696
|
+
return (_ctx, _cache) => {
|
|
697
|
+
return openBlock(), createElementBlock("button", {
|
|
698
|
+
"data-sidebar": "rail",
|
|
699
|
+
"data-slot": "sidebar-rail",
|
|
700
|
+
"aria-label": "Toggle Sidebar",
|
|
701
|
+
tabindex: -1,
|
|
702
|
+
title: "Toggle Sidebar",
|
|
703
|
+
class: normalizeClass(unref(cn)(
|
|
704
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
705
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
706
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
707
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
708
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
709
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
710
|
+
props.class
|
|
711
|
+
)),
|
|
712
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
713
|
+
(...args) => unref(toggleSidebar) && unref(toggleSidebar)(...args))
|
|
714
|
+
}, [
|
|
715
|
+
renderSlot(_ctx.$slots, "default")
|
|
716
|
+
], 2);
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
721
|
+
__name: "SidebarSeparator",
|
|
722
|
+
props: {
|
|
723
|
+
class: {}
|
|
724
|
+
},
|
|
725
|
+
setup(__props) {
|
|
726
|
+
const props = __props;
|
|
727
|
+
return (_ctx, _cache) => {
|
|
728
|
+
return openBlock(), createBlock(unref(_sfc_main$y), {
|
|
729
|
+
"data-slot": "sidebar-separator",
|
|
730
|
+
"data-sidebar": "separator",
|
|
731
|
+
class: normalizeClass(unref(cn)("bg-sidebar-border mx-2 w-auto", props.class))
|
|
732
|
+
}, {
|
|
733
|
+
default: withCtx(() => [
|
|
734
|
+
renderSlot(_ctx.$slots, "default")
|
|
735
|
+
]),
|
|
736
|
+
_: 3
|
|
737
|
+
}, 8, ["class"]);
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
742
|
+
__name: "SidebarTrigger",
|
|
743
|
+
props: {
|
|
744
|
+
class: {}
|
|
745
|
+
},
|
|
746
|
+
setup(__props) {
|
|
747
|
+
const props = __props;
|
|
748
|
+
const { toggleSidebar } = useSidebar();
|
|
749
|
+
return (_ctx, _cache) => {
|
|
750
|
+
return openBlock(), createBlock(unref(_sfc_main$z), {
|
|
751
|
+
"data-sidebar": "trigger",
|
|
752
|
+
"data-slot": "sidebar-trigger",
|
|
753
|
+
variant: "outline",
|
|
754
|
+
size: "icon",
|
|
755
|
+
class: normalizeClass(unref(cn)(props.class)),
|
|
756
|
+
onClick: unref(toggleSidebar)
|
|
757
|
+
}, {
|
|
758
|
+
default: withCtx(() => [
|
|
759
|
+
createVNode(unref(PanelLeft)),
|
|
760
|
+
_cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "Toggle Sidebar", -1))
|
|
761
|
+
]),
|
|
762
|
+
_: 1
|
|
763
|
+
}, 8, ["class", "onClick"]);
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
const sidebarMenuButtonVariants = cva(
|
|
768
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
769
|
+
{
|
|
770
|
+
variants: {
|
|
771
|
+
variant: {
|
|
772
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
773
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
774
|
+
},
|
|
775
|
+
size: {
|
|
776
|
+
default: "h-8 text-sm",
|
|
777
|
+
sm: "h-7 text-xs",
|
|
778
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
defaultVariants: {
|
|
782
|
+
variant: "default",
|
|
783
|
+
size: "default"
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
export {
|
|
788
|
+
_sfc_main$n as Sidebar,
|
|
789
|
+
_sfc_main$m as SidebarContent,
|
|
790
|
+
_sfc_main$l as SidebarFooter,
|
|
791
|
+
_sfc_main$k as SidebarGroup,
|
|
792
|
+
_sfc_main$j as SidebarGroupAction,
|
|
793
|
+
_sfc_main$i as SidebarGroupContent,
|
|
794
|
+
_sfc_main$h as SidebarGroupLabel,
|
|
795
|
+
_sfc_main$g as SidebarHeader,
|
|
796
|
+
_sfc_main$f as SidebarInput,
|
|
797
|
+
_sfc_main$e as SidebarInset,
|
|
798
|
+
_sfc_main$d as SidebarMenu,
|
|
799
|
+
_sfc_main$c as SidebarMenuAction,
|
|
800
|
+
_sfc_main$b as SidebarMenuBadge,
|
|
801
|
+
_sfc_main$9 as SidebarMenuButton,
|
|
802
|
+
_sfc_main$8 as SidebarMenuItem,
|
|
803
|
+
_sfc_main$7 as SidebarMenuSkeleton,
|
|
804
|
+
_sfc_main$6 as SidebarMenuSub,
|
|
805
|
+
_sfc_main$5 as SidebarMenuSubButton,
|
|
806
|
+
_sfc_main$4 as SidebarMenuSubItem,
|
|
807
|
+
_sfc_main$3 as SidebarProvider,
|
|
808
|
+
_sfc_main$2 as SidebarRail,
|
|
809
|
+
_sfc_main$1 as SidebarSeparator,
|
|
810
|
+
_sfc_main as SidebarTrigger,
|
|
811
|
+
sidebarMenuButtonVariants,
|
|
812
|
+
useSidebar
|
|
813
|
+
};
|