@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.20.187",
3
+ "version": "0.20.188",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -28,7 +28,10 @@
28
28
  <dl-ellipsis>
29
29
  {{ getStepTitle(step) }}
30
30
  </dl-ellipsis>
31
- <dl-ellipsis class="sidebar--subtitle">
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
  }
@@ -2,6 +2,7 @@ export interface StepState {
2
2
  value: string
3
3
  title: string
4
4
  subtitle?: string
5
+ subtitleTooltip?: string
5
6
  icon?: string
6
7
  active?: boolean
7
8
  completed?: boolean
@@ -36,7 +36,8 @@
36
36
  :anchor="tooltipPosition"
37
37
  :offset="tooltipOffset"
38
38
  >
39
- <slot v-if="hasDefaultSlot" name="default" />
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 && props.tooltip
150
+ () => props.tooltip && (hasEllipsis.value || !!props.tooltipText)
146
151
  )
147
152
  const fullText = computed(() => props.text)
148
153