@v1nt1248/3nclient-lib 0.2.41 → 0.2.43
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/style.css +1 -1
- package/dist/ui3n-components.js +2455 -2439
- package/dist/ui3n-plugins.js +504 -499
- package/package.json +3 -3
- package/src/components/ui3n-icon/ui3n-icon.vue +12 -3
- package/src/components/ui3n-slider/ui3n-slider.vue +21 -42
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.43",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -98,7 +98,7 @@
|
|
|
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.5",
|
|
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",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"vue-eslint-parser": "^10.2.0",
|
|
108
108
|
"vue-tsc": "3.0.6"
|
|
109
109
|
},
|
|
110
|
-
"packageManager": "pnpm@10.
|
|
110
|
+
"packageManager": "pnpm@10.16.0",
|
|
111
111
|
"pnpm": {
|
|
112
112
|
"peerDependencyRules": {
|
|
113
113
|
"ignoreMissing": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed, onMounted, useTemplateRef } from 'vue';
|
|
2
|
+
import { computed, onMounted, useTemplateRef, watch } from 'vue';
|
|
3
3
|
import type { Ui3nIconEmits, Ui3nIconProps } from './types';
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(
|
|
@@ -19,7 +19,6 @@ const heightVal = computed(() => props.size || props.height || 16);
|
|
|
19
19
|
const widthCss = computed(() => `${widthVal.value}px`);
|
|
20
20
|
const heightCss = computed(() => `${heightVal.value}px`);
|
|
21
21
|
|
|
22
|
-
const iconClass = computed(() => `ui3n-icon__${props.icon}`);
|
|
23
22
|
const iconStyle = computed(() => {
|
|
24
23
|
const value: Record<string, string> = {};
|
|
25
24
|
const transformData = [];
|
|
@@ -39,9 +38,19 @@ function onClick(ev: Event) {
|
|
|
39
38
|
|
|
40
39
|
onMounted(() => {
|
|
41
40
|
if (iconEl.value) {
|
|
42
|
-
iconEl.value.classList.add(
|
|
41
|
+
iconEl.value.classList.add(`ui3n-icon__${props.icon}`);
|
|
43
42
|
}
|
|
44
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
|
+
)
|
|
45
54
|
</script>
|
|
46
55
|
|
|
47
56
|
<template>
|
|
@@ -88,6 +88,25 @@
|
|
|
88
88
|
: '200%',
|
|
89
89
|
);
|
|
90
90
|
|
|
91
|
+
const label1Text = computed(() => {
|
|
92
|
+
if (props.range) {
|
|
93
|
+
const val = (innerValue.value as [number, number])[0];
|
|
94
|
+
return props.transformValueMethod
|
|
95
|
+
? props.transformValueMethod(val)
|
|
96
|
+
: `${val}`;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return props.transformValueMethod ? props.transformValueMethod(innerValue.value as number) : `${innerValue.value}`;
|
|
100
|
+
});
|
|
101
|
+
const label2Text = computed(() => {
|
|
102
|
+
if (!props.range) {
|
|
103
|
+
return '';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const val = (innerValue.value as [number, number])[1];
|
|
107
|
+
return props.transformValueMethod ? props.transformValueMethod(val) : `${val}`;
|
|
108
|
+
});
|
|
109
|
+
|
|
91
110
|
function onMouseenter(pointer: 1 | 2) {
|
|
92
111
|
if (props.labelVisible === 'normal') {
|
|
93
112
|
showLabel.value[`${pointer}`] = true;
|
|
@@ -231,7 +250,7 @@
|
|
|
231
250
|
>
|
|
232
251
|
<ui3n-tooltip
|
|
233
252
|
:model-value="showLabel['1']"
|
|
234
|
-
:content="
|
|
253
|
+
:content="label1Text"
|
|
235
254
|
trigger="manual"
|
|
236
255
|
placement="top-start"
|
|
237
256
|
position-strategy="absolute"
|
|
@@ -255,7 +274,7 @@
|
|
|
255
274
|
>
|
|
256
275
|
<ui3n-tooltip
|
|
257
276
|
:model-value="showLabel['2']"
|
|
258
|
-
:content="
|
|
277
|
+
:content="label2Text"
|
|
259
278
|
trigger="manual"
|
|
260
279
|
placement="top-start"
|
|
261
280
|
position-strategy="absolute"
|
|
@@ -266,46 +285,6 @@
|
|
|
266
285
|
<div :class="[$style.pointer, selectedPointer === 2 && $style.selected]" />
|
|
267
286
|
</ui3n-tooltip>
|
|
268
287
|
</div>
|
|
269
|
-
|
|
270
|
-
<!-- <ui3n-tooltip-->
|
|
271
|
-
<!-- :model-value="labelVisible === 'always'"-->
|
|
272
|
-
<!-- :content="range ? `${(innerValue as [number, number])[0]}` : `${innerValue}`"-->
|
|
273
|
-
<!-- :trigger="labelVisible === 'always' ? 'manual' : 'hover'"-->
|
|
274
|
-
<!-- placement="top-start"-->
|
|
275
|
-
<!-- position-strategy="fixed"-->
|
|
276
|
-
<!-- :color="labelColor"-->
|
|
277
|
-
<!-- :text-color="labelTextColor"-->
|
|
278
|
-
<!-- :disabled="labelVisible === 'never'"-->
|
|
279
|
-
<!-- >-->
|
|
280
|
-
<!-- <div-->
|
|
281
|
-
<!-- ref="pointerEl1"-->
|
|
282
|
-
<!-- :class="[$style.pointer, $style.pointer1, selectedPointer === 1 && $style.selected]"-->
|
|
283
|
-
<!-- @pointerdown="onPointerDown($event, 1)"-->
|
|
284
|
-
<!-- @click.stop.prevent-->
|
|
285
|
-
<!-- @dragstart="onDragstart"-->
|
|
286
|
-
<!-- />-->
|
|
287
|
-
<!-- </ui3n-tooltip>-->
|
|
288
|
-
|
|
289
|
-
<!-- <ui3n-tooltip-->
|
|
290
|
-
<!-- v-if="range"-->
|
|
291
|
-
<!-- :model-value="labelVisible === 'always'"-->
|
|
292
|
-
<!-- :content="`${(innerValue as [number, number])[1]}`"-->
|
|
293
|
-
<!-- :trigger="labelVisible === 'always' ? 'manual' : 'hover'"-->
|
|
294
|
-
<!-- placement="top-end"-->
|
|
295
|
-
<!-- position-strategy="absolute"-->
|
|
296
|
-
<!-- :color="labelColor"-->
|
|
297
|
-
<!-- :text-color="labelTextColor"-->
|
|
298
|
-
<!-- :disabled="labelVisible === 'never'"-->
|
|
299
|
-
<!-- >-->
|
|
300
|
-
<!-- <div-->
|
|
301
|
-
<!-- v-if="range"-->
|
|
302
|
-
<!-- ref="pointerEl2"-->
|
|
303
|
-
<!-- :class="[$style.pointer, $style.pointer2, selectedPointer === 2 && $style.selected]"-->
|
|
304
|
-
<!-- @pointerdown="onPointerDown($event, 2)"-->
|
|
305
|
-
<!-- @click.stop.prevent-->
|
|
306
|
-
<!-- @dragstart="onDragstart"-->
|
|
307
|
-
<!-- />-->
|
|
308
|
-
<!-- </ui3n-tooltip>-->
|
|
309
288
|
</div>
|
|
310
289
|
</template>
|
|
311
290
|
|