@webitel/ui-sdk 3.2.112 → 3.2.113
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 +55 -1
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +55 -1
- 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/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-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
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>
|