@itfin/components 1.0.92 → 1.0.95
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
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
<nuxt-link
|
|
4
4
|
@click.native="$emit('click', $event)"
|
|
5
|
-
:disabled="disabled"
|
|
6
5
|
class="itf-button btn"
|
|
7
6
|
tabindex="0"
|
|
8
7
|
type="button"
|
|
8
|
+
:to="toLink"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
:target="target"
|
|
9
11
|
:tag="isLink ? 'a' : 'button'"
|
|
10
|
-
:href="href"
|
|
11
12
|
:event="isLink ? 'click' : []"
|
|
12
|
-
:to="to || {}"
|
|
13
|
-
:target="target"
|
|
14
13
|
:class="{
|
|
15
14
|
[`btn-${color}`]: color,
|
|
16
15
|
'itf-button__block': block,
|
|
@@ -166,6 +165,15 @@ class itfButton extends Vue {
|
|
|
166
165
|
@Prop(String) href;
|
|
167
166
|
@Prop(String) target;
|
|
168
167
|
|
|
168
|
+
get toLink() {
|
|
169
|
+
if (this.to) {
|
|
170
|
+
return this.to;
|
|
171
|
+
} else if (this.href) {
|
|
172
|
+
return { path: this.href };
|
|
173
|
+
}
|
|
174
|
+
return '';
|
|
175
|
+
}
|
|
176
|
+
|
|
169
177
|
get isLink() {
|
|
170
178
|
return this.href || this.to;
|
|
171
179
|
}
|
|
@@ -54,6 +54,7 @@ class itfDropdown extends Vue {
|
|
|
54
54
|
@Prop({ type: String, default: 'Dropdown' }) label;
|
|
55
55
|
@Prop({ type: Boolean }) right;
|
|
56
56
|
@Prop({ type: Boolean }) toggle;
|
|
57
|
+
@Prop({ validator: (value) => [true, false, 'inside', 'outside'].includes(value), default: true }) autoclose;
|
|
57
58
|
@Prop({ type: Object, default: () => ({}) }) buttonOptions;
|
|
58
59
|
|
|
59
60
|
modalId = '';
|
|
@@ -87,7 +88,7 @@ class itfDropdown extends Vue {
|
|
|
87
88
|
const { default: Dropdown } = await import('bootstrap/js/src/dropdown.js');
|
|
88
89
|
this.modalEl = new Dropdown(this.$refs.toggle.$el, {
|
|
89
90
|
reference: 'toggle',
|
|
90
|
-
autoClose:
|
|
91
|
+
autoClose: this.autoclose
|
|
91
92
|
});
|
|
92
93
|
// this.onVisibleChanged(this.value);
|
|
93
94
|
// this.$el.addEventListener('shown.bs.dropdown', () => {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
:class="{
|
|
28
28
|
'itf-table__header--sortable': column.sortable,
|
|
29
29
|
'itf-table__header--sorted': sortedColumns[column.name],
|
|
30
|
-
[`itf-table__header--sorted-${sortedColumns[column.name]}`]: sortedColumns[column.name]
|
|
30
|
+
[`itf-table__header--sorted-${sortedColumns[column.name]}`]: sortedColumns[column.name],
|
|
31
|
+
'align-left': column.alignLeft
|
|
31
32
|
}">
|
|
32
33
|
<span @click="sortBy(column, n)">
|
|
33
34
|
{{column.text}}
|
|
@@ -117,6 +118,10 @@ html {
|
|
|
117
118
|
display: grid;
|
|
118
119
|
grid-template-columns: var(--itf-table-template);
|
|
119
120
|
}
|
|
121
|
+
.itf-table__header.align-left > span {
|
|
122
|
+
justify-content: flex-start;
|
|
123
|
+
text-align: left;
|
|
124
|
+
}
|
|
120
125
|
}
|
|
121
126
|
&__rows {
|
|
122
127
|
display: grid;
|