@dataloop-ai/components 0.19.37 → 0.19.38
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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:color="hasValue ? 'dl-color-secondary' : 'dl-color-medium'"
|
|
9
9
|
variant="h1"
|
|
10
10
|
:size="counterFontSizeComputed"
|
|
11
|
-
:style="
|
|
11
|
+
:style="typographyStyles"
|
|
12
12
|
>
|
|
13
13
|
{{ formatCounter(counter) }}
|
|
14
14
|
</dl-typography>
|
|
@@ -171,6 +171,14 @@ export default defineComponent({
|
|
|
171
171
|
props.small ? '14px' : props.titleFontSize
|
|
172
172
|
)
|
|
173
173
|
|
|
174
|
+
const typographyStyles = computed<Record<string, string>>(() => {
|
|
175
|
+
const styles: Record<string, string> = {}
|
|
176
|
+
if (typeof props.counter !== 'number' && props.counter.unit) {
|
|
177
|
+
styles['text-transform'] = 'none'
|
|
178
|
+
}
|
|
179
|
+
return styles
|
|
180
|
+
})
|
|
181
|
+
|
|
174
182
|
const formatCounter = (counter: DlKpiCounterType | number) => {
|
|
175
183
|
if (counter === null) {
|
|
176
184
|
return emptyString
|
|
@@ -248,7 +256,8 @@ export default defineComponent({
|
|
|
248
256
|
hasValue,
|
|
249
257
|
cssVars,
|
|
250
258
|
titleFontSizeComputed,
|
|
251
|
-
counterFontSizeComputed
|
|
259
|
+
counterFontSizeComputed,
|
|
260
|
+
typographyStyles
|
|
252
261
|
}
|
|
253
262
|
}
|
|
254
263
|
})
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
@blur="isFocused = false"
|
|
23
23
|
@search="emitSearchQuery"
|
|
24
24
|
@error="$emit('error', $event)"
|
|
25
|
+
@clear="$emit('clear')"
|
|
25
26
|
/>
|
|
26
27
|
</div>
|
|
27
28
|
<div class="dl-smart-search__buttons">
|
|
@@ -144,7 +145,8 @@ export default defineComponent({
|
|
|
144
145
|
'remove-filter',
|
|
145
146
|
'update:model-value',
|
|
146
147
|
'search',
|
|
147
|
-
'error'
|
|
148
|
+
'error',
|
|
149
|
+
'clear'
|
|
148
150
|
],
|
|
149
151
|
setup(props, { emit }) {
|
|
150
152
|
//#region props
|
|
@@ -197,7 +197,15 @@ export default defineComponent({
|
|
|
197
197
|
default: false
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
|
-
emits: [
|
|
200
|
+
emits: [
|
|
201
|
+
'update:model-value',
|
|
202
|
+
'focus',
|
|
203
|
+
'blur',
|
|
204
|
+
'input',
|
|
205
|
+
'search',
|
|
206
|
+
'error',
|
|
207
|
+
'clear'
|
|
208
|
+
],
|
|
201
209
|
setup(props, { emit }) {
|
|
202
210
|
//#region refs
|
|
203
211
|
const input = ref<HTMLInputElement>(null)
|
|
@@ -462,6 +470,7 @@ export default defineComponent({
|
|
|
462
470
|
searchQuery.value = ''
|
|
463
471
|
input.value.innerHTML = ''
|
|
464
472
|
emit('update:model-value', {})
|
|
473
|
+
emit('clear')
|
|
465
474
|
if (!focused.value) {
|
|
466
475
|
focus()
|
|
467
476
|
}
|