@dataloop-ai/components 0.19.20 → 0.19.22

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.20",
3
+ "version": "0.19.22",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -66,6 +66,7 @@
66
66
  :class="`${
67
67
  isSmall ? 'col' : 'row'
68
68
  } bottom-section full-width full-height`"
69
+ :style="{ cursor: disabled ? 'not-allowed' : '' }"
69
70
  >
70
71
  <div class="row center full-width full-height">
71
72
  <div :class="wrapperClasses">
@@ -80,7 +81,7 @@
80
81
  </div>
81
82
  <div
82
83
  ref="input"
83
- :contenteditable="!readonly"
84
+ :contenteditable="!readonly && !disabled"
84
85
  :class="inputClasses"
85
86
  :placeholder="placeholder"
86
87
  @input="onChange"
@@ -91,10 +92,11 @@
91
92
  @paste="handlePaste"
92
93
  >
93
94
  <span
94
- v-if="readonly"
95
- :class="
96
- showPlaceholder ? 'placeholder-string' : ''
97
- "
95
+ v-if="readonly || disabled"
96
+ :class="{
97
+ 'placeholder-string': showPlaceholder,
98
+ 'placeholder-string--disabled': disabled
99
+ }"
98
100
  >{{
99
101
  showPlaceholder ? placeholder : modelValue
100
102
  }}</span>
@@ -719,7 +721,9 @@ export default defineComponent({
719
721
  )
720
722
 
721
723
  onMounted(() => {
722
- input.value.innerHTML = modelValue.value
724
+ if (String(modelValue.value ?? '').length) {
725
+ input.value.innerHTML = modelValue.value
726
+ }
723
727
  })
724
728
 
725
729
  return {
@@ -816,6 +820,10 @@ export default defineComponent({
816
820
  classes.push('dl-input__input--password')
817
821
  }
818
822
 
823
+ if (this.disabled) {
824
+ classes.push('dl-input__input--disabled')
825
+ }
826
+
819
827
  return classes
820
828
  },
821
829
  asteriskClasses(): string[] {
@@ -1300,6 +1308,12 @@ export default defineComponent({
1300
1308
  border-color: var(--dl-color-separator) !important;
1301
1309
  }
1302
1310
  }
1311
+
1312
+ .placeholder-string--disabled,
1313
+ &--disabled {
1314
+ color: var(--dl-color-disabled);
1315
+ pointer-events: none;
1316
+ }
1303
1317
  }
1304
1318
 
1305
1319
  &__adornment-container {
@@ -601,6 +601,7 @@ export default defineComponent({
601
601
  showDatePicker.value = false
602
602
  showSuggestions.value = true
603
603
  datePickerSelection.value = null
604
+ setInputValue(searchQuery.value + ' ', { noEmit: true })
604
605
  setCaretAtTheEnd(input.value)
605
606
  return
606
607
  }
@@ -5,6 +5,11 @@
5
5
  readonly
6
6
  />
7
7
 
8
+ <dl-input
9
+ placeholder="placeholder input disabled"
10
+ disabled
11
+ />
12
+
8
13
  <dl-input
9
14
  v-model="textInputValue"
10
15
  max-width="100%"