@weni/unnnic-system 2.0.24 → 2.0.26
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 +12 -0
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +33 -8
- package/dist/unnnic.umd.js +16 -16
- package/package.json +2 -2
- package/src/components/Modal/Modal.vue +5 -2
- package/src/components/ModalNext/ModalNext.vue +435 -0
- package/src/components/Slider/Slider.vue +36 -8
- package/src/stories/ModalNext.stories.js +189 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import unnnicModalNext from '../components/ModalNext/ModalNext.vue';
|
|
2
|
+
import icons from '../utils/icons';
|
|
3
|
+
|
|
4
|
+
const iconsOptions = Object.keys(icons);
|
|
5
|
+
|
|
6
|
+
const schemesOptions = [
|
|
7
|
+
'feedback-red',
|
|
8
|
+
'feedback-green',
|
|
9
|
+
'feedback-yellow',
|
|
10
|
+
'feedback-blue',
|
|
11
|
+
'feedback-grey',
|
|
12
|
+
'aux-blue',
|
|
13
|
+
'aux-purple',
|
|
14
|
+
'aux-orange',
|
|
15
|
+
'aux-lemon',
|
|
16
|
+
'aux-pink',
|
|
17
|
+
'brand-weni',
|
|
18
|
+
'brand-weni-soft',
|
|
19
|
+
'neutral-clean',
|
|
20
|
+
'neutral-cleanest',
|
|
21
|
+
'neutral-dark',
|
|
22
|
+
'neutral-soft',
|
|
23
|
+
'neutral-darkest',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
title: 'Example/ModalNext',
|
|
28
|
+
component: unnnicModalNext,
|
|
29
|
+
argTypes: {
|
|
30
|
+
type: {
|
|
31
|
+
control: { type: 'select', options: ['default', 'video', 'alert'] },
|
|
32
|
+
},
|
|
33
|
+
icon: { control: { type: 'select', options: iconsOptions } },
|
|
34
|
+
scheme: { control: { type: 'select', options: schemesOptions } },
|
|
35
|
+
text: { control: { type: 'text' } },
|
|
36
|
+
description: { control: { type: 'text' } },
|
|
37
|
+
actionPrimaryButtonType: {
|
|
38
|
+
control: { type: 'select', options: ['primary', 'secondary'] },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
render: (args) => ({
|
|
42
|
+
setup() {
|
|
43
|
+
return { args };
|
|
44
|
+
},
|
|
45
|
+
data() {
|
|
46
|
+
return {
|
|
47
|
+
open: false,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
components: { unnnicModalNext },
|
|
51
|
+
template: `
|
|
52
|
+
<div>
|
|
53
|
+
<button @click="open = true">Open</button>
|
|
54
|
+
<unnnic-modal-next v-show="open" v-bind="args" @close="open = false">
|
|
55
|
+
|
|
56
|
+
This is the info content<br>
|
|
57
|
+
This is the info content<br>
|
|
58
|
+
This is the info content<br>
|
|
59
|
+
This is the info content<br>
|
|
60
|
+
This is the info content<br>
|
|
61
|
+
This is the info content<br>
|
|
62
|
+
This is the info content<br>
|
|
63
|
+
This is the info content<br>
|
|
64
|
+
This is the info content<br>
|
|
65
|
+
This is the info content<br>
|
|
66
|
+
This is the info content<br>
|
|
67
|
+
This is the info content<br>
|
|
68
|
+
This is the info content<br>
|
|
69
|
+
This is the info content<br>
|
|
70
|
+
This is the info content<br>
|
|
71
|
+
This is the info content<br>
|
|
72
|
+
This is the info content<br>
|
|
73
|
+
This is the info content<br>
|
|
74
|
+
This is the info content<br>
|
|
75
|
+
This is the info content<br>
|
|
76
|
+
This is the info content<br>
|
|
77
|
+
</unnnic-modal-next>
|
|
78
|
+
</div>
|
|
79
|
+
`,
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const Video = {
|
|
84
|
+
render: (args) => ({
|
|
85
|
+
setup() {
|
|
86
|
+
return { args };
|
|
87
|
+
},
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
open: false,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
components: { unnnicModalNext },
|
|
94
|
+
template: `
|
|
95
|
+
<div>
|
|
96
|
+
<button @click="open = true">Open</button>
|
|
97
|
+
<unnnic-modal-next v-show="open" v-bind="args" @close="open = false" />
|
|
98
|
+
</div>
|
|
99
|
+
`,
|
|
100
|
+
}),
|
|
101
|
+
args: {
|
|
102
|
+
type: 'video',
|
|
103
|
+
url: 'https://www.youtube.com/embed/J9QJBPrmoHs',
|
|
104
|
+
confirmButtonType: undefined,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const Default = {
|
|
109
|
+
args: {
|
|
110
|
+
type: undefined,
|
|
111
|
+
confirmButtonType: undefined,
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const Alert = {
|
|
116
|
+
args: {
|
|
117
|
+
type: 'alert',
|
|
118
|
+
icon: 'add-1',
|
|
119
|
+
scheme: 'feedback-green',
|
|
120
|
+
title: 'Title',
|
|
121
|
+
description: 'Description',
|
|
122
|
+
confirmButtonType: undefined,
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const AlertWithSlots = {
|
|
127
|
+
render: (args) => ({
|
|
128
|
+
setup() {
|
|
129
|
+
return { args };
|
|
130
|
+
},
|
|
131
|
+
data() {
|
|
132
|
+
return {
|
|
133
|
+
open: false,
|
|
134
|
+
};
|
|
135
|
+
},
|
|
136
|
+
components: { unnnicModalNext },
|
|
137
|
+
template: `
|
|
138
|
+
<div>
|
|
139
|
+
<button @click="open = true">Open</button>
|
|
140
|
+
<unnnic-modal-next v-show="open" v-bind="args" @close="open = false">
|
|
141
|
+
<template #title>
|
|
142
|
+
Title Slot
|
|
143
|
+
</template>
|
|
144
|
+
|
|
145
|
+
<template #description>
|
|
146
|
+
Description Slot
|
|
147
|
+
</template>
|
|
148
|
+
</unnnic-modal-next>
|
|
149
|
+
</div>
|
|
150
|
+
`,
|
|
151
|
+
}),
|
|
152
|
+
args: {
|
|
153
|
+
type: 'alert',
|
|
154
|
+
icon: 'add-1',
|
|
155
|
+
scheme: 'feedback-green',
|
|
156
|
+
confirmButtonType: undefined,
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const AlertWithValidate = {
|
|
161
|
+
args: {
|
|
162
|
+
type: 'alert',
|
|
163
|
+
icon: 'add-1',
|
|
164
|
+
scheme: 'feedback-red',
|
|
165
|
+
title: 'Title',
|
|
166
|
+
description: 'Description',
|
|
167
|
+
confirmButtonType: undefined,
|
|
168
|
+
validate: 'Hello World!',
|
|
169
|
+
validatePlaceholder: 'Validate Placeholder',
|
|
170
|
+
validateLabel: 'Validate <b>Hello World!</b>',
|
|
171
|
+
actionPrimaryLabel: 'Confirm',
|
|
172
|
+
actionSecondaryLabel: 'Cancel',
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const AlertWithActionButtons = {
|
|
177
|
+
args: {
|
|
178
|
+
type: 'alert',
|
|
179
|
+
icon: 'add-1',
|
|
180
|
+
scheme: 'feedback-red',
|
|
181
|
+
title: 'Title',
|
|
182
|
+
description: 'Description',
|
|
183
|
+
confirmButtonType: undefined,
|
|
184
|
+
actionPrimaryLabel: 'Confirm',
|
|
185
|
+
actionSecondaryLabel: 'Cancel',
|
|
186
|
+
actionPrimaryButtonType: undefined,
|
|
187
|
+
showCloseButton: true,
|
|
188
|
+
},
|
|
189
|
+
};
|