@shwfed/nuxt 0.1.49 → 0.1.51

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.
Files changed (135) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/app.d.vue.ts +35 -54
  3. package/dist/runtime/components/app.vue +528 -100
  4. package/dist/runtime/components/app.vue.d.ts +35 -54
  5. package/dist/runtime/components/logo.d.vue.ts +3 -0
  6. package/dist/runtime/components/logo.vue +58 -0
  7. package/dist/runtime/components/logo.vue.d.ts +3 -0
  8. package/dist/runtime/components/ui/collapsible/Collapsible.d.vue.ts +20 -0
  9. package/dist/runtime/components/ui/collapsible/Collapsible.vue +23 -0
  10. package/dist/runtime/components/ui/collapsible/Collapsible.vue.d.ts +20 -0
  11. package/dist/runtime/components/ui/collapsible/CollapsibleContent.d.vue.ts +14 -0
  12. package/dist/runtime/components/ui/collapsible/CollapsibleContent.vue +17 -0
  13. package/dist/runtime/components/ui/collapsible/CollapsibleContent.vue.d.ts +14 -0
  14. package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.d.vue.ts +14 -0
  15. package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.vue +16 -0
  16. package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +14 -0
  17. package/dist/runtime/components/ui/collapsible/index.d.ts +3 -0
  18. package/dist/runtime/components/ui/collapsible/index.js +3 -0
  19. package/dist/runtime/components/ui/field/index.d.ts +1 -1
  20. package/dist/runtime/components/ui/navigation-menu/NavigationMenuContent.vue +1 -1
  21. package/dist/runtime/components/ui/navigation-menu/NavigationMenuIndicator.vue +1 -1
  22. package/dist/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
  23. package/dist/runtime/components/ui/sheet/Sheet.d.vue.ts +21 -0
  24. package/dist/runtime/components/ui/sheet/Sheet.vue +20 -0
  25. package/dist/runtime/components/ui/sheet/Sheet.vue.d.ts +21 -0
  26. package/dist/runtime/components/ui/sheet/SheetClose.d.vue.ts +14 -0
  27. package/dist/runtime/components/ui/sheet/SheetClose.vue +16 -0
  28. package/dist/runtime/components/ui/sheet/SheetClose.vue.d.ts +14 -0
  29. package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +35 -0
  30. package/dist/runtime/components/ui/sheet/SheetContent.vue +53 -0
  31. package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +35 -0
  32. package/dist/runtime/components/ui/sheet/SheetDescription.d.vue.ts +18 -0
  33. package/dist/runtime/components/ui/sheet/SheetDescription.vue +21 -0
  34. package/dist/runtime/components/ui/sheet/SheetDescription.vue.d.ts +18 -0
  35. package/dist/runtime/components/ui/sheet/SheetFooter.d.vue.ts +17 -0
  36. package/dist/runtime/components/ui/sheet/SheetFooter.vue +17 -0
  37. package/dist/runtime/components/ui/sheet/SheetFooter.vue.d.ts +17 -0
  38. package/dist/runtime/components/ui/sheet/SheetHeader.d.vue.ts +17 -0
  39. package/dist/runtime/components/ui/sheet/SheetHeader.vue +15 -0
  40. package/dist/runtime/components/ui/sheet/SheetHeader.vue.d.ts +17 -0
  41. package/dist/runtime/components/ui/sheet/SheetOverlay.d.vue.ts +18 -0
  42. package/dist/runtime/components/ui/sheet/SheetOverlay.vue +22 -0
  43. package/dist/runtime/components/ui/sheet/SheetOverlay.vue.d.ts +18 -0
  44. package/dist/runtime/components/ui/sheet/SheetTitle.d.vue.ts +18 -0
  45. package/dist/runtime/components/ui/sheet/SheetTitle.vue +21 -0
  46. package/dist/runtime/components/ui/sheet/SheetTitle.vue.d.ts +18 -0
  47. package/dist/runtime/components/ui/sheet/SheetTrigger.d.vue.ts +14 -0
  48. package/dist/runtime/components/ui/sheet/SheetTrigger.vue +16 -0
  49. package/dist/runtime/components/ui/sheet/SheetTrigger.vue.d.ts +14 -0
  50. package/dist/runtime/components/ui/sheet/index.d.ts +8 -0
  51. package/dist/runtime/components/ui/sheet/index.js +8 -0
  52. package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +22 -0
  53. package/dist/runtime/components/ui/sidebar/Sidebar.vue +92 -0
  54. package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +22 -0
  55. package/dist/runtime/components/ui/sidebar/SidebarContent.d.vue.ts +17 -0
  56. package/dist/runtime/components/ui/sidebar/SidebarContent.vue +16 -0
  57. package/dist/runtime/components/ui/sidebar/SidebarContent.vue.d.ts +17 -0
  58. package/dist/runtime/components/ui/sidebar/SidebarFooter.d.vue.ts +17 -0
  59. package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +16 -0
  60. package/dist/runtime/components/ui/sidebar/SidebarFooter.vue.d.ts +17 -0
  61. package/dist/runtime/components/ui/sidebar/SidebarGroup.d.vue.ts +17 -0
  62. package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +16 -0
  63. package/dist/runtime/components/ui/sidebar/SidebarGroup.vue.d.ts +17 -0
  64. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.d.vue.ts +18 -0
  65. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +26 -0
  66. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue.d.ts +18 -0
  67. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.d.vue.ts +17 -0
  68. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +16 -0
  69. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue.d.ts +17 -0
  70. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.d.vue.ts +18 -0
  71. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
  72. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +18 -0
  73. package/dist/runtime/components/ui/sidebar/SidebarHeader.d.vue.ts +17 -0
  74. package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +16 -0
  75. package/dist/runtime/components/ui/sidebar/SidebarHeader.vue.d.ts +17 -0
  76. package/dist/runtime/components/ui/sidebar/SidebarInput.d.vue.ts +17 -0
  77. package/dist/runtime/components/ui/sidebar/SidebarInput.vue +20 -0
  78. package/dist/runtime/components/ui/sidebar/SidebarInput.vue.d.ts +17 -0
  79. package/dist/runtime/components/ui/sidebar/SidebarInset.d.vue.ts +17 -0
  80. package/dist/runtime/components/ui/sidebar/SidebarInset.vue +19 -0
  81. package/dist/runtime/components/ui/sidebar/SidebarInset.vue.d.ts +17 -0
  82. package/dist/runtime/components/ui/sidebar/SidebarMenu.d.vue.ts +17 -0
  83. package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +16 -0
  84. package/dist/runtime/components/ui/sidebar/SidebarMenu.vue.d.ts +17 -0
  85. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.d.vue.ts +21 -0
  86. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +31 -0
  87. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue.d.ts +21 -0
  88. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.d.vue.ts +17 -0
  89. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +24 -0
  90. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +17 -0
  91. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +24 -0
  92. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +50 -0
  93. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +24 -0
  94. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +26 -0
  95. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +28 -0
  96. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +26 -0
  97. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.d.vue.ts +17 -0
  98. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +16 -0
  99. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue.d.ts +17 -0
  100. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.d.vue.ts +8 -0
  101. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +32 -0
  102. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +8 -0
  103. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.d.vue.ts +17 -0
  104. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +20 -0
  105. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue.d.ts +17 -0
  106. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.d.vue.ts +23 -0
  107. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +32 -0
  108. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +23 -0
  109. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.d.vue.ts +17 -0
  110. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +16 -0
  111. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +17 -0
  112. package/dist/runtime/components/ui/sidebar/SidebarProvider.d.vue.ts +26 -0
  113. package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +61 -0
  114. package/dist/runtime/components/ui/sidebar/SidebarProvider.vue.d.ts +26 -0
  115. package/dist/runtime/components/ui/sidebar/SidebarRail.d.vue.ts +17 -0
  116. package/dist/runtime/components/ui/sidebar/SidebarRail.vue +30 -0
  117. package/dist/runtime/components/ui/sidebar/SidebarRail.vue.d.ts +17 -0
  118. package/dist/runtime/components/ui/sidebar/SidebarSeparator.d.vue.ts +17 -0
  119. package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +17 -0
  120. package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue.d.ts +17 -0
  121. package/dist/runtime/components/ui/sidebar/SidebarTrigger.d.vue.ts +7 -0
  122. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +23 -0
  123. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue.d.ts +7 -0
  124. package/dist/runtime/components/ui/sidebar/index.d.ts +37 -0
  125. package/dist/runtime/components/ui/sidebar/index.js +45 -0
  126. package/dist/runtime/components/ui/sidebar/utils.d.ts +56 -0
  127. package/dist/runtime/components/ui/sidebar/utils.js +8 -0
  128. package/dist/runtime/components/ui/skeleton/Skeleton.d.vue.ts +7 -0
  129. package/dist/runtime/components/ui/skeleton/Skeleton.vue +13 -0
  130. package/dist/runtime/components/ui/skeleton/Skeleton.vue.d.ts +7 -0
  131. package/dist/runtime/components/ui/skeleton/index.d.ts +1 -0
  132. package/dist/runtime/components/ui/skeleton/index.js +1 -0
  133. package/dist/runtime/plugins/cel/env.js +9 -1
  134. package/dist/runtime/plugins/cel/index.js +2 -1
  135. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
4
+ import SidebarMenuButtonChild from "./SidebarMenuButtonChild.vue";
5
+ import { useSidebar } from "./utils";
6
+ defineOptions({
7
+ inheritAttrs: false
8
+ });
9
+ const props = defineProps({
10
+ variant: { type: null, required: false, default: "default" },
11
+ size: { type: null, required: false, default: "default" },
12
+ isActive: { type: Boolean, required: false },
13
+ class: { type: null, required: false },
14
+ asChild: { type: Boolean, required: false },
15
+ as: { type: null, required: false, default: "button" },
16
+ tooltip: { type: null, required: false }
17
+ });
18
+ const { isMobile, state } = useSidebar();
19
+ const delegatedProps = reactiveOmit(props, "tooltip");
20
+ </script>
21
+
22
+ <template>
23
+ <SidebarMenuButtonChild
24
+ v-if="!tooltip"
25
+ v-bind="{ ...delegatedProps, ...$attrs }"
26
+ >
27
+ <slot />
28
+ </SidebarMenuButtonChild>
29
+
30
+ <Tooltip v-else>
31
+ <TooltipTrigger as-child>
32
+ <SidebarMenuButtonChild v-bind="{ ...delegatedProps, ...$attrs }">
33
+ <slot />
34
+ </SidebarMenuButtonChild>
35
+ </TooltipTrigger>
36
+ <TooltipContent
37
+ side="right"
38
+ align="center"
39
+ :hidden="state !== 'collapsed' || isMobile"
40
+ >
41
+ <template v-if="typeof tooltip === 'string'">
42
+ {{ tooltip }}
43
+ </template>
44
+ <component
45
+ :is="tooltip"
46
+ v-else
47
+ />
48
+ </TooltipContent>
49
+ </Tooltip>
50
+ </template>
@@ -0,0 +1,24 @@
1
+ import type { Component } from 'vue';
2
+ import type { SidebarMenuButtonProps } from './SidebarMenuButtonChild.vue.js';
3
+ type __VLS_Props = SidebarMenuButtonProps & {
4
+ tooltip?: string | Component;
5
+ };
6
+ declare var __VLS_8: {}, __VLS_29: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_29) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ as: import("reka-ui").AsTag | Component;
14
+ size: "default" | "sm" | "lg" | null;
15
+ variant: "default" | "outline" | null;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,26 @@
1
+ import type { PrimitiveProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ import type { SidebarMenuButtonVariants } from '.';
4
+ export interface SidebarMenuButtonProps extends PrimitiveProps {
5
+ variant?: SidebarMenuButtonVariants['variant'];
6
+ size?: SidebarMenuButtonVariants['size'];
7
+ isActive?: boolean;
8
+ class?: HTMLAttributes['class'];
9
+ }
10
+ declare var __VLS_8: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_8) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<SidebarMenuButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SidebarMenuButtonProps> & Readonly<{}>, {
15
+ as: import("reka-ui").AsTag | import("vue").Component;
16
+ size: "default" | "sm" | "lg" | null;
17
+ variant: "default" | "outline" | null;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,28 @@
1
+ <script setup>
2
+ import { Primitive } from "reka-ui";
3
+ import { cn } from "../../../utils/cn";
4
+ import { sidebarMenuButtonVariants } from ".";
5
+ const props = defineProps({
6
+ variant: { type: null, required: false, default: "default" },
7
+ size: { type: null, required: false, default: "default" },
8
+ isActive: { type: Boolean, required: false },
9
+ class: { type: null, required: false },
10
+ asChild: { type: Boolean, required: false },
11
+ as: { type: null, required: false, default: "button" }
12
+ });
13
+ </script>
14
+
15
+ <template>
16
+ <Primitive
17
+ data-slot="sidebar-menu-button"
18
+ data-sidebar="menu-button"
19
+ :data-size="size"
20
+ :data-active="isActive"
21
+ :class="cn(sidebarMenuButtonVariants({ variant, size }), props.class)"
22
+ :as="as"
23
+ :as-child="asChild"
24
+ v-bind="$attrs"
25
+ >
26
+ <slot />
27
+ </Primitive>
28
+ </template>
@@ -0,0 +1,26 @@
1
+ import type { PrimitiveProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ import type { SidebarMenuButtonVariants } from '.';
4
+ export interface SidebarMenuButtonProps extends PrimitiveProps {
5
+ variant?: SidebarMenuButtonVariants['variant'];
6
+ size?: SidebarMenuButtonVariants['size'];
7
+ isActive?: boolean;
8
+ class?: HTMLAttributes['class'];
9
+ }
10
+ declare var __VLS_8: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_8) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<SidebarMenuButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SidebarMenuButtonProps> & Readonly<{}>, {
15
+ as: import("reka-ui").AsTag | import("vue").Component;
16
+ size: "default" | "sm" | "lg" | null;
17
+ variant: "default" | "outline" | null;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ import { cn } from "../../../utils/cn";
3
+ const props = defineProps({
4
+ class: { type: null, required: false }
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <li
10
+ data-slot="sidebar-menu-item"
11
+ data-sidebar="menu-item"
12
+ :class="cn('group/menu-item relative', props.class)"
13
+ >
14
+ <slot />
15
+ </li>
16
+ </template>
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ showIcon?: boolean;
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,32 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { cn } from "../../../utils/cn";
4
+ import { Skeleton } from "../skeleton";
5
+ const props = defineProps({
6
+ showIcon: { type: Boolean, required: false },
7
+ class: { type: null, required: false }
8
+ });
9
+ const width = computed(() => {
10
+ return `${Math.floor(Math.random() * 40) + 50}%`;
11
+ });
12
+ </script>
13
+
14
+ <template>
15
+ <div
16
+ data-slot="sidebar-menu-skeleton"
17
+ data-sidebar="menu-skeleton"
18
+ :class="cn('flex h-8 items-center gap-2 rounded-md px-2', props.class)"
19
+ >
20
+ <Skeleton
21
+ v-if="showIcon"
22
+ class="size-4 rounded-md"
23
+ data-sidebar="menu-skeleton-icon"
24
+ />
25
+
26
+ <Skeleton
27
+ class="h-4 max-w-(--skeleton-width) flex-1"
28
+ data-sidebar="menu-skeleton-text"
29
+ :style="{ '--skeleton-width': width }"
30
+ />
31
+ </div>
32
+ </template>
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ showIcon?: boolean;
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,20 @@
1
+ <script setup>
2
+ import { cn } from "../../../utils/cn";
3
+ const props = defineProps({
4
+ class: { type: null, required: false }
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <ul
10
+ data-slot="sidebar-menu-sub"
11
+ data-sidebar="menu-badge"
12
+ :class="cn(
13
+ 'border-zinc-200 mx-3.5 mr-0 flex min-w-0 translate-x-px flex-col gap-1 border-l pl-2 py-0.5',
14
+ 'group-data-[collapsible=icon]:hidden',
15
+ props.class
16
+ )"
17
+ >
18
+ <slot />
19
+ </ul>
20
+ </template>
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,23 @@
1
+ import type { PrimitiveProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PrimitiveProps & {
4
+ size?: 'sm' | 'md';
5
+ isActive?: boolean;
6
+ class?: HTMLAttributes['class'];
7
+ };
8
+ declare var __VLS_8: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_8) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ as: import("reka-ui").AsTag | import("vue").Component;
14
+ size: "sm" | "md";
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,32 @@
1
+ <script setup>
2
+ import { Primitive } from "reka-ui";
3
+ import { cn } from "../../../utils/cn";
4
+ const props = defineProps({
5
+ asChild: { type: Boolean, required: false },
6
+ as: { type: null, required: false, default: "a" },
7
+ size: { type: String, required: false, default: "md" },
8
+ isActive: { type: Boolean, required: false },
9
+ class: { type: null, required: false }
10
+ });
11
+ </script>
12
+
13
+ <template>
14
+ <Primitive
15
+ data-slot="sidebar-menu-sub-button"
16
+ data-sidebar="menu-sub-button"
17
+ :as="as"
18
+ :as-child="asChild"
19
+ :data-size="size"
20
+ :data-active="isActive"
21
+ :class="cn(
22
+ 'text-zinc-700 cursor-pointer hover:bg-zinc-100 hover:text-zinc-900 active:bg-zinc-100 active:text-zinc-900 group-hover/menu-sub-item:bg-zinc-100 group-hover/menu-sub-item:text-zinc-900 group-focus-within/menu-sub-item:bg-zinc-100 group-focus-within/menu-sub-item:text-zinc-900 [&>svg]:text-zinc-900 flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden 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',
23
+ 'data-[active=true]:bg-[color-mix(in_srgb,var(--primary)_10%,white)] data-[active=true]:text-(--primary)',
24
+ size === 'sm' && 'text-xs',
25
+ size === 'md' && 'text-sm',
26
+ 'group-data-[collapsible=icon]:hidden',
27
+ props.class
28
+ )"
29
+ >
30
+ <slot />
31
+ </Primitive>
32
+ </template>
@@ -0,0 +1,23 @@
1
+ import type { PrimitiveProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PrimitiveProps & {
4
+ size?: 'sm' | 'md';
5
+ isActive?: boolean;
6
+ class?: HTMLAttributes['class'];
7
+ };
8
+ declare var __VLS_8: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_8) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ as: import("reka-ui").AsTag | import("vue").Component;
14
+ size: "sm" | "md";
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ import { cn } from "../../../utils/cn";
3
+ const props = defineProps({
4
+ class: { type: null, required: false }
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <li
10
+ data-slot="sidebar-menu-sub-item"
11
+ data-sidebar="menu-sub-item"
12
+ :class="cn('group/menu-sub-item relative', props.class)"
13
+ >
14
+ <slot />
15
+ </li>
16
+ </template>
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,26 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ defaultOpen?: boolean;
4
+ open?: boolean;
5
+ class?: HTMLAttributes['class'];
6
+ };
7
+ declare var __VLS_8: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_8) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:open": (open: boolean) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
15
+ }>, {
16
+ open: boolean;
17
+ defaultOpen: boolean;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,61 @@
1
+ <script setup>
2
+ import { defaultDocument, useEventListener, useMediaQuery, useVModel } from "@vueuse/core";
3
+ import { TooltipProvider } from "reka-ui";
4
+ import { computed, ref } from "vue";
5
+ import { cn } from "../../../utils/cn";
6
+ import { provideSidebarContext, SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON } from "./utils";
7
+ const props = defineProps({
8
+ defaultOpen: { type: Boolean, required: false, default: !defaultDocument?.cookie.includes(`${SIDEBAR_COOKIE_NAME}=false`) },
9
+ open: { type: Boolean, required: false, default: void 0 },
10
+ class: { type: null, required: false }
11
+ });
12
+ const emits = defineEmits(["update:open"]);
13
+ const isMobile = useMediaQuery("(max-width: 768px)");
14
+ const openMobile = ref(false);
15
+ const open = useVModel(props, "open", emits, {
16
+ defaultValue: props.defaultOpen ?? false,
17
+ passive: props.open === void 0
18
+ });
19
+ function setOpen(value) {
20
+ open.value = value;
21
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${open.value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
22
+ }
23
+ function setOpenMobile(value) {
24
+ openMobile.value = value;
25
+ }
26
+ function toggleSidebar() {
27
+ return isMobile.value ? setOpenMobile(!openMobile.value) : setOpen(!open.value);
28
+ }
29
+ useEventListener("keydown", (event) => {
30
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
31
+ event.preventDefault();
32
+ toggleSidebar();
33
+ }
34
+ });
35
+ const state = computed(() => open.value ? "expanded" : "collapsed");
36
+ provideSidebarContext({
37
+ state,
38
+ open,
39
+ setOpen,
40
+ isMobile,
41
+ openMobile,
42
+ setOpenMobile,
43
+ toggleSidebar
44
+ });
45
+ </script>
46
+
47
+ <template>
48
+ <TooltipProvider :delay-duration="0">
49
+ <div
50
+ data-slot="sidebar-wrapper"
51
+ :style="{
52
+ '--sidebar-width': SIDEBAR_WIDTH,
53
+ '--sidebar-width-icon': SIDEBAR_WIDTH_ICON
54
+ }"
55
+ :class="cn('group/sidebar-wrapper has-data-[variant=inset]:bg-zinc-50 flex min-h-svh', props.class)"
56
+ v-bind="$attrs"
57
+ >
58
+ <slot />
59
+ </div>
60
+ </TooltipProvider>
61
+ </template>
@@ -0,0 +1,26 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ defaultOpen?: boolean;
4
+ open?: boolean;
5
+ class?: HTMLAttributes['class'];
6
+ };
7
+ declare var __VLS_8: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_8) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:open": (open: boolean) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
15
+ }>, {
16
+ open: boolean;
17
+ defaultOpen: boolean;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,30 @@
1
+ <script setup>
2
+ import { cn } from "../../../utils/cn";
3
+ import { useSidebar } from "./utils";
4
+ const props = defineProps({
5
+ class: { type: null, required: false }
6
+ });
7
+ const { toggleSidebar } = useSidebar();
8
+ </script>
9
+
10
+ <template>
11
+ <button
12
+ data-sidebar="rail"
13
+ data-slot="sidebar-rail"
14
+ aria-label="Toggle Sidebar"
15
+ :tabindex="-1"
16
+ title="Toggle Sidebar"
17
+ :class="cn(
18
+ 'hover:after:bg-zinc-200 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',
19
+ 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',
20
+ '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',
21
+ 'hover:group-data-[collapsible=offcanvas]:bg-zinc-100 group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',
22
+ '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',
23
+ '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',
24
+ props.class
25
+ )"
26
+ @click="toggleSidebar"
27
+ >
28
+ <slot />
29
+ </button>
30
+ </template>
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };