create-nala 3.0.0 → 3.0.4
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/package.json +6 -6
- package/template/.agents/skills/nala-project/SKILL.md +493 -0
- package/template/AGENTS.md +49 -0
- package/{LICENSE → template/LICENSE} +1 -1
- package/template/README.md +130 -0
- package/template/package.json +1 -1
- package/template/src/components/ui/alert/Alert.vue +8 -8
- package/template/src/components/ui/alert/AlertDescription.vue +5 -5
- package/template/src/components/ui/alert/AlertTitle.vue +5 -5
- package/template/src/components/ui/alert-dialog/AlertDialog.vue +6 -6
- package/template/src/components/ui/alert-dialog/AlertDialogAction.vue +9 -9
- package/template/src/components/ui/alert-dialog/AlertDialogCancel.vue +9 -9
- package/template/src/components/ui/alert-dialog/AlertDialogContent.vue +20 -20
- package/template/src/components/ui/alert-dialog/AlertDialogDescription.vue +10 -10
- package/template/src/components/ui/alert-dialog/AlertDialogFooter.vue +5 -5
- package/template/src/components/ui/alert-dialog/AlertDialogHeader.vue +5 -5
- package/template/src/components/ui/alert-dialog/AlertDialogTitle.vue +8 -8
- package/template/src/components/ui/alert-dialog/AlertDialogTrigger.vue +3 -3
- package/template/src/components/ui/alert-dialog/index.ts +8 -8
- package/template/src/components/ui/avatar/AvatarFallback.vue +8 -8
- package/template/src/components/ui/avatar/AvatarImage.vue +3 -3
- package/template/src/components/ui/breadcrumb/Breadcrumb.vue +4 -4
- package/template/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +6 -6
- package/template/src/components/ui/breadcrumb/BreadcrumbItem.vue +5 -5
- package/template/src/components/ui/breadcrumb/BreadcrumbLink.vue +7 -7
- package/template/src/components/ui/breadcrumb/BreadcrumbList.vue +5 -5
- package/template/src/components/ui/breadcrumb/BreadcrumbPage.vue +5 -5
- package/template/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +6 -6
- package/template/src/components/ui/breadcrumb/index.ts +6 -6
- package/template/src/components/ui/button/Button.vue +15 -15
- package/template/src/components/ui/card/CardAction.vue +5 -5
- package/template/src/components/ui/card/CardContent.vue +5 -5
- package/template/src/components/ui/card/CardDescription.vue +5 -5
- package/template/src/components/ui/card/CardFooter.vue +5 -5
- package/template/src/components/ui/card/CardTitle.vue +5 -5
- package/template/src/components/ui/card/index.ts +6 -6
- package/template/src/components/ui/command/Command.vue +75 -75
- package/template/src/components/ui/command/CommandDialog.vue +14 -14
- package/template/src/components/ui/command/CommandEmpty.vue +14 -14
- package/template/src/components/ui/command/CommandGroup.vue +27 -27
- package/template/src/components/ui/command/CommandInput.vue +20 -20
- package/template/src/components/ui/command/CommandItem.vue +57 -57
- package/template/src/components/ui/command/CommandList.vue +10 -10
- package/template/src/components/ui/command/CommandSeparator.vue +8 -8
- package/template/src/components/ui/command/CommandShortcut.vue +5 -5
- package/template/src/components/ui/command/index.ts +24 -24
- package/template/src/components/ui/dialog/Dialog.vue +6 -6
- package/template/src/components/ui/dialog/DialogClose.vue +3 -3
- package/template/src/components/ui/dialog/DialogContent.vue +24 -24
- package/template/src/components/ui/dialog/DialogDescription.vue +10 -10
- package/template/src/components/ui/dialog/DialogFooter.vue +10 -10
- package/template/src/components/ui/dialog/DialogHeader.vue +5 -5
- package/template/src/components/ui/dialog/DialogOverlay.vue +8 -8
- package/template/src/components/ui/dialog/DialogScrollContent.vue +22 -22
- package/template/src/components/ui/dialog/DialogTitle.vue +10 -10
- package/template/src/components/ui/dialog/DialogTrigger.vue +3 -3
- package/template/src/components/ui/dialog/index.ts +9 -9
- package/template/src/components/ui/dropdown-menu/DropdownMenu.vue +6 -6
- package/template/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +16 -16
- package/template/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +3 -3
- package/template/src/components/ui/dropdown-menu/DropdownMenuItem.vue +16 -16
- package/template/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +9 -9
- package/template/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +9 -9
- package/template/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +17 -17
- package/template/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +12 -12
- package/template/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +5 -5
- package/template/src/components/ui/dropdown-menu/DropdownMenuSub.vue +9 -9
- package/template/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +14 -14
- package/template/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +13 -13
- package/template/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +5 -5
- package/template/src/components/ui/dropdown-menu/index.ts +15 -15
- package/template/src/components/ui/form/FormControl.vue +3 -3
- package/template/src/components/ui/form/FormDescription.vue +8 -8
- package/template/src/components/ui/form/FormItem.vue +11 -11
- package/template/src/components/ui/form/FormLabel.vue +8 -8
- package/template/src/components/ui/form/FormMessage.vue +10 -10
- package/template/src/components/ui/form/index.ts +6 -6
- package/template/src/components/ui/form/injectionKeys.ts +3 -3
- package/template/src/components/ui/form/useFormField.ts +29 -29
- package/template/src/components/ui/input/Input.vue +17 -17
- package/template/src/components/ui/label/Label.vue +8 -8
- package/template/src/components/ui/pagination/Pagination.vue +12 -12
- package/template/src/components/ui/pagination/PaginationContent.vue +8 -8
- package/template/src/components/ui/pagination/PaginationEllipsis.vue +9 -9
- package/template/src/components/ui/pagination/PaginationFirst.vue +17 -17
- package/template/src/components/ui/pagination/PaginationItem.vue +16 -16
- package/template/src/components/ui/pagination/PaginationLast.vue +17 -17
- package/template/src/components/ui/pagination/PaginationNext.vue +17 -17
- package/template/src/components/ui/pagination/PaginationPrevious.vue +17 -17
- package/template/src/components/ui/pagination/index.ts +7 -7
- package/template/src/components/ui/popover/Popover.vue +6 -6
- package/template/src/components/ui/popover/PopoverAnchor.vue +3 -3
- package/template/src/components/ui/popover/PopoverContent.vue +25 -25
- package/template/src/components/ui/popover/PopoverTrigger.vue +3 -3
- package/template/src/components/ui/popover/index.ts +3 -3
- package/template/src/components/ui/select/Select.vue +6 -6
- package/template/src/components/ui/select/SelectContent.vue +26 -26
- package/template/src/components/ui/select/SelectGroup.vue +3 -3
- package/template/src/components/ui/select/SelectItem.vue +16 -16
- package/template/src/components/ui/select/SelectItemText.vue +3 -3
- package/template/src/components/ui/select/SelectLabel.vue +5 -5
- package/template/src/components/ui/select/SelectScrollDownButton.vue +11 -11
- package/template/src/components/ui/select/SelectScrollUpButton.vue +11 -11
- package/template/src/components/ui/select/SelectSeparator.vue +8 -8
- package/template/src/components/ui/select/SelectTrigger.vue +13 -13
- package/template/src/components/ui/select/SelectValue.vue +3 -3
- package/template/src/components/ui/select/index.ts +10 -10
- package/template/src/components/ui/separator/Separator.vue +13 -13
- package/template/src/components/ui/sheet/Sheet.vue +6 -6
- package/template/src/components/ui/sheet/SheetClose.vue +3 -3
- package/template/src/components/ui/sheet/SheetContent.vue +29 -29
- package/template/src/components/ui/sheet/SheetDescription.vue +8 -8
- package/template/src/components/ui/sheet/SheetFooter.vue +3 -3
- package/template/src/components/ui/sheet/SheetHeader.vue +3 -3
- package/template/src/components/ui/sheet/SheetOverlay.vue +8 -8
- package/template/src/components/ui/sheet/SheetTitle.vue +8 -8
- package/template/src/components/ui/sheet/SheetTrigger.vue +3 -3
- package/template/src/components/ui/sheet/index.ts +7 -7
- package/template/src/components/ui/sidebar/Sidebar.vue +18 -18
- package/template/src/components/ui/sidebar/SidebarContent.vue +6 -6
- package/template/src/components/ui/sidebar/SidebarControl.vue +0 -3
- package/template/src/components/ui/sidebar/SidebarFooter.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarGroup.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarGroupAction.vue +7 -7
- package/template/src/components/ui/sidebar/SidebarGroupContent.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarGroupLabel.vue +7 -7
- package/template/src/components/ui/sidebar/SidebarHeader.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarInput.vue +6 -6
- package/template/src/components/ui/sidebar/SidebarInset.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarMenu.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarMenuAction.vue +10 -10
- package/template/src/components/ui/sidebar/SidebarMenuBadge.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarMenuButton.vue +21 -21
- package/template/src/components/ui/sidebar/SidebarMenuButtonChild.vue +18 -18
- package/template/src/components/ui/sidebar/SidebarMenuItem.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarMenuSkeleton.vue +12 -12
- package/template/src/components/ui/sidebar/SidebarMenuSub.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarMenuSubButton.vue +12 -12
- package/template/src/components/ui/sidebar/SidebarMenuSubItem.vue +5 -5
- package/template/src/components/ui/sidebar/SidebarProvider.vue +4 -8
- package/template/src/components/ui/sidebar/SidebarRail.vue +8 -8
- package/template/src/components/ui/sidebar/SidebarSeparator.vue +6 -6
- package/template/src/components/ui/sidebar/SidebarTrigger.vue +10 -10
- package/template/src/components/ui/sidebar/utils.ts +1 -1
- package/template/src/components/ui/skeleton/Skeleton.vue +7 -7
- package/template/src/components/ui/sonner/Sonner.vue +5 -5
- package/template/src/components/ui/switch/Switch.vue +16 -16
- package/template/src/components/ui/table/Table.vue +5 -5
- package/template/src/components/ui/table/TableBody.vue +5 -5
- package/template/src/components/ui/table/TableCaption.vue +5 -5
- package/template/src/components/ui/table/TableCell.vue +5 -5
- package/template/src/components/ui/table/TableEmpty.vue +13 -13
- package/template/src/components/ui/table/TableFooter.vue +5 -5
- package/template/src/components/ui/table/TableHead.vue +5 -5
- package/template/src/components/ui/table/TableHeader.vue +5 -5
- package/template/src/components/ui/table/TableRow.vue +5 -5
- package/template/src/components/ui/table/index.ts +8 -8
- package/template/src/components/ui/table/utils.ts +9 -9
- package/template/src/components/ui/tabs/Tabs.vue +10 -10
- package/template/src/components/ui/tabs/TabsContent.vue +8 -8
- package/template/src/components/ui/tabs/TabsList.vue +8 -8
- package/template/src/components/ui/tabs/TabsTrigger.vue +10 -10
- package/template/src/components/ui/tabs/index.ts +3 -3
- package/template/src/components/ui/textarea/Textarea.vue +17 -17
- package/template/src/components/ui/tooltip/Tooltip.vue +6 -6
- package/template/src/components/ui/tooltip/TooltipContent.vue +17 -17
- package/template/src/components/ui/tooltip/TooltipProvider.vue +5 -5
- package/template/src/components/ui/tooltip/TooltipTrigger.vue +3 -3
- package/template/src/components/ui/tooltip/index.ts +3 -3
- package/template/src/lib/utils.ts +6 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
-
import type { HTMLAttributes } from "vue"
|
|
4
|
-
import { Primitive } from "reka-ui"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const props = defineProps<PrimitiveProps & {
|
|
8
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { Primitive } from "reka-ui"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const props = defineProps<PrimitiveProps & {
|
|
8
|
+
class?: HTMLAttributes["class"]
|
|
9
9
|
}>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
-
import type { HTMLAttributes } from "vue"
|
|
4
|
-
import { Primitive } from "reka-ui"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const props = defineProps<PrimitiveProps & {
|
|
8
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { Primitive } from "reka-ui"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const props = defineProps<PrimitiveProps & {
|
|
8
|
+
class?: HTMLAttributes["class"]
|
|
9
9
|
}>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
import { Input } from '@/components/ui/input'
|
|
5
|
-
|
|
6
|
-
const props = defineProps<{
|
|
7
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
import { Input } from '@/components/ui/input'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes["class"]
|
|
8
8
|
}>()
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
-
import type { HTMLAttributes } from "vue"
|
|
4
|
-
import { Primitive } from "reka-ui"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<PrimitiveProps & {
|
|
8
|
-
showOnHover?: boolean
|
|
9
|
-
class?: HTMLAttributes["class"]
|
|
10
|
-
}>(), {
|
|
11
|
-
as: "button",
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { Primitive } from "reka-ui"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<PrimitiveProps & {
|
|
8
|
+
showOnHover?: boolean
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
}>(), {
|
|
11
|
+
as: "button",
|
|
12
12
|
})
|
|
13
13
|
</script>
|
|
14
14
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { Component } from "vue"
|
|
3
|
-
import type { SidebarMenuButtonProps } from "./SidebarMenuButtonChild.vue"
|
|
4
|
-
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
|
6
|
-
import SidebarMenuButtonChild from "./SidebarMenuButtonChild.vue"
|
|
7
|
-
import { useSidebar } from "./utils"
|
|
8
|
-
|
|
9
|
-
defineOptions({
|
|
10
|
-
inheritAttrs: false,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
const props = withDefaults(defineProps<SidebarMenuButtonProps & {
|
|
14
|
-
tooltip?: string | Component
|
|
15
|
-
}>(), {
|
|
16
|
-
as: "button",
|
|
17
|
-
variant: "default",
|
|
18
|
-
size: "default",
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
const { isMobile, state } = useSidebar()
|
|
22
|
-
|
|
2
|
+
import type { Component } from "vue"
|
|
3
|
+
import type { SidebarMenuButtonProps } from "./SidebarMenuButtonChild.vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
|
6
|
+
import SidebarMenuButtonChild from "./SidebarMenuButtonChild.vue"
|
|
7
|
+
import { useSidebar } from "./utils"
|
|
8
|
+
|
|
9
|
+
defineOptions({
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const props = withDefaults(defineProps<SidebarMenuButtonProps & {
|
|
14
|
+
tooltip?: string | Component
|
|
15
|
+
}>(), {
|
|
16
|
+
as: "button",
|
|
17
|
+
variant: "default",
|
|
18
|
+
size: "default",
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const { isMobile, state } = useSidebar()
|
|
22
|
+
|
|
23
23
|
const delegatedProps = reactiveOmit(props, "tooltip")
|
|
24
24
|
</script>
|
|
25
25
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
-
import type { HTMLAttributes } from "vue"
|
|
4
|
-
import type { SidebarMenuButtonVariants } from "."
|
|
5
|
-
import { Primitive } from "reka-ui"
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
import { sidebarMenuButtonVariants } from "."
|
|
8
|
-
|
|
9
|
-
export interface SidebarMenuButtonProps extends PrimitiveProps {
|
|
10
|
-
variant?: SidebarMenuButtonVariants["variant"]
|
|
11
|
-
size?: SidebarMenuButtonVariants["size"]
|
|
12
|
-
isActive?: boolean
|
|
13
|
-
class?: HTMLAttributes["class"]
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const props = withDefaults(defineProps<SidebarMenuButtonProps>(), {
|
|
17
|
-
as: "button",
|
|
18
|
-
variant: "default",
|
|
19
|
-
size: "default",
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { SidebarMenuButtonVariants } from "."
|
|
5
|
+
import { Primitive } from "reka-ui"
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
import { sidebarMenuButtonVariants } from "."
|
|
8
|
+
|
|
9
|
+
export interface SidebarMenuButtonProps extends PrimitiveProps {
|
|
10
|
+
variant?: SidebarMenuButtonVariants["variant"]
|
|
11
|
+
size?: SidebarMenuButtonVariants["size"]
|
|
12
|
+
isActive?: boolean
|
|
13
|
+
class?: HTMLAttributes["class"]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<SidebarMenuButtonProps>(), {
|
|
17
|
+
as: "button",
|
|
18
|
+
variant: "default",
|
|
19
|
+
size: "default",
|
|
20
20
|
})
|
|
21
21
|
</script>
|
|
22
22
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { computed } from "vue"
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Skeleton } from '@/components/ui/skeleton'
|
|
6
|
-
|
|
7
|
-
const props = defineProps<{
|
|
8
|
-
showIcon?: boolean
|
|
9
|
-
class?: HTMLAttributes["class"]
|
|
10
|
-
}>()
|
|
11
|
-
|
|
12
|
-
const width = computed(() => {
|
|
13
|
-
return `${Math.floor(Math.random() * 40) + 50}%`
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { computed } from "vue"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Skeleton } from '@/components/ui/skeleton'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
showIcon?: boolean
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const width = computed(() => {
|
|
13
|
+
return `${Math.floor(Math.random() * 40) + 50}%`
|
|
14
14
|
})
|
|
15
15
|
</script>
|
|
16
16
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
-
import type { HTMLAttributes } from "vue"
|
|
4
|
-
import { Primitive } from "reka-ui"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<PrimitiveProps & {
|
|
8
|
-
size?: "sm" | "md"
|
|
9
|
-
isActive?: boolean
|
|
10
|
-
class?: HTMLAttributes["class"]
|
|
11
|
-
}>(), {
|
|
12
|
-
as: "a",
|
|
13
|
-
size: "md",
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { Primitive } from "reka-ui"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<PrimitiveProps & {
|
|
8
|
+
size?: "sm" | "md"
|
|
9
|
+
isActive?: boolean
|
|
10
|
+
class?: HTMLAttributes["class"]
|
|
11
|
+
}>(), {
|
|
12
|
+
as: "a",
|
|
13
|
+
size: "md",
|
|
14
14
|
})
|
|
15
15
|
</script>
|
|
16
16
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -30,10 +30,10 @@ const open = useVModel(props, "open", emits, {
|
|
|
30
30
|
const getSavedMode = (): SidebarControlMode => {
|
|
31
31
|
if (typeof document === 'undefined') return 'expanded'
|
|
32
32
|
const match = document.cookie.match(/sidebar_mode=([^;]+)/)
|
|
33
|
-
if (match && ['expanded', '
|
|
33
|
+
if (match && ['expanded', 'hover'].includes(match[1])) {
|
|
34
34
|
return match[1] as SidebarControlMode
|
|
35
35
|
}
|
|
36
|
-
return open.value ? 'expanded' : '
|
|
36
|
+
return open.value ? 'expanded' : 'hover'
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const sidebarMode = ref<SidebarControlMode>(getSavedMode())
|
|
@@ -45,8 +45,6 @@ function setSidebarMode(mode: SidebarControlMode) {
|
|
|
45
45
|
document.cookie = `sidebar_mode=${mode}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`
|
|
46
46
|
if (mode === "expanded") {
|
|
47
47
|
setOpen(true)
|
|
48
|
-
} else if (mode === "collapsed") {
|
|
49
|
-
setOpen(false)
|
|
50
48
|
} else if (mode === "hover") {
|
|
51
49
|
setOpen(false)
|
|
52
50
|
}
|
|
@@ -79,10 +77,8 @@ function toggleSidebar() {
|
|
|
79
77
|
if (isMobile.value) {
|
|
80
78
|
setOpenMobile(!openMobile.value)
|
|
81
79
|
} else {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
sidebarMode.value = nextState ? 'expanded' : 'collapsed'
|
|
85
|
-
document.cookie = `sidebar_mode=${sidebarMode.value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`
|
|
80
|
+
const nextMode = sidebarMode.value === 'expanded' ? 'hover' : 'expanded'
|
|
81
|
+
setSidebarMode(nextMode)
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
import { useSidebar } from "./utils"
|
|
5
|
-
|
|
6
|
-
const props = defineProps<{
|
|
7
|
-
class?: HTMLAttributes["class"]
|
|
8
|
-
}>()
|
|
9
|
-
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
import { useSidebar } from "./utils"
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes["class"]
|
|
8
|
+
}>()
|
|
9
|
+
|
|
10
10
|
const { toggleSidebar } = useSidebar()
|
|
11
11
|
</script>
|
|
12
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
import { Separator } from '@/components/ui/separator'
|
|
5
|
-
|
|
6
|
-
const props = defineProps<{
|
|
7
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
import { Separator } from '@/components/ui/separator'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes["class"]
|
|
8
8
|
}>()
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { PanelLeft } from "@lucide/vue"
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Button } from '@/components/ui/button'
|
|
6
|
-
import { useSidebar } from "./utils"
|
|
7
|
-
|
|
8
|
-
const props = defineProps<{
|
|
9
|
-
class?: HTMLAttributes["class"]
|
|
10
|
-
}>()
|
|
11
|
-
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { PanelLeft } from "@lucide/vue"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Button } from '@/components/ui/button'
|
|
6
|
+
import { useSidebar } from "./utils"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
12
|
const { toggleSidebar } = useSidebar()
|
|
13
13
|
</script>
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ export const SIDEBAR_WIDTH_MOBILE = "18rem"
|
|
|
8
8
|
export const SIDEBAR_WIDTH_ICON = "3.5rem"
|
|
9
9
|
export const SIDEBAR_KEYBOARD_SHORTCUT = "b"
|
|
10
10
|
|
|
11
|
-
export type SidebarControlMode = "expanded" | "
|
|
11
|
+
export type SidebarControlMode = "expanded" | "hover"
|
|
12
12
|
|
|
13
13
|
export const [useSidebar, provideSidebarContext] = createContext<{
|
|
14
14
|
state: ComputedRef<"expanded" | "collapsed">
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
interface SkeletonProps {
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
7
|
-
}
|
|
8
|
-
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
interface SkeletonProps {
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
9
|
const props = defineProps<SkeletonProps>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { ToasterProps } from "vue-sonner"
|
|
3
|
-
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "@lucide/vue"
|
|
4
|
-
import { Toaster as Sonner } from "vue-sonner"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
2
|
+
import type { ToasterProps } from "vue-sonner"
|
|
3
|
+
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "@lucide/vue"
|
|
4
|
+
import { Toaster as Sonner } from "vue-sonner"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
7
|
const props = defineProps<ToasterProps>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { SwitchRootEmits, SwitchRootProps } from "reka-ui"
|
|
3
|
-
import type { HTMLAttributes } from "vue"
|
|
4
|
-
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
-
import {
|
|
6
|
-
SwitchRoot,
|
|
7
|
-
SwitchThumb,
|
|
8
|
-
useForwardPropsEmits,
|
|
9
|
-
} from "reka-ui"
|
|
10
|
-
import { cn } from "@/lib/utils"
|
|
11
|
-
|
|
12
|
-
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes["class"] }>()
|
|
13
|
-
|
|
14
|
-
const emits = defineEmits<SwitchRootEmits>()
|
|
15
|
-
|
|
16
|
-
const delegatedProps = reactiveOmit(props, "class")
|
|
17
|
-
|
|
2
|
+
import type { SwitchRootEmits, SwitchRootProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import {
|
|
6
|
+
SwitchRoot,
|
|
7
|
+
SwitchThumb,
|
|
8
|
+
useForwardPropsEmits,
|
|
9
|
+
} from "reka-ui"
|
|
10
|
+
import { cn } from "@/lib/utils"
|
|
11
|
+
|
|
12
|
+
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes["class"] }>()
|
|
13
|
+
|
|
14
|
+
const emits = defineEmits<SwitchRootEmits>()
|
|
15
|
+
|
|
16
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
17
|
+
|
|
18
18
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
19
19
|
</script>
|
|
20
20
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from "vue"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
class?: HTMLAttributes["class"]
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
7
|
}>()
|
|
8
8
|
</script>
|
|
9
9
|
|