@energie360/ui-library 0.1.40 → 0.1.42

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.
@@ -42,4 +42,8 @@
42
42
  @include a.bp(m) {
43
43
  display: none;
44
44
  }
45
+
46
+ > img {
47
+ width: 100%;
48
+ }
45
49
  }
@@ -47,3 +47,10 @@ defineSlots<{
47
47
  </template>
48
48
 
49
49
  <style scoped lang="scss" src="./card-contact.scss"></style>
50
+ <style scoped lang="scss">
51
+ .card-contact__image {
52
+ :slotted(img) {
53
+ width: 100%;
54
+ }
55
+ }
56
+ </style>
@@ -19,6 +19,10 @@
19
19
  + .card-info__title {
20
20
  margin-top: var(--e-space-4);
21
21
  }
22
+
23
+ > img {
24
+ width: 100%;
25
+ }
22
26
  }
23
27
 
24
28
  .card-info__title {
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { Image } from '../../elements/types'
3
+ import { hasSlotContent } from '../../utils/vue/helpers'
3
4
 
4
5
  interface Props {
5
6
  image?: Image
@@ -12,7 +13,7 @@ defineProps<Props>()
12
13
 
13
14
  <template>
14
15
  <section class="card-info">
15
- <div class="card-info__image">
16
+ <div v-if="hasSlotContent($slots.image) || image" class="card-info__image">
16
17
  <slot name="image">
17
18
  <img v-bind="image" />
18
19
  </slot>
@@ -33,3 +34,10 @@ defineProps<Props>()
33
34
  </template>
34
35
 
35
36
  <style scoped lang="scss" src="./card-info.scss"></style>
37
+ <style scoped lang="scss">
38
+ .card-info__image {
39
+ :slotted(img) {
40
+ width: 100%;
41
+ }
42
+ }
43
+ </style>
@@ -9,8 +9,9 @@
9
9
  width: a.rem(120);
10
10
  height: a.rem(120);
11
11
 
12
- > img {
13
- object-fit: cover;
12
+ > img,
13
+ ::slotted(img) {
14
+ object-fit: contain;
14
15
  width: 100%;
15
16
  height: 100%;
16
17
  }
@@ -1,19 +1,21 @@
1
1
  <script setup lang="ts">
2
2
  import { hasSlotContent } from '../../utils/vue/helpers'
3
+ import { Image } from '../../elements/types'
3
4
 
4
5
  interface Props {
5
6
  title?: string
6
7
  text?: string
8
+ image?: Image
7
9
  }
8
10
 
9
- defineProps<Props>()
11
+ const { image = { src: '/static/ui-assets/images/search.svg', alt: '' } } = defineProps<Props>()
10
12
  </script>
11
13
 
12
14
  <template>
13
15
  <div class="empty">
14
- <div class="empty__image">
16
+ <div v-if="hasSlotContent($slots.image) || image" class="empty__image">
15
17
  <slot name="image">
16
- <img src="/static/ui-assets/images/search.svg" alt="" />
18
+ <img v-bind="image" />
17
19
  </slot>
18
20
  </div>
19
21
 
@@ -30,3 +32,12 @@ defineProps<Props>()
30
32
  </template>
31
33
 
32
34
  <style scoped lang="scss" src="./empty.scss"></style>
35
+ <style scoped lang="scss">
36
+ .empty__image {
37
+ :slotted(img) {
38
+ object-fit: contain;
39
+ width: 100%;
40
+ height: 100%;
41
+ }
42
+ }
43
+ </style>
@@ -60,13 +60,25 @@ if (activeEdit) {
60
60
 
61
61
  const collapse = () => {
62
62
  expanded.value = false
63
+ emit('collapsed')
63
64
 
64
65
  if (update) {
65
66
  update('')
66
67
  }
67
68
  }
68
69
 
69
- defineExpose({ collapse })
70
+ const expand = () => {
71
+ expanded.value = true
72
+ emit('expanded')
73
+
74
+ update && update(editId)
75
+
76
+ setTimeout(() => {
77
+ rootEl.value.scrollIntoView()
78
+ }, 80)
79
+ }
80
+
81
+ defineExpose({ collapse, expand })
70
82
  </script>
71
83
 
72
84
  <template>
@@ -1,4 +1,4 @@
1
- @use '../../base/abstracts/' as a;
1
+ @use '../../base/abstracts' as a;
2
2
 
3
3
  .navigation-panel-tile {
4
4
  display: flex;
@@ -26,6 +26,12 @@
26
26
  border-color: var(--e-c-mono-200);
27
27
  }
28
28
 
29
+ &.greyed {
30
+ .navigation-panel-tile__icon-wrapper {
31
+ color: var(--e-c-mono-500);
32
+ }
33
+ }
34
+
29
35
  &.disabled {
30
36
  pointer-events: none;
31
37
  border-color: var(--e-c-mono-200);
@@ -7,9 +7,9 @@
7
7
  // This vertical centered style only works in the portal-main layout.
8
8
  // It's not really possible to do this "correctly" at the moment, because `portal-main__content` is `display: block`.
9
9
  // With `display: flex` it would work, but this would need some refactoring.
10
- position: relative;
11
- top: 50%;
12
- transform: translateY(-100%);
10
+ // position: relative;
11
+ // top: 50%;
12
+ // transform: translateY(-100%);
13
13
  }
14
14
  }
15
15
 
@@ -3,7 +3,18 @@
3
3
  .portal-content-aside-container {
4
4
  container-type: inline-size;
5
5
 
6
- @container (width <= 1020px) {
6
+ @container (width <= 880px) {
7
+ .portal-content-aside {
8
+ row-gap: var(--e-space-6);
9
+ column-gap: var(--e-space-8);
10
+ }
11
+
12
+ .portal-content-aside {
13
+ grid-template-columns: auto a.rem(280);
14
+ }
15
+ }
16
+
17
+ @container (width <= 700px) {
7
18
  .portal-content-aside {
8
19
  display: flex;
9
20
  flex-direction: column;
@@ -16,14 +27,8 @@
16
27
  display: grid;
17
28
  grid-template-columns: auto a.rem(320);
18
29
  grid-template-rows: repeat(2, auto);
19
- grid-column-gap: var(--e-space-24);
20
- grid-row-gap: var(--e-space-12);
21
-
22
- // @include a.bp(lg) {
23
- // display: flex;
24
- // flex-direction: column;
25
- // row-gap: var(--e-space-6);
26
- // }
30
+ column-gap: var(--e-space-24);
31
+ row-gap: var(--e-space-12);
27
32
  }
28
33
 
29
34
  .portal-content-aside__main {
@@ -37,9 +37,13 @@ const portalFooterSlot = inject('portal-footer-slot')
37
37
  <style scoped lang="scss" src="./portal-main.scss"></style>
38
38
 
39
39
  <style scoped lang="scss">
40
+ @use '../../base/abstracts' as a;
41
+
40
42
  .portal-main__sub-navigation {
41
43
  :slotted(.tabs) {
42
- --tabs-gradient-color: var(--e-c-mono-50);
44
+ @include a.bp(lg) {
45
+ --tabs-gradient-color: var(--e-c-mono-50);
46
+ }
43
47
  }
44
48
  }
45
49
  </style>
@@ -36,7 +36,7 @@
36
36
  }
37
37
 
38
38
  .toast-message__inner {
39
- background-color: var(--e-c-signal-01-700);
39
+ background-color: var(--e-c-signal-01-900);
40
40
  }
41
41
  }
42
42
 
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  .toast-message__inner {
49
- background-color: var(--e-c-signal-03-700);
49
+ background-color: var(--e-c-signal-03-900);
50
50
  }
51
51
  }
52
52
 
@@ -3,12 +3,14 @@
3
3
  .toast {
4
4
  z-index: a.$layer-message;
5
5
  position: fixed;
6
- bottom: var(--e-space-6);
7
- left: 0;
6
+ bottom: var(--toast-offset-bottom);
7
+ padding-left: var(--toast-margin-left);
8
+ padding-right: var(--toast-margin-left);
9
+ left: var(--toast-offset-left);
8
10
  display: flex;
9
11
  flex-direction: column-reverse;
10
- align-items: center;
11
- width: 100%;
12
- grid-gap: var(--e-space-4);
12
+ align-items: var(--toast-align);
13
+ width: calc(100% - var(--toast-offset-left));
14
+ gap: var(--e-space-4);
13
15
  pointer-events: none;
14
16
  }
@@ -22,23 +22,21 @@ const close = () => dismiss(id)
22
22
 
23
23
  <template>
24
24
  <div :class="['toast-message', type, { 'fade-in': fadeIn }]">
25
- <div class="container">
26
- <div class="toast-message__inner">
27
- <div class="toast-message__icon">
28
- <UIcon :name="MessageType[type]"></UIcon>
29
- </div>
30
- <div ref="message" class="toast-message__message">
31
- {{ message }}
32
- </div>
33
- <button
34
- class="toast-message__close-button"
35
- type="button"
36
- aria-label="Close message"
37
- @click="close"
38
- >
39
- <UIcon name="close"></UIcon>
40
- </button>
25
+ <div class="toast-message__inner">
26
+ <div class="toast-message__icon">
27
+ <UIcon :name="MessageType[type]"></UIcon>
41
28
  </div>
29
+ <div ref="message" class="toast-message__message">
30
+ {{ message }}
31
+ </div>
32
+ <button
33
+ class="toast-message__close-button"
34
+ type="button"
35
+ aria-label="Close message"
36
+ @click="close"
37
+ >
38
+ <UIcon name="close"></UIcon>
39
+ </button>
42
40
  </div>
43
41
  </div>
44
42
  </template>
@@ -30,3 +30,18 @@ import { toasts } from './useToast'
30
30
  </style>
31
31
 
32
32
  <style scoped lang="scss" src="./toast.scss"></style>
33
+ <style lang="scss">
34
+ :root {
35
+ // Values
36
+ --toast-align-center: center;
37
+ --toast-align-left: flex-start;
38
+ --toast-align-right: flex-end;
39
+
40
+ // Default Settings
41
+ --toast-align: var(--toast-align-center);
42
+ --toast-margin-left: var(--e-space-5);
43
+ --toast-margin-right: var(--e-space-5);
44
+ --toast-offset-left: 0px;
45
+ --toast-offset-bottom: var(--e-space-6);
46
+ }
47
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",