@dataloop-ai/components 0.19.27 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.19.27",
3
+ "version": "0.19.29",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -2,7 +2,8 @@
2
2
  <div v-if="hasVirtualScroll">
3
3
  <dl-virtual-scroll
4
4
  v-slot="{ item }"
5
- style="height: 500px"
5
+ :scroll-debounce="scrollDebounce"
6
+ style="height: var(--dl-virtual-scroll-height, 500px)"
6
7
  :items="items"
7
8
  :styles="{ gridStyles, gridClass }"
8
9
  >
@@ -73,6 +74,10 @@ export default defineComponent({
73
74
  mode: {
74
75
  type: String as PropType<DlGridMode>,
75
76
  default: DlGridMode.LAYOUT
77
+ },
78
+ scrollDebounce: {
79
+ type: Number,
80
+ default: 100
76
81
  }
77
82
  },
78
83
  emits: ['update:model-value', 'layout-changed'],
@@ -1,7 +1,7 @@
1
1
  export interface DlInputSuggestion {
2
2
  suggestion: string
3
- image: string
4
- click: boolean
3
+ image?: string
4
+ click?: boolean
5
5
  }
6
6
 
7
7
  export interface DlInputFile {
@@ -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<string[]>,
87
- default: (): string[] => []
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 = ['foo', 'foo bar', 'bar', 'bar foo']
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
  })