<script setup lang="ts">
import type { KbxFieldState } from '@kbx/contracts'
import KbxInput from './KbxInput.vue'
withDefaults(defineProps<{modelValue?:string|null;label:string;required?:boolean;readonly?:boolean;disabled?:boolean;error?:string;warning?:string;helpText?:string;state?:KbxFieldState;placeholder?:string;maxlength?:number}>(),{modelValue:'',state:'default'})
const emit=defineEmits<{ 'update:modelValue':[string]; enter:[] }>()
</script>
<template><KbxInput :model-value="modelValue" :label="label" :required="required" :readonly="readonly" :disabled="disabled" :error="error" :warning="warning" :help-text="helpText" :state="state" :placeholder="placeholder" :maxlength="maxlength" @update:model-value="emit('update:modelValue',$event)" @enter="emit('enter')"/></template>
