V13-FE-005: Complete KBX v60 frontend components, T01-T12 screen recipes, and WBS progress tracker
This commit is contained in:
@@ -3,7 +3,7 @@ import { computed, ref } from 'vue'
|
||||
|
||||
export interface KsTextFieldProps {
|
||||
modelValue: string
|
||||
label: string
|
||||
label?: string
|
||||
type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url'
|
||||
placeholder?: string
|
||||
disabled?: boolean
|
||||
@@ -90,7 +90,7 @@ const handleInput = (event: Event) => {
|
||||
:autocomplete="autocomplete"
|
||||
class="ks-text-field__input"
|
||||
:aria-invalid="!!error"
|
||||
:aria-describedby="error || help ? `${id}-hint` : undefined"
|
||||
:aria-describedby="error ? `${id}-message` : (help ? `${id}-hint` : undefined)"
|
||||
@input="handleInput"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
@@ -103,8 +103,11 @@ const handleInput = (event: Event) => {
|
||||
</div>
|
||||
|
||||
<!-- Error or help text -->
|
||||
<div v-if="error || help" :id="`${id}-hint`" :class="{ 'ks-text-field__error': error, 'ks-text-field__help': help }">
|
||||
{{ error || help }}
|
||||
<div v-if="error" :id="`${id}-message`" class="ks-text-field__error">
|
||||
{{ error }}
|
||||
</div>
|
||||
<div v-else-if="help" :id="`${id}-hint`" class="ks-text-field__help">
|
||||
{{ help }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user