@redseed/redseed-ui-vue3 2.11.6 → 2.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/FormField/FormFieldCheckbox.vue +3 -2
- package/src/components/FormField/FormFieldEmail.vue +11 -1
- package/src/components/FormField/FormFieldHidden.vue +2 -1
- package/src/components/FormField/FormFieldNumber.vue +11 -1
- package/src/components/FormField/FormFieldPassword.vue +11 -1
- package/src/components/FormField/FormFieldPasswordToggle.vue +10 -1
- package/src/components/FormField/FormFieldSearch.vue +12 -1
- package/src/components/FormField/FormFieldSelect.vue +12 -2
- package/src/components/FormField/FormFieldText.vue +17 -3
- package/src/components/FormField/FormFieldTextSuffix.vue +12 -1
- package/src/components/FormField/FormFieldTextarea.vue +10 -1
package/package.json
CHANGED
|
@@ -26,12 +26,13 @@ function check(event) {
|
|
|
26
26
|
<CheckIcon v-if="checked"></CheckIcon>
|
|
27
27
|
<input
|
|
28
28
|
v-model="model"
|
|
29
|
+
type="checkbox"
|
|
30
|
+
:autofocus="$attrs.autofocus"
|
|
31
|
+
:disabled="$attrs.disabled"
|
|
29
32
|
:id="$attrs.id"
|
|
30
33
|
:name="$attrs.name"
|
|
31
|
-
:disabled="$attrs.disabled"
|
|
32
34
|
:required="$attrs.required"
|
|
33
35
|
@input="check"
|
|
34
|
-
type="checkbox"
|
|
35
36
|
>
|
|
36
37
|
</div>
|
|
37
38
|
<div v-if="$slots.label"
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
2
3
|
import FormFieldText from './FormFieldText.vue'
|
|
4
|
+
|
|
5
|
+
const formFieldTextElement = ref(null)
|
|
6
|
+
|
|
7
|
+
defineExpose({
|
|
8
|
+
focus() {
|
|
9
|
+
if (formFieldTextElement.value) formFieldTextElement.value.focus()
|
|
10
|
+
},
|
|
11
|
+
})
|
|
3
12
|
</script>
|
|
4
13
|
<template>
|
|
5
|
-
<FormFieldText
|
|
14
|
+
<FormFieldText ref="formFieldTextElement"
|
|
15
|
+
class="rsui-form-field-email"
|
|
6
16
|
type="email"
|
|
7
17
|
>
|
|
8
18
|
<template #label v-if="$slots.label">
|
|
@@ -13,10 +13,11 @@ const model = defineModel()
|
|
|
13
13
|
>
|
|
14
14
|
<input
|
|
15
15
|
v-model="model"
|
|
16
|
+
type="hidden"
|
|
17
|
+
:disabled="$attrs.disabled"
|
|
16
18
|
:id="$attrs.id"
|
|
17
19
|
:name="$attrs.name"
|
|
18
20
|
:required="$attrs.required"
|
|
19
|
-
type="hidden"
|
|
20
21
|
>
|
|
21
22
|
<template #error v-if="$slots.error">
|
|
22
23
|
<slot name="error"></slot>
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
2
3
|
import FormFieldText from './FormFieldText.vue'
|
|
4
|
+
|
|
5
|
+
const formFieldTextElement = ref(null)
|
|
6
|
+
|
|
7
|
+
defineExpose({
|
|
8
|
+
focus() {
|
|
9
|
+
if (formFieldTextElement.value) formFieldTextElement.value.focus()
|
|
10
|
+
},
|
|
11
|
+
})
|
|
3
12
|
</script>
|
|
4
13
|
<template>
|
|
5
|
-
<FormFieldText
|
|
14
|
+
<FormFieldText ref="formFieldTextElement"
|
|
15
|
+
class="rsui-form-field-number"
|
|
6
16
|
type="number"
|
|
7
17
|
>
|
|
8
18
|
<template #label v-if="$slots.label">
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
2
3
|
import FormFieldText from './FormFieldText.vue'
|
|
4
|
+
|
|
5
|
+
const formFieldTextElement = ref(null)
|
|
6
|
+
|
|
7
|
+
defineExpose({
|
|
8
|
+
focus() {
|
|
9
|
+
if (formFieldTextElement.value) formFieldTextElement.value.focus()
|
|
10
|
+
},
|
|
11
|
+
})
|
|
3
12
|
</script>
|
|
4
13
|
<template>
|
|
5
|
-
<FormFieldText
|
|
14
|
+
<FormFieldText ref="formFieldTextElement"
|
|
15
|
+
class="rsui-form-field-password"
|
|
6
16
|
type="password"
|
|
7
17
|
>
|
|
8
18
|
<template #label v-if="$slots.label">
|
|
@@ -8,9 +8,18 @@ const show = ref(false)
|
|
|
8
8
|
function togglePassword() {
|
|
9
9
|
show.value = !show.value
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
const formFieldTextElement = ref(null)
|
|
13
|
+
|
|
14
|
+
defineExpose({
|
|
15
|
+
focus() {
|
|
16
|
+
if (formFieldTextElement.value) formFieldTextElement.value.focus()
|
|
17
|
+
},
|
|
18
|
+
})
|
|
11
19
|
</script>
|
|
12
20
|
<template>
|
|
13
|
-
<FormFieldText
|
|
21
|
+
<FormFieldText ref="formFieldTextElement"
|
|
22
|
+
class="rsui-form-field-password"
|
|
14
23
|
:type="show ? 'text' : 'password'"
|
|
15
24
|
>
|
|
16
25
|
<template #label v-if="$slots.label">
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
2
3
|
import FormFieldText from './FormFieldText.vue'
|
|
3
4
|
import { MagnifyingGlassIcon } from '@heroicons/vue/24/outline'
|
|
5
|
+
|
|
6
|
+
const formFieldTextElement = ref(null)
|
|
7
|
+
|
|
8
|
+
defineExpose({
|
|
9
|
+
focus() {
|
|
10
|
+
if (formFieldTextElement.value) formFieldTextElement.value.focus()
|
|
11
|
+
},
|
|
12
|
+
})
|
|
4
13
|
</script>
|
|
5
14
|
<template>
|
|
6
|
-
<FormFieldText
|
|
15
|
+
<FormFieldText ref="formFieldTextElement"
|
|
16
|
+
class="rsui-form-field-search"
|
|
17
|
+
>
|
|
7
18
|
<template #label v-if="$slots.label">
|
|
8
19
|
<slot name="label"></slot>
|
|
9
20
|
</template>
|
|
@@ -38,6 +38,14 @@ function choose(option) {
|
|
|
38
38
|
emit('change', option.value)
|
|
39
39
|
close()
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
const selectElement = ref(null)
|
|
43
|
+
|
|
44
|
+
defineExpose({
|
|
45
|
+
focus() {
|
|
46
|
+
if (selectElement.value) selectElement.value.focus()
|
|
47
|
+
},
|
|
48
|
+
})
|
|
41
49
|
</script>
|
|
42
50
|
<template>
|
|
43
51
|
<FormFieldSlot
|
|
@@ -51,11 +59,13 @@ function choose(option) {
|
|
|
51
59
|
<slot name="label"></slot>
|
|
52
60
|
</template>
|
|
53
61
|
<div class="rsui-form-field-select__group">
|
|
54
|
-
<select
|
|
62
|
+
<select ref="selectElement"
|
|
55
63
|
v-model="model"
|
|
64
|
+
:autocomplete="$attrs.autocomplete"
|
|
65
|
+
:autofocus="$attrs.autofocus"
|
|
66
|
+
:disabled="$attrs.disabled"
|
|
56
67
|
:id="$attrs.id"
|
|
57
68
|
:name="$attrs.name"
|
|
58
|
-
:disabled="$attrs.disabled"
|
|
59
69
|
:required="$attrs.required"
|
|
60
70
|
@click.prevent="toggleOptions"
|
|
61
71
|
@change.prevent
|
|
@@ -11,6 +11,12 @@ defineEmits(['input'])
|
|
|
11
11
|
const model = defineModel()
|
|
12
12
|
|
|
13
13
|
const inputElement = ref(null)
|
|
14
|
+
|
|
15
|
+
defineExpose({
|
|
16
|
+
focus() {
|
|
17
|
+
inputElement.value.focus()
|
|
18
|
+
},
|
|
19
|
+
})
|
|
14
20
|
</script>
|
|
15
21
|
<template>
|
|
16
22
|
<FormFieldSlot
|
|
@@ -25,19 +31,27 @@ const inputElement = ref(null)
|
|
|
25
31
|
<div class="rsui-form-field-text__group">
|
|
26
32
|
<div v-if="$slots.prefix"
|
|
27
33
|
class="rsui-form-field-text__prefix"
|
|
28
|
-
@click.prevent="
|
|
34
|
+
@click.prevent="inputElement.focus()"
|
|
29
35
|
>
|
|
30
36
|
<slot name="prefix"></slot>
|
|
31
37
|
</div>
|
|
32
38
|
|
|
33
39
|
<input ref="inputElement"
|
|
34
40
|
v-model="model"
|
|
41
|
+
:autocomplete="$attrs.autocomplete"
|
|
42
|
+
:autofocus="$attrs.autofocus"
|
|
43
|
+
:disabled="$attrs.disabled"
|
|
35
44
|
:id="$attrs.id"
|
|
45
|
+
:max="$attrs.max"
|
|
46
|
+
:maxlength="$attrs.maxlength"
|
|
47
|
+
:min="$attrs.min"
|
|
48
|
+
:minlength="$attrs.minlength"
|
|
36
49
|
:name="$attrs.name"
|
|
37
|
-
:
|
|
50
|
+
:pattern="$attrs.pattern"
|
|
38
51
|
:placeholder="$attrs.placeholder"
|
|
39
|
-
:disabled="$attrs.disabled"
|
|
40
52
|
:required="$attrs.required"
|
|
53
|
+
:step="$attrs.step"
|
|
54
|
+
:type="$attrs.type || 'text'"
|
|
41
55
|
@input="$emit('input', $event)"
|
|
42
56
|
>
|
|
43
57
|
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
2
3
|
import FormFieldText from './FormFieldText.vue'
|
|
4
|
+
|
|
5
|
+
const formFieldTextElement = ref(null)
|
|
6
|
+
|
|
7
|
+
defineExpose({
|
|
8
|
+
focus() {
|
|
9
|
+
if (formFieldTextElement.value) formFieldTextElement.value.focus()
|
|
10
|
+
},
|
|
11
|
+
})
|
|
3
12
|
</script>
|
|
4
13
|
<template>
|
|
5
|
-
<FormFieldText
|
|
14
|
+
<FormFieldText ref="formFieldTextElement"
|
|
15
|
+
class="rsui-form-field-suffix"
|
|
16
|
+
>
|
|
6
17
|
<template #label v-if="$slots.label">
|
|
7
18
|
<slot name="label"></slot>
|
|
8
19
|
</template>
|
|
@@ -21,6 +21,12 @@ function onInput(event) {
|
|
|
21
21
|
function onSelect(event) {
|
|
22
22
|
emit('select', event)
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
defineExpose({
|
|
26
|
+
focus() {
|
|
27
|
+
if (textarea.value) textarea.value.focus()
|
|
28
|
+
},
|
|
29
|
+
})
|
|
24
30
|
</script>
|
|
25
31
|
<template>
|
|
26
32
|
<FormFieldSlot
|
|
@@ -34,10 +40,13 @@ function onSelect(event) {
|
|
|
34
40
|
</template>
|
|
35
41
|
<textarea ref="textarea"
|
|
36
42
|
v-model="input"
|
|
43
|
+
:autofocus="$attrs.autofocus"
|
|
44
|
+
:disabled="$attrs.disabled"
|
|
37
45
|
:id="$attrs.id"
|
|
46
|
+
:maxlength="$attrs.maxlength"
|
|
47
|
+
:minlength="$attrs.minlength"
|
|
38
48
|
:name="$attrs.name"
|
|
39
49
|
:placeholder="$attrs.placeholder"
|
|
40
|
-
:disabled="$attrs.disabled"
|
|
41
50
|
:required="$attrs.required"
|
|
42
51
|
:rows="$attrs.rows"
|
|
43
52
|
@input="onInput"
|