UPD: Linting
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
src/renderer/src/components/ui/.eslintrc
Normal file
5
src/renderer/src/components/ui/.eslintrc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-unused-vars": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,19 +7,18 @@ export const badgeVariants = cva(
|
|||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default:
|
default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
||||||
'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
|
||||||
secondary:
|
secondary:
|
||||||
'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||||
destructive:
|
destructive:
|
||||||
'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
||||||
outline: 'text-foreground',
|
outline: 'text-foreground'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: 'default',
|
variant: 'default'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
export type BadgeVariants = VariantProps<typeof badgeVariants>
|
export type BadgeVariants = VariantProps<typeof badgeVariants>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ interface Props extends PrimitiveProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
as: 'button',
|
as: 'button'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,27 +8,25 @@ export const buttonVariants = cva(
|
|||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
|
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
|
||||||
destructive:
|
destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
|
||||||
'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
|
|
||||||
outline:
|
outline:
|
||||||
'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
|
'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
|
||||||
secondary:
|
secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
|
||||||
'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
|
|
||||||
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
||||||
link: 'text-primary underline-offset-4 hover:underline',
|
link: 'text-primary underline-offset-4 hover:underline'
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: 'h-9 px-4 py-2',
|
default: 'h-9 px-4 py-2',
|
||||||
sm: 'h-8 rounded-md px-3 text-xs',
|
sm: 'h-8 rounded-md px-3 text-xs',
|
||||||
lg: 'h-10 rounded-md px-8',
|
lg: 'h-10 rounded-md px-8',
|
||||||
icon: 'h-9 w-9',
|
icon: 'size-9'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: 'default',
|
variant: 'default',
|
||||||
size: 'default',
|
size: 'default'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
export type ButtonVariants = VariantProps<typeof buttonVariants>
|
export type ButtonVariants = VariantProps<typeof buttonVariants>
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ const props = defineProps<CollapsibleContentProps>()
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CollapsibleContent v-bind="props" class="overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down">
|
<CollapsibleContent
|
||||||
|
v-bind="props"
|
||||||
|
class="overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</CollapsibleContent>
|
</CollapsibleContent>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { cn } from '@renderer/lib/utils'
|
|||||||
|
|
||||||
const props = withDefaults(defineProps<ComboboxRootProps & { class?: HTMLAttributes['class'] }>(), {
|
const props = withDefaults(defineProps<ComboboxRootProps & { class?: HTMLAttributes['class'] }>(), {
|
||||||
open: true,
|
open: true,
|
||||||
modelValue: '',
|
modelValue: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
const emits = defineEmits<ComboboxRootEmits>()
|
const emits = defineEmits<ComboboxRootEmits>()
|
||||||
@@ -23,7 +23,12 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
<template>
|
<template>
|
||||||
<ComboboxRoot
|
<ComboboxRoot
|
||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
:class="cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', props.class)"
|
:class="
|
||||||
|
cn(
|
||||||
|
'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',
|
||||||
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</ComboboxRoot>
|
</ComboboxRoot>
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ const forwarded = useForwardPropsEmits(props, emits)
|
|||||||
<template>
|
<template>
|
||||||
<Dialog v-bind="forwarded">
|
<Dialog v-bind="forwarded">
|
||||||
<DialogContent class="overflow-hidden p-0 shadow-lg">
|
<DialogContent class="overflow-hidden p-0 shadow-lg">
|
||||||
<Command class="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
<Command
|
||||||
|
class="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5"
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</Command>
|
</Command>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ import type { ComboboxGroupProps } from 'radix-vue'
|
|||||||
import { ComboboxGroup, ComboboxLabel } from 'radix-vue'
|
import { ComboboxGroup, ComboboxLabel } from 'radix-vue'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<ComboboxGroupProps & {
|
const props = defineProps<
|
||||||
class?: HTMLAttributes['class']
|
ComboboxGroupProps & {
|
||||||
heading?: string
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
heading?: string
|
||||||
|
}
|
||||||
|
>()
|
||||||
|
|
||||||
const delegatedProps = computed(() => {
|
const delegatedProps = computed(() => {
|
||||||
const { class: _, ...delegated } = props
|
const { class: _, ...delegated } = props
|
||||||
@@ -19,7 +21,12 @@ const delegatedProps = computed(() => {
|
|||||||
<template>
|
<template>
|
||||||
<ComboboxGroup
|
<ComboboxGroup
|
||||||
v-bind="delegatedProps"
|
v-bind="delegatedProps"
|
||||||
:class="cn('overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground', props.class)"
|
:class="
|
||||||
|
cn(
|
||||||
|
'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',
|
||||||
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<ComboboxLabel v-if="heading" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
|
<ComboboxLabel v-if="heading" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
|
||||||
{{ heading }}
|
{{ heading }}
|
||||||
|
|||||||
@@ -5,12 +5,14 @@ import { ComboboxInput, type ComboboxInputProps, useForwardProps } from 'radix-v
|
|||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps<ComboboxInputProps & {
|
const props = defineProps<
|
||||||
class?: HTMLAttributes['class']
|
ComboboxInputProps & {
|
||||||
}>()
|
class?: HTMLAttributes['class']
|
||||||
|
}
|
||||||
|
>()
|
||||||
|
|
||||||
const delegatedProps = computed(() => {
|
const delegatedProps = computed(() => {
|
||||||
const { class: _, ...delegated } = props
|
const { class: _, ...delegated } = props
|
||||||
@@ -23,11 +25,16 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex items-center border-b px-3" cmdk-input-wrapper>
|
<div class="flex items-center border-b px-3" cmdk-input-wrapper>
|
||||||
<MagnifyingGlassIcon class="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
<MagnifyingGlassIcon class="mr-2 size-4 shrink-0 opacity-50" />
|
||||||
<ComboboxInput
|
<ComboboxInput
|
||||||
v-bind="{ ...forwardedProps, ...$attrs }"
|
v-bind="{ ...forwardedProps, ...$attrs }"
|
||||||
auto-focus
|
auto-focus
|
||||||
:class="cn('flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', props.class)"
|
:class="
|
||||||
|
cn(
|
||||||
|
'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
|
||||||
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
<template>
|
<template>
|
||||||
<ComboboxItem
|
<ComboboxItem
|
||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
:class="cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50', props.class)"
|
:class="
|
||||||
|
cn(
|
||||||
|
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
||||||
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</ComboboxItem>
|
</ComboboxItem>
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ComboboxContent v-bind="forwarded" :class="cn('max-h-[300px] overflow-y-auto overflow-x-hidden', props.class)">
|
<ComboboxContent
|
||||||
|
v-bind="forwarded"
|
||||||
|
:class="cn('max-h-[300px] overflow-y-auto overflow-x-hidden', props.class)"
|
||||||
|
>
|
||||||
<div role="presentation">
|
<div role="presentation">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,10 +14,7 @@ const delegatedProps = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ComboboxSeparator
|
<ComboboxSeparator v-bind="delegatedProps" :class="cn('-mx-1 h-px bg-border', props.class)">
|
||||||
v-bind="delegatedProps"
|
|
||||||
:class="cn('-mx-1 h-px bg-border', props.class)"
|
|
||||||
>
|
|
||||||
<slot />
|
<slot />
|
||||||
</ComboboxSeparator>
|
</ComboboxSeparator>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DialogRoot, type DialogRootEmits, type DialogRootProps, useForwardPropsEmits } from 'radix-vue'
|
import {
|
||||||
|
DialogRoot,
|
||||||
|
type DialogRootEmits,
|
||||||
|
type DialogRootProps,
|
||||||
|
useForwardPropsEmits
|
||||||
|
} from 'radix-vue'
|
||||||
|
|
||||||
const props = defineProps<DialogRootProps>()
|
const props = defineProps<DialogRootProps>()
|
||||||
const emits = defineEmits<DialogRootEmits>()
|
const emits = defineEmits<DialogRootEmits>()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
type DialogContentProps,
|
type DialogContentProps,
|
||||||
DialogOverlay,
|
DialogOverlay,
|
||||||
DialogPortal,
|
DialogPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
import { Cross2Icon } from '@radix-icons/vue'
|
import { Cross2Icon } from '@radix-icons/vue'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
@@ -27,22 +27,23 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
<template>
|
<template>
|
||||||
<DialogPortal>
|
<DialogPortal>
|
||||||
<DialogOverlay
|
<DialogOverlay
|
||||||
class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
||||||
/>
|
/>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
|
'fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
|
||||||
props.class,
|
props.class
|
||||||
)"
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<DialogClose
|
<DialogClose
|
||||||
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
||||||
>
|
>
|
||||||
<Cross2Icon class="w-4 h-4" />
|
<Cross2Icon class="size-4" />
|
||||||
<span class="sr-only">Close</span>
|
<span class="sr-only">Close</span>
|
||||||
</DialogClose>
|
</DialogClose>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
type DialogContentProps,
|
type DialogContentProps,
|
||||||
DialogOverlay,
|
DialogOverlay,
|
||||||
DialogPortal,
|
DialogPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
import { X } from 'lucide-vue-next'
|
import { X } from 'lucide-vue-next'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
@@ -27,30 +27,35 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
<template>
|
<template>
|
||||||
<DialogPortal>
|
<DialogPortal>
|
||||||
<DialogOverlay
|
<DialogOverlay
|
||||||
class="fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
class="fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
||||||
>
|
>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full',
|
'relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full',
|
||||||
props.class,
|
props.class
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
@pointer-down-outside="(event) => {
|
@pointer-down-outside="
|
||||||
const originalEvent = event.detail.originalEvent;
|
(event) => {
|
||||||
const target = originalEvent.target as HTMLElement;
|
const originalEvent = event.detail.originalEvent
|
||||||
if (originalEvent.offsetX > target.clientWidth || originalEvent.offsetY > target.clientHeight) {
|
const target = originalEvent.target as HTMLElement
|
||||||
event.preventDefault();
|
if (
|
||||||
|
originalEvent.offsetX > target.clientWidth ||
|
||||||
|
originalEvent.offsetY > target.clientHeight
|
||||||
|
) {
|
||||||
|
event.preventDefault()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}"
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<DialogClose
|
<DialogClose
|
||||||
class="absolute top-4 right-4 p-0.5 transition-colors rounded-md hover:bg-secondary"
|
class="absolute right-4 top-4 rounded-md p-0.5 transition-colors hover:bg-secondary"
|
||||||
>
|
>
|
||||||
<Cross2Icon class="w-4 h-4" />
|
<Cross2Icon class="size-4" />
|
||||||
<span class="sr-only">Close</span>
|
<span class="sr-only">Close</span>
|
||||||
</DialogClose>
|
</DialogClose>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -17,12 +17,7 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||||||
<template>
|
<template>
|
||||||
<DialogTitle
|
<DialogTitle
|
||||||
v-bind="forwardedProps"
|
v-bind="forwardedProps"
|
||||||
:class="
|
:class="cn('text-lg font-semibold leading-none tracking-tight', props.class)"
|
||||||
cn(
|
|
||||||
'text-lg font-semibold leading-none tracking-tight',
|
|
||||||
props.class,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DropdownMenuRoot, type DropdownMenuRootEmits, type DropdownMenuRootProps, useForwardPropsEmits } from 'radix-vue'
|
import {
|
||||||
|
DropdownMenuRoot,
|
||||||
|
type DropdownMenuRootEmits,
|
||||||
|
type DropdownMenuRootProps,
|
||||||
|
useForwardPropsEmits
|
||||||
|
} from 'radix-vue'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuRootProps>()
|
const props = defineProps<DropdownMenuRootProps>()
|
||||||
const emits = defineEmits<DropdownMenuRootEmits>()
|
const emits = defineEmits<DropdownMenuRootEmits>()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
type DropdownMenuCheckboxItemEmits,
|
type DropdownMenuCheckboxItemEmits,
|
||||||
type DropdownMenuCheckboxItemProps,
|
type DropdownMenuCheckboxItemProps,
|
||||||
DropdownMenuItemIndicator,
|
DropdownMenuItemIndicator,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
import { CheckIcon } from '@radix-icons/vue'
|
import { CheckIcon } from '@radix-icons/vue'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
@@ -25,14 +25,16 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
<template>
|
<template>
|
||||||
<DropdownMenuCheckboxItem
|
<DropdownMenuCheckboxItem
|
||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
:class=" cn(
|
:class="
|
||||||
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
cn(
|
||||||
props.class,
|
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors 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">
|
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
||||||
<DropdownMenuItemIndicator>
|
<DropdownMenuItemIndicator>
|
||||||
<CheckIcon class="w-4 h-4" />
|
<CheckIcon class="size-4" />
|
||||||
</DropdownMenuItemIndicator>
|
</DropdownMenuItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import {
|
|||||||
type DropdownMenuContentEmits,
|
type DropdownMenuContentEmits,
|
||||||
type DropdownMenuContentProps,
|
type DropdownMenuContentProps,
|
||||||
DropdownMenuPortal,
|
DropdownMenuPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
|
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
|
||||||
{
|
{
|
||||||
sideOffset: 4,
|
sideOffset: 4
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
const emits = defineEmits<DropdownMenuContentEmits>()
|
const emits = defineEmits<DropdownMenuContentEmits>()
|
||||||
|
|
||||||
@@ -30,7 +30,12 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
<DropdownMenuPortal>
|
<DropdownMenuPortal>
|
||||||
<DropdownMenuContent
|
<DropdownMenuContent
|
||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
:class="cn('z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 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', props.class)"
|
:class="
|
||||||
|
cn(
|
||||||
|
'z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 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',
|
||||||
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ import { type HTMLAttributes, computed } from 'vue'
|
|||||||
import { DropdownMenuItem, type DropdownMenuItemProps, useForwardProps } from 'radix-vue'
|
import { DropdownMenuItem, type DropdownMenuItemProps, useForwardProps } from 'radix-vue'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes['class']; inset?: boolean }>()
|
const props = defineProps<
|
||||||
|
DropdownMenuItemProps & { class?: HTMLAttributes['class']; inset?: boolean }
|
||||||
|
>()
|
||||||
|
|
||||||
const delegatedProps = computed(() => {
|
const delegatedProps = computed(() => {
|
||||||
const { class: _, ...delegated } = props
|
const { class: _, ...delegated } = props
|
||||||
@@ -17,11 +19,13 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||||||
<template>
|
<template>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
v-bind="forwardedProps"
|
v-bind="forwardedProps"
|
||||||
:class="cn(
|
:class="
|
||||||
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
cn(
|
||||||
inset && 'pl-8',
|
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
||||||
props.class,
|
inset && 'pl-8',
|
||||||
)"
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
DropdownMenuRadioGroup,
|
DropdownMenuRadioGroup,
|
||||||
type DropdownMenuRadioGroupEmits,
|
type DropdownMenuRadioGroupEmits,
|
||||||
type DropdownMenuRadioGroupProps,
|
type DropdownMenuRadioGroupProps,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuRadioGroupProps>()
|
const props = defineProps<DropdownMenuRadioGroupProps>()
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
||||||
<DropdownMenuItemIndicator>
|
<DropdownMenuItemIndicator>
|
||||||
<DotFilledIcon class="h-4 w-4 fill-current" />
|
<DotFilledIcon class="size-4 fill-current" />
|
||||||
</DropdownMenuItemIndicator>
|
</DropdownMenuItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { type HTMLAttributes, computed } from 'vue'
|
import { type HTMLAttributes, computed } from 'vue'
|
||||||
import {
|
import { DropdownMenuSeparator, type DropdownMenuSeparatorProps } from 'radix-vue'
|
||||||
DropdownMenuSeparator,
|
|
||||||
type DropdownMenuSeparatorProps,
|
|
||||||
} from 'radix-vue'
|
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuSeparatorProps & {
|
const props = defineProps<
|
||||||
class?: HTMLAttributes['class']
|
DropdownMenuSeparatorProps & {
|
||||||
}>()
|
class?: HTMLAttributes['class']
|
||||||
|
}
|
||||||
|
>()
|
||||||
|
|
||||||
const delegatedProps = computed(() => {
|
const delegatedProps = computed(() => {
|
||||||
const { class: _, ...delegated } = props
|
const { class: _, ...delegated } = props
|
||||||
@@ -18,5 +17,8 @@ const delegatedProps = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DropdownMenuSeparator v-bind="delegatedProps" :class="cn('-mx-1 my-1 h-px bg-muted', props.class)" />
|
<DropdownMenuSeparator
|
||||||
|
v-bind="delegatedProps"
|
||||||
|
:class="cn('-mx-1 my-1 h-px bg-muted', props.class)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
DropdownMenuSub,
|
DropdownMenuSub,
|
||||||
type DropdownMenuSubEmits,
|
type DropdownMenuSubEmits,
|
||||||
type DropdownMenuSubProps,
|
type DropdownMenuSubProps,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuSubProps>()
|
const props = defineProps<DropdownMenuSubProps>()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { type HTMLAttributes, computed } from 'vue'
|
|||||||
import {
|
import {
|
||||||
DropdownMenuSubTrigger,
|
DropdownMenuSubTrigger,
|
||||||
type DropdownMenuSubTriggerProps,
|
type DropdownMenuSubTriggerProps,
|
||||||
useForwardProps,
|
useForwardProps
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
import { ChevronRightIcon } from '@radix-icons/vue'
|
import { ChevronRightIcon } from '@radix-icons/vue'
|
||||||
import { cn } from '@renderer/lib/utils'
|
import { cn } from '@renderer/lib/utils'
|
||||||
@@ -22,12 +22,14 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||||||
<template>
|
<template>
|
||||||
<DropdownMenuSubTrigger
|
<DropdownMenuSubTrigger
|
||||||
v-bind="forwardedProps"
|
v-bind="forwardedProps"
|
||||||
:class="cn(
|
:class="
|
||||||
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',
|
cn(
|
||||||
props.class,
|
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',
|
||||||
)"
|
props.class
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
<ChevronRightIcon class="ml-auto h-4 w-4" />
|
<ChevronRightIcon class="ml-auto size-4" />
|
||||||
</DropdownMenuSubTrigger>
|
</DropdownMenuSubTrigger>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
||||||
<MenubarItemIndicator>
|
<MenubarItemIndicator>
|
||||||
<CheckIcon class="w-4 h-4" />
|
<CheckIcon class="size-4" />
|
||||||
</MenubarItemIndicator>
|
</MenubarItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
MenubarRadioGroup,
|
MenubarRadioGroup,
|
||||||
type MenubarRadioGroupEmits,
|
type MenubarRadioGroupEmits,
|
||||||
type MenubarRadioGroupProps,
|
type MenubarRadioGroupProps,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
|
|
||||||
const props = defineProps<MenubarRadioGroupProps>()
|
const props = defineProps<MenubarRadioGroupProps>()
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
||||||
<MenubarItemIndicator>
|
<MenubarItemIndicator>
|
||||||
<DotFilledIcon class="h-4 w-4 fill-current" />
|
<DotFilledIcon class="size-4 fill-current" />
|
||||||
</MenubarItemIndicator>
|
</MenubarItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
<ChevronRightIcon class="ml-auto h-4 w-4" />
|
<ChevronRightIcon class="ml-auto size-4" />
|
||||||
</MenubarSubTrigger>
|
</MenubarSubTrigger>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|||||||
v-bind="forwarded"
|
v-bind="forwarded"
|
||||||
>
|
>
|
||||||
<SliderTrack
|
<SliderTrack
|
||||||
class="flex h-2 w-full grow overflow-hidden rounded-full bg-primary/20 items-center transition-all duration-75"
|
class="flex h-2 w-full grow items-center overflow-hidden rounded-full bg-primary/20 transition-all duration-75"
|
||||||
>
|
>
|
||||||
<SliderRange class="absolute h-1.5 bg-primary rounded-full" />
|
<SliderRange class="absolute h-1.5 rounded-full bg-primary" />
|
||||||
</SliderTrack>
|
</SliderTrack>
|
||||||
<SliderThumb
|
<SliderThumb
|
||||||
class="flex h-6 w-8 rounded-[8px] hover:bg-zinc-200 border border-zinc-100 bg-zinc-300 transition-all duration-75 focus-visible:outline-none focus-visible:ring-1 cursor-pointer focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 text-zinc-600 justify-center items-center"
|
class="flex h-6 w-8 cursor-pointer items-center justify-center rounded-[8px] border border-zinc-100 bg-zinc-300 text-zinc-600 transition-all duration-75 hover:bg-zinc-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
||||||
style="box-shadow: -3px 0 15px 0 rgba(0, 0, 0, 0.6)"
|
style="box-shadow: -3px 0 15px 0 rgba(0, 0, 0, 0.6)"
|
||||||
>
|
>
|
||||||
<MoreHorizontal class="h-full" />
|
<MoreHorizontal class="h-full" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { type ClassValue, clsx } from 'clsx'
|
import { type ClassValue, clsx } from 'clsx'
|
||||||
import { twMerge } from 'tailwind-merge'
|
import { twMerge } from 'tailwind-merge'
|
||||||
import { camelize, getCurrentInstance, toHandlerKey } from 'vue'
|
// import { camelize, getCurrentInstance, toHandlerKey } from 'vue'
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs))
|
return twMerge(clsx(inputs))
|
||||||
|
|||||||
@@ -1,92 +1,92 @@
|
|||||||
const animate = require("tailwindcss-animate")
|
const animate = require('tailwindcss-animate')
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
darkMode: ["class"],
|
darkMode: ['class'],
|
||||||
safelist: ["dark"],
|
safelist: ['dark'],
|
||||||
|
|
||||||
content: [
|
content: [
|
||||||
'./pages/**/*.{ts,tsx,vue}',
|
'./pages/**/*.{ts,tsx,vue}',
|
||||||
'./components/**/*.{ts,tsx,vue}',
|
'./components/**/*.{ts,tsx,vue}',
|
||||||
'./app/**/*.{ts,tsx,vue}',
|
'./app/**/*.{ts,tsx,vue}',
|
||||||
'./src/**/*.{ts,tsx,vue}',
|
'./src/**/*.{ts,tsx,vue}'
|
||||||
],
|
],
|
||||||
|
|
||||||
theme: {
|
theme: {
|
||||||
container: {
|
container: {
|
||||||
center: true,
|
center: true,
|
||||||
padding: "2rem",
|
padding: '2rem',
|
||||||
screens: {
|
screens: {
|
||||||
"2xl": "1400px",
|
'2xl': '1400px'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
border: "hsl(var(--border))",
|
border: 'hsl(var(--border))',
|
||||||
input: "hsl(var(--input))",
|
input: 'hsl(var(--input))',
|
||||||
ring: "hsl(var(--ring))",
|
ring: 'hsl(var(--ring))',
|
||||||
background: "hsl(var(--background))",
|
background: 'hsl(var(--background))',
|
||||||
foreground: "hsl(var(--foreground))",
|
foreground: 'hsl(var(--foreground))',
|
||||||
primary: {
|
primary: {
|
||||||
DEFAULT: "hsl(var(--primary))",
|
DEFAULT: 'hsl(var(--primary))',
|
||||||
foreground: "hsl(var(--primary-foreground))",
|
foreground: 'hsl(var(--primary-foreground))'
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
DEFAULT: "hsl(var(--secondary))",
|
DEFAULT: 'hsl(var(--secondary))',
|
||||||
foreground: "hsl(var(--secondary-foreground))",
|
foreground: 'hsl(var(--secondary-foreground))'
|
||||||
},
|
},
|
||||||
destructive: {
|
destructive: {
|
||||||
DEFAULT: "hsl(var(--destructive))",
|
DEFAULT: 'hsl(var(--destructive))',
|
||||||
foreground: "hsl(var(--destructive-foreground))",
|
foreground: 'hsl(var(--destructive-foreground))'
|
||||||
},
|
},
|
||||||
muted: {
|
muted: {
|
||||||
DEFAULT: "hsl(var(--muted))",
|
DEFAULT: 'hsl(var(--muted))',
|
||||||
foreground: "hsl(var(--muted-foreground))",
|
foreground: 'hsl(var(--muted-foreground))'
|
||||||
},
|
},
|
||||||
accent: {
|
accent: {
|
||||||
DEFAULT: "hsl(var(--accent))",
|
DEFAULT: 'hsl(var(--accent))',
|
||||||
foreground: "hsl(var(--accent-foreground))",
|
foreground: 'hsl(var(--accent-foreground))'
|
||||||
},
|
},
|
||||||
popover: {
|
popover: {
|
||||||
DEFAULT: "hsl(var(--popover))",
|
DEFAULT: 'hsl(var(--popover))',
|
||||||
foreground: "hsl(var(--popover-foreground))",
|
foreground: 'hsl(var(--popover-foreground))'
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
DEFAULT: "hsl(var(--card))",
|
DEFAULT: 'hsl(var(--card))',
|
||||||
foreground: "hsl(var(--card-foreground))",
|
foreground: 'hsl(var(--card-foreground))'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
xl: "calc(var(--radius) + 4px)",
|
xl: 'calc(var(--radius) + 4px)',
|
||||||
lg: "var(--radius)",
|
lg: 'var(--radius)',
|
||||||
md: "calc(var(--radius) - 2px)",
|
md: 'calc(var(--radius) - 2px)',
|
||||||
sm: "calc(var(--radius) - 4px)",
|
sm: 'calc(var(--radius) - 4px)'
|
||||||
},
|
},
|
||||||
keyframes: {
|
keyframes: {
|
||||||
"accordion-down": {
|
'accordion-down': {
|
||||||
from: { height: 0 },
|
from: { height: 0 },
|
||||||
to: { height: "var(--radix-accordion-content-height)" },
|
to: { height: 'var(--radix-accordion-content-height)' }
|
||||||
},
|
},
|
||||||
"accordion-up": {
|
'accordion-up': {
|
||||||
from: { height: "var(--radix-accordion-content-height)" },
|
from: { height: 'var(--radix-accordion-content-height)' },
|
||||||
to: { height: 0 },
|
to: { height: 0 }
|
||||||
},
|
},
|
||||||
"collapsible-down": {
|
'collapsible-down': {
|
||||||
from: { height: 0 },
|
from: { height: 0 },
|
||||||
to: { height: 'var(--radix-collapsible-content-height)' },
|
to: { height: 'var(--radix-collapsible-content-height)' }
|
||||||
},
|
},
|
||||||
"collapsible-up": {
|
'collapsible-up': {
|
||||||
from: { height: 'var(--radix-collapsible-content-height)' },
|
from: { height: 'var(--radix-collapsible-content-height)' },
|
||||||
to: { height: 0 },
|
to: { height: 0 }
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
animation: {
|
animation: {
|
||||||
"accordion-down": "accordion-down 0.2s ease-out",
|
'accordion-down': 'accordion-down 0.2s ease-out',
|
||||||
"accordion-up": "accordion-up 0.2s ease-out",
|
'accordion-up': 'accordion-up 0.2s ease-out',
|
||||||
"collapsible-down": "collapsible-down 0.2s ease-in-out",
|
'collapsible-down': 'collapsible-down 0.2s ease-in-out',
|
||||||
"collapsible-up": "collapsible-up 0.2s ease-in-out",
|
'collapsible-up': 'collapsible-up 0.2s ease-in-out'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
plugins: [animate],
|
plugins: [animate]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user