@dataloop-ai/components 0.18.100 → 0.18.101

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.18.100",
3
+ "version": "0.18.101",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -191,6 +191,9 @@ export default defineComponent({
191
191
  if (active.value) {
192
192
  classes.push('active-class')
193
193
  }
194
+ if (props.dense) {
195
+ classes.push('dl-button--dense')
196
+ }
194
197
  return classes
195
198
  })
196
199
 
@@ -462,6 +465,11 @@ export default defineComponent({
462
465
  }
463
466
  }
464
467
 
468
+ &--dense {
469
+ border: none;
470
+ padding: 0;
471
+ }
472
+
465
473
  &:hover:enabled:not(:active) {
466
474
  transition: var(--dl-button-transition-duration);
467
475
  color: var(--dl-button-text-color-hover);
@@ -27,14 +27,17 @@
27
27
  >
28
28
  <div
29
29
  ref="dlChipRef"
30
- :class="{ 'dl-chip--ellipsis': overflow }"
30
+ :class="{
31
+ 'dl-chip--ellipsis': overflow,
32
+ 'dl-chip--no-overflow': !overflow
33
+ }"
31
34
  >
32
35
  <slot>
33
36
  {{ hasLabel ? label : null }}
34
37
  </slot>
35
38
  </div>
36
39
  </div>
37
-
40
+ <slot name="suffix" />
38
41
  <span
39
42
  v-if="removable"
40
43
  class="dl-chip-remove-icon-container"
@@ -74,6 +77,7 @@ export default defineComponent({
74
77
  props: {
75
78
  disabled: Boolean,
76
79
  filled: { type: Boolean, default: true },
80
+ noBorder: { type: Boolean, default: false },
77
81
  outlined: Boolean,
78
82
  color: { type: String, default: 'dl-color-secondary' },
79
83
  textColor: { type: String, default: '' },
@@ -156,6 +160,7 @@ export default defineComponent({
156
160
  color: this.color
157
161
  }),
158
162
  '--dl-chip-border': setBorder({
163
+ noBorder: this.noBorder,
159
164
  disabled: this.disabled,
160
165
  color: this.color
161
166
  }),
@@ -216,6 +221,10 @@ export default defineComponent({
216
221
  white-space: nowrap;
217
222
  overflow: hidden;
218
223
  }
224
+
225
+ &--no-overflow {
226
+ overflow-wrap: break-word;
227
+ }
219
228
  }
220
229
 
221
230
  .dl-chip-remove-icon-container {
@@ -9,6 +9,7 @@ export interface DlChipProps {
9
9
  filled: boolean
10
10
  color: string
11
11
  textColor: string
12
+ noBorder: boolean
12
13
  }
13
14
 
14
15
  export const setTextColor = ({
@@ -42,7 +43,14 @@ export const setBgColor = ({
42
43
  return getColor(color, 'dl-color-secondary')
43
44
  }
44
45
 
45
- export const setBorder = ({ disabled, color = '' }: Partial<DlChipProps>) => {
46
+ export const setBorder = ({
47
+ noBorder,
48
+ disabled,
49
+ color = ''
50
+ }: Partial<DlChipProps>) => {
51
+ if (noBorder) {
52
+ return 'none'
53
+ }
46
54
  if (disabled) {
47
55
  return `1px solid var(--dl-color-disabled)`
48
56
  }
@@ -59,17 +67,17 @@ export const setPadding = ({
59
67
  const right = removable ? 20 : 5
60
68
 
61
69
  if (hasLabel && (removable || hasIcon)) {
62
- return `5px ${right}px 5px ${left}px`
70
+ return `3px ${right}px 3px ${left}px`
63
71
  }
64
72
 
65
73
  if (!hasLabel && hasIcon && removable) {
66
- return `5px ${right}px 5px 0`
74
+ return `3px ${right}px 3px 0`
67
75
  }
68
76
  if (removable || hasIcon) {
69
- return '5px 0'
77
+ return '3px 0'
70
78
  }
71
79
 
72
- return '5px'
80
+ return '3px 5px'
73
81
  }
74
82
 
75
83
  export const setRemoveIconWidth = ({
@@ -222,6 +222,10 @@ export default defineComponent({
222
222
  maxHeight: {
223
223
  type: String,
224
224
  default: '120px'
225
+ },
226
+ minHeight: {
227
+ type: String,
228
+ default: '80px'
225
229
  }
226
230
  },
227
231
  emits: ['input', 'focus', 'blur', 'clear', 'update:model-value', 'keydown'],
@@ -235,6 +239,7 @@ export default defineComponent({
235
239
  return {
236
240
  '--dl-textarea-max-width': props.width || 'auto',
237
241
  '--dl-textarea-max-height': props.maxHeight,
242
+ '--dl-textarea-min-height': props.minHeight,
238
243
  '--dl-textarea-width':
239
244
  borderBoxSize.value?.[0].inlineSize + 'px' || '100%'
240
245
  }
@@ -365,7 +370,7 @@ export default defineComponent({
365
370
  width: 100%;
366
371
  min-width: 100px;
367
372
  max-width: 100%;
368
- min-height: 80px;
373
+ min-height: var(--dl-textarea-min-height);
369
374
  max-height: var(--dl-textarea-max-height);
370
375
  outline: none;
371
376
  color: var(--dl-color-darker);