file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
components/ui/label/index.ts
TypeScript
export { default as Label } from './Label.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/Menubar.vue
Vue
<script setup lang="ts"> import { MenubarRoot, type MenubarRootEmits, type MenubarRootProps, } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<MenubarRootProps & { class?: string }>() const emits = defineEmits<MenubarRootEmits>() </script> <template> <MenubarRoot v-bind="props" :class=" cn( 'flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm', props.class, ) " @update:model-value="emits('update:modelValue', $event)" > <slot /> </MenubarRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarCheckboxItem.vue
Vue
<script setup lang="ts"> import { MenubarCheckboxItem, type MenubarCheckboxItemEmits, type MenubarCheckboxItemProps, MenubarItemIndicator, } from 'radix-vue' import { CheckIcon } from '@radix-icons/vue' import { cn } from '@/utils' const props = defineProps<MenubarCheckboxItemProps & { class?: string }>() const emit = defineEmits<MenubarCheckboxItemEmits>() </script> <template> <MenubarCheckboxItem v-bind="props" :class="[ cn( 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', props.class, ), ]" @update:checked="emit('update:checked', $event)" @select="emit('select', $event)" > <MenubarItemIndicator class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center" > <CheckIcon class="w-4 h-4" /> </MenubarItemIndicator> <slot /> </MenubarCheckboxItem> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarContent.vue
Vue
<script setup lang="ts"> import { MenubarContent, type MenubarContentProps, MenubarPortal, useForwardProps, } from 'radix-vue' import { cn } from '@/utils' const props = withDefaults( defineProps<MenubarContentProps & { class?: string }>(), { align: 'start', alignOffset: -4, sideOffset: 8, }, ) const forwarded = useForwardProps(props) </script> <template> <MenubarPortal> <MenubarContent v-bind="forwarded" :class=" cn( 'z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', props.class, ) " > <slot /> </MenubarContent> </MenubarPortal> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarGroup.vue
Vue
<script setup lang="ts"> import { MenubarGroup, type MenubarGroupProps } from 'radix-vue' const props = defineProps<MenubarGroupProps>() </script> <template> <MenubarGroup v-bind="props"> <slot /> </MenubarGroup> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarItem.vue
Vue
<script setup lang="ts"> import { MenubarItem, type MenubarItemEmits, type MenubarItemProps, } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<MenubarItemProps & { inset?: boolean; class?: string }>() const emits = defineEmits<MenubarItemEmits>() </script> <template> <MenubarItem v-bind="props" :class="[ cn( 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', props.class, ), ]" @select="emits('select', $event)" > <slot /> </MenubarItem> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarLabel.vue
Vue
<script setup lang="ts"> import { MenubarLabel, type MenubarLabelProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<MenubarLabelProps & { inset?: boolean; class?: string }>() </script> <template> <MenubarLabel :class="cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)"> <slot /> </MenubarLabel> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarMenu.vue
Vue
<script setup lang="ts"> import { MenubarMenu, type MenubarMenuProps } from 'radix-vue' const props = defineProps<MenubarMenuProps>() </script> <template> <MenubarMenu v-bind="props"> <slot /> </MenubarMenu> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarRadioGroup.vue
Vue
<script setup lang="ts"> import { MenubarRadioGroup, type MenubarRadioGroupEmits, type MenubarRadioGroupProps, } from 'radix-vue' const props = defineProps<MenubarRadioGroupProps>() const emits = defineEmits<MenubarRadioGroupEmits>() </script> <template> <MenubarRadioGroup v-bind="props" @update:model-value="emits('update:modelValue', $event)" > <slot /> </MenubarRadioGroup> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarRadioItem.vue
Vue
<script setup lang="ts"> import { MenubarItemIndicator, MenubarRadioItem, type MenubarRadioItemEmits, type MenubarRadioItemProps, } from 'radix-vue' import { DotFilledIcon } from '@radix-icons/vue' import { cn } from '@/utils' const props = defineProps<MenubarRadioItemProps & { class?: string }>() const emits = defineEmits<MenubarRadioItemEmits>() </script> <template> <MenubarRadioItem v-bind="props" :class="[ cn( 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', props.class, ), ]" @select="emits('select', $event)" > <MenubarItemIndicator class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center" > <DotFilledIcon class="h-4 w-4 fill-current" /> </MenubarItemIndicator> <slot /> </MenubarRadioItem> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarSeparator.vue
Vue
<script setup lang="ts"> import { MenubarSeparator, type MenubarSeparatorProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<MenubarSeparatorProps>() </script> <template> <MenubarSeparator :class=" cn('-mx-1 my-1 h-px bg-secondary', $attrs.class ?? '')" v-bind="props" /> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarShortcut.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' </script> <template> <span :class="cn('text-xs ml-auto tracking-widest opacity-50', $attrs.class ?? '')"> <slot /> </span> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarSub.vue
Vue
<script setup lang="ts"> import { MenubarSub, type MenubarSubEmits, useForwardPropsEmits } from 'radix-vue' interface MenubarSubRootProps { defaultOpen?: boolean open?: boolean } const props = defineProps<MenubarSubRootProps>() const emits = defineEmits<MenubarSubEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <MenubarSub v-bind="forwarded"> <slot /> </MenubarSub> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarSubContent.vue
Vue
<script setup lang="ts"> import { MenubarPortal, MenubarSubContent, type MenubarSubContentEmits, type MenubarSubContentProps, } from 'radix-vue' import { cn } from '@/utils' const props = withDefaults( defineProps<MenubarSubContentProps & { class?: string }>(), { sideOffset: 2, alignOffset: 0, }, ) const emits = defineEmits<MenubarSubContentEmits>() </script> <template> <MenubarPortal> <MenubarSubContent :loop="props.loop" :as-child="props.asChild" :side-offset="props.sideOffset" :side="props.side" :align="props.align" :align-offset="props.alignOffset" :class=" cn( 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', props.class, ) " > <slot /> </MenubarSubContent> </MenubarPortal> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarSubTrigger.vue
Vue
<script setup lang="ts"> import { MenubarSubTrigger, type MenubarSubTriggerProps } from 'radix-vue' import { ChevronRightIcon } from '@radix-icons/vue' import { cn } from '@/utils' const props = defineProps<MenubarSubTriggerProps & { inset?: boolean; class?: string }>() </script> <template> <MenubarSubTrigger v-bind="props" :class="[ cn( 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', inset && 'pl-8', props.class, ), ]" > <slot /> <ChevronRightIcon class="ml-auto h-4 w-4" /> </MenubarSubTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/MenubarTrigger.vue
Vue
<script setup lang="ts"> import { MenubarTrigger, type MenubarTriggerProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<MenubarTriggerProps & { class?: string }>() </script> <template> <MenubarTrigger v-bind="props" :class=" cn( 'flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', props.class, ) " > <slot /> </MenubarTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/menubar/index.ts
TypeScript
export { default as Menubar } from './Menubar.vue' export { default as MenubarItem } from './MenubarItem.vue' export { default as MenubarContent } from './MenubarContent.vue' export { default as MenubarGroup } from './MenubarGroup.vue' export { default as MenubarMenu } from './MenubarMenu.vue' export { default as MenubarRadioGroup } from './MenubarRadioGroup.vue' export { default as MenubarRadioItem } from './MenubarRadioItem.vue' export { default as MenubarCheckboxItem } from './MenubarCheckboxItem.vue' export { default as MenubarSeparator } from './MenubarSeparator.vue' export { default as MenubarSub } from './MenubarSub.vue' export { default as MenubarSubContent } from './MenubarSubContent.vue' export { default as MenubarSubTrigger } from './MenubarSubTrigger.vue' export { default as MenubarTrigger } from './MenubarTrigger.vue' export { default as MenubarShortcut } from './MenubarShortcut.vue' export { default as MenubarLabel } from './MenubarLabel.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenu.vue
Vue
<script setup lang="ts"> import { NavigationMenuRoot, type NavigationMenuRootEmits, type NavigationMenuRootProps, } from 'radix-vue' import NavigationMenuViewport from './NavigationMenuViewport.vue' import { cn } from '@/utils' const props = defineProps<NavigationMenuRootProps & { class?: string }>() const emits = defineEmits<NavigationMenuRootEmits>() </script> <template> <NavigationMenuRoot v-bind="props" :class="cn('relative z-10 flex max-w-max flex-1 items-center justify-center', props.class)" @update:model-value="emits('update:modelValue', $event)" > <slot /> <NavigationMenuViewport /> </NavigationMenuRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuContent.vue
Vue
<script setup lang="ts"> import { NavigationMenuContent, type NavigationMenuContentEmits, type NavigationMenuContentProps, useEmitAsProps, } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<NavigationMenuContentProps & { class?: string }>() const emits = defineEmits<NavigationMenuContentEmits>() </script> <template> <NavigationMenuContent v-bind="{ ...props, ...useEmitAsProps(emits) }" :class=" cn( 'left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ', props.class, ) " > <slot /> </NavigationMenuContent> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuIndicator.vue
Vue
<script setup lang="ts"> import { NavigationMenuIndicator, type NavigationMenuIndicatorProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<NavigationMenuIndicatorProps>() </script> <template> <NavigationMenuIndicator v-bind="props" :class="cn('top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in', $attrs.class ?? '')" > <div class="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" /> </NavigationMenuIndicator> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuItem.vue
Vue
<script setup lang="ts"> import { NavigationMenuItem, type NavigationMenuItemProps } from 'radix-vue' const props = defineProps<NavigationMenuItemProps>() </script> <template> <NavigationMenuItem v-bind="props"> <slot /> </NavigationMenuItem> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuLink.vue
Vue
<script setup lang="ts"> import { NavigationMenuLink, type NavigationMenuLinkEmits, type NavigationMenuLinkProps, useEmitAsProps, } from 'radix-vue' const props = defineProps<NavigationMenuLinkProps>() const emits = defineEmits<NavigationMenuLinkEmits>() </script> <template> <NavigationMenuLink v-bind="{ ...props, ...useEmitAsProps(emits) }"> <slot /> </NavigationMenuLink> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuList.vue
Vue
<script setup lang="ts"> import { NavigationMenuList, type NavigationMenuListProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<NavigationMenuListProps & { class?: string }>() </script> <template> <NavigationMenuList v-bind="props" :class=" cn( 'group flex flex-1 list-none items-center justify-center space-x-1', props.class, ) " > <slot /> </NavigationMenuList> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuTrigger.vue
Vue
<script setup lang="ts"> import { NavigationMenuTrigger, type NavigationMenuTriggerProps, } from 'radix-vue' import { ChevronDownIcon } from '@radix-icons/vue' import { navigationMenuTriggerStyle } from '.' import { cn } from '@/utils' const props = defineProps<NavigationMenuTriggerProps & { class?: string }>() </script> <template> <NavigationMenuTrigger :class="cn(navigationMenuTriggerStyle(), 'group', props.class)" v-bind="props" > <slot /> <ChevronDownIcon class="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180" aria-hidden="true" /> </NavigationMenuTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/NavigationMenuViewport.vue
Vue
<script setup lang="ts"> import { NavigationMenuViewport, type NavigationMenuViewportProps, } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<NavigationMenuViewportProps>() </script> <template> <div class="absolute left-0 top-full flex justify-center"> <NavigationMenuViewport v-bind="props" :class=" cn( 'origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]', $attrs.class ?? '', ) " /> </div> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/navigation-menu/index.ts
TypeScript
import { cva } from 'class-variance-authority' export { default as NavigationMenu } from './NavigationMenu.vue' export { default as NavigationMenuList } from './NavigationMenuList.vue' export { default as NavigationMenuItem } from './NavigationMenuItem.vue' export { default as NavigationMenuTrigger } from './NavigationMenuTrigger.vue' export { default as NavigationMenuContent } from './NavigationMenuContent.vue' export { default as NavigationMenuLink } from './NavigationMenuLink.vue' export const navigationMenuTriggerStyle = cva( 'group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50', )
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/pagination/PaginationEllipsis.vue
Vue
<script setup lang="ts"> import { useAttrs } from 'vue' import { PaginationEllipsis, type PaginationEllipsisProps, useForwardProps } from 'radix-vue' import { DotsHorizontalIcon } from '@radix-icons/vue' import { cn } from '@/utils' defineOptions({ inheritAttrs: false, }) const props = defineProps<PaginationEllipsisProps>() const forwarded = useForwardProps(props) const { class: className, ...rest } = useAttrs() </script> <template> <PaginationEllipsis :class="cn('w-9 h-9 flex items-center justify-center', className ?? '')" v-bind="{ ...forwarded, ...rest }"> <slot> <DotsHorizontalIcon /> </slot> </PaginationEllipsis> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/pagination/PaginationFirst.vue
Vue
<script setup lang="ts"> import { PaginationFirst, type PaginationFirstProps, useForwardProps } from 'radix-vue' import { DoubleArrowLeftIcon } from '@radix-icons/vue' import { Button, } from '@/components/ui/button' const props = withDefaults(defineProps<PaginationFirstProps>(), { asChild: true, }) const forwarded = useForwardProps(props) </script> <template> <PaginationFirst v-bind="forwarded"> <Button class="w-10 h-10 p-0" variant="outline"> <slot> <DoubleArrowLeftIcon /> </slot> </Button> </PaginationFirst> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/pagination/PaginationLast.vue
Vue
<script setup lang="ts"> import { PaginationLast, type PaginationLastProps, useForwardProps } from 'radix-vue' import { DoubleArrowRightIcon } from '@radix-icons/vue' import { Button, } from '@/components/ui/button' const props = withDefaults(defineProps<PaginationLastProps>(), { asChild: true, }) const forwarded = useForwardProps(props) </script> <template> <PaginationLast v-bind="forwarded"> <Button class="w-10 h-10 p-0" variant="outline"> <slot> <DoubleArrowRightIcon /> </slot> </Button> </PaginationLast> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/pagination/PaginationNext.vue
Vue
<script setup lang="ts"> import { PaginationNext, type PaginationNextProps, useForwardProps } from 'radix-vue' import { ChevronRightIcon } from '@radix-icons/vue' import { Button, } from '@/components/ui/button' const props = withDefaults(defineProps<PaginationNextProps>(), { asChild: true, }) const forwarded = useForwardProps(props) </script> <template> <PaginationNext v-bind="forwarded"> <Button class="w-10 h-10 p-0" variant="outline"> <slot> <ChevronRightIcon /> </slot> </Button> </PaginationNext> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/pagination/PaginationPrev.vue
Vue
<script setup lang="ts"> import { PaginationPrev, type PaginationPrevProps, useForwardProps } from 'radix-vue' import { ChevronLeftIcon } from '@radix-icons/vue' import { Button, } from '@/components/ui/button' const props = withDefaults(defineProps<PaginationPrevProps>(), { asChild: true, }) const forwarded = useForwardProps(props) </script> <template> <PaginationPrev v-bind="forwarded"> <Button class="w-10 h-10 p-0" variant="outline"> <slot> <ChevronLeftIcon /> </slot> </Button> </PaginationPrev> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/pagination/index.ts
TypeScript
export { PaginationRoot as Pagination, PaginationList, PaginationListItem, } from 'radix-vue' export { default as PaginationEllipsis } from './PaginationEllipsis.vue' export { default as PaginationFirst } from './PaginationFirst.vue' export { default as PaginationLast } from './PaginationLast.vue' export { default as PaginationNext } from './PaginationNext.vue' export { default as PaginationPrev } from './PaginationPrev.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/popover/Popover.vue
Vue
<script setup lang="ts"> import { PopoverRoot, useForwardPropsEmits } from 'radix-vue' import type { PopoverRootEmits, PopoverRootProps } from 'radix-vue' const props = defineProps<PopoverRootProps>() const emits = defineEmits<PopoverRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <PopoverRoot v-bind="forwarded"> <slot /> </PopoverRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/popover/PopoverContent.vue
Vue
<script setup lang="ts"> import { PopoverContent, type PopoverContentEmits, type PopoverContentProps, PopoverPortal, useForwardPropsEmits, } from 'radix-vue' import { cn } from '@/utils' const props = withDefaults( defineProps<PopoverContentProps & { class?: string }>(), { sideOffset: 4, }, ) const emits = defineEmits<PopoverContentEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <PopoverPortal> <PopoverContent v-bind="{ ...forwarded, ...$attrs }" :class=" cn( 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', props.class, ) " > <slot /> </PopoverContent> </PopoverPortal> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/popover/PopoverTrigger.vue
Vue
<script setup lang="ts"> import { PopoverTrigger, type PopoverTriggerProps } from 'radix-vue' const props = defineProps<PopoverTriggerProps>() </script> <template> <PopoverTrigger v-bind="props" class=""> <slot /> </PopoverTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/popover/index.ts
TypeScript
export { default as Popover } from './Popover.vue' export { default as PopoverTrigger } from './PopoverTrigger.vue' export { default as PopoverContent } from './PopoverContent.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/progress/Progress.vue
Vue
<script setup lang="ts"> import { ProgressIndicator, ProgressRoot, type ProgressRootProps, } from 'radix-vue' import { cn } from '@/utils' const props = withDefaults( defineProps<ProgressRootProps & { class?: string }>(), { class: '', modelValue: 0, }, ) </script> <template> <ProgressRoot :class=" cn( 'relative h-2 w-full overflow-hidden rounded-full bg-primary/20', props.class, ) " v-bind="props" > <ProgressIndicator :class=" cn( 'h-full w-full flex-1 bg-primary transition-all', props.class, ) " :style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`" /> </ProgressRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/progress/index.ts
TypeScript
export { default as Progress } from './Progress.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/radio-group/RadioGroup.vue
Vue
<script setup lang="ts"> import { RadioGroupRoot, type RadioGroupRootEmits, type RadioGroupRootProps, useForwardPropsEmits } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<RadioGroupRootProps & { class?: string }>() const emits = defineEmits<RadioGroupRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <RadioGroupRoot :class="cn('grid gap-2', props.class)" v-bind="forwarded"> <slot /> </RadioGroupRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/radio-group/RadioGroupItem.vue
Vue
<script setup lang="ts"> import { RadioGroupIndicator, RadioGroupItem, type RadioGroupItemProps, } from 'radix-vue' import { CheckIcon } from '@radix-icons/vue' import { cn } from '@/utils' const props = defineProps<RadioGroupItemProps & { class?: string }>() </script> <template> <RadioGroupItem v-bind="props" :class=" cn( 'aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', props.class, ) " > <RadioGroupIndicator :class="cn('flex items-center justify-center', props.class)" > <CheckIcon class="h-3.5 w-3.5 fill-primary" /> </RadioGroupIndicator> </RadioGroupItem> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/radio-group/index.ts
TypeScript
export { default as RadioGroup } from './RadioGroup.vue' export { default as RadioGroupItem } from './RadioGroupItem.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/scroll-area/ScrollArea.vue
Vue
<script setup lang="ts"> import { ScrollAreaCorner, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaViewport, } from 'radix-vue' import ScrollBar from './ScrollBar.vue' import { cn } from '@/utils' const props = withDefaults( defineProps< ScrollAreaRootProps & { class?: string } >(), { class: '', orientation: 'vertical', }, ) </script> <template> <ScrollAreaRoot :type="type" :class="cn('relative overflow-hidden', props.class)"> <ScrollAreaViewport class="h-full w-full rounded-[inherit]"> <slot /> </ScrollAreaViewport> <ScrollBar /> <ScrollAreaCorner /> </ScrollAreaRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/scroll-area/ScrollBar.vue
Vue
<script setup lang="ts"> import { ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb } from 'radix-vue' import { cn } from '@/utils' const props = withDefaults(defineProps<ScrollAreaScrollbarProps>(), { orientation: 'vertical', }) </script> <template> <ScrollAreaScrollbar v-bind="props" :class=" cn('flex touch-none select-none transition-colors', orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-[1px]', orientation === 'horizontal' && 'h-2.5 border-t border-t-transparent p-[1px]', $attrs.class ?? '')" > <ScrollAreaThumb class="relative flex-1 rounded-full bg-border" /> </ScrollAreaScrollbar> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/scroll-area/index.ts
TypeScript
export { default as ScrollArea } from './ScrollArea.vue' export { default as ScrollBar } from './ScrollBar.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/Select.vue
Vue
<script setup lang="ts"> import type { SelectRootEmits, SelectRootProps } from 'radix-vue' import { SelectRoot, useForwardPropsEmits } from 'radix-vue' const props = defineProps<SelectRootProps>() const emits = defineEmits<SelectRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <SelectRoot v-bind="forwarded"> <slot /> </SelectRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectContent.vue
Vue
<script setup lang="ts"> import { SelectContent, type SelectContentEmits, type SelectContentProps, SelectPortal, SelectViewport, useForwardPropsEmits, } from 'radix-vue' import { cn } from '@/utils' const props = withDefaults( defineProps<SelectContentProps & { class?: string }>(), { position: 'popper', sideOffset: 4, }, ) const emits = defineEmits<SelectContentEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <SelectPortal> <SelectContent v-bind="{ ...forwarded, ...$attrs }" :class=" cn( 'relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', position === 'popper' && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', props.class, ) " > <SelectViewport :class=" cn('p-0', position === 'popper' && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]')" > <slot /> </SelectViewport> </SelectContent> </SelectPortal> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectGroup.vue
Vue
<script setup lang="ts"> import { SelectGroup, type SelectGroupProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<SelectGroupProps & { class?: string }>() </script> <template> <SelectGroup :class="cn('p-1 w-full', props.class)" v-bind="props"> <slot /> </SelectGroup> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectItem.vue
Vue
<script setup lang="ts"> import { SelectItem, SelectItemIndicator, type SelectItemProps, SelectItemText, } from 'radix-vue' import { CheckIcon } from '@radix-icons/vue' import { cn } from '@/utils' const props = defineProps<SelectItemProps & { class?: string }>() </script> <template> <SelectItem v-bind="props" :class=" cn( 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', props.class, ) " > <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> <SelectItemIndicator> <CheckIcon class="h-4 w-4" /> </SelectItemIndicator> </span> <SelectItemText> <slot /> </SelectItemText> </SelectItem> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectItemText.vue
Vue
<script setup lang="ts"> import { SelectItemText, type SelectItemTextProps } from 'radix-vue' const props = defineProps<SelectItemTextProps>() </script> <template> <SelectItemText v-bind="props"> <slot /> </SelectItemText> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectLabel.vue
Vue
<script setup lang="ts"> import { SelectLabel, type SelectLabelProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<SelectLabelProps & { class?: string }>() </script> <template> <SelectLabel :class="cn('py-1.5 pl-8 pr-2 text-sm font-semibold', props.class)"> <slot /> </SelectLabel> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectSeparator.vue
Vue
<script setup lang="ts"> import { SelectSeparator, type SelectSeparatorProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<SelectSeparatorProps & { class?: string }>() </script> <template> <SelectSeparator :class="cn('-mx-1 my-1 h-px bg-muted', props.class)" /> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectTrigger.vue
Vue
<script setup lang="ts"> import { SelectIcon, SelectTrigger, type SelectTriggerProps } from 'radix-vue' import { ChevronDownIcon } from '@radix-icons/vue' import { cn } from '@/utils' const props = withDefaults( defineProps<SelectTriggerProps & { class?: string; invalid?: boolean }>(), { class: '', invalid: false, }, ) </script> <template> <SelectTrigger v-bind="props" :class="[ cn( 'flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50', props.class, ), props.invalid ? '!ring-destructive ring-2 placeholder:!text-destructive' : '', ]" > <slot /> <SelectIcon as-child> <ChevronDownIcon class="w-4 h-4 opacity-50" /> </SelectIcon> </SelectTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/SelectValue.vue
Vue
<script setup lang="ts"> import { SelectValue, type SelectValueProps } from 'radix-vue' const props = defineProps<SelectValueProps>() </script> <template> <SelectValue v-bind="props"> <slot /> </SelectValue> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/select/index.ts
TypeScript
export { default as Select } from './Select.vue' export { default as SelectValue } from './SelectValue.vue' export { default as SelectTrigger } from './SelectTrigger.vue' export { default as SelectContent } from './SelectContent.vue' export { default as SelectGroup } from './SelectGroup.vue' export { default as SelectItem } from './SelectItem.vue' export { default as SelectItemText } from './SelectItemText.vue' export { default as SelectLabel } from './SelectLabel.vue' export { default as SelectSeparator } from './SelectSeparator.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/separator/Separator.vue
Vue
<script setup lang="ts"> import { Separator, type SeparatorProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<SeparatorProps & { class?: string }>() </script> <template> <Separator :class="[ cn('shrink-0 bg-secondary', props.class), props.orientation === 'vertical' ? 'w-px h-full' : 'h-px w-full', ]" /> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/separator/index.ts
TypeScript
export { default as Separator } from './Separator.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/Sheet.vue
Vue
<script setup lang="ts"> import { DialogRoot } from 'radix-vue' </script> <template> <DialogRoot> <slot /> </DialogRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetClose.vue
Vue
<script setup lang="ts"> import { DialogClose, type DialogCloseProps } from 'radix-vue' const props = defineProps<DialogCloseProps>() </script> <template> <DialogClose v-bind="props"> <slot /> </DialogClose> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetContent.vue
Vue
<script setup lang="ts"> import { DialogClose, DialogContent, type DialogContentEmits, type DialogContentProps, DialogOverlay, DialogPortal, useEmitAsProps, } from 'radix-vue' import { cva } from 'class-variance-authority' import { Cross2Icon } from '@radix-icons/vue' import { cn } from '@/utils' interface SheetContentProps extends DialogContentProps { side?: 'left' | 'right' | 'top' | 'bottom' class?: string } const props = defineProps<SheetContentProps>() const emits = defineEmits<DialogContentEmits>() const emitsAsProps = useEmitAsProps(emits) const sheetVariants = cva( 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', { variants: { side: { top: 'inset-x-0 top-0 border-b border-border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top', bottom: 'inset-x-0 bottom-0 border-t border-border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom', left: 'inset-y-0 left-0 h-full w-3/4 border-r border-border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm', right: 'inset-y-0 right-0 h-full w-3/4 border-l border-border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm', }, }, defaultVariants: { side: 'right', }, }, ) </script> <template> <DialogPortal> <DialogOverlay class="fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" /> <DialogContent :class="cn(sheetVariants({ side: props.side }), props.class)" v-bind="{ ...props, ...emitsAsProps }" > <slot /> <DialogClose class="absolute top-4 right-4 p-0.5 transition-colors rounded-md hover:bg-secondary" > <Cross2Icon class="w-4 h-4 text-muted-foreground" /> </DialogClose> </DialogContent> </DialogPortal> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetDescription.vue
Vue
<script setup lang="ts"> import { DialogDescription, type DialogDescriptionProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<DialogDescriptionProps & { class?: string }>() </script> <template> <DialogDescription :class="cn('text-sm text-muted-foreground', props.class)" v-bind="props" > <slot /> </DialogDescription> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetFooter.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <div :class=" cn( 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', props.class, ) " > <slot /> </div> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetHeader.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <div :class=" cn('flex flex-col space-y-2 text-center sm:text-left', props.class) " > <slot /> </div> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetTitle.vue
Vue
<script setup lang="ts"> import { DialogTitle, type DialogTitleProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<DialogTitleProps & { class?: string }>() </script> <template> <DialogTitle :class="cn('text-lg font-semibold text-foreground', props.class)" v-bind="props" > <slot /> </DialogTitle> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/SheetTrigger.vue
Vue
<script setup lang="ts"> import { DialogTrigger, type DialogTriggerProps } from 'radix-vue' const props = defineProps<DialogTriggerProps>() </script> <template> <DialogTrigger v-bind="props"> <slot /> </DialogTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/sheet/index.ts
TypeScript
export { default as Sheet } from './Sheet.vue' export { default as SheetTrigger } from './SheetTrigger.vue' export { default as SheetClose } from './SheetClose.vue' export { default as SheetContent } from './SheetContent.vue' export { default as SheetHeader } from './SheetHeader.vue' export { default as SheetTitle } from './SheetTitle.vue' export { default as SheetDescription } from './SheetDescription.vue' export { default as SheetFooter } from './SheetFooter.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/skeleton/Skeleton.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' interface SkeletonProps { class?: string } const props = defineProps<SkeletonProps>() </script> <template> <div :class="cn('animate-pulse rounded-md bg-secondary', props.class)" /> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/skeleton/index.ts
TypeScript
export { default as Skeleton } from './Skeleton.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/slider/Slider.vue
Vue
<script setup lang="ts"> import type { SliderRootEmits, SliderRootProps } from 'radix-vue' import { SliderRange, SliderRoot, SliderThumb, SliderTrack, useEmitAsProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<SliderRootProps>() const emits = defineEmits<SliderRootEmits>() </script> <template> <SliderRoot :class="cn( 'relative flex w-full touch-none select-none items-center', $attrs.class ?? '', )" v-bind="{ ...props, ...useEmitAsProps(emits) }" > <SliderTrack class="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"> <SliderRange class="absolute h-full bg-primary" /> </SliderTrack> <SliderThumb class="block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" /> </SliderRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/slider/index.ts
TypeScript
export { default as Slider } from './Slider.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/switch/Switch.vue
Vue
<script setup lang="ts"> import { SwitchRoot, type SwitchRootEmits, type SwitchRootProps, SwitchThumb, useForwardPropsEmits, } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<SwitchRootProps & { class?: string }>() const emits = defineEmits<SwitchRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <SwitchRoot v-bind="forwarded" :class=" cn( 'peer inline-flex h-[20px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input', props.class, ) " > <SwitchThumb :class=" cn( 'pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0', ) " /> </SwitchRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/switch/index.ts
TypeScript
export { default as Switch } from './Switch.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/Table.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <div class="w-full overflow-auto"> <table :class="cn('w-full caption-bottom text-sm', props.class)"> <slot /> </table> </div> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableBody.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <tbody :class="cn('[&_tr:last-child]:border-0', props.class)"> <slot /> </tbody> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableCaption.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <caption :class="cn('mt-4 text-sm text-muted-foreground', props.class)"> <slot /> </caption> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableCell.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <td :class=" cn( 'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', props.class, ) " > <slot /> </td> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableEmpty.vue
Vue
<script setup lang="ts"> import TableRow from './TableRow.vue' import TableCell from './TableCell.vue' import { cn } from '@/utils' interface Props { class?: string colspan?: number } const props = withDefaults(defineProps<Props>(), { class: '', colspan: 1, }) </script> <template> <TableRow> <TableCell :class=" cn( 'p-4 whitespace-nowrap align-middle text-sm text-foreground', props.class, ) " :colspan="props.colspan" > <div class="flex items-center justify-center py-10"> <slot /> </div> </TableCell> </TableRow> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableFooter.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <tfoot :class="cn('bg-primary font-medium text-primary-foreground', props.class)"> <slot /> </tfoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableHead.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <th :class="cn('h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', props.class)"> <slot /> </th> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableHeader.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <thead :class="cn('[&_tr]:border-b', props.class)"> <slot /> </thead> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/TableRow.vue
Vue
<script setup lang="ts"> import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <tr :class="cn('border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', props.class)"> <slot /> </tr> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/table/index.ts
TypeScript
export { default as Table } from './Table.vue' export { default as TableBody } from './TableBody.vue' export { default as TableCell } from './TableCell.vue' export { default as TableHead } from './TableHead.vue' export { default as TableHeader } from './TableHeader.vue' export { default as TableRow } from './TableRow.vue' export { default as TableCaption } from './TableCaption.vue' export { default as TableEmpty } from './TableEmpty.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/tabs/Tabs.vue
Vue
<script setup lang="ts"> import { TabsRoot, useForwardPropsEmits } from 'radix-vue' import type { TabsRootEmits, TabsRootProps } from 'radix-vue' const props = defineProps<TabsRootProps>() const emits = defineEmits<TabsRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <TabsRoot v-bind="forwarded"> <slot /> </TabsRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/tabs/TabsContent.vue
Vue
<script setup lang="ts"> import { TabsContent, type TabsContentProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<TabsContentProps & { class?: string }>() </script> <template> <TabsContent :class="cn('mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', props.class)" v-bind="props" > <slot /> </TabsContent> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/tabs/TabsList.vue
Vue
<script setup lang="ts"> import { TabsList, type TabsListProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<TabsListProps & { class?: string }>() </script> <template> <TabsList v-bind="props" :class=" cn( 'inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground', props.class, ) " > <slot /> </TabsList> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/tabs/TabsTrigger.vue
Vue
<script setup lang="ts"> import { TabsTrigger, type TabsTriggerProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<TabsTriggerProps & { class?: string }>() </script> <template> <TabsTrigger v-bind="props" :class=" cn( 'inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow', props.class, ) " > <slot /> </TabsTrigger> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/tabs/index.ts
TypeScript
export { default as Tabs } from './Tabs.vue' export { default as TabsTrigger } from './TabsTrigger.vue' export { default as TabsList } from './TabsList.vue' export { default as TabsContent } from './TabsContent.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/textarea/Textarea.vue
Vue
<script setup lang="ts"> import { useVModel } from '@vueuse/core' import { cn } from '@/utils' const props = defineProps<{ defaultValue?: string | number modelValue?: string | number }>() const emits = defineEmits<{ (e: 'update:modelValue', payload: string | number): void }>() const modelValue = useVModel(props, 'modelValue', emits, { passive: true, defaultValue: props.defaultValue, }) </script> <template> <textarea v-model="modelValue" :class="cn('flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', $attrs.class ?? '')" /> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/textarea/index.ts
TypeScript
export { default as Textarea } from './Textarea.vue'
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/Toast.vue
Vue
<script lang="ts"> import type { ToastRootEmits, ToastRootProps } from 'radix-vue' import type { VariantProps } from 'class-variance-authority' interface ToastVariantProps extends VariantProps<typeof toastVariants> {} export interface ToastProps extends ToastRootProps { class?: string variant?: ToastVariantProps['variant'] 'onOpenChange'?: ((value: boolean) => void) | undefined }; </script> <script setup lang="ts"> import { ToastRoot, useEmitAsProps } from 'radix-vue' import { toastVariants } from '.' import { cn } from '@/utils' const props = defineProps<ToastProps>() const emits = defineEmits<ToastRootEmits>() </script> <template> <ToastRoot v-bind="{ ...props, ...useEmitAsProps(emits) }" :class="cn(toastVariants({ variant: props.variant }), props.class)" @update:open="onOpenChange" > <slot /> </ToastRoot> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/ToastAction.vue
Vue
<script setup lang="ts"> import { ToastAction, type ToastActionProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<ToastActionProps & { class?: string }>() </script> <template> <ToastAction v-bind="props" :class="cn('inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive', props.class)"> <slot /> </ToastAction> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/ToastClose.vue
Vue
<script setup lang="ts"> import { ToastClose } from 'radix-vue' import { Cross2Icon } from '@radix-icons/vue' import { cn } from '@/utils' const props = defineProps<{ class?: string }>() </script> <template> <ToastClose v-bind="props" :class="cn('absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600', props.class)"> <Cross2Icon class="h-4 w-4" /> </ToastClose> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/ToastDescription.vue
Vue
<script setup lang="ts"> import { ToastDescription, type ToastDescriptionProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<ToastDescriptionProps & { class?: string }>() </script> <template> <ToastDescription :class="cn('text-sm opacity-90', props.class)" v-bind="props"> <slot /> </ToastDescription> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/ToastProvider.vue
Vue
<script setup lang="ts"> import { ToastProvider, type ToastProviderProps } from 'radix-vue' const props = defineProps<ToastProviderProps>() </script> <template> <ToastProvider v-bind="props"> <slot /> </ToastProvider> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/ToastTitle.vue
Vue
<script setup lang="ts"> import { ToastTitle, type ToastTitleProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<ToastTitleProps & { class?: string }>() </script> <template> <ToastTitle v-bind="props" :class="cn('text-sm font-semibold [&+div]:text-xs', props.class)"> <slot /> </ToastTitle> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/ToastViewport.vue
Vue
<script setup lang="ts"> import { ToastViewport, type ToastViewportProps } from 'radix-vue' import { cn } from '@/utils' const props = defineProps<ToastViewportProps & { class?: string }>() </script> <template> <ToastViewport v-bind="props" :class="cn('fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]', props.class)" /> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/Toaster.vue
Vue
<script setup lang="ts"> import { isVNode } from 'vue' import { useToast } from './use-toast' import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '.' const { toasts } = useToast() </script> <template> <ToastProvider> <Toast v-for="toast in toasts" :key="toast.id" v-bind="toast"> <div class="grid gap-1"> <ToastTitle v-if="toast.title"> {{ toast.title }} </ToastTitle> <template v-if="toast.description"> <ToastDescription v-if="isVNode(toast.description)"> <component :is="toast.description" /> </ToastDescription> <ToastDescription v-else> {{ toast.description }} </ToastDescription> </template> <ToastClose /> </div> <component :is="toast.action" /> </Toast> <ToastViewport /> </ToastProvider> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/index.ts
TypeScript
export { default as Toaster } from './Toaster.vue' export { default as Toast } from './Toast.vue' export { default as ToastViewport } from './ToastViewport.vue' export { default as ToastAction } from './ToastAction.vue' export { default as ToastClose } from './ToastClose.vue' export { default as ToastTitle } from './ToastTitle.vue' export { default as ToastDescription } from './ToastDescription.vue' export { default as ToastProvider } from './ToastProvider.vue' export { toast, useToast } from './use-toast' import { cva } from 'class-variance-authority' export const toastVariants = cva( 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full', { variants: { variant: { default: 'border bg-background text-foreground', destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground', }, }, defaultVariants: { variant: 'default', }, }, )
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toast/use-toast.ts
TypeScript
import { computed, ref } from 'vue' import type { Component, VNode } from 'vue' import type { ToastProps } from './Toast.vue' const TOAST_LIMIT = 1 const TOAST_REMOVE_DELAY = 1000000 export type StringOrVNode = | string | VNode | (() => VNode) type ToasterToast = ToastProps & { id: string title?: string description?: StringOrVNode action?: Component } const actionTypes = { ADD_TOAST: 'ADD_TOAST', UPDATE_TOAST: 'UPDATE_TOAST', DISMISS_TOAST: 'DISMISS_TOAST', REMOVE_TOAST: 'REMOVE_TOAST', } as const let count = 0 function genId() { count = (count + 1) % Number.MAX_VALUE return count.toString() } type ActionType = typeof actionTypes type Action = | { type: ActionType['ADD_TOAST'] toast: ToasterToast } | { type: ActionType['UPDATE_TOAST'] toast: Partial<ToasterToast> } | { type: ActionType['DISMISS_TOAST'] toastId?: ToasterToast['id'] } | { type: ActionType['REMOVE_TOAST'] toastId?: ToasterToast['id'] } interface State { toasts: ToasterToast[] } const toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>() function addToRemoveQueue(toastId: string) { if (toastTimeouts.has(toastId)) return const timeout = setTimeout(() => { toastTimeouts.delete(toastId) dispatch({ type: actionTypes.REMOVE_TOAST, toastId, }) }, TOAST_REMOVE_DELAY) toastTimeouts.set(toastId, timeout) } const state = ref<State>({ toasts: [], }) function dispatch(action: Action) { switch (action.type) { case actionTypes.ADD_TOAST: state.value.toasts = [action.toast, ...state.value.toasts].slice(0, TOAST_LIMIT) break case actionTypes.UPDATE_TOAST: state.value.toasts = state.value.toasts.map(t => t.id === action.toast.id ? { ...t, ...action.toast } : t, ) break case actionTypes.DISMISS_TOAST: { const { toastId } = action if (toastId) { addToRemoveQueue(toastId) } else { state.value.toasts.forEach((toast) => { addToRemoveQueue(toast.id) }) } state.value.toasts = state.value.toasts.map(t => t.id === toastId || toastId === undefined ? { ...t, open: false, } : t, ) break } case actionTypes.REMOVE_TOAST: if (action.toastId === undefined) state.value.toasts = [] else state.value.toasts = state.value.toasts.filter(t => t.id !== action.toastId) break } } function useToast() { return { toasts: computed(() => state.value.toasts), toast, dismiss: (toastId?: string) => dispatch({ type: actionTypes.DISMISS_TOAST, toastId }), } } type Toast = Omit<ToasterToast, 'id'> function toast(props: Toast) { const id = genId() const update = (props: ToasterToast) => dispatch({ type: actionTypes.UPDATE_TOAST, toast: { ...props, id }, }) const dismiss = () => dispatch({ type: actionTypes.DISMISS_TOAST, toastId: id }) dispatch({ type: actionTypes.ADD_TOAST, toast: { ...props, id, open: true, onOpenChange: (open: boolean) => { if (!open) dismiss() }, }, }) return { id, dismiss, update, } } export { toast, useToast }
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toggle/Toggle.vue
Vue
<script setup lang="ts"> import type { ToggleEmits, ToggleProps } from 'radix-vue' import { Toggle, useForwardPropsEmits } from 'radix-vue' import type { VariantProps } from 'class-variance-authority' import { computed } from 'vue' import { toggleVariants } from '.' import { cn } from '@/utils' interface ToggleVariantProps extends VariantProps<typeof toggleVariants> {} interface Props extends ToggleProps { variant?: ToggleVariantProps['variant'] size?: ToggleVariantProps['size'] disabled?: boolean } const props = withDefaults(defineProps<Props>(), { variant: 'default', size: 'default', disabled: false, }) const emits = defineEmits<ToggleEmits>() const toggleProps = computed(() => { // eslint-disable-next-line unused-imports/no-unused-vars const { variant, size, ...otherProps } = props return otherProps }) const forwarded = useForwardPropsEmits(toggleProps, emits) </script> <template> <Toggle v-bind="forwarded" :class="cn(toggleVariants({ variant, size, class: $attrs.class ?? '' }))" :disabled="props.disabled" > <slot /> </Toggle> </template>
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel
components/ui/toggle/index.ts
TypeScript
import { cva } from 'class-variance-authority' export { default as Toggle } from './Toggle.vue' export const toggleVariants = cva( 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground', { variants: { variant: { default: 'bg-transparent', outline: 'border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground', }, size: { default: 'h-9 px-3', sm: 'h-8 px-2', lg: 'h-10 px-3', }, }, defaultVariants: { variant: 'default', size: 'default', }, }, )
zernonia/vue0
823
Vue version open source alternative for v0.dev
Vue
zernonia
zernonia
Troop Travel