diff --git a/src/module.ts b/src/module.ts index 4abb85611b..aa29fd28a2 100644 --- a/src/module.ts +++ b/src/module.ts @@ -176,7 +176,7 @@ export default defineNuxtModule({ config: { darkMode: 'class', plugins: [ - require('@tailwindcss/forms'), + require("@tailwindcss/forms")({ strategy: 'class' }), require('@tailwindcss/aspect-ratio'), require('@tailwindcss/typography'), require('@tailwindcss/container-queries') diff --git a/src/runtime/components/forms/Checkbox.vue b/src/runtime/components/forms/Checkbox.vue index dcfbef7216..4717ed480a 100644 --- a/src/runtime/components/forms/Checkbox.vue +++ b/src/runtime/components/forms/Checkbox.vue @@ -11,6 +11,7 @@ :checked="checked" :indeterminate="indeterminate" type="checkbox" + class="form-checkbox" :class="[ui.base, ui.custom]" @focus="$emit('focus', $event)" @blur="$emit('blur', $event)" diff --git a/src/runtime/components/forms/Input.vue b/src/runtime/components/forms/Input.vue index 6747a0fe94..d490ac7d94 100644 --- a/src/runtime/components/forms/Input.vue +++ b/src/runtime/components/forms/Input.vue @@ -12,6 +12,7 @@ :readonly="readonly" :autocomplete="autocomplete" :spellcheck="spellcheck" + class="form-input" :class="inputClass" @input="onInput" @focus="$emit('focus', $event)" diff --git a/src/runtime/components/forms/Radio.vue b/src/runtime/components/forms/Radio.vue index b2dd314f82..a3ed89dc81 100644 --- a/src/runtime/components/forms/Radio.vue +++ b/src/runtime/components/forms/Radio.vue @@ -9,6 +9,7 @@ :value="value" :disabled="disabled" type="radio" + class="form-radio" :class="[ui.base, ui.custom]" @focus="$emit('focus', $event)" @blur="$emit('blur', $event)" diff --git a/src/runtime/components/forms/Select.vue b/src/runtime/components/forms/Select.vue index 65ef1a8ccb..b783afb3ea 100644 --- a/src/runtime/components/forms/Select.vue +++ b/src/runtime/components/forms/Select.vue @@ -6,6 +6,7 @@ :value="modelValue" :required="required" :disabled="disabled || loading" + class="form-select" :class="selectClass" @input="onInput" > diff --git a/src/runtime/components/forms/Textarea.vue b/src/runtime/components/forms/Textarea.vue index a565032dbb..8581041fe1 100644 --- a/src/runtime/components/forms/Textarea.vue +++ b/src/runtime/components/forms/Textarea.vue @@ -10,6 +10,7 @@ :disabled="disabled" :placeholder="placeholder" :autocomplete="autocomplete" + class="form-textarea" :class="textareaClass" @input="onInput" @focus="$emit('focus', $event)"