@dataloop-ai/components 0.19.146 → 0.19.147
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
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
class="dl-chip"
|
|
7
7
|
:class="chipClass"
|
|
8
8
|
:style="cssChipVars"
|
|
9
|
+
@click="$emit('click')"
|
|
9
10
|
>
|
|
10
11
|
<slot name="prefix" />
|
|
11
12
|
<span
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
ref="dlChipRef"
|
|
30
31
|
:class="{
|
|
31
32
|
'dl-chip--ellipsis': overflow,
|
|
32
|
-
'dl-chip--no-overflow': !overflow
|
|
33
|
+
'dl-chip--no-overflow': !overflow,
|
|
34
|
+
'dl-chip--clickable': clickable
|
|
33
35
|
}"
|
|
34
36
|
>
|
|
35
37
|
<slot>
|
|
@@ -94,9 +96,10 @@ export default defineComponent({
|
|
|
94
96
|
Object.values(DlTextTransformOptions).includes(value)
|
|
95
97
|
},
|
|
96
98
|
overflow: { type: Boolean, default: false },
|
|
97
|
-
fit: { type: Boolean, default: false }
|
|
99
|
+
fit: { type: Boolean, default: false },
|
|
100
|
+
clickable: { type: Boolean, default: false }
|
|
98
101
|
},
|
|
99
|
-
emits: ['remove', 'ellipsis'],
|
|
102
|
+
emits: ['remove', 'ellipsis', 'click'],
|
|
100
103
|
setup(props, ctx) {
|
|
101
104
|
const isVisible = ref(true)
|
|
102
105
|
const dlChipRef = ref(null)
|
|
@@ -136,7 +139,11 @@ export default defineComponent({
|
|
|
136
139
|
return this.iconColor
|
|
137
140
|
},
|
|
138
141
|
chipClass(): string {
|
|
139
|
-
|
|
142
|
+
let classes = `dl-text-transform--${this.transform}`
|
|
143
|
+
if (this.clickable) {
|
|
144
|
+
classes += ' dl-chip--clickable'
|
|
145
|
+
}
|
|
146
|
+
return classes
|
|
140
147
|
},
|
|
141
148
|
cssChipVars(): Record<string, string | number> {
|
|
142
149
|
return {
|
|
@@ -225,6 +232,10 @@ export default defineComponent({
|
|
|
225
232
|
&--no-overflow {
|
|
226
233
|
overflow-wrap: break-word;
|
|
227
234
|
}
|
|
235
|
+
|
|
236
|
+
&--clickable {
|
|
237
|
+
cursor: pointer;
|
|
238
|
+
}
|
|
228
239
|
}
|
|
229
240
|
|
|
230
241
|
.dl-chip-remove-icon-container {
|