@nullpixel/ui
Version:
A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
297 lines (292 loc) • 7.88 kB
text/typescript
const animation = [
"carousel",
"carousel-inverse",
"swing",
"elastic"
] as const
const color = [
"primary",
"secondary",
"success",
"info",
"warning",
"error",
"neutral"
] as const
const size = [
"2xs",
"xs",
"sm",
"md",
"lg",
"xl",
"2xl"
] as const
const step = [
"active",
"first",
"other",
"last"
] as const
const orientation = [
"horizontal",
"vertical"
] as const
export default {
"slots": {
"root": "gap-2",
"base": "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
"indicator": "rounded-full size-full transition-transform duration-200 ease-out",
"status": "flex justify-end text-(--ui-text-dimmed) transition-[width] duration-200",
"steps": "grid items-end",
"step": "truncate text-end row-start-1 col-start-1 transition-opacity" as typeof step[number]
},
"variants": {
"animation": {
"carousel": "",
"carousel-inverse": "",
"swing": "",
"elastic": ""
},
"color": {
"primary": {
"indicator": "bg-(--ui-primary)",
"steps": "text-(--ui-primary)"
},
"secondary": {
"indicator": "bg-(--ui-secondary)",
"steps": "text-(--ui-secondary)"
},
"success": {
"indicator": "bg-(--ui-success)",
"steps": "text-(--ui-success)"
},
"info": {
"indicator": "bg-(--ui-info)",
"steps": "text-(--ui-info)"
},
"warning": {
"indicator": "bg-(--ui-warning)",
"steps": "text-(--ui-warning)"
},
"error": {
"indicator": "bg-(--ui-error)",
"steps": "text-(--ui-error)"
},
"neutral": {
"indicator": "bg-(--ui-bg-inverted)",
"steps": "text-(--ui-bg)"
}
},
"size": {
"2xs": {
"status": "text-xs",
"steps": "text-xs"
},
"xs": {
"status": "text-xs",
"steps": "text-xs"
},
"sm": {
"status": "text-sm",
"steps": "text-sm"
},
"md": {
"status": "text-sm",
"steps": "text-sm"
},
"lg": {
"status": "text-sm",
"steps": "text-sm"
},
"xl": {
"status": "text-base",
"steps": "text-base"
},
"2xl": {
"status": "text-base",
"steps": "text-base"
}
},
"step": {
"active": {
"step": "opacity-100" as typeof step[number]
},
"first": {
"step": "opacity-100 text-(--ui-text-muted)" as typeof step[number]
},
"other": {
"step": "opacity-0" as typeof step[number]
},
"last": {
"step": ""
}
},
"orientation": {
"horizontal": {
"root": "w-full flex flex-col",
"base": "w-full",
"status": "flex-row"
},
"vertical": {
"root": "h-full flex flex-row-reverse",
"base": "h-full",
"status": "flex-col"
}
},
"inverted": {
"true": {
"status": "self-end"
}
}
},
"compoundVariants": [
{
"inverted": true,
"orientation": "horizontal" as typeof orientation[number],
"class": {
"step": "text-start" as typeof step[number],
"status": "flex-row-reverse"
}
},
{
"inverted": true,
"orientation": "vertical" as typeof orientation[number],
"class": {
"steps": "items-start",
"status": "flex-col-reverse"
}
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "2xs" as typeof size[number],
"class": "h-px"
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "xs" as typeof size[number],
"class": "h-0.5"
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "sm" as typeof size[number],
"class": "h-1"
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "md" as typeof size[number],
"class": "h-2"
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "lg" as typeof size[number],
"class": "h-3"
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "xl" as typeof size[number],
"class": "h-4"
},
{
"orientation": "horizontal" as typeof orientation[number],
"size": "2xl" as typeof size[number],
"class": "h-5"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "2xs" as typeof size[number],
"class": "w-px"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "xs" as typeof size[number],
"class": "w-0.5"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "sm" as typeof size[number],
"class": "w-1"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "md" as typeof size[number],
"class": "w-2"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "lg" as typeof size[number],
"class": "w-3"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "xl" as typeof size[number],
"class": "w-4"
},
{
"orientation": "vertical" as typeof orientation[number],
"size": "2xl" as typeof size[number],
"class": "w-5"
},
{
"orientation": "horizontal" as typeof orientation[number],
"animation": "carousel" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_ease-in-out_infinite]"
}
},
{
"orientation": "vertical" as typeof orientation[number],
"animation": "carousel" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[carousel-vertical_2s_ease-in-out_infinite]"
}
},
{
"orientation": "horizontal" as typeof orientation[number],
"animation": "carousel-inverse" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[carousel-inverse_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"
}
},
{
"orientation": "vertical" as typeof orientation[number],
"animation": "carousel-inverse" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[carousel-inverse-vertical_2s_ease-in-out_infinite]"
}
},
{
"orientation": "horizontal" as typeof orientation[number],
"animation": "swing" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[swing_2s_ease-in-out_infinite]"
}
},
{
"orientation": "vertical" as typeof orientation[number],
"animation": "swing" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[swing-vertical_2s_ease-in-out_infinite]"
}
},
{
"orientation": "horizontal" as typeof orientation[number],
"animation": "elastic" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[elastic_2s_ease-in-out_infinite]"
}
},
{
"orientation": "vertical" as typeof orientation[number],
"animation": "elastic" as typeof animation[number],
"class": {
"indicator": "data-[state=indeterminate]:animate-[elastic-vertical_2s_ease-in-out_infinite]"
}
}
],
"defaultVariants": {
"animation": "carousel" as typeof animation[number],
"color": "primary" as typeof color[number],
"size": "md" as typeof size[number]
}
}