@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
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, useModel as b, computed as w, openBlock as v, createBlock as y, mergeProps as g, unref as a, withCtx as _, createElementVNode as t, renderSlot as k, normalizeClass as i, normalizeStyle as B, toDisplayString as z, mergeModels as S, mergeDefaults as x } from "vue";
|
|
2
|
-
import { useI18n as C } from "vue-i18n";
|
|
3
|
-
import { u as M, _ as V, f as D, b as E } from "./control-CX9BG2UB.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" }, R = /* @__PURE__ */ p({
|
|
5
|
-
__name: "SwitchField",
|
|
6
|
-
props: /* @__PURE__ */ S(/* @__PURE__ */ x({
|
|
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(s) {
|
|
24
|
-
const o = s, e = b(s, "modelValue"), { t: l } = C(), { editable: r } = M(o), n = {
|
|
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
|
-
}, d = w(() => n[o.size]);
|
|
29
|
-
function c() {
|
|
30
|
-
!o.disabled && r.value && (e.value = !e.value);
|
|
31
|
-
}
|
|
32
|
-
return (u, $) => (v(), y(V, g(a(D)(o), {
|
|
33
|
-
value: e.value,
|
|
34
|
-
"row-layout": "setting"
|
|
35
|
-
}), {
|
|
36
|
-
default: _(({ id: m, describedby: h, invalid: f }) => [
|
|
37
|
-
t("div", F, [
|
|
38
|
-
k(u.$slots, "before"),
|
|
39
|
-
t("button", {
|
|
40
|
-
id: m,
|
|
41
|
-
type: "button",
|
|
42
|
-
role: "switch",
|
|
43
|
-
"aria-checked": e.value,
|
|
44
|
-
"aria-label": o.label,
|
|
45
|
-
"aria-describedby": h,
|
|
46
|
-
"aria-invalid": f || void 0,
|
|
47
|
-
disabled: o.disabled,
|
|
48
|
-
style: B(d.value),
|
|
49
|
-
class: i(["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: c
|
|
51
|
-
}, [
|
|
52
|
-
t("span", {
|
|
53
|
-
class: i(["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
|
-
t("span", P, z(e.value ? a(l)("core.form.yes") : a(l)("core.form.no")), 1)
|
|
56
|
-
], 14, I)
|
|
57
|
-
])
|
|
58
|
-
]),
|
|
59
|
-
_: 3
|
|
60
|
-
}, 16, ["value"]));
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
export {
|
|
64
|
-
R as _
|
|
65
|
-
};
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, useTemplateRef as P, computed as y, watch as Y, nextTick as Z, openBlock as n, createElementBlock as i, withModifiers as ee, normalizeStyle as te, unref as s, createElementVNode as m, toDisplayString as r, createCommentVNode as d, Fragment as E, renderList as oe, normalizeClass as q, createBlock as z, createTextVNode as F, useModel as se, ref as ne, mergeProps as ae, withCtx as ie, withDirectives as le, vModelDynamic as re, mergeModels as H, mergeDefaults as ce } from "vue";
|
|
2
|
-
import { useI18n as K } from "vue-i18n";
|
|
3
|
-
import { b as ue } from "./controlSurface-t7OEFESJ.js";
|
|
4
|
-
import { a as de, c as pe, _ as me, f as fe, b as he } from "./control-CX9BG2UB.js";
|
|
5
|
-
import { _ as ve } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
-
import { u as ge } from "./anchored-Cj4--8dT.js";
|
|
7
|
-
import { l as O, m as ye, u as xe, c as be } from "./suggestions-BxMm6MQA.js";
|
|
8
|
-
const _e = ["id", "aria-busy"], ke = { class: "min-h-0 flex-1 overflow-y-auto p-1.5" }, we = {
|
|
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
|
-
}, $e = ["id", "aria-selected", "aria-disabled", "onMouseenter", "onClick"], Me = { class: "min-w-0 flex-1" }, qe = { class: "block truncate text-body text-content-strong" }, Be = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "font-semibold"
|
|
15
|
-
}, Le = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "block truncate text-footnote text-content-muted"
|
|
18
|
-
}, Ce = {
|
|
19
|
-
key: 2,
|
|
20
|
-
class: "px-3 py-2 text-footnote text-content-muted",
|
|
21
|
-
role: "status"
|
|
22
|
-
}, Se = {
|
|
23
|
-
key: 3,
|
|
24
|
-
class: "px-3 py-2 text-footnote text-content-destructive",
|
|
25
|
-
role: "alert"
|
|
26
|
-
}, De = {
|
|
27
|
-
key: 4,
|
|
28
|
-
class: "px-3 py-2 text-footnote text-content-muted"
|
|
29
|
-
}, Ve = {
|
|
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
|
-
}, Ee = /* @__PURE__ */ I({
|
|
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: B }) {
|
|
49
|
-
const o = w, t = B, { t: c } = K(), b = P("panel"), _ = y(() => O(o.open, o.items.length, o.status, o.emptyMessage)), k = y(() => o.status === "loading"), f = (h) => ye(h.label, o.query), { style: L } = ge(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 Y(() => o.highlighted, () => void Z(() => b.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" }))), (h, v) => _.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": k.value || void 0,
|
|
65
|
-
style: te(s(L)),
|
|
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] = ee(() => {
|
|
69
|
-
}, ["prevent"]))
|
|
70
|
-
}, [
|
|
71
|
-
m("div", ke, [
|
|
72
|
-
o.recent ? (n(), i("p", we, r(s(c)("core.form.suggestions.recent")), 1)) : d("", !0),
|
|
73
|
-
o.items.length > 0 ? (n(!0), i(E, { key: 1 }, oe(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: q(["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" : "", k.value ? "opacity-60" : ""]]),
|
|
81
|
-
onMouseenter: (l) => t("hover", g),
|
|
82
|
-
onClick: (l) => !a.disabled && t("pick", a)
|
|
83
|
-
}, [
|
|
84
|
-
o.recent ? (n(), z(s(ve), {
|
|
85
|
-
key: 0,
|
|
86
|
-
name: "history",
|
|
87
|
-
size: 16,
|
|
88
|
-
class: "shrink-0 text-content-disabled"
|
|
89
|
-
})) : d("", !0),
|
|
90
|
-
m("span", Me, [
|
|
91
|
-
m("span", qe, [
|
|
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", Be, r(f(a).match), 1)) : d("", !0),
|
|
97
|
-
F(r(f(a).after), 1)
|
|
98
|
-
], 64))
|
|
99
|
-
]),
|
|
100
|
-
a.description ? (n(), i("span", Le, r(a.description), 1)) : d("", !0)
|
|
101
|
-
])
|
|
102
|
-
], 42, $e))), 128)) : o.status === "loading" ? (n(), i("p", Ce, r(s(c)("core.form.select.loading")), 1)) : o.status === "failed" ? (n(), i("p", Se, r(s(c)("core.form.select.failed")), 1)) : (n(), i("p", De, r(s(c)("core.form.select.no_matches")), 1))
|
|
103
|
-
]),
|
|
104
|
-
o.hint && o.items.length > 0 ? (n(), i("p", Ve, r(o.hint), 1)) : d("", !0)
|
|
105
|
-
], 44, _e)) : d("", !0);
|
|
106
|
-
}
|
|
107
|
-
}), Fe = {
|
|
108
|
-
key: 0,
|
|
109
|
-
class: "shrink-0 text-footnote text-content-muted"
|
|
110
|
-
}, Pe = { 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"], Ae = { class: "invisible" }, Ne = { class: "text-content-disabled" }, Re = {
|
|
111
|
-
key: 1,
|
|
112
|
-
class: "shrink-0 text-footnote text-content-muted"
|
|
113
|
-
}, Ue = /* @__PURE__ */ I({
|
|
114
|
-
__name: "TextField",
|
|
115
|
-
props: /* @__PURE__ */ H(/* @__PURE__ */ ce({
|
|
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
|
-
...he,
|
|
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__ */ H(["picked"], ["update:modelValue"]),
|
|
159
|
-
setup(w, { expose: B, emit: o }) {
|
|
160
|
-
const t = w, c = se(w, "modelValue"), b = o, _ = P("input"), k = P("anchor"), f = !!de(), L = pe("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), h = y(() => f ? ue(t.width) : "w-full"), { t: v } = K(), 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), u = xe({
|
|
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: S, status: A, highlighted: N, showingRecent: R } = u, T = ne(!0), D = () => {
|
|
172
|
-
const e = _.value;
|
|
173
|
-
T.value = !e || e.selectionStart === e.value.length && e.selectionEnd === e.value.length;
|
|
174
|
-
}, $ = y(() => l.value && S.value && !R.value && T.value && u.current.value ? be(c.value, u.current.value.label) : ""), W = y(() => O(S.value, C.value.length, A.value, !1));
|
|
175
|
-
function G(e) {
|
|
176
|
-
D(), l.value && u.ask(e.target.value);
|
|
177
|
-
}
|
|
178
|
-
function V(e) {
|
|
179
|
-
c.value = e.value, u.remember(e), u.close(), b("picked", { text: e.value, ...e.description !== void 0 ? { detail: e.description } : {} });
|
|
180
|
-
}
|
|
181
|
-
function U() {
|
|
182
|
-
l.value && c.value === "" && u.show("");
|
|
183
|
-
}
|
|
184
|
-
function j() {
|
|
185
|
-
const e = u.current.value;
|
|
186
|
-
return !$.value || !e ? !1 : (V(e), !0);
|
|
187
|
-
}
|
|
188
|
-
const J = (e) => {
|
|
189
|
-
l.value && u.keydown(e, { pick: V, enterNeedsMove: !0, complete: j });
|
|
190
|
-
};
|
|
191
|
-
return B({ focus: () => _.value?.focus() }), (e, p) => (n(), z(me, ae(s(fe)(t), {
|
|
192
|
-
value: c.value,
|
|
193
|
-
prefix: t.prefix,
|
|
194
|
-
suffix: t.suffix,
|
|
195
|
-
"value-style": t.mono ? "mono" : void 0
|
|
196
|
-
}), {
|
|
197
|
-
default: ie(({ id: x, describedby: Q, invalid: X }) => [
|
|
198
|
-
m("div", {
|
|
199
|
-
ref_key: "anchor",
|
|
200
|
-
ref: k,
|
|
201
|
-
class: q(["flex items-center gap-1.5", [s(L), h.value]])
|
|
202
|
-
}, [
|
|
203
|
-
t.prefix ? (n(), i("span", Fe, r(t.prefix), 1)) : d("", !0),
|
|
204
|
-
m("div", Pe, [
|
|
205
|
-
le(m("input", {
|
|
206
|
-
id: x,
|
|
207
|
-
ref_key: "input",
|
|
208
|
-
ref: _,
|
|
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": X || void 0,
|
|
219
|
-
"aria-describedby": Q,
|
|
220
|
-
role: l.value ? "combobox" : void 0,
|
|
221
|
-
"aria-autocomplete": l.value ? "both" : void 0,
|
|
222
|
-
"aria-expanded": l.value ? W.value : void 0,
|
|
223
|
-
"aria-controls": l.value ? `${x}-list` : void 0,
|
|
224
|
-
"aria-activedescendant": l.value && W.value && s(C).length > 0 ? `${x}-option-${s(N)}` : void 0,
|
|
225
|
-
class: q(["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: G,
|
|
227
|
-
onKeyup: D,
|
|
228
|
-
onClick: D,
|
|
229
|
-
onKeydown: J,
|
|
230
|
-
onFocus: U,
|
|
231
|
-
onBlur: p[1] || (p[1] = (M) => s(u).close())
|
|
232
|
-
}, null, 42, ze), [
|
|
233
|
-
[re, c.value]
|
|
234
|
-
]),
|
|
235
|
-
$.value ? (n(), i("span", {
|
|
236
|
-
key: 0,
|
|
237
|
-
"aria-hidden": "true",
|
|
238
|
-
class: q(["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", Ae, r(c.value), 1),
|
|
242
|
-
m("span", Ne, r($.value), 1)
|
|
243
|
-
], 2)) : d("", !0)
|
|
244
|
-
]),
|
|
245
|
-
t.suffix ? (n(), i("span", Re, r(t.suffix), 1)) : d("", !0)
|
|
246
|
-
], 2),
|
|
247
|
-
l.value ? (n(), z(Ee, {
|
|
248
|
-
key: 0,
|
|
249
|
-
id: x,
|
|
250
|
-
anchor: k.value,
|
|
251
|
-
open: s(S),
|
|
252
|
-
items: s(C),
|
|
253
|
-
highlighted: s(N),
|
|
254
|
-
query: c.value,
|
|
255
|
-
status: s(A),
|
|
256
|
-
recent: s(R),
|
|
257
|
-
"empty-message": !1,
|
|
258
|
-
hint: $.value ? s(v)("core.form.suggestions.keys_complete") : s(v)("core.form.suggestions.keys_pick"),
|
|
259
|
-
onPick: V,
|
|
260
|
-
onHover: p[2] || (p[2] = (M) => s(u).highlight(M))
|
|
261
|
-
}, null, 8, ["id", "anchor", "open", "items", "highlighted", "query", "status", "recent", "hint"])) : d("", !0)
|
|
262
|
-
]),
|
|
263
|
-
_: 1
|
|
264
|
-
}, 16, ["value", "prefix", "suffix", "value-style"]));
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
export {
|
|
268
|
-
Ue as _,
|
|
269
|
-
Ee as a
|
|
270
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, useModel as _, useTemplateRef as B, computed as l, openBlock as d, createBlock as q, mergeProps as C, unref as i, withCtx as V, createElementVNode as u, normalizeClass as c, withDirectives as L, vModelText as M, createElementBlock as D, toDisplayString as z, createCommentVNode as E, mergeModels as F, mergeDefaults as P } from "vue";
|
|
2
|
-
import { u as R } from "./mediaQuery-CygcXmFW.js";
|
|
3
|
-
import { a as T, u as $, c as N, _ as S, f as j, b as G } from "./control-CX9BG2UB.js";
|
|
4
|
-
const H = ["id", "name", "rows", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], U = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "mt-1 self-end text-footnote tabular-nums text-content-muted"
|
|
7
|
-
}, O = /* @__PURE__ */ k({
|
|
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
|
-
}, { ...G, 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(r, { expose: m }) {
|
|
31
|
-
const e = r, a = _(r, "modelValue"), s = B("area"), p = !!T(), f = R(), { editable: v } = $(e), t = l(() => p && !e.stacked && !f.value && v.value && !!e.label), o = l(() => e.maxLength ? `${a.value.length} / ${e.maxLength}` : void 0), b = l(() => t.value && o.value ? [e.hint, o.value].filter(Boolean).join(" · ") : e.hint), h = N("area", () => e.error ? "error" : e.disabled ? "locked" : "rest");
|
|
32
|
-
return m({ focus: () => s.value?.focus() }), (A, n) => (d(), q(S, C({ ...i(j)(e), hint: b.value }, {
|
|
33
|
-
value: a.value,
|
|
34
|
-
"row-layout": t.value ? "entry" : "stacked",
|
|
35
|
-
"row-label-align": "top"
|
|
36
|
-
}), {
|
|
37
|
-
default: V(({ id: x, describedby: y, invalid: g }) => [
|
|
38
|
-
u("div", {
|
|
39
|
-
class: c(["w-full", i(h)])
|
|
40
|
-
}, [
|
|
41
|
-
L(u("textarea", {
|
|
42
|
-
id: x,
|
|
43
|
-
ref_key: "area",
|
|
44
|
-
ref: s,
|
|
45
|
-
"onUpdate:modelValue": n[0] || (n[0] = (w) => a.value = w),
|
|
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": g || void 0,
|
|
55
|
-
"aria-describedby": y,
|
|
56
|
-
class: c(["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, H), [
|
|
58
|
-
[M, a.value]
|
|
59
|
-
])
|
|
60
|
-
], 2),
|
|
61
|
-
!t.value && o.value ? (d(), D("p", U, z(o.value), 1)) : E("", !0)
|
|
62
|
-
]),
|
|
63
|
-
_: 1
|
|
64
|
-
}, 16, ["value", "row-layout"]));
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
export {
|
|
68
|
-
O as _
|
|
69
|
-
};
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { computed as u, defineComponent as H, useModel as K, useTemplateRef as v, openBlock as m, createBlock as E, mergeProps as w, unref as t, withCtx as b, createElementBlock as x, Fragment as N, createVNode as d, createTextVNode as W, toDisplayString as j, createCommentVNode as P, createElementVNode as h, normalizeClass as G, mergeModels as J, mergeDefaults as O, nextTick as U } from "vue";
|
|
2
|
-
import { useI18n as L } from "vue-i18n";
|
|
3
|
-
import { _ as X } from "./DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
|
|
4
|
-
import { u as Y } from "./format-B8mJm946.js";
|
|
5
|
-
import { _ as Z } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
-
import { u as ee } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
-
import { _ as te } from "./Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
|
|
8
|
-
import { c as oe, _ as ae, f as re, b as le } from "./control-CX9BG2UB.js";
|
|
9
|
-
import { d as se, r as ie, t as z, p as ne, u as ue, a as me, i as F, _ as de, b as ce, c as pe } from "./useTypedEntry-aTfPBAhw.js";
|
|
10
|
-
function fe(i) {
|
|
11
|
-
const { t: n } = L(), e = u(() => [n("core.form.time.words.now").toLowerCase(), "now"]);
|
|
12
|
-
return {
|
|
13
|
-
placeholder: u(() => n("core.form.time.placeholder")),
|
|
14
|
-
parse(o) {
|
|
15
|
-
if (e.value.includes(o.trim().toLowerCase())) return { value: z(i()) };
|
|
16
|
-
const r = ne(o, i());
|
|
17
|
-
return "time" in r ? { value: r.time } : { error: r.error === "step" ? n("core.form.time.step", { step: i() }) : n("core.form.time.invalid") };
|
|
18
|
-
},
|
|
19
|
-
shortcuts: (o) => (o ?? se).map((r) => ie(r, n("core.form.time.now"), z(i())))
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const ve = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], be = ["aria-label", "onClick"], Ce = /* @__PURE__ */ H({
|
|
23
|
-
__name: "TimeField",
|
|
24
|
-
props: /* @__PURE__ */ J(/* @__PURE__ */ O({
|
|
25
|
-
label: {},
|
|
26
|
-
labelHidden: { type: Boolean },
|
|
27
|
-
hint: {},
|
|
28
|
-
error: {},
|
|
29
|
-
required: { type: Boolean },
|
|
30
|
-
editable: { type: Boolean },
|
|
31
|
-
disabled: { type: Boolean },
|
|
32
|
-
lockedReason: {},
|
|
33
|
-
presentation: {},
|
|
34
|
-
name: {},
|
|
35
|
-
minuteStep: {},
|
|
36
|
-
quickTimes: {}
|
|
37
|
-
}, { ...le, minuteStep: 1, quickTimes: void 0 }), {
|
|
38
|
-
modelValue: { default: null },
|
|
39
|
-
modelModifiers: {}
|
|
40
|
-
}),
|
|
41
|
-
emits: ["update:modelValue"],
|
|
42
|
-
setup(i, { expose: n }) {
|
|
43
|
-
const e = i, o = K(i, "modelValue"), { t: r } = L(), M = Y(), I = ee(), T = v("input"), c = v("popover"), g = v("panel"), q = v("sheet"), k = fe(() => e.minuteStep), l = ue({ model: o, display: (a) => a, parse: k.parse }), C = u(() => k.shortcuts(e.quickTimes)), V = u(() => e.error || l.message.value), Q = oe("date", () => V.value ? "error" : e.disabled ? "locked" : "rest"), R = u(() => {
|
|
44
|
-
const a = me(o.value);
|
|
45
|
-
return a ? M.time(new Date(2e3, 0, 1, a.hour, a.minute)) : null;
|
|
46
|
-
}), $ = u(() => F(l.typed.value) ? l.typed.value : F(o.value) ? o.value : null);
|
|
47
|
-
async function y(a) {
|
|
48
|
-
e.disabled || (c.value?.present(), a && (await U(), await U(), g.value?.querySelector("[role=listbox]")?.focus()));
|
|
49
|
-
}
|
|
50
|
-
function A(a) {
|
|
51
|
-
a.key === "Enter" ? (l.commit(), c.value?.dismiss()) : a.key === "ArrowDown" && (a.preventDefault(), y(!0));
|
|
52
|
-
}
|
|
53
|
-
return n({ focus: () => T.value?.focus() }), (a, s) => (m(), E(ae, w({ ...t(re)(e), error: V.value }, {
|
|
54
|
-
value: R.value,
|
|
55
|
-
"value-style": "numeric"
|
|
56
|
-
}), {
|
|
57
|
-
default: b(({ id: B, describedby: S, invalid: D }) => [
|
|
58
|
-
t(I) ? (m(), x(N, { key: 0 }, [
|
|
59
|
-
d(X, w({ id: B, "aria-describedby": S }, {
|
|
60
|
-
disabled: e.disabled,
|
|
61
|
-
invalid: D,
|
|
62
|
-
placeholder: t(r)("core.form.select.choose"),
|
|
63
|
-
onClick: s[0] || (s[0] = (p) => q.value?.present())
|
|
64
|
-
}), {
|
|
65
|
-
default: b(() => [
|
|
66
|
-
o.value ? (m(), x(N, { key: 0 }, [
|
|
67
|
-
W(j(o.value), 1)
|
|
68
|
-
], 64)) : P("", !0)
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
72
|
-
d(de, {
|
|
73
|
-
ref_key: "sheet",
|
|
74
|
-
ref: q,
|
|
75
|
-
title: e.label ?? t(r)("core.form.time.label"),
|
|
76
|
-
mode: "time",
|
|
77
|
-
"model-value": o.value,
|
|
78
|
-
shortcuts: C.value,
|
|
79
|
-
step: e.minuteStep,
|
|
80
|
-
clearable: !e.required,
|
|
81
|
-
"onUpdate:modelValue": t(l).set
|
|
82
|
-
}, null, 8, ["title", "model-value", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
83
|
-
], 64)) : (m(), E(te, {
|
|
84
|
-
key: 1,
|
|
85
|
-
ref_key: "popover",
|
|
86
|
-
ref: c,
|
|
87
|
-
label: e.label ?? t(r)("core.form.time.label"),
|
|
88
|
-
width: "sm",
|
|
89
|
-
placement: "bottom-start",
|
|
90
|
-
arrow: !1,
|
|
91
|
-
autofocus: !1
|
|
92
|
-
}, {
|
|
93
|
-
trigger: b(({ attrs: p, presented: _ }) => [
|
|
94
|
-
h("div", {
|
|
95
|
-
class: G(["inline-flex max-w-full items-center gap-2", t(Q)])
|
|
96
|
-
}, [
|
|
97
|
-
h("input", w({
|
|
98
|
-
id: B,
|
|
99
|
-
ref_key: "input",
|
|
100
|
-
ref: T
|
|
101
|
-
}, p, {
|
|
102
|
-
type: "text",
|
|
103
|
-
role: "combobox",
|
|
104
|
-
autocomplete: "off",
|
|
105
|
-
size: "10",
|
|
106
|
-
name: e.name,
|
|
107
|
-
value: t(l).text.value,
|
|
108
|
-
placeholder: t(k).placeholder.value,
|
|
109
|
-
disabled: e.disabled,
|
|
110
|
-
required: e.required,
|
|
111
|
-
"aria-required": e.required || void 0,
|
|
112
|
-
"aria-invalid": D || void 0,
|
|
113
|
-
"aria-describedby": S,
|
|
114
|
-
class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
115
|
-
onInput: s[1] || (s[1] = (f) => t(l).input(f.target.value)),
|
|
116
|
-
onBlur: s[2] || (s[2] = (f) => t(l).commit()),
|
|
117
|
-
onKeydown: A,
|
|
118
|
-
onClick: s[3] || (s[3] = (f) => y(!1))
|
|
119
|
-
}), null, 16, ve),
|
|
120
|
-
e.disabled ? P("", !0) : (m(), x("button", {
|
|
121
|
-
key: 0,
|
|
122
|
-
type: "button",
|
|
123
|
-
tabindex: "-1",
|
|
124
|
-
"aria-label": t(r)("core.form.time.open"),
|
|
125
|
-
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
126
|
-
onClick: (f) => _ ? c.value?.dismiss() : y(!0)
|
|
127
|
-
}, [
|
|
128
|
-
d(t(Z), {
|
|
129
|
-
name: "timeLine",
|
|
130
|
-
size: 18
|
|
131
|
-
})
|
|
132
|
-
], 8, be))
|
|
133
|
-
], 2)
|
|
134
|
-
]),
|
|
135
|
-
default: b(({ dismiss: p }) => [
|
|
136
|
-
h("div", {
|
|
137
|
-
ref_key: "panel",
|
|
138
|
-
ref: g,
|
|
139
|
-
class: "flex flex-col gap-2.5"
|
|
140
|
-
}, [
|
|
141
|
-
d(ce, {
|
|
142
|
-
"model-value": $.value,
|
|
143
|
-
step: e.minuteStep,
|
|
144
|
-
"onUpdate:modelValue": t(l).set
|
|
145
|
-
}, null, 8, ["model-value", "step", "onUpdate:modelValue"]),
|
|
146
|
-
d(pe, {
|
|
147
|
-
items: C.value,
|
|
148
|
-
selected: $.value,
|
|
149
|
-
onPick: (_) => {
|
|
150
|
-
t(l).set(_), p();
|
|
151
|
-
}
|
|
152
|
-
}, null, 8, ["items", "selected", "onPick"])
|
|
153
|
-
], 512)
|
|
154
|
-
]),
|
|
155
|
-
_: 2
|
|
156
|
-
}, 1032, ["label"]))
|
|
157
|
-
]),
|
|
158
|
-
_: 1
|
|
159
|
-
}, 16, ["value"]));
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
export {
|
|
163
|
-
Ce as _,
|
|
164
|
-
fe as u
|
|
165
|
-
};
|