vlite3 1.5.5 → 1.5.6
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 +34 -0
- package/VLiteIconsVite.d.ts +36 -0
- package/components/AppShell/AppShell.vue.d.ts +1 -1
- package/components/AppShell/AppShellLayoutDashboard.vue.js +3 -2
- package/components/AppShell/AppShellLayoutDock.vue.js +3 -2
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +28 -27
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +3 -2
- package/components/AsyncSelect/createAsyncSelect.d.ts +4 -4
- package/components/AsyncSelect/createAsyncSelect.js +3 -2
- package/components/BackButton.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager.vue2.js +16 -16
- package/components/CategoryManager/CategoryNode.vue.js +16 -16
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -8
- package/components/Chart/BarChart.vue.d.ts +1 -1
- package/components/Chart/GanttChart.vue.d.ts +1 -1
- package/components/Chart/LineChart.vue.d.ts +1 -1
- package/components/Chart/TimelineChart.vue.d.ts +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/ConfirmationModal.vue.d.ts +4 -0
- package/components/ConfirmationModal.vue.js +47 -39
- package/components/DataTable/DataTable.vue.js +319 -294
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +2 -2
- package/components/DataTable/DataTableRow.vue2.js +57 -54
- package/components/DataTable/types.d.ts +2 -0
- package/components/DatePicker.vue.js +5 -4
- package/components/Empty/Empty.vue.js +3 -2
- package/components/ExportData/ExportData.vue.d.ts +1 -1
- package/components/Form/Form.vue2.js +44 -43
- package/components/Form/FormField.vue.js +24 -24
- package/components/Heatmap/Heatmap.vue2.js +3 -2
- package/components/Icon.vue.d.ts +3 -2
- package/components/Icon.vue.js +22 -12
- package/components/IconPicker.vue.js +5 -133
- package/components/IconPicker.vue2.js +218 -2
- package/components/ImportData/ImportData.vue.js +3 -2
- package/components/ImportData/ImportStep2.vue.js +3 -2
- package/components/Kanban/KanbanBoard.vue2.js +4 -2
- package/components/List/utils.js +5 -4
- package/components/Masonry/Masonry.vue2.js +14 -13
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/Price/Price.vue.js +13 -12
- package/components/Rating/Rating.vue.js +2 -2
- package/components/Rating/Rating.vue2.js +41 -41
- package/components/Rating/ReviewSummary.vue.js +20 -20
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +7 -5
- package/components/Screen/components/ScreenExportModal.vue.d.ts +2 -2
- package/components/Stats/StatItem.vue.js +3 -2
- package/components/StatusChip/StatusChip.vue.js +6 -5
- package/components/Workbook/Sheet.vue.js +11 -11
- package/core/config.d.ts +28 -0
- package/core/config.js +23 -21
- package/core/index.js +18 -17
- package/icons/IconRegistry.d.ts +38 -0
- package/icons/IconRegistry.js +166 -0
- package/icons/IconTypes.d.ts +37 -0
- package/index.d.ts +2 -0
- package/index.js +473 -457
- package/package.json +15 -3
- package/style.css +1 -1
- package/types/config.type.d.ts +8 -1
- package/utils/functions.js +44 -43
- package/utils/index.d.ts +1 -0
- package/vite.d.ts +6 -0
- package/vite.js +223 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as k, ref as M, computed as z, openBlock as c, createElementBlock as r, normalizeClass as d, Fragment as N, renderList as S, createVNode as h, createElementVNode as x, normalizeStyle as T, renderSlot as $, createTextVNode as I, toDisplayString as y, createCommentVNode as A } from "vue";
|
|
2
|
+
import g from "../Icon.vue.js";
|
|
3
|
+
const E = ["onMousemove", "onClick"], F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "ml-2 text-sm text-foreground/80 font-medium whitespace-nowrap"
|
|
6
|
-
},
|
|
6
|
+
}, H = { class: "text-xs text-muted-foreground font-normal" }, p = /* @__PURE__ */ k({
|
|
7
7
|
__name: "Rating",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: { default: 0 },
|
|
@@ -22,71 +22,71 @@ const F = ["onMousemove", "onClick"], H = {
|
|
|
22
22
|
class: {}
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue", "change", "hover"],
|
|
25
|
-
setup(t, { emit:
|
|
26
|
-
const
|
|
25
|
+
setup(t, { emit: w }) {
|
|
26
|
+
const a = t, s = w, n = M(0), u = z(() => n.value > 0 ? n.value : a.modelValue), m = {
|
|
27
27
|
sm: "w-4 h-4",
|
|
28
28
|
md: "w-5 h-5",
|
|
29
29
|
lg: "w-6 h-6",
|
|
30
30
|
xl: "w-8 h-8"
|
|
31
31
|
}, v = (o, e) => {
|
|
32
|
-
const
|
|
33
|
-
return Array.isArray(
|
|
34
|
-
},
|
|
35
|
-
if (!(
|
|
36
|
-
if (
|
|
32
|
+
const l = e === "active" ? a.activeIcon : a.icon;
|
|
33
|
+
return Array.isArray(l) ? l[Math.min(o - 1, l.length - 1)] : l;
|
|
34
|
+
}, C = (o, e) => {
|
|
35
|
+
if (!(a.readonly || a.disabled))
|
|
36
|
+
if (a.allowHalf) {
|
|
37
37
|
const i = o.currentTarget.getBoundingClientRect(), f = o.clientX - i.left < i.width / 2 ? e - 0.5 : e;
|
|
38
38
|
n.value !== f && (n.value = f, s("hover", f));
|
|
39
39
|
} else
|
|
40
40
|
n.value !== e && (n.value = e, s("hover", e));
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
if (
|
|
41
|
+
}, V = () => {
|
|
42
|
+
a.readonly || a.disabled || (n.value = 0, s("hover", 0));
|
|
43
|
+
}, b = (o) => {
|
|
44
|
+
if (a.readonly || a.disabled) return;
|
|
45
45
|
let e = n.value || o;
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
const e =
|
|
46
|
+
a.clearable && a.modelValue === e && (e = 0), s("update:modelValue", e), s("change", e);
|
|
47
|
+
}, B = (o) => {
|
|
48
|
+
const e = u.value - o + 1;
|
|
49
49
|
return e >= 1 ? 100 : e > 0 ? e * 100 : 0;
|
|
50
50
|
};
|
|
51
|
-
return (o, e) => (
|
|
52
|
-
class:
|
|
53
|
-
onMouseleave:
|
|
51
|
+
return (o, e) => (c(), r("div", {
|
|
52
|
+
class: d(["inline-flex items-center gap-1.5", [a.class, { "opacity-50 cursor-not-allowed": t.disabled }]]),
|
|
53
|
+
onMouseleave: V
|
|
54
54
|
}, [
|
|
55
|
-
(
|
|
56
|
-
key:
|
|
57
|
-
class:
|
|
55
|
+
(c(!0), r(N, null, S(t.max, (l) => (c(), r("div", {
|
|
56
|
+
key: l,
|
|
57
|
+
class: d(["relative flex items-center justify-center isolate transition-transform", {
|
|
58
58
|
"cursor-pointer hover:scale-110 active:scale-95": !t.readonly && !t.disabled,
|
|
59
59
|
"cursor-default pointer-events-none": t.readonly || t.disabled
|
|
60
60
|
}]),
|
|
61
|
-
onMousemove: (i) =>
|
|
62
|
-
onClick: (i) =>
|
|
61
|
+
onMousemove: (i) => C(i, l),
|
|
62
|
+
onClick: (i) => b(l)
|
|
63
63
|
}, [
|
|
64
|
-
h(
|
|
65
|
-
icon: v(
|
|
66
|
-
class:
|
|
64
|
+
h(g, {
|
|
65
|
+
icon: v(l, "inactive"),
|
|
66
|
+
class: d([m[t.size], t.inactiveColor])
|
|
67
67
|
}, null, 8, ["icon", "class"]),
|
|
68
|
-
|
|
68
|
+
x("div", {
|
|
69
69
|
class: "absolute inset-0 overflow-hidden",
|
|
70
|
-
style: T({ width: `${
|
|
70
|
+
style: T({ width: `${B(l)}%` })
|
|
71
71
|
}, [
|
|
72
|
-
h(
|
|
73
|
-
icon: v(
|
|
74
|
-
class:
|
|
72
|
+
h(g, {
|
|
73
|
+
icon: v(l, "active"),
|
|
74
|
+
class: d([m[t.size], t.activeColor, { "is-solid": t.solid }])
|
|
75
75
|
}, null, 8, ["icon", "class"])
|
|
76
76
|
], 4)
|
|
77
|
-
], 42,
|
|
77
|
+
], 42, E))), 128)),
|
|
78
78
|
$(o.$slots, "text", {
|
|
79
|
-
value:
|
|
79
|
+
value: u.value,
|
|
80
80
|
max: t.max
|
|
81
81
|
}, () => [
|
|
82
|
-
t.showText ? (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
])) :
|
|
82
|
+
t.showText ? (c(), r("span", F, [
|
|
83
|
+
I(y(u.value) + " ", 1),
|
|
84
|
+
x("span", H, "/ " + y(t.max), 1)
|
|
85
|
+
])) : A("", !0)
|
|
86
86
|
], !0)
|
|
87
87
|
], 34));
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
export {
|
|
91
|
-
|
|
91
|
+
p as default
|
|
92
92
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as h, computed as u, openBlock as l, createElementBlock as i, normalizeClass as d, createElementVNode as r, toDisplayString as s, Fragment as m, renderList as f, createVNode as g, createCommentVNode as w, createTextVNode as _, normalizeStyle as b } from "vue";
|
|
2
|
+
import x from "../Icon.vue.js";
|
|
3
|
+
const y = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-full shrink-0" }, k = { class: "text-5xl font-bold tracking-tighter text-foreground" }, R = { class: "flex items-center gap-1 mt-3 text-amber-400" }, D = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-sm text-muted-foreground mt-2 font-medium"
|
|
6
|
-
},
|
|
6
|
+
}, N = { class: "flex flex-col gap-2 w-full flex-grow" }, B = { class: "flex items-center gap-1 text-sm font-medium text-foreground min-w-[70px]" }, C = { class: "h-3.5 bg-muted rounded-full w-full overflow-hidden flex-grow shrink-0 relative shadow-inner" }, T = { class: "text-sm font-medium text-muted-foreground text-right min-w-[36px]" }, z = /* @__PURE__ */ h({
|
|
7
7
|
__name: "ReviewSummary",
|
|
8
8
|
props: {
|
|
9
9
|
ratingDistribution: {},
|
|
@@ -13,21 +13,21 @@ const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-fu
|
|
|
13
13
|
class: {}
|
|
14
14
|
},
|
|
15
15
|
setup(c) {
|
|
16
|
-
const e = c,
|
|
16
|
+
const e = c, v = u(() => [...e.ratingDistribution].sort((n, o) => o.rating - n.rating)), a = u(() => {
|
|
17
17
|
if (e.averageRating !== void 0) return e.averageRating;
|
|
18
18
|
if (e.ratingDistribution.length === 0) return 0;
|
|
19
19
|
let n = 0, o = 0;
|
|
20
20
|
for (const t of e.ratingDistribution)
|
|
21
21
|
t.count !== void 0 && (n += t.rating * t.count, o += t.count);
|
|
22
22
|
return o > 0 ? Number((n / o).toFixed(1)) : 0;
|
|
23
|
-
}),
|
|
23
|
+
}), p = u(() => e.totalReviews !== void 0 ? e.totalReviews : e.ratingDistribution.reduce((n, o) => n + (o.count || 0), 0));
|
|
24
24
|
return (n, o) => (l(), i("div", {
|
|
25
25
|
class: d(["flex flex-col sm:flex-row gap-6 md:gap-10 items-start w-full", e.class])
|
|
26
26
|
}, [
|
|
27
|
-
r("div",
|
|
28
|
-
r("div",
|
|
29
|
-
r("div",
|
|
30
|
-
(l(), i(m, null, f(5, (t) => g(x
|
|
27
|
+
r("div", y, [
|
|
28
|
+
r("div", k, s(a.value), 1),
|
|
29
|
+
r("div", R, [
|
|
30
|
+
(l(), i(m, null, f(5, (t) => g(x, {
|
|
31
31
|
key: t,
|
|
32
32
|
icon: "lucide:star",
|
|
33
33
|
class: d(["w-5 h-5 transition-all", {
|
|
@@ -36,32 +36,32 @@ const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-fu
|
|
|
36
36
|
}])
|
|
37
37
|
}, null, 8, ["class"])), 64))
|
|
38
38
|
]),
|
|
39
|
-
c.showTotal ? (l(), i("p",
|
|
39
|
+
c.showTotal ? (l(), i("p", D, " Based on " + s(p.value) + " global ratings ", 1)) : w("", !0)
|
|
40
40
|
]),
|
|
41
|
-
r("div",
|
|
42
|
-
(l(!0), i(m, null, f(
|
|
41
|
+
r("div", N, [
|
|
42
|
+
(l(!0), i(m, null, f(v.value, (t) => (l(), i("div", {
|
|
43
43
|
key: t.rating,
|
|
44
44
|
class: "flex items-center gap-3 w-full"
|
|
45
45
|
}, [
|
|
46
|
-
r("div",
|
|
47
|
-
|
|
48
|
-
g(x
|
|
46
|
+
r("div", B, [
|
|
47
|
+
_(s(t.rating) + " ", 1),
|
|
48
|
+
g(x, {
|
|
49
49
|
icon: "lucide:star",
|
|
50
50
|
class: "w-4 h-4 text-amber-400 fill-amber-400"
|
|
51
51
|
})
|
|
52
52
|
]),
|
|
53
|
-
r("div",
|
|
53
|
+
r("div", C, [
|
|
54
54
|
r("div", {
|
|
55
55
|
class: "h-full bg-amber-400 rounded-full transition-all duration-1000 ease-out",
|
|
56
|
-
style:
|
|
56
|
+
style: b({ width: `${t.percentage}%` })
|
|
57
57
|
}, null, 4)
|
|
58
58
|
]),
|
|
59
|
-
r("div",
|
|
59
|
+
r("div", T, s(t.percentage) + "% ", 1)
|
|
60
60
|
]))), 128))
|
|
61
61
|
])
|
|
62
62
|
], 2));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
z as default
|
|
67
67
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./RichTextToolbar.
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./RichTextLinkPopover.
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -17,22 +17,24 @@ import "v-datepicker-lite/style.css";
|
|
|
17
17
|
/* empty css */
|
|
18
18
|
import "@jaames/iro";
|
|
19
19
|
import "@vueuse/core";
|
|
20
|
-
/* empty css
|
|
20
|
+
/* empty css */
|
|
21
21
|
import "iconify-icon-picker";
|
|
22
22
|
import "iconify-icon-picker/style.css";
|
|
23
|
+
import "../../icons/IconRegistry.js";
|
|
24
|
+
/* empty css */
|
|
23
25
|
/* empty css */
|
|
24
26
|
/* empty css */
|
|
25
27
|
/* empty css */
|
|
26
28
|
/* empty css */
|
|
27
|
-
/* empty css
|
|
28
|
-
/* empty css
|
|
29
|
+
/* empty css */
|
|
30
|
+
/* empty css */
|
|
29
31
|
import "../../core/config.js";
|
|
30
32
|
/* empty css */
|
|
31
33
|
/* empty css */
|
|
32
34
|
const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
|
|
33
35
|
class: "pt-2 px-2 min-w-[295px]",
|
|
34
36
|
style: { "will-change": "transform", contain: "layout style" }
|
|
35
|
-
},
|
|
37
|
+
}, fe = /* @__PURE__ */ $({
|
|
36
38
|
__name: "ScreenFilter",
|
|
37
39
|
props: {
|
|
38
40
|
schema: {},
|
|
@@ -195,5 +197,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
195
197
|
}
|
|
196
198
|
});
|
|
197
199
|
export {
|
|
198
|
-
|
|
200
|
+
fe as default
|
|
199
201
|
};
|
|
@@ -19,8 +19,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
19
19
|
icon: string;
|
|
20
20
|
}[]>;
|
|
21
21
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
22
|
-
title: string;
|
|
23
22
|
mode: "frontend" | "backend";
|
|
23
|
+
title: string;
|
|
24
24
|
buttonText: string;
|
|
25
25
|
buttonIcon: string;
|
|
26
26
|
formats: import('../../ExportData').ExportFormat[];
|
|
@@ -39,8 +39,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
39
39
|
icon: string;
|
|
40
40
|
}[]>;
|
|
41
41
|
}, {}, {}, {}, {
|
|
42
|
-
title: string;
|
|
43
42
|
mode: "frontend" | "backend";
|
|
43
|
+
title: string;
|
|
44
44
|
buttonText: string;
|
|
45
45
|
buttonIcon: string;
|
|
46
46
|
formats: import('../../ExportData').ExportFormat[];
|
|
@@ -6,6 +6,7 @@ import z from "./components/StatIconBox.vue.js";
|
|
|
6
6
|
import S from "../Tooltip.vue.js";
|
|
7
7
|
import E from "../Chart/LineChart.vue.js";
|
|
8
8
|
import { configState as L } from "../../core/config.js";
|
|
9
|
+
import "../../icons/IconRegistry.js";
|
|
9
10
|
import { resolveColor as q } from "../Chart/utils.js";
|
|
10
11
|
const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w-0" }, J = {
|
|
11
12
|
key: 0,
|
|
@@ -37,7 +38,7 @@ const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w
|
|
|
37
38
|
}, p = { class: "flex-1 flex flex-col justify-center min-w-0" }, _ = { class: "flex items-baseline gap-2 mt-1" }, tt = {
|
|
38
39
|
key: 0,
|
|
39
40
|
class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
40
|
-
},
|
|
41
|
+
}, mt = /* @__PURE__ */ M({
|
|
41
42
|
__name: "StatItem",
|
|
42
43
|
props: {
|
|
43
44
|
item: {},
|
|
@@ -415,5 +416,5 @@ const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w
|
|
|
415
416
|
}
|
|
416
417
|
});
|
|
417
418
|
export {
|
|
418
|
-
|
|
419
|
+
mt as default
|
|
419
420
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as u, computed as l, openBlock as c, createBlock as
|
|
1
|
+
import { defineComponent as u, computed as l, openBlock as c, createBlock as p, unref as f, normalizeClass as m } from "vue";
|
|
2
2
|
import d from "../Chip/Chip.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { resolveStatus as v } from "./status-map.js";
|
|
5
5
|
import { $t as b } from "../../utils/i18n.js";
|
|
6
6
|
import { useVLiteConfig as h } from "../../core/config.js";
|
|
7
|
-
|
|
7
|
+
import "../../icons/IconRegistry.js";
|
|
8
|
+
const k = /* @__PURE__ */ u({
|
|
8
9
|
__name: "StatusChip",
|
|
9
10
|
props: {
|
|
10
11
|
status: {},
|
|
@@ -15,8 +16,8 @@ const S = /* @__PURE__ */ u({
|
|
|
15
16
|
class: { default: "" }
|
|
16
17
|
},
|
|
17
18
|
setup(a) {
|
|
18
|
-
const e = a, s = h(),
|
|
19
|
-
return (
|
|
19
|
+
const e = a, s = h(), o = l(() => s?.components?.statusChip), i = l(() => e.hideIcon !== null ? e.hideIcon : o.value?.hideIcon ?? !1), t = l(() => v(e.status, o.value?.customStatuses)), r = l(() => e.labelI18n ? b(e.labelI18n) : t.value.label ? t.value.label : e.label ? e.label : e.status.replace(/[_\-]+/g, " ").replace(/\b\w/g, (n) => n.toUpperCase()));
|
|
20
|
+
return (n, I) => (c(), p(f(d), {
|
|
20
21
|
text: r.value,
|
|
21
22
|
variant: t.value.variant,
|
|
22
23
|
icon: i.value ? void 0 : t.value.icon,
|
|
@@ -26,5 +27,5 @@ const S = /* @__PURE__ */ u({
|
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
k as default
|
|
30
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as I, ref as b, computed as v, openBlock as r, createElementBlock as d, normalizeClass as
|
|
1
|
+
import { defineComponent as I, ref as b, computed as v, openBlock as r, createElementBlock as d, normalizeClass as S, createElementVNode as u, withModifiers as a, createBlock as $, withCtx as x, createVNode as m, createCommentVNode as V, withDirectives as j, withKeys as g, vModelText as z, toDisplayString as K, unref as M, nextTick as N } from "vue";
|
|
2
2
|
import y from "../Icon.vue.js";
|
|
3
3
|
import O from "../Dropdown/Dropdown.vue.js";
|
|
4
4
|
import { $t as l } from "../../utils/i18n.js";
|
|
@@ -7,13 +7,13 @@ import { $t as l } from "../../utils/i18n.js";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
import R from "../Button.vue.js";
|
|
9
9
|
import A from "../IconPicker.vue.js";
|
|
10
|
-
const
|
|
10
|
+
const P = {
|
|
11
11
|
type: "button",
|
|
12
12
|
class: "flex items-center justify-center rounded hover:bg-accent transition-colors p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-primary/20 mt-1"
|
|
13
|
-
},
|
|
13
|
+
}, U = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "flex items-center justify-center p-0.5"
|
|
16
|
-
},
|
|
16
|
+
}, q = { class: "flex-1 min-w-0 pr-1" }, F = ["onKeydown"], G = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "block truncate text-sm font-medium leading-normal"
|
|
19
19
|
}, ee = /* @__PURE__ */ I({
|
|
@@ -88,7 +88,7 @@ const U = {
|
|
|
88
88
|
e.isEditing ? "cursor-text" : ""
|
|
89
89
|
].filter(Boolean).join(" "));
|
|
90
90
|
return (n, t) => (r(), d("div", {
|
|
91
|
-
class:
|
|
91
|
+
class: S(E.value),
|
|
92
92
|
onClick: t[5] || (t[5] = (c) => o("select", i.sheet.id)),
|
|
93
93
|
onDblclick: h
|
|
94
94
|
}, [
|
|
@@ -97,14 +97,14 @@ const U = {
|
|
|
97
97
|
}, ["stop"])),
|
|
98
98
|
class: "mr-2 flex items-center shrink-0"
|
|
99
99
|
}, [
|
|
100
|
-
(i.sheet.icon || i.isEditing) && i.allowIconChange ? (r(),
|
|
100
|
+
(i.sheet.icon || i.isEditing) && i.allowIconChange ? (r(), $(A, {
|
|
101
101
|
key: 0,
|
|
102
102
|
value: i.sheet.icon || "lucide:file",
|
|
103
103
|
position: "bottom-start",
|
|
104
104
|
onOnSelect: t[0] || (t[0] = (c) => o("update:icon", i.sheet.id, c))
|
|
105
105
|
}, {
|
|
106
106
|
default: x(() => [
|
|
107
|
-
u("button",
|
|
107
|
+
u("button", P, [
|
|
108
108
|
m(y, {
|
|
109
109
|
icon: i.sheet.icon || "lucide:file",
|
|
110
110
|
class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
|
|
@@ -112,14 +112,14 @@ const U = {
|
|
|
112
112
|
])
|
|
113
113
|
]),
|
|
114
114
|
_: 1
|
|
115
|
-
}, 8, ["value"])) : i.sheet.icon ? (r(), d("div",
|
|
115
|
+
}, 8, ["value"])) : i.sheet.icon ? (r(), d("div", U, [
|
|
116
116
|
m(y, {
|
|
117
117
|
icon: i.sheet.icon,
|
|
118
118
|
class: "w-4 h-4 opacity-70"
|
|
119
119
|
}, null, 8, ["icon"])
|
|
120
120
|
])) : V("", !0)
|
|
121
121
|
]),
|
|
122
|
-
u("div",
|
|
122
|
+
u("div", q, [
|
|
123
123
|
i.isEditing ? j((r(), d("input", {
|
|
124
124
|
key: 0,
|
|
125
125
|
ref_key: "inputRef",
|
|
@@ -134,9 +134,9 @@ const U = {
|
|
|
134
134
|
],
|
|
135
135
|
onClick: t[3] || (t[3] = a(() => {
|
|
136
136
|
}, ["stop"]))
|
|
137
|
-
}, null, 40,
|
|
137
|
+
}, null, 40, F)), [
|
|
138
138
|
[z, s.value]
|
|
139
|
-
]) : (r(), d("span",
|
|
139
|
+
]) : (r(), d("span", G, K(C.value), 1))
|
|
140
140
|
]),
|
|
141
141
|
u("div", {
|
|
142
142
|
class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 -mr-2 flex items-center",
|
package/core/config.d.ts
CHANGED
|
@@ -182,6 +182,20 @@ export declare const configState: {
|
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
184
|
scale: VLiteScale;
|
|
185
|
+
icons: {
|
|
186
|
+
mode: import('../index.ts').VLiteIconMode;
|
|
187
|
+
fallback: string | {
|
|
188
|
+
body: string;
|
|
189
|
+
left?: number;
|
|
190
|
+
top?: number;
|
|
191
|
+
width?: number;
|
|
192
|
+
height?: number;
|
|
193
|
+
rotate?: number;
|
|
194
|
+
hFlip?: boolean;
|
|
195
|
+
vFlip?: boolean;
|
|
196
|
+
};
|
|
197
|
+
warnOnMissing: boolean;
|
|
198
|
+
};
|
|
185
199
|
};
|
|
186
200
|
/**
|
|
187
201
|
* Helper to update the global configuration safely.
|
|
@@ -369,4 +383,18 @@ export declare function useVLiteConfig(): {
|
|
|
369
383
|
};
|
|
370
384
|
};
|
|
371
385
|
scale: VLiteScale;
|
|
386
|
+
icons: {
|
|
387
|
+
mode: import('../index.ts').VLiteIconMode;
|
|
388
|
+
fallback: string | {
|
|
389
|
+
body: string;
|
|
390
|
+
left?: number;
|
|
391
|
+
top?: number;
|
|
392
|
+
width?: number;
|
|
393
|
+
height?: number;
|
|
394
|
+
rotate?: number;
|
|
395
|
+
hFlip?: boolean;
|
|
396
|
+
vFlip?: boolean;
|
|
397
|
+
};
|
|
398
|
+
warnOnMissing: boolean;
|
|
399
|
+
};
|
|
372
400
|
};
|
package/core/config.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { deepMerge as
|
|
3
|
-
import { DEFAULT_VLITE_SCALE as
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { reactive as s, inject as r } from "vue";
|
|
2
|
+
import { deepMerge as a } from "../utils/object.js";
|
|
3
|
+
import { DEFAULT_VLITE_SCALE as f, applyVLiteScale as t, resolveVLiteScale as l } from "./CoreScale.js";
|
|
4
|
+
import { getVLiteIconConfig as m, configureVLiteIcons as g } from "../icons/IconRegistry.js";
|
|
5
|
+
const d = /* @__PURE__ */ Symbol("vlite-config"), p = {
|
|
6
|
+
scale: f,
|
|
7
|
+
icons: m(),
|
|
6
8
|
services: {},
|
|
7
9
|
components: {
|
|
8
10
|
form: {},
|
|
@@ -19,25 +21,25 @@ const l = /* @__PURE__ */ Symbol("vlite-config"), f = {
|
|
|
19
21
|
customStatuses: {}
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
|
-
},
|
|
23
|
-
function
|
|
24
|
-
const c = n(
|
|
25
|
-
...
|
|
26
|
-
...
|
|
24
|
+
}, e = s({ ...p });
|
|
25
|
+
function V(o) {
|
|
26
|
+
const { icons: c, ...i } = o, n = a(e, {
|
|
27
|
+
...i,
|
|
28
|
+
...o.scale === void 0 ? {} : { scale: l(o.scale) }
|
|
27
29
|
});
|
|
28
|
-
Object.assign(
|
|
30
|
+
Object.assign(e, n), c !== void 0 && (e.icons = g(c)), o.scale !== void 0 && (e.scale = t(e.scale));
|
|
29
31
|
}
|
|
30
|
-
function
|
|
31
|
-
const c = o
|
|
32
|
-
return
|
|
32
|
+
function C(o) {
|
|
33
|
+
const c = t(o);
|
|
34
|
+
return e.scale = c, c;
|
|
33
35
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
36
|
+
function I() {
|
|
37
|
+
return r(d, e);
|
|
36
38
|
}
|
|
37
39
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
d as VLITE_CONFIG_KEY,
|
|
41
|
+
e as configState,
|
|
42
|
+
C as setVLiteScale,
|
|
43
|
+
V as updateConfig,
|
|
44
|
+
I as useVLiteConfig
|
|
43
45
|
};
|
package/core/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { configState as e, VLITE_CONFIG_KEY as o } from "./config.js";
|
|
2
|
-
import { setVLiteScale as
|
|
3
|
-
import { initializeVLiteScale as
|
|
4
|
-
import { DEFAULT_VLITE_SCALE as
|
|
5
|
-
|
|
2
|
+
import { setVLiteScale as L, updateConfig as f, useVLiteConfig as u } from "./config.js";
|
|
3
|
+
import { initializeVLiteScale as m } from "./CoreScale.js";
|
|
4
|
+
import { DEFAULT_VLITE_SCALE as g, VLITE_SCALE_ATTRIBUTE as V, VLITE_SCALE_STORAGE_KEY as E, applyVLiteScale as C, getStoredVLiteScale as v, isVLiteScale as D, resolveVLiteScale as T } from "./CoreScale.js";
|
|
5
|
+
import { configureVLiteIcons as s } from "../icons/IconRegistry.js";
|
|
6
|
+
function r(t = {}) {
|
|
6
7
|
return {
|
|
7
8
|
install(c) {
|
|
8
|
-
e.scale =
|
|
9
|
+
e.icons = s(t.icons), e.scale = m(t.scale), t && (t.services && (e.services = { ...e.services, ...t.services }), t.importData && (e.importData = { ...e.importData, ...t.importData }), t.exportData && (e.exportData = { ...e.exportData, ...t.exportData }), t.components && (e.components = {
|
|
9
10
|
...e.components,
|
|
10
11
|
...t.components,
|
|
11
12
|
form: {
|
|
@@ -53,18 +54,18 @@ function n(t = {}) {
|
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
g as DEFAULT_VLITE_SCALE,
|
|
57
58
|
o as VLITE_CONFIG_KEY,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
V as VLITE_SCALE_ATTRIBUTE,
|
|
60
|
+
E as VLITE_SCALE_STORAGE_KEY,
|
|
61
|
+
C as applyVLiteScale,
|
|
61
62
|
e as configState,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
r as createVLite,
|
|
64
|
+
v as getStoredVLiteScale,
|
|
65
|
+
m as initializeVLiteScale,
|
|
66
|
+
D as isVLiteScale,
|
|
67
|
+
T as resolveVLiteScale,
|
|
68
|
+
L as setVLiteScale,
|
|
69
|
+
f as updateConfig,
|
|
70
|
+
u as useVLiteConfig
|
|
70
71
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IconifyIcon } from '@iconify/vue';
|
|
2
|
+
import { ResolvedVLiteIconsConfig, VLiteIconCollection, VLiteIconListOptions, VLiteIconRegistrationResult, VLiteIconsConfig, VLiteIconSource } from './IconTypes';
|
|
3
|
+
export declare function isVLiteIconName(name: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Register one Iconify icon in the same module registry used by VLite's Icon.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerVLiteIcon(name: string, data: IconifyIcon): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Register one complete or partial IconifyJSON collection.
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerVLiteIconCollection(collection: VLiteIconCollection): VLiteIconRegistrationResult;
|
|
12
|
+
export declare function registerVLiteIconCollections(collections: VLiteIconCollection | readonly VLiteIconCollection[]): VLiteIconRegistrationResult;
|
|
13
|
+
/**
|
|
14
|
+
* Register the data-bearing part of an icon configuration without changing
|
|
15
|
+
* the current online/hybrid/offline resolution strategy.
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerVLiteIcons(registration: Pick<VLiteIconsConfig, 'collections' | 'individualIcons'>): VLiteIconRegistrationResult;
|
|
18
|
+
/**
|
|
19
|
+
* Configure resolution and synchronously register supplied local data.
|
|
20
|
+
*/
|
|
21
|
+
export declare function configureVLiteIcons(config?: VLiteIconsConfig): ResolvedVLiteIconsConfig;
|
|
22
|
+
export declare function getVLiteIconConfig(): ResolvedVLiteIconsConfig;
|
|
23
|
+
export declare function hasVLiteIcon(name: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve only explicitly VLite-registered local data. This never loads.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveVLiteIcon(name: string): Required<IconifyIcon> | null;
|
|
28
|
+
export declare function listVLiteIcons(options?: VLiteIconListOptions): string[];
|
|
29
|
+
export declare function warnOnMissingVLiteIcon(name: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the value passed to Iconify's Vue renderer. Offline mode returns
|
|
32
|
+
* icon data (or null) only, so unresolved names never reach its API loader.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveVLiteIconForRendering(icon: VLiteIconSource): VLiteIconSource | null;
|
|
35
|
+
/**
|
|
36
|
+
* Serialize a registered icon for IconPicker's existing SVG event payload.
|
|
37
|
+
*/
|
|
38
|
+
export declare function renderVLiteIconSvg(name: string): string;
|