@redseed/redseed-ui-vue3 8.7.0 → 8.8.0
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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
percentage: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 0,
|
|
8
|
+
},
|
|
9
|
+
secondary: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
disabled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
success: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
warning: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
error: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
info: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
ai: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const fillPercentage = computed(() => {
|
|
40
|
+
return Math.min(Math.max(props.percentage, 0), 100)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
const fillStyle = computed(() => ({
|
|
44
|
+
width: `${fillPercentage.value}%`,
|
|
45
|
+
}))
|
|
46
|
+
|
|
47
|
+
const fillClass = computed(() => [
|
|
48
|
+
'rsui-progress-bar__fill',
|
|
49
|
+
{
|
|
50
|
+
'rsui-progress-bar__fill--secondary': props.secondary,
|
|
51
|
+
'rsui-progress-bar__fill--disabled': props.disabled,
|
|
52
|
+
'rsui-progress-bar__fill--success': props.success,
|
|
53
|
+
'rsui-progress-bar__fill--warning': props.warning,
|
|
54
|
+
'rsui-progress-bar__fill--error': props.error,
|
|
55
|
+
'rsui-progress-bar__fill--info': props.info,
|
|
56
|
+
'rsui-progress-bar__fill--ai': props.ai,
|
|
57
|
+
},
|
|
58
|
+
])
|
|
59
|
+
</script>
|
|
60
|
+
<template>
|
|
61
|
+
<div class="rsui-progress-bar">
|
|
62
|
+
<div class="rsui-progress-bar__track">
|
|
63
|
+
<div :class="fillClass" :style="fillStyle"></div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="rsui-progress-bar__label">
|
|
66
|
+
<slot>{{ fillPercentage }}%</slot>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import ProgressBar from './ProgressBar.vue'
|
|
1
2
|
import ProgressCircle from './ProgressCircle.vue'
|
|
2
3
|
import ProgressTracker from './ProgressTracker.vue'
|
|
3
4
|
import ProgressTrackerStep from './ProgressTrackerStep.vue'
|
|
4
5
|
|
|
5
6
|
export {
|
|
7
|
+
ProgressBar,
|
|
6
8
|
ProgressCircle,
|
|
7
9
|
ProgressTracker,
|
|
8
10
|
ProgressTrackerStep
|
|
@@ -171,6 +171,10 @@ function showPreviousSlide() {
|
|
|
171
171
|
>
|
|
172
172
|
<template #header>
|
|
173
173
|
<SectionHeader :showDivider="false" :showMoreActions="false">
|
|
174
|
+
<template v-if="slots.icon" #icon>
|
|
175
|
+
<slot name="icon"></slot>
|
|
176
|
+
</template>
|
|
177
|
+
|
|
174
178
|
<slot name="title"></slot>
|
|
175
179
|
|
|
176
180
|
<template v-if="slots.subtitle" #subtitle>
|
|
@@ -223,5 +227,7 @@ function showPreviousSlide() {
|
|
|
223
227
|
<slot name="item" :item="item"></slot>
|
|
224
228
|
</SectionSliderItem>
|
|
225
229
|
</div>
|
|
230
|
+
|
|
231
|
+
<slot v-if="slots.empty && items.length === 0" name="empty"></slot>
|
|
226
232
|
</Section>
|
|
227
233
|
</template>
|