@dataloop-ai/components 0.19.28 → 0.19.29
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
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
class="text-input-area"
|
|
11
11
|
type="text"
|
|
12
12
|
clear-button-tooltip
|
|
13
|
+
style="width: 100%"
|
|
13
14
|
:size="size"
|
|
14
15
|
:model-value="modelValue"
|
|
15
16
|
:placeholder="placeholder"
|
|
@@ -50,6 +51,7 @@ import { defineComponent, PropType } from 'vue-demi'
|
|
|
50
51
|
import { DlButton } from '../../../basic'
|
|
51
52
|
import { DlIcon } from '../../../essential'
|
|
52
53
|
import { DlInput } from '../../DlInput'
|
|
54
|
+
import { DlInputSuggestion } from '../../DlInput/types'
|
|
53
55
|
|
|
54
56
|
const SearchSizes = {
|
|
55
57
|
l: 'l',
|
|
@@ -83,8 +85,8 @@ export default defineComponent({
|
|
|
83
85
|
},
|
|
84
86
|
placeholder: { type: String, default: '' },
|
|
85
87
|
autoSuggestItems: {
|
|
86
|
-
type: Array as PropType<
|
|
87
|
-
default: ():
|
|
88
|
+
type: Array as PropType<DlInputSuggestion[]>,
|
|
89
|
+
default: (): DlInputSuggestion[] => []
|
|
88
90
|
},
|
|
89
91
|
highlightMatches: { type: Boolean, default: false },
|
|
90
92
|
dense: { type: Boolean, default: false },
|
|
@@ -16,12 +16,30 @@
|
|
|
16
16
|
placeholder="Search here"
|
|
17
17
|
:auto-suggest-items="suggestItems"
|
|
18
18
|
/>
|
|
19
|
+
<dl-search
|
|
20
|
+
v-model="searchValue"
|
|
21
|
+
size="s"
|
|
22
|
+
with-search-button
|
|
23
|
+
highlight-matches
|
|
24
|
+
placeholder="Search here"
|
|
25
|
+
:auto-suggest-items="suggestItems"
|
|
26
|
+
/>
|
|
27
|
+
<dl-search
|
|
28
|
+
v-model="searchValue"
|
|
29
|
+
size="s"
|
|
30
|
+
with-search-button
|
|
31
|
+
highlight-matches
|
|
32
|
+
placeholder="Search here"
|
|
33
|
+
:auto-suggest-items="suggestItems"
|
|
34
|
+
style="height: 28px"
|
|
35
|
+
/>
|
|
19
36
|
</div>
|
|
20
37
|
</template>
|
|
21
38
|
|
|
22
39
|
<script lang="ts">
|
|
23
40
|
import { defineComponent, ref } from 'vue-demi'
|
|
24
41
|
import { DlSearch } from '../components'
|
|
42
|
+
import { DlInputSuggestion } from '../components/compound/DlInput/types'
|
|
25
43
|
export default defineComponent({
|
|
26
44
|
name: 'DlSearchDemo',
|
|
27
45
|
components: {
|
|
@@ -29,7 +47,12 @@ export default defineComponent({
|
|
|
29
47
|
},
|
|
30
48
|
setup() {
|
|
31
49
|
const searchValue = ref<string>('')
|
|
32
|
-
const suggestItems = [
|
|
50
|
+
const suggestItems: DlInputSuggestion[] = [
|
|
51
|
+
{ suggestion: 'foo' },
|
|
52
|
+
{ suggestion: 'foo bar' },
|
|
53
|
+
{ suggestion: 'bar' },
|
|
54
|
+
{ suggestion: 'bar foo' }
|
|
55
|
+
]
|
|
33
56
|
return { searchValue, suggestItems }
|
|
34
57
|
}
|
|
35
58
|
})
|