-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ZTL-UwU <zhangtianli2006@163.com>
- Loading branch information
Showing
16 changed files
with
143 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<template> | ||
<ToastAction v-bind="delegatedProps" :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> | ||
|
||
<script setup lang="ts"> | ||
import { type HTMLAttributes, computed } from 'vue' | ||
import { ToastAction, type ToastActionProps } from 'radix-vue' | ||
import { cn } from '@/lib/utils' | ||
import { type HTMLAttributes, computed } from 'vue'; | ||
import { ToastAction, type ToastActionProps } from 'radix-vue'; | ||
import { cn } from '@/lib/utils'; | ||
const props = defineProps<ToastActionProps & { class?: HTMLAttributes['class'] }>() | ||
const props = defineProps<ToastActionProps & { class?: HTMLAttributes['class'] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props | ||
const { class: _, ...delegated } = props; | ||
return delegated | ||
}) | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<ToastAction v-bind="delegatedProps" :class="cn('inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
<template> | ||
<ToastClose v-bind="delegatedProps" :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)"> | ||
<Icon name="lucide:x" class="h-4 w-4" /> | ||
</ToastClose> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { type HTMLAttributes, computed } from 'vue' | ||
import { ToastClose, type ToastCloseProps } from 'radix-vue' | ||
import { X } from 'lucide-vue-next' | ||
import { cn } from '@/lib/utils' | ||
import { type HTMLAttributes, computed } from 'vue'; | ||
import { ToastClose, type ToastCloseProps } from 'radix-vue'; | ||
import { cn } from '@/lib/utils'; | ||
const props = defineProps<ToastCloseProps & { | ||
class?: HTMLAttributes['class'] | ||
}>() | ||
class?: HTMLAttributes['class']; | ||
}>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props | ||
const { class: _, ...delegated } = props; | ||
return delegated | ||
}) | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<ToastClose v-bind="delegatedProps" :class="cn('absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 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)"> | ||
<X class="h-4 w-4" /> | ||
</ToastClose> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<template> | ||
<ToastDescription :class="cn('text-sm opacity-90', props.class)" v-bind="delegatedProps"> | ||
<slot /> | ||
</ToastDescription> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { type HTMLAttributes, computed } from 'vue' | ||
import { ToastDescription, type ToastDescriptionProps } from 'radix-vue' | ||
import { cn } from '@/lib/utils' | ||
import { type HTMLAttributes, computed } from 'vue'; | ||
import { ToastDescription, type ToastDescriptionProps } from 'radix-vue'; | ||
import { cn } from '@/lib/utils'; | ||
const props = defineProps<ToastDescriptionProps & { class?: HTMLAttributes['class'] }>() | ||
const props = defineProps<ToastDescriptionProps & { class?: HTMLAttributes['class'] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props | ||
const { class: _, ...delegated } = props; | ||
return delegated | ||
}) | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<ToastDescription :class="cn('text-sm opacity-90', props.class)" v-bind="delegatedProps"> | ||
<slot /> | ||
</ToastDescription> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { ToastProvider, type ToastProviderProps } from 'radix-vue' | ||
const props = defineProps<ToastProviderProps>() | ||
</script> | ||
|
||
<template> | ||
<ToastProvider v-bind="props"> | ||
<slot /> | ||
</ToastProvider> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ToastProvider, type ToastProviderProps } from 'radix-vue'; | ||
const props = defineProps<ToastProviderProps>(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<template> | ||
<ToastTitle v-bind="delegatedProps" :class="cn('text-sm font-semibold [&+div]:text-xs', props.class)"> | ||
<slot /> | ||
</ToastTitle> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { type HTMLAttributes, computed } from 'vue' | ||
import { ToastTitle, type ToastTitleProps } from 'radix-vue' | ||
import { cn } from '@/lib/utils' | ||
import { type HTMLAttributes, computed } from 'vue'; | ||
import { ToastTitle, type ToastTitleProps } from 'radix-vue'; | ||
import { cn } from '@/lib/utils'; | ||
const props = defineProps<ToastTitleProps & { class?: HTMLAttributes['class'] }>() | ||
const props = defineProps<ToastTitleProps & { class?: HTMLAttributes['class'] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props | ||
const { class: _, ...delegated } = props; | ||
return delegated | ||
}) | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<ToastTitle v-bind="delegatedProps" :class="cn('text-sm font-semibold', props.class)"> | ||
<slot /> | ||
</ToastTitle> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<template> | ||
<ToastViewport v-bind="delegatedProps" :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> | ||
|
||
<script setup lang="ts"> | ||
import { type HTMLAttributes, computed } from 'vue' | ||
import { ToastViewport, type ToastViewportProps } from 'radix-vue' | ||
import { cn } from '@/lib/utils' | ||
import { type HTMLAttributes, computed } from 'vue'; | ||
import { ToastViewport, type ToastViewportProps } from 'radix-vue'; | ||
import { cn } from '@/lib/utils'; | ||
const props = defineProps<ToastViewportProps & { class?: HTMLAttributes['class'] }>() | ||
const props = defineProps<ToastViewportProps & { class?: HTMLAttributes['class'] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props | ||
const { class: _, ...delegated } = props; | ||
return delegated | ||
}) | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<ToastViewport v-bind="delegatedProps" :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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.