vlite3 1.5.17 → 1.5.19
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 +2 -2
- package/components/EditableTitle/EditableTitle.vue.d.ts +182 -2
- package/components/EditableTitle/EditableTitle.vue.js +2 -2
- package/components/EditableTitle/EditableTitle2.vue.js +226 -195
- 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 +2 -2
- package/components/Workbook/Sheet.vue.d.ts +34 -2
- package/components/Workbook/Sheet.vue.js +119 -86
- package/components/Workbook/Workbook.vue.d.ts +10 -0
- package/components/Workbook/Workbook.vue.js +2 -2
- package/components/Workbook/Workbook2.vue.js +133 -99
- package/components/Workbook/types.d.ts +28 -0
- package/docs/README.md +1 -0
- package/docs/component-index.md +5 -2
- package/docs/components/editable-title.md +52 -7
- package/docs/components/workbook.md +92 -0
- package/docs/design.md +220 -0
- package/docs-manifest.json +9 -6
- package/package.json +1 -1
- package/style.css +1 -1
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover2.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar2.vue.js} +0 -0
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as Be, useSlots as Ie, shallowRef as C, computed as n, watch as H, onMounted as _e, onBeforeUnmount as Ae, openBlock as r, createElementBlock as c, normalizeStyle as Se, normalizeClass as p, withModifiers as X, createBlock as Ve, withCtx as ze, createElementVNode as M, createVNode as x, createCommentVNode as m, toDisplayString as Ee, renderSlot as ee, nextTick as v } from "vue";
|
|
2
|
+
import j from "../Icon.vue.js";
|
|
3
|
+
import te from "../Button.vue.js";
|
|
4
|
+
import De from "../Input.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import Pe from "../IconPicker.vue.js";
|
|
7
|
+
const He = ["data-editing", "data-create", "data-variant", "data-size"], Me = ["disabled"], je = ["disabled"], Le = {
|
|
8
8
|
key: 2,
|
|
9
|
-
class: "inline-flex items-center justify-center",
|
|
9
|
+
class: "inline-flex h-full w-full items-center justify-center",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
11
|
+
}, Re = ["aria-hidden"], We = {
|
|
12
12
|
key: 0,
|
|
13
|
-
class: "vl-editable-title__input
|
|
14
|
-
},
|
|
15
|
-
key:
|
|
13
|
+
class: "vl-editable-title__input absolute inset-0 flex min-w-0 items-center"
|
|
14
|
+
}, $e = {
|
|
15
|
+
key: 2,
|
|
16
16
|
class: "vl-editable-title__actions flex shrink-0 items-center gap-0.5"
|
|
17
|
-
},
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "vl-editable-title__action flex items-center justify-center"
|
|
20
|
-
}, Pe = {
|
|
17
|
+
}, Fe = {
|
|
21
18
|
key: 1,
|
|
22
19
|
class: "vl-editable-title__action flex items-center justify-center"
|
|
23
|
-
},
|
|
20
|
+
}, Ne = {
|
|
21
|
+
key: 2,
|
|
22
|
+
class: "vl-editable-title__action flex items-center justify-center"
|
|
23
|
+
}, le = "lucide:file-text", Ge = /* @__PURE__ */ Be({
|
|
24
24
|
__name: "EditableTitle",
|
|
25
25
|
props: {
|
|
26
26
|
modelValue: { default: "" },
|
|
27
|
-
icon: { default:
|
|
27
|
+
icon: { default: le },
|
|
28
28
|
showIcon: { type: Boolean, default: !0 },
|
|
29
29
|
canChangeIcon: { type: Boolean, default: !0 },
|
|
30
30
|
iconPickerPosition: { default: "bottom-start" },
|
|
@@ -45,84 +45,93 @@ const Be = ["data-editing", "data-create", "data-variant", "data-size"], Te = ["
|
|
|
45
45
|
class: { default: "" }
|
|
46
46
|
},
|
|
47
47
|
emits: ["update:modelValue", "update:icon", "edit-start", "change", "save", "create", "cancel", "delete", "focus", "blur"],
|
|
48
|
-
setup(
|
|
49
|
-
const
|
|
48
|
+
setup(i, { expose: ne, emit: ae }) {
|
|
49
|
+
const ie = {
|
|
50
50
|
sm: {
|
|
51
|
-
root: "gap-
|
|
52
|
-
icon: "h-
|
|
53
|
-
|
|
51
|
+
root: "gap-1 px-2.5 py-1.5 rounded-xl",
|
|
52
|
+
icon: "h-4 w-4",
|
|
53
|
+
// Match Button as-icon xs (h-6.5) so idle rows are not shorter than hovered ones.
|
|
54
|
+
iconHit: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
|
|
54
55
|
title: "text-sm font-medium leading-5 tracking-normal",
|
|
56
|
+
inputTitle: "text-sm! font-medium! leading-5! tracking-normal! placeholder:text-sm! placeholder:font-medium! placeholder:leading-5!",
|
|
55
57
|
button: "xs",
|
|
56
|
-
|
|
58
|
+
actionHit: "h-6.5 min-h-6.5"
|
|
57
59
|
},
|
|
58
60
|
md: {
|
|
59
|
-
root: "gap-
|
|
61
|
+
root: "gap-1.5 px-3.5 py-2.5 rounded-2xl",
|
|
60
62
|
icon: "h-4 w-4",
|
|
61
|
-
iconHit: "h-7 w-7",
|
|
63
|
+
iconHit: "h-7 w-7 min-h-7 min-w-7",
|
|
62
64
|
title: "text-base font-medium leading-6 tracking-normal",
|
|
65
|
+
inputTitle: "text-base! font-medium! leading-6! tracking-normal! placeholder:text-base! placeholder:font-medium! placeholder:leading-6!",
|
|
63
66
|
button: "xs",
|
|
64
|
-
|
|
67
|
+
actionHit: "h-6.5 min-h-6.5"
|
|
65
68
|
},
|
|
66
69
|
lg: {
|
|
67
|
-
root: "gap-
|
|
70
|
+
root: "gap-2 px-4 py-3 rounded-2xl",
|
|
68
71
|
icon: "h-5 w-5",
|
|
69
|
-
iconHit: "h-8 w-8",
|
|
72
|
+
iconHit: "h-8 w-8 min-h-8 min-w-8",
|
|
70
73
|
title: "text-lg font-medium leading-7 tracking-normal",
|
|
74
|
+
inputTitle: "text-lg! font-medium! leading-7! tracking-normal! placeholder:text-lg! placeholder:font-medium! placeholder:leading-7!",
|
|
71
75
|
button: "sm",
|
|
72
|
-
|
|
76
|
+
actionHit: "h-7.5 min-h-7.5"
|
|
73
77
|
}
|
|
74
|
-
},
|
|
78
|
+
}, oe = {
|
|
75
79
|
background: "bg-muted text-foreground transition-colors hover:bg-muted/80 focus-within:bg-muted/80",
|
|
76
80
|
transparent: "bg-transparent text-foreground"
|
|
77
|
-
}, e =
|
|
78
|
-
let
|
|
79
|
-
const B =
|
|
81
|
+
}, e = i, o = ae, L = Ie(), l = C(!1), s = C(e.modelValue ?? ""), R = C(null), y = C(!1), W = C(null);
|
|
82
|
+
let T = !1, u = !1, k = null, w = null;
|
|
83
|
+
const B = n(
|
|
80
84
|
() => e.editable && !e.disabled && !e.readonly && !e.create
|
|
81
|
-
), b =
|
|
85
|
+
), b = n(
|
|
82
86
|
() => e.showIcon && e.canChangeIcon && !e.disabled && !e.readonly
|
|
83
|
-
),
|
|
87
|
+
), $ = n(
|
|
84
88
|
() => e.canDelete && !e.disabled && !e.readonly && !e.create
|
|
85
|
-
),
|
|
89
|
+
), F = n(() => !!L["actions-before"]), N = n(() => !!L["actions-after"]), ue = n(
|
|
90
|
+
() => B.value || $.value || F.value || N.value
|
|
91
|
+
), O = n(() => B.value && !l.value), V = n(() => $.value && !l.value), U = n(() => F.value && !l.value), q = n(() => N.value && !l.value), re = n(
|
|
92
|
+
() => O.value || V.value || U.value || q.value
|
|
93
|
+
), I = n(() => e.icon || le), d = n(() => ie[e.size]), se = n(() => e.maxWidth === void 0 || e.maxWidth === null || e.maxWidth === "" ? void 0 : { maxWidth: typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth }), ce = n(
|
|
86
94
|
() => [
|
|
87
95
|
"vl-editable-title group/editable-title relative flex w-full min-w-0 items-center",
|
|
88
|
-
|
|
89
|
-
|
|
96
|
+
d.value.root,
|
|
97
|
+
oe[e.variant],
|
|
90
98
|
e.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
91
99
|
l.value ? "vl-editable-title--editing" : "",
|
|
92
100
|
e.create ? "vl-editable-title--create" : "",
|
|
93
101
|
e.class
|
|
94
102
|
].filter(Boolean).join(" ")
|
|
95
|
-
),
|
|
96
|
-
() => `${
|
|
97
|
-
),
|
|
103
|
+
), de = n(
|
|
104
|
+
() => `${d.value.title} text-foreground text-start`
|
|
105
|
+
), fe = n(
|
|
98
106
|
() => [
|
|
99
|
-
|
|
107
|
+
d.value.inputTitle,
|
|
108
|
+
"text-foreground! text-start! placeholder:text-muted-foreground!",
|
|
100
109
|
"h-auto! min-h-0! max-h-none! py-0! px-0! border-none! bg-transparent! shadow-none!",
|
|
101
110
|
"ring-0! focus-visible:ring-0! focus-visible:border-transparent!",
|
|
102
111
|
"rounded-none!"
|
|
103
112
|
].join(" ")
|
|
104
|
-
),
|
|
105
|
-
function
|
|
106
|
-
|
|
113
|
+
), K = n(() => e.modelValue ?? ""), ve = n(() => l.value ? s.value || e.placeholder || " " : K.value || e.placeholder || " "), me = n(() => l.value ? !s.value && !!e.placeholder : !K.value && !!e.placeholder);
|
|
114
|
+
function h() {
|
|
115
|
+
k != null && (clearTimeout(k), k = null);
|
|
107
116
|
}
|
|
108
117
|
function z() {
|
|
109
|
-
|
|
118
|
+
w != null && (clearTimeout(w), w = null);
|
|
110
119
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
120
|
+
function _() {
|
|
121
|
+
T = !0, h(), z();
|
|
113
122
|
}
|
|
114
|
-
function
|
|
115
|
-
z(),
|
|
116
|
-
|
|
123
|
+
function E() {
|
|
124
|
+
z(), w = setTimeout(() => {
|
|
125
|
+
w = null, T = !1;
|
|
117
126
|
}, 0);
|
|
118
127
|
}
|
|
119
|
-
function
|
|
120
|
-
!b.value ||
|
|
128
|
+
function A() {
|
|
129
|
+
!b.value || y.value || (y.value = !0);
|
|
121
130
|
}
|
|
122
|
-
function
|
|
131
|
+
function D(t = !0) {
|
|
123
132
|
const a = () => {
|
|
124
|
-
const
|
|
125
|
-
return
|
|
133
|
+
const f = R.value;
|
|
134
|
+
return f ? (f.focus(), t && f.select(), !0) : !1;
|
|
126
135
|
};
|
|
127
136
|
v(() => {
|
|
128
137
|
a() || requestAnimationFrame(() => {
|
|
@@ -132,21 +141,21 @@ const Be = ["data-editing", "data-create", "data-variant", "data-size"], Te = ["
|
|
|
132
141
|
});
|
|
133
142
|
});
|
|
134
143
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
144
|
+
function Y(t) {
|
|
145
|
+
h(), u = !0, s.value = e.modelValue ?? "", l.value = !0, t.emitEditStart && o("edit-start"), D(t.select), v(() => {
|
|
137
146
|
u = !1;
|
|
138
147
|
});
|
|
139
148
|
}
|
|
140
|
-
function
|
|
141
|
-
!e.create || e.disabled || e.readonly || l.value || u ||
|
|
149
|
+
function Z() {
|
|
150
|
+
!e.create || e.disabled || e.readonly || l.value || u || Y({ select: !1, emitEditStart: !1 });
|
|
142
151
|
}
|
|
143
|
-
function
|
|
144
|
-
!B.value || l.value || u ||
|
|
152
|
+
function P() {
|
|
153
|
+
!B.value || l.value || u || Y({ select: !0, emitEditStart: !0 });
|
|
145
154
|
}
|
|
146
|
-
function
|
|
155
|
+
function S(t = !1) {
|
|
147
156
|
if (!l.value || u) return;
|
|
148
|
-
|
|
149
|
-
const a =
|
|
157
|
+
h(), u = !0;
|
|
158
|
+
const a = s.value.trim();
|
|
150
159
|
if (e.create) {
|
|
151
160
|
if (!a) {
|
|
152
161
|
t && (l.value = !1, o("cancel")), v(() => {
|
|
@@ -154,219 +163,241 @@ const Be = ["data-editing", "data-create", "data-variant", "data-size"], Te = ["
|
|
|
154
163
|
});
|
|
155
164
|
return;
|
|
156
165
|
}
|
|
157
|
-
|
|
166
|
+
s.value = a, a !== (e.modelValue ?? "") && o("update:modelValue", a), o("create", a), l.value = !1, v(() => {
|
|
158
167
|
u = !1;
|
|
159
168
|
});
|
|
160
169
|
return;
|
|
161
170
|
}
|
|
162
|
-
const
|
|
163
|
-
|
|
171
|
+
const f = (e.modelValue ?? "").trim(), g = a.length > 0 ? a : f;
|
|
172
|
+
s.value = g, g !== (e.modelValue ?? "") && o("update:modelValue", g), o("change", g), o("save", g), l.value = !1, v(() => {
|
|
164
173
|
u = !1;
|
|
165
174
|
});
|
|
166
175
|
}
|
|
167
|
-
function
|
|
168
|
-
!l.value || u || (
|
|
176
|
+
function G() {
|
|
177
|
+
!l.value || u || (h(), u = !0, s.value = e.modelValue ?? "", l.value = !1, o("cancel"), v(() => {
|
|
169
178
|
u = !1;
|
|
170
179
|
}));
|
|
171
180
|
}
|
|
172
|
-
function
|
|
181
|
+
function be() {
|
|
173
182
|
if (l.value) {
|
|
174
|
-
|
|
183
|
+
D(!1);
|
|
175
184
|
return;
|
|
176
185
|
}
|
|
177
186
|
if (e.create) {
|
|
178
|
-
|
|
187
|
+
Z();
|
|
179
188
|
return;
|
|
180
189
|
}
|
|
181
|
-
B.value &&
|
|
190
|
+
B.value && P();
|
|
182
191
|
}
|
|
183
|
-
function
|
|
184
|
-
t.preventDefault(), t.stopPropagation(),
|
|
192
|
+
function he(t) {
|
|
193
|
+
t.preventDefault(), t.stopPropagation(), P();
|
|
185
194
|
}
|
|
186
|
-
function
|
|
187
|
-
t.preventDefault(), t.stopPropagation(),
|
|
195
|
+
function pe(t) {
|
|
196
|
+
t.preventDefault(), t.stopPropagation(), V.value && (_(), o("delete"), E());
|
|
197
|
+
}
|
|
198
|
+
function J(t) {
|
|
199
|
+
t.stopPropagation(), _();
|
|
200
|
+
}
|
|
201
|
+
function Q(t) {
|
|
202
|
+
t.stopPropagation(), E();
|
|
188
203
|
}
|
|
189
|
-
function
|
|
204
|
+
function ge(t) {
|
|
190
205
|
o("update:icon", t);
|
|
191
206
|
}
|
|
192
|
-
function
|
|
193
|
-
b.value && (
|
|
207
|
+
function xe() {
|
|
208
|
+
b.value && (_(), A());
|
|
194
209
|
}
|
|
195
|
-
function
|
|
196
|
-
b.value && (
|
|
197
|
-
|
|
210
|
+
function ye() {
|
|
211
|
+
b.value && (_(), A(), v(() => {
|
|
212
|
+
W.value?.click();
|
|
198
213
|
}));
|
|
199
214
|
}
|
|
200
|
-
function
|
|
215
|
+
function ke() {
|
|
201
216
|
v(() => {
|
|
202
|
-
l.value &&
|
|
217
|
+
l.value && D(!1), E();
|
|
203
218
|
});
|
|
204
219
|
}
|
|
205
|
-
function
|
|
220
|
+
function we(t) {
|
|
206
221
|
o("focus", t);
|
|
207
222
|
}
|
|
208
|
-
function
|
|
209
|
-
o("blur", t), !(!e.saveOnBlur ||
|
|
210
|
-
|
|
223
|
+
function Ce(t) {
|
|
224
|
+
o("blur", t), !(!e.saveOnBlur || T) && (h(), k = setTimeout(() => {
|
|
225
|
+
k = null, !(T || !l.value) && S(!0);
|
|
211
226
|
}, 0));
|
|
212
227
|
}
|
|
213
|
-
function
|
|
214
|
-
l.value && (t.key === "Enter" ? (t.preventDefault(),
|
|
228
|
+
function Te(t) {
|
|
229
|
+
l.value && (t.key === "Enter" ? (t.preventDefault(), S(!1)) : t.key === "Escape" && (t.preventDefault(), G()));
|
|
215
230
|
}
|
|
216
|
-
return
|
|
231
|
+
return H(
|
|
217
232
|
() => e.modelValue,
|
|
218
233
|
(t) => {
|
|
219
|
-
l.value || (
|
|
234
|
+
l.value || (s.value = t ?? "");
|
|
220
235
|
}
|
|
221
|
-
),
|
|
236
|
+
), H(
|
|
222
237
|
() => [e.disabled, e.readonly, e.editable],
|
|
223
|
-
([t, a,
|
|
224
|
-
!l.value || !(t || a || !e.create && !
|
|
238
|
+
([t, a, f]) => {
|
|
239
|
+
!l.value || !(t || a || !e.create && !f) || (h(), s.value = e.modelValue ?? "", l.value = !1, o("cancel"));
|
|
225
240
|
}
|
|
226
|
-
),
|
|
227
|
-
t || (
|
|
228
|
-
}),
|
|
229
|
-
e.create && (b.value && (
|
|
230
|
-
}),
|
|
231
|
-
|
|
232
|
-
}),
|
|
233
|
-
startEdit:
|
|
234
|
-
save: () =>
|
|
235
|
-
commit: () =>
|
|
236
|
-
cancel:
|
|
237
|
-
focus:
|
|
238
|
-
}), (t, a) => (
|
|
239
|
-
class:
|
|
240
|
-
style:
|
|
241
|
+
), H(b, (t) => {
|
|
242
|
+
t || (y.value = !1);
|
|
243
|
+
}), _e(() => {
|
|
244
|
+
e.create && (b.value && (y.value = !0), Z());
|
|
245
|
+
}), Ae(() => {
|
|
246
|
+
h(), z();
|
|
247
|
+
}), ne({
|
|
248
|
+
startEdit: P,
|
|
249
|
+
save: () => S(!1),
|
|
250
|
+
commit: () => S(!1),
|
|
251
|
+
cancel: G,
|
|
252
|
+
focus: be
|
|
253
|
+
}), (t, a) => (r(), c("div", {
|
|
254
|
+
class: p(ce.value),
|
|
255
|
+
style: Se(se.value),
|
|
241
256
|
"data-editing": l.value ? "true" : void 0,
|
|
242
|
-
"data-create":
|
|
243
|
-
"data-variant":
|
|
244
|
-
"data-size":
|
|
257
|
+
"data-create": i.create ? "true" : void 0,
|
|
258
|
+
"data-variant": i.variant,
|
|
259
|
+
"data-size": i.size
|
|
245
260
|
}, [
|
|
246
|
-
|
|
261
|
+
i.showIcon ? (r(), c("div", {
|
|
247
262
|
key: 0,
|
|
248
|
-
class: "vl-editable-title__icon flex shrink-0 items-center justify-center text-foreground",
|
|
249
|
-
onPointerenter:
|
|
250
|
-
onFocusin:
|
|
251
|
-
onMousedown:
|
|
252
|
-
onClick: a[0] || (a[0] =
|
|
263
|
+
class: p(["vl-editable-title__icon flex shrink-0 items-center justify-center text-foreground", d.value.iconHit]),
|
|
264
|
+
onPointerenter: A,
|
|
265
|
+
onFocusin: A,
|
|
266
|
+
onMousedown: xe,
|
|
267
|
+
onClick: a[0] || (a[0] = X(() => {
|
|
253
268
|
}, ["stop"]))
|
|
254
269
|
}, [
|
|
255
|
-
b.value &&
|
|
270
|
+
b.value && y.value ? (r(), Ve(Pe, {
|
|
256
271
|
key: 0,
|
|
257
|
-
value:
|
|
258
|
-
position:
|
|
259
|
-
onOnSelect:
|
|
260
|
-
onOnClose:
|
|
272
|
+
value: I.value,
|
|
273
|
+
position: i.iconPickerPosition,
|
|
274
|
+
onOnSelect: ge,
|
|
275
|
+
onOnClose: ke
|
|
261
276
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
|
|
277
|
+
default: ze(() => [
|
|
278
|
+
M("button", {
|
|
264
279
|
ref_key: "iconTriggerRef",
|
|
265
|
-
ref:
|
|
280
|
+
ref: W,
|
|
266
281
|
type: "button",
|
|
267
|
-
class:
|
|
282
|
+
class: "vl-editable-title__icon-trigger inline-flex h-full w-full items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
268
283
|
"aria-label": "Change icon",
|
|
269
|
-
disabled:
|
|
284
|
+
disabled: i.disabled
|
|
270
285
|
}, [
|
|
271
|
-
|
|
272
|
-
icon:
|
|
273
|
-
class:
|
|
286
|
+
x(j, {
|
|
287
|
+
icon: I.value,
|
|
288
|
+
class: p(d.value.icon),
|
|
274
289
|
"aria-hidden": "true"
|
|
275
290
|
}, null, 8, ["icon", "class"])
|
|
276
|
-
],
|
|
291
|
+
], 8, Me)
|
|
277
292
|
]),
|
|
278
293
|
_: 1
|
|
279
|
-
}, 8, ["value", "position"])) : b.value ? (
|
|
294
|
+
}, 8, ["value", "position"])) : b.value ? (r(), c("button", {
|
|
280
295
|
key: 1,
|
|
281
296
|
type: "button",
|
|
282
|
-
class:
|
|
297
|
+
class: "vl-editable-title__icon-trigger inline-flex h-full w-full items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
283
298
|
"aria-label": "Change icon",
|
|
284
|
-
disabled:
|
|
285
|
-
onClick:
|
|
299
|
+
disabled: i.disabled,
|
|
300
|
+
onClick: ye
|
|
286
301
|
}, [
|
|
287
|
-
|
|
288
|
-
icon:
|
|
289
|
-
class:
|
|
302
|
+
x(j, {
|
|
303
|
+
icon: I.value,
|
|
304
|
+
class: p(d.value.icon),
|
|
290
305
|
"aria-hidden": "true"
|
|
291
306
|
}, null, 8, ["icon", "class"])
|
|
292
|
-
],
|
|
293
|
-
|
|
294
|
-
icon:
|
|
295
|
-
class:
|
|
307
|
+
], 8, je)) : (r(), c("span", Le, [
|
|
308
|
+
x(j, {
|
|
309
|
+
icon: I.value,
|
|
310
|
+
class: p(d.value.icon)
|
|
296
311
|
}, null, 8, ["icon", "class"])
|
|
297
312
|
]))
|
|
298
|
-
],
|
|
299
|
-
|
|
300
|
-
class: "vl-editable-title__text
|
|
301
|
-
onKeydown:
|
|
313
|
+
], 34)) : m("", !0),
|
|
314
|
+
M("div", {
|
|
315
|
+
class: "vl-editable-title__text relative min-w-0 flex-1 contain-inline-size",
|
|
316
|
+
onKeydown: Te
|
|
302
317
|
}, [
|
|
303
|
-
|
|
304
|
-
class:
|
|
305
|
-
|
|
306
|
-
|
|
318
|
+
M("span", {
|
|
319
|
+
class: p(["vl-editable-title__label block min-w-0 truncate", [
|
|
320
|
+
de.value,
|
|
321
|
+
me.value ? "text-muted-foreground" : "",
|
|
307
322
|
l.value ? "invisible" : ""
|
|
308
323
|
]]),
|
|
309
324
|
"aria-hidden": l.value ? "true" : void 0
|
|
310
|
-
},
|
|
311
|
-
l.value ? (
|
|
312
|
-
|
|
325
|
+
}, Ee(ve.value), 11, Re),
|
|
326
|
+
l.value ? (r(), c("div", We, [
|
|
327
|
+
x(De, {
|
|
313
328
|
ref_key: "inputHostRef",
|
|
314
|
-
ref:
|
|
315
|
-
modelValue:
|
|
316
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
329
|
+
ref: R,
|
|
330
|
+
modelValue: s.value,
|
|
331
|
+
"onUpdate:modelValue": a[1] || (a[1] = (f) => s.value = f),
|
|
317
332
|
type: "text",
|
|
318
333
|
variant: "transparent",
|
|
319
|
-
size:
|
|
320
|
-
placeholder:
|
|
321
|
-
disabled:
|
|
334
|
+
size: i.size,
|
|
335
|
+
placeholder: i.placeholder,
|
|
336
|
+
disabled: i.disabled,
|
|
322
337
|
"show-clear-button": !1,
|
|
323
|
-
class: "!space-y-0 min-w-0 w-full",
|
|
324
|
-
"input-class":
|
|
325
|
-
onFocus:
|
|
326
|
-
onBlur:
|
|
327
|
-
onClick: a[2] || (a[2] =
|
|
338
|
+
class: "!m-0 !space-y-0 min-w-0 w-full h-full",
|
|
339
|
+
"input-class": fe.value,
|
|
340
|
+
onFocus: we,
|
|
341
|
+
onBlur: Ce,
|
|
342
|
+
onClick: a[2] || (a[2] = X(() => {
|
|
328
343
|
}, ["stop"]))
|
|
329
344
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "input-class"])
|
|
330
|
-
])) :
|
|
345
|
+
])) : m("", !0)
|
|
331
346
|
], 32),
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
347
|
+
ue.value ? (r(), c("div", {
|
|
348
|
+
key: 1,
|
|
349
|
+
class: p(["vl-editable-title__action-hit pointer-events-none w-0 min-w-0 shrink-0 overflow-hidden", d.value.actionHit]),
|
|
350
|
+
"aria-hidden": "true"
|
|
351
|
+
}, null, 2)) : m("", !0),
|
|
352
|
+
re.value ? (r(), c("div", $e, [
|
|
353
|
+
U.value ? (r(), c("div", {
|
|
354
|
+
key: 0,
|
|
355
|
+
class: "vl-editable-title__custom-actions flex shrink-0 items-center gap-0.5",
|
|
356
|
+
onMousedown: J,
|
|
357
|
+
onClick: Q
|
|
358
|
+
}, [
|
|
359
|
+
ee(t.$slots, "actions-before", {}, void 0, !0)
|
|
360
|
+
], 32)) : m("", !0),
|
|
361
|
+
O.value ? (r(), c("div", Fe, [
|
|
362
|
+
x(te, {
|
|
336
363
|
type: "button",
|
|
337
364
|
"as-icon": "",
|
|
338
365
|
variant: "ghost",
|
|
339
|
-
size:
|
|
366
|
+
size: d.value.button,
|
|
340
367
|
rounded: "md",
|
|
341
|
-
icon:
|
|
342
|
-
"aria-label":
|
|
343
|
-
disabled:
|
|
368
|
+
icon: i.editIcon,
|
|
369
|
+
"aria-label": i.editLabel,
|
|
370
|
+
disabled: i.disabled,
|
|
344
371
|
class: "vl-editable-title__action-btn text-foreground",
|
|
345
|
-
onClick:
|
|
346
|
-
}, null, 8, ["size", "icon", "aria-label", "disabled"])
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}, null, 2))
|
|
351
|
-
])) : C("", !0),
|
|
352
|
-
M.value ? (s(), f("div", Pe, [
|
|
353
|
-
w(Z, {
|
|
372
|
+
onClick: he
|
|
373
|
+
}, null, 8, ["size", "icon", "aria-label", "disabled"])
|
|
374
|
+
])) : m("", !0),
|
|
375
|
+
V.value ? (r(), c("div", Ne, [
|
|
376
|
+
x(te, {
|
|
354
377
|
type: "button",
|
|
355
378
|
"as-icon": "",
|
|
356
379
|
variant: "ghost",
|
|
357
|
-
size:
|
|
380
|
+
size: d.value.button,
|
|
358
381
|
rounded: "md",
|
|
359
|
-
icon:
|
|
360
|
-
"aria-label":
|
|
361
|
-
disabled:
|
|
382
|
+
icon: i.deleteIcon,
|
|
383
|
+
"aria-label": i.deleteLabel,
|
|
384
|
+
disabled: i.disabled,
|
|
362
385
|
class: "vl-editable-title__action-btn text-foreground",
|
|
363
|
-
onClick:
|
|
386
|
+
onClick: pe
|
|
364
387
|
}, null, 8, ["size", "icon", "aria-label", "disabled"])
|
|
365
|
-
])) :
|
|
366
|
-
|
|
367
|
-
|
|
388
|
+
])) : m("", !0),
|
|
389
|
+
q.value ? (r(), c("div", {
|
|
390
|
+
key: 3,
|
|
391
|
+
class: "vl-editable-title__custom-actions flex shrink-0 items-center gap-0.5",
|
|
392
|
+
onMousedown: J,
|
|
393
|
+
onClick: Q
|
|
394
|
+
}, [
|
|
395
|
+
ee(t.$slots, "actions-after", {}, void 0, !0)
|
|
396
|
+
], 32)) : m("", !0)
|
|
397
|
+
])) : m("", !0)
|
|
398
|
+
], 14, He));
|
|
368
399
|
}
|
|
369
400
|
});
|
|
370
401
|
export {
|
|
371
|
-
|
|
402
|
+
Ge as default
|
|
372
403
|
};
|
|
@@ -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 "./
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar2.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover2.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({
|