@dataloop-ai/components 0.20.187 → 0.20.188
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 +1 -1
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +4 -1
- package/src/components/compound/DlStepper/models/Step.ts +9 -0
- package/src/components/compound/DlStepper/models/interfaces.ts +1 -0
- package/src/components/essential/DlEllipsis/DlEllipsis.vue +7 -2
package/package.json
CHANGED
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
<dl-ellipsis>
|
|
29
29
|
{{ getStepTitle(step) }}
|
|
30
30
|
</dl-ellipsis>
|
|
31
|
-
<dl-ellipsis
|
|
31
|
+
<dl-ellipsis
|
|
32
|
+
class="sidebar--subtitle"
|
|
33
|
+
:tooltip-text="step.subtitleTooltip"
|
|
34
|
+
>
|
|
32
35
|
{{ getStepSubtitle(step) }}
|
|
33
36
|
</dl-ellipsis>
|
|
34
37
|
</div>
|
|
@@ -9,6 +9,7 @@ export class Step {
|
|
|
9
9
|
this._initialState = {
|
|
10
10
|
active: false,
|
|
11
11
|
subtitle: '',
|
|
12
|
+
subtitleTooltip: '',
|
|
12
13
|
completed: false,
|
|
13
14
|
optional: false,
|
|
14
15
|
disabled: false,
|
|
@@ -42,6 +43,14 @@ export class Step {
|
|
|
42
43
|
set(this._state, 'subtitle', value)
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
public get subtitleTooltip(): string {
|
|
47
|
+
return this._state.subtitleTooltip
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public set subtitleTooltip(value: string) {
|
|
51
|
+
set(this._state, 'subtitleTooltip', value)
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
public get icon(): string {
|
|
46
55
|
return this._state.icon
|
|
47
56
|
}
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
:anchor="tooltipPosition"
|
|
37
37
|
:offset="tooltipOffset"
|
|
38
38
|
>
|
|
39
|
-
<
|
|
39
|
+
<span v-if="tooltipText">{{ tooltipText }}</span>
|
|
40
|
+
<slot v-else-if="hasDefaultSlot" name="default" />
|
|
40
41
|
<span v-else>{{ fullText }}</span>
|
|
41
42
|
</dl-tooltip>
|
|
42
43
|
</div>
|
|
@@ -96,6 +97,10 @@ export default defineComponent({
|
|
|
96
97
|
type: Array,
|
|
97
98
|
default: () => [0, 25]
|
|
98
99
|
},
|
|
100
|
+
tooltipText: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: ''
|
|
103
|
+
},
|
|
99
104
|
/**
|
|
100
105
|
* Allows to display multiline text
|
|
101
106
|
*/
|
|
@@ -142,7 +147,7 @@ export default defineComponent({
|
|
|
142
147
|
return ''
|
|
143
148
|
})
|
|
144
149
|
const shouldShowTooltip = computed(
|
|
145
|
-
() => hasEllipsis.value
|
|
150
|
+
() => props.tooltip && (hasEllipsis.value || !!props.tooltipText)
|
|
146
151
|
)
|
|
147
152
|
const fullText = computed(() => props.text)
|
|
148
153
|
|