@v1nt1248/3nclient-lib 0.2.58 → 0.2.60
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-input/types.d.ts +1 -0
- package/dist/components/ui3n-input/ui3n-input.vue.d.ts +2 -0
- package/dist/components/ui3n-text/types.d.ts +1 -0
- package/dist/components/ui3n-text/ui3n-text.vue.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +657 -649
- package/package.json +8 -8
- package/src/components/ui3n-input/types.ts +1 -0
- package/src/components/ui3n-input/ui3n-input.vue +5 -0
- package/src/components/ui3n-text/types.ts +1 -0
- package/src/components/ui3n-text/ui3n-text.vue +18 -13
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.60",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"@types/lodash": "4.17.20",
|
|
70
70
|
"@types/node": "22.18.0",
|
|
71
71
|
"@types/sanitize-html": "2.16.0",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
73
|
-
"@typescript-eslint/parser": "8.
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "8.46.2",
|
|
73
|
+
"@typescript-eslint/parser": "8.46.2",
|
|
74
74
|
"@vitejs/plugin-vue": "6.0.1",
|
|
75
|
-
"@vue/compiler-core": "3.5.
|
|
75
|
+
"@vue/compiler-core": "3.5.22",
|
|
76
76
|
"@vue/eslint-config-typescript": "14.6.0",
|
|
77
77
|
"@vue/runtime-core": "3.5.22",
|
|
78
78
|
"@vuedx/typescript-plugin-vue": "0.7.6",
|
|
@@ -89,16 +89,16 @@
|
|
|
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.93.2",
|
|
93
93
|
"stylelint": "16.23.1",
|
|
94
94
|
"stylelint-config-recommended-scss": "16.0.0",
|
|
95
95
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
96
96
|
"stylelint-config-standard": "39.0.0",
|
|
97
97
|
"stylelint-scss": "6.12.1",
|
|
98
98
|
"tslib": "2.8.1",
|
|
99
|
-
"typescript": "5.9.
|
|
100
|
-
"typescript-eslint": "^8.
|
|
101
|
-
"vite": "7.1.
|
|
99
|
+
"typescript": "5.9.3",
|
|
100
|
+
"typescript-eslint": "^8.46.2",
|
|
101
|
+
"vite": "7.1.12",
|
|
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",
|
|
@@ -17,6 +17,7 @@ export interface Ui3nInputProps {
|
|
|
17
17
|
export interface Ui3nInputEmits {
|
|
18
18
|
(event: 'init', value: HTMLInputElement): void;
|
|
19
19
|
(event: 'input', value: string): void;
|
|
20
|
+
(event: 'keydown', value: KeyboardEvent): void;
|
|
20
21
|
(event: 'focus', value: Event): void;
|
|
21
22
|
(event: 'blur', value: Event): void;
|
|
22
23
|
(event: 'clear'): void;
|
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
emits('escape', event);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
function onKeydown(event: KeyboardEvent) {
|
|
107
|
+
emits('keydown', event);
|
|
108
|
+
}
|
|
109
|
+
|
|
106
110
|
function clearValue() {
|
|
107
111
|
text.value = '';
|
|
108
112
|
isDirty.value = false;
|
|
@@ -182,6 +186,7 @@
|
|
|
182
186
|
@input="onInput"
|
|
183
187
|
@keydown.enter="onEnterKeydown"
|
|
184
188
|
@keydown.escape="onEscapeKeydown"
|
|
189
|
+
@keydown="onKeydown"
|
|
185
190
|
@focusin="onFocus"
|
|
186
191
|
@focusout="onBlur"
|
|
187
192
|
@change="onChange"
|
|
@@ -12,6 +12,7 @@ export interface Ui3nTextEmits {
|
|
|
12
12
|
(event: 'init', value: HTMLTextAreaElement): void;
|
|
13
13
|
(event: 'input', value: string): void;
|
|
14
14
|
(event: 'change', value: string): void;
|
|
15
|
+
(event: 'keydown', value: KeyboardEvent): void;
|
|
15
16
|
(event: 'enter', value: {
|
|
16
17
|
value: string;
|
|
17
18
|
altKey: boolean;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
disabled: false,
|
|
14
14
|
},
|
|
15
15
|
);
|
|
16
|
-
const
|
|
16
|
+
const emits = defineEmits<Ui3nTextEmits>();
|
|
17
17
|
|
|
18
18
|
const textareaElement = ref<HTMLTextAreaElement | null>(null);
|
|
19
19
|
const isFocused = ref(false);
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
onMounted(() => {
|
|
31
31
|
if (textareaElement.value) {
|
|
32
32
|
patchTextareaMaxRowsSupport(textareaElement.value!);
|
|
33
|
-
|
|
33
|
+
emits('init', textareaElement.value!);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
watch(
|
|
38
38
|
() => isValid.value,
|
|
39
|
-
val =>
|
|
39
|
+
val => emits('update:valid', val),
|
|
40
40
|
{ immediate: true },
|
|
41
41
|
);
|
|
42
42
|
|
|
@@ -56,38 +56,42 @@
|
|
|
56
56
|
|
|
57
57
|
function onFocus(event: Event) {
|
|
58
58
|
isFocused.value = true;
|
|
59
|
-
|
|
59
|
+
emits('focus', event);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function onBlur(event: Event) {
|
|
63
63
|
isFocused.value = false;
|
|
64
64
|
const value = (event.target as HTMLInputElement).value;
|
|
65
65
|
validate(value);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
emits('blur', event);
|
|
67
|
+
emits('change', value);
|
|
68
|
+
emits('update:text', value);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function onInput(event: Event) {
|
|
72
72
|
const value = (event.target as HTMLInputElement).value;
|
|
73
73
|
validate(value);
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
emits('update:text', value);
|
|
75
|
+
emits('input', value);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
function onEnterKeydown(event: KeyboardEvent) {
|
|
79
79
|
const { altKey, ctrlKey, shiftKey, metaKey, target } = event;
|
|
80
80
|
const value = (target as HTMLInputElement).value;
|
|
81
81
|
validate(value);
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
emits('update:text', value);
|
|
83
|
+
emits('enter', { value, altKey, ctrlKey, shiftKey, metaKey });
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
function onEscapeKeydown(event: KeyboardEvent) {
|
|
87
87
|
const value = (event.target as HTMLInputElement).value;
|
|
88
88
|
validate(value);
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
emits('update:text', value);
|
|
90
|
+
emits('escape', event);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function onKeydown(event: KeyboardEvent) {
|
|
94
|
+
emits('keydown', event);
|
|
91
95
|
}
|
|
92
96
|
</script>
|
|
93
97
|
|
|
@@ -114,6 +118,7 @@
|
|
|
114
118
|
@input="onInput"
|
|
115
119
|
@keydown.enter="onEnterKeydown"
|
|
116
120
|
@keydown.escape="onEscapeKeydown"
|
|
121
|
+
@keydown="onKeydown"
|
|
117
122
|
@focusin="onFocus"
|
|
118
123
|
@focusout="onBlur"
|
|
119
124
|
/>
|