@itfin/components 1.0.102 → 1.0.105
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,25 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
3
|
<nav aria-label="breadcrumb">
|
|
4
|
-
<ol class="breadcrumb mb-1">
|
|
4
|
+
<ol class="breadcrumb mb-1" itemscope itemtype="https://schema.org/BreadcrumbList">
|
|
5
5
|
<li
|
|
6
6
|
v-for="(crumb, n) of items"
|
|
7
7
|
class="breadcrumb-item"
|
|
8
8
|
:key="n"
|
|
9
9
|
:class="{'active': n === items.length - 1}"
|
|
10
10
|
:aria-current="n === items.length - 1 ? 'page' : null"
|
|
11
|
+
itemprop="itemListElement"
|
|
12
|
+
itemscope
|
|
13
|
+
itemtype="https://schema.org/ListItem"
|
|
11
14
|
>
|
|
12
|
-
<span v-if="crumb.disabled || !crumb.to">
|
|
13
|
-
|
|
15
|
+
<span itemprop="item" v-if="crumb.disabled || !crumb.to">
|
|
16
|
+
<span class="d-none d-md-inline" itemprop="name">{{crumb.text}}</span>
|
|
17
|
+
<span class="d-md-none" aria-hidden="true">{{crumb.mobileText || crumb.text}}</span>
|
|
18
|
+
</span>
|
|
19
|
+
<nuxt-link itemprop="item" v-else :to="crumb.to" :exact="crumb.exact">
|
|
20
|
+
<span class="d-none d-md-inline" itemprop="name">{{crumb.text}}</span>
|
|
21
|
+
<span class="d-md-none" aria-hidden="true">{{crumb.mobileText || crumb.text}}</span>
|
|
22
|
+
</nuxt-link>
|
|
23
|
+
<meta itemprop="position" :content="n + 1" />
|
|
14
24
|
</li>
|
|
15
25
|
</ol>
|
|
16
26
|
</nav>
|
|
17
27
|
|
|
18
28
|
</template>
|
|
19
|
-
<style lang="scss">
|
|
20
|
-
@import '../../assets/scss/variables';
|
|
21
|
-
//@import '~bootstrap/scss/breadcrumb';
|
|
22
|
-
</style>
|
|
23
29
|
<script>
|
|
24
30
|
import { Vue, Component, Prop } from 'vue-property-decorator';
|
|
25
31
|
|
|
@@ -161,10 +161,12 @@ class itfButton extends Vue {
|
|
|
161
161
|
@Prop({ type: [String, Object] }) to;
|
|
162
162
|
@Prop(String) href;
|
|
163
163
|
@Prop(String) target;
|
|
164
|
+
@Prop() class;
|
|
164
165
|
|
|
165
166
|
render (createElement, { data, slots, children, props }) {
|
|
166
167
|
const {
|
|
167
|
-
to, href, target, disabled, color, block, loading, labeled, secondary, primary, small, large, icon, loadingText
|
|
168
|
+
to, href, target, disabled, color, block, loading, labeled, secondary, primary, small, large, icon, loadingText,
|
|
169
|
+
class: classNames
|
|
168
170
|
} = props;
|
|
169
171
|
const component = to ? 'nuxt-link' : (props.href ? 'a' : 'button');
|
|
170
172
|
const staticClass = (data.staticClass || '') + ' itf-button btn';
|
|
@@ -175,7 +177,6 @@ class itfButton extends Vue {
|
|
|
175
177
|
tabindex: 0
|
|
176
178
|
},
|
|
177
179
|
class: {
|
|
178
|
-
...(data.class || {}),
|
|
179
180
|
[`btn-${color}`]: color,
|
|
180
181
|
'itf-button__block': block,
|
|
181
182
|
'labeled': labeled,
|
|
@@ -194,6 +195,16 @@ class itfButton extends Vue {
|
|
|
194
195
|
props,
|
|
195
196
|
staticClass
|
|
196
197
|
};
|
|
198
|
+
if (data.class) {
|
|
199
|
+
if (typeof data.class === 'string') {
|
|
200
|
+
comProps.class[data.class] = true;
|
|
201
|
+
} else {
|
|
202
|
+
comProps.class = {
|
|
203
|
+
...data.class,
|
|
204
|
+
...comProps.class
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
}
|
|
197
208
|
if (component === 'button') {
|
|
198
209
|
comProps.attrs.type = 'button';
|
|
199
210
|
}
|
|
@@ -86,7 +86,7 @@ class itfDropdown extends Vue {
|
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
const { default: Dropdown } = await import('bootstrap/js/src/dropdown.js');
|
|
89
|
-
this.modalEl = new Dropdown(this.$refs.toggle
|
|
89
|
+
this.modalEl = new Dropdown(this.$refs.toggle, {
|
|
90
90
|
reference: 'toggle',
|
|
91
91
|
autoClose: this.autoclose
|
|
92
92
|
});
|
|
@@ -32,7 +32,7 @@ class itfTab extends Vue {
|
|
|
32
32
|
get active() {
|
|
33
33
|
if (this.to) {
|
|
34
34
|
const route = this.$router.resolve(this.to);
|
|
35
|
-
return this.$route.
|
|
35
|
+
return this.$route.fullPath === (route && route.href);
|
|
36
36
|
}
|
|
37
37
|
return this.tabsManager && this.tabsManager.getValue() === this.id;
|
|
38
38
|
}
|