vlite3 1.5.23 → 1.5.25
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/AppShell/AppShell.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager2.vue.js +3 -3
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -0
- package/components/ColorPicker/ColorPicker.vue.js +16 -14
- package/components/DatePicker.vue.d.ts +2 -0
- package/components/DatePicker.vue.js +19 -17
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +111 -106
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -0
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/{DropdownMenu3.vue.js → DropdownMenu2.vue.js} +24 -23
- package/components/Form/{AccordionView2.vue.js → AccordionView.vue.js} +1 -1
- package/components/Form/index2.vue.js +1 -1
- package/components/Modal.vue.d.ts +4 -0
- package/components/Modal.vue.js +2 -2
- package/components/Modal2.vue.js +59 -55
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover3.vue.js +2 -2
- package/components/RichTextEditor/RichTextToolbar3.vue.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +3 -3
- package/components/SidePanel.vue.d.ts +3 -1
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel2.vue.js +39 -37
- package/components/ThemeProvider/themeVars.js +115 -115
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/Tooltip.vue.d.ts +2 -0
- package/components/Tooltip.vue.js +13 -10
- package/composables/useOverlayPortal.d.ts +14 -0
- package/composables/useOverlayPortal.js +16 -0
- package/composables/useTheme.d.ts +2 -2
- package/composables/useTheme.js +64 -29
- package/docs/components/modal.md +18 -16
- package/docs-manifest.json +3 -3
- package/index.d.ts +1 -0
- package/index.js +334 -330
- package/package.json +2 -2
- package/style.css +193 -107
- /package/components/RichTextEditor/{RichTextLinkPopover2.vue.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar2.vue.js → RichTextToolbar.vue.js} +0 -0
|
@@ -10,12 +10,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ap
|
|
|
10
10
|
variant: import('../../types/appshell.type').AppShellVariant;
|
|
11
11
|
floating: boolean;
|
|
12
12
|
compact: boolean;
|
|
13
|
+
menuClass: string;
|
|
13
14
|
position: import('../../types/appshell.type').AppShellPosition;
|
|
14
15
|
contentClass: string;
|
|
15
16
|
centerPosition: import('../../types/appshell.type').AppShellCenterPosition;
|
|
16
17
|
glass: boolean;
|
|
17
18
|
mobileBreakpoint: "sm" | "md" | "lg" | "xl";
|
|
18
|
-
menuClass: string;
|
|
19
19
|
rightClass: string;
|
|
20
20
|
mobileTriggerClass: string;
|
|
21
21
|
mobileMenuVariant: "sidepanel" | "dropdown";
|
|
@@ -22,11 +22,11 @@ import "@vueuse/core";
|
|
|
22
22
|
/* empty css */
|
|
23
23
|
import qe from "../IconPicker.vue.js";
|
|
24
24
|
/* empty css */
|
|
25
|
-
/* empty css
|
|
25
|
+
/* empty css */
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
|
-
/* empty css
|
|
29
|
-
/* empty css
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
30
|
import "../../core/config.js";
|
|
31
31
|
/* empty css */
|
|
32
32
|
/* empty css */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TooltTipPlacement } from 'v-tooltip-lite/types';
|
|
2
2
|
import { ButtonProps, InputSize, InputVariant, InputRounded } from '../../types';
|
|
3
|
+
import { VLiteOverlayTarget } from '../../composables/useOverlayPortal';
|
|
3
4
|
interface Props {
|
|
4
5
|
modelValue?: string;
|
|
5
6
|
disabled?: boolean;
|
|
@@ -16,6 +17,8 @@ interface Props {
|
|
|
16
17
|
offset?: [number, number];
|
|
17
18
|
/** Whether the popover is teleported outside its DOM hierarchy. */
|
|
18
19
|
teleport?: boolean;
|
|
20
|
+
/** Optional destination for the teleported popover. */
|
|
21
|
+
teleportTarget?: VLiteOverlayTarget;
|
|
19
22
|
/** When true, shows a reset control that sets the value to `#0000` (transparent). */
|
|
20
23
|
allowReset?: boolean;
|
|
21
24
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as D, ref as w, computed as v, watch as d, openBlock as l, createBlock as c, unref as V, withCtx as h, createElementBlock as s, createVNode as r, createCommentVNode as n, renderSlot as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as D, ref as w, computed as v, watch as d, openBlock as l, createBlock as c, unref as V, withCtx as h, createElementBlock as s, createVNode as r, createCommentVNode as n, renderSlot as T, mergeProps as U, createElementVNode as f, normalizeStyle as C, toDisplayString as L, normalizeClass as N } from "vue";
|
|
2
|
+
import A from "../Dropdown/Dropdown.vue.js";
|
|
3
3
|
import z from "../Icon.vue.js";
|
|
4
4
|
import R from "../Input.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import "../../core/config.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
9
|
+
import g from "../Button.vue.js";
|
|
10
10
|
import F from "./ColorIro.vue.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { useEyeDropper as G } from "@vueuse/core";
|
|
13
|
-
import { COLOR_PICKER_RESET_VALUE as
|
|
13
|
+
import { COLOR_PICKER_RESET_VALUE as y } from "./constants.js";
|
|
14
14
|
const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text-foreground" }, J = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, M = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "p-1 w-max flex flex-col justify-center"
|
|
@@ -35,13 +35,14 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
35
35
|
isOpen: { type: Boolean, default: void 0 },
|
|
36
36
|
offset: { default: () => [0, 8] },
|
|
37
37
|
teleport: { type: Boolean, default: !0 },
|
|
38
|
+
teleportTarget: {},
|
|
38
39
|
allowReset: { type: Boolean, default: !1 }
|
|
39
40
|
},
|
|
40
41
|
emits: ["update:modelValue", "change", "reset", "update:isOpen", "open", "close"],
|
|
41
42
|
setup(t, { emit: O }) {
|
|
42
43
|
const o = t, i = O, m = w(o.isOpen ?? !1), B = v(() => o.isOpen ?? m.value), a = w(o.modelValue || "#000000"), x = v(() => {
|
|
43
44
|
const e = (o.modelValue || "").toLowerCase();
|
|
44
|
-
return !e || e ===
|
|
45
|
+
return !e || e === y;
|
|
45
46
|
}), u = v(() => o.allowReset && !o.disabled && !x.value), { isSupported: E, open: I, sRGBHex: $ } = G();
|
|
46
47
|
d($, (e) => {
|
|
47
48
|
e && (a.value = e);
|
|
@@ -71,22 +72,23 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
71
72
|
}, j = (e) => {
|
|
72
73
|
m.value = e, i("update:isOpen", e), i(e ? "open" : "close");
|
|
73
74
|
}, p = (e) => {
|
|
74
|
-
e?.stopPropagation(), e?.preventDefault(), !(!o.allowReset || o.disabled) && (x.value || (a.value =
|
|
75
|
+
e?.stopPropagation(), e?.preventDefault(), !(!o.allowReset || o.disabled) && (x.value || (a.value = y, i("reset", y)));
|
|
75
76
|
};
|
|
76
|
-
return (e, k) => (l(), c(V(
|
|
77
|
+
return (e, k) => (l(), c(V(A), {
|
|
77
78
|
disabled: t.disabled,
|
|
78
79
|
class: "w-full",
|
|
79
80
|
position: t.position,
|
|
80
81
|
offset: t.offset,
|
|
81
82
|
"is-open": t.isOpen,
|
|
82
83
|
teleport: t.teleport,
|
|
84
|
+
"teleport-target": t.teleportTarget,
|
|
83
85
|
searchable: !1,
|
|
84
86
|
"close-on-select": !1,
|
|
85
87
|
"onUpdate:isOpen": j
|
|
86
88
|
}, {
|
|
87
89
|
trigger: h(({ isOpen: b }) => [
|
|
88
|
-
|
|
89
|
-
t.trigger === "button" ? (l(), c(
|
|
90
|
+
T(e.$slots, "trigger", { isOpen: b }, () => [
|
|
91
|
+
t.trigger === "button" ? (l(), c(g, U({
|
|
90
92
|
key: 0,
|
|
91
93
|
style: { backgroundColor: t.modelValue }
|
|
92
94
|
}, {
|
|
@@ -107,7 +109,7 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
107
109
|
class: "h-5 w-5 shrink-0 rounded-full border border-black/10 shadow-sm dark:border-white/15",
|
|
108
110
|
style: C({ backgroundColor: t.modelValue })
|
|
109
111
|
}, null, 4),
|
|
110
|
-
f("span", q,
|
|
112
|
+
f("span", q, L(t.modelValue), 1),
|
|
111
113
|
u.value ? (l(), s("span", {
|
|
112
114
|
key: 0,
|
|
113
115
|
role: "button",
|
|
@@ -123,7 +125,7 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
123
125
|
])) : n("", !0)
|
|
124
126
|
], 8, K)) : (l(), s("div", {
|
|
125
127
|
key: 2,
|
|
126
|
-
class:
|
|
128
|
+
class: N(["w-full relative cursor-pointer", [t.disabled ? "opacity-50 pointer-events-none" : ""]])
|
|
127
129
|
}, [
|
|
128
130
|
r(R, {
|
|
129
131
|
"model-value": t.modelValue,
|
|
@@ -167,7 +169,7 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
167
169
|
}, {
|
|
168
170
|
bottom: h(() => [
|
|
169
171
|
t.showInput || t.allowReset ? (l(), s("div", Q, [
|
|
170
|
-
t.showInput && V(E) ? (l(), c(
|
|
172
|
+
t.showInput && V(E) ? (l(), c(g, {
|
|
171
173
|
key: 0,
|
|
172
174
|
onClick: P,
|
|
173
175
|
icon: "pepicons-pop:color-picker",
|
|
@@ -186,7 +188,7 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
186
188
|
"input-class": "font-mono text-xs uppercase "
|
|
187
189
|
}, null, 8, ["modelValue"])
|
|
188
190
|
])) : n("", !0),
|
|
189
|
-
u.value ? (l(), c(
|
|
191
|
+
u.value ? (l(), c(g, {
|
|
190
192
|
key: 2,
|
|
191
193
|
onClick: p,
|
|
192
194
|
icon: "lucide:rotate-ccw",
|
|
@@ -203,7 +205,7 @@ const K = ["disabled", "aria-label"], q = { class: "min-w-0 flex-1 truncate text
|
|
|
203
205
|
])) : n("", !0)
|
|
204
206
|
]),
|
|
205
207
|
_: 3
|
|
206
|
-
}, 8, ["disabled", "position", "offset", "is-open", "teleport"]));
|
|
208
|
+
}, 8, ["disabled", "position", "offset", "is-open", "teleport", "teleport-target"]));
|
|
207
209
|
}
|
|
208
210
|
});
|
|
209
211
|
export {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatePickerMode } from 'v-datepicker-lite/types';
|
|
2
2
|
import { ButtonSize, ButtonVariant } from '../types';
|
|
3
|
+
import { VLiteOverlayTarget } from '../composables/useOverlayPortal';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
placeholder?: string;
|
|
5
6
|
placeholderI18n?: string;
|
|
@@ -17,6 +18,7 @@ type __VLS_Props = {
|
|
|
17
18
|
variant?: ButtonVariant;
|
|
18
19
|
btnProps?: any;
|
|
19
20
|
teleport?: boolean;
|
|
21
|
+
teleportTarget?: VLiteOverlayTarget;
|
|
20
22
|
minuteInterval?: number;
|
|
21
23
|
timeFormat?: '12h' | '24h';
|
|
22
24
|
disabled?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as p, computed as m, openBlock as w, createBlock as $, unref as D, withCtx as
|
|
1
|
+
import { defineComponent as p, computed as m, openBlock as w, createBlock as $, unref as D, withCtx as g, createElementVNode as z, createVNode as h, renderSlot as B, mergeProps as x } from "vue";
|
|
2
2
|
import P from "./Button.vue.js";
|
|
3
3
|
import L from "./Dropdown/Dropdown.vue.js";
|
|
4
4
|
import "@iconify/vue";
|
|
5
5
|
import "../icons/IconRegistry.js";
|
|
6
|
-
import { $t as
|
|
6
|
+
import { $t as T } from "../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
@@ -25,19 +25,20 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
25
25
|
variant: {},
|
|
26
26
|
btnProps: {},
|
|
27
27
|
teleport: { type: Boolean, default: !0 },
|
|
28
|
+
teleportTarget: {},
|
|
28
29
|
minuteInterval: { default: 5 },
|
|
29
30
|
timeFormat: { default: "12h" },
|
|
30
31
|
disabled: { type: Boolean },
|
|
31
32
|
readonly: { type: Boolean }
|
|
32
33
|
},
|
|
33
34
|
emits: ["update:modelValue", "change"],
|
|
34
|
-
setup(t, { emit:
|
|
35
|
-
const r = t, y =
|
|
35
|
+
setup(t, { emit: V }) {
|
|
36
|
+
const r = t, y = V, a = m({
|
|
36
37
|
get: () => r.modelValue ?? r.value,
|
|
37
38
|
set: (e) => {
|
|
38
39
|
y("update:modelValue", e), y("change", e);
|
|
39
40
|
}
|
|
40
|
-
}),
|
|
41
|
+
}), I = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, u = (e) => {
|
|
41
42
|
if (!e) return null;
|
|
42
43
|
if (e instanceof Date)
|
|
43
44
|
return isNaN(e.getTime()) ? null : new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
@@ -101,7 +102,7 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
101
102
|
}
|
|
102
103
|
const e = new Date(a.value);
|
|
103
104
|
if (isNaN(e.getTime())) return String(a.value);
|
|
104
|
-
const n = r.mode === "dateTime" &&
|
|
105
|
+
const n = r.mode === "dateTime" && I(a.value);
|
|
105
106
|
return e.toLocaleDateString("en-US", {
|
|
106
107
|
month: "short",
|
|
107
108
|
day: "numeric",
|
|
@@ -112,9 +113,9 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
112
113
|
return String(a.value);
|
|
113
114
|
}
|
|
114
115
|
}), v = m(() => {
|
|
115
|
-
if (r.placeholderI18n) return
|
|
116
|
+
if (r.placeholderI18n) return T(r.placeholderI18n);
|
|
116
117
|
if (r.placeholder !== void 0) return r.placeholder;
|
|
117
|
-
const e =
|
|
118
|
+
const e = T("vlite.datePicker.placeholder");
|
|
118
119
|
return e !== "vlite.datePicker.placeholder" ? e : "Select date";
|
|
119
120
|
}), S = (e) => {
|
|
120
121
|
if (r.mode === "week") {
|
|
@@ -135,20 +136,21 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
a.value = e;
|
|
138
|
-
},
|
|
139
|
+
}, N = m(() => r.mode === "week" && a.value && typeof a.value == "object" && (a.value.startDate || a.value.start) || a.value);
|
|
139
140
|
return (e, n) => t.mode !== "time" ? (w(), $(D(L), {
|
|
140
141
|
key: 0,
|
|
141
142
|
class: "w-full",
|
|
142
143
|
maxHeight: "max-h-[500px]",
|
|
143
144
|
teleport: t.teleport,
|
|
145
|
+
"teleport-target": t.teleportTarget,
|
|
144
146
|
disabled: t.disabled || t.readonly
|
|
145
147
|
}, {
|
|
146
|
-
trigger:
|
|
148
|
+
trigger: g(() => [
|
|
147
149
|
B(e.$slots, "default", {
|
|
148
150
|
value: a.value,
|
|
149
151
|
displayValue: f.value
|
|
150
152
|
}, () => [
|
|
151
|
-
|
|
153
|
+
h(P, x({
|
|
152
154
|
text: f.value?.replace("-", "—") || v.value,
|
|
153
155
|
variant: t.variant || "outline",
|
|
154
156
|
size: t.size || "md",
|
|
@@ -160,10 +162,10 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
160
162
|
}), null, 16, ["text", "variant", "size", "icon", "disabled", "data-testid"])
|
|
161
163
|
])
|
|
162
164
|
]),
|
|
163
|
-
default:
|
|
165
|
+
default: g(() => [
|
|
164
166
|
z("div", C, [
|
|
165
|
-
|
|
166
|
-
value:
|
|
167
|
+
h(D(U), {
|
|
168
|
+
value: N.value,
|
|
167
169
|
mode: t.mode,
|
|
168
170
|
"min-date": t.minDate,
|
|
169
171
|
"max-date": t.maxDate,
|
|
@@ -178,7 +180,7 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
178
180
|
])
|
|
179
181
|
]),
|
|
180
182
|
_: 3
|
|
181
|
-
}, 8, ["teleport", "disabled"])) : (w(), $(D(j), {
|
|
183
|
+
}, 8, ["teleport", "teleport-target", "disabled"])) : (w(), $(D(j), {
|
|
182
184
|
key: 1,
|
|
183
185
|
"model-value": a.value,
|
|
184
186
|
"onUpdate:modelValue": [
|
|
@@ -195,8 +197,8 @@ const C = { class: "overflow-hidden min-w-[300px]" }, K = /* @__PURE__ */ p({
|
|
|
195
197
|
disabled: t.disabled,
|
|
196
198
|
readonly: t.readonly
|
|
197
199
|
}, {
|
|
198
|
-
default:
|
|
199
|
-
|
|
200
|
+
default: g(() => [
|
|
201
|
+
h(P, x({
|
|
200
202
|
text: f.value || v.value,
|
|
201
203
|
variant: t.variant || "outline",
|
|
202
204
|
size: t.size || "md",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IDropdownOption, ButtonProps } from '../../types';
|
|
2
2
|
import { TooltTipPlacement } from 'v-tooltip-lite/types';
|
|
3
|
+
import { VLiteOverlayTarget } from '../../composables/useOverlayPortal';
|
|
3
4
|
export type DropdownDirection = 'ltr' | 'rtl' | 'auto';
|
|
4
5
|
type __VLS_Props = {
|
|
5
6
|
selected?: any;
|
|
@@ -16,6 +17,7 @@ type __VLS_Props = {
|
|
|
16
17
|
offset?: [number, number];
|
|
17
18
|
isOpen?: boolean;
|
|
18
19
|
teleport?: boolean;
|
|
20
|
+
teleportTarget?: VLiteOverlayTarget;
|
|
19
21
|
selectedIndex?: number | null;
|
|
20
22
|
maxHeight?: string;
|
|
21
23
|
width?: string;
|