vlite3 1.5.11 → 1.5.12
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/components/CategoryManager/CategoryManager2.vue.js +1 -1
- package/components/Form/{AccordionView.vue.js → AccordionView2.vue.js} +1 -1
- package/components/Form/index2.vue.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Splitter/Splitter.vue.d.ts +7 -0
- package/components/Splitter/Splitter.vue.js +33 -29
- package/package.json +2 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, computed as d, openBlock as n, createElementBlock as R, createElementVNode as x, createBlock as s, withCtx as k, createTextVNode as B, toDisplayString as I, createCommentVNode as y, unref as l } from "vue";
|
|
2
2
|
import T from "./TableView.vue.js";
|
|
3
|
-
import C from "./
|
|
3
|
+
import C from "./AccordionView2.vue.js";
|
|
4
4
|
import U from "../Label.vue.js";
|
|
5
5
|
import z from "../Button.vue.js";
|
|
6
6
|
import { useCustomFieldRows as N } from "./composables/useCustomFieldRows.js";
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
1
2
|
interface Props {
|
|
2
3
|
layout?: 'horizontal' | 'vertical';
|
|
3
4
|
modelValue?: number;
|
|
4
5
|
min?: number;
|
|
5
6
|
max?: number;
|
|
6
7
|
class?: string;
|
|
8
|
+
/** Additional CSS classes for the splitter line (resize handle). */
|
|
9
|
+
lineClass?: string;
|
|
10
|
+
/** Inline styles for the splitter line (resize handle). */
|
|
11
|
+
lineStyle?: CSSProperties;
|
|
7
12
|
}
|
|
8
13
|
declare function __VLS_template(): {
|
|
9
14
|
attrs: Partial<{}>;
|
|
@@ -27,6 +32,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
27
32
|
modelValue: number;
|
|
28
33
|
min: number;
|
|
29
34
|
max: number;
|
|
35
|
+
lineStyle: CSSProperties;
|
|
36
|
+
lineClass: string;
|
|
30
37
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
31
38
|
containerRef: HTMLDivElement;
|
|
32
39
|
}, HTMLDivElement>;
|
|
@@ -1,64 +1,68 @@
|
|
|
1
|
-
import { defineComponent as L, ref as f, computed as w, onUnmounted as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as L, ref as f, computed as w, onUnmounted as _, openBlock as $, createElementBlock as C, normalizeClass as v, createElementVNode as u, normalizeStyle as h, renderSlot as p } from "vue";
|
|
2
|
+
const k = /* @__PURE__ */ L({
|
|
3
3
|
__name: "Splitter",
|
|
4
4
|
props: {
|
|
5
5
|
layout: { default: "horizontal" },
|
|
6
6
|
modelValue: { default: 50 },
|
|
7
7
|
min: { default: 10 },
|
|
8
8
|
max: { default: 90 },
|
|
9
|
-
class: { default: "" }
|
|
9
|
+
class: { default: "" },
|
|
10
|
+
lineClass: { default: "" },
|
|
11
|
+
lineStyle: { default: void 0 }
|
|
10
12
|
},
|
|
11
13
|
emits: ["update:modelValue"],
|
|
12
14
|
setup(g, { emit: z }) {
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
const E = w(() =>
|
|
16
|
-
|
|
17
|
-
}, s = (
|
|
18
|
-
!
|
|
19
|
-
const
|
|
15
|
+
const e = g, x = z, c = f(null), r = f(!1), o = f(e.modelValue);
|
|
16
|
+
let n = null;
|
|
17
|
+
const E = w(() => e.layout === "horizontal" ? { width: `${o.value}%` } : { height: `${o.value}%` }), S = w(() => e.layout === "horizontal" ? { width: `${100 - o.value}%` } : { height: `${100 - o.value}%` }), y = (t) => {
|
|
18
|
+
t.cancelable && t.type !== "touchstart" && t.preventDefault(), r.value = !0, document.body.style.cursor = e.layout === "horizontal" ? "col-resize" : "row-resize", document.body.style.userSelect = "none", window.addEventListener("mousemove", s, { passive: !1 }), window.addEventListener("mouseup", a), window.addEventListener("touchmove", s, { passive: !1 }), window.addEventListener("touchend", a);
|
|
19
|
+
}, s = (t) => {
|
|
20
|
+
!r.value || !c.value || (t.cancelable && t.preventDefault(), n && cancelAnimationFrame(n), n = requestAnimationFrame(() => {
|
|
21
|
+
const i = c.value.getBoundingClientRect();
|
|
20
22
|
let d, m;
|
|
21
|
-
window.TouchEvent &&
|
|
22
|
-
let
|
|
23
|
-
|
|
23
|
+
window.TouchEvent && t instanceof TouchEvent ? (d = t.touches[0].clientX, m = t.touches[0].clientY) : (d = t.clientX, m = t.clientY);
|
|
24
|
+
let l = 0;
|
|
25
|
+
e.layout === "horizontal" ? l = (d - i.left) / i.width * 100 : l = (m - i.top) / i.height * 100, l < e.min && (l = e.min), l > e.max && (l = e.max), o.value = l, x("update:modelValue", l);
|
|
24
26
|
}));
|
|
25
27
|
}, a = () => {
|
|
26
|
-
|
|
28
|
+
r.value = !1, document.body.style.cursor = "", document.body.style.userSelect = "", n && (cancelAnimationFrame(n), n = null), window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", a), window.removeEventListener("touchmove", s), window.removeEventListener("touchend", a);
|
|
27
29
|
};
|
|
28
|
-
return
|
|
30
|
+
return _(() => {
|
|
29
31
|
a();
|
|
30
|
-
}), (
|
|
32
|
+
}), (t, i) => ($(), C("div", {
|
|
31
33
|
ref_key: "containerRef",
|
|
32
34
|
ref: c,
|
|
33
|
-
class: v(["flex w-full h-full overflow-hidden", [
|
|
35
|
+
class: v(["flex w-full h-full overflow-hidden", [e.layout === "vertical" ? "flex-col" : "flex-row", e.class]])
|
|
34
36
|
}, [
|
|
35
37
|
u("div", {
|
|
36
38
|
class: "relative overflow-hidden",
|
|
37
|
-
style:
|
|
39
|
+
style: h([{ "will-change": "transform", contain: "layout style" }, E.value])
|
|
38
40
|
}, [
|
|
39
|
-
p(
|
|
41
|
+
p(t.$slots, "start")
|
|
40
42
|
], 4),
|
|
41
43
|
u("div", {
|
|
42
|
-
class: v(["flex items-center justify-center bg-border/40 hover:bg-gray-150 transition-colors z-10 shrink-0 touch-none", [
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
class: v(["vl-splitter__line flex items-center justify-center bg-border/40 hover:bg-gray-150 transition-colors z-10 shrink-0 touch-none", [
|
|
45
|
+
e.layout === "horizontal" ? "w-1.5 cursor-col-resize h-full mx-px" : "h-1.5 cursor-row-resize w-full my-px",
|
|
46
|
+
r.value ? "bg-gray-200" : "",
|
|
47
|
+
e.lineClass
|
|
45
48
|
]]),
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
style: h(e.lineStyle),
|
|
50
|
+
onMousedown: y,
|
|
51
|
+
onTouchstart: y
|
|
48
52
|
}, [
|
|
49
53
|
u("div", {
|
|
50
|
-
class: v(["bg-gray-300 rounded-full",
|
|
54
|
+
class: v(["bg-gray-300 rounded-full", e.layout === "horizontal" ? "h-8 w-0.5" : "w-8 h-0.5"])
|
|
51
55
|
}, null, 2)
|
|
52
|
-
],
|
|
56
|
+
], 38),
|
|
53
57
|
u("div", {
|
|
54
58
|
class: "relative overflow-hidden flex-1",
|
|
55
|
-
style:
|
|
59
|
+
style: h([{ "will-change": "transform", contain: "layout style" }, S.value])
|
|
56
60
|
}, [
|
|
57
|
-
p(
|
|
61
|
+
p(t.$slots, "end")
|
|
58
62
|
], 4)
|
|
59
63
|
], 2));
|
|
60
64
|
}
|
|
61
65
|
});
|
|
62
66
|
export {
|
|
63
|
-
|
|
67
|
+
k as default
|
|
64
68
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A Vue 3 UI component library built with Tailwind CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.5.
|
|
6
|
+
"version": "1.5.12",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"module": "index.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"./utils/*": "./utils/*"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"@iconify/vue": "^4.1.2 || ^5.0.0",
|
|
48
49
|
"@jaames/iro": "^5.5.2",
|
|
49
50
|
"@tailwindcss/vite": "^4.1.18",
|
|
50
51
|
"@types/file-saver": "^2.0.7",
|
|
@@ -73,7 +74,6 @@
|
|
|
73
74
|
"xlsx": "^0.18.5"
|
|
74
75
|
},
|
|
75
76
|
"peerDependencies": {
|
|
76
|
-
"@iconify/vue": "^4.1.2 || ^5.0.0",
|
|
77
77
|
"vite": "^6.0.0 || ^7.0.0",
|
|
78
78
|
"vue": "^3.5.24"
|
|
79
79
|
},
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@iconify/vue": "^5.0.0",
|
|
87
86
|
"@types/jsbarcode": "^3.11.4",
|
|
88
87
|
"@types/node": "^25.0.10",
|
|
89
88
|
"@types/qrcode": "^1.5.6",
|