@weni/unnnic-system 3.6.0 → 3.7.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 +7 -0
- package/dist/components/DateFilter/DateFilter.vue.d.ts +2 -2
- package/dist/components/Icon.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +2 -2
- package/dist/components/Input/TextInput.vue.d.ts +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +2 -2
- package/dist/components/ModalNext/ModalNext.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +2 -2
- package/dist/components/SelectTime/index.vue.d.ts +2 -2
- package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
- package/dist/components/index.d.ts +16 -16
- package/dist/{es-92fbe460.mjs → es-c4737166.mjs} +1 -1
- package/dist/{index-0da47957.mjs → index-bd5f89f9.mjs} +10115 -8919
- package/dist/{pt-br-c29b6c9a.mjs → pt-br-ec3b3330.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +1 -1
- package/dist/unnnic.umd.js +46 -46
- package/package.json +3 -2
- package/src/components/Icon.vue +23 -1
- package/src/stories/Icon.stories.js +24 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weni/unnnic-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"test": "vitest",
|
|
39
39
|
"test:ui": "vitest --ui",
|
|
40
40
|
"coverage": "vitest --coverage",
|
|
41
|
-
"style-dictionary:generate": "style-dictionary build --config styleDictionary.config.
|
|
41
|
+
"style-dictionary:generate": "style-dictionary build --config styleDictionary.config.mjs"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"vue": "^3.4.8"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@iconify/vue": "^5.0.0",
|
|
54
55
|
"@vueuse/components": "^10.4.1",
|
|
55
56
|
"emoji-mart-vue-fast": "^15.0.5",
|
|
56
57
|
"lodash": "^4.17.21",
|
package/src/components/Icon.vue
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<Icon
|
|
3
|
+
v-if="isIconify"
|
|
4
|
+
:icon="props.icon as string"
|
|
5
|
+
:class="[
|
|
6
|
+
'unnnic-icon',
|
|
7
|
+
`unnnic-icon-scheme--${scheme}`,
|
|
8
|
+
`unnnic-icon-size--${size}`,
|
|
9
|
+
{
|
|
10
|
+
'unnnic--clickable': clickable,
|
|
11
|
+
},
|
|
12
|
+
]"
|
|
13
|
+
data-testid="iconify-icon"
|
|
14
|
+
@click="onClick"
|
|
15
|
+
@mousedown="(event) => $emit('mousedown', event)"
|
|
16
|
+
@mouseup="(event) => $emit('mouseup', event)"
|
|
17
|
+
/>
|
|
18
|
+
|
|
2
19
|
<component
|
|
3
20
|
:is="customSvgIcon"
|
|
4
|
-
v-if="customSvgIcon"
|
|
21
|
+
v-else-if="customSvgIcon"
|
|
5
22
|
:class="[
|
|
6
23
|
'unnnic-icon',
|
|
7
24
|
`unnnic-icon--size-svg-${size}`,
|
|
@@ -40,6 +57,7 @@
|
|
|
40
57
|
|
|
41
58
|
<script setup lang="ts">
|
|
42
59
|
import { computed } from 'vue';
|
|
60
|
+
import { Icon } from '@iconify/vue';
|
|
43
61
|
|
|
44
62
|
import icons from '../utils/icons';
|
|
45
63
|
import OldIconsMap from './Icon/OldIconsMap.json';
|
|
@@ -67,6 +85,10 @@ const emit = defineEmits<{
|
|
|
67
85
|
mouseup: [event: Event];
|
|
68
86
|
}>();
|
|
69
87
|
|
|
88
|
+
const isIconify = computed(
|
|
89
|
+
() => (props.icon as string)?.includes(':') ?? false,
|
|
90
|
+
);
|
|
91
|
+
|
|
70
92
|
const customSvgIcon = computed(() => icons[props.icon as string] ?? null);
|
|
71
93
|
|
|
72
94
|
const materialSymbolsName = computed(
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import UnnnicIcon from '../components/Icon.vue';
|
|
2
2
|
|
|
3
|
-
const iconsOptions = [
|
|
3
|
+
const iconsOptions = [
|
|
4
|
+
'add',
|
|
5
|
+
'add-1',
|
|
6
|
+
'warning',
|
|
7
|
+
'bi:stars',
|
|
8
|
+
'indicator',
|
|
9
|
+
'fitness-biceps-1',
|
|
10
|
+
'close-1',
|
|
11
|
+
'check-2',
|
|
12
|
+
];
|
|
4
13
|
|
|
5
14
|
const schemes = [
|
|
6
15
|
'background-solo',
|
|
@@ -93,27 +102,27 @@ const schemes = [
|
|
|
93
102
|
];
|
|
94
103
|
|
|
95
104
|
export default {
|
|
96
|
-
title: '
|
|
105
|
+
title: 'Misc/Icon',
|
|
97
106
|
component: UnnnicIcon,
|
|
98
107
|
argTypes: {
|
|
99
|
-
scheme: { control: { type: 'select', options: schemes }
|
|
108
|
+
scheme: { control: { type: 'select' }, options: schemes },
|
|
100
109
|
size: {
|
|
101
110
|
control: {
|
|
102
111
|
type: 'select',
|
|
103
|
-
options: [
|
|
104
|
-
'nano',
|
|
105
|
-
'xs',
|
|
106
|
-
'sm',
|
|
107
|
-
'md',
|
|
108
|
-
'lg',
|
|
109
|
-
'avatar-lg',
|
|
110
|
-
'avatar-md',
|
|
111
|
-
'avatar-sm',
|
|
112
|
-
'avatar-xs',
|
|
113
|
-
'avatar-nano',
|
|
114
|
-
],
|
|
115
112
|
},
|
|
113
|
+
options: [
|
|
114
|
+
'xs',
|
|
115
|
+
'sm',
|
|
116
|
+
'md',
|
|
117
|
+
'lg',
|
|
118
|
+
'avatar-lg',
|
|
119
|
+
'avatar-md',
|
|
120
|
+
'avatar-sm',
|
|
121
|
+
'avatar-xs',
|
|
122
|
+
'avatar-nano',
|
|
123
|
+
],
|
|
116
124
|
},
|
|
125
|
+
icon: { control: { type: 'select' }, options: iconsOptions },
|
|
117
126
|
},
|
|
118
127
|
};
|
|
119
128
|
|