@mirweb/mir-web-components 2.7.2 → 2.8.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.
@@ -0,0 +1,123 @@
1
+ <template>
2
+ <div class="tabs__wrapper">
3
+ <div class="tabs__header">
4
+ <button
5
+ v-for="(tab, idx) in tabs"
6
+ :key="tab"
7
+ :class="['tabs__tab', { 'tabs__tab--active': idx === activeTab }]"
8
+ @click="setActiveTab(idx)"
9
+ >
10
+ {{ tab }}
11
+ </button>
12
+ <div class="tabs__header-line"></div>
13
+ </div>
14
+ <div class="tabs__content">
15
+ <div
16
+ v-for="(tab, idx) in tabs"
17
+ :key="tab"
18
+ :class="['tabs__panel', { 'tabs__panel--active': idx === activeTab }]"
19
+ >
20
+ <slot :name="`tab-${idx}`"></slot>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </template>
25
+
26
+ <script setup lang="ts">
27
+ import { ref } from "vue";
28
+
29
+ defineProps<{
30
+ tabs: string[];
31
+ }>();
32
+
33
+ const activeTab = ref(0);
34
+
35
+ function setActiveTab(idx: number) {
36
+ activeTab.value = idx;
37
+ }
38
+ </script>
39
+
40
+ <style scoped lang="scss">
41
+ @use "../../../assets/scss/variables.scss" as *;
42
+
43
+ .tabs {
44
+ &__wrapper {
45
+ display: flex;
46
+ flex-direction: column;
47
+ align-items: center;
48
+ width: 100%;
49
+ }
50
+
51
+ &__header {
52
+ display: flex;
53
+ justify-content: center;
54
+ gap: 30px;
55
+ margin-bottom: 30px;
56
+ position: relative;
57
+ width: 100%;
58
+ max-width: $screen-lg-min;
59
+ &-line {
60
+ position: absolute;
61
+ left: 0;
62
+ right: 0;
63
+ bottom: 0;
64
+ height: 1px;
65
+ background: $grey-300;
66
+ z-index: 0;
67
+ border-radius: 2px;
68
+ }
69
+ }
70
+ &__tab {
71
+ font-family: $font-opensans;
72
+ background: transparent;
73
+ border: none;
74
+ font-size: $font-size-sm;
75
+ font-weight: 300;
76
+ padding: 10px 5px 15px;
77
+ cursor: pointer;
78
+ position: relative;
79
+ z-index: 1;
80
+ transition: $transition-color;
81
+
82
+ &::after {
83
+ content: "";
84
+ display: block;
85
+ position: absolute;
86
+ left: 50%;
87
+ bottom: 0px;
88
+ transform: translateX(-50%);
89
+ width: 100%;
90
+ height: 4px;
91
+ background: transparent;
92
+ border-radius: 2px;
93
+ transition: background 0.3s ease;
94
+ z-index: 2;
95
+ }
96
+
97
+ &:not(.tabs__tab--active):hover {
98
+ color: $blue-600;
99
+ &::after {
100
+ background: $grey-300;
101
+ height: 4px;
102
+ }
103
+ }
104
+ &--active {
105
+ font-weight: 600;
106
+ &::after {
107
+ background: $blue-600;
108
+ height: 4px;
109
+ }
110
+ }
111
+ }
112
+ &__content {
113
+ width: 100%;
114
+ max-width: 984px;
115
+ }
116
+ &__panel {
117
+ display: none;
118
+ &--active {
119
+ display: block;
120
+ }
121
+ }
122
+ }
123
+ </style>
@@ -42,6 +42,7 @@ export { default as BlockQuote } from "./blocks/quote/quote.vue";
42
42
  export { default as BlockRichText } from "./blocks/rich-text/rich-text.vue";
43
43
  export { default as BlockRichTextColumns } from "./blocks/rich-text/rich-text-columns.vue";
44
44
  export { default as BlockTableList } from "./blocks/table-list/table-list.vue";
45
+ export { default as BlockTabs } from "./blocks/tabs/tabs.vue";
45
46
  export { default as BlockTimeline } from "./blocks/timeline/timeline.vue";
46
47
  export { default as BlockVimeo } from "./blocks/vimeo/vimeo.vue";
47
48
  export { default as BlockFrontPageHero } from "./blocks/frontpage-hero/frontpage-hero.vue";
@@ -23,7 +23,6 @@
23
23
  <span class="countdown__label">{{ props.seconds ?? "Sec" }}</span>
24
24
  </div>
25
25
  </div>
26
- <div v-else>{{ countdown }}</div>
27
26
  </div>
28
27
  </template>
29
28
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirweb/mir-web-components",
3
3
  "private": false,
4
- "version": "2.7.2",
4
+ "version": "2.8.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"