@avakhula/ui 0.0.267 → 0.0.269
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/.storybook/preview.js +0 -9
- package/dist/index.js +791 -779
- package/dist/index.umd.cjs +34 -34
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +127 -28
- package/src/components/Alert/alert.scss +2 -0
- package/src/components/Form/Checkbox/Checkbox.scss +2 -2
- package/src/components/Form/Radio/radio.scss +1 -1
- package/src/components/Pagination/Pagination.vue +5 -15
- package/src/components/Sorting/Sorting.stories.js +4 -0
- package/src/components/Sorting/Sorting.vue +4 -1
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/TreeSelect/Select.vue +47 -28
- package/src/components/TreeSelect/scss/select.scss +13 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,36 +1,135 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<ib-select :options="opt">
|
|
3
|
+
<template v-slot:triggerContent="{ selectedCount }">
|
|
4
|
+
{{ selectedCount }} test hello
|
|
5
|
+
</template>
|
|
6
|
+
</ib-select>
|
|
3
7
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<!-- <template #toggleTipBody>
|
|
7
|
-
<p>
|
|
8
|
-
test
|
|
9
|
-
</p>
|
|
10
|
-
</template>
|
|
8
|
+
</template>
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
<script>
|
|
11
|
+
import IbSelect from "./components/TreeSelect/Select.vue";
|
|
12
|
+
const testData1 = [
|
|
13
|
+
{
|
|
14
|
+
id: "1",
|
|
15
|
+
title: "A Education",
|
|
16
|
+
is_category: true,
|
|
17
|
+
initiallyVisible: true,
|
|
18
|
+
visible: true,
|
|
19
|
+
isDisabled: false,
|
|
20
|
+
checked: true,
|
|
21
|
+
isChildrenVisible: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "2",
|
|
25
|
+
title: "Education 2",
|
|
26
|
+
is_category: true,
|
|
27
|
+
initiallyVisible: true,
|
|
28
|
+
visible: true,
|
|
29
|
+
isDisabled: false,
|
|
30
|
+
checked: false,
|
|
31
|
+
isChildrenVisible: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "3",
|
|
35
|
+
title: "Education 3",
|
|
36
|
+
is_category: true,
|
|
37
|
+
initiallyVisible: true,
|
|
38
|
+
visible: true,
|
|
39
|
+
isDisabled: false,
|
|
40
|
+
checked: false,
|
|
41
|
+
isChildrenVisible: true,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "4",
|
|
45
|
+
title: "Education 4",
|
|
46
|
+
is_category: true,
|
|
47
|
+
initiallyVisible: true,
|
|
48
|
+
visible: true,
|
|
49
|
+
isDisabled: false,
|
|
50
|
+
checked: false,
|
|
51
|
+
isChildrenVisible: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "5",
|
|
55
|
+
title: "Education 5",
|
|
56
|
+
is_category: true,
|
|
57
|
+
initiallyVisible: true,
|
|
58
|
+
visible: true,
|
|
59
|
+
isDisabled: false,
|
|
60
|
+
checked: false,
|
|
61
|
+
isChildrenVisible: true,
|
|
62
|
+
},
|
|
17
63
|
|
|
64
|
+
{
|
|
65
|
+
id: "6",
|
|
66
|
+
title: "Education 6",
|
|
67
|
+
is_category: true,
|
|
68
|
+
initiallyVisible: true,
|
|
69
|
+
visible: true,
|
|
70
|
+
isDisabled: false,
|
|
71
|
+
checked: false,
|
|
72
|
+
isChildrenVisible: true,
|
|
73
|
+
},
|
|
18
74
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
75
|
+
{
|
|
76
|
+
id: "7",
|
|
77
|
+
title: "Education 7",
|
|
78
|
+
is_category: true,
|
|
79
|
+
initiallyVisible: true,
|
|
80
|
+
visible: true,
|
|
81
|
+
isDisabled: false,
|
|
82
|
+
checked: false,
|
|
83
|
+
isChildrenVisible: true,
|
|
84
|
+
},
|
|
22
85
|
|
|
23
|
-
|
|
24
|
-
|
|
86
|
+
{
|
|
87
|
+
id: "8",
|
|
88
|
+
title: "Education 8",
|
|
89
|
+
is_category: true,
|
|
90
|
+
initiallyVisible: true,
|
|
91
|
+
visible: true,
|
|
92
|
+
isDisabled: false,
|
|
93
|
+
checked: false,
|
|
94
|
+
isChildrenVisible: true,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "9",
|
|
98
|
+
title: "Education 9",
|
|
99
|
+
is_category: true,
|
|
100
|
+
initiallyVisible: true,
|
|
101
|
+
visible: true,
|
|
102
|
+
isDisabled: false,
|
|
103
|
+
checked: false,
|
|
104
|
+
isChildrenVisible: true,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "10",
|
|
108
|
+
title: "Education 10",
|
|
109
|
+
is_category: true,
|
|
110
|
+
initiallyVisible: true,
|
|
111
|
+
visible: true,
|
|
112
|
+
isDisabled: false,
|
|
113
|
+
checked: false,
|
|
114
|
+
isChildrenVisible: true,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "11",
|
|
118
|
+
title: "Education 11",
|
|
119
|
+
is_category: true,
|
|
120
|
+
initiallyVisible: true,
|
|
121
|
+
visible: true,
|
|
122
|
+
isDisabled: false,
|
|
123
|
+
checked: false,
|
|
124
|
+
isChildrenVisible: true,
|
|
125
|
+
},
|
|
126
|
+
];
|
|
25
127
|
export default {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<style lang="scss">
|
|
33
|
-
.page {
|
|
34
|
-
padding: 200px;
|
|
128
|
+
data() {
|
|
129
|
+
return {
|
|
130
|
+
opt: testData1,
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
components: {IbSelect}
|
|
35
134
|
}
|
|
36
|
-
</
|
|
135
|
+
</script>
|
|
@@ -95,6 +95,7 @@ $alert-success-secondary-color: $green-50;
|
|
|
95
95
|
margin-top: 5px;
|
|
96
96
|
margin-bottom: 5px;
|
|
97
97
|
padding-left: 0;
|
|
98
|
+
word-break: break-word;
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
|
|
@@ -107,6 +108,7 @@ $alert-success-secondary-color: $green-50;
|
|
|
107
108
|
@include Ib-P1-regular;
|
|
108
109
|
margin-bottom: 5px;
|
|
109
110
|
padding-left: 0!important;
|
|
111
|
+
word-break: break-word;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
& + .close-button {
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
$checkbox-bg-disabled: $gray-100;
|
|
6
6
|
$checkbox-filed-bg-disabled: $neutral-500;
|
|
7
7
|
$checkbox-border-disabled: $neutral-500;
|
|
8
|
-
$checkbox-border: $gray-
|
|
8
|
+
$checkbox-border: $gray-600;
|
|
9
9
|
$checkbox-bg: transparent;
|
|
10
10
|
$checkbox-checkmark: $neutral-900;
|
|
11
11
|
$checkbox-border-hover: $blue-300;
|
|
12
12
|
$checkbox-bg-hover: $blue-100;
|
|
13
13
|
$checkbox-border-active: transparent;
|
|
14
|
-
$checkbox-bg-active: $blue-
|
|
14
|
+
$checkbox-bg-active: $blue-200;
|
|
15
15
|
$checkbox-text-color-disabled: $neutral-500;
|
|
16
16
|
$checkbox-bg-error: transparent;
|
|
17
17
|
$checkbox-border-error: $red-800;
|
|
@@ -11,7 +11,7 @@ $radio-bg-hover: $blue-100;
|
|
|
11
11
|
$radio-bg-active: $blue-200;
|
|
12
12
|
$radio-bg-disabled: $gray-100;
|
|
13
13
|
$radio-bg-error: transparent;
|
|
14
|
-
$radio-border: $gray-
|
|
14
|
+
$radio-border: $gray-600;
|
|
15
15
|
$radio-border-hover: $blue-300;
|
|
16
16
|
$radio-border-active: $blue-200;
|
|
17
17
|
$radio-border-disabled: $neutral-500;
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
></ib-limit-selector>
|
|
8
8
|
|
|
9
9
|
<div class="repot-pagination">
|
|
10
|
-
|
|
11
|
-
<template v-if="displayPaginationInput">
|
|
10
|
+
<template v-if="showPaginationInput">
|
|
12
11
|
<ib-label>{{ labelInput }}</ib-label>
|
|
13
12
|
<div class="pagination-input">
|
|
14
13
|
<ib-input type="number" :debounce="500" @input="onInput"></ib-input>
|
|
@@ -23,10 +22,10 @@
|
|
|
23
22
|
size="m"
|
|
24
23
|
class="toggle-children button-prev"
|
|
25
24
|
:disabled="currentPage === 1"
|
|
26
|
-
v-tooltip="tooltipTextPrev ? tooltipTextNext : lang('prev_page', 'system')"
|
|
27
25
|
@click="onSelect(currentPage - 1)"
|
|
28
26
|
>
|
|
29
27
|
<ib-icon name="chevron-back-outline"></ib-icon>
|
|
28
|
+
<ib-tooltip v-if="tooltipTextPrev" :text="tooltipTextPrev"></ib-tooltip>
|
|
30
29
|
</ib-icon-button>
|
|
31
30
|
|
|
32
31
|
<ul class="pagination-wrapper">
|
|
@@ -53,10 +52,10 @@
|
|
|
53
52
|
size="m"
|
|
54
53
|
class="toggle-children button-next"
|
|
55
54
|
:disabled="currentPage === countPagePagination"
|
|
56
|
-
v-tooltip="tooltipTextNext ? tooltipTextNext : lang('next_page', 'system')"
|
|
57
55
|
@click="onSelect(currentPage + 1)"
|
|
58
56
|
>
|
|
59
57
|
<ib-icon name="chevron-forward-outline"></ib-icon>
|
|
58
|
+
<ib-tooltip v-if="tooltipTextNext" :text="tooltipTextNext"></ib-tooltip>
|
|
60
59
|
</ib-icon-button>
|
|
61
60
|
</div>
|
|
62
61
|
</div>
|
|
@@ -68,8 +67,7 @@ import IbIconButton from "../IconButton/IconButton.vue";
|
|
|
68
67
|
import IbInput from "../Form/Input/Input.vue";
|
|
69
68
|
import IbLabel from "../Form/Label/Label.vue";
|
|
70
69
|
import IbIcon from "../Icon.vue";
|
|
71
|
-
import
|
|
72
|
-
|
|
70
|
+
import IbTooltip from "../Tooltip/Tooltip.vue";
|
|
73
71
|
export default {
|
|
74
72
|
name: "IbPagination",
|
|
75
73
|
props: {
|
|
@@ -223,14 +221,6 @@ export default {
|
|
|
223
221
|
countPagePagination() {
|
|
224
222
|
return Math.ceil(this.countRows / this.limitValue);
|
|
225
223
|
},
|
|
226
|
-
displayPaginationInput() {
|
|
227
|
-
if(!this.showPaginationInput) return false;
|
|
228
|
-
|
|
229
|
-
return Boolean(this.countPagePagination >= 7);
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
directives: {
|
|
233
|
-
Tooltip
|
|
234
224
|
},
|
|
235
225
|
components: {
|
|
236
226
|
IbIconButton,
|
|
@@ -238,7 +228,7 @@ export default {
|
|
|
238
228
|
IbInput,
|
|
239
229
|
IbLabel,
|
|
240
230
|
IbLimitSelector,
|
|
241
|
-
|
|
231
|
+
IbTooltip,
|
|
242
232
|
},
|
|
243
233
|
};
|
|
244
234
|
</script>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
<ib-icon-button
|
|
40
40
|
v-if="!hideSortingButton"
|
|
41
|
-
v-tooltip="tooltipIconText"
|
|
41
|
+
v-tooltip:[tooltipIconPosition]="tooltipIconText"
|
|
42
42
|
kind="white"
|
|
43
43
|
size="s"
|
|
44
44
|
@click="clickHandler"
|
|
@@ -88,6 +88,9 @@ export default {
|
|
|
88
88
|
tooltipPosition: {
|
|
89
89
|
type: String,
|
|
90
90
|
},
|
|
91
|
+
tooltipIconPosition: {
|
|
92
|
+
type: String,
|
|
93
|
+
},
|
|
91
94
|
tooltipIconSorting: {
|
|
92
95
|
type: String,
|
|
93
96
|
},
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
{{ errorMessage }}
|
|
4
4
|
</ib-alert>
|
|
5
5
|
|
|
6
|
-
<div
|
|
6
|
+
<div
|
|
7
|
+
class="tree-select"
|
|
8
|
+
:class="{
|
|
9
|
+
...classList, 'tree-select-custom-trigger-content': hasTriggerContent
|
|
10
|
+
}"
|
|
11
|
+
>
|
|
7
12
|
<ib-dropdown
|
|
8
13
|
:disabled="isLoading"
|
|
9
14
|
:is-resizable="isResizable"
|
|
@@ -30,40 +35,49 @@
|
|
|
30
35
|
:aria-activedescendant="focusedOptionId"
|
|
31
36
|
:class="{
|
|
32
37
|
'tree-choice-opened': isOpened,
|
|
33
|
-
'has-clear-button':
|
|
38
|
+
'has-clear-button': showClearButton,
|
|
34
39
|
'tree-choice-error': errorMessage,
|
|
35
40
|
}"
|
|
36
41
|
>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
v-html="selectStatus || placeholder"
|
|
41
|
-
></span>
|
|
42
|
+
|
|
43
|
+
<template v-if="hasTriggerContent">
|
|
44
|
+
<slot v-bind:selected-count="selectedKeys.length" name="triggerContent"></slot>
|
|
42
45
|
</template>
|
|
46
|
+
|
|
43
47
|
<template v-else>
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<template v-if="htmlOptionTitle">
|
|
49
|
+
<span
|
|
50
|
+
:class="{ placeholder: !selectStatus }"
|
|
51
|
+
v-html="selectStatus || placeholder"
|
|
52
|
+
></span>
|
|
53
|
+
</template>
|
|
54
|
+
<template v-else>
|
|
55
|
+
<span :class="{ placeholder: !selectStatus }">
|
|
56
|
+
{{ selectStatus || placeholder }}
|
|
57
|
+
</span>
|
|
58
|
+
</template>
|
|
47
59
|
</template>
|
|
48
|
-
</div>
|
|
49
|
-
<ib-icon-button
|
|
50
|
-
v-if="showClearButton"
|
|
51
|
-
kind="ghost"
|
|
52
|
-
class="button-clear"
|
|
53
|
-
@click.prevent="clearValue"
|
|
54
|
-
@keypress.enter.stop.prevent
|
|
55
|
-
@keydown.enter.stop.prevent
|
|
56
|
-
@keyup.enter.prevent="clearValue"
|
|
57
|
-
:help-text="clearButtonMessage"
|
|
58
|
-
v-show="Object.keys(selected).length"
|
|
59
|
-
>
|
|
60
|
-
<ib-icon name="close-outline"></ib-icon>
|
|
61
|
-
</ib-icon-button>
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
<ib-icon-button
|
|
62
|
+
v-if="showClearButton"
|
|
63
|
+
kind="ghost"
|
|
64
|
+
class="button-clear"
|
|
65
|
+
@click.prevent="clearValue"
|
|
66
|
+
@keypress.enter.stop.prevent
|
|
67
|
+
@keydown.enter.stop.prevent
|
|
68
|
+
@keyup.enter.prevent="clearValue"
|
|
69
|
+
:help-text="clearButtonMessage"
|
|
70
|
+
v-show="Object.keys(selected).length"
|
|
71
|
+
>
|
|
72
|
+
<ib-icon name="close-outline"></ib-icon>
|
|
73
|
+
</ib-icon-button>
|
|
74
|
+
|
|
75
|
+
<ib-icon
|
|
76
|
+
:name="isOpened ? 'chevron-up-outline' : 'chevron-down-outline'"
|
|
77
|
+
:classes="'tree-select-caret'"
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
67
81
|
</template>
|
|
68
82
|
|
|
69
83
|
<template v-slot:body>
|
|
@@ -927,9 +941,14 @@ export default {
|
|
|
927
941
|
}
|
|
928
942
|
},
|
|
929
943
|
computed: {
|
|
944
|
+
// RENAME TO CUSTOM TREGER
|
|
930
945
|
hasTrigger() {
|
|
931
946
|
return !!this.$slots.trigger;
|
|
932
947
|
},
|
|
948
|
+
hasTriggerContent() {
|
|
949
|
+
console.log(this.$slots)
|
|
950
|
+
return !!this.$slots.triggerContent;
|
|
951
|
+
},
|
|
933
952
|
hasEmptyMessage() {
|
|
934
953
|
return !!this.$slots.emptyMessage;
|
|
935
954
|
},
|
|
@@ -27,6 +27,14 @@ $tree-search-border-color: $gray-600;
|
|
|
27
27
|
.tree-select {
|
|
28
28
|
width: 100%;
|
|
29
29
|
|
|
30
|
+
&.tree-select-custom-trigger-content {
|
|
31
|
+
width: fit-content;
|
|
32
|
+
|
|
33
|
+
// .tree-drop {
|
|
34
|
+
// min-width: 220px;
|
|
35
|
+
// }
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
.ib-dropdown {
|
|
31
39
|
width: 100%;
|
|
32
40
|
}
|
|
@@ -82,7 +90,11 @@ $tree-search-border-color: $gray-600;
|
|
|
82
90
|
transition: background-color 0.3s, border-color 0.3s, border-radius 0.3s;
|
|
83
91
|
|
|
84
92
|
&.has-clear-button {
|
|
85
|
-
padding-right:
|
|
93
|
+
padding-right: 60px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.tree-choice-custom-content {
|
|
97
|
+
width: fit-content;
|
|
86
98
|
}
|
|
87
99
|
|
|
88
100
|
span {
|