@weni/unnnic-system 2.0.29 → 2.0.31
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 +14 -0
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +2797 -2792
- package/dist/unnnic.umd.js +15 -15
- package/package.json +1 -1
- package/src/components/Alert/Alert.vue +5 -0
- package/src/components/SelectSmart/SelectSmart.vue +0 -2
- package/src/components/index.js +1 -1
- package/src/stories/Alert.stories.js +43 -36
package/package.json
CHANGED
|
@@ -78,6 +78,7 @@ export default {
|
|
|
78
78
|
},
|
|
79
79
|
closeText: {
|
|
80
80
|
type: String,
|
|
81
|
+
default: '',
|
|
81
82
|
},
|
|
82
83
|
position: {
|
|
83
84
|
type: String,
|
|
@@ -85,15 +86,19 @@ export default {
|
|
|
85
86
|
},
|
|
86
87
|
linkHref: {
|
|
87
88
|
type: String,
|
|
89
|
+
default: '',
|
|
88
90
|
},
|
|
89
91
|
linkTarget: {
|
|
90
92
|
type: String,
|
|
93
|
+
default: '',
|
|
91
94
|
},
|
|
92
95
|
linkText: {
|
|
93
96
|
type: String,
|
|
97
|
+
default: '',
|
|
94
98
|
},
|
|
95
99
|
type: {
|
|
96
100
|
type: String,
|
|
101
|
+
default: '',
|
|
97
102
|
},
|
|
98
103
|
},
|
|
99
104
|
};
|
|
@@ -308,8 +308,6 @@ export default {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
if (this.modelValue?.[0] && this.modelValue?.[0].value) {
|
|
311
|
-
this.modelValue.forEach((option) => this.selectOption(option));
|
|
312
|
-
|
|
313
311
|
if (this.isAutocompleteAllowed) {
|
|
314
312
|
this.$nextTick(() => {
|
|
315
313
|
this.searchValue = this.selectedLabel;
|
package/src/components/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import selectSmart from './SelectSmart/SelectSmart.vue';
|
|
|
35
35
|
import selectItem from './Select/SelectItem.vue';
|
|
36
36
|
// import selectListItem from './SelectListItem/SelectListItem.vue';
|
|
37
37
|
import multiSelect from './MultiSelect/MultiSelect.vue';
|
|
38
|
-
|
|
38
|
+
import alert from './Alert/Alert.vue';
|
|
39
39
|
// import autocomplete from './Input/Autocomplete.vue';
|
|
40
40
|
// import autocompleteSelect from './AutocompleteSelect/AutocompleteSelect.vue';
|
|
41
41
|
import tag from './Tag/Tag.vue';
|
|
@@ -7,50 +7,34 @@ export default {
|
|
|
7
7
|
title: 'example/Alert',
|
|
8
8
|
component: UnnnicAlert,
|
|
9
9
|
argTypes: {
|
|
10
|
-
|
|
11
|
-
showCloseButton: { control: { type: 'boolean' } },
|
|
12
|
-
title: { control: { type: 'text' } },
|
|
13
|
-
closeText: { control: { type: 'text' } },
|
|
14
|
-
scheme: {
|
|
10
|
+
type: {
|
|
15
11
|
control: {
|
|
16
12
|
type: 'select',
|
|
17
|
-
options: [
|
|
18
|
-
'feedback-red',
|
|
19
|
-
'feedback-green',
|
|
20
|
-
'feedback-yellow',
|
|
21
|
-
'feedback-blue',
|
|
22
|
-
'feedback-grey',
|
|
23
|
-
'aux-blue',
|
|
24
|
-
'aux-purple',
|
|
25
|
-
'aux-orange',
|
|
26
|
-
'aux-lemon',
|
|
27
|
-
'aux-pink',
|
|
28
|
-
],
|
|
29
13
|
},
|
|
14
|
+
options: ['default', 'success', 'error'],
|
|
30
15
|
},
|
|
31
|
-
|
|
16
|
+
|
|
17
|
+
text: {
|
|
32
18
|
control: {
|
|
33
|
-
type: '
|
|
34
|
-
options: [
|
|
35
|
-
'top-left',
|
|
36
|
-
'top-right',
|
|
37
|
-
'bottom-left',
|
|
38
|
-
'bottom-right',
|
|
39
|
-
'bottom-center',
|
|
40
|
-
],
|
|
19
|
+
type: 'text',
|
|
41
20
|
},
|
|
42
21
|
},
|
|
43
|
-
|
|
22
|
+
|
|
23
|
+
linkHref: {
|
|
44
24
|
control: {
|
|
45
|
-
type: '
|
|
46
|
-
options: ['check-circle-1-1', 'check-circle-1-1-1', 'alert-circle-1-1'],
|
|
25
|
+
type: 'text',
|
|
47
26
|
},
|
|
48
27
|
},
|
|
49
|
-
|
|
50
|
-
|
|
28
|
+
|
|
29
|
+
linkText: {
|
|
51
30
|
control: {
|
|
52
|
-
type: '
|
|
53
|
-
|
|
31
|
+
type: 'text',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
linkTarget: {
|
|
36
|
+
control: {
|
|
37
|
+
type: 'text',
|
|
54
38
|
},
|
|
55
39
|
},
|
|
56
40
|
},
|
|
@@ -62,14 +46,39 @@ export const Normal = {
|
|
|
62
46
|
setup() {
|
|
63
47
|
return { args };
|
|
64
48
|
},
|
|
49
|
+
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
alert: null,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
|
|
65
56
|
methods: {
|
|
66
57
|
unnnicCallAlert() {
|
|
67
58
|
alert.callAlert({ props: this.args, seconds: this.args.seconds });
|
|
68
59
|
},
|
|
60
|
+
|
|
61
|
+
showAlertAsInlineComponent() {
|
|
62
|
+
this.alert = {
|
|
63
|
+
...this.args,
|
|
64
|
+
};
|
|
65
|
+
},
|
|
69
66
|
},
|
|
70
67
|
template: `
|
|
71
68
|
<div>
|
|
72
|
-
<button @click="unnnicCallAlert">Click for alert</button>
|
|
69
|
+
<button @click="unnnicCallAlert">Click for alert as callAlert function</button>
|
|
70
|
+
|
|
71
|
+
<br />
|
|
72
|
+
|
|
73
|
+
<button @click="showAlertAsInlineComponent">Click for alert as inline component</button>
|
|
74
|
+
|
|
75
|
+
<UnnnicAlert
|
|
76
|
+
v-if="alert"
|
|
77
|
+
v-bind="alert"
|
|
78
|
+
@close="alert = null"
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
<pre>{{ alert }}</pre>
|
|
73
82
|
|
|
74
83
|
<h3>Refactoring changes:</h3>
|
|
75
84
|
|
|
@@ -97,8 +106,6 @@ export const Normal = {
|
|
|
97
106
|
args: {
|
|
98
107
|
title: 'Title',
|
|
99
108
|
text: 'Text',
|
|
100
|
-
icon: 'check-circle-1-1',
|
|
101
|
-
scheme: 'feedback-green',
|
|
102
109
|
},
|
|
103
110
|
};
|
|
104
111
|
|