@dataloop-ai/components 0.20.155 → 0.20.157
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
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
:icon="dropdownIcon"
|
|
65
65
|
:size="iconSize"
|
|
66
66
|
:color="getIconColor"
|
|
67
|
+
:tooltip="iconTooltip"
|
|
68
|
+
@click="onIconClicked"
|
|
67
69
|
/>
|
|
68
70
|
</dl-button>
|
|
69
71
|
<dl-menu
|
|
@@ -132,6 +134,8 @@
|
|
|
132
134
|
:icon="dropdownIcon"
|
|
133
135
|
:size="iconSize"
|
|
134
136
|
:color="getIconColor"
|
|
137
|
+
:tooltip="iconTooltip"
|
|
138
|
+
@click="onIconClicked"
|
|
135
139
|
/>
|
|
136
140
|
</div>
|
|
137
141
|
|
|
@@ -235,6 +239,11 @@ export default defineComponent({
|
|
|
235
239
|
fluid: Boolean,
|
|
236
240
|
icon: { type: String, required: false, default: '' },
|
|
237
241
|
iconSize: { type: String, required: false, default: '20px' },
|
|
242
|
+
iconTooltip: {
|
|
243
|
+
type: String,
|
|
244
|
+
required: false,
|
|
245
|
+
default: null
|
|
246
|
+
},
|
|
238
247
|
flat: Boolean,
|
|
239
248
|
transform: {
|
|
240
249
|
type: String as PropType<DlTextTransformOptions>,
|
|
@@ -276,6 +285,7 @@ export default defineComponent({
|
|
|
276
285
|
'update:model-value',
|
|
277
286
|
'update:model-value',
|
|
278
287
|
'click',
|
|
288
|
+
'icon-clicked',
|
|
279
289
|
'before-show',
|
|
280
290
|
'show',
|
|
281
291
|
'before-hide',
|
|
@@ -384,6 +394,10 @@ export default defineComponent({
|
|
|
384
394
|
emit('click', e)
|
|
385
395
|
}
|
|
386
396
|
|
|
397
|
+
function onIconClicked(e: Event) {
|
|
398
|
+
emit('icon-clicked', e)
|
|
399
|
+
}
|
|
400
|
+
|
|
387
401
|
function onClickHide(e: Event) {
|
|
388
402
|
stop(e)
|
|
389
403
|
hide(e)
|
|
@@ -486,6 +500,7 @@ export default defineComponent({
|
|
|
486
500
|
onShow,
|
|
487
501
|
onHide,
|
|
488
502
|
onClick,
|
|
503
|
+
onIconClicked,
|
|
489
504
|
onClickHide,
|
|
490
505
|
toggle,
|
|
491
506
|
show,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
? defaultIconColor
|
|
18
18
|
: statusIconColor || defaultIconColor
|
|
19
19
|
"
|
|
20
|
-
size="
|
|
20
|
+
size="16px"
|
|
21
21
|
:inline="false"
|
|
22
22
|
/>
|
|
23
23
|
</div>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
:disabled="disabled"
|
|
50
50
|
@mousedown="onClear"
|
|
51
51
|
/>
|
|
52
|
-
<dl-tooltip> Clear
|
|
52
|
+
<dl-tooltip> Clear </dl-tooltip>
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
<dl-tooltip
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
{{ externalIcon ? icon : null }}
|
|
19
19
|
</i>
|
|
20
20
|
<slot />
|
|
21
|
+
<dl-tooltip v-if="tooltip">
|
|
22
|
+
{{ tooltip }}
|
|
23
|
+
</dl-tooltip>
|
|
21
24
|
</div>
|
|
22
25
|
<div
|
|
23
26
|
v-else
|
|
@@ -48,9 +51,13 @@ import {
|
|
|
48
51
|
} from 'vue-demi'
|
|
49
52
|
import { getColor, loggerFactory, stringStyleToRecord } from '../../../utils'
|
|
50
53
|
import { COLORED_ICONS } from '@dataloop-ai/icons/types'
|
|
54
|
+
import { DlTooltip } from '../../shared'
|
|
51
55
|
|
|
52
56
|
export default defineComponent({
|
|
53
57
|
name: 'DlIcon',
|
|
58
|
+
components: {
|
|
59
|
+
DlTooltip
|
|
60
|
+
},
|
|
54
61
|
props: {
|
|
55
62
|
color: {
|
|
56
63
|
type: String,
|
|
@@ -79,11 +86,15 @@ export default defineComponent({
|
|
|
79
86
|
svgSource: {
|
|
80
87
|
type: String,
|
|
81
88
|
default: null
|
|
89
|
+
},
|
|
90
|
+
tooltip: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: null
|
|
82
93
|
}
|
|
83
94
|
},
|
|
84
95
|
emits: ['click', 'mousemove', 'mouseup', 'mousedown'],
|
|
85
96
|
setup(props) {
|
|
86
|
-
const { styles, color, size, icon, svg, inline, svgSource } =
|
|
97
|
+
const { styles, color, size, icon, svg, inline, svgSource, tooltip } =
|
|
87
98
|
toRefs(props)
|
|
88
99
|
|
|
89
100
|
const svgIcon = ref(null)
|