@dataloop-ai/components 0.17.39 → 0.17.41

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.17.39",
3
+ "version": "0.17.41",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -267,7 +267,7 @@ export default defineComponent({
267
267
  }
268
268
 
269
269
  .content {
270
- padding: var(--dl-dialog-box-content-padding, 10px 16px 30px 16px);
270
+ padding: var(--dl-dialog-box-content-padding, 20px 16px 30px 16px);
271
271
  overflow: auto;
272
272
  height: 100%;
273
273
 
@@ -281,7 +281,7 @@ export default defineComponent({
281
281
 
282
282
  .footer {
283
283
  display: flex;
284
- padding: 16px;
284
+ padding: 20px 16px;
285
285
  border-top: var(--dl-dialog-separator);
286
286
  }
287
287
 
@@ -70,6 +70,7 @@ export default defineComponent({
70
70
  width: 100%;
71
71
  align-items: flex-start;
72
72
  justify-content: space-between;
73
+ padding-top: 20px;
73
74
  }
74
75
 
75
76
  .title {
@@ -4,31 +4,61 @@
4
4
  class="dl-text-holder"
5
5
  >
6
6
  <span v-if="prefix">{{ prefixPreview }}</span>
7
- <span class="dl-text-holder--value">
8
- <slot> {{ textPreview }} </slot>
9
- </span>
7
+ <dl-ellipsis
8
+ :text="textPreview"
9
+ :split="split"
10
+ :split-position="splitPosition"
11
+ />
10
12
  <span v-if="suffix"> {{ suffixPreview }}</span>
11
13
  </span>
12
14
  </template>
13
15
 
14
16
  <script lang="ts">
15
17
  import { v4 } from 'uuid'
18
+ import { DlEllipsis } from '../../basic/DlEllipsis'
16
19
  import { defineComponent } from 'vue-demi'
17
20
 
18
21
  export default defineComponent({
19
22
  name: 'DlTextHolder',
23
+ components: { DlEllipsis },
20
24
  props: {
25
+ /**
26
+ * Prefix to be displayed
27
+ */
21
28
  prefix: {
22
29
  type: String,
23
30
  default: null
24
31
  },
32
+ /**
33
+ * Suffix to be displayed
34
+ */
25
35
  suffix: {
26
36
  type: String,
27
37
  default: null
28
38
  },
39
+ /**
40
+ * Text to be displayed
41
+ */
29
42
  text: {
30
43
  type: String,
31
- required: true
44
+ default: ''
45
+ },
46
+ /**
47
+ * Allows to split the text in two parts
48
+ */
49
+ split: {
50
+ type: Boolean,
51
+ default: false,
52
+ required: false
53
+ },
54
+ /**
55
+ * Position of the split in the text, % of the text length
56
+ */
57
+ splitPosition: {
58
+ type: Number,
59
+ required: false,
60
+ default: 0.5,
61
+ validator: (value: number) => value >= 0 && value <= 1
32
62
  }
33
63
  },
34
64
  data() {
@@ -44,7 +74,7 @@ export default defineComponent({
44
74
  return this.suffix?.trim() ?? ''
45
75
  },
46
76
  textPreview(): string {
47
- return this.text
77
+ return this.text || ''
48
78
  }
49
79
  }
50
80
  })
@@ -55,11 +85,6 @@ export default defineComponent({
55
85
  display: flex;
56
86
  flex-wrap: nowrap;
57
87
  width: 100%;
58
-
59
- &--value {
60
- white-space: nowrap;
61
- overflow: hidden;
62
- text-overflow: ellipsis;
63
- }
88
+ white-space: nowrap;
64
89
  }
65
90
  </style>
@@ -10,9 +10,17 @@
10
10
  <dl-text-holder
11
11
  prefix="home/Desktop/"
12
12
  suffix=".mp3"
13
- >
14
- very-loooooooooooong-named-song2
15
- </dl-text-holder>
13
+ text="very-loooooooooooong-named-song"
14
+ split
15
+ />
16
+
17
+ <dl-text-holder
18
+ prefix="home/Desktop/"
19
+ suffix=".mp3"
20
+ text="very-loooooooooooong-named-song"
21
+ split
22
+ :split-position="0.7"
23
+ />
16
24
  </div>
17
25
  </div>
18
26
  </template>