@energie360/ui-library 0.1.48 → 0.1.49

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.
@@ -82,6 +82,17 @@ const onEsc = (e) => {
82
82
  }
83
83
 
84
84
  const onDocumentClick = (e: Event) => {
85
+ // Check if the click was inside the menu
86
+ const isInside = menuEl.value?.contains(e.target as Node)
87
+
88
+ if (isInside) {
89
+ // If it's inside, we want the click to work (for links, buttons, etc.)
90
+ // but we still want to close the menu
91
+ isOpen.value = false
92
+ return
93
+ }
94
+
95
+ // If it's outside, we close and prevent default behavior
85
96
  e.stopPropagation()
86
97
  e.preventDefault()
87
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,9 +24,11 @@ const hasText = computed(() => !!slots.text || text)
24
24
  <div class="wizard-outro">
25
25
  <div class="row wizard-outro__row">
26
26
  <div class="wizard-outro__image-col">
27
- <slot name="image">
28
- <img v-if="image" :src="image.src" :alt="image.alt" />
29
- </slot>
27
+ <div class="wizard-outro__image-wrapper">
28
+ <slot name="image">
29
+ <img v-if="image" :src="image.src" :alt="image.alt" />
30
+ </slot>
31
+ </div>
30
32
  </div>
31
33
  <div class="wizard-outro__content-col">
32
34
  <h1 class="wizard-outro__title">
@@ -26,6 +26,18 @@
26
26
  }
27
27
  }
28
28
 
29
+ .wizard-outro__image-wrapper {
30
+ aspect-ratio: 3/2;
31
+ width: 100%;
32
+
33
+ > * {
34
+ object-fit: contain;
35
+ width: 100%;
36
+ height: 100%;
37
+ object-position: top center;
38
+ }
39
+ }
40
+
29
41
  .wizard-outro__content-col {
30
42
  @include g.grid-col(6, 10);
31
43
 
@@ -3,7 +3,9 @@
3
3
  <div class="container">
4
4
  <div class="wizard-top-bar__inner">
5
5
  <div class="wizard-top-bar__logo">
6
- <img src="/static/ui-assets/images/logo.svg" alt="logo" />
6
+ <slot name="logo">
7
+ <img src="/static/ui-assets/images/logo.svg" alt="logo" />
8
+ </slot>
7
9
  </div>
8
10
 
9
11
  <div class="wizard-top-bar__right-column">