@dataloop-ai/components 0.19.216 → 0.19.217
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/DlStepper.vue +2 -0
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +14 -2
- package/src/components/compound/DlStepper/models/Step.ts +9 -0
- package/src/components/compound/DlStepper/models/interfaces.ts +1 -0
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:duration="transitionDuration"
|
|
9
9
|
>
|
|
10
10
|
<dl-stepper-header
|
|
11
|
+
v-if="!hideHeader"
|
|
11
12
|
:header-title="headerTitle"
|
|
12
13
|
:hide-close-button="hideCloseButton"
|
|
13
14
|
@close="closeStepper"
|
|
@@ -142,6 +143,7 @@ export default defineComponent({
|
|
|
142
143
|
default: 'dl-color-fill-third'
|
|
143
144
|
},
|
|
144
145
|
withTransition: Boolean,
|
|
146
|
+
hideHeader: Boolean,
|
|
145
147
|
transitionDuration: {
|
|
146
148
|
type: Number,
|
|
147
149
|
required: false,
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
:key="index"
|
|
7
7
|
:data-test-index="index"
|
|
8
8
|
:end-icon="endIcon(step)"
|
|
9
|
+
:start-icon="
|
|
10
|
+
step.icon
|
|
11
|
+
? { icon: step.icon, color: 'secondary' }
|
|
12
|
+
: undefined
|
|
13
|
+
"
|
|
9
14
|
:clickable="!disabled"
|
|
10
15
|
:disabled="isStepDisabled(step)"
|
|
11
16
|
:class="sidebarItemClasses(step)"
|
|
@@ -13,7 +18,7 @@
|
|
|
13
18
|
>
|
|
14
19
|
<dl-item-section no-wrap>
|
|
15
20
|
<span :class="stepClass(step)">
|
|
16
|
-
{{ index + 1 }}.
|
|
21
|
+
<span v-if="!step.icon">{{ index + 1 }}. </span>
|
|
17
22
|
<div>
|
|
18
23
|
<span>
|
|
19
24
|
{{ getStepTitle(step) }}
|
|
@@ -83,9 +88,13 @@ export default defineComponent({
|
|
|
83
88
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
84
89
|
},
|
|
85
90
|
sidebarItemClasses(step: Step): string {
|
|
86
|
-
|
|
91
|
+
const classes = `sidebar--item${
|
|
87
92
|
step.subtitle ? ' sidebar--item-with_subtitle' : ''
|
|
88
93
|
}`
|
|
94
|
+
if (step.active) {
|
|
95
|
+
return `${classes} sidebar--item-active`
|
|
96
|
+
}
|
|
97
|
+
return classes
|
|
89
98
|
},
|
|
90
99
|
stepClass(step: Step) {
|
|
91
100
|
const active = step.active
|
|
@@ -145,6 +154,9 @@ export default defineComponent({
|
|
|
145
154
|
height: 43px;
|
|
146
155
|
}
|
|
147
156
|
}
|
|
157
|
+
&-active {
|
|
158
|
+
background-color: var(--dl-color-back-tint-light);
|
|
159
|
+
}
|
|
148
160
|
}
|
|
149
161
|
|
|
150
162
|
&--subtitle {
|
|
@@ -15,6 +15,7 @@ export class Step {
|
|
|
15
15
|
disabledTooltip: '',
|
|
16
16
|
error: '',
|
|
17
17
|
warning: '',
|
|
18
|
+
icon: state.icon || undefined,
|
|
18
19
|
...state
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -41,6 +42,14 @@ export class Step {
|
|
|
41
42
|
set(this._state, 'subtitle', value)
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
public get icon(): string {
|
|
46
|
+
return this._state.icon
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public set icon(value: string) {
|
|
50
|
+
set(this._state, 'icon', value)
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
public get optional(): boolean {
|
|
45
54
|
return this._state.optional
|
|
46
55
|
}
|