@dataloop-ai/components 0.20.123 → 0.20.125
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 +1 -1
- package/src/components/compound/DlDialogBox/components/DlDialogBoxHeader.vue +14 -12
- package/src/components/compound/DlSelect/DlSelect.vue +8 -0
- package/src/components/compound/DlSelect/components/DlSelectOption.vue +15 -3
- package/src/components/compound/DlSelect/types.ts +1 -0
package/package.json
CHANGED
|
@@ -11,18 +11,12 @@
|
|
|
11
11
|
style="padding: 0; margin-bottom: 10px"
|
|
12
12
|
@click.stop.prevent="$emit('onClose')"
|
|
13
13
|
/>
|
|
14
|
-
<h2
|
|
15
|
-
v-if="hasTitle"
|
|
16
|
-
class="title"
|
|
17
|
-
>
|
|
14
|
+
<h2 v-if="hasTitle" class="title">
|
|
18
15
|
<slot name="title">
|
|
19
16
|
<dl-ellipsis :text="title" />
|
|
20
17
|
</slot>
|
|
21
18
|
</h2>
|
|
22
|
-
<p
|
|
23
|
-
v-if="hasSubtitle"
|
|
24
|
-
class="subtitle"
|
|
25
|
-
>
|
|
19
|
+
<p v-if="hasSubtitle" class="subtitle">
|
|
26
20
|
<slot name="subtitle">
|
|
27
21
|
<dl-ellipsis :text="subtitle" />
|
|
28
22
|
</slot>
|
|
@@ -30,14 +24,18 @@
|
|
|
30
24
|
</div>
|
|
31
25
|
<dl-button
|
|
32
26
|
v-if="closeButton"
|
|
33
|
-
style="
|
|
27
|
+
style="
|
|
28
|
+
--dl-button-padding: 5px;
|
|
29
|
+
--dl-button-bg-hover: var(--dl-color-fill-secondary);
|
|
30
|
+
"
|
|
34
31
|
class="close-button"
|
|
35
32
|
icon="icon-dl-close"
|
|
36
|
-
size="s"
|
|
37
33
|
flat
|
|
38
34
|
text-color="dl-color-darker"
|
|
39
35
|
@click="$emit('onClose')"
|
|
40
|
-
|
|
36
|
+
>
|
|
37
|
+
<dl-tooltip :delay="800"> Close </dl-tooltip>
|
|
38
|
+
</dl-button>
|
|
41
39
|
</div>
|
|
42
40
|
</template>
|
|
43
41
|
|
|
@@ -45,12 +43,14 @@
|
|
|
45
43
|
import { computed, defineComponent } from 'vue-demi'
|
|
46
44
|
import { DlButton } from '../../../basic'
|
|
47
45
|
import { DlEllipsis } from '../../../essential'
|
|
46
|
+
import { DlTooltip } from '../../../shared'
|
|
48
47
|
|
|
49
48
|
export default defineComponent({
|
|
50
49
|
name: 'DlDialogBoxHeader',
|
|
51
50
|
components: {
|
|
52
51
|
DlButton,
|
|
53
|
-
DlEllipsis
|
|
52
|
+
DlEllipsis,
|
|
53
|
+
DlTooltip
|
|
54
54
|
},
|
|
55
55
|
props: {
|
|
56
56
|
title: { type: String, default: '' },
|
|
@@ -90,5 +90,7 @@ export default defineComponent({
|
|
|
90
90
|
|
|
91
91
|
.close-button {
|
|
92
92
|
margin-top: 5px;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: start;
|
|
93
95
|
}
|
|
94
96
|
</style>
|
|
@@ -238,6 +238,7 @@
|
|
|
238
238
|
:readonly="isReadonlyOption(item)"
|
|
239
239
|
:indentation="indentation"
|
|
240
240
|
:is-expanded="item.expanded"
|
|
241
|
+
:tooltip="getOptionTooltip(item)"
|
|
241
242
|
@update:model-value="handleModelValueUpdate"
|
|
242
243
|
@click="selectOption(item)"
|
|
243
244
|
@selected="handleSelected"
|
|
@@ -288,6 +289,7 @@
|
|
|
288
289
|
:readonly="isReadonlyOption(option)"
|
|
289
290
|
:indentation="indentation"
|
|
290
291
|
:is-expanded="isExpandedOption(option)"
|
|
292
|
+
:tooltip="getOptionTooltip(option)"
|
|
291
293
|
@update:model-value="handleModelValueUpdate"
|
|
292
294
|
@click="selectOption(option)"
|
|
293
295
|
@selected="handleSelected"
|
|
@@ -984,6 +986,12 @@ export default defineComponent({
|
|
|
984
986
|
getOptionCount(option: any) {
|
|
985
987
|
return option?.count ?? null
|
|
986
988
|
},
|
|
989
|
+
getOptionTooltip(option: DlSelectOptionType): string | null {
|
|
990
|
+
if (typeof option === 'object' && option?.tooltip) {
|
|
991
|
+
return option.tooltip
|
|
992
|
+
}
|
|
993
|
+
return null
|
|
994
|
+
},
|
|
987
995
|
getKeyForOption(
|
|
988
996
|
option:
|
|
989
997
|
| string
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
:class="[{ 'readonly-option': true }, { capitalized }]"
|
|
6
6
|
:style="`padding-left: ${10 + depth * indentation}px;`"
|
|
7
7
|
>
|
|
8
|
+
<dl-tooltip v-if="tooltip">
|
|
9
|
+
{{ tooltip }}
|
|
10
|
+
</dl-tooltip>
|
|
8
11
|
<slot>
|
|
9
12
|
{{ label ? (capitalized ? label.toLowerCase() : label) : null }}
|
|
10
13
|
</slot>
|
|
@@ -43,6 +46,9 @@
|
|
|
43
46
|
@checked="handleSingleSelect"
|
|
44
47
|
@unchecked="handleSingleDeselect"
|
|
45
48
|
>
|
|
49
|
+
<dl-tooltip v-if="tooltip">
|
|
50
|
+
{{ tooltip }}
|
|
51
|
+
</dl-tooltip>
|
|
46
52
|
<slot>
|
|
47
53
|
{{
|
|
48
54
|
capitalized
|
|
@@ -54,6 +60,9 @@
|
|
|
54
60
|
<span v-if="count" class="counter"> ({{ count }}) </span>
|
|
55
61
|
</span>
|
|
56
62
|
<div v-else :class="{ capitalized }">
|
|
63
|
+
<dl-tooltip v-if="tooltip">
|
|
64
|
+
{{ tooltip }}
|
|
65
|
+
</dl-tooltip>
|
|
57
66
|
<slot>
|
|
58
67
|
{{
|
|
59
68
|
capitalized
|
|
@@ -88,6 +97,7 @@
|
|
|
88
97
|
:is-expanded="isExpanded"
|
|
89
98
|
:filter-term="filterTerm"
|
|
90
99
|
:fit-content="fitContent"
|
|
100
|
+
:tooltip="tooltip"
|
|
91
101
|
@update:model-value="handleCheckboxUpdate"
|
|
92
102
|
@selected="handleSingleSelect($event, true)"
|
|
93
103
|
@deselected="handleSingleDeselect"
|
|
@@ -119,7 +129,7 @@
|
|
|
119
129
|
import { defineComponent, PropType } from 'vue-demi'
|
|
120
130
|
import { DlListItem } from '../../../basic'
|
|
121
131
|
import { DlIcon, DlCheckbox, DlEllipsis } from '../../../essential'
|
|
122
|
-
import { DlItemSection } from '../../../shared'
|
|
132
|
+
import { DlItemSection, DlTooltip } from '../../../shared'
|
|
123
133
|
import { v4 } from 'uuid'
|
|
124
134
|
import { debounce } from 'lodash'
|
|
125
135
|
import { stateManager } from '../../../../StateManager'
|
|
@@ -139,7 +149,8 @@ export default defineComponent({
|
|
|
139
149
|
DlItemSection,
|
|
140
150
|
DlCheckbox,
|
|
141
151
|
DlIcon,
|
|
142
|
-
DlEllipsis
|
|
152
|
+
DlEllipsis,
|
|
153
|
+
DlTooltip
|
|
143
154
|
},
|
|
144
155
|
model: {
|
|
145
156
|
prop: 'modelValue',
|
|
@@ -182,7 +193,8 @@ export default defineComponent({
|
|
|
182
193
|
selectChildren: {
|
|
183
194
|
type: Boolean,
|
|
184
195
|
default: true
|
|
185
|
-
}
|
|
196
|
+
},
|
|
197
|
+
tooltip: { type: String, default: null }
|
|
186
198
|
},
|
|
187
199
|
emits: [
|
|
188
200
|
'update:model-value',
|