UNPKG

@nuxt/ui

Version:

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.

71 lines (70 loc) 2.24 kB
const side = [ "top", "right", "bottom", "left" ] as const export default { "slots": { "overlay": "fixed inset-0 bg-(--ui-bg-elevated)/75", "content": "fixed bg-(--ui-bg) divide-y divide-(--ui-border) sm:ring ring-(--ui-border) sm:shadow-lg flex flex-col focus:outline-none", "header": "flex items-center gap-1.5 p-4 sm:px-6 min-h-16", "wrapper": "", "body": "flex-1 overflow-y-auto p-4 sm:p-6", "footer": "flex items-center gap-1.5 p-4 sm:px-6", "title": "text-(--ui-text-highlighted) font-semibold", "description": "mt-1 text-(--ui-text-muted) text-sm", "close": "absolute top-4 end-4" }, "variants": { "side": { "top": { "content": "inset-x-0 top-0 max-h-full" }, "right": { "content": "right-0 inset-y-0 w-full max-w-md" }, "bottom": { "content": "inset-x-0 bottom-0 max-h-full" }, "left": { "content": "left-0 inset-y-0 w-full max-w-md" } }, "transition": { "true": { "overlay": "data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]" } } }, "compoundVariants": [ { "transition": true, "side": "top" as typeof side[number], "class": { "content": "data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-top_200ms_ease-in-out]" } }, { "transition": true, "side": "right" as typeof side[number], "class": { "content": "data-[state=open]:animate-[slide-in-from-right_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-right_200ms_ease-in-out]" } }, { "transition": true, "side": "bottom" as typeof side[number], "class": { "content": "data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-bottom_200ms_ease-in-out]" } }, { "transition": true, "side": "left" as typeof side[number], "class": { "content": "data-[state=open]:animate-[slide-in-from-left_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-left_200ms_ease-in-out]" } } ] }