vlite3 1.5.15 → 1.5.17
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/Clock/Clock.vue.d.ts +1 -1
- package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
- package/components/EditableTitle/EditableTitle.vue.d.ts +213 -0
- package/components/EditableTitle/EditableTitle.vue.js +7 -0
- package/components/EditableTitle/EditableTitle2.vue.js +372 -0
- package/components/EditableTitle/index.d.ts +2 -0
- package/components/Input.vue.d.ts +11 -15
- package/components/Input.vue.js +160 -125
- package/components/NavbarCommandPalette.vue.js +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 +2 -2
- package/components/TagInput/TagInput.vue.d.ts +15 -12
- package/components/Textarea.vue.d.ts +9 -2
- package/components/Textarea.vue.js +40 -25
- package/components/index.d.ts +1 -0
- package/docs/component-index.md +4 -2
- package/docs/components/editable-title.md +174 -0
- package/docs/components/input.md +11 -0
- package/docs-manifest.json +7 -4
- package/index.d.ts +1 -0
- package/index.js +131 -129
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/editable-title.type.d.ts +61 -0
- package/types/index.d.ts +1 -0
- /package/components/RichTextEditor/{RichTextLinkPopover2.vue.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar2.vue.js → RichTextToolbar.vue.js} +0 -0
package/components/Input.vue.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { resolveI18nText as
|
|
6
|
-
import { useRtl as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as le, computed as a, useSlots as oe, ref as v, onMounted as ae, nextTick as j, openBlock as r, createElementBlock as i, normalizeClass as u, createBlock as S, withCtx as de, createTextVNode as A, toDisplayString as C, createCommentVNode as c, createElementVNode as L, renderSlot as H, createVNode as k } from "vue";
|
|
2
|
+
import x from "./Icon.vue.js";
|
|
3
|
+
import re from "./Label.vue.js";
|
|
4
|
+
import ue from "./Textarea.vue.js";
|
|
5
|
+
import { resolveI18nText as U } from "../utils/i18n.js";
|
|
6
|
+
import { useRtl as se } from "../composables/useRtl.js";
|
|
7
|
+
const ie = ["dir"], ce = ["for"], fe = ["type", "value", "placeholder", "disabled", "readonly", "min", "max", "dir", "data-testid"], me = { class: "absolute end-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 z-20" }, we = /* @__PURE__ */ le({
|
|
8
8
|
__name: "Input",
|
|
9
9
|
props: {
|
|
10
10
|
modelValue: { default: "" },
|
|
@@ -39,30 +39,30 @@ const se = ["dir"], re = ["for"], ue = ["type", "value", "placeholder", "disable
|
|
|
39
39
|
max: {}
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:modelValue", "focus", "blur", "change", "click:icon", "click:icon-right"],
|
|
42
|
-
setup(t, { emit:
|
|
43
|
-
const e = t,
|
|
44
|
-
() =>
|
|
45
|
-
),
|
|
42
|
+
setup(t, { expose: W, emit: q }) {
|
|
43
|
+
const e = t, f = q, d = a(() => U(e.labelI18n, e.label)), I = a(
|
|
44
|
+
() => U(e.placeholderI18n, e.placeholder)
|
|
45
|
+
), y = oe(), s = v(null), b = v(null), p = v(!1), G = se(), $ = a(() => G.value ? "rtl" : "ltr"), h = v(!1), J = a(() => e.type === "password" && p.value ? "text" : e.type), V = a(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), z = a(() => g.value || V.value || h.value), w = a(() => !!e.addonLeft || !!y["addon-left"]), R = a(() => !!e.addonRight || !!y["addon-right"]), K = a(() => [
|
|
46
46
|
"relative w-full",
|
|
47
47
|
e.class,
|
|
48
48
|
e.labelPosition === "left" ? "flex items-center gap-4" : "",
|
|
49
49
|
e.labelPosition === "right" ? "flex flex-row-reverse items-center gap-4" : "space-y-2"
|
|
50
|
-
].join(" ")),
|
|
50
|
+
].join(" ")), O = a(() => [
|
|
51
51
|
"input-addon-group relative flex w-full items-stretch",
|
|
52
52
|
e.labelPosition !== "top" ? "flex-1" : ""
|
|
53
|
-
].join(" ")),
|
|
54
|
-
const n = "block w-full bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none relative focus:z-10",
|
|
53
|
+
].join(" ")), F = a(() => {
|
|
54
|
+
const n = "block w-full bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none relative focus:z-10", l = {
|
|
55
55
|
solid: "bg-muted border-transparent focus-visible:border-black",
|
|
56
56
|
outline: "border border-input focus-visible:border-black",
|
|
57
57
|
"outline-b": "border-b border-input bg-transparent rounded-none focus-visible:border-black",
|
|
58
58
|
transparent: "border-none bg-transparent shadow-none",
|
|
59
59
|
floating: "border border-input focus-visible:border-black"
|
|
60
|
-
},
|
|
60
|
+
}, m = {
|
|
61
61
|
sm: "h-7.5 text-xs",
|
|
62
62
|
md: "h-9 text-sm",
|
|
63
63
|
lg: "h-10 text-base"
|
|
64
64
|
};
|
|
65
|
-
let
|
|
65
|
+
let o = {
|
|
66
66
|
none: "rounded-none",
|
|
67
67
|
sm: "rounded-sm",
|
|
68
68
|
md: "rounded-md",
|
|
@@ -71,8 +71,8 @@ const se = ["dir"], re = ["for"], ue = ["type", "value", "placeholder", "disable
|
|
|
71
71
|
"2xl": "rounded-2xl",
|
|
72
72
|
full: "rounded-full"
|
|
73
73
|
}[e.rounded];
|
|
74
|
-
|
|
75
|
-
const
|
|
74
|
+
w.value && (e.rounded === "md" ? o = "rounded-e-md rounded-s-none" : e.rounded === "sm" ? o = "rounded-e-sm rounded-s-none" : e.rounded === "lg" ? o = "rounded-e-lg rounded-s-none" : e.rounded === "full" ? o = "rounded-e-full rounded-s-none" : e.rounded !== "none" && (o = o.replace("rounded-", "rounded-e-").replace("rounded-s-", ""))), R.value && (w.value ? o = "rounded-none" : e.rounded === "md" ? o = "rounded-s-md rounded-e-none" : e.rounded === "sm" ? o = "rounded-s-sm rounded-e-none" : e.rounded === "lg" ? o = "rounded-s-lg rounded-e-none" : e.rounded === "full" ? o = "rounded-s-full rounded-e-none" : e.rounded !== "none" && (o = o.replace("rounded-", "rounded-s-").replace("rounded-e-", ""))), e.variant === "outline-b" && (o = "rounded-none");
|
|
75
|
+
const D = e.variant === "outline-b" || e.variant === "transparent", ne = {
|
|
76
76
|
xs: "ps-6",
|
|
77
77
|
sm: "ps-8",
|
|
78
78
|
md: "ps-9",
|
|
@@ -81,12 +81,12 @@ const se = ["dir"], re = ["for"], ue = ["type", "value", "placeholder", "disable
|
|
|
81
81
|
};
|
|
82
82
|
return [
|
|
83
83
|
n,
|
|
84
|
-
|
|
85
|
-
e.type === "textarea" ? "" :
|
|
86
|
-
|
|
84
|
+
l[e.variant],
|
|
85
|
+
e.type === "textarea" ? "" : m[e.size],
|
|
86
|
+
o,
|
|
87
87
|
e.error ? "border-destructive focus-visible:ring-destructive" : "",
|
|
88
|
-
e.icon ?
|
|
89
|
-
e.showClearButton &&
|
|
88
|
+
e.icon ? ne[e?.size] : D && !w.value ? "ps-0" : "",
|
|
89
|
+
e.showClearButton && V.value || e.type === "password" || e.loading || e.iconRight ? "pe-9" : D && !R.value ? "pe-0" : "",
|
|
90
90
|
// Keyframe name used to detect browser autofill via animationstart event
|
|
91
91
|
e.variant === "floating" ? "autofill-detect" : "",
|
|
92
92
|
e.inputClass
|
|
@@ -95,20 +95,20 @@ const se = ["dir"], re = ["for"], ue = ["type", "value", "placeholder", "disable
|
|
|
95
95
|
sm: "text-xs",
|
|
96
96
|
md: "text-sm",
|
|
97
97
|
lg: "text-base"
|
|
98
|
-
},
|
|
99
|
-
const
|
|
98
|
+
}, N = (n) => {
|
|
99
|
+
const l = n === "start";
|
|
100
100
|
return [
|
|
101
101
|
"[&_button]:w-full [&_a]:w-full! [&_.v-btn]:w-full! [&_.tooltip-trigger]:w-full",
|
|
102
|
-
|
|
102
|
+
l ? "[&_button]:rounded-e-none [&_a]:rounded-e-none [&_.v-btn]:rounded-e-none" : "[&_button]:rounded-s-none [&_a]:rounded-s-none [&_.v-btn]:rounded-s-none",
|
|
103
103
|
"[&_button]:relative [&_button]:focus:z-20",
|
|
104
|
-
|
|
104
|
+
l ? "-me-px" : "-ms-px",
|
|
105
105
|
"z-10"
|
|
106
106
|
].join(" ");
|
|
107
|
-
},
|
|
108
|
-
const n = !!
|
|
107
|
+
}, Q = a(() => {
|
|
108
|
+
const n = !!y["addon-left"];
|
|
109
109
|
return [
|
|
110
110
|
"flex items-center justify-center whitespace-nowrap",
|
|
111
|
-
n ? `border-none ${
|
|
111
|
+
n ? `border-none ${N("start")}` : `bg-muted border border-input border-e-0! px-3 text-muted-foreground ${{
|
|
112
112
|
sm: "rounded-s-sm",
|
|
113
113
|
md: "rounded-s-md",
|
|
114
114
|
lg: "rounded-s-lg",
|
|
@@ -121,11 +121,11 @@ const se = ["dir"], re = ["for"], ue = ["type", "value", "placeholder", "disable
|
|
|
121
121
|
e.addonLeftClass,
|
|
122
122
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
123
123
|
].join(" ");
|
|
124
|
-
}),
|
|
125
|
-
const n = !!
|
|
124
|
+
}), X = a(() => {
|
|
125
|
+
const n = !!y["addon-right"];
|
|
126
126
|
return [
|
|
127
127
|
"flex items-center justify-center whitespace-nowrap",
|
|
128
|
-
n ? `border-none ${
|
|
128
|
+
n ? `border-none ${N("end")}` : `bg-muted border border-input border-s-0! px-3 text-muted-foreground ${{
|
|
129
129
|
sm: "rounded-e-sm",
|
|
130
130
|
md: "rounded-e-md",
|
|
131
131
|
lg: "rounded-e-lg",
|
|
@@ -138,176 +138,211 @@ const se = ["dir"], re = ["for"], ue = ["type", "value", "placeholder", "disable
|
|
|
138
138
|
e.addonRightClass,
|
|
139
139
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
140
140
|
].join(" ");
|
|
141
|
-
}),
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
}, Q = (n) => {
|
|
145
|
-
const o = n.target;
|
|
146
|
-
c("change", o.value);
|
|
147
|
-
}, X = () => {
|
|
148
|
-
e.disabled || e.readonly || (y.value = !y.value);
|
|
149
|
-
}, Y = () => {
|
|
150
|
-
e.disabled || e.readonly || (c("update:modelValue", ""), R(() => {
|
|
151
|
-
m.value?.focus();
|
|
152
|
-
}));
|
|
153
|
-
}, v = b(!1), B = b(!1), N = (n) => {
|
|
154
|
-
v.value = !0, c("focus", n);
|
|
155
|
-
}, T = (n) => {
|
|
156
|
-
v.value = !1, c("blur", n);
|
|
141
|
+
}), Y = (n) => {
|
|
142
|
+
const l = n.target;
|
|
143
|
+
f("update:modelValue", l.value);
|
|
157
144
|
}, Z = (n) => {
|
|
158
|
-
|
|
145
|
+
const l = n.target;
|
|
146
|
+
f("change", l.value);
|
|
147
|
+
}, _ = () => {
|
|
148
|
+
e.disabled || e.readonly || (p.value = !p.value);
|
|
149
|
+
}, ee = () => {
|
|
150
|
+
e.disabled || e.readonly || (f("update:modelValue", ""), j(() => {
|
|
151
|
+
s.value?.focus();
|
|
152
|
+
}));
|
|
153
|
+
}, g = v(!1), B = v(!1), T = (n) => {
|
|
154
|
+
g.value = !0, f("focus", n);
|
|
155
|
+
}, M = (n) => {
|
|
156
|
+
g.value = !1, f("blur", n);
|
|
157
|
+
}, te = (n) => {
|
|
158
|
+
n.animationName === "onAutoFillStart" ? h.value = !0 : n.animationName === "onAutoFillCancel" && (h.value = !1);
|
|
159
159
|
};
|
|
160
|
-
|
|
161
|
-
e.autofocus &&
|
|
160
|
+
ae(() => {
|
|
161
|
+
e.autofocus && j(() => {
|
|
162
162
|
setTimeout(() => {
|
|
163
|
-
|
|
163
|
+
E()?.focus(), g.value = !0;
|
|
164
164
|
}, 100);
|
|
165
|
-
}),
|
|
166
|
-
|
|
165
|
+
}), j(() => {
|
|
166
|
+
s.value && s.value.value && !e.modelValue && (h.value = !0);
|
|
167
167
|
});
|
|
168
|
-
})
|
|
169
|
-
|
|
168
|
+
});
|
|
169
|
+
function E() {
|
|
170
|
+
return s.value ?? b.value?.el ?? null;
|
|
171
|
+
}
|
|
172
|
+
return W({
|
|
173
|
+
/** Focus the underlying native input or textarea. */
|
|
174
|
+
focus: (n) => {
|
|
175
|
+
if (s.value) {
|
|
176
|
+
s.value.focus(n);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
b.value?.focus(n);
|
|
180
|
+
},
|
|
181
|
+
/** Select the contents of the underlying native input or textarea. */
|
|
182
|
+
select: () => {
|
|
183
|
+
if (s.value) {
|
|
184
|
+
s.value.select();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
b.value?.select();
|
|
188
|
+
},
|
|
189
|
+
/** Blur the underlying native input or textarea. */
|
|
190
|
+
blur: () => {
|
|
191
|
+
if (s.value) {
|
|
192
|
+
s.value.blur();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
b.value?.blur();
|
|
196
|
+
},
|
|
197
|
+
/** Native field element when mounted (`HTMLInputElement` or `HTMLTextAreaElement`). */
|
|
198
|
+
get el() {
|
|
199
|
+
return E();
|
|
200
|
+
}
|
|
201
|
+
}), (n, l) => (r(), i("div", {
|
|
202
|
+
class: u(K.value)
|
|
170
203
|
}, [
|
|
171
|
-
d.value && t.variant !== "floating" ? (
|
|
204
|
+
d.value && t.variant !== "floating" ? (r(), S(re, {
|
|
172
205
|
key: 0,
|
|
173
206
|
size: "xs",
|
|
174
207
|
for: d.value,
|
|
175
|
-
class:
|
|
208
|
+
class: u(["mb-1.5", t.labelPosition !== "top" ? "mb-0" : ""].join(" "))
|
|
176
209
|
}, {
|
|
177
|
-
default:
|
|
178
|
-
|
|
210
|
+
default: de(() => [
|
|
211
|
+
A(C(d.value), 1)
|
|
179
212
|
]),
|
|
180
213
|
_: 1
|
|
181
|
-
}, 8, ["for", "class"])) :
|
|
182
|
-
|
|
183
|
-
class:
|
|
214
|
+
}, 8, ["for", "class"])) : c("", !0),
|
|
215
|
+
L("div", {
|
|
216
|
+
class: u(O.value),
|
|
184
217
|
dir: "ltr"
|
|
185
218
|
}, [
|
|
186
|
-
|
|
219
|
+
w.value ? (r(), i("div", {
|
|
187
220
|
key: 0,
|
|
188
|
-
class:
|
|
221
|
+
class: u(Q.value)
|
|
189
222
|
}, [
|
|
190
|
-
|
|
191
|
-
|
|
223
|
+
H(n.$slots, "addon-left", {}, () => [
|
|
224
|
+
A(C(t.addonLeft), 1)
|
|
192
225
|
])
|
|
193
|
-
], 2)) :
|
|
194
|
-
|
|
226
|
+
], 2)) : c("", !0),
|
|
227
|
+
L("div", {
|
|
195
228
|
class: "input-field-chrome relative w-full",
|
|
196
|
-
dir:
|
|
197
|
-
onMouseenter:
|
|
198
|
-
onMouseleave:
|
|
229
|
+
dir: $.value,
|
|
230
|
+
onMouseenter: l[2] || (l[2] = (m) => B.value = !0),
|
|
231
|
+
onMouseleave: l[3] || (l[3] = (m) => B.value = !1)
|
|
199
232
|
}, [
|
|
200
|
-
d.value && t.variant === "floating" ? (
|
|
233
|
+
d.value && t.variant === "floating" ? (r(), i("label", {
|
|
201
234
|
key: 0,
|
|
202
235
|
for: d.value,
|
|
203
|
-
class:
|
|
236
|
+
class: u([
|
|
204
237
|
"absolute transition-all duration-200 ease-in-out pointer-events-none z-20",
|
|
205
|
-
|
|
238
|
+
z.value ? "-top-2.5 start-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background] translate-y-0" : t.type === "textarea" ? `top-2 text-sm text-muted-foreground/70 ${t.icon ? "start-9" : "start-3"} translate-y-0` : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${t.icon ? "start-9" : "start-3"}`
|
|
206
239
|
])
|
|
207
|
-
},
|
|
208
|
-
t.type === "textarea" ? (
|
|
240
|
+
}, C(d.value), 11, ce)) : c("", !0),
|
|
241
|
+
t.type === "textarea" ? (r(), S(ue, {
|
|
209
242
|
key: 1,
|
|
243
|
+
ref_key: "textareaRef",
|
|
244
|
+
ref: b,
|
|
210
245
|
"model-value": String(t.modelValue),
|
|
211
|
-
placeholder: t.variant === "floating" && d.value && !
|
|
246
|
+
placeholder: t.variant === "floating" && d.value && !z.value ? "" : I.value,
|
|
212
247
|
disabled: t.disabled,
|
|
213
248
|
readonly: t.readonly,
|
|
214
249
|
rows: t.rows,
|
|
215
|
-
class:
|
|
216
|
-
dir:
|
|
217
|
-
"onUpdate:modelValue":
|
|
218
|
-
onBlur:
|
|
219
|
-
onFocus:
|
|
250
|
+
class: u(F.value),
|
|
251
|
+
dir: $.value,
|
|
252
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => f("update:modelValue", m)),
|
|
253
|
+
onBlur: M,
|
|
254
|
+
onFocus: T,
|
|
220
255
|
"data-testid": n.$attrs["data-testid"] || (n.$attrs.name ? `input-${n.$attrs.name}` : d.value ? `input-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "textarea")
|
|
221
|
-
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "rows", "class", "dir", "data-testid"])) : (
|
|
256
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "rows", "class", "dir", "data-testid"])) : (r(), i("input", {
|
|
222
257
|
key: 2,
|
|
223
258
|
ref_key: "inputRef",
|
|
224
|
-
ref:
|
|
225
|
-
type:
|
|
259
|
+
ref: s,
|
|
260
|
+
type: J.value,
|
|
226
261
|
value: t.modelValue,
|
|
227
|
-
placeholder: t.variant === "floating" && d.value && !
|
|
262
|
+
placeholder: t.variant === "floating" && d.value && !z.value ? "" : I.value,
|
|
228
263
|
disabled: t.disabled,
|
|
229
264
|
readonly: t.readonly,
|
|
230
265
|
min: t.min,
|
|
231
266
|
max: t.max,
|
|
232
|
-
class:
|
|
233
|
-
dir:
|
|
234
|
-
onInput:
|
|
235
|
-
onChange:
|
|
236
|
-
onBlur:
|
|
237
|
-
onFocus:
|
|
238
|
-
onAnimationstart:
|
|
267
|
+
class: u(F.value),
|
|
268
|
+
dir: $.value,
|
|
269
|
+
onInput: Y,
|
|
270
|
+
onChange: Z,
|
|
271
|
+
onBlur: M,
|
|
272
|
+
onFocus: T,
|
|
273
|
+
onAnimationstart: te,
|
|
239
274
|
"data-testid": n.$attrs["data-testid"] || (n.$attrs.name ? `input-${n.$attrs.name}` : d.value ? `input-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "input")
|
|
240
|
-
}, null, 42,
|
|
241
|
-
t.icon ? (
|
|
275
|
+
}, null, 42, fe)),
|
|
276
|
+
t.icon ? (r(), i("div", {
|
|
242
277
|
key: 3,
|
|
243
278
|
tabindex: "-1",
|
|
244
|
-
class:
|
|
279
|
+
class: u([
|
|
245
280
|
"absolute start-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground z-20 pointer-events-none",
|
|
246
281
|
t.disabled ? "opacity-50" : ""
|
|
247
282
|
])
|
|
248
283
|
}, [
|
|
249
|
-
|
|
284
|
+
k(x, {
|
|
250
285
|
icon: t.icon,
|
|
251
|
-
class:
|
|
286
|
+
class: u(["h-4 w-4", t.iconClass])
|
|
252
287
|
}, null, 8, ["icon", "class"])
|
|
253
|
-
], 2)) :
|
|
254
|
-
|
|
255
|
-
t.loading ? (
|
|
288
|
+
], 2)) : c("", !0),
|
|
289
|
+
L("div", me, [
|
|
290
|
+
t.loading ? (r(), S(x, {
|
|
256
291
|
key: 0,
|
|
257
292
|
icon: "lucide:loader-2",
|
|
258
293
|
class: "h-4 w-4 animate-spin text-muted-foreground"
|
|
259
|
-
})) : t.iconRight ? (
|
|
294
|
+
})) : t.iconRight ? (r(), i("div", {
|
|
260
295
|
key: 1,
|
|
261
296
|
tabindex: "-1",
|
|
262
|
-
class:
|
|
297
|
+
class: u([
|
|
263
298
|
"flex items-center justify-center text-muted-foreground",
|
|
264
299
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-foreground"
|
|
265
300
|
]),
|
|
266
|
-
onClick:
|
|
301
|
+
onClick: l[1] || (l[1] = (m) => !t.disabled && !t.readonly && f("click:icon-right", m))
|
|
267
302
|
}, [
|
|
268
|
-
|
|
303
|
+
k(x, {
|
|
269
304
|
icon: t.iconRight,
|
|
270
|
-
class:
|
|
305
|
+
class: u(["h-4 w-4", t.iconRightClass])
|
|
271
306
|
}, null, 8, ["icon", "class"])
|
|
272
|
-
], 2)) :
|
|
273
|
-
t.type === "password" && !t.disabled && !t.readonly ? (
|
|
307
|
+
], 2)) : c("", !0),
|
|
308
|
+
t.type === "password" && !t.disabled && !t.readonly ? (r(), i("button", {
|
|
274
309
|
key: 2,
|
|
275
310
|
type: "button",
|
|
276
311
|
tabindex: "-1",
|
|
277
312
|
class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none",
|
|
278
|
-
onClick:
|
|
313
|
+
onClick: _
|
|
279
314
|
}, [
|
|
280
|
-
|
|
281
|
-
icon:
|
|
315
|
+
k(x, {
|
|
316
|
+
icon: p.value ? "lucide:eye-off" : "lucide:eye",
|
|
282
317
|
class: "h-4 w-4"
|
|
283
318
|
}, null, 8, ["icon"])
|
|
284
|
-
])) :
|
|
285
|
-
t.showClearButton &&
|
|
319
|
+
])) : c("", !0),
|
|
320
|
+
t.showClearButton && V.value && !t.disabled && !t.readonly && !t.loading && t.type !== "textarea" && t.type !== "password" && (g.value || B.value) ? (r(), i("button", {
|
|
286
321
|
key: 3,
|
|
287
322
|
type: "button",
|
|
288
323
|
tabindex: "-1",
|
|
289
324
|
class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none transition-opacity duration-200",
|
|
290
|
-
onClick:
|
|
325
|
+
onClick: ee
|
|
291
326
|
}, [
|
|
292
|
-
|
|
327
|
+
k(x, {
|
|
293
328
|
icon: "lucide:x-circle",
|
|
294
329
|
class: "h-4 w-4"
|
|
295
330
|
})
|
|
296
|
-
])) :
|
|
331
|
+
])) : c("", !0)
|
|
297
332
|
])
|
|
298
|
-
], 40,
|
|
299
|
-
|
|
333
|
+
], 40, ie),
|
|
334
|
+
R.value ? (r(), i("div", {
|
|
300
335
|
key: 1,
|
|
301
|
-
class:
|
|
336
|
+
class: u(X.value)
|
|
302
337
|
}, [
|
|
303
|
-
|
|
304
|
-
|
|
338
|
+
H(n.$slots, "addon-right", {}, () => [
|
|
339
|
+
A(C(t.addonRight), 1)
|
|
305
340
|
])
|
|
306
|
-
], 2)) :
|
|
341
|
+
], 2)) : c("", !0)
|
|
307
342
|
], 2)
|
|
308
343
|
], 2));
|
|
309
344
|
}
|
|
310
345
|
});
|
|
311
346
|
export {
|
|
312
|
-
|
|
347
|
+
we as default
|
|
313
348
|
};
|
|
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
|
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
4
|
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
5
|
import { $t as U } from "../utils/i18n.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ms-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ms-1" }, A = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NavbarCommandPalette",
|
|
9
9
|
props: {
|
|
@@ -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 "./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({
|
|
@@ -85,11 +85,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
85
85
|
readonly "onClick:icon-right"?: (event: MouseEvent) => any;
|
|
86
86
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "type" | "class" | "variant" | "size" | "rounded" | "loading" | "readonly" | "disabled" | "modelValue" | "rows" | "showClearButton" | "autofocus" | "inputClass" | "lazy" | "labelPosition" | "addonLeftClass" | "addonRightClass">;
|
|
87
87
|
$attrs: import('vue').Attrs;
|
|
88
|
-
$refs:
|
|
89
|
-
[x: string]: unknown;
|
|
90
|
-
} & {
|
|
91
|
-
inputRef: HTMLInputElement;
|
|
92
|
-
};
|
|
88
|
+
$refs: any;
|
|
93
89
|
$slots: Readonly<{
|
|
94
90
|
[name: string]: import('vue').Slot<any>;
|
|
95
91
|
}>;
|
|
@@ -97,7 +93,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
97
93
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
98
94
|
$host: Element | null;
|
|
99
95
|
$emit: ((event: "blur", event: FocusEvent) => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "change", value: string | number) => void) & ((event: "update:modelValue", value: string | number) => void) & ((event: "click:icon", event: MouseEvent) => void) & ((event: "click:icon-right", event: MouseEvent) => void);
|
|
100
|
-
$el:
|
|
96
|
+
$el: any;
|
|
101
97
|
$options: import('vue').ComponentOptionsBase<Readonly<import('../..').InputProps> & Readonly<{
|
|
102
98
|
onBlur?: (event: FocusEvent) => any;
|
|
103
99
|
onFocus?: (event: FocusEvent) => any;
|
|
@@ -105,7 +101,12 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
105
101
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
106
102
|
"onClick:icon"?: (event: MouseEvent) => any;
|
|
107
103
|
"onClick:icon-right"?: (event: MouseEvent) => any;
|
|
108
|
-
}>, {
|
|
104
|
+
}>, {
|
|
105
|
+
focus: (options?: FocusOptions) => void;
|
|
106
|
+
select: () => void;
|
|
107
|
+
blur: () => void;
|
|
108
|
+
el: HTMLInputElement | HTMLTextAreaElement;
|
|
109
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
109
110
|
blur: (event: FocusEvent) => any;
|
|
110
111
|
focus: (event: FocusEvent) => any;
|
|
111
112
|
change: (value: string | number) => any;
|
|
@@ -175,11 +176,13 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
175
176
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
176
177
|
"onClick:icon"?: (event: MouseEvent) => any;
|
|
177
178
|
"onClick:icon-right"?: (event: MouseEvent) => any;
|
|
178
|
-
}>, "type" | "class" | "variant" | "size" | "rounded" | "loading" | "readonly" | "disabled" | "modelValue" | "rows" | "showClearButton" | "autofocus" | "inputClass" | "lazy" | "labelPosition" | "addonLeftClass" | "addonRightClass"> & {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
}>, "select" | "el" | "blur" | "focus" | ("type" | "class" | "variant" | "size" | "rounded" | "loading" | "readonly" | "disabled" | "modelValue" | "rows" | "showClearButton" | "autofocus" | "inputClass" | "lazy" | "labelPosition" | "addonLeftClass" | "addonRightClass")> & {
|
|
180
|
+
focus: (options?: FocusOptions) => void;
|
|
181
|
+
select: () => void;
|
|
182
|
+
blur: () => void;
|
|
183
|
+
el: HTMLInputElement | HTMLTextAreaElement;
|
|
184
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
185
|
+
$slots: any;
|
|
183
186
|
};
|
|
184
187
|
}, HTMLDivElement>;
|
|
185
188
|
export default _default;
|
|
@@ -8,7 +8,12 @@ interface Props {
|
|
|
8
8
|
/** Explicit text direction; defaults to page dir so placeholders mirror under RTL. */
|
|
9
9
|
dir?: 'ltr' | 'rtl';
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('vue').DefineComponent<Props, {
|
|
11
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
12
|
+
focus: (options?: FocusOptions) => void;
|
|
13
|
+
select: () => void;
|
|
14
|
+
blur: () => void;
|
|
15
|
+
el: HTMLTextAreaElement;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
17
|
blur: (event: FocusEvent) => any;
|
|
13
18
|
focus: (event: FocusEvent) => any;
|
|
14
19
|
"update:modelValue": (value: string) => any;
|
|
@@ -21,5 +26,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
21
26
|
disabled: boolean;
|
|
22
27
|
modelValue: string;
|
|
23
28
|
rows: number;
|
|
24
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
30
|
+
textareaRef: HTMLTextAreaElement;
|
|
31
|
+
}, HTMLTextAreaElement>;
|
|
25
32
|
export default _default;
|