chore: format code

This commit is contained in:
vben
2024-06-08 19:49:06 +08:00
parent d584d4cf4e
commit 7bcd7746ca
187 changed files with 775 additions and 587 deletions

View File

@@ -2,7 +2,6 @@
import type { ContentCompactType } from '@vben-core/typings';
import type { CSSProperties } from 'vue';
import { computed } from 'vue';
interface Props {

View File

@@ -1,10 +1,9 @@
<script setup lang="ts">
import { useNamespace } from '@vben-core/toolkit';
import type { CSSProperties } from 'vue';
import { computed } from 'vue';
import { useNamespace } from '@vben-core/toolkit';
interface Props {
/**
* 背景颜色

View File

@@ -1,11 +1,10 @@
<script setup lang="ts">
import type { CSSProperties } from 'vue';
import { computed, useSlots } from 'vue';
import { IcRoundMenu } from '@vben-core/iconify';
import { VbenIconButton } from '@vben-core/shadcn-ui';
import type { CSSProperties } from 'vue';
import { computed, useSlots } from 'vue';
interface Props {
/**
* 背景颜色

View File

@@ -1,12 +1,11 @@
<script setup lang="ts">
import { ScrollArea } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import type { CSSProperties } from 'vue';
// import { onClickOutside } from '@vueuse/core';
import { computed, ref, shallowRef, useSlots, watchEffect } from 'vue';
import { ScrollArea } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import { SideCollapseButton, SidePinButton } from './widgets';
interface Props {

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import type { CSSProperties } from 'vue';
import { computed } from 'vue';
interface Props {

View File

@@ -1,8 +1,8 @@
<script setup lang="ts">
import type { CSSProperties } from 'vue';
import { computed, ref, watch } from 'vue';
import { useMouse, useScroll, useThrottleFn } from '@vueuse/core';
import { computed, ref, watch } from 'vue';
import {
LayoutContent,

View File

@@ -1,12 +1,12 @@
<script lang="ts" setup>
import { VbenIcon, VbenMenuBadge, VbenTooltip } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import type { MenuItemProps, MenuItemRegistered } from '../interface';
import { computed, onBeforeUnmount, onMounted, reactive, useSlots } from 'vue';
import { useMenu, useMenuContext, useSubMenuContext } from '../hooks';
import { VbenIcon, VbenMenuBadge, VbenTooltip } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import type { MenuItemProps, MenuItemRegistered } from '../interface';
import { useMenu, useMenuContext, useSubMenuContext } from '../hooks';
interface Props extends MenuItemProps {}

View File

@@ -1,8 +1,11 @@
<script lang="ts" setup>
import { IcRoundMoreHoriz } from '@vben-core/iconify';
import { isHttpUrl, useNamespace } from '@vben-core/toolkit';
import type {
MenuItemClicked,
MenuItemRegistered,
MenuProps,
MenuProvider,
} from '../interface';
import { UseResizeObserverReturn, useResizeObserver } from '@vueuse/core';
import {
type VNodeArrayChildren,
computed,
@@ -15,6 +18,11 @@ import {
watchEffect,
} from 'vue';
import { IcRoundMoreHoriz } from '@vben-core/iconify';
import { isHttpUrl, useNamespace } from '@vben-core/toolkit';
import { UseResizeObserverReturn, useResizeObserver } from '@vueuse/core';
import {
createMenuContext,
createSubMenuContext,
@@ -23,13 +31,6 @@ import {
import { flattedChildren } from '../utils';
import SubMenu from './sub-menu.vue';
import type {
MenuItemClicked,
MenuItemRegistered,
MenuProps,
MenuProvider,
} from '../interface';
interface Props extends MenuProps {}
defineOptions({ name: 'Menu' });

View File

@@ -1,11 +1,11 @@
<script setup lang="ts">
import type { MenuRecordRaw } from '@vben-core/typings';
import type { NormalMenuProps } from './normal-menu';
import { VbenIcon } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import type { NormalMenuProps } from './normal-menu';
interface Props extends NormalMenuProps {}
defineOptions({

View File

@@ -1,4 +1,8 @@
<script lang="ts" setup>
import type { MenuItemProps } from '../interface';
import { computed } from 'vue';
import {
IcRoundChevronRight,
IcRoundKeyboardArrowDown,
@@ -6,12 +10,8 @@ import {
import { VbenIcon } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import { computed } from 'vue';
import { useMenuContext } from '../hooks';
import type { MenuItemProps } from '../interface';
interface Props extends MenuItemProps {
isMenuMore: boolean;
isTopLevelMenuSubmenu: boolean;

View File

@@ -1,11 +1,17 @@
<script lang="ts" setup>
import type { HoverCardContentProps } from '@vben-core/shadcn-ui';
import { VbenHoverCard } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import type {
MenuItemRegistered,
MenuProvider,
SubMenuProps,
} from '../interface';
import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
import { VbenHoverCard } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import {
createSubMenuContext,
useMenu,
@@ -16,12 +22,6 @@ import {
import CollapseTransition from './collapse-transition.vue';
import SubMenuContent from './sub-menu-content.vue';
import type {
MenuItemRegistered,
MenuProvider,
SubMenuProps,
} from '../interface';
interface Props extends SubMenuProps {
isSubMenuMore?: boolean;
}

View File

@@ -1,9 +1,9 @@
import type { MenuProvider, SubMenuProvider } from '../interface';
import { getCurrentInstance, inject, provide } from 'vue';
import { findComponentUpward } from '../utils';
import type { MenuProvider, SubMenuProvider } from '../interface';
const menuContextKey = Symbol('menuContext');
/**

View File

@@ -1,10 +1,10 @@
<script setup lang="ts">
import type { MenuRecordRaw } from '@vben-core/typings';
import { VbenMenuBadge } from '@vben-core/shadcn-ui';
import { computed } from 'vue';
import { VbenMenuBadge } from '@vben-core/shadcn-ui';
import { MenuItem, SubMenu as SubMenuComp } from './components';
// eslint-disable-next-line import/no-self-import
import SubMenu from './sub-menu.vue';

View File

@@ -4,7 +4,6 @@ import type {
VNodeChild,
VNodeNormalizedChildren,
} from 'vue';
import { isVNode } from 'vue';
type VNodeChildAtom = Exclude<VNodeChild, Array<any>>;

View File

@@ -6,9 +6,9 @@ import type {
} from 'radix-vue';
import type { HTMLAttributes } from 'vue';
import { computed } from 'vue';
import { Avatar, AvatarFallback, AvatarImage } from '#/components/ui/avatar';
import { computed } from 'vue';
interface Props extends AvatarRootProps, AvatarFallbackProps, AvatarImageProps {
alt?: string;

View File

@@ -1,13 +1,13 @@
<script lang="ts" setup>
import { IcRoundArrowUpward } from '@vben-core/iconify';
import type { BacktopProps } from './backtop';
import { computed } from 'vue';
import { IcRoundArrowUpward } from '@vben-core/iconify';
import { VbenButton } from '../button';
import { useBackTop } from './use-backtop';
import type { BacktopProps } from './backtop';
interface Props extends BacktopProps {}
defineOptions({ name: 'BackTop' });

View File

@@ -1,7 +1,8 @@
import { useEventListener, useThrottleFn } from '@vueuse/core';
import type { BacktopProps } from './backtop';
import { onMounted, ref, shallowRef } from 'vue';
import type { BacktopProps } from './backtop';
import { useEventListener, useThrottleFn } from '@vueuse/core';
export const useBackTop = (props: BacktopProps) => {
const el = shallowRef<HTMLElement>();

View File

@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { VbenIcon } from '../icon';
import type { IBreadcrumb } from './interface';
import { VbenIcon } from '../icon';
interface Props {
breadcrumbs: IBreadcrumb[];
showIcon?: boolean;

View File

@@ -1,4 +1,6 @@
<script lang="ts" setup>
import type { IBreadcrumb } from './interface';
import { IcRoundKeyboardArrowDown } from '@vben-core/iconify';
import {
@@ -18,8 +20,6 @@ import {
import { VbenIcon } from '../';
import type { IBreadcrumb } from './interface';
interface Props {
breadcrumbs: IBreadcrumb[];
showIcon?: boolean;

View File

@@ -1,12 +1,13 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue';
import { computed } from 'vue';
import { MdiLoading } from '@vben-core/iconify';
import type { HTMLAttributes } from 'vue';
import { Primitive, type PrimitiveProps } from 'radix-vue';
import { type ButtonVariants, buttonVariants } from '#/components/ui/button';
import { cn } from '#/lib/utils';
import { Primitive, type PrimitiveProps } from 'radix-vue';
import { computed } from 'vue';
interface Props extends PrimitiveProps {
class?: HTMLAttributes['class'];

View File

@@ -1,9 +1,11 @@
<script setup lang="ts">
import { type HTMLAttributes, computed, useSlots } from 'vue';
import { type PrimitiveProps } from 'radix-vue';
import { VbenTooltip } from '#/components/tooltip';
import { ButtonVariants } from '#/components/ui/button';
import { cn } from '#/lib/utils';
import { type PrimitiveProps } from 'radix-vue';
import { type HTMLAttributes, computed, useSlots } from 'vue';
import VbenButton from './button.vue';

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { CheckboxRootEmits, CheckboxRootProps } from 'radix-vue';
import { Checkbox } from '#/components/ui/checkbox';
import { useForwardPropsEmits } from 'radix-vue';
import { Checkbox } from '#/components/ui/checkbox';
const props = defineProps<
{
name: string;

View File

@@ -5,7 +5,12 @@ import type {
ContextMenuRootProps,
} from 'radix-vue';
import type { IContextMenuItem } from './interface';
import type { HTMLAttributes } from 'vue';
import { computed } from 'vue';
import { useForwardPropsEmits } from 'radix-vue';
import {
ContextMenu,
@@ -15,10 +20,6 @@ import {
ContextMenuShortcut,
ContextMenuTrigger,
} from '#/components/ui/context-menu';
import { useForwardPropsEmits } from 'radix-vue';
import { computed } from 'vue';
import type { IContextMenuItem } from './interface';
const props = defineProps<
{

View File

@@ -1,4 +1,9 @@
<script lang="ts" setup>
import type {
DropdownMenuProps,
VbenDropdownMenuItem as IDropdownMenuItem,
} from './interface';
import {
DropdownMenu,
DropdownMenuContent,
@@ -8,11 +13,6 @@ import {
DropdownMenuTrigger,
} from '#/components/ui/dropdown-menu';
import type {
DropdownMenuProps,
VbenDropdownMenuItem as IDropdownMenuItem,
} from './interface';
interface Props extends DropdownMenuProps {}
defineOptions({ name: 'DropdownMenu' });

View File

@@ -1,4 +1,6 @@
<script lang="ts" setup>
import type { DropdownMenuProps } from './interface';
import {
DropdownMenu,
DropdownMenuContent,
@@ -7,8 +9,6 @@ import {
DropdownMenuTrigger,
} from '#/components/ui/dropdown-menu';
import type { DropdownMenuProps } from './interface';
interface Props extends DropdownMenuProps {}
defineOptions({ name: 'DropdownRadioMenu' });

View File

@@ -1,13 +1,15 @@
<script setup lang="ts">
import type { HoverCardRootEmits, HoverCardRootProps } from 'radix-vue';
import { HTMLAttributes, computed } from 'vue';
import { HoverCardContentProps, useForwardPropsEmits } from 'radix-vue';
import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
} from '#/components/ui/hover-card';
import { HoverCardContentProps, useForwardPropsEmits } from 'radix-vue';
import { HTMLAttributes, computed } from 'vue';
const props = defineProps<
{

View File

@@ -1,9 +1,9 @@
<script setup lang="ts">
import { type Component, computed } from 'vue';
import { Icon, IconDefault } from '@vben-core/iconify';
import { isHttpUrl, isObject, isString } from '@vben-core/toolkit';
import { type Component, computed } from 'vue';
const props = defineProps<{
// 没有是否显示默认图标
fallback?: boolean;

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { ref, useSlots } from 'vue';
import {
IcOutlineVisibility,
IcOutlineVisibilityOff,
} from '@vben-core/iconify';
import { type InputProps, VbenInput } from '#/components/input/index';
import { useForwardProps } from 'radix-vue';
import { ref, useSlots } from 'vue';
import { type InputProps, VbenInput } from '#/components/input/index';
import PasswordStrength from './password-strength.vue';

View File

@@ -1,8 +1,8 @@
<script setup lang="ts">
import { computed } from 'vue';
import type { InputProps } from './interface';
import { computed } from 'vue';
defineOptions({
inheritAttrs: false,
});

View File

@@ -1,10 +1,10 @@
<script setup lang="ts">
import type { MenuRecordBadgeRaw } from '@vben-core/typings';
import { isValidColor } from '@vben-core/toolkit';
import { computed } from 'vue';
import { isValidColor } from '@vben-core/toolkit';
import BadgeDot from './menu-badge-dot.vue';
interface Props extends MenuRecordBadgeRaw {

View File

@@ -1,13 +1,14 @@
<script setup lang="ts">
import type { PinInputProps } from './interface';
import { computed, ref, watch } from 'vue';
import { VbenButton } from '#/components/button';
import {
PinInput,
PinInputGroup,
PinInputInput,
} from '#/components/ui/pin-input';
import { computed, ref, watch } from 'vue';
import type { PinInputProps } from './interface';
defineOptions({
inheritAttrs: false,

View File

@@ -5,13 +5,15 @@ import type {
PopoverRootProps,
} from 'radix-vue';
import { HTMLAttributes, computed } from 'vue';
import { useForwardPropsEmits } from 'radix-vue';
import {
PopoverContent,
Popover as PopoverRoot,
PopoverTrigger,
} from '#/components/ui/popover';
import { useForwardPropsEmits } from 'radix-vue';
import { HTMLAttributes, computed } from 'vue';
const props = withDefaults(
defineProps<

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { Tabs, TabsContent, TabsList } from '#/components/ui/tabs';
import { TabsTrigger } from 'radix-vue';
import type { SegmentedItem } from './interface';
import { computed } from 'vue';
import TabsIndicator from './tabs-indicator.vue';
import { TabsTrigger } from 'radix-vue';
import type { SegmentedItem } from './interface';
import { Tabs, TabsContent, TabsList } from '#/components/ui/tabs';
import TabsIndicator from './tabs-indicator.vue';
interface Props {
defaultValue?: string;

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
TabsIndicator,
type TabsIndicatorProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & TabsIndicatorProps

View File

@@ -1,4 +1,8 @@
<script setup lang="ts">
import { computed, useSlots } from 'vue';
import { Cross2Icon } from '@radix-icons/vue';
import { VbenButton, VbenIconButton } from '#/components/button';
import { ScrollArea } from '#/components/ui/scroll-area';
import {
@@ -11,8 +15,6 @@ import {
SheetTitle,
SheetTrigger,
} from '#/components/ui/sheet';
import { Cross2Icon } from '@radix-icons/vue';
import { computed, useSlots } from 'vue';
interface Props {
cancelText?: string;

View File

@@ -1,11 +1,12 @@
<script setup lang="ts">
import { TooltipContentProps } from 'radix-vue';
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '#/components/ui/tooltip';
import { TooltipContentProps } from 'radix-vue';
interface Props {
delayDuration?: number;

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue';
import { AlertDialogAction, type AlertDialogActionProps } from 'radix-vue';
import { buttonVariants } from '#/components/ui/button';
import { cn } from '#/lib/utils';
import { AlertDialogAction, type AlertDialogActionProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & AlertDialogActionProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue';
import { AlertDialogCancel, type AlertDialogCancelProps } from 'radix-vue';
import { buttonVariants } from '#/components/ui/button';
import { cn } from '#/lib/utils';
import { AlertDialogCancel, type AlertDialogCancelProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & AlertDialogCancelProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
AlertDialogContent,
type AlertDialogContentEmits,
@@ -8,7 +9,8 @@ import {
AlertDialogPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & AlertDialogContentProps

View File

@@ -1,10 +1,12 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
AlertDialogDescription,
type AlertDialogDescriptionProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & AlertDialogDescriptionProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { AlertDialogTitle, type AlertDialogTitleProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { AlertDialogTitle, type AlertDialogTitleProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & AlertDialogTitleProps
>();

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue';
import { cn } from '#/lib/utils';
import { AvatarRoot } from 'radix-vue';
import { cn } from '#/lib/utils';
import { type AvatarVariants, avatarVariant } from './avatar';
const props = withDefaults(

View File

@@ -1,9 +1,10 @@
<script lang="ts" setup>
import type { HTMLAttributes } from 'vue';
import { cn } from '#/lib/utils';
import { DotsHorizontalIcon } from '@radix-icons/vue';
import { cn } from '#/lib/utils';
const props = defineProps<{
class?: HTMLAttributes['class'];
}>();

View File

@@ -1,9 +1,10 @@
<script lang="ts" setup>
import type { HTMLAttributes } from 'vue';
import { cn } from '#/lib/utils';
import { Primitive, type PrimitiveProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = withDefaults(
defineProps<{ class?: HTMLAttributes['class'] } & PrimitiveProps>(),
{

View File

@@ -1,9 +1,10 @@
<script lang="ts" setup>
import type { HTMLAttributes } from 'vue';
import { cn } from '#/lib/utils';
import { ChevronRightIcon } from '@radix-icons/vue';
import { cn } from '#/lib/utils';
const props = defineProps<{
class?: HTMLAttributes['class'];
}>();

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue';
import { cn } from '#/lib/utils';
import { Primitive, type PrimitiveProps } from 'radix-vue';
import { cn } from '#/lib/utils';
import { type ButtonVariants, buttonVariants } from './button';
interface Props extends PrimitiveProps {

View File

@@ -1,14 +1,16 @@
<script setup lang="ts">
import type { CheckboxRootEmits, CheckboxRootProps } from 'radix-vue';
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { CheckIcon } from '@radix-icons/vue';
import {
CheckboxIndicator,
CheckboxRoot,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & CheckboxRootProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { CheckIcon } from '@radix-icons/vue';
import {
ContextMenuCheckboxItem,
@@ -8,7 +9,8 @@ import {
ContextMenuItemIndicator,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & ContextMenuCheckboxItemProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
ContextMenuContent,
type ContextMenuContentEmits,
@@ -7,7 +8,8 @@ import {
ContextMenuPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & ContextMenuContentProps

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
ContextMenuItem,
type ContextMenuItemEmits,
type ContextMenuItemProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class']; inset?: boolean } & ContextMenuItemProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { ContextMenuLabel, type ContextMenuLabelProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { ContextMenuLabel, type ContextMenuLabelProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class']; inset?: boolean } & ContextMenuLabelProps
>();

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { DotFilledIcon } from '@radix-icons/vue';
import {
ContextMenuItemIndicator,
@@ -8,7 +9,8 @@ import {
type ContextMenuRadioItemProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & ContextMenuRadioItemProps

View File

@@ -1,10 +1,12 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
ContextMenuSeparator,
type ContextMenuSeparatorProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & ContextMenuSeparatorProps

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
ContextMenuSubContent,
type DropdownMenuSubContentEmits,
type DropdownMenuSubContentProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DropdownMenuSubContentProps

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { ChevronRightIcon } from '@radix-icons/vue';
import {
ContextMenuSubTrigger,
type ContextMenuSubTriggerProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { Cross2Icon } from '@radix-icons/vue';
import {
DialogClose,
@@ -10,7 +11,8 @@ import {
DialogPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DialogContentProps

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DialogDescription,
type DialogDescriptionProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DialogDescriptionProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DialogClose,
DialogContent,
@@ -9,7 +10,8 @@ import {
DialogPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DialogContentProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { DialogTitle, type DialogTitleProps, useForwardProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { DialogTitle, type DialogTitleProps, useForwardProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DialogTitleProps
>();

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { CheckIcon } from '@radix-icons/vue';
import {
DropdownMenuCheckboxItem,
@@ -8,7 +9,8 @@ import {
DropdownMenuItemIndicator,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DropdownMenuCheckboxItemProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DropdownMenuContent,
type DropdownMenuContentEmits,
@@ -7,7 +8,8 @@ import {
DropdownMenuPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = withDefaults(
defineProps<{ class?: HTMLAttributes['class'] } & DropdownMenuContentProps>(),

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DropdownMenuItem,
type DropdownMenuItemProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class']; inset?: boolean } & DropdownMenuItemProps

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DropdownMenuLabel,
type DropdownMenuLabelProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class']; inset?: boolean } & DropdownMenuLabelProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { DotFilledIcon } from '@radix-icons/vue';
import {
DropdownMenuItemIndicator,
@@ -8,7 +9,8 @@ import {
type DropdownMenuRadioItemProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DropdownMenuRadioItemProps

View File

@@ -1,10 +1,12 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DropdownMenuSeparator,
type DropdownMenuSeparatorProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DropdownMenuSubContent,
type DropdownMenuSubContentEmits,
type DropdownMenuSubContentProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DropdownMenuSubContentProps

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { ChevronRightIcon } from '@radix-icons/vue';
import {
DropdownMenuSubTrigger,
type DropdownMenuSubTriggerProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DropdownMenuSubTriggerProps

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
HoverCardContent,
type HoverCardContentProps,
HoverCardPortal,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = withDefaults(
defineProps<{ class?: HTMLAttributes['class'] } & HoverCardContentProps>(),

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
PinInputRoot,
type PinInputRootEmits,
type PinInputRootProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & PinInputRootProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { Primitive, type PrimitiveProps, useForwardProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { Primitive, type PrimitiveProps, useForwardProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & PrimitiveProps
>();

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
PinInputInput,
type PinInputInputProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & PinInputInputProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
PopoverContent,
type PopoverContentEmits,
@@ -7,7 +8,8 @@ import {
PopoverPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
defineOptions({
inheritAttrs: false,

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
ScrollAreaCorner,
ScrollAreaRoot,
type ScrollAreaRootProps,
ScrollAreaViewport,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
import ScrollBar from './ScrollBar.vue';

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
ScrollAreaScrollbar,
type ScrollAreaScrollbarProps,
ScrollAreaThumb,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = withDefaults(
defineProps<{ class?: HTMLAttributes['class'] } & ScrollAreaScrollbarProps>(),

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
SelectContent,
type SelectContentEmits,
@@ -8,7 +9,8 @@ import {
SelectViewport,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
import { SelectScrollDownButton, SelectScrollUpButton } from '.';

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { SelectGroup, type SelectGroupProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { SelectGroup, type SelectGroupProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectGroupProps
>();

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { CheckIcon } from '@radix-icons/vue';
import {
SelectItem,
@@ -8,7 +9,8 @@ import {
SelectItemText,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectItemProps

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue';
import { cn } from '#/lib/utils';
import { SelectLabel, type SelectLabelProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectLabelProps
>();

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { ChevronDownIcon } from '@radix-icons/vue';
import {
SelectScrollDownButton,
type SelectScrollDownButtonProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectScrollDownButtonProps

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { ChevronUpIcon } from '@radix-icons/vue';
import {
SelectScrollUpButton,
type SelectScrollUpButtonProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectScrollUpButtonProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { SelectSeparator, type SelectSeparatorProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { SelectSeparator, type SelectSeparatorProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectSeparatorProps
>();

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import { CaretSortIcon } from '@radix-icons/vue';
import {
SelectIcon,
@@ -7,7 +8,8 @@ import {
type SelectTriggerProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SelectTriggerProps

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
DialogContent,
type DialogContentEmits,
@@ -8,7 +9,8 @@ import {
DialogPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
import { type SheetVariants, sheetVariants } from './sheet';

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { DialogDescription, type DialogDescriptionProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { DialogDescription, type DialogDescriptionProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DialogDescriptionProps
>();

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { DialogTitle, type DialogTitleProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { DialogTitle, type DialogTitleProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & DialogTitleProps
>();

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
SwitchRoot,
type SwitchRootEmits,
@@ -7,7 +8,8 @@ import {
SwitchThumb,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & SwitchRootProps

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { TabsContent, type TabsContentProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { TabsContent, type TabsContentProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & TabsContentProps
>();

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { TabsList, type TabsListProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { TabsList, type TabsListProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & TabsListProps
>();

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { TabsTrigger, type TabsTriggerProps, useForwardProps } from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { TabsTrigger, type TabsTriggerProps, useForwardProps } from 'radix-vue';
import { cn } from '#/lib/utils';
const props = defineProps<
{ class?: HTMLAttributes['class'] } & TabsTriggerProps
>();

View File

@@ -1,15 +1,18 @@
<script setup lang="ts">
import type { toggleVariants } from '#/components/ui/toggle';
import type { VariantProps } from 'class-variance-authority';
import { cn } from '#/lib/utils';
import type { toggleVariants } from '#/components/ui/toggle';
import { type HTMLAttributes, computed, provide } from 'vue';
import {
ToggleGroupRoot,
type ToggleGroupRootEmits,
type ToggleGroupRootProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed, provide } from 'vue';
import { cn } from '#/lib/utils';
type ToggleGroupVariants = VariantProps<typeof toggleVariants>;

View File

@@ -1,14 +1,16 @@
<script setup lang="ts">
import type { VariantProps } from 'class-variance-authority';
import { toggleVariants } from '#/components/ui/toggle';
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed, inject } from 'vue';
import {
ToggleGroupItem,
type ToggleGroupItemProps,
useForwardProps,
} from 'radix-vue';
import { type HTMLAttributes, computed, inject } from 'vue';
import { toggleVariants } from '#/components/ui/toggle';
import { cn } from '#/lib/utils';
type ToggleGroupVariants = VariantProps<typeof toggleVariants>;

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
Toggle,
type ToggleEmits,
type ToggleProps,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
import { type ToggleVariants, toggleVariants } from './toggle';

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { cn } from '#/lib/utils';
import { type HTMLAttributes, computed } from 'vue';
import {
TooltipContent,
type TooltipContentEmits,
@@ -7,7 +8,8 @@ import {
TooltipPortal,
useForwardPropsEmits,
} from 'radix-vue';
import { type HTMLAttributes, computed } from 'vue';
import { cn } from '#/lib/utils';
defineOptions({
inheritAttrs: false,

View File

@@ -1,13 +1,13 @@
<script setup lang="ts">
import type { TabItem } from '@vben-core/typings';
import { useNamespace } from '@vben-core/toolkit';
import type { TabsProps } from '../../interface';
import { computed, nextTick, onMounted, ref, watch } from 'vue';
import Tab from './tab.vue';
import { useNamespace } from '@vben-core/toolkit';
import type { TabsProps } from '../../interface';
import Tab from './tab.vue';
interface Props extends TabsProps {}