@dataloop-ai/components 0.19.197 → 0.19.199

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.19.197",
3
+ "version": "0.19.199",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -1,14 +1,6 @@
1
1
  <template>
2
- <div
3
- :id="uuid"
4
- class="slider-content"
5
- :style="sliderStyles"
6
- >
7
- <div
8
- v-if="slim"
9
- class="slider slim"
10
- data-test="slim-slider"
11
- >
2
+ <div :id="uuid" class="slider-content" :style="sliderStyles">
3
+ <div v-if="slim" class="slider slim" data-test="slim-slider">
12
4
  <span class="text capitalize">{{ text }}</span>
13
5
  <dl-slider-input
14
6
  v-model="value"
@@ -18,6 +10,8 @@
18
10
  :disabled="disabled"
19
11
  :style="{ marginRight: '10px' }"
20
12
  data-test="slim-slider-input"
13
+ @focus="handleFocus"
14
+ @blur="handleBlur"
21
15
  />
22
16
  <div class="slider-bar-container">
23
17
  <dl-slider-base
@@ -35,11 +29,7 @@
35
29
  />
36
30
  </div>
37
31
  </div>
38
- <div
39
- v-else
40
- class="slider non-slim"
41
- data-test="non-slim-slider"
42
- >
32
+ <div v-else class="slider non-slim" data-test="non-slim-slider">
43
33
  <div class="header">
44
34
  <div class="row text capitalize">
45
35
  {{ text }}
@@ -72,6 +62,8 @@
72
62
  :disabled="disabled"
73
63
  data-test="non-slim-slider-input"
74
64
  @change="onChange"
65
+ @focus="handleFocus"
66
+ @blur="handleBlur"
75
67
  />
76
68
  </div>
77
69
  </div>
@@ -184,7 +176,7 @@ export default defineComponent({
184
176
  required: false
185
177
  }
186
178
  },
187
- emits: ['update:model-value', 'change'],
179
+ emits: ['update:model-value', 'change', 'input-focus', 'input-blur'],
188
180
  setup(props, { emit }) {
189
181
  const { modelValue, min, max, textColor, width, thumbSize, color } =
190
182
  toRefs(props)
@@ -256,6 +248,14 @@ export default defineComponent({
256
248
  onChange,
257
249
  handleResetButtonClick
258
250
  }
251
+ },
252
+ methods: {
253
+ handleFocus(e: Event) {
254
+ this.$emit('input-focus', e)
255
+ },
256
+ handleBlur(e: Event) {
257
+ this.$emit('input-blur', e)
258
+ }
259
259
  }
260
260
  })
261
261
  </script>
@@ -9,7 +9,9 @@
9
9
  :disabled="disabled"
10
10
  @input="handleChange"
11
11
  @change="handleChange"
12
- >
12
+ @focus="handleFocus"
13
+ @blur="handleBlur"
14
+ />
13
15
  </template>
14
16
 
15
17
  <script lang="ts">
@@ -46,7 +48,7 @@ export default defineComponent({
46
48
  default: false
47
49
  }
48
50
  },
49
- emits: ['update:model-value', 'change'],
51
+ emits: ['update:model-value', 'change', 'focus', 'blur'],
50
52
  setup(props, { emit }) {
51
53
  const modelRef = toRef(props, 'modelValue')
52
54
  const sliderInput = ref<HTMLInputElement>(null)
@@ -75,6 +77,14 @@ export default defineComponent({
75
77
  handleChange: debouncedHandleChange
76
78
  }
77
79
  },
80
+ methods: {
81
+ handleFocus(e: Event) {
82
+ this.$emit('focus', e)
83
+ },
84
+ handleBlur(e: Event) {
85
+ this.$emit('blur', e)
86
+ }
87
+ },
78
88
  template: 'dl-slider-input'
79
89
  })
80
90
  </script>
@@ -317,6 +317,10 @@
317
317
  }
318
318
  }
319
319
 
320
+ &__progress > .relative-position {
321
+ z-index: 102;
322
+ }
323
+
320
324
  &__bottom {
321
325
  border-top: 1px solid var(--dl-color-separator);
322
326
  min-height: 50px;
@@ -11,11 +11,11 @@
11
11
  :readonly="readonly"
12
12
  :disabled="disabled"
13
13
  @change="handleChange"
14
+ @input-focus="handleFocus"
15
+ @input-blur="handleBlur"
14
16
  />
15
17
  <div>
16
- <button @click="slim = !slim">
17
- slim: {{ slim }}
18
- </button>
18
+ <button @click="slim = !slim">slim: {{ slim }}</button>
19
19
  <button @click="readonly = !readonly">
20
20
  Readonly: {{ readonly }}
21
21
  </button>
@@ -24,7 +24,7 @@
24
24
  </button>
25
25
  </div>
26
26
  <div>
27
- Events: <br>
27
+ Events: <br />
28
28
  {{ events }}
29
29
  </div>
30
30
  </div>
@@ -58,6 +58,12 @@ export default defineComponent({
58
58
  handleChange(value: number) {
59
59
  console.log(`@@@ handling change ${value}`)
60
60
  this.events[1] = `@@@ handling change ${value}`
61
+ },
62
+ handleFocus(event: Event) {
63
+ this.events[1] = `@@@ Input Focus `
64
+ },
65
+ handleBlur(event: Event) {
66
+ this.events[1] = `@@@ Input Blur `
61
67
  }
62
68
  },
63
69
  template: 'dl-slider-demo'