@avakhula/ui 0.0.64 → 0.0.66
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/dist/index.js +25 -18
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/scss/mixins/tooltip-position.scss +1 -1
- package/src/components/Popover/constants.js +1 -1
- package/src/components/Sorting/Sorting.stories.js +8 -2
- package/src/components/Sorting/Sorting.vue +26 -10
- package/src/components/ToggleTip/constants.js +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IbSorting from "./Sorting.vue";
|
|
2
2
|
import { typesSorting, typesSortingView } from "./constants.js";
|
|
3
|
+
import { popoverPosition } from "../Popover/constants";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: "Sorting",
|
|
@@ -9,10 +10,14 @@ export default {
|
|
|
9
10
|
control: { type: "select" },
|
|
10
11
|
options: Object.values(typesSorting),
|
|
11
12
|
},
|
|
12
|
-
|
|
13
|
+
view: {
|
|
13
14
|
control: { type: "select" },
|
|
14
15
|
options: Object.values(typesSortingView),
|
|
15
16
|
},
|
|
17
|
+
tooltipPosition: {
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
options: Object.values(popoverPosition),
|
|
20
|
+
},
|
|
16
21
|
},
|
|
17
22
|
};
|
|
18
23
|
|
|
@@ -30,6 +35,7 @@ const Template = (args) => ({
|
|
|
30
35
|
|
|
31
36
|
export const Default = Template.bind({});
|
|
32
37
|
Default.args = {
|
|
33
|
-
|
|
38
|
+
view: typesSortingView.TABLE_VIEW,
|
|
34
39
|
title: "sorting",
|
|
40
|
+
tableName: "test",
|
|
35
41
|
};
|
|
@@ -4,18 +4,26 @@
|
|
|
4
4
|
class="table-sorting-wrapper"
|
|
5
5
|
:class="{
|
|
6
6
|
active: currentTypeSort,
|
|
7
|
-
disabled:
|
|
7
|
+
disabled: disable,
|
|
8
8
|
}"
|
|
9
|
-
v-if="
|
|
9
|
+
v-if="view === sortingTypesView.TABLE_VIEW"
|
|
10
10
|
>
|
|
11
11
|
<button class="sorting-label" type="button">
|
|
12
12
|
{{ title }}
|
|
13
|
-
<ib-tooltip
|
|
13
|
+
<ib-tooltip
|
|
14
|
+
v-if="tooltipText"
|
|
15
|
+
:text="tooltipText"
|
|
16
|
+
:position="tooltipPosition"
|
|
17
|
+
>
|
|
14
18
|
</ib-tooltip>
|
|
15
19
|
</button>
|
|
16
20
|
<ib-icon-button kind="white" size="s" @click="clickHandler">
|
|
17
21
|
<ion-icon :name="iconType"></ion-icon>
|
|
18
|
-
<ib-tooltip
|
|
22
|
+
<ib-tooltip
|
|
23
|
+
v-if="tooltipIconSorting"
|
|
24
|
+
:text="tooltipIconSorting"
|
|
25
|
+
:position="tooltipPosition"
|
|
26
|
+
>
|
|
19
27
|
</ib-tooltip>
|
|
20
28
|
</ib-icon-button>
|
|
21
29
|
</div>
|
|
@@ -28,12 +36,16 @@
|
|
|
28
36
|
@click="clickHandler"
|
|
29
37
|
:class="{
|
|
30
38
|
active: currentTypeSort,
|
|
31
|
-
disabled:
|
|
39
|
+
disabled: disable,
|
|
32
40
|
}"
|
|
33
41
|
>
|
|
34
42
|
{{ title }}
|
|
35
43
|
<ib-icon v-if="iconType" :name="iconType"></ib-icon>
|
|
36
|
-
<ib-tooltip
|
|
44
|
+
<ib-tooltip
|
|
45
|
+
v-if="tooltipText"
|
|
46
|
+
:text="tooltipText"
|
|
47
|
+
:position="tooltipPosition"
|
|
48
|
+
>
|
|
37
49
|
</ib-tooltip>
|
|
38
50
|
</button>
|
|
39
51
|
</div>
|
|
@@ -48,9 +60,13 @@ import { typesSorting, typesSortingView } from "./constants.js";
|
|
|
48
60
|
export default {
|
|
49
61
|
name: "IbSorting",
|
|
50
62
|
props: {
|
|
51
|
-
|
|
63
|
+
tooltipText: {
|
|
52
64
|
type: String,
|
|
53
65
|
},
|
|
66
|
+
tooltipPosition: {
|
|
67
|
+
type: String,
|
|
68
|
+
},
|
|
69
|
+
// ??????
|
|
54
70
|
tooltipIconSorting: {
|
|
55
71
|
type: String,
|
|
56
72
|
},
|
|
@@ -62,11 +78,11 @@ export default {
|
|
|
62
78
|
type: String,
|
|
63
79
|
default: null,
|
|
64
80
|
},
|
|
65
|
-
|
|
81
|
+
view: {
|
|
66
82
|
type: String,
|
|
67
83
|
required: true,
|
|
68
84
|
},
|
|
69
|
-
|
|
85
|
+
disable: {
|
|
70
86
|
type: Boolean,
|
|
71
87
|
default: false,
|
|
72
88
|
},
|
|
@@ -112,7 +128,7 @@ export default {
|
|
|
112
128
|
return "arrow-up";
|
|
113
129
|
} else if (this.currentTypeSort === this.sortingTypes.TYPE_DESC) {
|
|
114
130
|
return "arrow-down";
|
|
115
|
-
} else if (this.
|
|
131
|
+
} else if (this.view !== this.sortingTypesView.GRID_VIEW) {
|
|
116
132
|
return "swap-vertical";
|
|
117
133
|
}
|
|
118
134
|
return null;
|