frappe-ui 0.1.13 → 0.1.14
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
CHANGED
|
@@ -54,6 +54,19 @@ const variants = ['subtle', 'outline']
|
|
|
54
54
|
/>
|
|
55
55
|
</div>
|
|
56
56
|
</Variant>
|
|
57
|
+
<Variant title="select">
|
|
58
|
+
<div class="p-2">
|
|
59
|
+
<FormControl
|
|
60
|
+
type="autocomplete"
|
|
61
|
+
:options="[
|
|
62
|
+
{ label: 'One', value: '1' },
|
|
63
|
+
{ label: 'Two', value: '2' },
|
|
64
|
+
{ label: 'Three', value: '3' },
|
|
65
|
+
]"
|
|
66
|
+
v-bind="state"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
</Variant>
|
|
57
70
|
<Variant title="checkbox">
|
|
58
71
|
<div class="p-2">
|
|
59
72
|
<FormControl type="checkbox" v-bind="state" />
|
|
@@ -12,6 +12,17 @@
|
|
|
12
12
|
<slot name="prefix" />
|
|
13
13
|
</template>
|
|
14
14
|
</Select>
|
|
15
|
+
<Autocomplete
|
|
16
|
+
v-else-if="type === 'autocomplete'"
|
|
17
|
+
v-bind="{ ...controlAttrs }"
|
|
18
|
+
>
|
|
19
|
+
<template #prefix v-if="$slots.prefix">
|
|
20
|
+
<slot name="prefix" />
|
|
21
|
+
</template>
|
|
22
|
+
<template #item-prefix="itemPrefixProps" v-if="$slots['item-prefix']">
|
|
23
|
+
<slot name="item-prefix" v-bind="itemPrefixProps" />
|
|
24
|
+
</template>
|
|
25
|
+
</Autocomplete>
|
|
15
26
|
<Textarea
|
|
16
27
|
v-else-if="type === 'textarea'"
|
|
17
28
|
:id="id"
|
|
@@ -43,11 +54,12 @@ import type { TextInputTypes } from './types/TextInput'
|
|
|
43
54
|
import Select from './Select.vue'
|
|
44
55
|
import Textarea from './Textarea.vue'
|
|
45
56
|
import Checkbox from './Checkbox.vue'
|
|
57
|
+
import Autocomplete from './Autocomplete.vue'
|
|
46
58
|
|
|
47
59
|
interface FormControlProps {
|
|
48
60
|
label?: string
|
|
49
61
|
description?: string
|
|
50
|
-
type?: TextInputTypes | 'textarea' | 'select' | 'checkbox'
|
|
62
|
+
type?: TextInputTypes | 'textarea' | 'select' | 'checkbox' | 'autocomplete'
|
|
51
63
|
size?: 'sm' | 'md'
|
|
52
64
|
}
|
|
53
65
|
|