@vcita/design-system 0.5.1-beta.8 → 0.6.2-beta.0
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/CHANGELOG.MD +10 -0
- package/dist/@vcita/design-system.esm.js +1113 -823
- package/dist/@vcita/design-system.min.js +1 -1
- package/dist/@vcita/design-system.ssr.js +1024 -748
- package/init/SvgIcons.js +2 -1
- package/init/svgImages.js +2 -1
- package/package.json +1 -1
- package/src/components/VcChip/VcChip.vue +1 -1
- package/src/components/VcTextField/VcTextField.spec.js +67 -1
- package/src/components/VcTextField/VcTextField.stories.js +45 -1
- package/src/components/VcTextField/VcTextField.vue +23 -2
- package/src/components/VcUpsellBlock/VcUpsellBlock.spec.js +104 -0
- package/src/components/VcUpsellBlock/VcUpsellBlock.stories.js +124 -0
- package/src/components/VcUpsellBlock/VcUpsellBlock.vue +283 -0
- package/src/components/index.js +3 -0
- package/src/components/listBox/VcChecklistItem/VcChecklistItem.vue +19 -13
- package/src/components/listBox/VcListbox/VcListbox.vue +18 -13
- package/src/components/modal/elements/VcModalContainer.vue +2 -1
- package/src/components/modal/elements/VcModalFooter.stories.js +1 -1
- package/src/stories/assets/pics/upsellPage.png +0 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VcLayout class="VcUpsellBlock justify-space-between align-md-center" :class="isDialog ? 'pt-2 dialog-height' : ''" :data-qa="dataQa">
|
|
3
|
+
<div class="text-container flex-column pa-6 pb-0">
|
|
4
|
+
<div class="title-text mb-4">{{titleText}}</div>
|
|
5
|
+
<div class="sub-text mb-6">{{subtitleText}}</div>
|
|
6
|
+
<div v-if="bulletsText.length > 0" v-for="(item, index) in bulletsText" :key="index" class="bullets-text d-flex mb-3">
|
|
7
|
+
<div v-if="icon" class="align-self-start bullets-icon">
|
|
8
|
+
<VcIcon size="16">{{icon}}</VcIcon>
|
|
9
|
+
</div>
|
|
10
|
+
<span class="bullets-span">{{item}}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div v-if="linkText || buttonText" class="cta-container d-flex mt-md-6" :class="isDialog ? 'cta-container-dialog' : ''">
|
|
13
|
+
<VcButton v-if="buttonText" class="primary-cta" :pill="true" @click="$emit('buttonClick')">{{buttonText}}</VcButton>
|
|
14
|
+
<VcLink v-if="linkText" class="secondary-cta justify-center" :url="linkUrl" :label="linkText"></VcLink>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<VcLayout class="images-container">
|
|
18
|
+
<VcSvg class="background-stain" :svg="$svgImages.background_stain" />
|
|
19
|
+
<VcImage class="upsell-image" :image="imageUrl"></VcImage>
|
|
20
|
+
</VcLayout>
|
|
21
|
+
</VcLayout>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import VcLayout from "@/components/VcLayout/VcLayout.vue";
|
|
26
|
+
import VcButton from "@/components/VcButton/VcButton.vue";
|
|
27
|
+
import VcLink from "@/components/VcLink/VcLink.vue";
|
|
28
|
+
import VcImage from "@/components/VcImage/VcImage.vue";
|
|
29
|
+
import VcIcon from "@/components/VcIcon/VcIcon.vue";
|
|
30
|
+
import VcSvg from "@/components/VcSvg/VcSvg.vue";
|
|
31
|
+
export default {
|
|
32
|
+
name: "VcUpsellBlock",
|
|
33
|
+
components: {VcSvg, VcImage, VcLink, VcButton, VcLayout, VcIcon},
|
|
34
|
+
props:{
|
|
35
|
+
titleText:{
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
subtitleText:{
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
bulletsText:{
|
|
44
|
+
type: Array,
|
|
45
|
+
default: () => []
|
|
46
|
+
},
|
|
47
|
+
buttonText: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ''
|
|
50
|
+
},
|
|
51
|
+
linkText:{
|
|
52
|
+
type: String,
|
|
53
|
+
default: ''
|
|
54
|
+
},
|
|
55
|
+
imageUrl: {
|
|
56
|
+
type: [String, Object],
|
|
57
|
+
default: ''
|
|
58
|
+
},
|
|
59
|
+
linkUrl:{
|
|
60
|
+
type: String,
|
|
61
|
+
default: ''
|
|
62
|
+
},
|
|
63
|
+
mode: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: 'page',
|
|
66
|
+
validator: prop => ['page', 'dialog'].includes(prop)
|
|
67
|
+
},
|
|
68
|
+
dataQa:{
|
|
69
|
+
type:String,
|
|
70
|
+
default: 'VcUpsellBlock'
|
|
71
|
+
},
|
|
72
|
+
icon:{
|
|
73
|
+
type:String,
|
|
74
|
+
default:''
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
computed:{
|
|
78
|
+
isDialog(){
|
|
79
|
+
return this.mode === 'dialog'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<style lang="scss">
|
|
86
|
+
@import "../../scss/mixins.scss";
|
|
87
|
+
.VcUpsellBlock{
|
|
88
|
+
flex-flow: row wrap;
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100vh;
|
|
91
|
+
max-width: 960px;
|
|
92
|
+
margin: auto;
|
|
93
|
+
overflow-x: hidden;
|
|
94
|
+
font-style: normal;
|
|
95
|
+
@include md-and-up{
|
|
96
|
+
overflow-x: visible;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&.dialog-height{
|
|
100
|
+
height: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.text-container {
|
|
104
|
+
flex: 0 0 100%;
|
|
105
|
+
margin: 0 auto;
|
|
106
|
+
@include md-and-up {
|
|
107
|
+
flex: 0 0 55%;
|
|
108
|
+
max-width: 444px;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.title-text {
|
|
113
|
+
font-weight: var(--font-weight-large2);
|
|
114
|
+
font-size: var(--font-size-medium2);
|
|
115
|
+
line-height: 32px;
|
|
116
|
+
letter-spacing: 0.01em;
|
|
117
|
+
@include md-and-up{
|
|
118
|
+
font-size: var(--font-size-large);
|
|
119
|
+
line-height: 40px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.sub-text {
|
|
124
|
+
font-weight: var(--font-weight-large);
|
|
125
|
+
font-size: var(--font-size-medium);
|
|
126
|
+
line-height: 28px;
|
|
127
|
+
letter-spacing: var(--letter-spacing);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.bullets-text {
|
|
131
|
+
font-weight: var(--font-weight-medium2);
|
|
132
|
+
font-size: var(--font-size-small2);
|
|
133
|
+
line-height: 20px;
|
|
134
|
+
|
|
135
|
+
.bullets-icon {
|
|
136
|
+
margin-inline-end: 12px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.bullets-span{
|
|
140
|
+
font-weight: var(--font-weight-medium2);
|
|
141
|
+
font-size: var(--font-size-small2);
|
|
142
|
+
line-height: 20px;
|
|
143
|
+
color: #000000;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.cta-container{
|
|
148
|
+
flex: 1 1 auto;
|
|
149
|
+
flex-flow: row wrap;
|
|
150
|
+
align-items: center;
|
|
151
|
+
margin: 32px auto 0;
|
|
152
|
+
|
|
153
|
+
.primary-cta {
|
|
154
|
+
flex: 0 0 100%;
|
|
155
|
+
width: auto;
|
|
156
|
+
margin: 0 auto;
|
|
157
|
+
max-width: 214px;
|
|
158
|
+
line-height: 48px;
|
|
159
|
+
min-height: 48px;
|
|
160
|
+
font-weight: var(--font-weight-large);
|
|
161
|
+
font-size: var(--font-size-small2);
|
|
162
|
+
@include md-and-up{
|
|
163
|
+
flex: 0 0 45%;
|
|
164
|
+
margin: 0;
|
|
165
|
+
height: 48px;
|
|
166
|
+
}
|
|
167
|
+
.v-btn__content {
|
|
168
|
+
flex-flow: row wrap;
|
|
169
|
+
width: 100%;
|
|
170
|
+
white-space: break-spaces;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.secondary-cta{
|
|
175
|
+
flex: 0 0 100%;
|
|
176
|
+
text-align: center;
|
|
177
|
+
font-weight: var(--font-weight-large);
|
|
178
|
+
font-size: var(--font-size-small2);
|
|
179
|
+
line-height: 48px;
|
|
180
|
+
height: 48px;
|
|
181
|
+
color: var(--gray-darken-5);
|
|
182
|
+
margin: 0;
|
|
183
|
+
@include md-and-up{
|
|
184
|
+
flex: 0 0 45%;
|
|
185
|
+
color: var(--blue);
|
|
186
|
+
font-weight: var(--font-weight-large2);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.cta-container-dialog {
|
|
192
|
+
width: 100%;
|
|
193
|
+
z-index:1;
|
|
194
|
+
position: absolute;
|
|
195
|
+
justify-content: space-between;
|
|
196
|
+
background: white;
|
|
197
|
+
bottom: 0;
|
|
198
|
+
left: 0;
|
|
199
|
+
right:0;
|
|
200
|
+
margin: 0;
|
|
201
|
+
height: 72px;
|
|
202
|
+
padding: 0 24px;
|
|
203
|
+
@include md-and-up{
|
|
204
|
+
position: static;
|
|
205
|
+
justify-content: flex-start;
|
|
206
|
+
padding: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.primary-cta {
|
|
210
|
+
flex: 0 0 55%;
|
|
211
|
+
margin: 0;
|
|
212
|
+
order: 2;
|
|
213
|
+
@include md-and-up{
|
|
214
|
+
flex: 0 0 45%;
|
|
215
|
+
order:0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.secondary-cta{
|
|
220
|
+
flex: 1 0 35%;
|
|
221
|
+
padding-top: 0;
|
|
222
|
+
@include md-and-up{
|
|
223
|
+
flex: 0 0 45%;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.images-container {
|
|
230
|
+
position: relative;
|
|
231
|
+
flex: 1 0 100%;
|
|
232
|
+
margin: 0 auto;
|
|
233
|
+
min-height: 40%;
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
|
|
236
|
+
@include md-and-up {
|
|
237
|
+
flex: 0 0 45%;
|
|
238
|
+
min-height: 0;
|
|
239
|
+
overflow: visible;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.background-stain{
|
|
243
|
+
position: absolute;
|
|
244
|
+
opacity: 15%;
|
|
245
|
+
width: 600px;
|
|
246
|
+
height: 380px;
|
|
247
|
+
left: 80px;
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
#app[dir="rtl"] &{
|
|
250
|
+
transform: scaleX(-1);
|
|
251
|
+
width: inherit;
|
|
252
|
+
left:auto;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@include md-and-up{
|
|
256
|
+
width: 1400px;
|
|
257
|
+
height: 800px;
|
|
258
|
+
left: -15px;
|
|
259
|
+
top: -360px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
#background_stain{
|
|
263
|
+
fill: var(--v-secondary-base);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.upsell-image {
|
|
268
|
+
position: absolute;
|
|
269
|
+
width: 320px;
|
|
270
|
+
height: 380px;
|
|
271
|
+
right: 0;
|
|
272
|
+
left:0;
|
|
273
|
+
margin: 0 auto;
|
|
274
|
+
@include md-and-up {
|
|
275
|
+
height: 580px;
|
|
276
|
+
width: 466px;
|
|
277
|
+
top: -300px;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
</style>
|
package/src/components/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export {default as VcBottomSheet} from './VcBottomSheet/VcBottomSheet.vue';
|
|
|
19
19
|
export {default as VcInputBottomSheet} from './VcInputBottomSheet/VcInputBottomSheet.vue';
|
|
20
20
|
export {default as VcPopover} from './VcPopover/VcPopover.vue';
|
|
21
21
|
export {default as VcInputPopover} from './VcInputPopover/VcInputPopover.vue';
|
|
22
|
+
export {default as VcChip} from './VcChip/VcChip.vue';
|
|
22
23
|
// export {default as VcAutoComplete} from './VcAutoComplete/VcAutoComplete.vue';
|
|
23
24
|
export {default as VcButton} from './VcButton/VcButton.vue';
|
|
24
25
|
export {default as VcButtonGroup} from './VcButtonGroup/VcButtonGroup.vue';
|
|
@@ -47,3 +48,5 @@ export {default as VcWizardCtaContainer} from './wizard/VcWizardCtaContainer/VcW
|
|
|
47
48
|
export {default as VcWizard} from './wizard/VcWizard/VcWizard.vue';
|
|
48
49
|
export {default as VcImage} from './VcImage/VcImage.vue';
|
|
49
50
|
export {default as VcBadge} from './VcBadge/VcBadge.vue';
|
|
51
|
+
export {default as VcUpsellBlock} from './VcUpsellBlock/VcUpsellBlock.vue';
|
|
52
|
+
export {default as VcModalContainer} from './modal/elements/VcModalContainer.vue';
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<VcTooltip :content="tooltipContent"
|
|
3
|
+
dark
|
|
4
|
+
:disabled="!tooltipContent || !disabled"
|
|
5
|
+
class="VcChecklistItem-wrapper">
|
|
6
|
+
<template>
|
|
7
|
+
<VcLayout class="VcChecklistItem" :data-qa="dataQa"
|
|
8
|
+
:class="{'disabled': disabled}">
|
|
9
|
+
<VcCheckbox :checked="checked"
|
|
10
|
+
:avatar="getAvatar"
|
|
11
|
+
:label="label"
|
|
12
|
+
:show-avatar-border="false"
|
|
13
|
+
:disabled="disabled"
|
|
14
|
+
:data-qa="`${dataQa}-checkbox`"
|
|
15
|
+
@change="onChange">
|
|
16
|
+
|
|
17
|
+
</VcCheckbox>
|
|
18
|
+
</VcLayout>
|
|
19
|
+
</template>
|
|
20
|
+
</VcTooltip>
|
|
15
21
|
</template>
|
|
16
22
|
|
|
17
23
|
<script>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:data-qa="dataQa">
|
|
11
11
|
<div class="vc-overflow">
|
|
12
12
|
<v-list-item-group
|
|
13
|
-
|
|
13
|
+
:value="confirmedArray"
|
|
14
14
|
multiple
|
|
15
15
|
@change="onSelection">
|
|
16
16
|
<VcTooltip v-for="(item, index) in items"
|
|
@@ -76,25 +76,30 @@ export default {
|
|
|
76
76
|
default: 'VcListbox'
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
data: () => ({
|
|
80
|
-
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
79
|
+
// data: () => ({
|
|
80
|
+
// confirmedArray: []
|
|
81
|
+
// }),
|
|
82
|
+
// watch: {
|
|
83
|
+
// items: {
|
|
84
|
+
// immediate: true,
|
|
85
|
+
// deep: true,
|
|
86
|
+
// handler(values) {
|
|
87
|
+
// this.confirmedArray = values.filter((item) => item.checked)
|
|
88
|
+
// }
|
|
89
|
+
// }
|
|
90
|
+
// },
|
|
89
91
|
computed: {
|
|
90
92
|
getAddAnotherLabel() {
|
|
91
93
|
return this.addAnotherLabel || this.$dst('ds.listbox.add')
|
|
94
|
+
},
|
|
95
|
+
confirmedArray() {
|
|
96
|
+
return this.items.filter(item => item.checked)
|
|
92
97
|
}
|
|
93
98
|
},
|
|
94
99
|
methods: {
|
|
95
100
|
onSelection(selections) {
|
|
96
|
-
selections.
|
|
97
|
-
this.$emit('change',
|
|
101
|
+
const newSelections = selections.map((selected) => ({...selected, checked: true}))
|
|
102
|
+
this.$emit('change', newSelections)
|
|
98
103
|
}
|
|
99
104
|
}
|
|
100
105
|
};
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<div class="VcModalContainerContent">
|
|
22
22
|
<slot name="content"/>
|
|
23
23
|
</div>
|
|
24
|
-
<footer :class="{'showDivider': showFooterDivider}">
|
|
24
|
+
<footer v-if="!!$slots.footer" :class="{'showDivider': showFooterDivider}">
|
|
25
25
|
<slot name="footer"/>
|
|
26
26
|
</footer>
|
|
27
27
|
</v-layout>
|
|
@@ -119,6 +119,7 @@ export default {
|
|
|
119
119
|
|
|
120
120
|
.VcModalCloseButton {
|
|
121
121
|
position: absolute;
|
|
122
|
+
z-index: 1;
|
|
122
123
|
right: 5px;
|
|
123
124
|
top: var(--size-value2);
|
|
124
125
|
|
|
@@ -15,7 +15,7 @@ export const Playground = Template.bind({});
|
|
|
15
15
|
// Set default values
|
|
16
16
|
Playground.args = {
|
|
17
17
|
direction: 'horizontal',
|
|
18
|
-
buttons: [{label: 'ok', event: 'onOkClicked', color: '
|
|
18
|
+
buttons: [{label: 'ok', event: 'onOkClicked', color: 'white'},
|
|
19
19
|
{label: 'cancel', event: 'onCancelClicked', color: 'secondary'}],
|
|
20
20
|
}
|
|
21
21
|
|
|
Binary file
|