@wssto2/vue-core 0.4.19 → 0.4.21

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.
Files changed (58) hide show
  1. package/dist/{Activity-CLyG5Y9o.js → Activity-DX-RK9xj.js} +3 -3
  2. package/dist/{Changes-xF1VMbqD.js → Changes-_nARQ9IC.js} +2 -2
  3. 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
  4. package/dist/DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js +281 -0
  5. package/dist/{DeadLetters-AbbNs69D.js → DeadLetters-O6QReswO.js} +2 -2
  6. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-C7nq7MJB.js → FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js} +2 -1
  7. package/dist/{General-De4Q6Wfn.js → General-CkZoXu29.js} +4 -4
  8. package/dist/{NewRolePage-QAv_XsT0.js → NewRolePage-OosTaMfZ.js} +2 -2
  9. package/dist/NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js +161 -0
  10. package/dist/{ProfilePage-CjjKhkHX.js → ProfilePage-Dn8fQ3ff.js} +3 -3
  11. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-FLJk6Kb2.js → RoleEditor.vue_vue_type_script_setup_true_lang-2IOio1Sa.js} +4 -4
  12. package/dist/{RolePage-De7s2sYr.js → RolePage-33RUvHYD.js} +5 -5
  13. package/dist/{RolesPage-TXQKtK_J.js → RolesPage-BGPoUCMP.js} +3 -3
  14. package/dist/SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js +515 -0
  15. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CuxVe7rm.js → SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js} +1 -1
  16. package/dist/{Sessions-BDLI0o-z.js → Sessions-BbAdbjmG.js} +2 -2
  17. package/dist/{SettingsPage-Kzcqv91E.js → SettingsPage-D47NSOYW.js} +3 -3
  18. package/dist/{SignIn-DKo46hNK.js → SignIn-DDCRzlUq.js} +2 -2
  19. package/dist/{SignInPage-B2v3is80.js → SignInPage-D9jryXA7.js} +2 -2
  20. package/dist/{SignIns-D-_a_S6O.js → SignIns-C_5sRrB4.js} +1 -1
  21. package/dist/{TextField.vue_vue_type_script_setup_true_lang-BslHroDP.js → TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js} +114 -111
  22. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js +93 -0
  23. package/dist/TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js +190 -0
  24. package/dist/{UserRecord-BR70ai9q.js → UserRecord-CUhbz62x.js} +5 -5
  25. package/dist/{UsersList-BC9S6omH.js → UsersList-BE8fnICz.js} +7 -7
  26. package/dist/access/index.js +1 -1
  27. package/dist/collection/index.js +1 -1
  28. package/dist/form/ComboField.vue.d.ts +7 -3
  29. package/dist/form/CommandDialog.vue.d.ts +4 -1
  30. package/dist/form/DateField.vue.d.ts +4 -0
  31. package/dist/form/DateTimeField.vue.d.ts +4 -0
  32. package/dist/form/MoneyField.vue.d.ts +10 -5
  33. package/dist/form/NumberField.vue.d.ts +13 -5
  34. package/dist/form/SelectField.vue.d.ts +3 -1
  35. package/dist/form/TextField.vue.d.ts +4 -0
  36. package/dist/form/TextareaField.vue.d.ts +4 -0
  37. package/dist/form/TimeField.vue.d.ts +4 -0
  38. package/dist/form/index.d.ts +1 -1
  39. package/dist/form/index.js +1215 -1182
  40. package/dist/form/options.d.ts +4 -0
  41. package/dist/form/useCommand.d.ts +18 -0
  42. package/dist/identity/index.js +1 -1
  43. package/dist/{index-BrqxylSS.js → index-C3HWRCEe.js} +6 -6
  44. package/dist/{index-B9KqrN-F.js → index-D-0JNiFF.js} +2 -2
  45. package/dist/{index-D8akxuKo.js → index-DiEoRV9D.js} +11 -11
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +1 -1
  48. package/dist/notifications/index.js +1 -1
  49. package/dist/{status-vMwum3Y9.js → status-UWWFHi9t.js} +1 -1
  50. package/dist/styles.css +1 -1
  51. package/dist/useCommand-VIZE7xG-.js +168 -0
  52. package/package.json +1 -1
  53. package/dist/DateField.vue_vue_type_script_setup_true_lang-CfPwcEM2.js +0 -278
  54. package/dist/NumberField.vue_vue_type_script_setup_true_lang-djJvP6Og.js +0 -150
  55. package/dist/SelectField.vue_vue_type_script_setup_true_lang-ByDo_32P.js +0 -493
  56. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-XZRHwx-n.js +0 -91
  57. package/dist/TimeField.vue_vue_type_script_setup_true_lang-BB7ZGpvP.js +0 -187
  58. package/dist/useCommand-YN9EMb7s.js +0 -138
@@ -1,36 +1,36 @@
1
- import { defineComponent as K, useTemplateRef as N, computed as v, watch as ee, nextTick as te, openBlock as n, createElementBlock as l, withModifiers as oe, normalizeStyle as se, unref as a, createElementVNode as f, toDisplayString as r, createCommentVNode as p, Fragment as R, renderList as ne, normalizeClass as L, createBlock as P, renderSlot as x, createTextVNode as E, useModel as ae, ref as ie, mergeProps as le, createSlots as re, withCtx as w, withDirectives as de, vModelDynamic as ce, mergeModels as H, mergeDefaults as ue } from "vue";
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 pe } from "./controlSurface-t7OEFESJ.js";
4
- import { a as me, c as fe, _ as he, f as ve, b as ge } from "./control-B4SdblL6.js";
5
- import { _ as ye } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
- import { u as xe, N as be } from "./anchored-DpuUwf-9.js";
7
- import { l as U, m as ke, u as _e, c as we } from "./suggestions-DHJFKB26.js";
8
- const $e = ["id", "aria-busy"], Me = { class: "min-h-0 flex-1 overflow-y-auto p-1.5" }, qe = {
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
- }, Be = ["id", "aria-selected", "aria-disabled", "onMouseenter", "onClick"], Le = { class: "min-w-0 flex-1" }, Se = { class: "block truncate text-body text-content-strong" }, Ce = {
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
- }, Ve = {
15
+ }, We = {
16
16
  key: 0,
17
17
  class: "block truncate text-footnote text-content-muted"
18
- }, We = {
18
+ }, De = {
19
19
  key: 2,
20
20
  class: "px-3 py-2 text-footnote text-content-muted",
21
21
  role: "status"
22
- }, De = {
22
+ }, Te = {
23
23
  key: 3,
24
24
  class: "px-3 py-2 text-footnote text-content-destructive",
25
25
  role: "alert"
26
- }, Te = {
26
+ }, Re = {
27
27
  key: 4,
28
28
  class: "px-3 py-2 text-footnote text-content-muted"
29
- }, Re = {
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
- }, Ee = /* @__PURE__ */ K({
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: S }) {
50
- const o = $, t = S, { t: d } = G(), b = N("panel"), k = v(() => U(o.open, o.items.length, o.status, o.emptyMessage)), _ = v(() => o.status === "loading"), M = (u) => u, g = (u) => ke(u.label, o.query), { style: C } = xe(b, {
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 < be;
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 ee(() => o.highlighted, () => void te(() => b.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" }))), (u, h) => k.value ? (n(), l("div", {
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: b,
64
+ ref: f,
65
65
  role: "listbox",
66
66
  "aria-busy": _.value || void 0,
67
- style: se(a(C)),
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] = oe(() => {
70
+ onMousedown: h[0] || (h[0] = se(() => {
71
71
  }, ["prevent"]))
72
72
  }, [
73
- f("div", Me, [
74
- o.recent ? (n(), l("p", qe, r(a(d)("core.form.suggestions.recent")), 1)) : p("", !0),
75
- o.items.length > 0 ? (n(!0), l(R, { key: 1 }, ne(o.items, (s, i) => (n(), l("div", {
76
- id: `${o.id}-option-${i}`,
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": i === o.highlighted,
79
+ "aria-selected": a === o.highlighted,
80
80
  "aria-disabled": s.disabled || void 0,
81
81
  "data-test": "suggestion-option",
82
- class: L(["flex cursor-pointer items-center gap-2.5 rounded-control px-2.5 py-2", [i === o.highlighted ? "bg-tint-soft" : "hover:bg-fill", s.disabled ? "cursor-not-allowed opacity-45" : "", _.value ? "opacity-60" : ""]]),
83
- onMouseenter: (c) => t("hover", i),
84
- onClick: (c) => !s.disabled && t("pick", s)
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(a(ye), {
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
- x(u.$slots, "option", {
92
+ b(u.$slots, "option", {
93
93
  option: M(s),
94
- active: i === o.highlighted,
94
+ active: a === o.highlighted,
95
95
  selected: o.selected === s.value
96
96
  }, () => [
97
- f("span", Le, [
98
- f("span", Se, [
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", Ce, r(g(s).match), 1)) : p("", !0),
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", Ve, r(s.description), 1)) : p("", !0)
107
+ s.description ? (n(), l("span", We, r(s.description), 1)) : p("", !0)
108
108
  ])
109
109
  ])
110
- ], 42, Be))), 128)) : o.status === "loading" ? (n(), l("p", We, r(a(d)("core.form.select.loading")), 1)) : o.status === "failed" ? (n(), l("p", De, r(a(d)("core.form.select.failed")), 1)) : (n(), l("p", Te, r(a(d)("core.form.select.no_matches")), 1))
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", Re, r(o.hint), 1)) : p("", !0)
113
- ], 44, $e)) : p("", !0);
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
- }), Ne = {
115
+ }), Pe = {
116
116
  key: 0,
117
117
  class: "flex shrink-0 items-center",
118
118
  "data-test": "field-prefix"
119
- }, Pe = {
119
+ }, Ae = {
120
120
  key: 1,
121
121
  class: "shrink-0 text-footnote text-content-muted"
122
- }, Ae = { class: "relative min-w-0 flex-1" }, Fe = ["id", "type", "name", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby", "role", "aria-autocomplete", "aria-expanded", "aria-controls", "aria-activedescendant"], ze = { class: "invisible" }, Ie = { class: "text-content-disabled" }, Oe = {
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
- }, Xe = /* @__PURE__ */ K({
125
+ }, Ye = /* @__PURE__ */ K({
126
126
  __name: "TextField",
127
- props: /* @__PURE__ */ H(/* @__PURE__ */ ue({
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
- ...ge,
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: S, emit: o }) {
172
- const t = $, d = ae($, "modelValue"), b = o, k = N("input"), _ = N("anchor"), M = !!me(), g = fe("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), C = v(() => M ? pe(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(() => {
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 (m, y) => (await e(m, y)).map(h) : e.map(h);
176
- }), i = v(() => s.value !== void 0), c = _e({
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: V, open: W, status: A, highlighted: F, showingRecent: z } = c, I = ie(!0), D = () => {
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(() => i.value && W.value && !z.value && I.value && c.current.value ? we(d.value, c.current.value.label) : ""), O = v(() => U(W.value, V.value.length, A.value, !1));
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
- D(), i.value && c.ask(e.target.value);
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 T(e) {
191
- d.value = e.value, c.remember(e), c.close(), b("picked", { text: e.value, ...e.description !== void 0 ? { detail: e.description } : {} });
193
+ function J(e) {
194
+ f("focus", e), a.value && c.value === "" && d.show("");
192
195
  }
193
- function J() {
194
- i.value && d.value === "" && c.show("");
196
+ function Q(e) {
197
+ d.close(), f("blur", e);
195
198
  }
196
- function Q() {
197
- const e = c.current.value;
198
- return !q.value || !e ? !1 : (T(e), !0);
199
+ function X() {
200
+ const e = d.current.value;
201
+ return !q.value || !e ? !1 : (D(e), !0);
199
202
  }
200
- const X = (e) => {
201
- i.value && c.keydown(e, { pick: T, enterNeedsMove: !0, complete: Q });
203
+ const Y = (e) => {
204
+ a.value && d.keydown(e, { pick: D, enterNeedsMove: !0, complete: X });
202
205
  };
203
- return S({ focus: () => k.value?.focus() }), (e, m) => (n(), P(he, le(a(ve)(t), {
204
- value: d.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
- }), re({
209
- default: w(({ id: y, describedby: Y, invalid: Z }) => [
210
- f("div", {
211
+ }), ce({
212
+ default: w(({ id: x, describedby: Z, invalid: ee }) => [
213
+ m("div", {
211
214
  ref_key: "anchor",
212
215
  ref: _,
213
- class: L(["flex items-center gap-1.5", [a(g), C.value]])
216
+ class: B(["flex items-center gap-1.5", [i(g), S.value]])
214
217
  }, [
215
- e.$slots.prefix ? (n(), l("span", Ne, [
216
- x(e.$slots, "prefix")
218
+ e.$slots.prefix ? (n(), l("span", Pe, [
219
+ b(e.$slots, "prefix")
217
220
  ])) : p("", !0),
218
- t.prefix ? (n(), l("span", Pe, r(t.prefix), 1)) : p("", !0),
219
- f("div", Ae, [
220
- de(f("input", {
221
- id: y,
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": m[0] || (m[0] = (B) => d.value = B),
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: i.value ? "off" : t.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": Z || void 0,
234
- "aria-describedby": Y,
235
- role: i.value ? "combobox" : void 0,
236
- "aria-autocomplete": i.value ? "both" : void 0,
237
- "aria-expanded": i.value ? O.value : void 0,
238
- "aria-controls": i.value ? `${y}-list` : void 0,
239
- "aria-activedescendant": i.value && O.value && a(V).length > 0 ? `${y}-option-${a(F)}` : void 0,
240
- class: L(["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 && !i.value ? "compact:text-right" : ""]]),
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: D,
243
- onClick: D,
244
- onKeydown: X,
245
+ onKeyup: W,
246
+ onClick: W,
247
+ onKeydown: Y,
245
248
  onFocus: J,
246
- onBlur: m[1] || (m[1] = (B) => a(c).close())
247
- }, null, 42, Fe), [
248
- [ce, d.value]
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: L(["pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre py-1 text-body", t.mono ? "font-mono" : ""]),
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
- f("span", ze, r(d.value), 1),
257
- f("span", Ie, r(q.value), 1)
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", Oe, r(t.suffix), 1)) : p("", !0)
263
+ t.suffix ? (n(), l("span", He, r(t.suffix), 1)) : p("", !0)
261
264
  ], 2),
262
- i.value ? (n(), P(Ee, {
265
+ a.value ? (n(), P(Ne, {
263
266
  key: 0,
264
- id: y,
267
+ id: x,
265
268
  anchor: _.value,
266
- open: a(W),
267
- items: a(V),
268
- highlighted: a(F),
269
- query: d.value,
270
- status: a(A),
271
- recent: a(z),
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 ? a(u)("core.form.suggestions.keys_complete") : a(u)("core.form.suggestions.keys_pick"),
274
- onPick: T,
275
- onHover: m[2] || (m[2] = (B) => a(c).highlight(B))
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
- x(e.$slots, "prefix")
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
- x(e.$slots, "trailing")
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
- x(e.$slots, "labelTrailing")
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
- x(e.$slots, "readonly")
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
- Xe as _,
313
- Ee as a
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
+ };