@v1nt1248/3nclient-lib 0.2.69 → 0.2.70
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/dist/components/ui3n-badge/ui3n-badge-simple.vue.d.ts +1 -1
- package/dist/components/ui3n-badge/ui3n-badge.vue.d.ts +1 -1
- package/dist/components/ui3n-icon/ui3n-icon.vue.d.ts +1 -3
- package/dist/components/ui3n-progress/ui3n-progress-circular.vue.d.ts +1 -1
- package/dist/components/ui3n-progress/ui3n-progress-linear.vue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +1614 -1621
- package/dist/ui3n-plugins.js +1166 -1173
- package/package.json +1 -1
- package/src/components/ui3n-icon/ui3n-icon.vue +9 -23
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed
|
|
2
|
+
import { computed } from 'vue';
|
|
3
3
|
import type { Ui3nIconEmits, Ui3nIconProps } from './types';
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(
|
|
@@ -12,8 +12,6 @@ const props = withDefaults(
|
|
|
12
12
|
);
|
|
13
13
|
const emits = defineEmits<Ui3nIconEmits>();
|
|
14
14
|
|
|
15
|
-
const iconEl = useTemplateRef('icon');
|
|
16
|
-
|
|
17
15
|
const widthVal = computed(() => props.size || props.width || 16);
|
|
18
16
|
const heightVal = computed(() => props.size || props.height || 16);
|
|
19
17
|
const widthCss = computed(() => `${widthVal.value}px`);
|
|
@@ -35,29 +33,12 @@ const iconStyle = computed(() => {
|
|
|
35
33
|
function onClick(ev: Event) {
|
|
36
34
|
emits('click', ev);
|
|
37
35
|
}
|
|
38
|
-
|
|
39
|
-
onMounted(() => {
|
|
40
|
-
if (iconEl.value) {
|
|
41
|
-
iconEl.value.classList.add(`ui3n-icon__${props.icon}`);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
watch(
|
|
46
|
-
() => props.icon,
|
|
47
|
-
(val, oldVal) => {
|
|
48
|
-
if (val && val !== oldVal) {
|
|
49
|
-
iconEl.value?.classList.remove(`ui3n-icon__${oldVal}`);
|
|
50
|
-
iconEl.value?.classList.add(`ui3n-icon__${val}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
36
|
</script>
|
|
55
37
|
|
|
56
38
|
<template>
|
|
57
39
|
<div
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
:class="$style.icon"
|
|
40
|
+
:class="$style.ui3nIcon"
|
|
41
|
+
:data-icon="icon"
|
|
61
42
|
:title="title"
|
|
62
43
|
:style="iconStyle"
|
|
63
44
|
@click="onClick"
|
|
@@ -65,9 +46,10 @@ watch(
|
|
|
65
46
|
</template>
|
|
66
47
|
|
|
67
48
|
<style lang="scss" module>
|
|
68
|
-
.
|
|
49
|
+
.ui3nIcon {
|
|
69
50
|
--ui3n-icon-color: v-bind(color);
|
|
70
51
|
|
|
52
|
+
display: block;
|
|
71
53
|
min-width: v-bind(widthCss);
|
|
72
54
|
width: v-bind(widthCss);
|
|
73
55
|
max-width: v-bind(widthCss);
|
|
@@ -76,6 +58,10 @@ watch(
|
|
|
76
58
|
max-height: v-bind(heightCss);
|
|
77
59
|
flex-grow: 0;
|
|
78
60
|
flex-shrink: 0;
|
|
61
|
+
background-color: currentcolor;
|
|
79
62
|
color: var(--ui3n-icon-color);
|
|
63
|
+
mask-image: var(--svg);
|
|
64
|
+
mask-repeat: no-repeat;
|
|
65
|
+
mask-size: 100% 100%;
|
|
80
66
|
}
|
|
81
67
|
</style>
|