@v1nt1248/3nclient-lib 0.1.11 → 0.1.13
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 +11 -12
- 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 +2 -2
- package/dist/components/ui3n-checkbox/ui3n-checkbox.vue.d.ts +1 -1
- package/dist/components/ui3n-dialog/ui3n-dialog.vue.d.ts +3 -3
- package/dist/components/ui3n-input/ui3n-input.vue.d.ts +2 -2
- 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-switch/ui3n-switch.vue.d.ts +1 -1
- package/dist/components/ui3n-text/ui3n-text.vue.d.ts +4 -4
- package/dist/demo/constants.d.ts +1 -0
- package/dist/plugins/index.d.ts +1 -2
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +114 -118
- package/dist/ui3n-plugins.d.ts +1 -2
- package/dist/ui3n-plugins.js +3616 -3855
- package/package.json +7 -6
- package/src/components/ui3n-icon/ui3n-icon.vue +9 -6
- package/src/components/ui3n-input/ui3n-input.vue +1 -1
- package/src/components/ui3n-notification/ui3n-notification.vue +4 -4
- package/src/components/ui3n-table/ui3n-table-sort-icon.vue +2 -2
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +29 -31
- package/dist/plugins/icons/icons.d.ts +0 -2
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.1.
|
|
5
|
+
"version": "0.1.13",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"build:components": "LIB_NAME=lib vite build",
|
|
37
37
|
"build:plugins": "LIB_NAME=plugins vite build",
|
|
38
38
|
"build:utils": "LIB_NAME=utils vite build",
|
|
39
|
-
"build": "pnpm run clean:dist && pnpm run build:
|
|
39
|
+
"build": "pnpm run clean:dist && pnpm run build:plugins && pnpm run build:utils && pnpm run build:components && pnpm run copy:css",
|
|
40
|
+
"pack": "pnpm run build && npm pack && cp *.tgz ./dist && rm *.tgz",
|
|
40
41
|
"preview": "vite preview",
|
|
41
42
|
"stylelint": "stylelint --config .stylelint.config.cjs 'src/**/*.{vue,scss}'",
|
|
42
43
|
"stylelint:fix": "stylelint --config .stylelint.config.cjs --fix 'src/**/*.{vue,scss}'",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|
|
63
64
|
"pinia": "2.2.1",
|
|
64
|
-
"vue": "3.4.
|
|
65
|
+
"vue": "3.4.38"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"@types/lodash": "4.17.5",
|
|
@@ -70,9 +71,9 @@
|
|
|
70
71
|
"@typescript-eslint/eslint-plugin": "8.0.1",
|
|
71
72
|
"@typescript-eslint/parser": "8.0.1",
|
|
72
73
|
"@vitejs/plugin-vue": "5.1.2",
|
|
73
|
-
"@vue/compiler-core": "3.4.
|
|
74
|
+
"@vue/compiler-core": "3.4.38",
|
|
74
75
|
"@vue/eslint-config-typescript": "13.0.0",
|
|
75
|
-
"@vue/runtime-core": "3.4.
|
|
76
|
+
"@vue/runtime-core": "3.4.38",
|
|
76
77
|
"@vuedx/typescript-plugin-vue": "0.7.6",
|
|
77
78
|
"eslint": "9.9.0",
|
|
78
79
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
"vite-plugin-dts": "4.0.2",
|
|
99
100
|
"vite-plugin-vue-devtools": "^7.3.7",
|
|
100
101
|
"vitepress": "1.3.2",
|
|
101
|
-
"vue": "3.4.
|
|
102
|
+
"vue": "3.4.38",
|
|
102
103
|
"vue-tsc": "2.0.29"
|
|
103
104
|
},
|
|
104
105
|
"packageManager": "pnpm@9.7.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
|
|
2
|
+
import { computed } from 'vue';
|
|
3
3
|
import { Icon } from '@iconify/vue';
|
|
4
4
|
import type { Ui3nIconEmits, Ui3nIconProps } from './types';
|
|
5
5
|
|
|
@@ -15,20 +15,23 @@ const props = withDefaults(
|
|
|
15
15
|
);
|
|
16
16
|
const emits = defineEmits<Ui3nIconEmits>();
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const iconName = computed(() => `ic:${props.icon}`);
|
|
19
|
+
|
|
20
|
+
function onLoad(value: unknown) {
|
|
19
21
|
if (props.onLoad) {
|
|
20
22
|
props.onLoad(value);
|
|
21
23
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function onClick(ev: Event) {
|
|
24
27
|
emits('click', ev);
|
|
25
|
-
}
|
|
28
|
+
}
|
|
26
29
|
</script>
|
|
27
30
|
|
|
28
31
|
<template>
|
|
29
32
|
<icon
|
|
30
33
|
:class="$style.icon"
|
|
31
|
-
:icon="
|
|
34
|
+
:icon="iconName"
|
|
32
35
|
:title="title"
|
|
33
36
|
:inline="inline"
|
|
34
37
|
:width="width"
|
|
@@ -149,7 +149,7 @@ const validate = (text: string) => {
|
|
|
149
149
|
|
|
150
150
|
<ui3n-icon
|
|
151
151
|
v-if="displayStateMode === 'success' && displayStateWithIcon && !isFocused"
|
|
152
|
-
icon="check-circle-outline"
|
|
152
|
+
icon="sharp-check-circle-outline"
|
|
153
153
|
:width="16"
|
|
154
154
|
:height="16"
|
|
155
155
|
color="var(--success-content-default)"
|
|
@@ -19,25 +19,25 @@ const props = withDefaults(
|
|
|
19
19
|
const stylesByTypes = {
|
|
20
20
|
success: {
|
|
21
21
|
color: 'var(--success-content-default)',
|
|
22
|
-
icon: 'warning',
|
|
22
|
+
icon: 'round-warning',
|
|
23
23
|
iconColor: 'var(--success-fill-default)',
|
|
24
24
|
iconRotate: 0,
|
|
25
25
|
},
|
|
26
26
|
warning: {
|
|
27
27
|
color: 'var(--warning-content-default)',
|
|
28
|
-
icon: 'warning',
|
|
28
|
+
icon: 'round-warning',
|
|
29
29
|
iconColor: 'var(--warning-fill-default)',
|
|
30
30
|
iconRotate: 0,
|
|
31
31
|
},
|
|
32
32
|
info: {
|
|
33
33
|
color: 'var(--info-content-default)',
|
|
34
|
-
icon: 'info',
|
|
34
|
+
icon: 'round-info',
|
|
35
35
|
iconColor: 'var(--info-fill-default)',
|
|
36
36
|
iconRotate: 90,
|
|
37
37
|
},
|
|
38
38
|
error: {
|
|
39
39
|
color: 'var(--error-content-default)',
|
|
40
|
-
icon: 'info',
|
|
40
|
+
icon: 'round-info',
|
|
41
41
|
iconColor: 'var(--error-fill-default)',
|
|
42
42
|
iconRotate: 90,
|
|
43
43
|
},
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<template>
|
|
13
13
|
<transition mode="out-in" name="fade">
|
|
14
14
|
<ui3n-icon
|
|
15
|
-
:key="value === 'asc' ? 'arrow-downward' : 'arrow-upward'"
|
|
16
|
-
:icon="value === 'asc' ? 'arrow-downward' : 'arrow-upward'"
|
|
15
|
+
:key="value === 'asc' ? 'baseline-arrow-downward' : 'baseline-arrow-upward'"
|
|
16
|
+
:icon="value === 'asc' ? 'baseline-arrow-downward' : 'baseline-arrow-upward'"
|
|
17
17
|
:width="iconSize"
|
|
18
18
|
:height="iconSize"
|
|
19
19
|
:color="iconColor"
|
|
@@ -5,30 +5,29 @@ import type { Ui3nTooltipEmits, Ui3nTooltipProps, Ui3nTooltipSlots } from './typ
|
|
|
5
5
|
|
|
6
6
|
const baseOffset = 5;
|
|
7
7
|
|
|
8
|
-
const props = withDefaults(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
trigger: 'hover',
|
|
18
|
-
},
|
|
19
|
-
);
|
|
8
|
+
const props = withDefaults(defineProps<Ui3nTooltipProps>(), {
|
|
9
|
+
color: 'var(--color-bg-control-secondary-default)',
|
|
10
|
+
textColor: 'var(--color-text-control-primary-default)',
|
|
11
|
+
placement: 'top',
|
|
12
|
+
positionStrategy: 'absolute',
|
|
13
|
+
offsetX: 0,
|
|
14
|
+
offsetY: 0,
|
|
15
|
+
trigger: 'hover',
|
|
16
|
+
});
|
|
20
17
|
|
|
21
18
|
const emits = defineEmits<Ui3nTooltipEmits>();
|
|
22
19
|
defineSlots<Ui3nTooltipSlots>();
|
|
23
20
|
|
|
24
21
|
const referenceElEventHandler = {
|
|
25
|
-
...(props.trigger === 'hover' &&
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
...(props.trigger === 'hover' &&
|
|
23
|
+
!props.disabled && {
|
|
24
|
+
mouseenter: () => handleMouseEvents(true),
|
|
25
|
+
mouseleave: () => handleMouseEvents(false),
|
|
26
|
+
}),
|
|
27
|
+
...(props.trigger === 'click' &&
|
|
28
|
+
!props.disabled && {
|
|
29
|
+
click: () => handleMouseEvents(!showTooltip.value),
|
|
30
|
+
}),
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
const showTooltip = ref(false);
|
|
@@ -72,10 +71,7 @@ const { floatingStyles, isPositioned, middlewareData } = useFloating(referenceEl
|
|
|
72
71
|
open: showTooltip,
|
|
73
72
|
placement: props.placement,
|
|
74
73
|
strategy: props.positionStrategy,
|
|
75
|
-
middleware: [
|
|
76
|
-
offset(offsetOptions.value),
|
|
77
|
-
arrow({ element: floatingArrowEl, padding: 8 }),
|
|
78
|
-
],
|
|
74
|
+
middleware: [offset(offsetOptions.value), arrow({ element: floatingArrowEl, padding: 8 })],
|
|
79
75
|
whileElementsMounted: props.positionStrategy === 'fixed' ? autoUpdate : undefined,
|
|
80
76
|
});
|
|
81
77
|
|
|
@@ -87,16 +83,13 @@ function handleMouseEvents(val: boolean) {
|
|
|
87
83
|
|
|
88
84
|
watch(
|
|
89
85
|
() => props.modelValue,
|
|
90
|
-
|
|
86
|
+
val => props.trigger === 'manual' && (showTooltip.value = val),
|
|
91
87
|
{ immediate: true },
|
|
92
88
|
);
|
|
93
89
|
|
|
94
|
-
watch(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
val ? emits('opened') : emits('closed');
|
|
98
|
-
},
|
|
99
|
-
);
|
|
90
|
+
watch(isPositioned, val => {
|
|
91
|
+
val ? emits('opened') : emits('closed');
|
|
92
|
+
});
|
|
100
93
|
</script>
|
|
101
94
|
|
|
102
95
|
<template>
|
|
@@ -109,7 +102,12 @@ watch(
|
|
|
109
102
|
<slot name="default" />
|
|
110
103
|
</div>
|
|
111
104
|
|
|
112
|
-
<div
|
|
105
|
+
<div
|
|
106
|
+
ref="floatingEl"
|
|
107
|
+
:class="$style.floating"
|
|
108
|
+
:style="floatingStyles"
|
|
109
|
+
v-if="showTooltip"
|
|
110
|
+
>
|
|
113
111
|
<slot name="content">
|
|
114
112
|
<div :class="$style.content">
|
|
115
113
|
{{ props.content }}
|