@v1nt1248/3nclient-lib 0.2.37 → 0.2.39
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-button/ui3n-button.vue.d.ts +1 -1
- package/dist/components/ui3n-checkbox/ui3n-checkbox.vue.d.ts +1 -1
- package/dist/components/ui3n-icon/types.d.ts +1 -0
- package/dist/components/ui3n-icon/ui3n-icon.vue.d.ts +3 -3
- package/dist/components/ui3n-progress/ui3n-progress-circular.vue.d.ts +2 -2
- package/dist/components/ui3n-progress/ui3n-progress-linear.vue.d.ts +1 -1
- package/dist/components/ui3n-radio-group/ui3n-radio.vue.d.ts +1 -1
- package/dist/components/ui3n-switch/ui3n-switch.vue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +1702 -1697
- package/dist/ui3n-plugins.js +1369 -1364
- package/package.json +8 -8
- package/src/components/ui3n-icon/types.ts +1 -0
- package/src/components/ui3n-icon/ui3n-icon.vue +28 -12
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@v1nt1248/3nclient-lib",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"author": "v1nt1248",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.39",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@floating-ui/dom": "^1.7.4",
|
|
55
55
|
"@floating-ui/vue": "1.1.9",
|
|
56
|
-
"dayjs": "1.11.
|
|
56
|
+
"dayjs": "1.11.18",
|
|
57
57
|
"lodash": "4.17.21",
|
|
58
58
|
"mitt": "3.0.1",
|
|
59
59
|
"sanitize-html": "2.17.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"pinia": "3.0.3",
|
|
64
|
-
"vue": "3.5.
|
|
64
|
+
"vue": "3.5.21"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@eslint/eslintrc": "^3.3.1",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"@typescript-eslint/eslint-plugin": "8.40.0",
|
|
73
73
|
"@typescript-eslint/parser": "8.40.0",
|
|
74
74
|
"@vitejs/plugin-vue": "6.0.1",
|
|
75
|
-
"@vue/compiler-core": "3.5.
|
|
75
|
+
"@vue/compiler-core": "3.5.21",
|
|
76
76
|
"@vue/eslint-config-typescript": "14.6.0",
|
|
77
|
-
"@vue/runtime-core": "3.5.
|
|
77
|
+
"@vue/runtime-core": "3.5.21",
|
|
78
78
|
"@vuedx/typescript-plugin-vue": "0.7.6",
|
|
79
79
|
"eslint": "9.34.0",
|
|
80
80
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"pinia": "3.0.3",
|
|
90
90
|
"postcss-html": "1.8.0",
|
|
91
91
|
"prettier": "^3.6.2",
|
|
92
|
-
"sass": "1.
|
|
92
|
+
"sass": "1.92.0",
|
|
93
93
|
"stylelint": "16.23.1",
|
|
94
94
|
"stylelint-config-recommended-scss": "16.0.0",
|
|
95
95
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
"tslib": "2.8.1",
|
|
99
99
|
"typescript": "5.9.2",
|
|
100
100
|
"typescript-eslint": "^8.40.0",
|
|
101
|
-
"vite": "7.1.
|
|
101
|
+
"vite": "7.1.4",
|
|
102
102
|
"vite-plugin-css-injected-by-js": "3.5.2",
|
|
103
103
|
"vite-plugin-dts": "4.5.4",
|
|
104
104
|
"vite-plugin-vue-devtools": "^7.7.7",
|
|
105
105
|
"vitepress": "1.6.4",
|
|
106
|
-
"vue": "3.5.
|
|
106
|
+
"vue": "3.5.21",
|
|
107
107
|
"vue-eslint-parser": "^10.2.0",
|
|
108
108
|
"vue-tsc": "3.0.6"
|
|
109
109
|
},
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed } from 'vue';
|
|
2
|
+
import { computed, onMounted, useTemplateRef } from 'vue';
|
|
3
3
|
import type { Ui3nIconEmits, Ui3nIconProps } from './types';
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(
|
|
6
6
|
defineProps<Ui3nIconProps>(),
|
|
7
7
|
{
|
|
8
8
|
title: '',
|
|
9
|
-
width: 16,
|
|
10
|
-
height: 16,
|
|
11
9
|
rotate: 0,
|
|
12
10
|
color: 'var(--color-icon-control-primary-default)',
|
|
13
11
|
},
|
|
14
12
|
);
|
|
15
13
|
const emits = defineEmits<Ui3nIconEmits>();
|
|
16
14
|
|
|
15
|
+
const iconEl = useTemplateRef('icon');
|
|
16
|
+
|
|
17
|
+
const widthVal = computed(() => props.size || props.width || 16);
|
|
18
|
+
const heightVal = computed(() => props.size || props.height || 16);
|
|
19
|
+
const widthCss = computed(() => `${widthVal.value}px`);
|
|
20
|
+
const heightCss = computed(() => `${heightVal.value}px`);
|
|
21
|
+
|
|
17
22
|
const iconClass = computed(() => `ui3n-icon__${props.icon}`);
|
|
18
23
|
const iconStyle = computed(() => {
|
|
19
|
-
const value: Record<string, string> = {
|
|
20
|
-
width: `${props.width}px`,
|
|
21
|
-
height: `${props.height}px`,
|
|
22
|
-
color: props.color,
|
|
23
|
-
};
|
|
24
|
+
const value: Record<string, string> = {};
|
|
24
25
|
const transformData = [];
|
|
25
26
|
props.horizontalFlip && transformData.push('rotateY(180deg)');
|
|
26
27
|
props.verticalFlip && transformData.push('rotateX(180deg)');
|
|
@@ -35,22 +36,37 @@ const iconStyle = computed(() => {
|
|
|
35
36
|
function onClick(ev: Event) {
|
|
36
37
|
emits('click', ev);
|
|
37
38
|
}
|
|
39
|
+
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
if (iconEl.value) {
|
|
42
|
+
iconEl.value.classList.add(iconClass.value);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
38
45
|
</script>
|
|
39
46
|
|
|
40
47
|
<template>
|
|
41
48
|
<div
|
|
42
|
-
|
|
49
|
+
ref="icon"
|
|
50
|
+
class="ui3n-icon"
|
|
51
|
+
:class="$style.icon"
|
|
43
52
|
:title="title"
|
|
44
53
|
:style="iconStyle"
|
|
45
54
|
@click="onClick"
|
|
46
55
|
/>
|
|
47
56
|
</template>
|
|
48
57
|
|
|
49
|
-
<style lang="scss">
|
|
58
|
+
<style lang="scss" module>
|
|
50
59
|
.icon {
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
--ui3n-icon-color: v-bind(color);
|
|
61
|
+
|
|
62
|
+
min-width: v-bind(widthCss);
|
|
63
|
+
width: v-bind(widthCss);
|
|
64
|
+
max-width: v-bind(widthCss);
|
|
65
|
+
min-height: v-bind(heightCss);
|
|
66
|
+
height: v-bind(heightCss);
|
|
67
|
+
max-height: v-bind(heightCss);
|
|
53
68
|
flex-grow: 0;
|
|
54
69
|
flex-shrink: 0;
|
|
70
|
+
color: var(--ui3n-icon-color);
|
|
55
71
|
}
|
|
56
72
|
</style>
|