@webitel/ui-sdk 2.1.5 → 2.1.7
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 +15 -10
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +17 -12
- 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 -3
- package/src/components/molecules/wt-popup/wt-popup.vue +27 -31
- package/src/css/components/molecules/wt-popup/_variables.scss +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve-lib": "vue-cli-service serve",
|
|
@@ -31,11 +31,9 @@
|
|
|
31
31
|
"deep-equal": "^2.0.3",
|
|
32
32
|
"file-saver": "^2.0.2",
|
|
33
33
|
"floating-vue": "^1.0.0-beta.17",
|
|
34
|
-
"i": "^0.3.7",
|
|
35
34
|
"jszip": "^3.5.0",
|
|
36
35
|
"jszip-utils": "^0.1.0",
|
|
37
36
|
"node-polyfill-webpack-plugin": "^1.1.4",
|
|
38
|
-
"npm": "^8.10.0",
|
|
39
37
|
"plyr": "3.6.2",
|
|
40
38
|
"vue": "^2.6.11",
|
|
41
39
|
"vue-i18n": "^8.18.2",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="wt-popup"
|
|
4
3
|
:class="{ 'wt-popup--overflow': overflow }"
|
|
4
|
+
class="wt-popup"
|
|
5
5
|
>
|
|
6
|
-
<div class="wt-popup__shadow"></div>
|
|
7
6
|
<aside
|
|
8
|
-
class="wt-popup__popup"
|
|
9
7
|
:style="popupStyle"
|
|
8
|
+
class="wt-popup__popup"
|
|
10
9
|
>
|
|
11
10
|
<header class="wt-popup__header">
|
|
12
11
|
<slot name="header">
|
|
@@ -20,10 +19,10 @@
|
|
|
20
19
|
@click="$emit('close')"
|
|
21
20
|
></wt-icon-btn>
|
|
22
21
|
</header>
|
|
23
|
-
<section
|
|
22
|
+
<section v-if="$slots.main" class="wt-popup__main">
|
|
24
23
|
<slot name="main"></slot>
|
|
25
24
|
</section>
|
|
26
|
-
<footer
|
|
25
|
+
<footer v-if="$slots.actions" class="wt-popup__actions">
|
|
27
26
|
<slot name="actions"></slot>
|
|
28
27
|
</footer>
|
|
29
28
|
</aside>
|
|
@@ -37,6 +36,9 @@ export default {
|
|
|
37
36
|
minWidth: {
|
|
38
37
|
type: [Number, String],
|
|
39
38
|
},
|
|
39
|
+
width: {
|
|
40
|
+
type: [Number, String],
|
|
41
|
+
},
|
|
40
42
|
overflow: {
|
|
41
43
|
type: Boolean,
|
|
42
44
|
default: false,
|
|
@@ -44,7 +46,10 @@ export default {
|
|
|
44
46
|
},
|
|
45
47
|
computed: {
|
|
46
48
|
popupStyle() {
|
|
47
|
-
|
|
49
|
+
let style = '';
|
|
50
|
+
style += this.minWidth ? `min-width: ${this.minWidth}px;` : '';
|
|
51
|
+
style += this.width ? `width: ${this.width}px;` : '';
|
|
52
|
+
return style;
|
|
48
53
|
},
|
|
49
54
|
},
|
|
50
55
|
};
|
|
@@ -53,37 +58,28 @@ export default {
|
|
|
53
58
|
<style lang="scss" scoped>
|
|
54
59
|
.wt-popup {
|
|
55
60
|
position: fixed;
|
|
61
|
+
z-index: var(--popup-wrapper-z-index);
|
|
56
62
|
top: 0;
|
|
57
63
|
right: 0;
|
|
58
64
|
bottom: 0;
|
|
59
65
|
left: 0;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
top: 0;
|
|
65
|
-
right: 0;
|
|
66
|
-
bottom: 0;
|
|
67
|
-
left: 0;
|
|
68
|
-
background: var(--popup-shadow-color);
|
|
69
|
-
z-index: 0;
|
|
70
|
-
}
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
background: var(--popup-shadow-color);
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
.wt-popup__popup {
|
|
74
|
-
|
|
75
|
-
top: 50%;
|
|
76
|
-
left: 50%;
|
|
73
|
+
z-index: 1;
|
|
77
74
|
display: flex;
|
|
78
75
|
flex-direction: column;
|
|
79
|
-
gap: var(--popup-sections-gap);
|
|
80
76
|
max-height: var(--popup-max-height);
|
|
77
|
+
margin: var(--popup-padding);
|
|
81
78
|
padding: var(--popup-padding);
|
|
82
|
-
background: var(--popup-bg-color);
|
|
83
|
-
transform: translate(-50%, -50%);
|
|
84
79
|
border-radius: var(--border-radius);
|
|
80
|
+
background: var(--popup-bg-color);
|
|
85
81
|
box-shadow: var(--elevation-10);
|
|
86
|
-
|
|
82
|
+
gap: var(--popup-sections-gap);
|
|
87
83
|
}
|
|
88
84
|
|
|
89
85
|
.wt-popup__header {
|
|
@@ -92,14 +88,14 @@ export default {
|
|
|
92
88
|
display: flex;
|
|
93
89
|
align-items: center;
|
|
94
90
|
justify-content: space-between;
|
|
95
|
-
gap: var(--popup-header-padding);
|
|
96
91
|
padding: var(--popup-header-padding);
|
|
97
|
-
background: var(--popup-header-bg-color);
|
|
98
92
|
border-radius: var(--border-radius);
|
|
93
|
+
background: var(--popup-header-bg-color);
|
|
94
|
+
gap: var(--popup-header-padding);
|
|
99
95
|
|
|
100
96
|
.wt-popup__title {
|
|
101
|
-
font: inherit;
|
|
102
97
|
flex-grow: 1;
|
|
98
|
+
font: inherit;
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
.wt-popup__close-btn {
|
|
@@ -110,18 +106,18 @@ export default {
|
|
|
110
106
|
.wt-popup__main {
|
|
111
107
|
@extend %wt-scrollbar;
|
|
112
108
|
@extend %typo-body-1;
|
|
113
|
-
min-height: 0;
|
|
114
|
-
flex-grow: 1;
|
|
115
109
|
overflow-y: auto;
|
|
110
|
+
flex-grow: 1;
|
|
111
|
+
min-height: 0;
|
|
116
112
|
padding-right: var(--popup-main-section-padding-right);
|
|
117
113
|
}
|
|
118
114
|
|
|
119
115
|
.wt-popup__actions {
|
|
120
116
|
display: flex;
|
|
121
|
-
justify-content: center;
|
|
122
117
|
align-items: center;
|
|
123
|
-
|
|
118
|
+
justify-content: center;
|
|
124
119
|
padding: var(--popup-actions-padding);
|
|
120
|
+
gap: var(--popup-actions-padding);
|
|
125
121
|
}
|
|
126
122
|
|
|
127
123
|
.wt-popup--overflow {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--popup-shadow-opacity: 0.8;
|
|
6
6
|
--popup-shadow-color: hsla(var(--_contrast-color), var(--popup-shadow-opacity));
|
|
7
7
|
|
|
8
|
-
--popup-max-height:
|
|
8
|
+
--popup-max-height: 90%;
|
|
9
9
|
|
|
10
10
|
--popup-bg-color: var(--main-color);
|
|
11
11
|
--popup-sections-gap: var(--spacing-sm);
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
--popup-main-section-padding-right: var(--spacing-xs); // scroll offset
|
|
18
18
|
|
|
19
19
|
--popup-actions-padding: var(--spacing-xs);
|
|
20
|
-
}
|
|
20
|
+
}
|