@itfin/components 1.0.67 → 1.0.68
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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<a :href="href" class="itf-tab" :data-test="`itf-tab-${id || _id}`" @click="setActive" :class="{ active }">
|
|
3
3
|
<span><slot /></span>
|
|
4
|
-
</
|
|
4
|
+
</a>
|
|
5
5
|
</template>
|
|
6
6
|
<style lang="scss" scoped>
|
|
7
7
|
.itf-tab {
|
|
@@ -21,6 +21,14 @@ class itfTab extends Vue {
|
|
|
21
21
|
@Prop() id;
|
|
22
22
|
@Prop() to;
|
|
23
23
|
|
|
24
|
+
get href() {
|
|
25
|
+
if (this.to) {
|
|
26
|
+
const route = this.$router.resolve(this.to);
|
|
27
|
+
return route && route.href;
|
|
28
|
+
}
|
|
29
|
+
return 'javascript:;';
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
get active() {
|
|
25
33
|
if (this.to) {
|
|
26
34
|
const route = this.$router.resolve(this.to);
|
|
@@ -33,7 +41,7 @@ class itfTab extends Vue {
|
|
|
33
41
|
if (this.to) {
|
|
34
42
|
this.$router.push(this.to);
|
|
35
43
|
}
|
|
36
|
-
this.tabsManager.setValue(id);
|
|
44
|
+
this.tabsManager.setValue(this.id || this._id);
|
|
37
45
|
}
|
|
38
46
|
}
|
|
39
47
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-show="tabsManager && tabsManager.getValue() === id" :class="{ filled }" class="itf-tab-content" :data-test="`itf-tab-content-${id}`">
|
|
2
|
+
<div v-show="tabsManager && tabsManager.getValue() === id" :class="{ filled }" class="itf-tab-content" :data-test="`itf-tab-content-${id || _id}`">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -23,7 +23,7 @@ class itfTabs extends Vue {
|
|
|
23
23
|
this.tabNodes = tabNodes;
|
|
24
24
|
|
|
25
25
|
return createElement('div', { staticClass: 'itf-tabs' }, [
|
|
26
|
-
createElement('div', { staticClass: 'itf-tabs-panel' }, tabNodes),
|
|
26
|
+
createElement('div', { staticClass: 'itf-tabs-panel' }, tabNodes.reverse()),
|
|
27
27
|
createElement('div', { staticClass: 'itf-tabs-content' }, contents)
|
|
28
28
|
]);
|
|
29
29
|
|
|
@@ -19,14 +19,17 @@
|
|
|
19
19
|
|
|
20
20
|
.itf-tabs {
|
|
21
21
|
.itf-tabs-panel {
|
|
22
|
-
margin:
|
|
23
|
-
padding:
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
padding-left: calc(var(--itf-tabs-tab-padding) * 2.1);
|
|
26
|
-
list-style-type: none;
|
|
27
26
|
display: flex;
|
|
27
|
+
flex-direction: row-reverse;
|
|
28
|
+
justify-content: start;
|
|
29
|
+
flex-wrap: wrap;
|
|
28
30
|
|
|
29
31
|
.itf-tab {
|
|
32
|
+
white-space: nowrap;
|
|
30
33
|
display: block;
|
|
31
34
|
//float: right;
|
|
32
35
|
padding: 10px var(--itf-tabs-tab-padding) 8px;
|
|
@@ -39,7 +42,9 @@
|
|
|
39
42
|
background-color: var(--itf-tabs-inactive-bg);
|
|
40
43
|
color: var(--itf-tabs-inactive-color);
|
|
41
44
|
border-top: 1px solid var(--itf-tabs-inactive-border-color);
|
|
42
|
-
|
|
45
|
+
tab-index: 0;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
outline: 0 none;
|
|
43
48
|
|
|
44
49
|
& > span {
|
|
45
50
|
position: relative;
|
|
@@ -69,7 +74,8 @@
|
|
|
69
74
|
//transform: skew(-30deg, 0deg);
|
|
70
75
|
box-shadow: rgba(0,0,0,.1) -3px 2px 5px, inset rgba(255,255,255,.09) 1px 0;
|
|
71
76
|
}
|
|
72
|
-
&:hover, &:hover:before, &:hover:after
|
|
77
|
+
&:hover, &:hover:before, &:hover:after,
|
|
78
|
+
&:focus, &:focus:before, &:focus:after {
|
|
73
79
|
background-color: var(--itf-tabs-hover-bg);
|
|
74
80
|
color: var(--itf-tabs-hover-color);
|
|
75
81
|
border-top: 1px solid var(--itf-tabs-hover-border-color);
|
|
@@ -81,7 +87,6 @@
|
|
|
81
87
|
background-color: var(--itf-tabs-active-bg);
|
|
82
88
|
color: var(--itf-tabs-active-color);
|
|
83
89
|
border-top: 1px solid var(--itf-tabs-active-border-color);
|
|
84
|
-
border-bottom: 0 none;
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
}
|