feat: uniformize components sizes (#68)

This commit is contained in:
Benjamin Canac
2024-04-16 12:26:29 +02:00
committed by GitHub
parent 78e45600de
commit f302a15972
96 changed files with 1854 additions and 1720 deletions

View File

@@ -11,23 +11,20 @@ export default (config: { colors: string[] }) => ({
thumb: `ring-${color}-500 dark:ring-${color}-400 focus-visible:outline-${color}-500/50 dark:focus-visible:outline-${color}-400/50`
}])),
size: {
'2xs': {
thumb: 'size-1.5'
},
'xs': {
thumb: 'size-2'
},
'sm': {
xs: {
thumb: 'size-3'
},
'md': {
sm: {
thumb: 'size-3.5'
},
md: {
thumb: 'size-4'
},
'lg': {
thumb: 'size-5'
lg: {
thumb: 'size-4.5'
},
'xl': {
thumb: 'size-6'
xl: {
thumb: 'size-5'
}
},
orientation: {
@@ -47,92 +44,68 @@ export default (config: { colors: string[] }) => ({
}
},
compoundVariants: [{
orientation: 'horizontal',
size: '2xs',
class: {
root: 'h-1.5',
track: 'h-px'
}
}, {
orientation: 'horizontal',
size: 'xs',
class: {
root: 'h-2',
track: 'h-0.5'
track: 'h-[6px]'
}
}, {
orientation: 'horizontal',
size: 'sm',
class: {
root: 'h-3',
track: 'h-1'
track: 'h-[7px]'
}
}, {
orientation: 'horizontal',
size: 'md',
class: {
root: 'h-4',
track: 'h-2'
track: 'h-[8px]'
}
}, {
orientation: 'horizontal',
size: 'lg',
class: {
root: 'h-5',
track: 'h-3'
track: 'h-[9px]'
}
}, {
orientation: 'horizontal',
size: 'xl',
class: {
root: 'h-6',
track: 'h-4'
}
}, {
orientation: 'vertical',
size: '2xs',
class: {
root: 'w-1.5',
track: 'w-px'
track: 'h-[10px]'
}
}, {
orientation: 'vertical',
size: 'xs',
class: {
root: 'w-2',
track: 'w-0.5'
track: 'w-[6px]'
}
}, {
orientation: 'vertical',
size: 'sm',
class: {
root: 'w-3',
track: 'w-1'
track: 'w-[7px]'
}
}, {
orientation: 'vertical',
size: 'md',
class: {
root: 'w-4',
track: 'w-2'
track: 'w-[8px]'
}
}, {
orientation: 'vertical',
size: 'lg',
class: {
root: 'w-5',
track: 'w-3'
track: 'w-[9px]'
}
}, {
orientation: 'vertical',
size: 'xl',
class: {
root: 'w-6',
track: 'w-4'
track: 'w-[10px]'
}
}],
defaultVariants: {
size: 'sm',
size: 'md',
color: 'primary'
}
})