LCOV - code coverage report
Current view: top level - packages/design-system/src/components/toggle-group - toggleGroup.variants.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 3 3
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { InjectionKey, Ref } from 'vue'
       2              : 
       3              : import type { VariantProps } from 'cva'
       4              : import { cva } from 'cva'
       5              : 
       6         2355 : export const toggleGroupVariantKey: InjectionKey<
       7              :   Ref<ToggleGroupItemVariants['variant']>
       8              : > = Symbol('toggleGroupVariant')
       9              : 
      10         2355 : export const toggleGroupVariants = cva({
      11              :   base: 'flex items-center justify-center gap-1',
      12              :   variants: {
      13              :     variant: {
      14              :       default: 'bg-transparent',
      15              :       outline: 'bg-transparent'
      16              :     }
      17              :   },
      18              :   defaultVariants: {
      19              :     variant: 'default'
      20              :   }
      21              : })
      22              : 
      23         2355 : export const toggleGroupItemVariants = cva({
      24              :   base: [
      25              :     'inline-flex items-center justify-center rounded-sm',
      26              :     'cursor-pointer appearance-none border-none',
      27              :     'text-center font-normal',
      28              :     'transition-all duration-150 ease-in-out',
      29              :     'focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none',
      30              :     'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
      31              :     'data-[state=on]:bg-foreground/10 data-[state=on]:text-foreground'
      32              :   ],
      33              :   variants: {
      34              :     variant: {
      35              :       default: 'bg-transparent text-muted-foreground hover:bg-secondary/50',
      36              :       outline: 'border bg-transparent text-muted-foreground hover:bg-secondary'
      37              :     },
      38              :     size: {
      39              :       default: 'h-7 px-3 text-sm',
      40              :       sm: 'h-6 px-5 py-[5px] text-xs',
      41              :       lg: 'h-9 px-4 text-sm'
      42              :     }
      43              :   },
      44              :   defaultVariants: {
      45              :     variant: 'default',
      46              :     size: 'default'
      47              :   }
      48              : })
      49              : 
      50              : export type ToggleGroupVariants = VariantProps<typeof toggleGroupVariants>
      51              : export type ToggleGroupItemVariants = VariantProps<
      52              :   typeof toggleGroupItemVariants
      53              : >
        

Generated by: LCOV version 2.0-1