From 5f903dc27fd7a5f6c5863ab0ef066c8f3c4c155e Mon Sep 17 00:00:00 2001 From: Phojie Rengel Date: Sun, 27 Oct 2024 18:28:19 +0800 Subject: [PATCH] feat: add safelist to ts files --- components/common/alert/index.ts | 1 + components/common/badge/index.ts | 1 + components/common/navigation-menu/index.ts | 1 + components/common/sheet/index.ts | 1 + components/common/toast/index.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/components/common/alert/index.ts b/components/common/alert/index.ts index 5ac72f4..71498cc 100644 --- a/components/common/alert/index.ts +++ b/components/common/alert/index.ts @@ -4,6 +4,7 @@ export { default as Alert } from './Alert.vue' export { default as AlertDescription } from './AlertDescription.vue' export { default as AlertTitle } from './AlertTitle.vue' +// @unocss-include export const alertVariants = cva( 'relative w-full rounded-lg border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-base [&>svg~*]:pl-7', { diff --git a/components/common/badge/index.ts b/components/common/badge/index.ts index 246ca37..e488478 100644 --- a/components/common/badge/index.ts +++ b/components/common/badge/index.ts @@ -2,6 +2,7 @@ import { cva, type VariantProps } from 'class-variance-authority' export { default as Badge } from './Badge.vue' +// @unocss-include export const badgeVariants = cva( 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', { diff --git a/components/common/navigation-menu/index.ts b/components/common/navigation-menu/index.ts index 70b8fd0..afd44ff 100644 --- a/components/common/navigation-menu/index.ts +++ b/components/common/navigation-menu/index.ts @@ -7,6 +7,7 @@ export { default as NavigationMenuLink } from './NavigationMenuLink.vue' export { default as NavigationMenuList } from './NavigationMenuList.vue' export { default as NavigationMenuTrigger } from './NavigationMenuTrigger.vue' +// @unocss-include export const navigationMenuTriggerStyle = cva( 'group inline-flex h-10 w-max items-center justify-center rounded-md bg-base px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent focus:bg-accent focus:text-accent focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50', ) diff --git a/components/common/sheet/index.ts b/components/common/sheet/index.ts index a072e62..ca1f8c5 100644 --- a/components/common/sheet/index.ts +++ b/components/common/sheet/index.ts @@ -9,6 +9,7 @@ export { default as SheetHeader } from './SheetHeader.vue' export { default as SheetTitle } from './SheetTitle.vue' export { default as SheetTrigger } from './SheetTrigger.vue' +// @unocss-include export const sheetVariants = cva( 'fixed z-50 gap-4 bg-base p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out', { diff --git a/components/common/toast/index.ts b/components/common/toast/index.ts index 23bbb5f..8deec3c 100644 --- a/components/common/toast/index.ts +++ b/components/common/toast/index.ts @@ -13,6 +13,7 @@ export { default as ToastTitle } from './ToastTitle.vue' export { default as ToastViewport } from './ToastViewport.vue' export { toast, useToast } from './use-toast' +// @unocss-include export const toastVariants = cva( 'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 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', {