@v1nt1248/3nclient-lib 0.0.37 → 0.0.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-simple.vue.d.ts +4 -1
- package/dist/components/ui3n-badge.vue.d.ts +4 -1
- package/dist/components/ui3n-button.vue.d.ts +4 -1
- package/dist/components/ui3n-checkbox.vue.d.ts +6 -3
- package/dist/components/ui3n-chip.vue.d.ts +5 -2
- package/dist/components/ui3n-dialog.vue.d.ts +1 -1
- package/dist/components/ui3n-drop-files.vue.d.ts +1 -1
- package/dist/components/ui3n-emoji.vue.d.ts +4 -1
- package/dist/components/ui3n-icon.vue.d.ts +1 -1
- package/dist/components/ui3n-input.vue.d.ts +1 -1
- package/dist/components/ui3n-list.vue.d.ts +6 -3
- package/dist/components/ui3n-menu.vue.d.ts +5 -2
- package/dist/components/ui3n-notification.vue.d.ts +1 -1
- package/dist/components/ui3n-table-sort-icon.vue.d.ts +1 -1
- package/dist/components/ui3n-table.vue.d.ts +1 -1
- package/dist/components/ui3n-tabs.vue.d.ts +4 -1
- package/dist/components/ui3n-text.vue.d.ts +2 -2
- package/dist/components/ui3n-virtual-scroll.vue.d.ts +6 -3
- package/dist/stories/Ui3nBadge.stories.d.ts +60 -96
- package/dist/stories/Ui3nButton.stories.d.ts +77 -113
- package/dist/stories/Ui3nCheckbox.stories.d.ts +100 -140
- package/dist/stories/Ui3nChip.stories.d.ts +300 -420
- package/dist/stories/Ui3nDialog.stories.d.ts +1 -1
- package/dist/stories/Ui3nDropFiles.stories.d.ts +32 -67
- package/dist/stories/Ui3nEmoji.stories.d.ts +1 -1
- package/dist/stories/Ui3nIcon.stories.d.ts +1 -1
- package/dist/stories/Ui3nInput.stories.d.ts +6 -6
- package/dist/stories/Ui3nList.stories.d.ts +3 -3
- package/dist/stories/Ui3nTabs.stories.d.ts +91 -130
- package/dist/style.css +1 -1
- package/dist/ui-3n-lib.js +2706 -2716
- package/package.json +38 -37
- package/src/components/ui3n-button.vue +8 -5
- package/src/components/ui3n-dialog.vue +12 -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.0.
|
|
5
|
+
"version": "0.0.39",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"private": false,
|
|
8
8
|
"type": "module",
|
|
@@ -36,61 +36,62 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@iconify-icons/ic": "^1.2.13",
|
|
38
38
|
"@iconify/vue": "^4.1.1",
|
|
39
|
-
"dayjs": "^1.11.
|
|
39
|
+
"dayjs": "^1.11.10",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
41
|
"mitt": "^3.0.1",
|
|
42
42
|
"sanitize-html": "^2.11.0",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"pinia": "^2.1.
|
|
47
|
-
"vue": "^3.
|
|
46
|
+
"pinia": "^2.1.7",
|
|
47
|
+
"vue": "^3.4.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@storybook/addon-actions": "^7.
|
|
51
|
-
"@storybook/addon-docs": "^7.
|
|
52
|
-
"@storybook/addon-essentials": "^7.
|
|
53
|
-
"@storybook/addon-interactions": "^7.
|
|
54
|
-
"@storybook/addon-links": "^7.
|
|
55
|
-
"@storybook/blocks": "^7.
|
|
56
|
-
"@storybook/builder-vite": "^7.
|
|
57
|
-
"@storybook/testing-library": "^0.2.
|
|
58
|
-
"@storybook/vue3": "^7.
|
|
59
|
-
"@storybook/vue3-vite": "^7.
|
|
60
|
-
"@types/lodash": "^4.14.
|
|
61
|
-
"@types/node": "^20.
|
|
62
|
-
"@types/sanitize-html": "^2.9.
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
64
|
-
"@typescript-eslint/parser": "^6.
|
|
65
|
-
"@vitejs/plugin-vue": "^4.2
|
|
66
|
-
"@vue/compiler-core": "^3.
|
|
50
|
+
"@storybook/addon-actions": "^7.6.7",
|
|
51
|
+
"@storybook/addon-docs": "^7.6.7",
|
|
52
|
+
"@storybook/addon-essentials": "^7.6.7",
|
|
53
|
+
"@storybook/addon-interactions": "^7.6.7",
|
|
54
|
+
"@storybook/addon-links": "^7.6.7",
|
|
55
|
+
"@storybook/blocks": "^7.6.7",
|
|
56
|
+
"@storybook/builder-vite": "^7.6.7",
|
|
57
|
+
"@storybook/testing-library": "^0.2.2",
|
|
58
|
+
"@storybook/vue3": "^7.6.7",
|
|
59
|
+
"@storybook/vue3-vite": "^7.6.7",
|
|
60
|
+
"@types/lodash": "^4.14.202",
|
|
61
|
+
"@types/node": "^20.10.8",
|
|
62
|
+
"@types/sanitize-html": "^2.9.5",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
64
|
+
"@typescript-eslint/parser": "^6.18.1",
|
|
65
|
+
"@vitejs/plugin-vue": "^4.6.2",
|
|
66
|
+
"@vue/compiler-core": "^3.4.7",
|
|
67
67
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
68
68
|
"@vuedx/typescript-plugin-vue": "^0.7.6",
|
|
69
|
-
"eslint": "^8.
|
|
70
|
-
"eslint-plugin-import": "^2.
|
|
69
|
+
"eslint": "^8.56.0",
|
|
70
|
+
"eslint-plugin-import": "^2.29.1",
|
|
71
71
|
"eslint-plugin-node": "^11.1.0",
|
|
72
72
|
"eslint-plugin-promise": "^6.1.1",
|
|
73
|
-
"eslint-plugin-storybook": "^0.6.
|
|
74
|
-
"eslint-plugin-vue": "^9.
|
|
75
|
-
"jackspeak": "^2.3.
|
|
76
|
-
"
|
|
73
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
74
|
+
"eslint-plugin-vue": "^9.19.2",
|
|
75
|
+
"jackspeak": "^2.3.6",
|
|
76
|
+
"path": "^0.12.7",
|
|
77
|
+
"pinia": "^2.1.7",
|
|
77
78
|
"postcss-html": "^1.5.0",
|
|
78
79
|
"react": "^18.2.0",
|
|
79
80
|
"react-dom": "^18.2.0",
|
|
80
|
-
"sass": "^1.
|
|
81
|
-
"storybook": "^7.
|
|
82
|
-
"stylelint": "^15.
|
|
81
|
+
"sass": "^1.69.7",
|
|
82
|
+
"storybook": "^7.6.7",
|
|
83
|
+
"stylelint": "^15.11.0",
|
|
83
84
|
"stylelint-config-recommended-scss": "^12.0.0",
|
|
84
85
|
"stylelint-config-recommended-vue": "^1.5.0",
|
|
85
86
|
"stylelint-config-standard": "^34.0.0",
|
|
86
87
|
"stylelint-rscss": "^0.4.0",
|
|
87
|
-
"stylelint-scss": "^5.
|
|
88
|
-
"typescript": "^5.
|
|
89
|
-
"vite": "^
|
|
90
|
-
"vite-plugin-css-injected-by-js": "^3.3.
|
|
91
|
-
"vite-plugin-dts": "^3.
|
|
92
|
-
"vue": "^3.
|
|
93
|
-
"vue-tsc": "^1.8.
|
|
88
|
+
"stylelint-scss": "^5.3.2",
|
|
89
|
+
"typescript": "^5.3.3",
|
|
90
|
+
"vite": "^5.0.11",
|
|
91
|
+
"vite-plugin-css-injected-by-js": "^3.3.1",
|
|
92
|
+
"vite-plugin-dts": "^3.7.0",
|
|
93
|
+
"vue": "^3.4.7",
|
|
94
|
+
"vue-tsc": "^1.8.27"
|
|
94
95
|
},
|
|
95
96
|
"packageManager": "yarn@3.6.3"
|
|
96
97
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface Ui3nButtonEmits {
|
|
18
|
+
(ev: 'init', value: HTMLButtonElement): void;
|
|
18
19
|
(ev: 'click', value: Event): void;
|
|
19
20
|
(ev: 'focus', value: Event): void;
|
|
20
21
|
(ev: 'blur', value: Event): void;
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
|
|
23
24
|
const slots = useSlots()
|
|
24
25
|
const props = defineProps<Ui3nButtonProps>()
|
|
25
|
-
const
|
|
26
|
+
const emits = defineEmits<Ui3nButtonEmits>()
|
|
26
27
|
|
|
27
28
|
const buttonEl = ref<HTMLButtonElement | null>(null)
|
|
28
29
|
const isSlotEmpty = computed(() => !hasSlotContent(slots['default']))
|
|
@@ -51,6 +52,8 @@
|
|
|
51
52
|
if (props.textColor) {
|
|
52
53
|
buttonEl.value.style.setProperty('--ui3n-button-text-color', props.textColor)
|
|
53
54
|
}
|
|
55
|
+
|
|
56
|
+
emits('init', buttonEl.value)
|
|
54
57
|
}
|
|
55
58
|
})
|
|
56
59
|
</script>
|
|
@@ -64,9 +67,9 @@
|
|
|
64
67
|
]"
|
|
65
68
|
type="button"
|
|
66
69
|
:disabled="props.disabled"
|
|
67
|
-
@click="
|
|
68
|
-
@focusin="
|
|
69
|
-
@focusout="
|
|
70
|
+
@click="emits('click', $event)"
|
|
71
|
+
@focusin="emits('focus', $event)"
|
|
72
|
+
@focusout="emits('blur', $event)"
|
|
70
73
|
>
|
|
71
74
|
<ui3n-icon
|
|
72
75
|
v-if="props.icon"
|
|
@@ -142,7 +145,7 @@
|
|
|
142
145
|
}
|
|
143
146
|
|
|
144
147
|
&__text {
|
|
145
|
-
display:
|
|
148
|
+
display: flex;
|
|
146
149
|
opacity: 0.85;
|
|
147
150
|
transition: opacity 0.2s ease-in-out;
|
|
148
151
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
import { computed, onMounted, ref } from 'vue'
|
|
3
|
+
import { computed, nextTick, onMounted, ref } from 'vue'
|
|
4
4
|
import type { Component } from 'vue'
|
|
5
5
|
import Ui3nButton from './ui3n-button.vue'
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
cancelButtonBackground?: string;
|
|
28
28
|
closeOnClickOverlay?: boolean;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
export interface Ui3nDialogComponentProps {
|
|
32
32
|
component: Component;
|
|
33
33
|
componentProps?: Record<string, any>;
|
|
@@ -97,6 +97,12 @@
|
|
|
97
97
|
dialogElement.value.style.setProperty('--dialog-confirm-background-color', dialogProps.value.confirmButtonBackground)
|
|
98
98
|
dialogElement.value.style.setProperty('--dialog-cancel-background-color', dialogProps.value.cancelButtonBackground)
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
if (dialogElement.value) {
|
|
102
|
+
nextTick(() => {
|
|
103
|
+
dialogElement.value!.focus()
|
|
104
|
+
})
|
|
105
|
+
}
|
|
100
106
|
})
|
|
101
107
|
|
|
102
108
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -172,8 +178,11 @@
|
|
|
172
178
|
>
|
|
173
179
|
<div
|
|
174
180
|
ref="dialogElement"
|
|
181
|
+
tabindex="1"
|
|
175
182
|
:class="dialogProps.cssClass"
|
|
176
183
|
:style="dialogProps.cssStyle"
|
|
184
|
+
@keydown.esc.stop="startEmit('cancel')"
|
|
185
|
+
@keydown.enter.stop=" isValid && startEmit('confirm')"
|
|
177
186
|
>
|
|
178
187
|
<div
|
|
179
188
|
v-if="dialogProps.title"
|
|
@@ -270,6 +279,7 @@
|
|
|
270
279
|
max-height: 95%;
|
|
271
280
|
background-color: var(--system-white, #fff);
|
|
272
281
|
border-radius: var(--dialog-border-radius);
|
|
282
|
+
outline: none;
|
|
273
283
|
@include elevation();
|
|
274
284
|
|
|
275
285
|
&__title {
|