@weni/unnnic-system 2.0.2 → 2.0.4
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/README.md +36 -36
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +191 -194
- package/dist/unnnic.umd.js +17 -17
- package/package.json +1 -1
- package/src/assets/scss/colors.scss +241 -241
- package/src/components/Accordion/Accordion.vue +3 -3
- package/src/components/Alert/Alert.vue +4 -4
- package/src/components/Banner/InfoBanner.vue +3 -3
- package/src/components/Button/Button.vue +6 -6
- package/src/components/Card/BlankCard.vue +3 -3
- package/src/components/Card/ContentCard.vue +3 -3
- package/src/components/Card/MarketplaceCard.vue +3 -3
- package/src/components/Carousel/TagCarousel.vue +4 -4
- package/src/components/Checkbox/Checkbox.vue +3 -3
- package/src/components/Flag.vue +3 -3
- package/src/components/Icon.vue +2 -2
- package/src/components/Modal/Modal.vue +4 -4
- package/src/components/Radio/Radio.vue +2 -1
- package/src/components/SelectSmart/SelectSmartMultipleHeader.vue +3 -3
- package/src/components/Sidebar/SidebarPrimary.vue +5 -5
- package/src/components/Switch/Switch.vue +3 -3
- package/src/components/Tag/BrandTag.vue +3 -3
- package/src/components/Tag/DefaultTag.vue +3 -3
- package/src/components/Tag/IndicatorTag.vue +3 -3
- package/src/components/UploadArea/UploadArea.vue +3 -3
- package/src/components/index.js +3 -3
- package/src/stories/Alert.stories.js +20 -15
- package/src/stories/Comment.stories.js +3 -3
- package/src/utils/call.js +14 -6
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
v-if="typeAction === 'add'"
|
|
29
29
|
class="unnnic-card-marketplace__content__rating"
|
|
30
30
|
>
|
|
31
|
-
<
|
|
31
|
+
<UnnnicIcon
|
|
32
32
|
class="unnnic-card-marketplace__content__rating__star"
|
|
33
33
|
scheme="feedback-yellow"
|
|
34
34
|
icon="rating-star-1"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
|
-
import
|
|
49
|
+
import UnnnicIcon from '../Icon.vue';
|
|
50
50
|
|
|
51
51
|
export default {
|
|
52
52
|
name: 'unnnic-card',
|
|
53
|
-
components: {
|
|
53
|
+
components: { UnnnicIcon },
|
|
54
54
|
props: {
|
|
55
55
|
title: {
|
|
56
56
|
type: String,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
class="unnnic-card-tag-carousel__button unnnic-card-tag-carousel__button--left"
|
|
5
5
|
>
|
|
6
6
|
<div class="unnnic-card-tag-carousel__button__icon">
|
|
7
|
-
<
|
|
7
|
+
<UnnnicIcon
|
|
8
8
|
icon="arrow-left-1-1"
|
|
9
9
|
size="sm"
|
|
10
10
|
@click="previous()"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
v-show="hasNext"
|
|
47
47
|
/>
|
|
48
48
|
<div class="unnnic-card-tag-carousel__button__icon">
|
|
49
|
-
<
|
|
49
|
+
<UnnnicIcon
|
|
50
50
|
icon="arrow-right-1-1"
|
|
51
51
|
@click="next()"
|
|
52
52
|
size="sm"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
<script>
|
|
62
62
|
import UnnnicTag from '../Tag/Tag.vue';
|
|
63
|
-
import
|
|
63
|
+
import UnnnicIcon from '../Icon.vue';
|
|
64
64
|
|
|
65
65
|
export default {
|
|
66
66
|
name: 'unnnic-tag-carousel',
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
},
|
|
74
74
|
components: {
|
|
75
75
|
UnnnicTag,
|
|
76
|
-
|
|
76
|
+
UnnnicIcon,
|
|
77
77
|
},
|
|
78
78
|
props: {
|
|
79
79
|
modelValue: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="unnnic-checkbox-wrapper">
|
|
4
|
-
<
|
|
4
|
+
<UnnnicIcon
|
|
5
5
|
class="unnnic-checkbox"
|
|
6
6
|
:class="{ disabled }"
|
|
7
7
|
:icon="icon"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script>
|
|
28
|
-
import
|
|
28
|
+
import UnnnicIcon from '../Icon.vue';
|
|
29
29
|
|
|
30
30
|
export default {
|
|
31
31
|
model: {
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
},
|
|
61
61
|
|
|
62
62
|
components: {
|
|
63
|
-
|
|
63
|
+
UnnnicIcon,
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
computed: {
|
package/src/components/Flag.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<UnnnicIcon
|
|
3
3
|
:icon="name"
|
|
4
4
|
:size="size"
|
|
5
5
|
/>
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
<script>
|
|
9
9
|
/* eslint-disable global-require */
|
|
10
10
|
/* eslint-disable vue/multi-word-component-names */
|
|
11
|
-
import
|
|
11
|
+
import UnnnicIcon from './Icon.vue';
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
name: 'Flag',
|
|
15
15
|
components: {
|
|
16
|
-
|
|
16
|
+
UnnnicIcon,
|
|
17
17
|
},
|
|
18
18
|
props: {
|
|
19
19
|
code: {
|
package/src/components/Icon.vue
CHANGED
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
<script>
|
|
37
37
|
import icons from '../utils/icons';
|
|
38
38
|
import OldIconsMap from './Icon/OldIconsMap.json';
|
|
39
|
-
|
|
39
|
+
/* eslint-disable vue/multi-word-component-names */
|
|
40
40
|
export default {
|
|
41
|
-
name: '
|
|
41
|
+
name: 'Icon',
|
|
42
42
|
props: {
|
|
43
43
|
filled: {
|
|
44
44
|
type: Boolean,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
v-if="closeIcon"
|
|
20
20
|
class="unnnic-modal-container-background-body-close_icon"
|
|
21
21
|
>
|
|
22
|
-
<
|
|
22
|
+
<UnnnicIcon
|
|
23
23
|
icon="close-1"
|
|
24
24
|
scheme="neutral-dark"
|
|
25
25
|
size="sm"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
: 'unnnic-modal-container-background-body-spacing_header',
|
|
44
44
|
]"
|
|
45
45
|
>
|
|
46
|
-
<
|
|
46
|
+
<UnnnicIcon
|
|
47
47
|
:scheme="scheme"
|
|
48
48
|
:icon="modalIcon"
|
|
49
49
|
size="xl"
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
</template>
|
|
81
81
|
|
|
82
82
|
<script>
|
|
83
|
-
import
|
|
83
|
+
import UnnnicIcon from '../Icon.vue';
|
|
84
84
|
|
|
85
85
|
export default {
|
|
86
86
|
name: 'unnnic-modal',
|
|
87
87
|
components: {
|
|
88
|
-
|
|
88
|
+
UnnnicIcon,
|
|
89
89
|
},
|
|
90
90
|
props: {
|
|
91
91
|
text: {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
disabled ? 'disabled' : null,
|
|
9
9
|
]"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
11
|
+
<UnnnicIcon
|
|
12
12
|
class="unnnic-radio"
|
|
13
13
|
:icon="icon"
|
|
14
14
|
:scheme="color"
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
<script setup>
|
|
25
25
|
import { computed } from 'vue';
|
|
26
|
+
import UnnnicIcon from '../Icon.vue';
|
|
26
27
|
|
|
27
28
|
const props = defineProps({
|
|
28
29
|
modelValue: {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
+{{ selectedOptions.length - multipleSelectedsTags }}
|
|
21
21
|
</p>
|
|
22
22
|
</div>
|
|
23
|
-
<
|
|
23
|
+
<UnnnicIcon
|
|
24
24
|
class="unnnic-select-smart__options__multiple__selecteds__clear"
|
|
25
25
|
icon="close-1"
|
|
26
26
|
size="xs"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
<script>
|
|
41
41
|
import Tag from '../Tag/Tag.vue';
|
|
42
|
-
import
|
|
42
|
+
import UnnnicIcon from '../Icon.vue';
|
|
43
43
|
import UnnnicI18n from '../../mixins/i18n';
|
|
44
44
|
|
|
45
45
|
export default {
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
mixins: [UnnnicI18n],
|
|
48
48
|
components: {
|
|
49
49
|
Tag,
|
|
50
|
-
|
|
50
|
+
UnnnicIcon,
|
|
51
51
|
},
|
|
52
52
|
props: {
|
|
53
53
|
selectedOptions: {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
"
|
|
63
63
|
>
|
|
64
|
-
<
|
|
64
|
+
<UnnnicIcon
|
|
65
65
|
:icon="option.icon"
|
|
66
66
|
:scheme="option.active ? 'brand-weni-soft' : 'neutral-cloudy'"
|
|
67
67
|
:size="!expanded ? 'md' : 'ant'"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
:class="option.notify && !expanded ? 'notify' : ''"
|
|
74
74
|
v-if="option.notify"
|
|
75
75
|
>
|
|
76
|
-
<
|
|
76
|
+
<UnnnicIcon
|
|
77
77
|
icon="indicator"
|
|
78
78
|
scheme="brand-weni-soft"
|
|
79
79
|
size="ant"
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
class="option"
|
|
115
115
|
@click="toggleExpanded"
|
|
116
116
|
>
|
|
117
|
-
<
|
|
117
|
+
<UnnnicIcon
|
|
118
118
|
:icon="expanded ? 'close_fullscreen' : 'open_in_full'"
|
|
119
119
|
:scheme="'neutral-cloudy'"
|
|
120
120
|
:size="!expanded ? 'md' : 'ant'"
|
|
@@ -133,12 +133,12 @@
|
|
|
133
133
|
<script>
|
|
134
134
|
import ToolTip from '../ToolTip/ToolTip.vue';
|
|
135
135
|
import languageSelect from '../Dropdown/LanguageSelect.vue';
|
|
136
|
-
import
|
|
136
|
+
import UnnnicIcon from '../Icon.vue';
|
|
137
137
|
|
|
138
138
|
export default {
|
|
139
139
|
components: {
|
|
140
140
|
ToolTip,
|
|
141
|
-
|
|
141
|
+
UnnnicIcon,
|
|
142
142
|
languageSelect,
|
|
143
143
|
},
|
|
144
144
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{{ textLeft }}
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
-
<
|
|
14
|
+
<UnnnicIcon
|
|
15
15
|
:class="{ 'unnnic-switch__icon': true, active: isActive }"
|
|
16
16
|
:icon="currentIcon"
|
|
17
17
|
:size="iconSize"
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script>
|
|
37
|
-
import
|
|
37
|
+
import UnnnicIcon from '../Icon.vue';
|
|
38
38
|
|
|
39
39
|
export default {
|
|
40
40
|
name: 'unnnic-switch',
|
|
41
|
-
components: {
|
|
41
|
+
components: { UnnnicIcon },
|
|
42
42
|
props: {
|
|
43
43
|
size: {
|
|
44
44
|
type: String,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<span class="unnnic-brand-tag__label">{{ text }}</span>
|
|
10
|
-
<
|
|
10
|
+
<UnnnicIcon
|
|
11
11
|
:icon="disabled ? 'close-1' : 'add-1'"
|
|
12
12
|
:scheme="disabled ? 'neutral-snow' : 'brand-weni-dark'"
|
|
13
13
|
class="unnnic-brand-tag__icon"
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script>
|
|
20
|
-
import
|
|
20
|
+
import UnnnicIcon from '../Icon.vue';
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
23
|
name: 'unnnic-brand-tag',
|
|
24
24
|
components: {
|
|
25
|
-
|
|
25
|
+
UnnnicIcon,
|
|
26
26
|
},
|
|
27
27
|
props: {
|
|
28
28
|
text: {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
${disabled ? 'unnnic-tag__label--disabled' : ''}`"
|
|
11
11
|
>{{ text }}</span
|
|
12
12
|
>
|
|
13
|
-
<
|
|
13
|
+
<UnnnicIcon
|
|
14
14
|
v-if="hasCloseIcon"
|
|
15
15
|
icon="close-1"
|
|
16
16
|
class="unnnic-tag__icon"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import
|
|
25
|
+
import UnnnicIcon from '../Icon.vue';
|
|
26
26
|
|
|
27
27
|
export default {
|
|
28
28
|
name: 'unnnic-tag',
|
|
29
29
|
components: {
|
|
30
|
-
|
|
30
|
+
UnnnicIcon,
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
33
|
text: {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<span class="unnnic-tag__count">{{ count }}</span>
|
|
12
12
|
</ToolTip>
|
|
13
13
|
<span class="unnnic-tag__label">{{ text }}</span>
|
|
14
|
-
<
|
|
14
|
+
<UnnnicIcon
|
|
15
15
|
v-if="hasBackButton"
|
|
16
16
|
icon="arrow-right-1-1"
|
|
17
17
|
class="unnnic-tag__icon"
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import
|
|
25
|
+
import UnnnicIcon from '../Icon.vue';
|
|
26
26
|
import ToolTip from '../ToolTip/ToolTip.vue';
|
|
27
27
|
|
|
28
28
|
export default {
|
|
29
29
|
name: 'unnnic-tag',
|
|
30
30
|
components: {
|
|
31
|
-
|
|
31
|
+
UnnnicIcon,
|
|
32
32
|
ToolTip,
|
|
33
33
|
},
|
|
34
34
|
props: {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
v-on:drop.stop.prevent="drop"
|
|
15
15
|
@click="() => this.$refs.file.click()"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<UnnnicIcon
|
|
18
18
|
class="unnnic-upload-area__dropzone__icon"
|
|
19
19
|
icon="upload-bottom-1"
|
|
20
20
|
:scheme="hasError ? 'feedback-red' : 'brand-weni'"
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
<script>
|
|
85
85
|
import mime from 'mime';
|
|
86
86
|
|
|
87
|
-
import
|
|
87
|
+
import UnnnicIcon from '../Icon.vue';
|
|
88
88
|
import UnnnicImportCard from '../ImportCard/ImportCard.vue';
|
|
89
89
|
|
|
90
90
|
export default {
|
|
91
91
|
name: 'unnnic-upload-area',
|
|
92
92
|
components: {
|
|
93
|
-
|
|
93
|
+
UnnnicIcon,
|
|
94
94
|
UnnnicImportCard,
|
|
95
95
|
},
|
|
96
96
|
props: {
|
package/src/components/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import radio from './Radio/Radio.vue';
|
|
|
29
29
|
import languageSelect from './Dropdown/LanguageSelect.vue';
|
|
30
30
|
import modal from './Modal/Modal.vue';
|
|
31
31
|
import modalUpload from './ModalUpload/ModalUpload.vue';
|
|
32
|
-
import
|
|
32
|
+
import {callAlert, callModal} from '../utils/call';
|
|
33
33
|
import selectSmart from './SelectSmart/SelectSmart.vue';
|
|
34
34
|
// import select from './Select/Select.vue';
|
|
35
35
|
import selectItem from './Select/SelectItem.vue';
|
|
@@ -195,8 +195,8 @@ export const unnnicSelectItem = selectItem;
|
|
|
195
195
|
// export const unnnicSelectListItem = selectListItem;
|
|
196
196
|
export const unnnicMultiSelect = multiSelect;
|
|
197
197
|
export const unnnicAlert = alert;
|
|
198
|
-
export const unnnicCallAlert =
|
|
199
|
-
export const unnnicCallModal =
|
|
198
|
+
export const unnnicCallAlert = callAlert;
|
|
199
|
+
export const unnnicCallModal = callModal;
|
|
200
200
|
// export const unnnicAutocomplete = autocomplete;
|
|
201
201
|
// export const unnnicAutocompleteSelect = autocompleteSelect;
|
|
202
202
|
export const unnnicTag = tag;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import alertCaller from '../components/Alert/AlertCaller.vue';
|
|
2
|
-
import alert from '../utils/call';
|
|
3
1
|
import unnnicAlert from '../components/Alert/Alert.vue';
|
|
2
|
+
import { unnnicCallAlert } from '../components';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
title: 'example/Alert',
|
|
7
6
|
component: unnnicAlert,
|
|
8
7
|
argTypes: {
|
|
8
|
+
type: { control: { type: 'text' } },
|
|
9
9
|
text: { control: { type: 'text' } },
|
|
10
|
-
title: { control: { type: 'text' } },
|
|
11
10
|
closeText: { control: { type: 'text' } },
|
|
12
11
|
scheme: {
|
|
13
12
|
control: {
|
|
@@ -56,7 +55,7 @@ export default {
|
|
|
56
55
|
|
|
57
56
|
const Template = (args, { argTypes }) => ({
|
|
58
57
|
props: Object.keys(argTypes),
|
|
59
|
-
components: {
|
|
58
|
+
components: { unnnicCallAlert },
|
|
60
59
|
template: `
|
|
61
60
|
<div>
|
|
62
61
|
<button @click="unnnicCallAlert">Click for alert</button>
|
|
@@ -85,14 +84,21 @@ Recommended use:
|
|
|
85
84
|
</div>`,
|
|
86
85
|
methods: {
|
|
87
86
|
unnnicCallAlert() {
|
|
88
|
-
|
|
87
|
+
unnnicCallAlert({
|
|
88
|
+
props: {
|
|
89
|
+
type: 'success',
|
|
90
|
+
text: 'Alert'
|
|
91
|
+
},
|
|
92
|
+
containerRef: this.$refs.divContainer,
|
|
93
|
+
})
|
|
89
94
|
},
|
|
95
|
+
|
|
90
96
|
},
|
|
91
97
|
});
|
|
92
98
|
|
|
93
99
|
const TemplateWithContainerRef = (args, { argTypes }) => ({
|
|
94
100
|
props: Object.keys(argTypes),
|
|
95
|
-
components: {
|
|
101
|
+
components: { unnnicCallAlert },
|
|
96
102
|
template: `
|
|
97
103
|
<div ref="divContainer" style="height: 200px; position: relative; border: 1px solid black">
|
|
98
104
|
<button @click="unnnicCallAlert">Click for alert</button>
|
|
@@ -108,26 +114,25 @@ const TemplateWithContainerRef = (args, { argTypes }) => ({
|
|
|
108
114
|
</div>`,
|
|
109
115
|
methods: {
|
|
110
116
|
unnnicCallAlert() {
|
|
111
|
-
|
|
112
|
-
props:
|
|
117
|
+
unnnicCallAlert({
|
|
118
|
+
props: {
|
|
119
|
+
type: 'success',
|
|
120
|
+
text: 'Alert'
|
|
121
|
+
},
|
|
113
122
|
containerRef: this.$refs.divContainer,
|
|
114
|
-
})
|
|
123
|
+
})
|
|
115
124
|
},
|
|
116
125
|
},
|
|
117
126
|
});
|
|
118
127
|
|
|
119
128
|
export const Normal = Template.bind({});
|
|
120
129
|
Normal.args = {
|
|
121
|
-
|
|
130
|
+
type: 'success',
|
|
122
131
|
text: 'Text',
|
|
123
|
-
icon: 'check-circle-1-1',
|
|
124
|
-
scheme: 'feedback-green',
|
|
125
132
|
};
|
|
126
133
|
|
|
127
134
|
export const WithContainerRef = TemplateWithContainerRef.bind({});
|
|
128
135
|
WithContainerRef.args = {
|
|
129
|
-
|
|
136
|
+
type: 'error',
|
|
130
137
|
text: 'Text',
|
|
131
|
-
icon: 'check-circle-1-1',
|
|
132
|
-
scheme: 'feedback-green',
|
|
133
138
|
};
|
|
@@ -2,7 +2,7 @@ import unnnicComment from '../components/Comment/Comment.vue';
|
|
|
2
2
|
import unnnicButton from '../components/Button/Button.vue';
|
|
3
3
|
import unnnicDropdown from '../components/Dropdown/Dropdown.vue';
|
|
4
4
|
import unnnicDropdownItem from '../components/Dropdown/DropdownItem.vue';
|
|
5
|
-
import
|
|
5
|
+
import UnnnicIcon from '../components/Icon.vue';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Example/Comment',
|
|
@@ -16,7 +16,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
16
16
|
unnnicButton,
|
|
17
17
|
unnnicDropdown,
|
|
18
18
|
unnnicDropdownItem,
|
|
19
|
-
|
|
19
|
+
UnnnicIcon,
|
|
20
20
|
},
|
|
21
21
|
template: `
|
|
22
22
|
<unnnic-comment v-bind="$props">
|
|
@@ -24,7 +24,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
24
24
|
<template v-slot:actions>
|
|
25
25
|
<unnnic-dropdown>
|
|
26
26
|
<template v-slot:trigger>
|
|
27
|
-
<unnnic-icon
|
|
27
|
+
<unnnic-icon
|
|
28
28
|
slot="trigger"
|
|
29
29
|
icon="navigation-menu-vertical-1"
|
|
30
30
|
size="sm"
|
package/src/utils/call.js
CHANGED
|
@@ -5,8 +5,7 @@ import mitt from 'mitt';
|
|
|
5
5
|
|
|
6
6
|
const emitter = mitt();
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
callAlert({ props, containerRef }) {
|
|
8
|
+
const callAlert = ({ props, containerRef })=>{
|
|
10
9
|
const AlertComponent = createApp(Alert, {
|
|
11
10
|
...props,
|
|
12
11
|
onClose: () => {
|
|
@@ -27,9 +26,9 @@ export default {
|
|
|
27
26
|
} else {
|
|
28
27
|
document.body.appendChild(instance.$el);
|
|
29
28
|
}
|
|
30
|
-
}
|
|
29
|
+
};
|
|
31
30
|
|
|
32
|
-
callModal({ props })
|
|
31
|
+
const callModal = ({ props })=>{
|
|
33
32
|
const ModalComponent = createApp(Modal, {
|
|
34
33
|
...props,
|
|
35
34
|
onClose: () => {
|
|
@@ -44,5 +43,14 @@ export default {
|
|
|
44
43
|
const element = document.createElement('div');
|
|
45
44
|
const instance = ModalComponent.mount(element);
|
|
46
45
|
document.body.appendChild(element);
|
|
47
|
-
}
|
|
48
|
-
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export{
|
|
49
|
+
callAlert,
|
|
50
|
+
callModal
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default{
|
|
54
|
+
callAlert,
|
|
55
|
+
callModal
|
|
56
|
+
}
|