🔧 chore: restructure tailwind classnames

This commit is contained in:
Andre H 2024-02-21 17:08:33 +07:00
parent 807a4b1197
commit 195d957251

View File

@ -4,26 +4,40 @@ export const inputTheme = tv(
{ {
slots: { slots: {
container: [ container: [
'flex items-center rounded-lg relative', 'flex',
'items-center',
'rounded-lg',
'relative',
'placeholder:text-elements-disabled', 'placeholder:text-elements-disabled',
'disabled:cursor-not-allowed disabled:bg-controls-disabled', 'disabled:cursor-not-allowed',
'disabled:bg-controls-disabled',
], ],
label: ['text-sm', 'text-elements-high-em'], label: ['text-sm', 'text-elements-high-em'],
description: ['text-xs', 'text-elements-low-em'], description: ['text-xs', 'text-elements-low-em'],
input: [ input: [
'focus-ring', 'focus-ring',
'block w-full h-full rounded-lg text-elements-mid-em', 'block',
'w-full',
'h-full',
'rounded-lg',
'text-elements-mid-em',
'shadow-sm', 'shadow-sm',
'border border-border-interactive', 'border',
'border-border-interactive',
'disabled:shadow-none', 'disabled:shadow-none',
'disabled:border-none', 'disabled:border-none',
], ],
icon: ['text-elements-mid-em'], icon: ['text-elements-mid-em'],
iconContainer: [ iconContainer: [
'absolute inset-y-0 flex items-center z-10 cursor-pointer', 'absolute',
'inset-y-0',
'flex',
'items-center',
'z-10',
'cursor-pointer',
], ],
helperIcon: [], helperIcon: [],
helperText: ['flex gap-2 items-center text-elements-danger'], helperText: ['flex', 'gap-2', 'items-center', 'text-elements-danger'],
}, },
variants: { variants: {
state: { state: {
@ -32,10 +46,12 @@ export const inputTheme = tv(
}, },
error: { error: {
input: [ input: [
'outline outline-offset-0 outline-border-danger', 'outline',
'outline-offset-0',
'outline-border-danger',
'shadow-none', 'shadow-none',
], ],
helperText: ['text-elements-danger'], helperText: 'text-elements-danger',
}, },
}, },
size: { size: {