Line data Source code
1 : import type { VariantProps } from 'cva'
2 : import { cva } from 'cva'
3 :
4 2355 : export const inputGroupAddonVariants = cva({
5 : base: 'flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [[data-slot=input-group]:has([data-slot=input-group-control]:disabled)_&]:opacity-50',
6 : variants: {
7 : align: {
8 : 'inline-start': 'order-first pl-3 has-[>button]:pl-1',
9 : 'inline-end': 'order-last pr-3 has-[>button]:pr-1'
10 : }
11 : },
12 : defaultVariants: { align: 'inline-start' }
13 : })
14 :
15 : export type InputGroupAddonVariants = VariantProps<
16 : typeof inputGroupAddonVariants
17 : >
18 :
19 2355 : export const inputGroupButtonVariants = cva({
20 : base: 'flex items-center gap-2 text-sm',
21 : variants: {
22 : size: {
23 : xs: 'h-6 gap-1 rounded-sm px-2',
24 : sm: 'h-8 gap-1.5 rounded-md px-2.5',
25 : 'icon-xs': 'size-6 rounded-sm p-0',
26 : 'icon-sm': 'size-8 p-0'
27 : }
28 : },
29 : defaultVariants: { size: 'xs' }
30 : })
31 :
32 : export type InputGroupButtonVariants = VariantProps<
33 : typeof inputGroupButtonVariants
34 : >
|