@wssto2/vue-core 0.4.19 → 0.4.20
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/dist/{Activity-CLyG5Y9o.js → Activity-C0NvjIi5.js} +3 -3
- package/dist/{Changes-xF1VMbqD.js → Changes-hoMHeAZt.js} +2 -2
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-nojILoAf.js → CollectionPage.vue_vue_type_script_setup_true_lang-BNM_cbXa.js} +2 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js +281 -0
- package/dist/{DeadLetters-AbbNs69D.js → DeadLetters-O6QReswO.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-C7nq7MJB.js → FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js} +2 -1
- package/dist/{General-De4Q6Wfn.js → General-9Sgxb74n.js} +4 -4
- package/dist/{NewRolePage-QAv_XsT0.js → NewRolePage-D-LunWMH.js} +2 -2
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js +161 -0
- package/dist/{ProfilePage-CjjKhkHX.js → ProfilePage-DJUDCyEr.js} +3 -3
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-FLJk6Kb2.js → RoleEditor.vue_vue_type_script_setup_true_lang-D-b-O6SG.js} +4 -4
- package/dist/{RolePage-De7s2sYr.js → RolePage-Ha-EgoEJ.js} +4 -4
- package/dist/{RolesPage-TXQKtK_J.js → RolesPage-8uWWCClN.js} +3 -3
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js +515 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CuxVe7rm.js → SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js} +1 -1
- package/dist/{Sessions-BDLI0o-z.js → Sessions-Dz4KYMu9.js} +2 -2
- package/dist/{SettingsPage-Kzcqv91E.js → SettingsPage-D47NSOYW.js} +3 -3
- package/dist/{SignIn-DKo46hNK.js → SignIn-CNv68Tba.js} +2 -2
- package/dist/{SignInPage-B2v3is80.js → SignInPage-CsjC4aiV.js} +2 -2
- package/dist/{SignIns-D-_a_S6O.js → SignIns-CgsNf8uf.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BslHroDP.js → TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js} +114 -111
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js +93 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js +190 -0
- package/dist/{UserRecord-BR70ai9q.js → UserRecord-B9r_9U1z.js} +4 -4
- package/dist/{UsersList-BC9S6omH.js → UsersList-BBLa3OCv.js} +6 -6
- package/dist/access/index.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/form/ComboField.vue.d.ts +7 -3
- package/dist/form/DateField.vue.d.ts +4 -0
- package/dist/form/DateTimeField.vue.d.ts +4 -0
- package/dist/form/MoneyField.vue.d.ts +10 -5
- package/dist/form/NumberField.vue.d.ts +13 -5
- package/dist/form/SelectField.vue.d.ts +3 -1
- package/dist/form/TextField.vue.d.ts +4 -0
- package/dist/form/TextareaField.vue.d.ts +4 -0
- package/dist/form/TimeField.vue.d.ts +4 -0
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +1036 -1012
- package/dist/form/options.d.ts +4 -0
- package/dist/identity/index.js +1 -1
- package/dist/{index-B9KqrN-F.js → index-D-0JNiFF.js} +2 -2
- package/dist/{index-BrqxylSS.js → index-D6BjUQJT.js} +5 -5
- package/dist/{index-D8akxuKo.js → index-Dxu7ZfCC.js} +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{status-vMwum3Y9.js → status-BLTC7wi1.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-CfPwcEM2.js +0 -278
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-djJvP6Og.js +0 -150
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-ByDo_32P.js +0 -493
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-XZRHwx-n.js +0 -91
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-BB7ZGpvP.js +0 -187
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as K, useTemplateRef as N, computed as v, watch as
|
|
1
|
+
import { defineComponent as K, useTemplateRef as N, computed as v, watch as te, nextTick as oe, openBlock as n, createElementBlock as l, withModifiers as se, normalizeStyle as ne, unref as i, createElementVNode as m, toDisplayString as r, createCommentVNode as p, Fragment as R, renderList as ae, normalizeClass as B, createBlock as P, renderSlot as b, createTextVNode as E, useModel as ie, ref as le, mergeProps as re, createSlots as ce, withCtx as w, withDirectives as de, vModelDynamic as ue, mergeModels as H, mergeDefaults as pe } from "vue";
|
|
2
2
|
import { useI18n as G } from "vue-i18n";
|
|
3
|
-
import { b as
|
|
4
|
-
import { a as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as
|
|
7
|
-
import { l as U, m as
|
|
8
|
-
const
|
|
3
|
+
import { b as me } from "./controlSurface-t7OEFESJ.js";
|
|
4
|
+
import { a as fe, c as he, _ as ve, f as ge, b as ye } from "./control-B4SdblL6.js";
|
|
5
|
+
import { _ as xe } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
+
import { u as be, N as ke } from "./anchored-DpuUwf-9.js";
|
|
7
|
+
import { l as U, m as _e, u as we, c as $e } from "./suggestions-DHJFKB26.js";
|
|
8
|
+
const Me = ["id", "aria-busy"], qe = { class: "min-h-0 flex-1 overflow-y-auto p-1.5" }, Be = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "px-2.5 pb-1 pt-1.5 text-caption font-semibold uppercase text-content-disabled",
|
|
11
11
|
role: "presentation"
|
|
12
|
-
},
|
|
12
|
+
}, Le = ["id", "aria-selected", "aria-disabled", "onMouseenter", "onClick"], Se = { class: "min-w-0 flex-1" }, Ce = { class: "block truncate text-body text-content-strong" }, Ve = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "font-semibold"
|
|
15
|
-
},
|
|
15
|
+
}, We = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "block truncate text-footnote text-content-muted"
|
|
18
|
-
},
|
|
18
|
+
}, De = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "px-3 py-2 text-footnote text-content-muted",
|
|
21
21
|
role: "status"
|
|
22
|
-
},
|
|
22
|
+
}, Te = {
|
|
23
23
|
key: 3,
|
|
24
24
|
class: "px-3 py-2 text-footnote text-content-destructive",
|
|
25
25
|
role: "alert"
|
|
26
|
-
},
|
|
26
|
+
}, Re = {
|
|
27
27
|
key: 4,
|
|
28
28
|
class: "px-3 py-2 text-footnote text-content-muted"
|
|
29
|
-
},
|
|
29
|
+
}, Ee = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "mx-1.5 mb-1.5 mt-0.5 border-t border-border-separator px-2.5 pb-0.5 pt-2 text-caption text-content-muted compact:hidden",
|
|
32
32
|
"aria-hidden": "true"
|
|
33
|
-
},
|
|
33
|
+
}, Ne = /* @__PURE__ */ K({
|
|
34
34
|
__name: "SuggestionList",
|
|
35
35
|
props: {
|
|
36
36
|
id: {},
|
|
@@ -46,85 +46,85 @@ const $e = ["id", "aria-busy"], Me = { class: "min-h-0 flex-1 overflow-y-auto p-
|
|
|
46
46
|
selected: { default: null }
|
|
47
47
|
},
|
|
48
48
|
emits: ["pick", "hover"],
|
|
49
|
-
setup($, { emit:
|
|
50
|
-
const o = $, t =
|
|
49
|
+
setup($, { emit: L }) {
|
|
50
|
+
const o = $, t = L, { t: c } = G(), f = N("panel"), k = v(() => U(o.open, o.items.length, o.status, o.emptyMessage)), _ = v(() => o.status === "loading"), M = (u) => u, g = (u) => _e(u.label, o.query), { style: S } = be(f, {
|
|
51
51
|
reference: () => o.anchor,
|
|
52
52
|
placement: () => "bottom-start",
|
|
53
53
|
offset: 4,
|
|
54
54
|
padding: 8,
|
|
55
55
|
fit: (u, h) => {
|
|
56
|
-
const s = window.innerWidth <
|
|
56
|
+
const s = window.innerWidth < ke;
|
|
57
57
|
u.style.width = `${s ? window.innerWidth - 16 : o.anchor?.offsetWidth ?? 0}px`, u.style.minWidth = s ? "" : "min(20rem, calc(100vw - 16px))", u.style.maxHeight = `${Math.max(120, Math.min(320, h.height))}px`;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
return
|
|
60
|
+
return te(() => o.highlighted, () => void oe(() => f.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" }))), (u, h) => k.value ? (n(), l("div", {
|
|
61
61
|
key: 0,
|
|
62
62
|
id: `${o.id}-list`,
|
|
63
63
|
ref_key: "panel",
|
|
64
|
-
ref:
|
|
64
|
+
ref: f,
|
|
65
65
|
role: "listbox",
|
|
66
66
|
"aria-busy": _.value || void 0,
|
|
67
|
-
style:
|
|
67
|
+
style: ne(i(S)),
|
|
68
68
|
"data-test": "suggestion-list",
|
|
69
69
|
class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float",
|
|
70
|
-
onMousedown: h[0] || (h[0] =
|
|
70
|
+
onMousedown: h[0] || (h[0] = se(() => {
|
|
71
71
|
}, ["prevent"]))
|
|
72
72
|
}, [
|
|
73
|
-
|
|
74
|
-
o.recent ? (n(), l("p",
|
|
75
|
-
o.items.length > 0 ? (n(!0), l(R, { key: 1 },
|
|
76
|
-
id: `${o.id}-option-${
|
|
73
|
+
m("div", qe, [
|
|
74
|
+
o.recent ? (n(), l("p", Be, r(i(c)("core.form.suggestions.recent")), 1)) : p("", !0),
|
|
75
|
+
o.items.length > 0 ? (n(!0), l(R, { key: 1 }, ae(o.items, (s, a) => (n(), l("div", {
|
|
76
|
+
id: `${o.id}-option-${a}`,
|
|
77
77
|
key: String(s.value),
|
|
78
78
|
role: "option",
|
|
79
|
-
"aria-selected":
|
|
79
|
+
"aria-selected": a === o.highlighted,
|
|
80
80
|
"aria-disabled": s.disabled || void 0,
|
|
81
81
|
"data-test": "suggestion-option",
|
|
82
|
-
class:
|
|
83
|
-
onMouseenter: (
|
|
84
|
-
onClick: (
|
|
82
|
+
class: B(["flex cursor-pointer items-center gap-2.5 rounded-control px-2.5 py-2", [a === o.highlighted ? "bg-tint-soft" : "hover:bg-fill", s.disabled ? "cursor-not-allowed opacity-45" : "", _.value ? "opacity-60" : ""]]),
|
|
83
|
+
onMouseenter: (d) => t("hover", a),
|
|
84
|
+
onClick: (d) => !s.disabled && t("pick", s)
|
|
85
85
|
}, [
|
|
86
|
-
o.recent ? (n(), P(
|
|
86
|
+
o.recent ? (n(), P(i(xe), {
|
|
87
87
|
key: 0,
|
|
88
88
|
name: "history",
|
|
89
89
|
size: 16,
|
|
90
90
|
class: "shrink-0 text-content-disabled"
|
|
91
91
|
})) : p("", !0),
|
|
92
|
-
|
|
92
|
+
b(u.$slots, "option", {
|
|
93
93
|
option: M(s),
|
|
94
|
-
active:
|
|
94
|
+
active: a === o.highlighted,
|
|
95
95
|
selected: o.selected === s.value
|
|
96
96
|
}, () => [
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
m("span", Se, [
|
|
98
|
+
m("span", Ce, [
|
|
99
99
|
o.recent ? (n(), l(R, { key: 0 }, [
|
|
100
100
|
E(r(s.label), 1)
|
|
101
101
|
], 64)) : (n(), l(R, { key: 1 }, [
|
|
102
102
|
E(r(g(s).before), 1),
|
|
103
|
-
g(s).match ? (n(), l("strong",
|
|
103
|
+
g(s).match ? (n(), l("strong", Ve, r(g(s).match), 1)) : p("", !0),
|
|
104
104
|
E(r(g(s).after), 1)
|
|
105
105
|
], 64))
|
|
106
106
|
]),
|
|
107
|
-
s.description ? (n(), l("span",
|
|
107
|
+
s.description ? (n(), l("span", We, r(s.description), 1)) : p("", !0)
|
|
108
108
|
])
|
|
109
109
|
])
|
|
110
|
-
], 42,
|
|
110
|
+
], 42, Le))), 128)) : o.status === "loading" ? (n(), l("p", De, r(i(c)("core.form.select.loading")), 1)) : o.status === "failed" ? (n(), l("p", Te, r(i(c)("core.form.select.failed")), 1)) : (n(), l("p", Re, r(i(c)("core.form.select.no_matches")), 1))
|
|
111
111
|
]),
|
|
112
|
-
o.hint && o.items.length > 0 ? (n(), l("p",
|
|
113
|
-
], 44,
|
|
112
|
+
o.hint && o.items.length > 0 ? (n(), l("p", Ee, r(o.hint), 1)) : p("", !0)
|
|
113
|
+
], 44, Me)) : p("", !0);
|
|
114
114
|
}
|
|
115
|
-
}),
|
|
115
|
+
}), Pe = {
|
|
116
116
|
key: 0,
|
|
117
117
|
class: "flex shrink-0 items-center",
|
|
118
118
|
"data-test": "field-prefix"
|
|
119
|
-
},
|
|
119
|
+
}, Ae = {
|
|
120
120
|
key: 1,
|
|
121
121
|
class: "shrink-0 text-footnote text-content-muted"
|
|
122
|
-
},
|
|
122
|
+
}, Fe = { class: "relative min-w-0 flex-1" }, ze = ["id", "type", "name", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby", "role", "aria-autocomplete", "aria-expanded", "aria-controls", "aria-activedescendant"], Ie = { class: "invisible" }, Oe = { class: "text-content-disabled" }, He = {
|
|
123
123
|
key: 2,
|
|
124
124
|
class: "shrink-0 text-footnote text-content-muted"
|
|
125
|
-
},
|
|
125
|
+
}, Ye = /* @__PURE__ */ K({
|
|
126
126
|
__name: "TextField",
|
|
127
|
-
props: /* @__PURE__ */ H(/* @__PURE__ */
|
|
127
|
+
props: /* @__PURE__ */ H(/* @__PURE__ */ pe({
|
|
128
128
|
label: {},
|
|
129
129
|
labelHidden: { type: Boolean },
|
|
130
130
|
hint: {},
|
|
@@ -149,7 +149,7 @@ const $e = ["id", "aria-busy"], Me = { class: "min-h-0 flex-1 overflow-y-auto p-
|
|
|
149
149
|
suggestionsLimit: {},
|
|
150
150
|
recents: {}
|
|
151
151
|
}, {
|
|
152
|
-
...
|
|
152
|
+
...ye,
|
|
153
153
|
type: "text",
|
|
154
154
|
placeholder: void 0,
|
|
155
155
|
maxLength: void 0,
|
|
@@ -167,112 +167,115 @@ const $e = ["id", "aria-busy"], Me = { class: "min-h-0 flex-1 overflow-y-auto p-
|
|
|
167
167
|
modelValue: { default: "" },
|
|
168
168
|
modelModifiers: {}
|
|
169
169
|
}),
|
|
170
|
-
emits: /* @__PURE__ */ H(["picked"], ["update:modelValue"]),
|
|
171
|
-
setup($, { expose:
|
|
172
|
-
const t = $,
|
|
170
|
+
emits: /* @__PURE__ */ H(["picked", "focus", "blur"], ["update:modelValue"]),
|
|
171
|
+
setup($, { expose: L, emit: o }) {
|
|
172
|
+
const t = $, c = ie($, "modelValue"), f = o, k = N("input"), _ = N("anchor"), M = !!fe(), g = he("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), S = v(() => M ? me(t.width) : "w-full"), { t: u } = G(), h = (e) => typeof e == "string" ? { value: e, label: e } : { value: e.text, label: e.text, ...e.detail !== void 0 ? { description: e.detail } : {} }, s = v(() => {
|
|
173
173
|
const e = t.suggestions;
|
|
174
174
|
if (e)
|
|
175
|
-
return typeof e == "function" ? async (
|
|
176
|
-
}),
|
|
175
|
+
return typeof e == "function" ? async (y, x) => (await e(y, x)).map(h) : e.map(h);
|
|
176
|
+
}), a = v(() => s.value !== void 0), d = we({
|
|
177
177
|
source: () => s.value,
|
|
178
178
|
minLength: () => t.suggestionsMinLength,
|
|
179
179
|
debounce: () => t.suggestionsDebounce,
|
|
180
180
|
limit: () => t.suggestionsLimit,
|
|
181
181
|
listAllWhenEmpty: !1,
|
|
182
182
|
recents: () => t.recents
|
|
183
|
-
}), { items:
|
|
183
|
+
}), { items: C, open: V, status: A, highlighted: F, showingRecent: z } = d, I = le(!0), W = () => {
|
|
184
184
|
const e = k.value;
|
|
185
185
|
I.value = !e || e.selectionStart === e.value.length && e.selectionEnd === e.value.length;
|
|
186
|
-
}, q = v(() =>
|
|
186
|
+
}, q = v(() => a.value && V.value && !z.value && I.value && d.current.value ? $e(c.value, d.current.value.label) : ""), O = v(() => U(V.value, C.value.length, A.value, !1));
|
|
187
187
|
function j(e) {
|
|
188
|
-
|
|
188
|
+
W(), a.value && d.ask(e.target.value);
|
|
189
|
+
}
|
|
190
|
+
function D(e) {
|
|
191
|
+
c.value = e.value, d.remember(e), d.close(), f("picked", { text: e.value, ...e.description !== void 0 ? { detail: e.description } : {} });
|
|
189
192
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
193
|
+
function J(e) {
|
|
194
|
+
f("focus", e), a.value && c.value === "" && d.show("");
|
|
192
195
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
196
|
+
function Q(e) {
|
|
197
|
+
d.close(), f("blur", e);
|
|
195
198
|
}
|
|
196
|
-
function
|
|
197
|
-
const e =
|
|
198
|
-
return !q.value || !e ? !1 : (
|
|
199
|
+
function X() {
|
|
200
|
+
const e = d.current.value;
|
|
201
|
+
return !q.value || !e ? !1 : (D(e), !0);
|
|
199
202
|
}
|
|
200
|
-
const
|
|
201
|
-
|
|
203
|
+
const Y = (e) => {
|
|
204
|
+
a.value && d.keydown(e, { pick: D, enterNeedsMove: !0, complete: X });
|
|
202
205
|
};
|
|
203
|
-
return
|
|
204
|
-
value:
|
|
206
|
+
return L({ focus: () => k.value?.focus() }), (e, y) => (n(), P(ve, re(i(ge)(t), {
|
|
207
|
+
value: c.value,
|
|
205
208
|
prefix: t.prefix,
|
|
206
209
|
suffix: t.suffix,
|
|
207
210
|
"value-style": t.mono ? "mono" : void 0
|
|
208
|
-
}),
|
|
209
|
-
default: w(({ id:
|
|
210
|
-
|
|
211
|
+
}), ce({
|
|
212
|
+
default: w(({ id: x, describedby: Z, invalid: ee }) => [
|
|
213
|
+
m("div", {
|
|
211
214
|
ref_key: "anchor",
|
|
212
215
|
ref: _,
|
|
213
|
-
class:
|
|
216
|
+
class: B(["flex items-center gap-1.5", [i(g), S.value]])
|
|
214
217
|
}, [
|
|
215
|
-
e.$slots.prefix ? (n(), l("span",
|
|
216
|
-
|
|
218
|
+
e.$slots.prefix ? (n(), l("span", Pe, [
|
|
219
|
+
b(e.$slots, "prefix")
|
|
217
220
|
])) : p("", !0),
|
|
218
|
-
t.prefix ? (n(), l("span",
|
|
219
|
-
|
|
220
|
-
de(
|
|
221
|
-
id:
|
|
221
|
+
t.prefix ? (n(), l("span", Ae, r(t.prefix), 1)) : p("", !0),
|
|
222
|
+
m("div", Fe, [
|
|
223
|
+
de(m("input", {
|
|
224
|
+
id: x,
|
|
222
225
|
ref_key: "input",
|
|
223
226
|
ref: k,
|
|
224
|
-
"onUpdate:modelValue":
|
|
227
|
+
"onUpdate:modelValue": y[0] || (y[0] = (T) => c.value = T),
|
|
225
228
|
type: t.type,
|
|
226
229
|
name: t.name,
|
|
227
230
|
placeholder: t.placeholder,
|
|
228
231
|
maxlength: t.maxLength,
|
|
229
|
-
autocomplete:
|
|
232
|
+
autocomplete: a.value ? "off" : t.autocomplete,
|
|
230
233
|
disabled: t.disabled,
|
|
231
234
|
required: t.required,
|
|
232
235
|
"aria-required": t.required || void 0,
|
|
233
|
-
"aria-invalid":
|
|
234
|
-
"aria-describedby":
|
|
235
|
-
role:
|
|
236
|
-
"aria-autocomplete":
|
|
237
|
-
"aria-expanded":
|
|
238
|
-
"aria-controls":
|
|
239
|
-
"aria-activedescendant":
|
|
240
|
-
class:
|
|
236
|
+
"aria-invalid": ee || void 0,
|
|
237
|
+
"aria-describedby": Z,
|
|
238
|
+
role: a.value ? "combobox" : void 0,
|
|
239
|
+
"aria-autocomplete": a.value ? "both" : void 0,
|
|
240
|
+
"aria-expanded": a.value ? O.value : void 0,
|
|
241
|
+
"aria-controls": a.value ? `${x}-list` : void 0,
|
|
242
|
+
"aria-activedescendant": a.value && O.value && i(C).length > 0 ? `${x}-option-${i(F)}` : void 0,
|
|
243
|
+
class: B(["block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed", [t.mono ? "font-mono" : "", M && !a.value ? "compact:text-right" : ""]]),
|
|
241
244
|
onInput: j,
|
|
242
|
-
onKeyup:
|
|
243
|
-
onClick:
|
|
244
|
-
onKeydown:
|
|
245
|
+
onKeyup: W,
|
|
246
|
+
onClick: W,
|
|
247
|
+
onKeydown: Y,
|
|
245
248
|
onFocus: J,
|
|
246
|
-
onBlur:
|
|
247
|
-
}, null, 42,
|
|
248
|
-
[
|
|
249
|
+
onBlur: Q
|
|
250
|
+
}, null, 42, ze), [
|
|
251
|
+
[ue, c.value]
|
|
249
252
|
]),
|
|
250
253
|
q.value ? (n(), l("span", {
|
|
251
254
|
key: 0,
|
|
252
255
|
"aria-hidden": "true",
|
|
253
|
-
class:
|
|
256
|
+
class: B(["pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre py-1 text-body", t.mono ? "font-mono" : ""]),
|
|
254
257
|
"data-test": "completion"
|
|
255
258
|
}, [
|
|
256
|
-
|
|
257
|
-
|
|
259
|
+
m("span", Ie, r(c.value), 1),
|
|
260
|
+
m("span", Oe, r(q.value), 1)
|
|
258
261
|
], 2)) : p("", !0)
|
|
259
262
|
]),
|
|
260
|
-
t.suffix ? (n(), l("span",
|
|
263
|
+
t.suffix ? (n(), l("span", He, r(t.suffix), 1)) : p("", !0)
|
|
261
264
|
], 2),
|
|
262
|
-
|
|
265
|
+
a.value ? (n(), P(Ne, {
|
|
263
266
|
key: 0,
|
|
264
|
-
id:
|
|
267
|
+
id: x,
|
|
265
268
|
anchor: _.value,
|
|
266
|
-
open:
|
|
267
|
-
items:
|
|
268
|
-
highlighted:
|
|
269
|
-
query:
|
|
270
|
-
status:
|
|
271
|
-
recent:
|
|
269
|
+
open: i(V),
|
|
270
|
+
items: i(C),
|
|
271
|
+
highlighted: i(F),
|
|
272
|
+
query: c.value,
|
|
273
|
+
status: i(A),
|
|
274
|
+
recent: i(z),
|
|
272
275
|
"empty-message": !1,
|
|
273
|
-
hint: q.value ?
|
|
274
|
-
onPick:
|
|
275
|
-
onHover:
|
|
276
|
+
hint: q.value ? i(u)("core.form.suggestions.keys_complete") : i(u)("core.form.suggestions.keys_pick"),
|
|
277
|
+
onPick: D,
|
|
278
|
+
onHover: y[1] || (y[1] = (T) => i(d).highlight(T))
|
|
276
279
|
}, null, 8, ["id", "anchor", "open", "items", "highlighted", "query", "status", "recent", "hint"])) : p("", !0)
|
|
277
280
|
]),
|
|
278
281
|
_: 2
|
|
@@ -280,28 +283,28 @@ const $e = ["id", "aria-busy"], Me = { class: "min-h-0 flex-1 overflow-y-auto p-
|
|
|
280
283
|
e.$slots.prefix ? {
|
|
281
284
|
name: "prefix",
|
|
282
285
|
fn: w(() => [
|
|
283
|
-
|
|
286
|
+
b(e.$slots, "prefix")
|
|
284
287
|
]),
|
|
285
288
|
key: "0"
|
|
286
289
|
} : void 0,
|
|
287
290
|
e.$slots.trailing ? {
|
|
288
291
|
name: "trailing",
|
|
289
292
|
fn: w(() => [
|
|
290
|
-
|
|
293
|
+
b(e.$slots, "trailing")
|
|
291
294
|
]),
|
|
292
295
|
key: "1"
|
|
293
296
|
} : void 0,
|
|
294
297
|
e.$slots.labelTrailing ? {
|
|
295
298
|
name: "labelTrailing",
|
|
296
299
|
fn: w(() => [
|
|
297
|
-
|
|
300
|
+
b(e.$slots, "labelTrailing")
|
|
298
301
|
]),
|
|
299
302
|
key: "2"
|
|
300
303
|
} : void 0,
|
|
301
304
|
e.$slots.readonly ? {
|
|
302
305
|
name: "readonly",
|
|
303
306
|
fn: w(() => [
|
|
304
|
-
|
|
307
|
+
b(e.$slots, "readonly")
|
|
305
308
|
]),
|
|
306
309
|
key: "3"
|
|
307
310
|
} : void 0
|
|
@@ -309,6 +312,6 @@ const $e = ["id", "aria-busy"], Me = { class: "min-h-0 flex-1 overflow-y-auto p-
|
|
|
309
312
|
}
|
|
310
313
|
});
|
|
311
314
|
export {
|
|
312
|
-
|
|
313
|
-
|
|
315
|
+
Ye as _,
|
|
316
|
+
Ne as a
|
|
314
317
|
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent as V, useModel as L, useTemplateRef as M, computed as i, openBlock as p, createBlock as D, mergeProps as F, unref as f, createSlots as S, withCtx as n, createElementVNode as v, normalizeClass as b, withDirectives as z, vModelText as E, createElementBlock as P, toDisplayString as R, createCommentVNode as N, renderSlot as d, mergeModels as y, mergeDefaults as _ } from "vue";
|
|
2
|
+
import { u as j } from "./mediaQuery-CygcXmFW.js";
|
|
3
|
+
import { a as G, u as H, c as U, _ as A, f as I, b as J } from "./control-B4SdblL6.js";
|
|
4
|
+
const K = ["id", "name", "rows", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], O = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mt-1 self-end text-footnote tabular-nums text-content-muted"
|
|
7
|
+
}, Y = /* @__PURE__ */ V({
|
|
8
|
+
__name: "TextareaField",
|
|
9
|
+
props: /* @__PURE__ */ y(/* @__PURE__ */ _({
|
|
10
|
+
label: {},
|
|
11
|
+
labelHidden: { type: Boolean },
|
|
12
|
+
hint: {},
|
|
13
|
+
error: {},
|
|
14
|
+
required: { type: Boolean },
|
|
15
|
+
editable: { type: Boolean },
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
lockedReason: {},
|
|
18
|
+
presentation: {},
|
|
19
|
+
name: {},
|
|
20
|
+
placeholder: {},
|
|
21
|
+
maxLength: {},
|
|
22
|
+
rows: {},
|
|
23
|
+
autocomplete: {},
|
|
24
|
+
stacked: { type: Boolean }
|
|
25
|
+
}, { ...J, placeholder: void 0, maxLength: void 0, rows: 3, autocomplete: void 0, stacked: !1 }), {
|
|
26
|
+
modelValue: { default: "" },
|
|
27
|
+
modelModifiers: {}
|
|
28
|
+
}),
|
|
29
|
+
emits: /* @__PURE__ */ y(["focus", "blur"], ["update:modelValue"]),
|
|
30
|
+
setup(u, { expose: g, emit: h }) {
|
|
31
|
+
const e = u, t = L(u, "modelValue"), m = h, c = M("area"), k = !!G(), w = j(), { editable: x } = H(e), s = i(() => k && !e.stacked && !w.value && x.value && !!e.label), r = i(() => e.maxLength ? `${t.value.length} / ${e.maxLength}` : void 0), B = i(() => s.value && r.value ? [e.hint, r.value].filter(Boolean).join(" · ") : e.hint), $ = U("area", () => e.error ? "error" : e.disabled ? "locked" : "rest");
|
|
32
|
+
return g({ focus: () => c.value?.focus() }), (o, a) => (p(), D(A, F({ ...f(I)(e), hint: B.value }, {
|
|
33
|
+
value: t.value,
|
|
34
|
+
"row-layout": s.value ? "entry" : "stacked",
|
|
35
|
+
"row-label-align": "top"
|
|
36
|
+
}), S({
|
|
37
|
+
default: n(({ id: q, describedby: C, invalid: T }) => [
|
|
38
|
+
v("div", {
|
|
39
|
+
class: b(["w-full", f($)])
|
|
40
|
+
}, [
|
|
41
|
+
z(v("textarea", {
|
|
42
|
+
id: q,
|
|
43
|
+
ref_key: "area",
|
|
44
|
+
ref: c,
|
|
45
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => t.value = l),
|
|
46
|
+
name: e.name,
|
|
47
|
+
rows: e.rows,
|
|
48
|
+
placeholder: e.placeholder,
|
|
49
|
+
maxlength: e.maxLength,
|
|
50
|
+
autocomplete: e.autocomplete,
|
|
51
|
+
disabled: e.disabled,
|
|
52
|
+
required: e.required,
|
|
53
|
+
"aria-required": e.required || void 0,
|
|
54
|
+
"aria-invalid": T || void 0,
|
|
55
|
+
"aria-describedby": C,
|
|
56
|
+
class: b(["block w-full border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed", e.disabled ? "resize-none" : "resize-y"]),
|
|
57
|
+
onFocus: a[1] || (a[1] = (l) => m("focus", l)),
|
|
58
|
+
onBlur: a[2] || (a[2] = (l) => m("blur", l))
|
|
59
|
+
}, null, 42, K), [
|
|
60
|
+
[E, t.value]
|
|
61
|
+
])
|
|
62
|
+
], 2),
|
|
63
|
+
!s.value && r.value ? (p(), P("p", O, R(r.value), 1)) : N("", !0)
|
|
64
|
+
]),
|
|
65
|
+
_: 2
|
|
66
|
+
}, [
|
|
67
|
+
o.$slots.trailing ? {
|
|
68
|
+
name: "trailing",
|
|
69
|
+
fn: n(() => [
|
|
70
|
+
d(o.$slots, "trailing")
|
|
71
|
+
]),
|
|
72
|
+
key: "0"
|
|
73
|
+
} : void 0,
|
|
74
|
+
o.$slots.labelTrailing ? {
|
|
75
|
+
name: "labelTrailing",
|
|
76
|
+
fn: n(() => [
|
|
77
|
+
d(o.$slots, "labelTrailing")
|
|
78
|
+
]),
|
|
79
|
+
key: "1"
|
|
80
|
+
} : void 0,
|
|
81
|
+
o.$slots.readonly ? {
|
|
82
|
+
name: "readonly",
|
|
83
|
+
fn: n(() => [
|
|
84
|
+
d(o.$slots, "readonly")
|
|
85
|
+
]),
|
|
86
|
+
key: "2"
|
|
87
|
+
} : void 0
|
|
88
|
+
]), 1040, ["value", "row-layout"]));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
export {
|
|
92
|
+
Y as _
|
|
93
|
+
};
|