@webitel/ui-sdk 3.2.112 → 3.2.114
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/ui-sdk.common.js +67 -11
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +64 -8
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +1 -1
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/wt-context-menu/wt-context-menu.vue +14 -6
- package/src/components/index.js +3 -0
- package/src/components/organisms/wt-expansion-panel/__tests__/WtExpansionPanel.spec.js +9 -0
- package/src/components/organisms/wt-expansion-panel/wt-expansion-panel.vue +67 -0
- package/src/css/components/atoms/wt-context-menu/_variables.scss +2 -0
- package/src/css/components/atoms/wt-input-info/_variables.scss +2 -2
- /package/src/components/organisms/wt-filters-panel-wrapper/__tests__/{wt-filters-panel-wrapper.spec.js → WtFiltersPanelWrapper.spec.js} +0 -0
package/package.json
CHANGED
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
>
|
|
22
22
|
<!-- <a> click.prevent prevents redirect to # -->
|
|
23
23
|
<a
|
|
24
|
+
:class="[
|
|
25
|
+
{ 'wt-context-menu__option--disabled': option.disabled },
|
|
26
|
+
]"
|
|
24
27
|
class="wt-context-menu__option"
|
|
25
28
|
href="#"
|
|
26
29
|
@click.prevent="handleOptionClick({ option, index, hide })"
|
|
@@ -40,7 +43,7 @@ const props = defineProps({
|
|
|
40
43
|
options: {
|
|
41
44
|
type: Array,
|
|
42
45
|
required: true,
|
|
43
|
-
description: '[{ text }]',
|
|
46
|
+
description: '[{ text, disabled, ... anything you need }]',
|
|
44
47
|
},
|
|
45
48
|
visible: {
|
|
46
49
|
type: Boolean,
|
|
@@ -100,16 +103,21 @@ function handleOptionClick({ option, index, hide }) {
|
|
|
100
103
|
&:only-of-type {
|
|
101
104
|
border-radius: var(--border-radius);
|
|
102
105
|
}
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
background-color: var(--context-menu-option-color--hover);
|
|
106
|
-
transition: var(--transition);
|
|
107
|
-
}
|
|
108
106
|
}
|
|
109
107
|
|
|
110
108
|
.wt-context-menu__option {
|
|
111
109
|
display: block;
|
|
112
110
|
padding: var(--context-menu-option-padding);
|
|
113
111
|
cursor: pointer;
|
|
112
|
+
|
|
113
|
+
&:hover {
|
|
114
|
+
background-color: var(--context-menu-option-color--hover);
|
|
115
|
+
transition: var(--transition);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--disabled {
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
color: var(--context-menu-option-color--disabled);
|
|
121
|
+
}
|
|
114
122
|
}
|
|
115
123
|
</style>
|
package/src/components/index.js
CHANGED
|
@@ -56,6 +56,8 @@ import WtTableColumnSelect from './organisms/wt-table-column-select/wt-table-col
|
|
|
56
56
|
import WtIconAction from './atoms/wt-icon-action/wt-icon-action.vue';
|
|
57
57
|
import WtPageHeader from './organisms/wt-page-header/wt-page-header.vue';
|
|
58
58
|
import WtStepper from './organisms/wt-stepper/wt-stepper.vue';
|
|
59
|
+
import WtExpansionPanel
|
|
60
|
+
from './organisms/wt-expansion-panel/wt-expansion-panel.vue';
|
|
59
61
|
|
|
60
62
|
const Components = {
|
|
61
63
|
WtAvatar,
|
|
@@ -113,6 +115,7 @@ const Components = {
|
|
|
113
115
|
WtItemLink,
|
|
114
116
|
WtDummy,
|
|
115
117
|
WtStepper,
|
|
118
|
+
WtExpansionPanel,
|
|
116
119
|
};
|
|
117
120
|
|
|
118
121
|
export default Components;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtExpansionPanel from '../wt-expansion-panel.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtExpansionPanel', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtExpansionPanel);
|
|
7
|
+
expect(wrapper.isVisible()).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[{'wt-expansion-panel--opened':open},
|
|
4
|
+
`wt-expansion-panel--${props.size}`]"
|
|
5
|
+
class="wt-expansion-panel"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="wt-expansion-panel-header"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
@click="open = !open"
|
|
11
|
+
@keypress.enter="open = !open"
|
|
12
|
+
>
|
|
13
|
+
<slot name="title"></slot>
|
|
14
|
+
<wt-icon
|
|
15
|
+
icon="arrow-right"
|
|
16
|
+
></wt-icon>
|
|
17
|
+
</div>
|
|
18
|
+
<wt-expand-transition>
|
|
19
|
+
<div v-show="open">
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</wt-expand-transition>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
import { ref } from 'vue';
|
|
28
|
+
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
size: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'md',
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const open = ref(true);
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="scss" scoped>
|
|
40
|
+
.wt-expansion-panel {
|
|
41
|
+
.wt-expansion-panel-header {
|
|
42
|
+
@extend %typo-subtitle-1;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
padding: var(--spacing-2xs) var(--spacing-xs);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
border-radius: var(--spacing-2xs);
|
|
48
|
+
background-color: var(--secondary-color-50);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.wt-icon {
|
|
52
|
+
margin-left: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--sm {
|
|
56
|
+
.wt-expansion-panel-header {
|
|
57
|
+
@extend %typo-subtitle-2;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&--opened {
|
|
62
|
+
.wt-icon {
|
|
63
|
+
transform: rotate(90deg);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</style>
|