@mirweb/mir-web-components 2.4.0 → 2.5.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.
@@ -49,9 +49,7 @@
49
49
  :muted="true"
50
50
  />
51
51
  </div>
52
- <div v-if="slots['card-label']">
53
- <slot name="card-label"></slot>
54
- </div>
52
+
55
53
  <div
56
54
  v-if="variant === 'product'"
57
55
  :class="[
@@ -71,6 +69,9 @@
71
69
  >
72
70
  {{ headline }}
73
71
  </div>
72
+ <div v-if="slots['card-label']">
73
+ <slot name="card-label"></slot>
74
+ </div>
74
75
  <p v-if="variant === 'product'">
75
76
  {{ paragraph }}
76
77
  </p>
@@ -270,7 +271,7 @@ defineEmits(["clicked"]);
270
271
  display: flex;
271
272
  gap: 15px;
272
273
  flex-wrap: wrap;
273
- margin-top: 15px;
274
+ margin-bottom: 15px;
274
275
  }
275
276
  }
276
277
  :slotted(img) {
@@ -1,22 +1,66 @@
1
1
  <template>
2
2
  <div class="event__wrapper">
3
- <atom-label :label-dark="false" :text="eventType ? eventType : ''" />
3
+ <div class="event__image">
4
+ <atom-image>
5
+ <slot
6
+ name="card-image"
7
+ v-bind="{
8
+ src: imgSrc,
9
+ alt: imgAlt,
10
+ width: '596',
11
+ height: '335',
12
+ loading: 'auto',
13
+ sizes: '(min-width: 581px) 582px, 100vw',
14
+ }"
15
+ ></slot>
16
+ </atom-image>
17
+ <atom-label v-if="label" :label-dark="true" :text="label" />
18
+ </div>
19
+
4
20
  <div class="event__headline">
5
21
  {{ headline }}
6
22
  </div>
7
23
  <div class="event__date-location">
8
- <div v-if="dateTime">{{ dateTime }}</div>
9
- <div v-if="info" class="event__info">{{ info }}</div>
10
- <div v-if="location">{{ location }}</div>
24
+ <div v-if="dateTime">
25
+ <span class="event__bold">{{ dateTime.split(" ")[0] }}</span>
26
+ {{ dateTime.substring(dateTime.indexOf(" ") + 1) }}
27
+ </div>
28
+ <div v-if="location">
29
+ <span class="event__bold">{{ location.split(" ")[0] }}</span>
30
+ {{ location.substring(location.indexOf(" ") + 1) }}
31
+ </div>
32
+ <div v-if="language" class="event__language">
33
+ <span class="event__bold">{{ language.split(" ")[0] }}</span>
34
+ {{ language.substring(language.indexOf(" ") + 1) }}
35
+ </div>
36
+ </div>
37
+
38
+ <div class="event__labels" v-if="slots['event-labels']">
39
+ <slot name="event-labels"></slot>
11
40
  </div>
12
- <div v-if="exhibitor" class="event__exhibitor">{{ exhibitor }}</div>
13
41
  </div>
14
42
  </template>
15
43
 
16
44
  <script setup lang="ts">
45
+ import { useSlots } from "vue";
17
46
  import AtomLabel from "../../atoms/label/label.vue";
47
+ import AtomImage from "../../atoms/image/image.vue";
48
+
49
+ const slots = useSlots();
18
50
 
19
51
  defineProps({
52
+ imgSrc: {
53
+ type: String,
54
+ required: true,
55
+ },
56
+ imgAlt: {
57
+ type: String,
58
+ required: true,
59
+ },
60
+ label: {
61
+ type: String,
62
+ required: false,
63
+ },
20
64
  eventType: {
21
65
  type: String,
22
66
  required: true,
@@ -33,14 +77,9 @@ defineProps({
33
77
  type: String,
34
78
  required: true,
35
79
  },
36
- exhibitor: {
37
- type: String,
38
- required: false,
39
- },
40
- info: {
80
+ language: {
41
81
  type: String,
42
- required: false,
43
- default: null,
82
+ required: true,
44
83
  },
45
84
  });
46
85
  </script>
@@ -59,10 +98,11 @@ defineProps({
59
98
  display: flex;
60
99
  flex-direction: column;
61
100
  gap: 15px;
62
- padding: 15px 15px 30px 15px;
101
+ padding: 0px 0px 30px 0px;
63
102
 
64
103
  @include sm {
65
104
  width: 100%;
105
+ padding: 15px 15px 30px 15px;
66
106
 
67
107
  @at-root a {
68
108
  &:hover,
@@ -83,19 +123,37 @@ defineProps({
83
123
  }
84
124
  }
85
125
 
126
+ &__image {
127
+ position: relative;
128
+ :deep(img) {
129
+ width: 100%;
130
+ height: auto;
131
+ }
132
+ .label__wrapper {
133
+ position: absolute;
134
+ top: 15px;
135
+ left: 15px;
136
+ }
137
+ }
138
+
86
139
  &__headline {
87
140
  font-size: $font-size-md;
88
141
  font-family: $font-oscine;
89
- font-weight: 700;
142
+ font-weight: 300;
90
143
  line-height: $line-height-md;
91
144
  }
92
145
 
93
146
  &__date-location,
94
147
  &__exhibitor,
95
148
  &__info {
96
- font-size: $font-size-sm;
149
+ font-size: $font-size-xsm;
97
150
  font-weight: 300;
98
- line-height: $line-height-md;
151
+ line-height: $line-height-sm;
152
+ }
153
+
154
+ &__bold {
155
+ font-weight: bold;
156
+ margin-right: 4px;
99
157
  }
100
158
 
101
159
  &__date-location,
@@ -106,5 +164,11 @@ defineProps({
106
164
  &__info {
107
165
  text-transform: none;
108
166
  }
167
+
168
+ &__labels {
169
+ display: flex;
170
+ gap: 15px;
171
+ flex-wrap: wrap;
172
+ }
109
173
  }
110
174
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirweb/mir-web-components",
3
3
  "private": false,
4
- "version": "2.4.0",
4
+ "version": "2.5.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"