@itfin/components 1.2.134 → 1.2.135
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 +1 -1
- package/src/assets/scss/components/_dropdown.scss +0 -5
- package/src/components/dropdown/Dropdown.vue +30 -4
- package/src/components/kanban/Board.vue +4 -1
- package/src/components/kanban/BoardColumn.vue +3 -1
- package/src/components/kanban/index.stories.js +5 -0
- package/src/components/kanban/styles.scss +23 -4
- package/src/components/segmented-control/SegmentedControl.vue +7 -0
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<!--template>
|
|
2
2
|
|
|
3
3
|
<div class="itf-dropdown" :class="`drop${placement}`">
|
|
4
4
|
<div v-if="disabled"><slot name="button">{{label}}</slot></div>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
</template
|
|
29
|
+
</template-->
|
|
30
30
|
<script>
|
|
31
31
|
import { Vue, Component, Prop, Watch, PropSync } from 'vue-property-decorator';
|
|
32
32
|
import itfButton from '../button/Button';
|
|
@@ -73,12 +73,38 @@ class itfDropdown extends Vue {
|
|
|
73
73
|
// }
|
|
74
74
|
// }
|
|
75
75
|
|
|
76
|
+
render (createElement) {
|
|
77
|
+
const modalId = `dropdownId${this._uid}`;
|
|
78
|
+
const { right, shadow } = this;
|
|
79
|
+
return createElement('div', {}, [
|
|
80
|
+
createElement(
|
|
81
|
+
'itf-button',
|
|
82
|
+
{
|
|
83
|
+
props: this.buttonOptions || {},
|
|
84
|
+
class: { 'dropdown-toggle': this.toggle },
|
|
85
|
+
attrs: { id: modalId, 'data-bs-toggle': 'dropdown', 'aria-expanded': 'false' },
|
|
86
|
+
ref: 'toggle',
|
|
87
|
+
},
|
|
88
|
+
this.$slots.button
|
|
89
|
+
),
|
|
90
|
+
createElement(
|
|
91
|
+
'div',
|
|
92
|
+
{
|
|
93
|
+
attrs: { rel: 'dropdown' , 'aria-labelledby': modalId},
|
|
94
|
+
class: { 'dropdown-menu-end': right, 'shadow': shadow },
|
|
95
|
+
staticClass: 'itf-dropdown__menu dropdown-menu'
|
|
96
|
+
},
|
|
97
|
+
this.$slots.default
|
|
98
|
+
)
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
|
|
76
102
|
created() {
|
|
77
|
-
|
|
78
|
-
this.modalId = `dropdownId${globalModalIndex}`;
|
|
103
|
+
console.info(this);
|
|
79
104
|
}
|
|
80
105
|
|
|
81
106
|
async mounted() {
|
|
107
|
+
console.info(this);
|
|
82
108
|
if (typeof window === 'undefined' || !this.$refs.toggle) {
|
|
83
109
|
return;
|
|
84
110
|
}
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
@drop="reorderColumns"
|
|
27
27
|
v-draggable="{ handle: true, payload: { index, column }, mirror: { yAxis:false } }"
|
|
28
28
|
class="flex-grow-1 d-flex align-items-center itf-board-column__header justify-content-between">
|
|
29
|
-
<div
|
|
29
|
+
<div>
|
|
30
|
+
<slot name="columnMarkup" :column="column" />
|
|
31
|
+
<slot name="header" :column="column">{{ column[columnNameKey] }}</slot>
|
|
32
|
+
</div>
|
|
30
33
|
<div class="text-muted me-1"><slot name="header-addon" :column="column" :items="groupedItems[column.Id]">{{ (groupedItems[column.Id] || []).length }}</slot></div>
|
|
31
34
|
</div>
|
|
32
35
|
</itf-edit-button>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<div class="itf-board-column-wrapper">
|
|
3
3
|
<div class="itf-board-cards-wrapper" ref="container" :class="{'empty-column': !items.length}">
|
|
4
4
|
<template v-if="!items.length">
|
|
5
|
-
<
|
|
5
|
+
<div class="empty-column-bg">
|
|
6
|
+
<slot name="empty"></slot>
|
|
7
|
+
</div>
|
|
6
8
|
</template>
|
|
7
9
|
<template v-else>
|
|
8
10
|
<div v-for="(item, index) of items" :key="index" :data-card="index" :class="item.hidden ? 'd-none' : ''">
|
|
@@ -51,6 +51,11 @@ storiesOf('Common', module)
|
|
|
51
51
|
<itf-board class="flex-grow-1" :columns.sync="columns" :column-orders.sync="columnOrders" :items.sync="tasks" column-sorting @update:item="onItemUpdate">
|
|
52
52
|
<template #column="{ column, items }">
|
|
53
53
|
<itf-board-column :column="column" :items="items" card-sorting @update:columns="columns = $event">
|
|
54
|
+
<template #empty>
|
|
55
|
+
<div>
|
|
56
|
+
Your ad can be here
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
54
59
|
<template #item="{ item }">
|
|
55
60
|
<itf-board-card :text="item.Name">
|
|
56
61
|
<template #header>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--itf-board-column-hover-color: rgba(0, 0, 0, .05);
|
|
3
3
|
--itf-board-column-width: 300px;
|
|
4
|
+
--itf-board-column-bg-color: #f4f5f7;
|
|
4
5
|
--itf-board-placeholder-color: #47BEFF;
|
|
5
6
|
--itf-board-placeholder-border-color: #0567eb;
|
|
6
7
|
--itf-board-placeholder-bg-color: #ebeffe;
|
|
@@ -11,11 +12,12 @@
|
|
|
11
12
|
|
|
12
13
|
[data-theme="dark"] {
|
|
13
14
|
--itf-board-column-hover-color: rgba(255, 255, 255, .05);
|
|
15
|
+
--itf-board-column-bg-color: #2c2f33;
|
|
14
16
|
--itf-board-placeholder-color: #FFCC00;
|
|
15
17
|
--itf-board-placeholder-border-color: #FFCC00;
|
|
16
18
|
--itf-board-placeholder-bg-color: #383b41;
|
|
17
|
-
--itf-board-card-bg-color: #
|
|
18
|
-
--itf-board-card-border-color: #
|
|
19
|
+
--itf-board-card-bg-color: #232529;
|
|
20
|
+
--itf-board-card-border-color: #393939;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
.itf-board {
|
|
@@ -97,6 +99,22 @@
|
|
|
97
99
|
left: -50px;
|
|
98
100
|
}
|
|
99
101
|
}
|
|
102
|
+
|
|
103
|
+
.empty-column-bg {
|
|
104
|
+
position: absolute;
|
|
105
|
+
width: 60%;
|
|
106
|
+
left: 50%;
|
|
107
|
+
top: 60px;
|
|
108
|
+
transform: translate(-50%);
|
|
109
|
+
opacity: .75;
|
|
110
|
+
z-index: 0;
|
|
111
|
+
user-select: none;
|
|
112
|
+
text-align: center;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.z-index-2 {
|
|
117
|
+
z-index: 2;
|
|
100
118
|
}
|
|
101
119
|
|
|
102
120
|
.itf-board-titles,
|
|
@@ -253,8 +271,9 @@
|
|
|
253
271
|
flex-direction: column;
|
|
254
272
|
overflow: auto;
|
|
255
273
|
flex-grow: 1;
|
|
256
|
-
padding
|
|
257
|
-
|
|
274
|
+
padding: .5rem .25rem 0;
|
|
275
|
+
background-color: var(--itf-board-column-bg-color);
|
|
276
|
+
border-radius: var(--bs-border-radius);
|
|
258
277
|
|
|
259
278
|
> div:first-child > .itf-board-card-space > .itf-board-header-dropzone {
|
|
260
279
|
top: -30px;
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
<div class="option" v-for="(item, n) in itemsWithNames" :key="n">
|
|
7
7
|
<label>
|
|
8
|
+
<slot name="itemMarkup" :item="item" />
|
|
8
9
|
<input
|
|
9
10
|
ref="input"
|
|
10
11
|
type="radio"
|
|
11
12
|
:name="name"
|
|
12
13
|
:value="n"
|
|
14
|
+
v-tooltip="tooltipCallback(item)"
|
|
13
15
|
:checked="isChecked(item)"
|
|
14
16
|
@change="onItemChanged(item)" />
|
|
15
17
|
<span>
|
|
@@ -32,9 +34,13 @@
|
|
|
32
34
|
<script>
|
|
33
35
|
import { Vue, Component, Model, Prop, Watch } from 'vue-property-decorator';
|
|
34
36
|
import itfSelect from '../select/Select';
|
|
37
|
+
import tooltip from '../../directives/tooltip';
|
|
35
38
|
|
|
36
39
|
export default @Component({
|
|
37
40
|
name: 'itfSegmentedControl',
|
|
41
|
+
directives: {
|
|
42
|
+
tooltip
|
|
43
|
+
},
|
|
38
44
|
components: {
|
|
39
45
|
itfSelect
|
|
40
46
|
}
|
|
@@ -46,6 +52,7 @@ class itfSegmentedControl extends Vue {
|
|
|
46
52
|
@Prop({ type: String, default: 'Name' }) itemText;
|
|
47
53
|
@Prop({ type: Boolean, default: false }) returnObject;
|
|
48
54
|
@Prop({ type: Boolean, default: false }) disabled;
|
|
55
|
+
@Prop({ type: Function, default: () => null }) tooltipCallback;
|
|
49
56
|
|
|
50
57
|
timers = [];
|
|
51
58
|
|