@energie360/ui-library 0.1.45 → 0.1.47
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/components/card-section/card-section.scss +5 -0
- package/components/card-table/u-card-table.vue +1 -1
- package/components/icon-text-block/icon-text-block.scss +4 -3
- package/components/inline-edit/u-inline-edit.vue +7 -4
- package/components/slider-progress-animation/u-slider-progress-animation.vue +12 -8
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ const getCellDiscount = (cell: Cell): string => (cell.discount ? cell.text : '')
|
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
27
|
<div class="card-table-wrapper">
|
|
28
|
-
<div class="card-table-heading">
|
|
28
|
+
<div v-if="title || secondaryTitle" class="card-table-heading">
|
|
29
29
|
<div v-if="title" class="card-table-heading__title">
|
|
30
30
|
{{ title }}
|
|
31
31
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../base/abstracts
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
2
|
|
|
3
3
|
.icon-text-block {
|
|
4
4
|
display: flex;
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.illustration {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
object-fit: contain;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.content {
|
|
@@ -8,9 +8,10 @@ interface Props {
|
|
|
8
8
|
summary?: string
|
|
9
9
|
description?: string
|
|
10
10
|
nonEditable?: boolean
|
|
11
|
+
autoscroll?: boolean
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
defineProps<Props>()
|
|
14
|
+
const { autoscroll = false } = defineProps<Props>()
|
|
14
15
|
|
|
15
16
|
const emit = defineEmits(['expanded', 'collapsed'])
|
|
16
17
|
const rootEl = useTemplateRef('root')
|
|
@@ -29,9 +30,11 @@ const onEditToggle = () => {
|
|
|
29
30
|
if (update && expanded.value) {
|
|
30
31
|
update(editId)
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (autoscroll) {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
rootEl.value.scrollIntoView()
|
|
36
|
+
}, 80)
|
|
37
|
+
}
|
|
35
38
|
|
|
36
39
|
return
|
|
37
40
|
}
|
|
@@ -22,7 +22,8 @@ let lottie = null
|
|
|
22
22
|
const lottieReady = ref(false)
|
|
23
23
|
|
|
24
24
|
const onChange = (value) => {
|
|
25
|
-
|
|
25
|
+
console.log(value)
|
|
26
|
+
lottie.setFrame(Math.max(0, value - 1))
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
onMounted(() => {
|
|
@@ -31,15 +32,18 @@ onMounted(() => {
|
|
|
31
32
|
lottie.addEventListener('load', () => {
|
|
32
33
|
lottieReady.value = true
|
|
33
34
|
|
|
34
|
-
//
|
|
35
|
-
|
|
35
|
+
// Don't play animation at all when initial value is 0.
|
|
36
|
+
if (model.value > 0) {
|
|
37
|
+
// Set initial state of animation
|
|
38
|
+
lottie.setSegment(0, model.value)
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
lottie.addEventListener('complete', () => {
|
|
41
|
+
// Reset segment
|
|
42
|
+
lottie.setSegment(0, 100)
|
|
43
|
+
})
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
lottie.play()
|
|
46
|
+
}
|
|
43
47
|
})
|
|
44
48
|
|
|
45
49
|
lottie.addEventListener('ready', () => {
|