@dataloop-ai/components 0.20.261-new-input.6 → 0.20.262

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.20.261-new-input.6",
3
+ "version": "0.20.262",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -748,7 +748,7 @@ export default defineComponent({
748
748
  const setHighlightedIndex = (value: any) => {
749
749
  highlightedIndex.value = value
750
750
  }
751
- const handleSelectedItem = (value: unknown) => {
751
+ const handleSelectedItem = (value: string | null | undefined) => {
752
752
  if (typeof value !== 'string') {
753
753
  return
754
754
  }
@@ -1173,10 +1173,7 @@ export default defineComponent({
1173
1173
  return !this.$slots.append && this.type === 'password'
1174
1174
  },
1175
1175
  showSuggestItems(): boolean {
1176
- const hasValue =
1177
- this.modelValue !== null &&
1178
- this.modelValue !== undefined &&
1179
- `${this.modelValue}`.length > 0
1176
+ const hasValue = String(this.modelValue ?? '').length > 0
1180
1177
  return (
1181
1178
  !!this.suggestItems?.length &&
1182
1179
  (hasValue || (this.openSuggestionsOnFocus && this.focused))
@@ -1655,7 +1652,7 @@ export default defineComponent({
1655
1652
  white-space: var(--dl-input-white-space);
1656
1653
  font-size: var(--dl-typography-body-body2-font-size);
1657
1654
  font-weight: var(--dl-typography-body-body2-font-weight);
1658
- overflow: hidden scroll;
1655
+ overflow: hidden;
1659
1656
  text-overflow: ellipsis;
1660
1657
  box-sizing: content-box;
1661
1658
  word-wrap: break-word;
@@ -1677,6 +1674,7 @@ export default defineComponent({
1677
1674
 
1678
1675
  &--prepend {
1679
1676
  width: calc(100% - 10px - 28px);
1677
+ padding-right: 8px;
1680
1678
  }
1681
1679
 
1682
1680
  &--append {
@@ -136,10 +136,9 @@
136
136
  }
137
137
  "
138
138
  >
139
- <dl-ellipsis v-if="fitAllColumns">
139
+ <dl-ellipsis>
140
140
  {{ col.label }}
141
141
  </dl-ellipsis>
142
- <span v-else> {{ col.label }} </span>
143
142
  </span>
144
143
  </DlTh>
145
144
  </slot>
@@ -540,10 +539,9 @@
540
539
  }
541
540
  "
542
541
  >
543
- <dl-ellipsis v-if="fitAllColumns">
542
+ <dl-ellipsis>
544
543
  {{ col.label }}
545
544
  </dl-ellipsis>
546
- <span v-else> {{ col.label }} </span>
547
545
  </span>
548
546
  </DlTh>
549
547
  </slot>
@@ -355,7 +355,7 @@ export default defineComponent({
355
355
  background: none;
356
356
  border: 1px solid var(--dl-color-separator);
357
357
  border-radius: 2px;
358
- padding: 10px;
358
+ padding: 6px;
359
359
  font-family: var(--dl-typography-body-body2-font-family);
360
360
  font-size: var(--dl-typography-body-body2-font-size);
361
361
  line-height: var(--dl-typography-body-body2-line-height);
@@ -287,6 +287,8 @@ export default defineComponent({
287
287
  return
288
288
  }
289
289
 
290
+ const naturalWidth = el.scrollWidth
291
+
290
292
  setPosition({
291
293
  el,
292
294
  offset: props.offset as number[],
@@ -296,6 +298,10 @@ export default defineComponent({
296
298
  maxWidth: props.maxWidth,
297
299
  maxHeight: props.maxHeight
298
300
  })
301
+
302
+ if (naturalWidth <= 60) {
303
+ el.style.width = 'max-content'
304
+ }
299
305
  }
300
306
 
301
307
  function delayShow(evt: AnchorEvent) {