@wssto2/vue-core 0.4.18 → 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.
Files changed (81) hide show
  1. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js → ActionRow.vue_vue_type_script_setup_true_lang-QPvYudWc.js} +1 -1
  2. package/dist/{Activity-DB9ABAMb.js → Activity-C0NvjIi5.js} +4 -4
  3. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CxU9aNRQ.js} +1 -1
  4. package/dist/{Changes-IIczcs6O.js → Changes-hoMHeAZt.js} +3 -3
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CUoyYpaW.js → CollectionPage.vue_vue_type_script_setup_true_lang-BNM_cbXa.js} +6 -6
  6. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js → DataTable.vue_vue_type_script_setup_true_lang-DPuH84I7.js} +1 -1
  7. package/dist/{DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js → DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js} +5 -5
  8. package/dist/DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js +281 -0
  9. package/dist/{DeadLetters-Bq5YpnvT.js → DeadLetters-O6QReswO.js} +2 -2
  10. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js → FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js} +3 -2
  11. package/dist/{FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js → FormView.vue_vue_type_script_setup_true_lang-Dbfg_jGh.js} +1 -1
  12. package/dist/{General-DQruOZs2.js → General-9Sgxb74n.js} +6 -6
  13. package/dist/{Menu.vue_vue_type_script_setup_true_lang-uPmxWvds.js → Menu.vue_vue_type_script_setup_true_lang-DsFOeCVe.js} +1 -1
  14. package/dist/{NewRolePage-BcA8jBBQ.js → NewRolePage-D-LunWMH.js} +3 -3
  15. package/dist/NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js +161 -0
  16. package/dist/{Popover.vue_vue_type_script_setup_true_lang-BTOzgIQF.js → Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js} +8 -8
  17. package/dist/{ProfilePage-BqdCzyax.js → ProfilePage-DJUDCyEr.js} +6 -6
  18. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DijFQnU6.js → RecordHeader.vue_vue_type_script_setup_true_lang-szzWzdDu.js} +1 -1
  19. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-BpLnmA6n.js → ResourcePage.vue_vue_type_script_setup_true_lang-BFaaFQSm.js} +2 -2
  20. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DPpCuJWk.js → RoleEditor.vue_vue_type_script_setup_true_lang-D-b-O6SG.js} +7 -7
  21. package/dist/{RolePage-IES_ADt5.js → RolePage-Ha-EgoEJ.js} +7 -7
  22. package/dist/{RolesPage-D0K7tEL-.js → RolesPage-8uWWCClN.js} +5 -5
  23. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js → SectionList.vue_vue_type_script_setup_true_lang-BJnz2ROc.js} +2 -2
  24. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-CW81A_bn.js → SectionNavigator.vue_vue_type_script_setup_true_lang-BltrQnrQ.js} +2 -2
  25. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js → SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js} +1 -1
  26. package/dist/SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js +515 -0
  27. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js → SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js} +2 -2
  28. package/dist/{Sessions-BfpiOhGs.js → Sessions-Dz4KYMu9.js} +2 -2
  29. package/dist/{SettingsPage-BnEpURcU.js → SettingsPage-D47NSOYW.js} +7 -7
  30. package/dist/{SignIn-DrLE0gNr.js → SignIn-CNv68Tba.js} +4 -4
  31. package/dist/{SignInPage-CRynZCU2.js → SignInPage-CsjC4aiV.js} +3 -3
  32. package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-7Z9EmLs-.js → SignInTable.vue_vue_type_script_setup_true_lang-ByEAVfjv.js} +1 -1
  33. package/dist/{SignIns-BQ8tISWn.js → SignIns-CgsNf8uf.js} +2 -2
  34. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js → SwitchField.vue_vue_type_script_setup_true_lang-ALvJisiP.js} +1 -1
  35. package/dist/TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js +317 -0
  36. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js +93 -0
  37. package/dist/TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js +190 -0
  38. package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js → Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.js} +1 -1
  39. package/dist/{UserRecord-CqmPm4Fv.js → UserRecord-B9r_9U1z.js} +7 -7
  40. package/dist/{UsersList-CHAray61.js → UsersList-BBLa3OCv.js} +6 -6
  41. package/dist/access/index.js +1 -1
  42. package/dist/{anchored-Cj4--8dT.js → anchored-DpuUwf-9.js} +17 -15
  43. package/dist/collection/index.js +4 -4
  44. package/dist/{control-B_Nwtmag.js → control-B4SdblL6.js} +134 -118
  45. package/dist/controls/index.js +1 -1
  46. package/dist/form/ComboField.vue.d.ts +9 -3
  47. package/dist/form/DateField.vue.d.ts +4 -0
  48. package/dist/form/DateTimeField.vue.d.ts +4 -0
  49. package/dist/form/Field.vue.d.ts +2 -0
  50. package/dist/form/MoneyField.vue.d.ts +10 -5
  51. package/dist/form/NumberField.vue.d.ts +13 -5
  52. package/dist/form/SelectField.vue.d.ts +5 -1
  53. package/dist/form/TextField.vue.d.ts +10 -2
  54. package/dist/form/TextareaField.vue.d.ts +4 -0
  55. package/dist/form/TimeField.vue.d.ts +4 -0
  56. package/dist/form/index.d.ts +1 -1
  57. package/dist/form/index.js +1173 -1142
  58. package/dist/form/options.d.ts +4 -0
  59. package/dist/identity/index.js +1 -1
  60. package/dist/{index-91Lo0hJy.js → index-D-0JNiFF.js} +3 -3
  61. package/dist/{index-wlRejl73.js → index-D6BjUQJT.js} +7 -7
  62. package/dist/{index-sYamgVg7.js → index-Dxu7ZfCC.js} +12 -12
  63. package/dist/index.d.ts +1 -1
  64. package/dist/index.js +1 -1
  65. package/dist/notifications/index.js +1 -1
  66. package/dist/overlay/anchored.d.ts +2 -0
  67. package/dist/overlay/index.js +3 -3
  68. package/dist/page/index.js +5 -5
  69. package/dist/phone/index.js +2 -2
  70. package/dist/resource/index.js +1 -1
  71. package/dist/{rowLayout-BFz4Kdoy.js → rowLayout-D1vrdy0s.js} +2 -2
  72. package/dist/shell/index.js +2 -2
  73. package/dist/{status-B_IMA25a.js → status-BLTC7wi1.js} +1 -1
  74. package/dist/styles.css +1 -1
  75. package/package.json +1 -1
  76. package/dist/DateField.vue_vue_type_script_setup_true_lang-8mvjzRA-.js +0 -278
  77. package/dist/NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js +0 -150
  78. package/dist/SelectField.vue_vue_type_script_setup_true_lang-DkbBJpYX.js +0 -489
  79. package/dist/TextField.vue_vue_type_script_setup_true_lang-CWgn-vGl.js +0 -299
  80. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +0 -91
  81. package/dist/TimeField.vue_vue_type_script_setup_true_lang-BebAIPeL.js +0 -187
@@ -1,47 +1,49 @@
1
1
  import { ref as d, watch as E, nextTick as V, onScopeDispose as L } from "vue";
2
- import { autoUpdate as $, offset as z, flip as P, shift as S, size as b, arrow as D, computePosition as k } from "@floating-ui/dom";
2
+ import { autoUpdate as P, offset as $, flip as z, shift as R, size as S, arrow as b, computePosition as A } from "@floating-ui/dom";
3
+ const O = 640;
3
4
  function T(r, e) {
4
5
  const s = d({ position: "fixed", left: "0px", top: "0px" }), c = d({}), f = d(e.placement());
5
6
  let l = null;
6
7
  async function o() {
7
- const i = e.reference(), t = r.value;
8
- if (!i || !t) return;
8
+ const n = e.reference(), t = r.value;
9
+ if (!n || !t) return;
9
10
  const u = [
10
- z(e.offset),
11
- P({ padding: e.padding }),
12
- S({ padding: e.padding }),
13
- b({
11
+ $(e.offset),
12
+ z({ padding: e.padding }),
13
+ R({ padding: e.padding }),
14
+ S({
14
15
  padding: e.padding,
15
16
  apply({ availableWidth: g, availableHeight: h, elements: y }) {
16
17
  e.fit?.(y.floating, { width: g, height: h });
17
18
  }
18
19
  })
19
20
  ];
20
- e.arrow?.value && u.push(D({ element: e.arrow.value, padding: 12 }));
21
- const { x: w, y: v, placement: m, middlewareData: x } = await k(i, t, {
21
+ e.arrow?.value && u.push(b({ element: e.arrow.value, padding: 12 }));
22
+ const { x: w, y: v, placement: m, middlewareData: x } = await A(n, t, {
22
23
  placement: e.placement(),
23
24
  strategy: "fixed",
24
25
  middleware: u
25
26
  });
26
27
  s.value = { position: "fixed", left: `${w}px`, top: `${v}px` }, f.value = m;
27
- const n = x.arrow;
28
- n && (c.value = { left: n.x != null ? `${n.x}px` : "", top: n.y != null ? `${n.y}px` : "" });
28
+ const i = x.arrow;
29
+ i && (c.value = { left: i.x != null ? `${i.x}px` : "", top: i.y != null ? `${i.y}px` : "" });
29
30
  }
30
31
  function p() {
31
32
  l?.(), l = null, window.visualViewport?.removeEventListener("resize", a), window.visualViewport?.removeEventListener("scroll", a);
32
33
  }
33
34
  const a = () => void o();
34
- return E(r, (i) => {
35
+ return E(r, (n) => {
35
36
  p();
36
37
  const t = e.reference();
37
- !i || !t || (t instanceof Element ? l = $(t, i, () => void o()) : V(o), window.visualViewport?.addEventListener("resize", a), window.visualViewport?.addEventListener("scroll", a));
38
+ !n || !t || (t instanceof Element ? l = P(t, n, () => void o()) : V(o), window.visualViewport?.addEventListener("resize", a), window.visualViewport?.addEventListener("scroll", a));
38
39
  }), L(p), { style: s, arrowStyle: c, resolvedPlacement: f, update: o };
39
40
  }
40
- function U(r) {
41
+ function W(r) {
41
42
  const e = r.split("-")[0];
42
43
  return { top: "bottom", bottom: "top", left: "right", right: "left" }[e];
43
44
  }
44
45
  export {
45
- U as a,
46
+ O as N,
47
+ W as a,
46
48
  T as u
47
49
  };
@@ -1,11 +1,11 @@
1
1
  import { D as O, L as j, a as U, h as G, l as X, r as Z } from "../http-D_D9YbLH.js";
2
- import { _ as H, a as J, u as K } from "../CollectionPage.vue_vue_type_script_setup_true_lang-CUoyYpaW.js";
2
+ import { _ as H, a as J, u as K } from "../CollectionPage.vue_vue_type_script_setup_true_lang-BNM_cbXa.js";
3
3
  import { u as W, a as Y } from "../neighbors-DVN_cADL.js";
4
- import { a as te, b as se } from "../rowLayout-BFz4Kdoy.js";
5
- import { _ as ae } from "../DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js";
4
+ import { a as te, b as se } from "../rowLayout-D1vrdy0s.js";
5
+ import { _ as ae } from "../DataTable.vue_vue_type_script_setup_true_lang-DPuH84I7.js";
6
6
  import { defineComponent as y, openBlock as c, createElementBlock as d, Fragment as h, renderList as v, createBlock as k, unref as f, withCtx as C, normalizeClass as m, createVNode as p, createCommentVNode as g, computed as w, toValue as E } from "vue";
7
7
  import { _ } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
8
- import { _ as S } from "../Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js";
8
+ import { _ as S } from "../Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.js";
9
9
  import { useI18n as T } from "vue-i18n";
10
10
  function $(r = {}) {
11
11
  const s = new Map(Object.entries(r).map(([t, e]) => [t, [...e]]));
@@ -1,4 +1,4 @@
1
- import { inject as B, ref as z, computed as r, onBeforeUnmount as A, defineComponent as C, useSlots as F, openBlock as a, createBlock as L, resolveDynamicComponent as T, unref as t, normalizeClass as b, withCtx as _, createElementBlock as s, renderSlot as f, createCommentVNode as n, createElementVNode as g, createTextVNode as h, toDisplayString as v, createVNode as V, useAttrs as G, useId as K, mergeProps as j, createSlots as P, mergeDefaults as M } from "vue";
1
+ import { inject as B, ref as z, computed as s, onBeforeUnmount as A, defineComponent as C, useSlots as F, openBlock as l, createBlock as L, resolveDynamicComponent as T, unref as t, normalizeClass as b, withCtx as w, createElementBlock as r, renderSlot as d, createCommentVNode as i, createElementVNode as x, createTextVNode as h, toDisplayString as v, createVNode as V, useAttrs as G, useId as K, mergeProps as j, createSlots as P, mergeDefaults as M } from "vue";
2
2
  import { useI18n as O } from "vue-i18n";
3
3
  import { _ as I } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
4
4
  import { RouterLink as U } from "vue-router";
@@ -16,17 +16,17 @@ const W = {
16
16
  presentation: "control",
17
17
  name: void 0
18
18
  }, X = Symbol("vue-core.formGroup"), Z = Symbol("vue-core.formRowIndent"), ee = Symbol("vue-core.formEditable"), R = () => B(X, null), te = () => B(Z, 0);
19
- function oe(i) {
20
- const e = R(), d = B(ee, z(!0)), c = Q(), k = r(() => !!e && !!i.disabled && (c.value || i.presentation === "value")), m = r(() => (i.editable ?? !0) && d.value && !k.value), o = r(() => !!e && !!i.disabled && m.value);
19
+ function oe(u) {
20
+ const e = R(), c = B(ee, z(!0)), n = Q(), k = s(() => !!e && !!u.disabled && (n.value || u.presentation === "value")), m = s(() => (u.editable ?? !0) && c.value && !k.value), a = s(() => !!e && !!u.disabled && m.value);
21
21
  if (e) {
22
- const u = e.registerLocked(r(() => !!i.disabled && d.value && i.presentation !== "value"));
23
- A(u);
22
+ const f = e.registerLocked(s(() => !!u.disabled && c.value && u.presentation !== "value"));
23
+ A(f);
24
24
  }
25
- return { editable: m, locked: o };
25
+ return { editable: m, locked: a };
26
26
  }
27
27
  const le = ["label", "labelHidden", "hint", "error", "required", "editable", "disabled", "lockedReason", "presentation", "name"];
28
- function Re(i) {
29
- return Object.fromEntries(le.map((e) => [e, i[e]]));
28
+ function He(u) {
29
+ return Object.fromEntries(le.map((e) => [e, u[e]]));
30
30
  }
31
31
  const ae = {
32
32
  key: 0,
@@ -35,7 +35,7 @@ const ae = {
35
35
  key: 0,
36
36
  class: "text-content-destructive",
37
37
  "aria-hidden": "true"
38
- }, ne = ["id"], ie = {
38
+ }, ie = ["id"], ne = {
39
39
  key: 0,
40
40
  class: "break-words text-body text-content-strong"
41
41
  }, de = ["id"], ue = /* @__PURE__ */ C({
@@ -56,9 +56,9 @@ const ae = {
56
56
  labelLines: { default: void 0 },
57
57
  labelAlign: { default: "center" }
58
58
  },
59
- setup(i) {
60
- const e = i, d = F(), c = te(), k = r(() => c + e.indent), m = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], o = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, u = r(() => e.labelHidden && (e.layout === "entry" || e.layout === "value") ? "stacked" : e.layout), S = r(() => {
61
- switch (u.value) {
59
+ setup(u) {
60
+ const e = u, c = F(), n = te(), k = s(() => n + e.indent), m = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], a = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, f = s(() => e.labelHidden && (e.layout === "entry" || e.layout === "value") ? "stacked" : e.layout), S = s(() => {
61
+ switch (f.value) {
62
62
  case "entry":
63
63
  return "grid grid-cols-[var(--form-label-width,11rem)_minmax(0,1fr)] items-center gap-x-4 compact:grid-cols-[minmax(0,auto)_minmax(40%,1fr)]";
64
64
  case "value":
@@ -68,67 +68,67 @@ const ae = {
68
68
  default:
69
69
  return "flex flex-col gap-1";
70
70
  }
71
- }), y = r(() => e.labelHidden ? "sr-only" : u.value === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), w = r(() => e.value !== void 0 && e.value !== null && e.value !== "");
72
- return (p, x) => (a(), L(T(e.to ? t(U) : "div"), {
71
+ }), p = s(() => e.labelHidden ? "sr-only" : f.value === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), _ = s(() => e.value !== void 0 && e.value !== null && e.value !== "");
72
+ return (y, g) => (l(), L(T(e.to ? t(U) : "div"), {
73
73
  to: e.to,
74
74
  "data-test": "form-row",
75
- "data-layout": u.value,
75
+ "data-layout": f.value,
76
76
  "data-field-error": e.error ? "true" : void 0,
77
77
  class: b(["form-row flex min-w-0 items-stretch gap-3 transition-colors duration-motion-fast first:rounded-t-group last:rounded-b-group focus-within:bg-tint-soft/50 [&:first-child>.row-body]:border-t-0", [m[Math.min(k.value, 2)], e.to ? "hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus" : ""]])
78
78
  }, {
79
- default: _(() => [
80
- d.leading ? (a(), s("div", ae, [
81
- f(p.$slots, "leading")
82
- ])) : n("", !0),
83
- g("div", re, [
84
- g("div", {
79
+ default: w(() => [
80
+ c.leading ? (l(), r("div", ae, [
81
+ d(y.$slots, "leading")
82
+ ])) : i("", !0),
83
+ x("div", re, [
84
+ x("div", {
85
85
  class: b(["min-w-0", S.value])
86
86
  }, [
87
- e.label || e.sub || d.sub ? (a(), s("div", {
87
+ e.label || e.sub || c.sub ? (l(), r("div", {
88
88
  key: 0,
89
- class: b([e.labelHidden && !e.sub && !d.sub ? "contents" : u.value === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
89
+ class: b([e.labelHidden && !e.sub && !c.sub ? "contents" : f.value === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
90
90
  }, [
91
- g("div", {
92
- class: b(d["label-trailing"] ? "flex items-center justify-between gap-3" : "")
91
+ x("div", {
92
+ class: b(c["label-trailing"] ? "flex items-center justify-between gap-3" : "")
93
93
  }, [
94
- (a(), L(T(e.for ? "label" : "span"), {
94
+ (l(), L(T(e.for ? "label" : "span"), {
95
95
  for: e.for,
96
- class: b(["break-words", [y.value, e.labelHidden ? "" : e.labelLines ? o[e.labelLines] : "block"]])
96
+ class: b(["break-words", [p.value, e.labelHidden ? "" : e.labelLines ? a[e.labelLines] : "block"]])
97
97
  }, {
98
- default: _(() => [
98
+ default: w(() => [
99
99
  h(v(e.label), 1),
100
- e.required ? (a(), s("span", se, " *")) : n("", !0)
100
+ e.required ? (l(), r("span", se, " *")) : i("", !0)
101
101
  ]),
102
102
  _: 1
103
103
  }, 8, ["for", "class"])),
104
- f(p.$slots, "label-trailing")
104
+ d(y.$slots, "label-trailing")
105
105
  ], 2),
106
- e.sub || d.sub ? (a(), s("small", {
106
+ e.sub || c.sub ? (l(), r("small", {
107
107
  key: 0,
108
108
  id: e.subId,
109
109
  class: "mt-0.5 block text-footnote text-content-muted"
110
110
  }, [
111
- f(p.$slots, "sub", {}, () => [
111
+ d(y.$slots, "sub", {}, () => [
112
112
  h(v(e.sub), 1)
113
113
  ])
114
- ], 8, ne)) : n("", !0)
115
- ], 2)) : n("", !0),
116
- g("div", {
117
- class: b(["flex min-w-0 items-center gap-2", u.value === "value" ? "justify-end text-right" : u.value === "setting" ? "flex-wrap justify-end text-right" : u.value === "entry" ? "compact:justify-end" : ""])
114
+ ], 8, ie)) : i("", !0)
115
+ ], 2)) : i("", !0),
116
+ x("div", {
117
+ class: b(["flex min-w-0 items-center gap-2", f.value === "value" ? "justify-end text-right" : f.value === "setting" ? "flex-wrap justify-end text-right" : f.value === "entry" ? "compact:justify-end" : ""])
118
118
  }, [
119
- f(p.$slots, "default", {}, () => [
120
- w.value ? (a(), s("span", ie, v(e.value), 1)) : n("", !0)
119
+ d(y.$slots, "default", {}, () => [
120
+ _.value ? (l(), r("span", ne, v(e.value), 1)) : i("", !0)
121
121
  ]),
122
- f(p.$slots, "trailing"),
123
- e.to ? (a(), L(t(I), {
122
+ d(y.$slots, "trailing"),
123
+ e.to ? (l(), L(t(I), {
124
124
  key: 0,
125
125
  name: "arrowRightSLine",
126
126
  size: 18,
127
127
  class: "shrink-0 text-content-disabled"
128
- })) : n("", !0)
128
+ })) : i("", !0)
129
129
  ], 2)
130
130
  ], 2),
131
- e.error ? (a(), s("p", {
131
+ e.error ? (l(), r("p", {
132
132
  key: 0,
133
133
  id: e.errorId,
134
134
  class: "mt-1 flex items-start gap-1.5 text-footnote text-content-destructive",
@@ -140,7 +140,7 @@ const ae = {
140
140
  class: "mt-px shrink-0"
141
141
  }),
142
142
  h(" " + v(e.error), 1)
143
- ], 8, de)) : n("", !0)
143
+ ], 8, de)) : i("", !0)
144
144
  ])
145
145
  ]),
146
146
  _: 3
@@ -148,24 +148,32 @@ const ae = {
148
148
  }
149
149
  }), ce = ["title"], fe = {
150
150
  key: 0,
151
- class: "mr-1"
151
+ class: "mr-1.5 inline-flex shrink-0 items-center align-middle",
152
+ "data-test": "field-prefix"
152
153
  }, ve = {
153
154
  key: 1,
154
- class: "ml-1 text-content-muted"
155
+ class: "mr-1"
155
156
  }, me = {
157
+ key: 2,
158
+ class: "ml-1 text-content-muted"
159
+ }, be = {
156
160
  key: 3,
157
161
  class: "block text-body text-content-disabled"
158
- }, be = {
162
+ }, pe = {
159
163
  key: 0,
160
164
  class: "sr-only"
161
- }, ye = ["data-field-error"], pe = ["for"], ge = {
165
+ }, ye = ["data-field-error"], ge = ["for"], xe = {
162
166
  key: 0,
163
167
  class: "text-content-destructive",
164
168
  "aria-hidden": "true"
165
- }, xe = {
169
+ }, he = {
166
170
  key: 1,
167
171
  class: "flex min-w-0 items-center gap-2"
168
- }, he = { class: "min-w-0 flex-1" }, ke = ["id"], we = ["id"], Ee = /* @__PURE__ */ C({
172
+ }, ke = { class: "min-w-0 flex-1" }, _e = {
173
+ key: 0,
174
+ class: "mr-1.5 inline-flex shrink-0 items-center align-middle",
175
+ "data-test": "field-prefix"
176
+ }, we = ["id"], $e = ["id"], Ne = /* @__PURE__ */ C({
169
177
  __name: "Field",
170
178
  props: /* @__PURE__ */ M({
171
179
  label: {},
@@ -185,123 +193,131 @@ const ae = {
185
193
  rowLayout: {},
186
194
  rowLabelAlign: {}
187
195
  }, { ...W, value: void 0, prefix: void 0, suffix: void 0, valueStyle: void 0, rowLayout: "entry", rowLabelAlign: "center" }),
188
- setup(i) {
189
- const e = i, { t: d } = O(), c = F(), k = G(), m = R(), { editable: o, locked: u } = oe(e), S = K(), y = r(() => e.name ?? S), w = r(() => `${y.value}-hint`), p = r(() => `${y.value}-error`);
196
+ setup(u) {
197
+ const e = u, { t: c } = O(), n = F(), k = G(), m = R(), { editable: a, locked: f } = oe(e), S = K(), p = s(() => e.name ?? S), _ = s(() => `${p.value}-hint`), y = s(() => `${p.value}-error`);
190
198
  if (m?.registerField) {
191
- const l = k["data-field-key"], N = m.registerField(typeof l == "string" ? l : void 0, r(() => e.disabled));
199
+ const o = k["data-field-key"], N = m.registerField(typeof o == "string" ? o : void 0, s(() => e.disabled));
192
200
  A(N);
193
201
  }
194
- const x = r(() => {
195
- const l = e.value;
196
- return l == null ? !1 : typeof l == "string" ? l.length > 0 : typeof l == "number" ? !Number.isNaN(l) : !0;
197
- }), E = r(() => typeof e.value == "boolean" ? e.value ? d("core.form.yes") : d("core.form.no") : e.value), D = r(() => !!m && !o.value && m.hideEmpty.value && !x.value && !c.readonly), q = r(() => [e.hint && o.value ? w.value : null, e.error ? p.value : null].filter(Boolean).join(" ") || void 0), $ = r(() => {
198
- const l = o.value ? e.rowLayout : e.rowLayout === "stacked" ? "stacked" : "value";
199
- return e.labelHidden && (l === "entry" || l === "value") ? "stacked" : l;
200
- }), H = r(
201
- () => o.value && !u.value && e.required ? { "data-field-required": "true", "data-field-filled": x.value ? "true" : void 0 } : {}
202
+ const g = s(() => {
203
+ const o = e.value;
204
+ return o == null ? !1 : typeof o == "string" ? o.length > 0 : typeof o == "number" ? !Number.isNaN(o) : !0;
205
+ }), E = s(() => typeof e.value == "boolean" ? e.value ? c("core.form.yes") : c("core.form.no") : e.value), D = s(() => !!m && !a.value && m.hideEmpty.value && !g.value && !n.readonly), q = s(() => [e.hint && a.value ? _.value : null, e.error ? y.value : null].filter(Boolean).join(" ") || void 0), $ = s(() => {
206
+ const o = a.value ? e.rowLayout : e.rowLayout === "stacked" ? "stacked" : "value";
207
+ return e.labelHidden && (o === "entry" || o === "value") ? "stacked" : o;
208
+ }), H = s(
209
+ () => a.value && !f.value && e.required ? { "data-field-required": "true", "data-field-filled": g.value ? "true" : void 0 } : {}
202
210
  );
203
- return (l, N) => t(m) && !D.value ? (a(), L(ue, j({ key: 0 }, H.value, {
211
+ return (o, N) => t(m) && !D.value ? (l(), L(ue, j({ key: 0 }, H.value, {
204
212
  label: e.label,
205
213
  "label-hidden": e.labelHidden,
206
- for: t(o) ? y.value : void 0,
207
- sub: t(o) ? e.hint : void 0,
208
- "sub-id": w.value,
209
- required: t(o) && !t(u) && e.required,
214
+ for: t(a) ? p.value : void 0,
215
+ sub: t(a) ? e.hint : void 0,
216
+ "sub-id": _.value,
217
+ required: t(a) && !t(f) && e.required,
210
218
  layout: $.value,
211
219
  "label-align": $.value === "entry" ? e.rowLabelAlign : void 0,
212
- error: t(o) ? e.error : void 0,
213
- "error-id": p.value,
214
- "data-field-locked": t(u) ? "true" : void 0
220
+ error: t(a) ? e.error : void 0,
221
+ "error-id": y.value,
222
+ "data-field-locked": t(f) ? "true" : void 0
215
223
  }), P({
216
- default: _(() => [
217
- g("div", {
224
+ default: w(() => [
225
+ x("div", {
218
226
  class: "relative w-full min-w-0",
219
- title: t(u) ? e.lockedReason : void 0
227
+ title: t(f) ? e.lockedReason : void 0
220
228
  }, [
221
- g("div", {
222
- class: b(t(o) ? $.value === "setting" ? "flex min-w-0 flex-col items-end" : $.value === "stacked" ? "flex min-w-0 flex-col items-stretch" : "flex min-w-0 flex-col items-start compact:items-end" : "")
229
+ x("div", {
230
+ class: b(t(a) ? $.value === "setting" ? "flex min-w-0 flex-col items-end" : $.value === "stacked" ? "flex min-w-0 flex-col items-stretch" : "flex min-w-0 flex-col items-start compact:items-end" : "")
223
231
  }, [
224
- t(o) ? f(l.$slots, "default", {
225
- id: y.value,
232
+ t(a) ? d(o.$slots, "default", {
233
+ id: p.value,
226
234
  describedby: q.value,
227
235
  invalid: !!e.error,
228
236
  required: e.required,
229
237
  disabled: e.disabled
230
- }, void 0, void 0, 0) : t(c).readonly ? f(l.$slots, "readonly", {}, void 0, void 0, 1) : x.value ? (a(), s("span", {
238
+ }, void 0, void 0, 0) : t(n).readonly ? d(o.$slots, "readonly", {}, void 0, void 0, 1) : g.value ? (l(), r("span", {
231
239
  key: 2,
232
240
  class: b(["block break-words text-body text-content-strong", e.valueStyle === "mono" ? "font-mono" : e.valueStyle === "numeric" ? "tabular-nums" : ""])
233
241
  }, [
234
- e.prefix ? (a(), s("span", fe, v(e.prefix), 1)) : n("", !0),
242
+ t(n).prefix ? (l(), r("span", fe, [
243
+ d(o.$slots, "prefix")
244
+ ])) : i("", !0),
245
+ e.prefix ? (l(), r("span", ve, v(e.prefix), 1)) : i("", !0),
235
246
  h(v(E.value), 1),
236
- e.suffix ? (a(), s("span", ve, v(e.suffix), 1)) : n("", !0)
237
- ], 2)) : (a(), s("span", me, v(t(d)("core.state.no_value")), 1))
247
+ e.suffix ? (l(), r("span", me, v(e.suffix), 1)) : i("", !0)
248
+ ], 2)) : (l(), r("span", be, v(t(c)("core.state.no_value")), 1))
238
249
  ], 2)
239
250
  ], 8, ce),
240
- t(u) && e.lockedReason ? (a(), s("span", be, v(e.lockedReason), 1)) : n("", !0)
251
+ t(f) && e.lockedReason ? (l(), r("span", pe, v(e.lockedReason), 1)) : i("", !0)
241
252
  ]),
242
253
  _: 2
243
254
  }, [
244
- t(o) && t(c).trailing ? {
255
+ t(a) && t(n).trailing ? {
245
256
  name: "trailing",
246
- fn: _(() => [
247
- f(l.$slots, "trailing")
257
+ fn: w(() => [
258
+ d(o.$slots, "trailing")
248
259
  ]),
249
260
  key: "0"
250
261
  } : void 0,
251
- t(o) && t(c).labelTrailing ? {
262
+ t(a) && t(n).labelTrailing ? {
252
263
  name: "label-trailing",
253
- fn: _(() => [
254
- f(l.$slots, "labelTrailing")
264
+ fn: w(() => [
265
+ d(o.$slots, "labelTrailing")
255
266
  ]),
256
267
  key: "1"
257
268
  } : void 0
258
- ]), 1040, ["label", "label-hidden", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(m) ? n("", !0) : (a(), s("div", j({ key: 1 }, H.value, {
269
+ ]), 1040, ["label", "label-hidden", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(m) ? i("", !0) : (l(), r("div", j({ key: 1 }, H.value, {
259
270
  "data-field-error": e.error ? "true" : void 0,
260
271
  class: "flex min-w-0 flex-col gap-1"
261
272
  }), [
262
- e.label || t(o) && t(c).labelTrailing ? (a(), s("div", {
273
+ e.label || t(a) && t(n).labelTrailing ? (l(), r("div", {
263
274
  key: 0,
264
- class: b(e.labelHidden && !(t(o) && t(c).labelTrailing) ? "contents" : "flex items-center justify-between gap-3")
275
+ class: b(e.labelHidden && !(t(a) && t(n).labelTrailing) ? "contents" : "flex items-center justify-between gap-3")
265
276
  }, [
266
- e.label ? (a(), s("label", {
277
+ e.label ? (l(), r("label", {
267
278
  key: 0,
268
- for: t(o) ? y.value : void 0,
279
+ for: t(a) ? p.value : void 0,
269
280
  class: b(e.labelHidden ? "sr-only" : "text-footnote font-medium text-content-muted")
270
281
  }, [
271
282
  h(v(e.label), 1),
272
- t(o) && e.required ? (a(), s("span", ge, " *")) : n("", !0)
273
- ], 10, pe)) : n("", !0),
274
- t(o) ? f(l.$slots, "labelTrailing", {}, void 0, void 0, 1) : n("", !0)
275
- ], 2)) : n("", !0),
276
- t(o) && t(c).trailing ? (a(), s("div", xe, [
277
- g("div", he, [
278
- f(l.$slots, "default", {
279
- id: y.value,
283
+ t(a) && e.required ? (l(), r("span", xe, " *")) : i("", !0)
284
+ ], 10, ge)) : i("", !0),
285
+ t(a) ? d(o.$slots, "labelTrailing", {}, void 0, void 0, 1) : i("", !0)
286
+ ], 2)) : i("", !0),
287
+ t(a) && t(n).trailing ? (l(), r("div", he, [
288
+ x("div", ke, [
289
+ d(o.$slots, "default", {
290
+ id: p.value,
280
291
  describedby: q.value,
281
292
  invalid: !!e.error,
282
293
  required: e.required,
283
294
  disabled: e.disabled
284
295
  })
285
296
  ]),
286
- f(l.$slots, "trailing")
287
- ])) : t(o) ? f(l.$slots, "default", {
288
- id: y.value,
297
+ d(o.$slots, "trailing")
298
+ ])) : t(a) ? d(o.$slots, "default", {
299
+ id: p.value,
289
300
  describedby: q.value,
290
301
  invalid: !!e.error,
291
302
  required: e.required,
292
303
  disabled: e.disabled
293
- }, void 0, void 0, 2) : t(c).readonly ? f(l.$slots, "readonly", {}, void 0, void 0, 3) : (a(), s("span", {
304
+ }, void 0, void 0, 2) : t(n).readonly ? d(o.$slots, "readonly", {}, void 0, void 0, 3) : (l(), r("span", {
294
305
  key: 4,
295
- class: b(["text-body", x.value ? "text-content-strong" : "text-content-disabled"])
296
- }, v(x.value ? `${e.prefix ?? ""}${E.value}${e.suffix ?? ""}` : t(d)("core.state.no_value")), 3)),
297
- e.hint && t(o) ? (a(), s("p", {
306
+ class: b(["text-body", g.value ? "text-content-strong" : "text-content-disabled"])
307
+ }, [
308
+ g.value && t(n).prefix ? (l(), r("span", _e, [
309
+ d(o.$slots, "prefix")
310
+ ])) : i("", !0),
311
+ h(v(g.value ? `${e.prefix ?? ""}${E.value}${e.suffix ?? ""}` : t(c)("core.state.no_value")), 1)
312
+ ], 2)),
313
+ e.hint && t(a) ? (l(), r("p", {
298
314
  key: 5,
299
- id: w.value,
315
+ id: _.value,
300
316
  class: "text-footnote text-content-muted"
301
- }, v(e.hint), 9, ke)) : n("", !0),
302
- e.error ? (a(), s("p", {
317
+ }, v(e.hint), 9, we)) : i("", !0),
318
+ e.error ? (l(), r("p", {
303
319
  key: 6,
304
- id: p.value,
320
+ id: y.value,
305
321
  role: "alert",
306
322
  class: "flex items-start gap-1.5 text-footnote text-content-destructive"
307
323
  }, [
@@ -311,22 +327,22 @@ const ae = {
311
327
  class: "mt-px shrink-0"
312
328
  }),
313
329
  h(" " + v(e.error), 1)
314
- ], 8, we)) : n("", !0)
330
+ ], 8, $e)) : i("", !0)
315
331
  ], 16, ye));
316
332
  }
317
- }), _e = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
318
- function He(i, e) {
319
- const d = !!R();
320
- return r(() => d ? Y({ kind: i, state: e() }) : [_e, ...J(i, e()).map(([c]) => c)].join(" "));
333
+ }), Le = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
334
+ function Te(u, e) {
335
+ const c = !!R();
336
+ return s(() => c ? Y({ kind: u, state: e() }) : [Le, ...J(u, e()).map(([n]) => n)].join(" "));
321
337
  }
322
338
  export {
323
- Ee as _,
339
+ Ne as _,
324
340
  R as a,
325
341
  W as b,
326
- He as c,
342
+ Te as c,
327
343
  ee as d,
328
344
  ue as e,
329
- Re as f,
345
+ He as f,
330
346
  X as g,
331
347
  Z as h,
332
348
  te as i,
@@ -1,7 +1,7 @@
1
1
  import { _ as A } from "../IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
2
2
  import { defineComponent as p, useSlots as c, openBlock as r, createElementBlock as d, normalizeClass as u, createElementVNode as f, renderSlot as m, toDisplayString as b, createVNode as x, unref as h, useModel as v, useTemplateRef as _, withDirectives as y, mergeProps as g, vModelText as k, mergeModels as w } from "vue";
3
3
  import { _ as B } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
4
- import { _ as N } from "../DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
4
+ import { _ as N } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
5
5
  import { _ as W } from "../Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js";
6
6
  import { _ as L } from "../SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js";
7
7
  import { c as j, a as F, b as G, d as H } from "../controlSurface-t7OEFESJ.js";
@@ -1,11 +1,13 @@
1
1
  import { type ControlWidth } from "../controls";
2
2
  import { type FieldProps, type FieldSlots } from "./field";
3
- import type { OptionSlotScope, SelectOption } from "./options";
3
+ import type { OptionSlotScope, SelectOption, ValueSlotScope } from "./options";
4
4
  declare const _default: <Value extends string | number, Meta = undefined>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
7
+ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
6
8
  readonly "onUpdate:modelValue"?: ((value: Value | null) => any) | undefined;
7
9
  readonly onPicked?: ((option: SelectOption<Value, Meta>) => any) | undefined;
8
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onPicked"> & (FieldProps & {
10
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onFocus" | "onUpdate:modelValue" | "onPicked"> & (FieldProps & {
9
11
  /** A fixed list, filtered locally. */
10
12
  options?: readonly SelectOption<Value, Meta>[];
11
13
  /** Searches the server; the answer for the text typed. */
@@ -24,6 +26,8 @@ declare const _default: <Value extends string | number, Meta = undefined>(__VLS_
24
26
  /** The id the last picks are kept under; setting it turns "Recent" on. */
25
27
  recents?: string;
26
28
  width?: Exclude<ControlWidth, "content">;
29
+ /** `setting` puts the control at the end of the row; `stacked` stretches it under the label (a picker in a narrow column). Without it the row is label column and control. */
30
+ rowLayout?: "setting" | "stacked";
27
31
  } & {
28
32
  modelValue?: Value | null;
29
33
  }) & Partial<{}>> & import("vue").PublicProps;
@@ -34,8 +38,10 @@ declare const _default: <Value extends string | number, Meta = undefined>(__VLS_
34
38
  slots: FieldSlots & {
35
39
  /** Replaces what an option row says (an icon, a badge); the row, its keys and roles stay. */
36
40
  option?: (scope: OptionSlotScope<Value, Meta>) => unknown;
41
+ /** The chosen value's content: in the control it stands before the text (a swatch before the name), in read mode it replaces the text. Only rendered while an option is chosen. */
42
+ value?: (scope: ValueSlotScope<Value, Meta>) => unknown;
37
43
  };
38
- emit: ((evt: "picked", option: SelectOption<Value, Meta>) => void) & ((evt: "update:modelValue", value: Value | null) => void);
44
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "picked", option: SelectOption<Value, Meta>) => void)) & ((evt: "update:modelValue", value: Value | null) => void);
39
45
  }>) => import("vue").VNode & {
40
46
  __ctx?: Awaited<typeof __VLS_setup>;
41
47
  };
@@ -29,8 +29,12 @@ type __VLS_PublicProps = __VLS_Props & {
29
29
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
30
30
  focus: () => void | undefined;
31
31
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ blur: (event: FocusEvent) => any;
33
+ focus: (event: FocusEvent) => any;
32
34
  "update:modelValue": (value: string | null) => any;
33
35
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
36
+ onBlur?: ((event: FocusEvent) => any) | undefined;
37
+ onFocus?: ((event: FocusEvent) => any) | undefined;
34
38
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
35
39
  }>, {
36
40
  disabled: boolean;
@@ -29,8 +29,12 @@ type __VLS_PublicProps = __VLS_Props & {
29
29
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
30
30
  focus: () => void | undefined;
31
31
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ blur: (event: FocusEvent) => any;
33
+ focus: (event: FocusEvent) => any;
32
34
  "update:modelValue": (value: string | null) => any;
33
35
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
36
+ onBlur?: ((event: FocusEvent) => any) | undefined;
37
+ onFocus?: ((event: FocusEvent) => any) | undefined;
34
38
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
35
39
  }>, {
36
40
  disabled: boolean;
@@ -40,6 +40,8 @@ type __VLS_Slots = {
40
40
  trailing?: () => unknown;
41
41
  /** At the end of the label's line while editing (the language tabs of `I18nField`). */
42
42
  labelTrailing?: () => unknown;
43
+ /** An icon or image before the read-mode value (a flag); a field that has the slot draws the same one before its control. Not shown while the value is empty. */
44
+ prefix?: () => unknown;
43
45
  };
44
46
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
45
47
  disabled: boolean;