@dataloop-ai/components 0.17.71 → 0.17.73

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.17.71",
3
+ "version": "0.17.73",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -251,8 +251,8 @@ export default defineComponent({
251
251
  },
252
252
  props: {
253
253
  modelValue: {
254
- type: Object,
255
- default: {} as { [key: string]: any }
254
+ type: Object as PropType<Record<string, any>>,
255
+ default: () => ({})
256
256
  },
257
257
  status: {
258
258
  type: Object as PropType<SearchStatus>,
@@ -260,7 +260,7 @@ export default defineComponent({
260
260
  },
261
261
  schema: {
262
262
  type: Object as PropType<Schema>,
263
- default: () => {}
263
+ default: () => ({})
264
264
  },
265
265
  aliases: {
266
266
  type: Array as PropType<Alias[]>,
@@ -6,19 +6,17 @@
6
6
  auto-close
7
7
  outlined
8
8
  split
9
- label="Dropdown Button Outlined"
9
+ :label="outlinedLabel"
10
+ @handleSelectedItem="handleOutlinedSelect"
10
11
  >
11
12
  <dl-list>
12
- <dl-list-item clickable>
13
- <dl-item-section> Photos </dl-item-section>
14
- </dl-list-item>
15
-
16
- <dl-list-item clickable>
17
- <dl-item-section> Videos </dl-item-section>
18
- </dl-list-item>
19
-
20
- <dl-list-item clickable>
21
- <dl-item-section> Articles </dl-item-section>
13
+ <dl-list-item
14
+ v-for="val in ['Photos', 'Videos', 'Articles']"
15
+ :key="val"
16
+ clickable
17
+ @click="handleOutlinedSelect(val)"
18
+ >
19
+ <dl-item-section> {{ val }} </dl-item-section>
22
20
  </dl-list-item>
23
21
  </dl-list>
24
22
  </dl-dropdown-button>
@@ -47,19 +45,17 @@
47
45
 
48
46
  <dl-dropdown-button
49
47
  split
50
- label="Dropdown Button Contained"
48
+ :label="containedLabel"
49
+ auto-close
51
50
  >
52
51
  <dl-list>
53
- <dl-list-item clickable>
54
- <dl-item-section> Photos </dl-item-section>
55
- </dl-list-item>
56
-
57
- <dl-list-item clickable>
58
- <dl-item-section> Videos </dl-item-section>
59
- </dl-list-item>
60
-
61
- <dl-list-item clickable>
62
- <dl-item-section> Articles </dl-item-section>
52
+ <dl-list-item
53
+ v-for="val in ['Photos', 'Videos', 'Articles']"
54
+ :key="val"
55
+ clickable
56
+ @click="handleContainedSelect(val)"
57
+ >
58
+ <dl-item-section> {{ val }} </dl-item-section>
63
59
  </dl-list-item>
64
60
  </dl-list>
65
61
  </dl-dropdown-button>
@@ -109,7 +105,7 @@
109
105
  <dl-dropdown-button
110
106
  auto-close
111
107
  outlined
112
- label="Dropdown Button Outlined"
108
+ :label="outlinedLabel"
113
109
  >
114
110
  <dl-list>
115
111
  <dl-list-item clickable>
@@ -149,7 +145,7 @@
149
145
 
150
146
  <dl-dropdown-button
151
147
  auto-close
152
- label="Dropdown Button Contained"
148
+ :label="containedLabel"
153
149
  max-height="210px"
154
150
  >
155
151
  <dl-list>
@@ -290,6 +286,7 @@
290
286
  :label="arrowNavigationLabel"
291
287
  main-button-style="width: 150px;"
292
288
  :overflow="true"
289
+ disabled
293
290
  :no-wrap="true"
294
291
  tooltip="Tooltip message"
295
292
  :arrow-nav-items="listItems"
@@ -339,6 +336,8 @@ export default defineComponent({
339
336
  const name = ref('Dropdown Button Controlled')
340
337
  const showing = ref(false)
341
338
  const arrowNavigationLabel = ref('Arrow Navigation Label')
339
+ const outlinedLabel = ref('Outlined Label')
340
+ const containedLabel = ref('Contained Label')
342
341
 
343
342
  const listItems = ref([
344
343
  'New tab',
@@ -354,6 +353,12 @@ export default defineComponent({
354
353
  arrowNavigationLabel.value = value
355
354
  showing.value = false
356
355
  }
356
+ const handleOutlinedSelect = (value: string) =>
357
+ (outlinedLabel.value = value)
358
+
359
+ const handleContainedSelect = (value: string) =>
360
+ (containedLabel.value = value)
361
+
357
362
  const onClose = (newName: string) => {
358
363
  name.value = newName
359
364
  showing.value = false
@@ -378,8 +383,12 @@ export default defineComponent({
378
383
  showing,
379
384
  setHighlightedIndex,
380
385
  handleSelectedItem,
386
+ handleOutlinedSelect,
387
+ handleContainedSelect,
381
388
  highlightedIndex,
382
- arrowNavigationLabel
389
+ arrowNavigationLabel,
390
+ outlinedLabel,
391
+ containedLabel
383
392
  }
384
393
  }
385
394
  })