@wssto2/vue-core 0.4.15 → 0.4.16
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/{ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js → ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js} +1 -1
- package/dist/{Activity-4q26REYj.js → Activity-CVO3sJwy.js} +4 -4
- package/dist/{Changes-CKIuGF8O.js → Changes-Bzvl3cEx.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CD5zZ29o.js} +2 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-BufoFwVQ.js +278 -0
- package/dist/{DeadLetters-DPGcQOz1.js → DeadLetters-DmwUtgf9.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js → FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js → FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js} +1 -1
- package/dist/{General-CUA9b3ML.js → General-CUEjJBD4.js} +6 -6
- package/dist/{NewRolePage-DBfCvDWA.js → NewRolePage-Cyn-oV6r.js} +2 -2
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-a8kN3A7k.js +150 -0
- package/dist/{ProfilePage-On-eAiJ-.js → ProfilePage-I74SQBFO.js} +4 -4
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js → RoleEditor.vue_vue_type_script_setup_true_lang-Ce6wjptT.js} +7 -7
- package/dist/{RolePage-B8oul55j.js → RolePage-DWQP3qQl.js} +5 -5
- package/dist/{RolesPage-DsXVivdj.js → RolesPage-BeEsHIQ2.js} +4 -4
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js +81 -0
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js → SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js} +161 -139
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js → SessionList.vue_vue_type_script_setup_true_lang-DoUo68xE.js} +2 -2
- package/dist/{Sessions-BTyXDEuY.js → Sessions-D8IXcb5M.js} +2 -2
- package/dist/{SettingsPage-DHTmMgif.js → SettingsPage-DRQP2nrH.js} +6 -6
- package/dist/{SignIn-DU4DE2wj.js → SignIn-CAZkovhb.js} +4 -4
- package/dist/{SignInPage-BA22kyOp.js → SignInPage-D-49oLY3.js} +3 -3
- package/dist/{SignIns-C8QAZBaL.js → SignIns-BtNfgMLc.js} +1 -1
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js +87 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js +292 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +91 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-pAdLPYXA.js +187 -0
- package/dist/{UserRecord-D1BNmYp9.js → UserRecord-BSbNuRFi.js} +5 -5
- package/dist/{UsersList-ltx3G23-.js → UsersList-DPHxcaDm.js} +6 -6
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/{control-CX9BG2UB.js → control-B_Nwtmag.js} +96 -82
- package/dist/form/CardSelectField.vue.d.ts +2 -2
- package/dist/form/ChoiceChips.vue.d.ts +2 -2
- package/dist/form/ComboField.vue.d.ts +2 -2
- package/dist/form/DateField.vue.d.ts +9 -2
- package/dist/form/DateTimeField.vue.d.ts +9 -2
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +9 -2
- package/dist/form/I18nField.vue.d.ts +9 -2
- package/dist/form/MoneyField.vue.d.ts +9 -2
- package/dist/form/MonthYearField.vue.d.ts +9 -2
- package/dist/form/MultiSelectField.vue.d.ts +2 -2
- package/dist/form/NumberField.vue.d.ts +20 -2
- package/dist/form/PhotoField.vue.d.ts +9 -2
- package/dist/form/SegmentedField.vue.d.ts +2 -2
- package/dist/form/SelectField.vue.d.ts +2 -2
- package/dist/form/SwitchField.vue.d.ts +2 -2
- package/dist/form/TextField.vue.d.ts +9 -2
- package/dist/form/TextareaField.vue.d.ts +9 -2
- package/dist/form/TimeField.vue.d.ts +9 -2
- package/dist/form/field.d.ts +9 -0
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +1079 -881
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +31 -28
- package/dist/identity/index.js +1 -1
- package/dist/{index-DwdVrW6q.js → index-Bq96L43f.js} +12 -12
- package/dist/{index-BCw_Ki6z.js → index-CWeNiBX6.js} +2 -2
- package/dist/{index-Chh4z9xW.js → index-yKIOaisE.js} +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/phone/index.js +1 -1
- package/dist/{status-cWCAMAmW.js → status-DzmySsWw.js} +1 -1
- package/package.json +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js +0 -256
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +0 -126
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js +0 -59
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js +0 -65
- package/dist/TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js +0 -270
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js +0 -69
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js +0 -165
|
@@ -3,15 +3,15 @@ import { useI18n as A } from "vue-i18n";
|
|
|
3
3
|
import { _ as B } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
4
4
|
import { _ as V } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
|
|
5
5
|
import { u as D } from "./format-B8mJm946.js";
|
|
6
|
-
import { _ as p } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { e as b } from "./control-
|
|
6
|
+
import { _ as p } from "./FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js";
|
|
7
|
+
import { e as b } from "./control-B_Nwtmag.js";
|
|
8
8
|
import { u as U } from "./describeError-B-NMa--w.js";
|
|
9
|
-
import { c as q, P as z, b as F, _ as L, i as O, d as T } from "./index-
|
|
9
|
+
import { c as q, P as z, b as F, _ as L, i as O, d as T } from "./index-Bq96L43f.js";
|
|
10
10
|
import { t as h } from "./toast-CqSDTWRX.js";
|
|
11
11
|
import { u as j, h as G } from "./platform-q3cjODLx.js";
|
|
12
12
|
import { b as H } from "./routeResource-DlTsGTg_.js";
|
|
13
13
|
import { _ as J } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
14
|
-
import { _ as K } from "./ActionRow.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as K } from "./ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js";
|
|
15
15
|
import { _ as M } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
16
16
|
const Q = {
|
|
17
17
|
key: 0,
|
|
@@ -3,10 +3,10 @@ import { useI18n as x } from "vue-i18n";
|
|
|
3
3
|
import { useRoute as y, useRouter as h } from "vue-router";
|
|
4
4
|
import { _ as I } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
5
5
|
import { _ as N } from "./Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js";
|
|
6
|
-
import { _ as S } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as a } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as S } from "./FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js";
|
|
7
|
+
import { _ as a } from "./TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js";
|
|
8
8
|
import { r as $ } from "./guards-Dve61KjR.js";
|
|
9
|
-
import { u as C, a as E } from "./index-
|
|
9
|
+
import { u as C, a as E } from "./index-Bq96L43f.js";
|
|
10
10
|
const V = { class: "flex flex-1 flex-col items-center justify-center gap-8" }, k = { class: "text-xl font-semibold text-content-strong" }, H = /* @__PURE__ */ d({
|
|
11
11
|
__name: "SignInPage",
|
|
12
12
|
setup(q) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, ref as m, watch as p, openBlock as c, createElementBlock as v, createVNode as i, unref as e, withCtx as w, createBlock as x, createCommentVNode as y, createElementVNode as V, toDisplayString as $ } from "vue";
|
|
2
2
|
import { useI18n as N } from "vue-i18n";
|
|
3
|
-
import { P as S, i as b } from "./index-
|
|
3
|
+
import { P as S, i as b } from "./index-Bq96L43f.js";
|
|
4
4
|
import { u as k } from "./platform-q3cjODLx.js";
|
|
5
5
|
import { b as I } from "./routeResource-DlTsGTg_.js";
|
|
6
6
|
import { _ as R } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as v, useModel as w, computed as y, openBlock as g, createBlock as k, mergeProps as _, unref as t, createSlots as $, withCtx as l, createElementVNode as s, renderSlot as i, normalizeClass as d, normalizeStyle as B, toDisplayString as S, mergeModels as z, mergeDefaults as C } from "vue";
|
|
2
|
+
import { useI18n as M } from "vue-i18n";
|
|
3
|
+
import { u as V, _ as D, f as T, b as E } from "./control-B_Nwtmag.js";
|
|
4
|
+
const F = { class: "flex items-center gap-2" }, I = ["id", "aria-checked", "aria-label", "aria-describedby", "aria-invalid", "disabled"], P = { class: "sr-only" }, Z = /* @__PURE__ */ v({
|
|
5
|
+
__name: "SwitchField",
|
|
6
|
+
props: /* @__PURE__ */ z(/* @__PURE__ */ C({
|
|
7
|
+
label: {},
|
|
8
|
+
labelHidden: { type: Boolean },
|
|
9
|
+
hint: {},
|
|
10
|
+
error: {},
|
|
11
|
+
required: { type: Boolean },
|
|
12
|
+
editable: { type: Boolean },
|
|
13
|
+
disabled: { type: Boolean },
|
|
14
|
+
lockedReason: {},
|
|
15
|
+
presentation: {},
|
|
16
|
+
name: {},
|
|
17
|
+
size: {}
|
|
18
|
+
}, { ...E, size: "md" }), {
|
|
19
|
+
modelValue: { type: Boolean, default: !1 },
|
|
20
|
+
modelModifiers: {}
|
|
21
|
+
}),
|
|
22
|
+
emits: ["update:modelValue"],
|
|
23
|
+
setup(n) {
|
|
24
|
+
const a = n, e = w(n, "modelValue"), { t: r } = M(), { editable: c } = V(a), u = {
|
|
25
|
+
sm: { "--switch-w": "1.75rem", "--switch-h": "1rem" },
|
|
26
|
+
md: { "--switch-w": "var(--app-switch-width)", "--switch-h": "var(--app-switch-height)" },
|
|
27
|
+
lg: { "--switch-w": "3.1875rem", "--switch-h": "1.9375rem" }
|
|
28
|
+
}, m = y(() => u[a.size]);
|
|
29
|
+
function f() {
|
|
30
|
+
!a.disabled && c.value && (e.value = !e.value);
|
|
31
|
+
}
|
|
32
|
+
return (o, q) => (g(), k(D, _(t(T)(a), {
|
|
33
|
+
value: e.value,
|
|
34
|
+
"row-layout": "setting"
|
|
35
|
+
}), $({
|
|
36
|
+
default: l(({ id: h, describedby: b, invalid: p }) => [
|
|
37
|
+
s("div", F, [
|
|
38
|
+
i(o.$slots, "before"),
|
|
39
|
+
s("button", {
|
|
40
|
+
id: h,
|
|
41
|
+
type: "button",
|
|
42
|
+
role: "switch",
|
|
43
|
+
"aria-checked": e.value,
|
|
44
|
+
"aria-label": a.label,
|
|
45
|
+
"aria-describedby": b,
|
|
46
|
+
"aria-invalid": p || void 0,
|
|
47
|
+
disabled: a.disabled,
|
|
48
|
+
style: B(m.value),
|
|
49
|
+
class: d(["hit-target relative inline-flex h-(--switch-h) w-(--switch-w) shrink-0 cursor-pointer rounded-full transition-colors duration-motion-fast ease-motion-standard focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-45", e.value ? "bg-control-on" : "bg-fill-strong"]),
|
|
50
|
+
onClick: f
|
|
51
|
+
}, [
|
|
52
|
+
s("span", {
|
|
53
|
+
class: d(["pointer-events-none absolute left-0.5 top-0.5 size-[calc(var(--switch-h)-0.25rem)] rounded-full bg-white shadow-knob transition-transform duration-motion-normal ease-motion-standard", e.value ? "translate-x-[calc(var(--switch-w)-var(--switch-h))]" : ""])
|
|
54
|
+
}, null, 2),
|
|
55
|
+
s("span", P, S(e.value ? t(r)("core.form.yes") : t(r)("core.form.no")), 1)
|
|
56
|
+
], 14, I)
|
|
57
|
+
])
|
|
58
|
+
]),
|
|
59
|
+
_: 2
|
|
60
|
+
}, [
|
|
61
|
+
o.$slots.trailing ? {
|
|
62
|
+
name: "trailing",
|
|
63
|
+
fn: l(() => [
|
|
64
|
+
i(o.$slots, "trailing")
|
|
65
|
+
]),
|
|
66
|
+
key: "0"
|
|
67
|
+
} : void 0,
|
|
68
|
+
o.$slots.labelTrailing ? {
|
|
69
|
+
name: "labelTrailing",
|
|
70
|
+
fn: l(() => [
|
|
71
|
+
i(o.$slots, "labelTrailing")
|
|
72
|
+
]),
|
|
73
|
+
key: "1"
|
|
74
|
+
} : void 0,
|
|
75
|
+
o.$slots.readonly ? {
|
|
76
|
+
name: "readonly",
|
|
77
|
+
fn: l(() => [
|
|
78
|
+
i(o.$slots, "readonly")
|
|
79
|
+
]),
|
|
80
|
+
key: "2"
|
|
81
|
+
} : void 0
|
|
82
|
+
]), 1040, ["value"]));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
Z as _
|
|
87
|
+
};
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { defineComponent as O, useTemplateRef as z, computed as y, watch as ee, nextTick as te, openBlock as n, createElementBlock as i, withModifiers as oe, normalizeStyle as se, unref as s, createElementVNode as m, toDisplayString as r, createCommentVNode as u, Fragment as E, renderList as ne, normalizeClass as B, createBlock as A, createTextVNode as F, useModel as ae, ref as ie, mergeProps as le, createSlots as re, withCtx as q, withDirectives as ce, vModelDynamic as de, renderSlot as P, mergeModels as K, mergeDefaults as ue } from "vue";
|
|
2
|
+
import { useI18n as G } from "vue-i18n";
|
|
3
|
+
import { b as pe } from "./controlSurface-t7OEFESJ.js";
|
|
4
|
+
import { a as me, c as fe, _ as he, f as ve, b as ge } from "./control-B_Nwtmag.js";
|
|
5
|
+
import { _ as ye } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
+
import { u as xe } from "./anchored-Cj4--8dT.js";
|
|
7
|
+
import { l as U, m as be, u as ke, c as _e } from "./suggestions-BxMm6MQA.js";
|
|
8
|
+
const we = ["id", "aria-busy"], $e = { class: "min-h-0 flex-1 overflow-y-auto p-1.5" }, Me = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "px-2.5 pb-1 pt-1.5 text-caption font-semibold uppercase text-content-disabled",
|
|
11
|
+
role: "presentation"
|
|
12
|
+
}, qe = ["id", "aria-selected", "aria-disabled", "onMouseenter", "onClick"], Be = { class: "min-w-0 flex-1" }, Le = { class: "block truncate text-body text-content-strong" }, Se = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "font-semibold"
|
|
15
|
+
}, Ce = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "block truncate text-footnote text-content-muted"
|
|
18
|
+
}, De = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "px-3 py-2 text-footnote text-content-muted",
|
|
21
|
+
role: "status"
|
|
22
|
+
}, Ve = {
|
|
23
|
+
key: 3,
|
|
24
|
+
class: "px-3 py-2 text-footnote text-content-destructive",
|
|
25
|
+
role: "alert"
|
|
26
|
+
}, Te = {
|
|
27
|
+
key: 4,
|
|
28
|
+
class: "px-3 py-2 text-footnote text-content-muted"
|
|
29
|
+
}, Ee = {
|
|
30
|
+
key: 0,
|
|
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
|
+
"aria-hidden": "true"
|
|
33
|
+
}, Fe = /* @__PURE__ */ O({
|
|
34
|
+
__name: "SuggestionList",
|
|
35
|
+
props: {
|
|
36
|
+
id: {},
|
|
37
|
+
anchor: {},
|
|
38
|
+
open: { type: Boolean },
|
|
39
|
+
items: {},
|
|
40
|
+
highlighted: {},
|
|
41
|
+
query: {},
|
|
42
|
+
status: {},
|
|
43
|
+
recent: { type: Boolean },
|
|
44
|
+
emptyMessage: { type: Boolean },
|
|
45
|
+
hint: {}
|
|
46
|
+
},
|
|
47
|
+
emits: ["pick", "hover"],
|
|
48
|
+
setup(w, { emit: L }) {
|
|
49
|
+
const o = w, t = L, { t: c } = G(), b = z("panel"), k = y(() => U(o.open, o.items.length, o.status, o.emptyMessage)), _ = y(() => o.status === "loading"), f = (h) => be(h.label, o.query), { style: S } = xe(b, {
|
|
50
|
+
reference: () => o.anchor,
|
|
51
|
+
placement: () => "bottom-start",
|
|
52
|
+
offset: 4,
|
|
53
|
+
padding: 8,
|
|
54
|
+
fit: (h, v) => {
|
|
55
|
+
h.style.width = `${o.anchor?.offsetWidth ?? 0}px`, h.style.maxHeight = `${Math.max(120, Math.min(320, v.height))}px`;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return ee(() => o.highlighted, () => void te(() => b.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" }))), (h, v) => k.value ? (n(), i("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
id: `${o.id}-list`,
|
|
61
|
+
ref_key: "panel",
|
|
62
|
+
ref: b,
|
|
63
|
+
role: "listbox",
|
|
64
|
+
"aria-busy": _.value || void 0,
|
|
65
|
+
style: se(s(S)),
|
|
66
|
+
"data-test": "suggestion-list",
|
|
67
|
+
class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float",
|
|
68
|
+
onMousedown: v[0] || (v[0] = oe(() => {
|
|
69
|
+
}, ["prevent"]))
|
|
70
|
+
}, [
|
|
71
|
+
m("div", $e, [
|
|
72
|
+
o.recent ? (n(), i("p", Me, r(s(c)("core.form.suggestions.recent")), 1)) : u("", !0),
|
|
73
|
+
o.items.length > 0 ? (n(!0), i(E, { key: 1 }, ne(o.items, (a, g) => (n(), i("div", {
|
|
74
|
+
id: `${o.id}-option-${g}`,
|
|
75
|
+
key: String(a.value),
|
|
76
|
+
role: "option",
|
|
77
|
+
"aria-selected": g === o.highlighted,
|
|
78
|
+
"aria-disabled": a.disabled || void 0,
|
|
79
|
+
"data-test": "suggestion-option",
|
|
80
|
+
class: B(["flex cursor-pointer items-center gap-2.5 rounded-control px-2.5 py-2", [g === o.highlighted ? "bg-tint-soft" : "hover:bg-fill", a.disabled ? "cursor-not-allowed opacity-45" : "", _.value ? "opacity-60" : ""]]),
|
|
81
|
+
onMouseenter: (l) => t("hover", g),
|
|
82
|
+
onClick: (l) => !a.disabled && t("pick", a)
|
|
83
|
+
}, [
|
|
84
|
+
o.recent ? (n(), A(s(ye), {
|
|
85
|
+
key: 0,
|
|
86
|
+
name: "history",
|
|
87
|
+
size: 16,
|
|
88
|
+
class: "shrink-0 text-content-disabled"
|
|
89
|
+
})) : u("", !0),
|
|
90
|
+
m("span", Be, [
|
|
91
|
+
m("span", Le, [
|
|
92
|
+
o.recent ? (n(), i(E, { key: 0 }, [
|
|
93
|
+
F(r(a.label), 1)
|
|
94
|
+
], 64)) : (n(), i(E, { key: 1 }, [
|
|
95
|
+
F(r(f(a).before), 1),
|
|
96
|
+
f(a).match ? (n(), i("strong", Se, r(f(a).match), 1)) : u("", !0),
|
|
97
|
+
F(r(f(a).after), 1)
|
|
98
|
+
], 64))
|
|
99
|
+
]),
|
|
100
|
+
a.description ? (n(), i("span", Ce, r(a.description), 1)) : u("", !0)
|
|
101
|
+
])
|
|
102
|
+
], 42, qe))), 128)) : o.status === "loading" ? (n(), i("p", De, r(s(c)("core.form.select.loading")), 1)) : o.status === "failed" ? (n(), i("p", Ve, r(s(c)("core.form.select.failed")), 1)) : (n(), i("p", Te, r(s(c)("core.form.select.no_matches")), 1))
|
|
103
|
+
]),
|
|
104
|
+
o.hint && o.items.length > 0 ? (n(), i("p", Ee, r(o.hint), 1)) : u("", !0)
|
|
105
|
+
], 44, we)) : u("", !0);
|
|
106
|
+
}
|
|
107
|
+
}), Pe = {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: "shrink-0 text-footnote text-content-muted"
|
|
110
|
+
}, ze = { class: "relative min-w-0 flex-1" }, Ae = ["id", "type", "name", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby", "role", "aria-autocomplete", "aria-expanded", "aria-controls", "aria-activedescendant"], Ne = { class: "invisible" }, Re = { class: "text-content-disabled" }, We = {
|
|
111
|
+
key: 1,
|
|
112
|
+
class: "shrink-0 text-footnote text-content-muted"
|
|
113
|
+
}, Je = /* @__PURE__ */ O({
|
|
114
|
+
__name: "TextField",
|
|
115
|
+
props: /* @__PURE__ */ K(/* @__PURE__ */ ue({
|
|
116
|
+
label: {},
|
|
117
|
+
labelHidden: { type: Boolean },
|
|
118
|
+
hint: {},
|
|
119
|
+
error: {},
|
|
120
|
+
required: { type: Boolean },
|
|
121
|
+
editable: { type: Boolean },
|
|
122
|
+
disabled: { type: Boolean },
|
|
123
|
+
lockedReason: {},
|
|
124
|
+
presentation: {},
|
|
125
|
+
name: {},
|
|
126
|
+
type: {},
|
|
127
|
+
placeholder: {},
|
|
128
|
+
maxLength: {},
|
|
129
|
+
autocomplete: {},
|
|
130
|
+
mono: { type: Boolean },
|
|
131
|
+
prefix: {},
|
|
132
|
+
suffix: {},
|
|
133
|
+
width: {},
|
|
134
|
+
suggestions: { type: [Array, Function] },
|
|
135
|
+
suggestionsMinLength: {},
|
|
136
|
+
suggestionsDebounce: {},
|
|
137
|
+
suggestionsLimit: {},
|
|
138
|
+
recents: {}
|
|
139
|
+
}, {
|
|
140
|
+
...ge,
|
|
141
|
+
type: "text",
|
|
142
|
+
placeholder: void 0,
|
|
143
|
+
maxLength: void 0,
|
|
144
|
+
autocomplete: void 0,
|
|
145
|
+
mono: !1,
|
|
146
|
+
prefix: void 0,
|
|
147
|
+
suffix: void 0,
|
|
148
|
+
width: "md",
|
|
149
|
+
suggestions: void 0,
|
|
150
|
+
suggestionsMinLength: 2,
|
|
151
|
+
suggestionsDebounce: 300,
|
|
152
|
+
suggestionsLimit: 8,
|
|
153
|
+
recents: void 0
|
|
154
|
+
}), {
|
|
155
|
+
modelValue: { default: "" },
|
|
156
|
+
modelModifiers: {}
|
|
157
|
+
}),
|
|
158
|
+
emits: /* @__PURE__ */ K(["picked"], ["update:modelValue"]),
|
|
159
|
+
setup(w, { expose: L, emit: o }) {
|
|
160
|
+
const t = w, c = ae(w, "modelValue"), b = o, k = z("input"), _ = z("anchor"), f = !!me(), S = fe("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), h = y(() => f ? pe(t.width) : "w-full"), { t: v } = G(), a = (e) => typeof e == "string" ? { value: e, label: e } : { value: e.text, label: e.text, ...e.detail !== void 0 ? { description: e.detail } : {} }, g = y(() => {
|
|
161
|
+
const e = t.suggestions;
|
|
162
|
+
if (e)
|
|
163
|
+
return typeof e == "function" ? async (p, x) => (await e(p, x)).map(a) : e.map(a);
|
|
164
|
+
}), l = y(() => g.value !== void 0), d = ke({
|
|
165
|
+
source: () => g.value,
|
|
166
|
+
minLength: () => t.suggestionsMinLength,
|
|
167
|
+
debounce: () => t.suggestionsDebounce,
|
|
168
|
+
limit: () => t.suggestionsLimit,
|
|
169
|
+
listAllWhenEmpty: !1,
|
|
170
|
+
recents: () => t.recents
|
|
171
|
+
}), { items: C, open: D, status: N, highlighted: R, showingRecent: W } = d, H = ie(!0), V = () => {
|
|
172
|
+
const e = k.value;
|
|
173
|
+
H.value = !e || e.selectionStart === e.value.length && e.selectionEnd === e.value.length;
|
|
174
|
+
}, $ = y(() => l.value && D.value && !W.value && H.value && d.current.value ? _e(c.value, d.current.value.label) : ""), I = y(() => U(D.value, C.value.length, N.value, !1));
|
|
175
|
+
function j(e) {
|
|
176
|
+
V(), l.value && d.ask(e.target.value);
|
|
177
|
+
}
|
|
178
|
+
function T(e) {
|
|
179
|
+
c.value = e.value, d.remember(e), d.close(), b("picked", { text: e.value, ...e.description !== void 0 ? { detail: e.description } : {} });
|
|
180
|
+
}
|
|
181
|
+
function J() {
|
|
182
|
+
l.value && c.value === "" && d.show("");
|
|
183
|
+
}
|
|
184
|
+
function Q() {
|
|
185
|
+
const e = d.current.value;
|
|
186
|
+
return !$.value || !e ? !1 : (T(e), !0);
|
|
187
|
+
}
|
|
188
|
+
const X = (e) => {
|
|
189
|
+
l.value && d.keydown(e, { pick: T, enterNeedsMove: !0, complete: Q });
|
|
190
|
+
};
|
|
191
|
+
return L({ focus: () => k.value?.focus() }), (e, p) => (n(), A(he, le(s(ve)(t), {
|
|
192
|
+
value: c.value,
|
|
193
|
+
prefix: t.prefix,
|
|
194
|
+
suffix: t.suffix,
|
|
195
|
+
"value-style": t.mono ? "mono" : void 0
|
|
196
|
+
}), re({
|
|
197
|
+
default: q(({ id: x, describedby: Y, invalid: Z }) => [
|
|
198
|
+
m("div", {
|
|
199
|
+
ref_key: "anchor",
|
|
200
|
+
ref: _,
|
|
201
|
+
class: B(["flex items-center gap-1.5", [s(S), h.value]])
|
|
202
|
+
}, [
|
|
203
|
+
t.prefix ? (n(), i("span", Pe, r(t.prefix), 1)) : u("", !0),
|
|
204
|
+
m("div", ze, [
|
|
205
|
+
ce(m("input", {
|
|
206
|
+
id: x,
|
|
207
|
+
ref_key: "input",
|
|
208
|
+
ref: k,
|
|
209
|
+
"onUpdate:modelValue": p[0] || (p[0] = (M) => c.value = M),
|
|
210
|
+
type: t.type,
|
|
211
|
+
name: t.name,
|
|
212
|
+
placeholder: t.placeholder,
|
|
213
|
+
maxlength: t.maxLength,
|
|
214
|
+
autocomplete: l.value ? "off" : t.autocomplete,
|
|
215
|
+
disabled: t.disabled,
|
|
216
|
+
required: t.required,
|
|
217
|
+
"aria-required": t.required || void 0,
|
|
218
|
+
"aria-invalid": Z || void 0,
|
|
219
|
+
"aria-describedby": Y,
|
|
220
|
+
role: l.value ? "combobox" : void 0,
|
|
221
|
+
"aria-autocomplete": l.value ? "both" : void 0,
|
|
222
|
+
"aria-expanded": l.value ? I.value : void 0,
|
|
223
|
+
"aria-controls": l.value ? `${x}-list` : void 0,
|
|
224
|
+
"aria-activedescendant": l.value && I.value && s(C).length > 0 ? `${x}-option-${s(R)}` : void 0,
|
|
225
|
+
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" : "", f && !l.value ? "compact:text-right" : ""]]),
|
|
226
|
+
onInput: j,
|
|
227
|
+
onKeyup: V,
|
|
228
|
+
onClick: V,
|
|
229
|
+
onKeydown: X,
|
|
230
|
+
onFocus: J,
|
|
231
|
+
onBlur: p[1] || (p[1] = (M) => s(d).close())
|
|
232
|
+
}, null, 42, Ae), [
|
|
233
|
+
[de, c.value]
|
|
234
|
+
]),
|
|
235
|
+
$.value ? (n(), i("span", {
|
|
236
|
+
key: 0,
|
|
237
|
+
"aria-hidden": "true",
|
|
238
|
+
class: B(["pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre py-1 text-body", t.mono ? "font-mono" : ""]),
|
|
239
|
+
"data-test": "completion"
|
|
240
|
+
}, [
|
|
241
|
+
m("span", Ne, r(c.value), 1),
|
|
242
|
+
m("span", Re, r($.value), 1)
|
|
243
|
+
], 2)) : u("", !0)
|
|
244
|
+
]),
|
|
245
|
+
t.suffix ? (n(), i("span", We, r(t.suffix), 1)) : u("", !0)
|
|
246
|
+
], 2),
|
|
247
|
+
l.value ? (n(), A(Fe, {
|
|
248
|
+
key: 0,
|
|
249
|
+
id: x,
|
|
250
|
+
anchor: _.value,
|
|
251
|
+
open: s(D),
|
|
252
|
+
items: s(C),
|
|
253
|
+
highlighted: s(R),
|
|
254
|
+
query: c.value,
|
|
255
|
+
status: s(N),
|
|
256
|
+
recent: s(W),
|
|
257
|
+
"empty-message": !1,
|
|
258
|
+
hint: $.value ? s(v)("core.form.suggestions.keys_complete") : s(v)("core.form.suggestions.keys_pick"),
|
|
259
|
+
onPick: T,
|
|
260
|
+
onHover: p[2] || (p[2] = (M) => s(d).highlight(M))
|
|
261
|
+
}, null, 8, ["id", "anchor", "open", "items", "highlighted", "query", "status", "recent", "hint"])) : u("", !0)
|
|
262
|
+
]),
|
|
263
|
+
_: 2
|
|
264
|
+
}, [
|
|
265
|
+
e.$slots.trailing ? {
|
|
266
|
+
name: "trailing",
|
|
267
|
+
fn: q(() => [
|
|
268
|
+
P(e.$slots, "trailing")
|
|
269
|
+
]),
|
|
270
|
+
key: "0"
|
|
271
|
+
} : void 0,
|
|
272
|
+
e.$slots.labelTrailing ? {
|
|
273
|
+
name: "labelTrailing",
|
|
274
|
+
fn: q(() => [
|
|
275
|
+
P(e.$slots, "labelTrailing")
|
|
276
|
+
]),
|
|
277
|
+
key: "1"
|
|
278
|
+
} : void 0,
|
|
279
|
+
e.$slots.readonly ? {
|
|
280
|
+
name: "readonly",
|
|
281
|
+
fn: q(() => [
|
|
282
|
+
P(e.$slots, "readonly")
|
|
283
|
+
]),
|
|
284
|
+
key: "2"
|
|
285
|
+
} : void 0
|
|
286
|
+
]), 1040, ["value", "prefix", "suffix", "value-style"]));
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
export {
|
|
290
|
+
Je as _,
|
|
291
|
+
Fe as a
|
|
292
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent as q, useModel as C, useTemplateRef as T, computed as n, openBlock as c, createBlock as V, mergeProps as _, unref as m, createSlots as L, withCtx as t, createElementVNode as p, normalizeClass as f, withDirectives as M, vModelText as D, createElementBlock as S, toDisplayString as z, createCommentVNode as E, renderSlot as s, mergeModels as F, mergeDefaults as P } from "vue";
|
|
2
|
+
import { u as R } from "./mediaQuery-CygcXmFW.js";
|
|
3
|
+
import { a as N, u as j, c as G, _ as H, f as U, b as A } from "./control-B_Nwtmag.js";
|
|
4
|
+
const I = ["id", "name", "rows", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], J = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mt-1 self-end text-footnote tabular-nums text-content-muted"
|
|
7
|
+
}, W = /* @__PURE__ */ q({
|
|
8
|
+
__name: "TextareaField",
|
|
9
|
+
props: /* @__PURE__ */ F(/* @__PURE__ */ P({
|
|
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
|
+
}, { ...A, placeholder: void 0, maxLength: void 0, rows: 3, autocomplete: void 0, stacked: !1 }), {
|
|
26
|
+
modelValue: { default: "" },
|
|
27
|
+
modelModifiers: {}
|
|
28
|
+
}),
|
|
29
|
+
emits: ["update:modelValue"],
|
|
30
|
+
setup(d, { expose: v }) {
|
|
31
|
+
const e = d, o = C(d, "modelValue"), i = T("area"), b = !!N(), y = R(), { editable: g } = j(e), r = n(() => b && !e.stacked && !y.value && g.value && !!e.label), l = n(() => e.maxLength ? `${o.value.length} / ${e.maxLength}` : void 0), h = n(() => r.value && l.value ? [e.hint, l.value].filter(Boolean).join(" · ") : e.hint), k = G("area", () => e.error ? "error" : e.disabled ? "locked" : "rest");
|
|
32
|
+
return v({ focus: () => i.value?.focus() }), (a, u) => (c(), V(H, _({ ...m(U)(e), hint: h.value }, {
|
|
33
|
+
value: o.value,
|
|
34
|
+
"row-layout": r.value ? "entry" : "stacked",
|
|
35
|
+
"row-label-align": "top"
|
|
36
|
+
}), L({
|
|
37
|
+
default: t(({ id: w, describedby: x, invalid: B }) => [
|
|
38
|
+
p("div", {
|
|
39
|
+
class: f(["w-full", m(k)])
|
|
40
|
+
}, [
|
|
41
|
+
M(p("textarea", {
|
|
42
|
+
id: w,
|
|
43
|
+
ref_key: "area",
|
|
44
|
+
ref: i,
|
|
45
|
+
"onUpdate:modelValue": u[0] || (u[0] = ($) => o.value = $),
|
|
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": B || void 0,
|
|
55
|
+
"aria-describedby": x,
|
|
56
|
+
class: f(["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
|
+
}, null, 10, I), [
|
|
58
|
+
[D, o.value]
|
|
59
|
+
])
|
|
60
|
+
], 2),
|
|
61
|
+
!r.value && l.value ? (c(), S("p", J, z(l.value), 1)) : E("", !0)
|
|
62
|
+
]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, [
|
|
65
|
+
a.$slots.trailing ? {
|
|
66
|
+
name: "trailing",
|
|
67
|
+
fn: t(() => [
|
|
68
|
+
s(a.$slots, "trailing")
|
|
69
|
+
]),
|
|
70
|
+
key: "0"
|
|
71
|
+
} : void 0,
|
|
72
|
+
a.$slots.labelTrailing ? {
|
|
73
|
+
name: "labelTrailing",
|
|
74
|
+
fn: t(() => [
|
|
75
|
+
s(a.$slots, "labelTrailing")
|
|
76
|
+
]),
|
|
77
|
+
key: "1"
|
|
78
|
+
} : void 0,
|
|
79
|
+
a.$slots.readonly ? {
|
|
80
|
+
name: "readonly",
|
|
81
|
+
fn: t(() => [
|
|
82
|
+
s(a.$slots, "readonly")
|
|
83
|
+
]),
|
|
84
|
+
key: "2"
|
|
85
|
+
} : void 0
|
|
86
|
+
]), 1040, ["value", "row-layout"]));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export {
|
|
90
|
+
W as _
|
|
91
|
+
};
|