@dataloop-ai/components 0.20.148 → 0.20.150
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
|
@@ -114,14 +114,19 @@
|
|
|
114
114
|
@click="onClick"
|
|
115
115
|
>
|
|
116
116
|
<div class="dl-button-dropdown--simple__title">
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
<template v-if="hasLabelSlot">
|
|
118
|
+
<slot name="label" />
|
|
119
|
+
</template>
|
|
120
|
+
<template v-else>
|
|
121
|
+
<span
|
|
122
|
+
:class="{
|
|
123
|
+
'dl-button-no-wrap': noWrap
|
|
124
|
+
}"
|
|
125
|
+
style="margin-right: 6px"
|
|
126
|
+
>
|
|
127
|
+
{{ label }}
|
|
128
|
+
</span>
|
|
129
|
+
</template>
|
|
125
130
|
<dl-icon
|
|
126
131
|
:class="iconClass"
|
|
127
132
|
:icon="dropdownIcon"
|
|
@@ -278,7 +283,7 @@ export default defineComponent({
|
|
|
278
283
|
...arrowNavigationEvents
|
|
279
284
|
],
|
|
280
285
|
|
|
281
|
-
setup(props, { emit }) {
|
|
286
|
+
setup(props, { emit, slots }) {
|
|
282
287
|
const vm = getCurrentInstance()
|
|
283
288
|
const proxy = vm!.proxy!
|
|
284
289
|
const { textColor } = toRefs(props)
|
|
@@ -286,6 +291,9 @@ export default defineComponent({
|
|
|
286
291
|
const showing = ref<boolean>(!!props.modelValue) as Ref<boolean>
|
|
287
292
|
const menuRef = ref(null)
|
|
288
293
|
|
|
294
|
+
const hasLabelSlot = computed(() => {
|
|
295
|
+
return !!slots.label
|
|
296
|
+
})
|
|
289
297
|
const attributes = computed(() => {
|
|
290
298
|
const acc: Record<string, string> = {
|
|
291
299
|
'aria-expanded': showing.value === true ? 'true' : 'false',
|
|
@@ -489,7 +497,8 @@ export default defineComponent({
|
|
|
489
497
|
cssVars,
|
|
490
498
|
getIconColor,
|
|
491
499
|
computedTextColor,
|
|
492
|
-
separatorColor
|
|
500
|
+
separatorColor,
|
|
501
|
+
hasLabelSlot
|
|
493
502
|
}
|
|
494
503
|
}
|
|
495
504
|
})
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
{{ childDisabledCheckboxTooltip }}
|
|
37
37
|
</dl-tooltip>
|
|
38
38
|
<DlCheckbox
|
|
39
|
+
v-if="!isCheckboxDisabled && row.isSelectable"
|
|
39
40
|
:color="color"
|
|
40
41
|
:model-value="modelValue"
|
|
41
42
|
:indeterminate-value="true"
|
|
42
43
|
:false-value="false"
|
|
43
44
|
:true-value="true"
|
|
44
|
-
:disabled="isCheckboxDisabled || !row.isSelectable"
|
|
45
45
|
@update:model-value="
|
|
46
46
|
(adding, evt) => emitUpdateModelValue(adding, evt)
|
|
47
47
|
"
|
|
@@ -312,6 +312,33 @@
|
|
|
312
312
|
</dl-list>
|
|
313
313
|
</dl-dropdown-button>
|
|
314
314
|
</div>
|
|
315
|
+
|
|
316
|
+
<div class="grid grid-cols-3" style="column-gap: 10px">
|
|
317
|
+
<dl-dropdown-button
|
|
318
|
+
auto-close
|
|
319
|
+
:model-value="showing"
|
|
320
|
+
main-button-style="width: 150px;"
|
|
321
|
+
@show="onOpen"
|
|
322
|
+
>
|
|
323
|
+
<template #label>
|
|
324
|
+
<div class="flex row" style="gap: 5px">
|
|
325
|
+
<span>{{ slotLabel }}</span>
|
|
326
|
+
<dl-icon icon="icon-dl-info" size="s" />
|
|
327
|
+
</div>
|
|
328
|
+
</template>
|
|
329
|
+
<dl-list>
|
|
330
|
+
<dl-list-item clickable>
|
|
331
|
+
<dl-item-section> Photos </dl-item-section>
|
|
332
|
+
</dl-list-item>
|
|
333
|
+
<dl-list-item clickable>
|
|
334
|
+
<dl-item-section> Videos </dl-item-section>
|
|
335
|
+
</dl-list-item>
|
|
336
|
+
<dl-list-item clickable>
|
|
337
|
+
<dl-item-section> Articles </dl-item-section>
|
|
338
|
+
</dl-list-item>
|
|
339
|
+
</dl-list>
|
|
340
|
+
</dl-dropdown-button>
|
|
341
|
+
</div>
|
|
315
342
|
</div>
|
|
316
343
|
|
|
317
344
|
<div style="margin-top: 20px; display: flex; flex-direction: column">
|
|
@@ -346,7 +373,8 @@ import {
|
|
|
346
373
|
DlItemSection,
|
|
347
374
|
DlList,
|
|
348
375
|
DlDropdownButton,
|
|
349
|
-
DlEllipsis
|
|
376
|
+
DlEllipsis,
|
|
377
|
+
DlIcon
|
|
350
378
|
} from '../components'
|
|
351
379
|
|
|
352
380
|
export default defineComponent({
|
|
@@ -356,7 +384,8 @@ export default defineComponent({
|
|
|
356
384
|
DlItemSection,
|
|
357
385
|
DlList,
|
|
358
386
|
DlDropdownButton,
|
|
359
|
-
DlEllipsis
|
|
387
|
+
DlEllipsis,
|
|
388
|
+
DlIcon
|
|
360
389
|
},
|
|
361
390
|
setup() {
|
|
362
391
|
const highlightedIndex = ref(-1)
|
|
@@ -365,6 +394,7 @@ export default defineComponent({
|
|
|
365
394
|
const arrowNavigationLabel = ref('Arrow Navigation Label')
|
|
366
395
|
const outlinedLabel = ref('Outlined Label')
|
|
367
396
|
const containedLabel = ref('Contained Label')
|
|
397
|
+
const slotLabel = ref('Slot Label')
|
|
368
398
|
|
|
369
399
|
const listItems = ref([
|
|
370
400
|
'New tab',
|
|
@@ -415,7 +445,8 @@ export default defineComponent({
|
|
|
415
445
|
highlightedIndex,
|
|
416
446
|
arrowNavigationLabel,
|
|
417
447
|
outlinedLabel,
|
|
418
|
-
containedLabel
|
|
448
|
+
containedLabel,
|
|
449
|
+
slotLabel
|
|
419
450
|
}
|
|
420
451
|
}
|
|
421
452
|
})
|