@v1nt1248/3nclient-lib 0.3.51 → 0.4.1
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 +4 -0
- package/dist/chunks/{plugins-keys-DdadrIAg.js → plugins-keys-CjKqZeyH.js} +2 -2
- package/dist/chunks/ui3n-tooltip-BbbM2459.js +409 -0
- package/dist/src/components/ui3n-chip/ui3n-chip.d.ts +0 -5
- package/dist/src/components/ui3n-icon/ui3n-icon.d.ts +0 -1
- package/dist/src/components/ui3n-progress/ui3n-progress-circular.d.ts +0 -2
- package/dist/src/components/ui3n-progress/ui3n-progress-linear.d.ts +0 -2
- package/dist/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.d.ts +0 -7
- package/dist/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +0 -7
- package/dist/src/components/ui3n-slider/ui3n-slider.d.ts +0 -5
- package/dist/src/components/ui3n-tabs/ui3n-tabs.d.ts +0 -4
- package/dist/src/components/ui3n-tooltip/types.d.ts +8 -2
- package/dist/src/components/ui3n-tooltip/ui3n-tooltip-container.d.ts +16 -0
- package/dist/src/components/ui3n-tooltip/ui3n-tooltip.d.ts +1 -5
- package/dist/src/constants/plugins-keys.d.ts +2 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/plugins/index.d.ts +4 -1
- package/dist/src/plugins/tooltips/store-tooltips.d.ts +4 -0
- package/dist/src/plugins/tooltips/tooltips.d.ts +8 -0
- package/dist/src/plugins/tooltips/types.d.ts +34 -0
- package/dist/src/ui3n-plugins.d.ts +5 -3
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +1011 -1183
- package/dist/ui3n-plugins.js +169 -50
- package/dist/ui3n-utils.js +4 -4
- package/package.json +11 -4
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +28 -25
- package/src/components/ui3n-badge/ui3n-badge-simple.vue +18 -17
- package/src/components/ui3n-badge/ui3n-badge.vue +3 -2
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +11 -10
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +4 -1
- package/src/components/ui3n-button/ui3n-button.vue +244 -158
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +22 -21
- package/src/components/ui3n-chip/ui3n-chip.vue +56 -40
- package/src/components/ui3n-dialog/ui3n-dialog-provider.vue +1 -0
- package/src/components/ui3n-dialog/ui3n-dialog.vue +19 -18
- package/src/components/ui3n-drop-files/ui3n-drop-files.vue +8 -7
- package/src/components/ui3n-editable/ui3n-content-editable.vue +11 -10
- package/src/components/ui3n-editable/ui3n-editable.vue +26 -25
- package/src/components/ui3n-emoji/ui3n-emoji.vue +7 -6
- package/src/components/ui3n-icon/ui3n-icon.vue +26 -16
- package/src/components/ui3n-input/ui3n-input.vue +36 -32
- package/src/components/ui3n-input-file/ui3n-input-file.vue +8 -5
- package/src/components/ui3n-list/ui3n-list.vue +8 -7
- package/src/components/ui3n-menu/ui3n-menu.vue +6 -5
- package/src/components/ui3n-mobile-menu/ui3n-mobile-menu.vue +4 -3
- package/src/components/ui3n-mobile-menu-item/ui3n-mobile-menu-item.vue +7 -6
- package/src/components/ui3n-notification/ui3n-notification-container.vue +1 -0
- package/src/components/ui3n-notification/ui3n-notification.vue +28 -26
- package/src/components/ui3n-progress/ui3n-progress-circular.vue +32 -19
- package/src/components/ui3n-progress/ui3n-progress-linear.vue +31 -18
- package/src/components/ui3n-radio-group/ui3n-radio-group.vue +4 -1
- package/src/components/ui3n-radio-group/ui3n-radio.vue +6 -5
- package/src/components/ui3n-scrollbar/ui3n-scrollbar.vue +94 -83
- package/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.vue +51 -39
- package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +51 -39
- package/src/components/ui3n-selector/ui3n-selector.vue +33 -28
- package/src/components/ui3n-slider/ui3n-slider.vue +53 -34
- package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +10 -6
- package/src/components/ui3n-switch/ui3n-switch.vue +23 -22
- package/src/components/ui3n-table/ui3n-table.vue +50 -48
- package/src/components/ui3n-tabs/ui3n-tabs.vue +38 -20
- package/src/components/ui3n-text/ui3n-text.vue +15 -14
- package/src/components/ui3n-tooltip/types.ts +8 -2
- package/src/components/ui3n-tooltip/ui3n-tooltip-container.vue +79 -0
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +140 -79
- package/dist/chunks/ui3n-notification-o0tuhTpO.js +0 -272
- package/src/components/ui3n-tooltip/ui3n-tooltip-old.vue +0 -198
package/dist/ui3n-plugins.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { U as e, a as t, i as n, n as r, r as i, t as a } from "./chunks/plugins-keys-CjKqZeyH.js";
|
|
2
|
+
import { a as o, n as s, t as c } from "./chunks/ui3n-tooltip-BbbM2459.js";
|
|
3
|
+
import { Fragment as l, createApp as u, createBlock as d, createElementBlock as f, defineComponent as p, markRaw as m, mergeProps as h, normalizeClass as g, openBlock as _, ref as v, renderList as y } from "vue";
|
|
4
4
|
import "pinia";
|
|
5
|
-
import
|
|
6
|
-
var
|
|
5
|
+
import b from "mitt";
|
|
6
|
+
var x = /* @__PURE__ */ o(/* @__PURE__ */ p({
|
|
7
7
|
__name: "ui3n-notification-container",
|
|
8
8
|
setup(e, { expose: t }) {
|
|
9
|
-
let n =
|
|
9
|
+
let n = v([]);
|
|
10
10
|
function r(e) {
|
|
11
11
|
n.value.push(e);
|
|
12
12
|
}
|
|
@@ -19,18 +19,19 @@ var y = /* @__PURE__ */ a(/* @__PURE__ */ d({
|
|
|
19
19
|
return t({
|
|
20
20
|
add: r,
|
|
21
21
|
remove: i
|
|
22
|
-
}), (e, t) => (
|
|
22
|
+
}), (e, t) => (_(), f("div", {
|
|
23
23
|
id: "ui3n-notifications-container",
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
"data-ui3n": "notification-container",
|
|
25
|
+
class: g(e.$style.ui3nNotificationsWrapper)
|
|
26
|
+
}, [(_(!0), f(l, null, y(n.value, (e) => (_(), d(s, h({ key: e.id }, { ref_for: !0 }, e, { "on-close": () => a(e) }), null, 16, ["on-close"]))), 128))], 2));
|
|
26
27
|
}
|
|
27
|
-
}), [["__cssModules", { $style: { ui3nNotificationsWrapper: "_ui3nNotificationsWrapper_n58wk_1" } }]]),
|
|
28
|
+
}), [["__cssModules", { $style: { ui3nNotificationsWrapper: "_ui3nNotificationsWrapper_n58wk_1" } }]]), S = { install: (t) => {
|
|
28
29
|
if (typeof window > "u") return;
|
|
29
|
-
let
|
|
30
|
-
document.body.appendChild(
|
|
31
|
-
let i =
|
|
30
|
+
let n = document.createElement("div");
|
|
31
|
+
document.body.appendChild(n);
|
|
32
|
+
let i = u(x);
|
|
32
33
|
i._context.provides = t._context.provides;
|
|
33
|
-
let a = i.mount(
|
|
34
|
+
let a = i.mount(n), o = (t) => {
|
|
34
35
|
let n = t.id || e(6), r = t.duration === void 0 ? 1500 : t.duration;
|
|
35
36
|
a.add({
|
|
36
37
|
...t,
|
|
@@ -38,33 +39,33 @@ var y = /* @__PURE__ */ a(/* @__PURE__ */ d({
|
|
|
38
39
|
duration: r
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
|
-
t.config.globalProperties.$createNotice = o, t.provide(
|
|
42
|
-
} },
|
|
43
|
-
on:
|
|
42
|
+
t.config.globalProperties.$createNotice = o, t.provide(r, { $createNotice: o });
|
|
43
|
+
} }, C = b(), w = {
|
|
44
|
+
on: C.on.bind(C),
|
|
44
45
|
once: (e, t) => {
|
|
45
46
|
function n() {
|
|
46
|
-
|
|
47
|
+
C.off(e, n), t.apply(null, arguments);
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
+
C.on(e, n);
|
|
49
50
|
},
|
|
50
|
-
off:
|
|
51
|
-
emit:
|
|
52
|
-
clear:
|
|
53
|
-
},
|
|
54
|
-
e.config.globalProperties.$emitter =
|
|
55
|
-
} },
|
|
56
|
-
let n =
|
|
51
|
+
off: C.off.bind(C),
|
|
52
|
+
emit: C.emit.bind(C),
|
|
53
|
+
clear: C.all.clear.bind(C)
|
|
54
|
+
}, T = { install: (e) => {
|
|
55
|
+
e.config.globalProperties.$emitter = w, e.provide(t, { $emitter: w });
|
|
56
|
+
} }, E = { install(t) {
|
|
57
|
+
let n = v([]);
|
|
57
58
|
function r(t, r) {
|
|
58
59
|
return new Promise((i) => {
|
|
59
60
|
n.value.push({
|
|
60
61
|
id: e(5),
|
|
61
|
-
component:
|
|
62
|
+
component: m(t),
|
|
62
63
|
props: r,
|
|
63
64
|
resolve: i
|
|
64
65
|
});
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function i(e, t) {
|
|
68
69
|
let r = n.value.findIndex((t) => t.id === e);
|
|
69
70
|
r !== -1 && (n.value[r].resolve(t), n.value.splice(r, 1));
|
|
70
71
|
}
|
|
@@ -74,30 +75,30 @@ var y = /* @__PURE__ */ a(/* @__PURE__ */ d({
|
|
|
74
75
|
t.config.globalProperties.$dialog = {
|
|
75
76
|
dialogStack: n,
|
|
76
77
|
$openDialog: r,
|
|
77
|
-
$closeDialog:
|
|
78
|
+
$closeDialog: i,
|
|
78
79
|
$closeDialogs: o
|
|
79
|
-
}, t.provide(
|
|
80
|
+
}, t.provide(a, {
|
|
80
81
|
dialogStack: n,
|
|
81
82
|
$openDialog: r,
|
|
82
|
-
$closeDialog:
|
|
83
|
+
$closeDialog: i,
|
|
83
84
|
$closeDialogs: o
|
|
84
85
|
});
|
|
85
86
|
} };
|
|
86
87
|
//#endregion
|
|
87
88
|
//#region src/plugins/notifications/store-notifications.ts
|
|
88
|
-
function
|
|
89
|
+
function D(e) {
|
|
89
90
|
let { app: t = {} } = e, { config: n = {} } = t, { globalProperties: r = {} } = n, { $createNotice: i } = r;
|
|
90
91
|
return { $createNotice: i };
|
|
91
92
|
}
|
|
92
93
|
//#endregion
|
|
93
94
|
//#region src/plugins/vue-bus/store-vue-bus.ts
|
|
94
|
-
function
|
|
95
|
+
function O(e) {
|
|
95
96
|
let { app: t = {} } = e, { config: n = {} } = t, { globalProperties: r = {} } = n, { $emitter: i } = r;
|
|
96
97
|
return { $emitter: i };
|
|
97
98
|
}
|
|
98
99
|
//#endregion
|
|
99
100
|
//#region src/plugins/dialogs/store-dialog.ts
|
|
100
|
-
function
|
|
101
|
+
function k(e) {
|
|
101
102
|
let { app: t = {} } = e, { config: n = {} } = t, { globalProperties: r = {} } = n, { $dialog: i } = r;
|
|
102
103
|
return { $dialogs: {
|
|
103
104
|
open: i.$openDialog,
|
|
@@ -108,38 +109,38 @@ function D(e) {
|
|
|
108
109
|
}
|
|
109
110
|
//#endregion
|
|
110
111
|
//#region src/plugins/theme/theme.ts
|
|
111
|
-
var
|
|
112
|
+
var A = [
|
|
112
113
|
"light",
|
|
113
114
|
"dark",
|
|
114
115
|
"midnight"
|
|
115
|
-
],
|
|
116
|
+
], j = [
|
|
116
117
|
"light-theme",
|
|
117
118
|
"dark-theme",
|
|
118
119
|
"midnight-theme"
|
|
119
120
|
];
|
|
120
|
-
function
|
|
121
|
-
return typeof e == "string" &&
|
|
121
|
+
function M(e) {
|
|
122
|
+
return typeof e == "string" && A.includes(e);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
+
function N(e, t) {
|
|
124
125
|
e.classList.add("colors");
|
|
125
|
-
for (let t of
|
|
126
|
+
for (let t of j) e.classList.remove(t);
|
|
126
127
|
e.classList.add(`${t}-theme`);
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
+
function P(e) {
|
|
129
130
|
if (e.persist) {
|
|
130
131
|
let t = e.storageKey ?? "ui3n-theme";
|
|
131
132
|
try {
|
|
132
133
|
let e = localStorage.getItem(t);
|
|
133
|
-
if (
|
|
134
|
+
if (M(e)) return e;
|
|
134
135
|
} catch {}
|
|
135
136
|
}
|
|
136
|
-
return
|
|
137
|
+
return M(e.theme) ? e.theme : "light";
|
|
137
138
|
}
|
|
138
|
-
var
|
|
139
|
-
let n = t.persist ?? !1,
|
|
139
|
+
var F = { install(e, t = {}) {
|
|
140
|
+
let n = t.persist ?? !1, r = t.storageKey ?? "ui3n-theme", a = v(typeof document > "u" ? t.theme ?? "light" : P(t));
|
|
140
141
|
function o(e) {
|
|
141
|
-
if (
|
|
142
|
-
localStorage.setItem(
|
|
142
|
+
if (M(e) && (a.value = e, !(typeof document > "u") && (N(t.target ?? document.documentElement, e), n))) try {
|
|
143
|
+
localStorage.setItem(r, e);
|
|
143
144
|
} catch {}
|
|
144
145
|
}
|
|
145
146
|
typeof document < "u" && o(a.value);
|
|
@@ -147,13 +148,131 @@ var N = { install(e, t = {}) {
|
|
|
147
148
|
theme: a,
|
|
148
149
|
setTheme: o
|
|
149
150
|
};
|
|
150
|
-
e.provide(
|
|
151
|
+
e.provide(i, s), e.config.globalProperties.$theme = s;
|
|
151
152
|
} };
|
|
152
153
|
//#endregion
|
|
153
154
|
//#region src/plugins/theme/store-theme.ts
|
|
154
|
-
function
|
|
155
|
+
function I(e) {
|
|
155
156
|
let { app: t = {} } = e, { config: n = {} } = t, { globalProperties: r = {} } = n, { $theme: i } = r;
|
|
156
157
|
return { $theme: i };
|
|
157
158
|
}
|
|
159
|
+
var L = /* @__PURE__ */ o(/* @__PURE__ */ p({
|
|
160
|
+
__name: "ui3n-tooltip-container",
|
|
161
|
+
setup(e, { expose: t }) {
|
|
162
|
+
let n = v([]);
|
|
163
|
+
function r(e) {
|
|
164
|
+
n.value.push(e);
|
|
165
|
+
}
|
|
166
|
+
function i(e) {
|
|
167
|
+
n.value = n.value.filter((t) => t.id !== e);
|
|
168
|
+
}
|
|
169
|
+
function a(e) {
|
|
170
|
+
n.value = n.value.filter((t) => t.kind !== e);
|
|
171
|
+
}
|
|
172
|
+
function o(e) {
|
|
173
|
+
n.value = n.value.filter((t) => !(t.kind === "attach" && t.target === e));
|
|
174
|
+
}
|
|
175
|
+
function s(e, t) {
|
|
176
|
+
let r = n.value.find((t) => t.id === e);
|
|
177
|
+
r && Object.assign(r, t);
|
|
178
|
+
}
|
|
179
|
+
function u() {
|
|
180
|
+
n.value = [];
|
|
181
|
+
}
|
|
182
|
+
function p(e) {
|
|
183
|
+
return {
|
|
184
|
+
id: e.id,
|
|
185
|
+
content: e.content,
|
|
186
|
+
maxContentWidth: e.maxContentWidth,
|
|
187
|
+
color: e.color,
|
|
188
|
+
textColor: e.textColor,
|
|
189
|
+
placement: e.placement,
|
|
190
|
+
positionStrategy: e.positionStrategy ?? "fixed",
|
|
191
|
+
offsetX: e.offsetX,
|
|
192
|
+
offsetY: e.offsetY,
|
|
193
|
+
trigger: e.trigger,
|
|
194
|
+
modelValue: e.modelValue,
|
|
195
|
+
disabled: e.disabled,
|
|
196
|
+
triggerElement: e.target
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
return t({
|
|
200
|
+
add: r,
|
|
201
|
+
remove: i,
|
|
202
|
+
removeByKind: a,
|
|
203
|
+
removeByTarget: o,
|
|
204
|
+
update: s,
|
|
205
|
+
clearAll: u
|
|
206
|
+
}), (e, t) => (_(), f("div", {
|
|
207
|
+
id: "ui3n-tooltips-container",
|
|
208
|
+
"data-ui3n": "tooltip-container",
|
|
209
|
+
class: g(e.$style.container)
|
|
210
|
+
}, [(_(!0), f(l, null, y(n.value, (e) => (_(), d(c, h({ key: e.id }, { ref_for: !0 }, p(e)), null, 16))), 128))], 2));
|
|
211
|
+
}
|
|
212
|
+
}), [["__cssModules", { $style: { container: "_container_zxf3h_1" } }]]), R = { install: (t) => {
|
|
213
|
+
if (typeof window > "u") return;
|
|
214
|
+
let r = document.createElement("div");
|
|
215
|
+
document.body.appendChild(r);
|
|
216
|
+
let i = u(L);
|
|
217
|
+
i._context.provides = t._context.provides;
|
|
218
|
+
let a = i.mount(r);
|
|
219
|
+
function o(e, t) {
|
|
220
|
+
return {
|
|
221
|
+
id: e,
|
|
222
|
+
close: () => {
|
|
223
|
+
t === "show" ? l() : d(e);
|
|
224
|
+
},
|
|
225
|
+
update: (t) => a.update(e, t)
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function s(t, n) {
|
|
229
|
+
a.removeByKind("show");
|
|
230
|
+
let r = e(6);
|
|
231
|
+
return a.add({
|
|
232
|
+
...n,
|
|
233
|
+
id: r,
|
|
234
|
+
kind: "show",
|
|
235
|
+
target: m(t),
|
|
236
|
+
trigger: "manual",
|
|
237
|
+
modelValue: !0,
|
|
238
|
+
positionStrategy: n.positionStrategy ?? "fixed"
|
|
239
|
+
}), o(r, "show");
|
|
240
|
+
}
|
|
241
|
+
function c(t, n) {
|
|
242
|
+
t instanceof HTMLElement && a.removeByTarget(t);
|
|
243
|
+
let r = e(6);
|
|
244
|
+
return a.add({
|
|
245
|
+
...n,
|
|
246
|
+
id: r,
|
|
247
|
+
kind: "attach",
|
|
248
|
+
target: m(t),
|
|
249
|
+
trigger: n.trigger ?? "hover",
|
|
250
|
+
positionStrategy: n.positionStrategy ?? "fixed"
|
|
251
|
+
}), o(r, "attach");
|
|
252
|
+
}
|
|
253
|
+
function l() {
|
|
254
|
+
a.removeByKind("show");
|
|
255
|
+
}
|
|
256
|
+
function d(e) {
|
|
257
|
+
typeof e == "string" ? a.remove(e) : a.removeByTarget(e);
|
|
258
|
+
}
|
|
259
|
+
function f() {
|
|
260
|
+
a.clearAll();
|
|
261
|
+
}
|
|
262
|
+
let p = {
|
|
263
|
+
show: s,
|
|
264
|
+
attach: c,
|
|
265
|
+
hide: l,
|
|
266
|
+
detach: d,
|
|
267
|
+
detachAll: f
|
|
268
|
+
};
|
|
269
|
+
t.config.globalProperties.$tooltip = p, t.provide(n, p);
|
|
270
|
+
} };
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/plugins/tooltips/store-tooltips.ts
|
|
273
|
+
function z(e) {
|
|
274
|
+
let { app: t = {} } = e, { config: n = {} } = t, { globalProperties: r = {} } = n, { $tooltip: i } = r;
|
|
275
|
+
return { $tooltip: i };
|
|
276
|
+
}
|
|
158
277
|
//#endregion
|
|
159
|
-
export {
|
|
278
|
+
export { a as DIALOGS_KEY, r as NOTIFICATIONS_KEY, i as THEME_KEY, n as TOOLTIPS_KEY, t as VUEBUS_KEY, E as dialogs, S as notifications, k as storeDialogs, D as storeNotifications, I as storeTheme, z as storeTooltips, O as storeVueBus, F as theme, R as tooltips, T as vueBus };
|
package/dist/ui3n-utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { t as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, T as y, U as b, W as x, X as S, Y as C, Z as w, _ as T, a as E, b as D, c as O, d as k, f as A, g as j, h as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, q as V, r as H, s as U, t as W, u as G, v as K, w as q, x as J, y as Y, z as X } from "./chunks/plugins-keys-CjKqZeyH.js";
|
|
2
|
+
import { t as Z } from "./chunks/emoticons-DMgiBINj.js";
|
|
3
3
|
//#region src/constants/general.ts
|
|
4
|
-
var
|
|
4
|
+
var Q = /[^@]+@[^@]+\.[^@]+/iu;
|
|
5
5
|
//#endregion
|
|
6
|
-
export {
|
|
6
|
+
export { W as DIALOGS_KEY, R as NOTIFICATIONS_KEY, V as NamedProcs, z as SQLiteOn3NStorage, l as SingleCyclicProc, C as SingleProc, H as THEME_KEY, N as TOOLTIPS_KEY, o as TaskRunner, E as VUEBUS_KEY, L as b64ToBlob, B as blobFromDataURL, M as blobToB64, v as capitalize, a as copyToClipboard, I as createVideoThumbnail, f as debounce, g as defer, Z as emoticons, h as executeFunc, G as fileToUint8Array, D as formatFileSize, i as generateColor, c as getDeliveryErrors, t as getFileExtension, b as getRandomId, r as hasSlotContent, q as html2text, y as invertColor, j as isFileArchive, T as isFileAudio, Y as isFileImage, K as isFileVideo, Q as mailReg, S as makeSyncedFunc, m as markSearch, X as mimeTypes, s as patchTextareaMaxRowsSupport, n as prepareDateAsSting, p as removeWhitespaceInString, k as resizeImage, x as round, u as schedulerYield, F as selectAll, e as selectEnd, P as selectStart, w as sleep, J as toCssLength, d as transformFileToWeb3NFile, _ as transformWeb3nFileToFile, U as tryOnScopeDispose, A as uint8ToDataURL, O as unrefElement };
|
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.
|
|
5
|
+
"version": "0.4.1",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -34,13 +34,17 @@
|
|
|
34
34
|
"build": "pnpm clean:dist && vite build",
|
|
35
35
|
"pack": "pnpm build && npm pack && cp *.tgz ./dist && rm *.tgz",
|
|
36
36
|
"preview": "vite preview",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"test:watch": "vitest",
|
|
37
39
|
"stylelint": "stylelint --config .stylelint.config.cjs 'src/**/*.{vue,scss,css}'",
|
|
38
40
|
"stylelint:fix": "stylelint --config .stylelint.config.cjs --fix 'src/**/*.{vue,scss,css}'",
|
|
39
|
-
"lint": "pnpm
|
|
40
|
-
"lint:fix": "pnpm
|
|
41
|
+
"lint": "pnpm eslint && pnpm stylelint",
|
|
42
|
+
"lint:fix": "pnpm eslint:fix && pnpm stylelint:fix",
|
|
41
43
|
"docs:dev": "vitepress dev docs",
|
|
42
44
|
"docs:build": "vitepress build docs",
|
|
43
|
-
"docs:preview": "vitepress preview docs"
|
|
45
|
+
"docs:preview": "vitepress preview docs",
|
|
46
|
+
"eslint": "eslint src",
|
|
47
|
+
"eslint:fix": "eslint --fix src"
|
|
44
48
|
},
|
|
45
49
|
"dependencies": {
|
|
46
50
|
"@floating-ui/dom": "1.7.6",
|
|
@@ -67,6 +71,7 @@
|
|
|
67
71
|
"@vue/compiler-core": "3.5.35",
|
|
68
72
|
"@vue/eslint-config-typescript": "14.7.0",
|
|
69
73
|
"@vue/runtime-core": "3.5.35",
|
|
74
|
+
"@vue/test-utils": "2.5.0",
|
|
70
75
|
"@vuedx/typescript-plugin-vue": "0.7.6",
|
|
71
76
|
"eslint": "10.4.0",
|
|
72
77
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
"eslint-plugin-vue": "10.9.1",
|
|
78
83
|
"globals": "17.6.0",
|
|
79
84
|
"jackspeak": "4.2.3",
|
|
85
|
+
"jsdom": "30.0.1",
|
|
80
86
|
"path": "0.12.7",
|
|
81
87
|
"pinia": "3.0.4",
|
|
82
88
|
"postcss-html": "1.8.1",
|
|
@@ -98,6 +104,7 @@
|
|
|
98
104
|
"vite-plugin-static-copy": "^4.1.1",
|
|
99
105
|
"vite-plugin-vue-devtools": "8.1.2",
|
|
100
106
|
"vitepress": "1.6.4",
|
|
107
|
+
"vitest": "4.1.11",
|
|
101
108
|
"vue": "3.5.35",
|
|
102
109
|
"vue-component-meta": "3.3.2",
|
|
103
110
|
"vue-docgen-api": "4.79.2",
|
|
@@ -380,7 +380,10 @@
|
|
|
380
380
|
</script>
|
|
381
381
|
|
|
382
382
|
<template>
|
|
383
|
-
<div
|
|
383
|
+
<div
|
|
384
|
+
data-ui3n="autocomplete"
|
|
385
|
+
:class="$style.ui3nAutocomplete"
|
|
386
|
+
>
|
|
384
387
|
<!-- 'hidden inputs' block for setting of 'name' attr when used in a form -->
|
|
385
388
|
<fieldset
|
|
386
389
|
v-if="name && !isEmpty(modelValue)"
|
|
@@ -545,17 +548,17 @@
|
|
|
545
548
|
|
|
546
549
|
<style lang="scss" module>
|
|
547
550
|
.ui3nAutocomplete {
|
|
548
|
-
--ui3n-autocomplete-min-height
|
|
549
|
-
--ui3n-autocomplete-font-size
|
|
550
|
-
--ui3n-autocomplete-item-font-size
|
|
551
|
-
--ui3n-autocomplete-padding-inline
|
|
552
|
-
--ui3n-autocomplete-padding-block
|
|
553
|
-
--ui3n-autocomplete-border-radius
|
|
551
|
+
--_autocomplete-min-height: var(--ui3n-autocomplete-min-height, 32px);
|
|
552
|
+
--_autocomplete-font-size: var(--ui3n-autocomplete-font-size, 12px);
|
|
553
|
+
--_autocomplete-item-font-size: var(--ui3n-autocomplete-item-font-size, 13px);
|
|
554
|
+
--_autocomplete-padding-inline: var(--ui3n-autocomplete-padding-inline, 8px);
|
|
555
|
+
--_autocomplete-padding-block: var(--ui3n-autocomplete-padding-block, 4px);
|
|
556
|
+
--_autocomplete-border-radius: var(--ui3n-autocomplete-border-radius, 4px);
|
|
554
557
|
|
|
555
558
|
position: relative;
|
|
556
559
|
display: flex;
|
|
557
560
|
width: 100%;
|
|
558
|
-
min-height: var(--
|
|
561
|
+
min-height: var(--_autocomplete-min-height);
|
|
559
562
|
|
|
560
563
|
:global(.match-search) {
|
|
561
564
|
font-weight: 600;
|
|
@@ -580,20 +583,20 @@
|
|
|
580
583
|
}
|
|
581
584
|
|
|
582
585
|
.displayValue {
|
|
583
|
-
font-size: var(--
|
|
584
|
-
line-height: var(--
|
|
586
|
+
font-size: var(--_autocomplete-font-size);
|
|
587
|
+
line-height: var(--_autocomplete-min-height);
|
|
585
588
|
font-weight: 400;
|
|
586
589
|
color: var(--color-text-control-primary-default);
|
|
587
590
|
}
|
|
588
591
|
|
|
589
592
|
.input {
|
|
590
|
-
border-radius: var(--
|
|
591
|
-
padding: 0 var(--
|
|
593
|
+
border-radius: var(--_autocomplete-border-radius);
|
|
594
|
+
padding: 0 var(--_autocomplete-padding-inline);
|
|
592
595
|
flex: 1 1 60px;
|
|
593
596
|
min-width: 60px;
|
|
594
|
-
height: var(--
|
|
595
|
-
font-size: var(--
|
|
596
|
-
line-height: var(--
|
|
597
|
+
height: var(--_autocomplete-min-height);
|
|
598
|
+
font-size: var(--_autocomplete-font-size);
|
|
599
|
+
line-height: var(--_autocomplete-min-height);
|
|
597
600
|
font-weight: 400;
|
|
598
601
|
color: var(--color-text-control-primary-default);
|
|
599
602
|
background-color: transparent;
|
|
@@ -610,8 +613,8 @@
|
|
|
610
613
|
}
|
|
611
614
|
|
|
612
615
|
&.inputWithError {
|
|
613
|
-
height: calc(var(--
|
|
614
|
-
padding: 0 calc(var(--
|
|
616
|
+
height: calc(var(--_autocomplete-min-height) - 2px);
|
|
617
|
+
padding: 0 calc(var(--_autocomplete-padding-inline) - 1px);
|
|
615
618
|
border: 1px solid var(--error-content-default);
|
|
616
619
|
}
|
|
617
620
|
}
|
|
@@ -624,15 +627,15 @@
|
|
|
624
627
|
|
|
625
628
|
.item {
|
|
626
629
|
display: flex;
|
|
627
|
-
min-height: var(--
|
|
630
|
+
min-height: var(--_autocomplete-min-height);
|
|
628
631
|
justify-content: flex-start;
|
|
629
632
|
align-items: center;
|
|
630
|
-
padding: var(--
|
|
631
|
-
font-size: var(--
|
|
633
|
+
padding: var(--_autocomplete-padding-block) var(--_autocomplete-padding-inline);
|
|
634
|
+
font-size: var(--_autocomplete-item-font-size);
|
|
632
635
|
line-height: 1.23;
|
|
633
636
|
font-weight: 500;
|
|
634
637
|
color: var(--color-text-control-primary-default);
|
|
635
|
-
border-radius: var(--
|
|
638
|
+
border-radius: var(--_autocomplete-border-radius);
|
|
636
639
|
user-select: none;
|
|
637
640
|
cursor: pointer;
|
|
638
641
|
|
|
@@ -655,15 +658,15 @@
|
|
|
655
658
|
|
|
656
659
|
.noData {
|
|
657
660
|
display: flex;
|
|
658
|
-
min-height: var(--
|
|
661
|
+
min-height: var(--_autocomplete-min-height);
|
|
659
662
|
justify-content: flex-start;
|
|
660
663
|
align-items: center;
|
|
661
|
-
padding: var(--
|
|
662
|
-
font-size: var(--
|
|
664
|
+
padding: var(--_autocomplete-padding-block) var(--_autocomplete-padding-inline);
|
|
665
|
+
font-size: var(--_autocomplete-item-font-size);
|
|
663
666
|
line-height: 1.23;
|
|
664
667
|
font-weight: 500;
|
|
665
668
|
color: var(--color-text-control-primary-default);
|
|
666
|
-
border-radius: var(--
|
|
669
|
+
border-radius: var(--_autocomplete-border-radius);
|
|
667
670
|
}
|
|
668
671
|
|
|
669
672
|
.chipsContainer {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<div
|
|
36
36
|
ref="element"
|
|
37
37
|
:id="id"
|
|
38
|
+
data-ui3n="badge-simple"
|
|
38
39
|
:class="[$style.ui3nBadgeSimple, dot && $style.ui3nBadgeDot]"
|
|
39
40
|
>
|
|
40
41
|
<span
|
|
@@ -48,11 +49,11 @@
|
|
|
48
49
|
|
|
49
50
|
<style lang="scss" module>
|
|
50
51
|
.ui3nBadgeSimple {
|
|
51
|
-
--ui3n-badge-size
|
|
52
|
-
--ui3n-badge-dot-size
|
|
53
|
-
--ui3n-badge-padding-inline
|
|
54
|
-
--ui3n-badge-nodot-border-radius
|
|
55
|
-
--ui3n-badge-font-size
|
|
52
|
+
--_badge-size: var(--ui3n-badge-size, 20px);
|
|
53
|
+
--_badge-dot-size: var(--ui3n-badge-dot-size, 8px);
|
|
54
|
+
--_badge-padding-inline: var(--ui3n-badge-padding-inline, 6px);
|
|
55
|
+
--_badge-nodot-border-radius: var(--ui3n-badge-nodot-border-radius, 10px);
|
|
56
|
+
--_badge-font-size: var(--ui3n-badge-font-size, 12px);
|
|
56
57
|
|
|
57
58
|
position: relative;
|
|
58
59
|
box-sizing: border-box;
|
|
@@ -60,29 +61,29 @@
|
|
|
60
61
|
outline: 1px var(--color-bg-block-primary-default) solid;
|
|
61
62
|
|
|
62
63
|
&:not(.ui3nBadgeDot) {
|
|
63
|
-
min-height: var(--
|
|
64
|
-
height: var(--
|
|
64
|
+
min-height: var(--_badge-size);
|
|
65
|
+
height: var(--_badge-size);
|
|
65
66
|
width: max-content;
|
|
66
|
-
padding: 0 var(--
|
|
67
|
-
border-radius: var(--
|
|
67
|
+
padding: 0 var(--_badge-padding-inline);
|
|
68
|
+
border-radius: var(--_badge-nodot-border-radius);
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
.ui3nBadgeDot {
|
|
72
|
-
min-width: var(--
|
|
73
|
-
width: var(--
|
|
74
|
-
max-width: var(--
|
|
75
|
-
min-height: var(--
|
|
76
|
-
height: var(--
|
|
77
|
-
max-height: var(--
|
|
73
|
+
min-width: var(--_badge-dot-size);
|
|
74
|
+
width: var(--_badge-dot-size);
|
|
75
|
+
max-width: var(--_badge-dot-size);
|
|
76
|
+
min-height: var(--_badge-dot-size);
|
|
77
|
+
height: var(--_badge-dot-size);
|
|
78
|
+
max-height: var(--_badge-dot-size);
|
|
78
79
|
border-radius: 50%;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
.ui3nBadgeText {
|
|
82
83
|
display: block;
|
|
83
84
|
color: v-bind(textColor);
|
|
84
|
-
font-size: var(--
|
|
85
|
-
line-height: var(--
|
|
85
|
+
font-size: var(--_badge-font-size);
|
|
86
|
+
line-height: var(--_badge-size);
|
|
86
87
|
text-align: center;
|
|
87
88
|
}
|
|
88
89
|
</style>
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
<!-- eslint-disable vue/no-multiple-template-root -->
|
|
40
40
|
<div
|
|
41
41
|
v-if="hasDefaultSlot"
|
|
42
|
+
data-ui3n="badge"
|
|
42
43
|
:class="$style.ui3nBadge"
|
|
43
44
|
>
|
|
44
45
|
<div :class="$style.ui3nBadgeWrapper">
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
|
|
70
71
|
<style lang="scss" module>
|
|
71
72
|
.ui3nBadge {
|
|
72
|
-
--ui3n-badge-size
|
|
73
|
+
--_badge-size: var(--ui3n-badge-size, 20px);
|
|
73
74
|
|
|
74
75
|
position: relative;
|
|
75
76
|
}
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
.ui3nBadgeWrapper {
|
|
78
79
|
position: relative;
|
|
79
80
|
width: max-content;
|
|
80
|
-
min-width: var(--
|
|
81
|
+
min-width: var(--_badge-size);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
.ui3nBadgeContent {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
42
|
<div
|
|
43
|
+
data-ui3n="breadcrumb"
|
|
43
44
|
:class="cssClasses"
|
|
44
45
|
v-on="isActive && !(disabled || parentDisabled) ? { click: onClick } : {}"
|
|
45
46
|
>
|
|
@@ -65,11 +66,11 @@
|
|
|
65
66
|
|
|
66
67
|
<style lang="scss" module>
|
|
67
68
|
.ui3nBreadcrumb {
|
|
68
|
-
--ui3n-breadcrumb-font-size
|
|
69
|
-
--ui3n-breadcrumb-padding-inline
|
|
70
|
-
--ui3n-breadcrumb-separator-distance
|
|
71
|
-
--ui3n-breadcrumb-color-default
|
|
72
|
-
--ui3n-breadcrumb-color-selected
|
|
69
|
+
--_breadcrumb-font-size: var(--ui3n-breadcrumb-font-size, 16px);
|
|
70
|
+
--_breadcrumb-padding-inline: var(--ui3n-breadcrumb-padding-inline, 4px);
|
|
71
|
+
--_breadcrumb-separator-distance: var(--ui3n-breadcrumb-separator-distance, 8px);
|
|
72
|
+
--_breadcrumb-color-default: var(--ui3n-breadcrumb-color-default, var(--color-text-block-primary-default));
|
|
73
|
+
--_breadcrumb-color-selected: var(--ui3n-breadcrumb-color-selected, var(--color-text-block-accent-default));
|
|
73
74
|
|
|
74
75
|
display: flex;
|
|
75
76
|
align-items: center;
|
|
@@ -82,16 +83,16 @@
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.content {
|
|
85
|
-
font-size: var(--
|
|
86
|
+
font-size: var(--_breadcrumb-font-size);
|
|
86
87
|
line-height: 1.25;
|
|
87
|
-
color: var(--
|
|
88
|
+
color: var(--_breadcrumb-color-default);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
.ui3nBreadcrumbSeparator {
|
|
91
92
|
display: flex;
|
|
92
93
|
align-items: center;
|
|
93
|
-
margin: 0 var(--
|
|
94
|
-
padding-left: var(--
|
|
94
|
+
margin: 0 var(--_breadcrumb-separator-distance);
|
|
95
|
+
padding-left: var(--_breadcrumb-padding-inline);
|
|
95
96
|
color: var(--color-text-block-tertiary-default);
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
.content {
|
|
100
101
|
&:hover {
|
|
101
102
|
cursor: pointer;
|
|
102
|
-
color: var(--
|
|
103
|
+
color: var(--_breadcrumb-color-selected);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
}
|