@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.
@@ -30,4 +30,9 @@
30
30
  padding: var(--e-space-4);
31
31
  }
32
32
  }
33
+
34
+ &:has(.richtext) {
35
+ // Force this font-size for richtext. (has effect on text without <p>)
36
+ @include a.type(200);
37
+ }
33
38
  }
@@ -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/' as a;
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
- width: a.rem(56);
31
- height: a.rem(56);
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
- setTimeout(() => {
33
- rootEl.value.scrollIntoView()
34
- }, 80)
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
- lottie.setFrame(value - 1)
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
- // Set initial state of animation
35
- lottie.setSegment(0, model.value)
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
- lottie.addEventListener('complete', () => {
38
- // Reset segment
39
- lottie.setSegment(0, 100)
40
- })
40
+ lottie.addEventListener('complete', () => {
41
+ // Reset segment
42
+ lottie.setSegment(0, 100)
43
+ })
41
44
 
42
- lottie.play()
45
+ lottie.play()
46
+ }
43
47
  })
44
48
 
45
49
  lottie.addEventListener('ready', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",