diff --git a/.gitignore b/.gitignore index 4a7f73a..5bdfc11 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ logs .env .env.* !.env.example + +.vscode \ No newline at end of file diff --git a/app/components/AppSidebar.vue b/app/components/AppSidebar.vue index 5e9617d..6a29023 100644 --- a/app/components/AppSidebar.vue +++ b/app/components/AppSidebar.vue @@ -26,6 +26,26 @@ router.afterEach(() => { }); const nav = useState("navigation"); + +const auth = useUserSession(); + +const authOptions = [ + { + route: "/auth/yandex", + label: "Yandex", + icon: "tabler:brand-yandex", + }, + { + route: "/auth/google", + label: "Google", + icon: "tabler:brand-google", + }, + { + route: "/auth/github", + label: "GitHub", + icon: "tabler:brand-github", + }, +]; diff --git a/app/components/ui/avatar/Avatar.vue b/app/components/ui/avatar/Avatar.vue new file mode 100644 index 0000000..bb7e669 --- /dev/null +++ b/app/components/ui/avatar/Avatar.vue @@ -0,0 +1,18 @@ + + + diff --git a/app/components/ui/avatar/AvatarFallback.vue b/app/components/ui/avatar/AvatarFallback.vue new file mode 100644 index 0000000..16b588a --- /dev/null +++ b/app/components/ui/avatar/AvatarFallback.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/components/ui/avatar/AvatarImage.vue b/app/components/ui/avatar/AvatarImage.vue new file mode 100644 index 0000000..24a8166 --- /dev/null +++ b/app/components/ui/avatar/AvatarImage.vue @@ -0,0 +1,16 @@ + + + diff --git a/app/components/ui/avatar/index.ts b/app/components/ui/avatar/index.ts new file mode 100644 index 0000000..cf0e003 --- /dev/null +++ b/app/components/ui/avatar/index.ts @@ -0,0 +1,3 @@ +export { default as Avatar } from "./Avatar.vue" +export { default as AvatarFallback } from "./AvatarFallback.vue" +export { default as AvatarImage } from "./AvatarImage.vue" diff --git a/app/components/ui/button-group/ButtonGroup.vue b/app/components/ui/button-group/ButtonGroup.vue new file mode 100644 index 0000000..9dbef6a --- /dev/null +++ b/app/components/ui/button-group/ButtonGroup.vue @@ -0,0 +1,22 @@ + + + diff --git a/app/components/ui/button-group/ButtonGroupSeparator.vue b/app/components/ui/button-group/ButtonGroupSeparator.vue new file mode 100644 index 0000000..e069dd5 --- /dev/null +++ b/app/components/ui/button-group/ButtonGroupSeparator.vue @@ -0,0 +1,24 @@ + + + diff --git a/app/components/ui/button-group/ButtonGroupText.vue b/app/components/ui/button-group/ButtonGroupText.vue new file mode 100644 index 0000000..c436843 --- /dev/null +++ b/app/components/ui/button-group/ButtonGroupText.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/ui/button-group/index.ts b/app/components/ui/button-group/index.ts new file mode 100644 index 0000000..474566f --- /dev/null +++ b/app/components/ui/button-group/index.ts @@ -0,0 +1,25 @@ +import type { VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" + +export { default as ButtonGroup } from "./ButtonGroup.vue" +export { default as ButtonGroupSeparator } from "./ButtonGroupSeparator.vue" +export { default as ButtonGroupText } from "./ButtonGroupText.vue" + +export const buttonGroupVariants = cva( + "flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2", + { + variants: { + orientation: { + horizontal: + "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none", + vertical: + "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none", + }, + }, + defaultVariants: { + orientation: "horizontal", + }, + }, +) + +export type ButtonGroupVariants = VariantProps diff --git a/app/components/ui/item/Item.vue b/app/components/ui/item/Item.vue new file mode 100644 index 0000000..0cec259 --- /dev/null +++ b/app/components/ui/item/Item.vue @@ -0,0 +1,27 @@ + + + diff --git a/app/components/ui/item/ItemActions.vue b/app/components/ui/item/ItemActions.vue new file mode 100644 index 0000000..b525712 --- /dev/null +++ b/app/components/ui/item/ItemActions.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/components/ui/item/ItemContent.vue b/app/components/ui/item/ItemContent.vue new file mode 100644 index 0000000..212d64f --- /dev/null +++ b/app/components/ui/item/ItemContent.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/components/ui/item/ItemDescription.vue b/app/components/ui/item/ItemDescription.vue new file mode 100644 index 0000000..278e6b8 --- /dev/null +++ b/app/components/ui/item/ItemDescription.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/components/ui/item/ItemFooter.vue b/app/components/ui/item/ItemFooter.vue new file mode 100644 index 0000000..fd57ccf --- /dev/null +++ b/app/components/ui/item/ItemFooter.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/components/ui/item/ItemGroup.vue b/app/components/ui/item/ItemGroup.vue new file mode 100644 index 0000000..121a0c2 --- /dev/null +++ b/app/components/ui/item/ItemGroup.vue @@ -0,0 +1,18 @@ + + + diff --git a/app/components/ui/item/ItemHeader.vue b/app/components/ui/item/ItemHeader.vue new file mode 100644 index 0000000..c9fb17a --- /dev/null +++ b/app/components/ui/item/ItemHeader.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/components/ui/item/ItemMedia.vue b/app/components/ui/item/ItemMedia.vue new file mode 100644 index 0000000..db229f3 --- /dev/null +++ b/app/components/ui/item/ItemMedia.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/components/ui/item/ItemSeparator.vue b/app/components/ui/item/ItemSeparator.vue new file mode 100644 index 0000000..21065d2 --- /dev/null +++ b/app/components/ui/item/ItemSeparator.vue @@ -0,0 +1,18 @@ + + + diff --git a/app/components/ui/item/ItemTitle.vue b/app/components/ui/item/ItemTitle.vue new file mode 100644 index 0000000..81c0827 --- /dev/null +++ b/app/components/ui/item/ItemTitle.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/components/ui/item/index.ts b/app/components/ui/item/index.ts new file mode 100644 index 0000000..948421d --- /dev/null +++ b/app/components/ui/item/index.ts @@ -0,0 +1,54 @@ +import type { VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" + +export { default as Item } from "./Item.vue" +export { default as ItemActions } from "./ItemActions.vue" +export { default as ItemContent } from "./ItemContent.vue" +export { default as ItemDescription } from "./ItemDescription.vue" +export { default as ItemFooter } from "./ItemFooter.vue" +export { default as ItemGroup } from "./ItemGroup.vue" +export { default as ItemHeader } from "./ItemHeader.vue" +export { default as ItemMedia } from "./ItemMedia.vue" +export { default as ItemSeparator } from "./ItemSeparator.vue" +export { default as ItemTitle } from "./ItemTitle.vue" + +export const itemVariants = cva( + "group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", + { + variants: { + variant: { + default: "bg-transparent", + outline: "border-border", + muted: "bg-muted/50", + }, + size: { + default: "p-4 gap-4 ", + sm: "py-3 px-4 gap-2.5", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + }, +) + +export const itemMediaVariants = cva( + "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5", + { + variants: { + variant: { + default: "bg-transparent", + icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4", + image: + "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +) + +export type ItemVariants = VariantProps +export type ItemMediaVariants = VariantProps diff --git a/app/components/ui/popover/Popover.vue b/app/components/ui/popover/Popover.vue new file mode 100644 index 0000000..4efdb98 --- /dev/null +++ b/app/components/ui/popover/Popover.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/ui/popover/PopoverAnchor.vue b/app/components/ui/popover/PopoverAnchor.vue new file mode 100644 index 0000000..49e01db --- /dev/null +++ b/app/components/ui/popover/PopoverAnchor.vue @@ -0,0 +1,15 @@ + + + diff --git a/app/components/ui/popover/PopoverContent.vue b/app/components/ui/popover/PopoverContent.vue new file mode 100644 index 0000000..cf1e55c --- /dev/null +++ b/app/components/ui/popover/PopoverContent.vue @@ -0,0 +1,45 @@ + + + diff --git a/app/components/ui/popover/PopoverTrigger.vue b/app/components/ui/popover/PopoverTrigger.vue new file mode 100644 index 0000000..fd3b497 --- /dev/null +++ b/app/components/ui/popover/PopoverTrigger.vue @@ -0,0 +1,15 @@ + + + diff --git a/app/components/ui/popover/index.ts b/app/components/ui/popover/index.ts new file mode 100644 index 0000000..66edf89 --- /dev/null +++ b/app/components/ui/popover/index.ts @@ -0,0 +1,4 @@ +export { default as Popover } from "./Popover.vue" +export { default as PopoverAnchor } from "./PopoverAnchor.vue" +export { default as PopoverContent } from "./PopoverContent.vue" +export { default as PopoverTrigger } from "./PopoverTrigger.vue" diff --git a/app/components/ui/separator/Separator.vue b/app/components/ui/separator/Separator.vue index 5429089..78d60ec 100644 --- a/app/components/ui/separator/Separator.vue +++ b/app/components/ui/separator/Separator.vue @@ -17,7 +17,7 @@ const delegatedProps = reactiveOmit(props, "class")