@dataloop-ai/components 0.20.15 → 0.20.16
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
package/src/assets/globals.scss
CHANGED
package/src/assets/theme.css
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');
|
|
2
2
|
@import 'constants.css';
|
|
3
3
|
|
|
4
|
+
.roboto-regular {
|
|
5
|
+
font-family: 'Roboto', sans-serif;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.roboto-medium {
|
|
11
|
+
font-family: 'Roboto', sans-serif;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
}
|
|
15
|
+
|
|
4
16
|
body {
|
|
5
17
|
font-family: 'Roboto', sans-serif;
|
|
6
18
|
font-weight: 400;
|
|
19
|
+
font-style: normal;
|
|
7
20
|
background-color: var(--dl-color-bg);
|
|
8
21
|
}
|
|
9
22
|
|
|
@@ -53,7 +66,7 @@ body {
|
|
|
53
66
|
--dl-color-fill-third: #fbfbfb;
|
|
54
67
|
--dl-color-link: #20abfa;
|
|
55
68
|
--dl-color-cell-background: #fffae2;
|
|
56
|
-
--dl-color-disabled-slider: #
|
|
69
|
+
--dl-color-disabled-slider: #b3b3b3;
|
|
57
70
|
--q-color-positive: #38d079;
|
|
58
71
|
--q-color-warning: #e1b75b;
|
|
59
72
|
|
|
@@ -136,4 +149,4 @@ body {
|
|
|
136
149
|
--dl-json-editor-value-color-boolean: #56b6c2;
|
|
137
150
|
--dl-json-editor-value-color-number: #d19a66;
|
|
138
151
|
--dl-json-editor-value-color-string: #98c379;
|
|
139
|
-
}
|
|
152
|
+
}
|
|
@@ -57,11 +57,18 @@ export default defineComponent({
|
|
|
57
57
|
const val = evt.target.value
|
|
58
58
|
if (val === '') return
|
|
59
59
|
|
|
60
|
-
const { value } = getInputValue(
|
|
60
|
+
const { value, isUpdated } = getInputValue(
|
|
61
|
+
val,
|
|
62
|
+
props.min,
|
|
63
|
+
props.max
|
|
64
|
+
)
|
|
61
65
|
|
|
62
|
-
emit('change',
|
|
63
|
-
emit('update:model-value',
|
|
64
|
-
|
|
66
|
+
emit('change', value)
|
|
67
|
+
emit('update:model-value', value)
|
|
68
|
+
|
|
69
|
+
if (isUpdated) {
|
|
70
|
+
if (sliderInput.value) sliderInput.value.value = value
|
|
71
|
+
}
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
const debouncedHandleChange = computed(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const getInputValue = (value: string, min: number, max: number) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const numericValue = parseFloat(value)
|
|
3
|
+
const clampedValue = Math.max(min, Math.min(numericValue, max))
|
|
4
|
+
const isUpdated = numericValue !== clampedValue
|
|
5
5
|
|
|
6
|
-
return { value }
|
|
6
|
+
return { value: clampedValue.toString(), isUpdated }
|
|
7
7
|
}
|