@wssto2/vue-core 0.4.19 → 0.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/{Activity-CLyG5Y9o.js → Activity-C0NvjIi5.js} +3 -3
  2. package/dist/{Changes-xF1VMbqD.js → Changes-hoMHeAZt.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-9Sgxb74n.js} +4 -4
  8. package/dist/{NewRolePage-QAv_XsT0.js → NewRolePage-D-LunWMH.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-DJUDCyEr.js} +3 -3
  11. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-FLJk6Kb2.js → RoleEditor.vue_vue_type_script_setup_true_lang-D-b-O6SG.js} +4 -4
  12. package/dist/{RolePage-De7s2sYr.js → RolePage-Ha-EgoEJ.js} +4 -4
  13. package/dist/{RolesPage-TXQKtK_J.js → RolesPage-8uWWCClN.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-Dz4KYMu9.js} +2 -2
  17. package/dist/{SettingsPage-Kzcqv91E.js → SettingsPage-D47NSOYW.js} +3 -3
  18. package/dist/{SignIn-DKo46hNK.js → SignIn-CNv68Tba.js} +2 -2
  19. package/dist/{SignInPage-B2v3is80.js → SignInPage-CsjC4aiV.js} +2 -2
  20. package/dist/{SignIns-D-_a_S6O.js → SignIns-CgsNf8uf.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-B9r_9U1z.js} +4 -4
  25. package/dist/{UsersList-BC9S6omH.js → UsersList-BBLa3OCv.js} +6 -6
  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/DateField.vue.d.ts +4 -0
  30. package/dist/form/DateTimeField.vue.d.ts +4 -0
  31. package/dist/form/MoneyField.vue.d.ts +10 -5
  32. package/dist/form/NumberField.vue.d.ts +13 -5
  33. package/dist/form/SelectField.vue.d.ts +3 -1
  34. package/dist/form/TextField.vue.d.ts +4 -0
  35. package/dist/form/TextareaField.vue.d.ts +4 -0
  36. package/dist/form/TimeField.vue.d.ts +4 -0
  37. package/dist/form/index.d.ts +1 -1
  38. package/dist/form/index.js +1036 -1012
  39. package/dist/form/options.d.ts +4 -0
  40. package/dist/identity/index.js +1 -1
  41. package/dist/{index-B9KqrN-F.js → index-D-0JNiFF.js} +2 -2
  42. package/dist/{index-BrqxylSS.js → index-D6BjUQJT.js} +5 -5
  43. package/dist/{index-D8akxuKo.js → index-Dxu7ZfCC.js} +11 -11
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.js +1 -1
  46. package/dist/notifications/index.js +1 -1
  47. package/dist/{status-vMwum3Y9.js → status-BLTC7wi1.js} +1 -1
  48. package/dist/styles.css +1 -1
  49. package/package.json +1 -1
  50. package/dist/DateField.vue_vue_type_script_setup_true_lang-CfPwcEM2.js +0 -278
  51. package/dist/NumberField.vue_vue_type_script_setup_true_lang-djJvP6Og.js +0 -150
  52. package/dist/SelectField.vue_vue_type_script_setup_true_lang-ByDo_32P.js +0 -493
  53. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-XZRHwx-n.js +0 -91
  54. package/dist/TimeField.vue_vue_type_script_setup_true_lang-BB7ZGpvP.js +0 -187
@@ -0,0 +1,190 @@
1
+ import { computed as m, defineComponent as G, useModel as J, useTemplateRef as b, openBlock as d, createBlock as F, mergeProps as T, unref as o, createSlots as O, withCtx as u, createElementBlock as _, Fragment as U, createVNode as c, createTextVNode as X, toDisplayString as Y, createCommentVNode as z, createElementVNode as h, normalizeClass as Z, renderSlot as x, mergeModels as L, mergeDefaults as ee, nextTick as M } from "vue";
2
+ import { useI18n as R } from "vue-i18n";
3
+ import { _ as te } from "./DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
4
+ import { u as oe } from "./format-D8X4zsx6.js";
5
+ import { _ as le } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
+ import { u as ae } from "./mediaQuery-CygcXmFW.js";
7
+ import { _ as re } from "./Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
8
+ import { c as se, _ as ie, f as ne, b as ue } from "./control-B4SdblL6.js";
9
+ import { d as me, r as de, t as I, p as ce, u as pe, a as fe, i as Q, _ as ve, b as be, c as ye } from "./useTypedEntry-C7k7Dyl-.js";
10
+ function ke(s) {
11
+ const { t: i } = R(), y = m(() => [i("core.form.time.words.now").toLowerCase(), "now"]);
12
+ return {
13
+ placeholder: m(() => i("core.form.time.placeholder")),
14
+ parse(e) {
15
+ if (y.value.includes(e.trim().toLowerCase())) return { value: I(s()) };
16
+ const l = ce(e, s());
17
+ return "time" in l ? { value: l.time } : { error: l.error === "step" ? i("core.form.time.step", { step: s() }) : i("core.form.time.invalid") };
18
+ },
19
+ shortcuts: (e) => (e ?? me).map((l) => de(l, i("core.form.time.now"), I(s())))
20
+ };
21
+ }
22
+ const we = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ge = ["aria-label", "onClick"], Be = /* @__PURE__ */ G({
23
+ __name: "TimeField",
24
+ props: /* @__PURE__ */ L(/* @__PURE__ */ ee({
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
+ }, { ...ue, minuteStep: 1, quickTimes: void 0 }), {
38
+ modelValue: { default: null },
39
+ modelModifiers: {}
40
+ }),
41
+ emits: /* @__PURE__ */ L(["focus", "blur"], ["update:modelValue"]),
42
+ setup(s, { expose: i, emit: y }) {
43
+ const e = s, l = J(s, "modelValue"), $ = y, { t: p } = R(), A = oe(), H = ae(), q = b("input"), f = b("popover"), C = b("panel"), V = b("sheet"), k = ke(() => e.minuteStep), a = pe({ model: l, display: (t) => t, parse: k.parse }), S = m(() => k.shortcuts(e.quickTimes)), B = m(() => e.error || a.message.value), K = se("date", () => B.value ? "error" : e.disabled ? "locked" : "rest"), W = m(() => {
44
+ const t = fe(l.value);
45
+ return t ? A.time(new Date(2e3, 0, 1, t.hour, t.minute)) : null;
46
+ }), D = m(() => Q(a.typed.value) ? a.typed.value : Q(l.value) ? l.value : null);
47
+ async function w(t) {
48
+ e.disabled || (f.value?.present(), t && (await M(), await M(), C.value?.querySelector("[role=listbox]")?.focus()));
49
+ }
50
+ function j(t) {
51
+ t.key === "Enter" ? (a.commit(), f.value?.dismiss()) : t.key === "ArrowDown" && (t.preventDefault(), w(!0));
52
+ }
53
+ return i({ focus: () => q.value?.focus() }), (t, r) => (d(), F(ie, T({ ...o(ne)(e), error: B.value }, {
54
+ value: W.value,
55
+ "value-style": "numeric"
56
+ }), O({
57
+ default: u(({ id: E, describedby: N, invalid: P }) => [
58
+ o(H) ? (d(), _(U, { key: 0 }, [
59
+ c(te, T({ id: E, "aria-describedby": N }, {
60
+ disabled: e.disabled,
61
+ invalid: P,
62
+ placeholder: o(p)("core.form.select.choose"),
63
+ onClick: r[0] || (r[0] = (v) => V.value?.present())
64
+ }), {
65
+ default: u(() => [
66
+ l.value ? (d(), _(U, { key: 0 }, [
67
+ X(Y(l.value), 1)
68
+ ], 64)) : z("", !0)
69
+ ]),
70
+ _: 1
71
+ }, 16, ["disabled", "invalid", "placeholder"]),
72
+ c(ve, {
73
+ ref_key: "sheet",
74
+ ref: V,
75
+ title: e.label ?? o(p)("core.form.time.label"),
76
+ mode: "time",
77
+ "model-value": l.value,
78
+ shortcuts: S.value,
79
+ step: e.minuteStep,
80
+ clearable: !e.required,
81
+ "onUpdate:modelValue": o(a).set
82
+ }, null, 8, ["title", "model-value", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
83
+ ], 64)) : (d(), F(re, {
84
+ key: 1,
85
+ ref_key: "popover",
86
+ ref: f,
87
+ label: e.label ?? o(p)("core.form.time.label"),
88
+ width: "sm",
89
+ placement: "bottom-start",
90
+ arrow: !1,
91
+ autofocus: !1
92
+ }, {
93
+ trigger: u(({ attrs: v, presented: g }) => [
94
+ h("div", {
95
+ class: Z(["inline-flex max-w-full items-center gap-2", o(K)])
96
+ }, [
97
+ h("input", T({
98
+ id: E,
99
+ ref_key: "input",
100
+ ref: q
101
+ }, v, {
102
+ type: "text",
103
+ role: "combobox",
104
+ autocomplete: "off",
105
+ size: "10",
106
+ name: e.name,
107
+ value: o(a).text.value,
108
+ placeholder: o(k).placeholder.value,
109
+ disabled: e.disabled,
110
+ required: e.required,
111
+ "aria-required": e.required || void 0,
112
+ "aria-invalid": P || void 0,
113
+ "aria-describedby": N,
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: r[1] || (r[1] = (n) => o(a).input(n.target.value)),
116
+ onFocus: r[2] || (r[2] = (n) => $("focus", n)),
117
+ onBlur: r[3] || (r[3] = (n) => {
118
+ o(a).commit(), $("blur", n);
119
+ }),
120
+ onKeydown: j,
121
+ onClick: r[4] || (r[4] = (n) => w(!1))
122
+ }), null, 16, we),
123
+ e.disabled ? z("", !0) : (d(), _("button", {
124
+ key: 0,
125
+ type: "button",
126
+ tabindex: "-1",
127
+ "aria-label": o(p)("core.form.time.open"),
128
+ class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
129
+ onClick: (n) => g ? f.value?.dismiss() : w(!0)
130
+ }, [
131
+ c(o(le), {
132
+ name: "timeLine",
133
+ size: 18
134
+ })
135
+ ], 8, ge))
136
+ ], 2)
137
+ ]),
138
+ default: u(({ dismiss: v }) => [
139
+ h("div", {
140
+ ref_key: "panel",
141
+ ref: C,
142
+ class: "flex flex-col gap-2.5"
143
+ }, [
144
+ c(be, {
145
+ "model-value": D.value,
146
+ step: e.minuteStep,
147
+ "onUpdate:modelValue": o(a).set
148
+ }, null, 8, ["model-value", "step", "onUpdate:modelValue"]),
149
+ c(ye, {
150
+ items: S.value,
151
+ selected: D.value,
152
+ onPick: (g) => {
153
+ o(a).set(g), v();
154
+ }
155
+ }, null, 8, ["items", "selected", "onPick"])
156
+ ], 512)
157
+ ]),
158
+ _: 2
159
+ }, 1032, ["label"]))
160
+ ]),
161
+ _: 2
162
+ }, [
163
+ t.$slots.trailing ? {
164
+ name: "trailing",
165
+ fn: u(() => [
166
+ x(t.$slots, "trailing")
167
+ ]),
168
+ key: "0"
169
+ } : void 0,
170
+ t.$slots.labelTrailing ? {
171
+ name: "labelTrailing",
172
+ fn: u(() => [
173
+ x(t.$slots, "labelTrailing")
174
+ ]),
175
+ key: "1"
176
+ } : void 0,
177
+ t.$slots.readonly ? {
178
+ name: "readonly",
179
+ fn: u(() => [
180
+ x(t.$slots, "readonly")
181
+ ]),
182
+ key: "2"
183
+ } : void 0
184
+ ]), 1040, ["value"]));
185
+ }
186
+ });
187
+ export {
188
+ Be as _,
189
+ ke as u
190
+ };
@@ -3,7 +3,7 @@ import { useI18n as A } from "vue-i18n";
3
3
  import { a as F } from "./neighbors-DVN_cADL.js";
4
4
  import { _ as H } from "./Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js";
5
5
  import { u as J } from "./describeError-B-NMa--w.js";
6
- import { i as w, P as Q, p as W, f as X, M as Y, g as Z, d as ee } from "./index-D8akxuKo.js";
6
+ import { i as w, P as Q, p as W, f as X, M as Y, g as Z, d as ee } from "./index-Dxu7ZfCC.js";
7
7
  import { _ as se } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
8
8
  import { t as k } from "./toast-CqSDTWRX.js";
9
9
  import { _ as ae } from "./SectionNavigator.vue_vue_type_script_setup_true_lang-BltrQnrQ.js";
@@ -14,12 +14,12 @@ import { A as re } from "./access-DmAceEo5.js";
14
14
  import { _ as ne } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
15
15
  import { u as ie } from "./useLoad-M7V-AVwR.js";
16
16
  import { _ as V } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
17
- import { _ as T } from "./FormGroup.vue_vue_type_script_setup_true_lang-C7nq7MJB.js";
17
+ import { _ as T } from "./FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js";
18
18
  import { e as B } from "./control-B4SdblL6.js";
19
19
  import { u as z, _ as K } from "./useCommand-YN9EMb7s.js";
20
20
  import { u as U } from "./fieldMessages-6HVzSDqG.js";
21
- import { u as ce, s as le } from "./status-vMwum3Y9.js";
22
- import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-BslHroDP.js";
21
+ import { u as ce, s as le } from "./status-BLTC7wi1.js";
22
+ import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
23
23
  const ue = /* @__PURE__ */ R({
24
24
  __name: "DeactivateDialog",
25
25
  props: {
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as U, openBlock as p, createBlock as C, unref as e, withCtx as c, createVNode as r, mergeProps as i, useTemplateRef as V, computed as q, createTextVNode as z, toDisplayString as $, createCommentVNode as A, createElementBlock as S, normalizeClass as N } from "vue";
2
2
  import { useI18n as B } from "vue-i18n";
3
3
  import { useRouter as M } from "vue-router";
4
- import { u as P, _ as D } from "./CollectionPage.vue_vue_type_script_setup_true_lang-nojILoAf.js";
4
+ import { u as P, _ as D } from "./CollectionPage.vue_vue_type_script_setup_true_lang-BNM_cbXa.js";
5
5
  import { _ as I } from "./Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js";
6
6
  import { u as F } from "./format-D8X4zsx6.js";
7
7
  import { u as L } from "./platform-q3cjODLx.js";
8
8
  import { _ as G } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
9
- import { i as K, f as E, M as W } from "./index-D8akxuKo.js";
10
- import { U as j, u as H, s as J } from "./status-vMwum3Y9.js";
9
+ import { i as K, f as E, M as W } from "./index-Dxu7ZfCC.js";
10
+ import { U as j, u as H, s as J } from "./status-BLTC7wi1.js";
11
11
  import { u as O } from "./environment-Dva-SG8D.js";
12
12
  import { u as Q } from "./languages-BShG9LpE.js";
13
- import { _ as X } from "./FormGroup.vue_vue_type_script_setup_true_lang-C7nq7MJB.js";
14
- import { _ as Y } from "./SelectField.vue_vue_type_script_setup_true_lang-ByDo_32P.js";
15
- import { _ as d } from "./TextField.vue_vue_type_script_setup_true_lang-BslHroDP.js";
13
+ import { _ as X } from "./FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js";
14
+ import { _ as Y } from "./SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js";
15
+ import { _ as d } from "./TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
16
16
  import { u as Z, _ as ee } from "./useCommand-YN9EMb7s.js";
17
17
  import { t as se } from "./toast-CqSDTWRX.js";
18
18
  import { u as te } from "./fieldMessages-6HVzSDqG.js";
@@ -1,4 +1,4 @@
1
- import { _ as a, i as c, j as o, c as r, b as n, k as i, l as u, p as l, m as p, n as t, u as d, f as m } from "../index-BrqxylSS.js";
1
+ import { _ as a, i as c, j as o, c as r, b as n, k as i, l as u, p as l, m as p, n as t, u as d, f as m } from "../index-D6BjUQJT.js";
2
2
  export {
3
3
  a as BindingRow,
4
4
  c as PersonAccess,
@@ -1,5 +1,5 @@
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-nojILoAf.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
4
  import { a as te, b as se } from "../rowLayout-D1vrdy0s.js";
5
5
  import { _ as ae } from "../DataTable.vue_vue_type_script_setup_true_lang-DPuH84I7.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. */
@@ -36,8 +38,10 @@ declare const _default: <Value extends string | number, Meta = undefined>(__VLS_
36
38
  slots: FieldSlots & {
37
39
  /** Replaces what an option row says (an icon, a badge); the row, its keys and roles stay. */
38
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;
39
43
  };
40
- 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);
41
45
  }>) => import("vue").VNode & {
42
46
  __ctx?: Awaited<typeof __VLS_setup>;
43
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;
@@ -7,20 +7,23 @@ import { type FieldProps, type FieldSlots } from "./field";
7
7
  * <MoneyField v-bind="form.bind('price')" currency="EUR" :label="t('price')" />
8
8
  */
9
9
  type __VLS_Props = FieldProps & {
10
+ modelValue?: number | null;
10
11
  currency: string;
11
12
  decimals?: number;
13
+ blankZero?: boolean;
12
14
  negative?: boolean;
13
15
  width?: Exclude<ControlWidth, "content">;
14
16
  };
15
17
  type __VLS_Slots = FieldSlots;
16
- type __VLS_PublicProps = __VLS_Props & {
17
- modelValue?: number | null;
18
- };
19
- declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
18
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
20
19
  focus: () => void | undefined;
21
20
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ blur: (event: FocusEvent) => any;
22
+ focus: (event: FocusEvent) => any;
22
23
  "update:modelValue": (value: number | null) => any;
23
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onBlur?: ((event: FocusEvent) => any) | undefined;
26
+ onFocus?: ((event: FocusEvent) => any) | undefined;
24
27
  "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
25
28
  }>, {
26
29
  disabled: boolean;
@@ -30,12 +33,14 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
30
33
  required: boolean;
31
34
  width: Exclude<ControlWidth, "content">;
32
35
  presentation: "control" | "value";
36
+ modelValue: number | null;
33
37
  labelHidden: boolean;
34
38
  hint: string;
35
39
  editable: boolean;
36
40
  lockedReason: string;
37
41
  decimals: number;
38
42
  negative: boolean;
43
+ blankZero: boolean;
39
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
45
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
41
46
  export default _default;
@@ -16,6 +16,8 @@ import { type FieldProps, type FieldSlots } from "./field";
16
16
  *
17
17
  * Typing "1,5" mid-edit is never rewritten under the cursor: the text is the user's until the field loses focus.
18
18
  * `:max-digits="5"` takes at most five digits (a postal code): typing a sixth does nothing, pasting a longer number keeps its first five.
19
+ * However the field is emptied (typing, a paste of nothing, a cut, a test's `fill("")`) it emits `null`, also when the value it was given was already `null`.
20
+ * `blankZero` shows a 0 as an empty field (a cost row where nothing entered and 0 mean the same); the value stays 0.
19
21
  * Limits (`min`, `max`) are the validator's job; the field only keeps what cannot be a number out.
20
22
  */
21
23
  type __VLS_Props = FieldProps & {
@@ -29,8 +31,11 @@ type __VLS_Props = FieldProps & {
29
31
  grouping?: boolean;
30
32
  /** The most digits the field takes, fraction digits included (the sign, separators and decimal mark are not counted): a postal code is `:max-digits="5"`. Further digits are not accepted, as `maxlength` does for text; a pasted longer number keeps its first digits. */
31
33
  maxDigits?: number;
34
+ /** A value of 0 reads as an empty field, editing and reading (a cost that is "not set" until filled in). The value stays 0 and what is emitted is unchanged; a 0 the user types stays visible while the field has focus. */
35
+ blankZero?: boolean;
32
36
  /** The monospaced face of `TextField mono` (coordinates, codes). */
33
37
  mono?: boolean;
38
+ modelValue?: number | null;
34
39
  placeholder?: string;
35
40
  prefix?: string;
36
41
  suffix?: string;
@@ -38,14 +43,15 @@ type __VLS_Props = FieldProps & {
38
43
  width?: Exclude<ControlWidth, "content">;
39
44
  };
40
45
  type __VLS_Slots = FieldSlots;
41
- type __VLS_PublicProps = __VLS_Props & {
42
- modelValue?: number | null;
43
- };
44
- declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
46
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
45
47
  focus: () => void | undefined;
46
48
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
49
+ blur: (event: FocusEvent) => any;
50
+ focus: (event: FocusEvent) => any;
47
51
  "update:modelValue": (value: number | null) => any;
48
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
52
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
53
+ onBlur?: ((event: FocusEvent) => any) | undefined;
54
+ onFocus?: ((event: FocusEvent) => any) | undefined;
49
55
  "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
50
56
  }>, {
51
57
  disabled: boolean;
@@ -57,6 +63,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
57
63
  width: Exclude<ControlWidth, "content">;
58
64
  prefix: string;
59
65
  presentation: "control" | "value";
66
+ modelValue: number | null;
60
67
  labelHidden: boolean;
61
68
  hint: string;
62
69
  editable: boolean;
@@ -68,6 +75,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
68
75
  negative: boolean;
69
76
  grouping: boolean;
70
77
  maxDigits: number;
78
+ blankZero: boolean;
71
79
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
72
80
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
73
81
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { type FieldProps, type FieldSlots } from "./field";
2
- import type { OptionSlotScope, SelectOption } from "./options";
2
+ import type { OptionSlotScope, SelectOption, ValueSlotScope } from "./options";
3
3
  import { type AsyncOptions, type OptionsSource } from "./useOptions";
4
4
  declare const _default: <Value extends string | number, Clearable extends boolean = false, Meta = undefined, Source extends OptionsSource<Value, Meta> = OptionsSource<Value, Meta>>(__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<{
@@ -21,6 +21,8 @@ declare const _default: <Value extends string | number, Clearable extends boolea
21
21
  slots: FieldSlots & {
22
22
  /** Replaces what an option row says (an icon, a badge); the row, its check, keys and roles stay. */
23
23
  option?: (scope: OptionSlotScope<Value, Meta>) => unknown;
24
+ /** Replaces the chosen value's text, in the control and in read mode (a swatch before the colour's name). Only rendered while an option is chosen; the placeholder is not this slot's. */
25
+ value?: (scope: ValueSlotScope<Value, Meta>) => unknown;
24
26
  };
25
27
  emit: (evt: "update:modelValue", value: Clearable extends true ? Value | null : Source extends AsyncOptions<Value, Meta> ? Value | null : Value) => void;
26
28
  }>) => import("vue").VNode & {
@@ -51,12 +51,16 @@ type __VLS_PublicProps = __VLS_Props & {
51
51
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
52
52
  focus: () => void | undefined;
53
53
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
54
+ blur: (event: FocusEvent) => any;
55
+ focus: (event: FocusEvent) => any;
54
56
  "update:modelValue": (value: string) => any;
55
57
  picked: (suggestion: {
56
58
  text: string;
57
59
  detail?: string;
58
60
  }) => any;
59
61
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
62
+ onBlur?: ((event: FocusEvent) => any) | undefined;
63
+ onFocus?: ((event: FocusEvent) => any) | undefined;
60
64
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
61
65
  onPicked?: ((suggestion: {
62
66
  text: string;
@@ -21,8 +21,12 @@ type __VLS_PublicProps = __VLS_Props & {
21
21
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  focus: () => void | undefined;
23
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ blur: (event: FocusEvent) => any;
25
+ focus: (event: FocusEvent) => any;
24
26
  "update:modelValue": (value: string) => any;
25
27
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
+ onBlur?: ((event: FocusEvent) => any) | undefined;
29
+ onFocus?: ((event: FocusEvent) => any) | undefined;
26
30
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
27
31
  }>, {
28
32
  disabled: boolean;
@@ -22,8 +22,12 @@ type __VLS_PublicProps = __VLS_Props & {
22
22
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
23
23
  focus: () => void | undefined;
24
24
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ blur: (event: FocusEvent) => any;
26
+ focus: (event: FocusEvent) => any;
25
27
  "update:modelValue": (value: string | null) => any;
26
28
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
+ onBlur?: ((event: FocusEvent) => any) | undefined;
30
+ onFocus?: ((event: FocusEvent) => any) | undefined;
27
31
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
28
32
  }>, {
29
33
  disabled: boolean;
@@ -41,7 +41,7 @@ export { default as OptionList } from "./OptionList.vue";
41
41
  export { groupOptions, matchOptions } from "./options";
42
42
  export { recentChoicesKey } from "./suggestions";
43
43
  export type { RecentChoices, SuggestionSource, TextSuggestion } from "./suggestions";
44
- export type { OptionGroup, OptionSlotScope, OptionWithMeta, SelectOption } from "./options";
44
+ export type { OptionGroup, OptionSlotScope, OptionWithMeta, SelectOption, ValueSlotScope } from "./options";
45
45
  export { useOptions } from "./useOptions";
46
46
  export type { AsyncOptions, OptionsContext, OptionsSource } from "./useOptions";
47
47
  export { default as OtpInput } from "./OtpInput.vue";