@dataloop-ai/components 0.13.4 → 0.13.6

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.13.4",
3
+ "version": "0.13.6",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -12,7 +12,7 @@
12
12
  />
13
13
  <div
14
14
  class="dialog-wrapper"
15
- :style="{ maxWidth: `${width}px` }"
15
+ :style="{ maxWidth: Number(width) ? `${width}px` : width }"
16
16
  :class="{ 'dialog-wrapper--fullscreen': fullscreen }"
17
17
  >
18
18
  <div
@@ -49,7 +49,7 @@ export default defineComponent({
49
49
  event: 'update:modelValue'
50
50
  },
51
51
  props: {
52
- width: { type: Number, default: 400 },
52
+ width: { type: [Number, String], default: 400 },
53
53
  fullscreen: Boolean,
54
54
  modelValue: Boolean,
55
55
  volatile: { type: Boolean, default: false }
@@ -102,6 +102,15 @@
102
102
  </dl-tooltip>
103
103
  </span>
104
104
  </div>
105
+ <div
106
+ v-show="hasAction"
107
+ :class="[
108
+ ...adornmentClasses,
109
+ 'dl-text-input__adornment-container--pos-right-out'
110
+ ]"
111
+ >
112
+ <slot name="action" />
113
+ </div>
105
114
  <dl-menu
106
115
  v-if="showSuggestItems"
107
116
  v-model="isMenuOpen"
@@ -323,9 +332,9 @@ export default defineComponent({
323
332
  computed: {
324
333
  bottomMessage(): boolean {
325
334
  return (
326
- !!this.infoMessage.length ||
327
- !!this.errorMessage.length ||
328
- !!this.warningMessage.length ||
335
+ !!this.infoMessage?.length ||
336
+ !!this.errorMessage?.length ||
337
+ !!this.warningMessage?.length ||
329
338
  this.showCounter
330
339
  )
331
340
  },
@@ -391,6 +400,9 @@ export default defineComponent({
391
400
  !this.isSmall
392
401
  )
393
402
  },
403
+ hasAction(): boolean {
404
+ return !!this.$slots.action && !this.isSmall
405
+ },
394
406
  passShowIcon(): string {
395
407
  return this.showPass ? 'icon-dl-hide' : 'icon-dl-show'
396
408
  },
@@ -725,7 +737,11 @@ export default defineComponent({
725
737
 
726
738
  &--pos-right {
727
739
  top: 0;
728
- right: 0px;
740
+ right: 0;
741
+ }
742
+ &--pos-right-out {
743
+ top: 0;
744
+ right: -30px;
729
745
  }
730
746
  }
731
747