@wssto2/vue-core 0.4.15 → 0.4.17

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 (97) hide show
  1. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js → ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js} +1 -1
  2. package/dist/{Activity-4q26REYj.js → Activity-DnFB6WXf.js} +5 -5
  3. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js} +64 -63
  4. package/dist/{Changes-CKIuGF8O.js → Changes-DMrQYv2e.js} +4 -4
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CVnZzaBm.js} +5 -5
  6. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-ChS9ULwk.js → DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js} +1 -1
  7. package/dist/DateField.vue_vue_type_script_setup_true_lang-BIXzNzYo.js +278 -0
  8. package/dist/{DeadLetters-DPGcQOz1.js → DeadLetters-BF9PS4mA.js} +3 -3
  9. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js → FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js} +1 -1
  10. package/dist/{FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js → FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js} +1 -1
  11. package/dist/{General-CUA9b3ML.js → General-yInbmj6I.js} +8 -8
  12. package/dist/{NewRolePage-DBfCvDWA.js → NewRolePage-09C3P6fE.js} +3 -3
  13. package/dist/NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js +150 -0
  14. package/dist/{ProfilePage-On-eAiJ-.js → ProfilePage-CvV44C0m.js} +8 -8
  15. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-D87Hs75d.js → RecordHeader.vue_vue_type_script_setup_true_lang-DijFQnU6.js} +1 -1
  16. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js → ResourcePage.vue_vue_type_script_setup_true_lang-BpLnmA6n.js} +1 -1
  17. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js → RoleEditor.vue_vue_type_script_setup_true_lang-BqWoby16.js} +7 -7
  18. package/dist/{RolePage-B8oul55j.js → RolePage-DuIFjSKH.js} +8 -8
  19. package/dist/{RolesPage-DsXVivdj.js → RolesPage-BzqBqils.js} +5 -5
  20. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-B0p_8xQG.js → SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js} +1 -1
  21. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CW81A_bn.js} +2 -2
  22. package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js +81 -0
  23. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js → SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js} +161 -139
  24. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js → SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js} +3 -3
  25. package/dist/{Sessions-BTyXDEuY.js → Sessions-_qmODKw2.js} +2 -2
  26. package/dist/{SettingsPage-DHTmMgif.js → SettingsPage-Bz48sO08.js} +9 -9
  27. package/dist/{SignIn-DU4DE2wj.js → SignIn-DJsTGQ79.js} +5 -5
  28. package/dist/{SignInPage-BA22kyOp.js → SignInPage-Bb78MIDk.js} +3 -3
  29. package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js → SignInTable.vue_vue_type_script_setup_true_lang-7Z9EmLs-.js} +1 -1
  30. package/dist/{SignIns-C8QAZBaL.js → SignIns-yRjJrf47.js} +2 -2
  31. package/dist/SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js +87 -0
  32. package/dist/TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js +292 -0
  33. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +91 -0
  34. package/dist/TimeField.vue_vue_type_script_setup_true_lang-DrLtIexs.js +187 -0
  35. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js → Timestamp.vue_vue_type_script_setup_true_lang-CU2Y5oYl.js} +1 -1
  36. package/dist/{UserRecord-D1BNmYp9.js → UserRecord-4L0FrCty.js} +9 -9
  37. package/dist/{UsersList-ltx3G23-.js → UsersList-ww_-FoAq.js} +9 -9
  38. package/dist/access/index.js +1 -1
  39. package/dist/app/application.d.ts +1 -1
  40. package/dist/app/index.js +1 -1
  41. package/dist/collection/index.js +3 -3
  42. package/dist/content/index.js +1 -1
  43. package/dist/{control-CX9BG2UB.js → control-B_Nwtmag.js} +96 -82
  44. package/dist/{fieldMessages-DV6sESpn.js → fieldMessages-6HVzSDqG.js} +1 -1
  45. package/dist/form/CardSelectField.vue.d.ts +2 -2
  46. package/dist/form/ChoiceChips.vue.d.ts +2 -2
  47. package/dist/form/ComboField.vue.d.ts +2 -2
  48. package/dist/form/CommandDialog.vue.d.ts +3 -0
  49. package/dist/form/DateField.vue.d.ts +9 -2
  50. package/dist/form/DateTimeField.vue.d.ts +9 -2
  51. package/dist/form/Field.vue.d.ts +1 -1
  52. package/dist/form/FileField.vue.d.ts +9 -2
  53. package/dist/form/I18nField.vue.d.ts +9 -2
  54. package/dist/form/MoneyField.vue.d.ts +9 -2
  55. package/dist/form/MonthYearField.vue.d.ts +9 -2
  56. package/dist/form/MultiSelectField.vue.d.ts +2 -2
  57. package/dist/form/NumberField.vue.d.ts +20 -2
  58. package/dist/form/PhotoField.vue.d.ts +9 -2
  59. package/dist/form/SegmentedField.vue.d.ts +2 -2
  60. package/dist/form/SelectField.vue.d.ts +2 -2
  61. package/dist/form/SwitchField.vue.d.ts +2 -2
  62. package/dist/form/TextField.vue.d.ts +9 -2
  63. package/dist/form/TextareaField.vue.d.ts +9 -2
  64. package/dist/form/TimeField.vue.d.ts +9 -2
  65. package/dist/form/field.d.ts +9 -0
  66. package/dist/form/index.d.ts +1 -1
  67. package/dist/form/index.js +1176 -977
  68. package/dist/format/index.js +1 -1
  69. package/dist/format-D8X4zsx6.js +78 -0
  70. package/dist/i18n/index.d.ts +1 -0
  71. package/dist/i18n/index.js +31 -28
  72. package/dist/identity/index.js +1 -1
  73. package/dist/{index-BCw_Ki6z.js → index-C6vCe149.js} +3 -3
  74. package/dist/{index-Chh4z9xW.js → index-DW9gyWL1.js} +8 -8
  75. package/dist/{index-DwdVrW6q.js → index-JjALCpwi.js} +13 -13
  76. package/dist/index.d.ts +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/internal/intlLocale.d.ts +2 -0
  79. package/dist/intlLocale-CeRU44qJ.js +4 -0
  80. package/dist/notifications/index.js +1 -1
  81. package/dist/page/index.js +5 -5
  82. package/dist/phone/index.js +112 -111
  83. package/dist/resource/index.js +1 -1
  84. package/dist/{rowLayout-D1cYQghV.js → rowLayout-BFz4Kdoy.js} +2 -2
  85. package/dist/{status-cWCAMAmW.js → status-Cz54-7z7.js} +1 -1
  86. package/dist/testing/index.js +1 -1
  87. package/dist/{useCommand-B-N6HJOz.js → useCommand-YN9EMb7s.js} +41 -38
  88. package/dist/{useTypedEntry-aTfPBAhw.js → useTypedEntry-C7k7Dyl-.js} +237 -236
  89. package/package.json +1 -1
  90. package/dist/DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js +0 -256
  91. package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +0 -126
  92. package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js +0 -59
  93. package/dist/SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js +0 -65
  94. package/dist/TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js +0 -270
  95. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js +0 -69
  96. package/dist/TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js +0 -165
  97. package/dist/format-B8mJm946.js +0 -77
@@ -1,270 +0,0 @@
1
- import { defineComponent as I, useTemplateRef as P, computed as y, watch as Y, nextTick as Z, openBlock as n, createElementBlock as i, withModifiers as ee, normalizeStyle as te, unref as s, createElementVNode as m, toDisplayString as r, createCommentVNode as d, Fragment as E, renderList as oe, normalizeClass as q, createBlock as z, createTextVNode as F, useModel as se, ref as ne, mergeProps as ae, withCtx as ie, withDirectives as le, vModelDynamic as re, mergeModels as H, mergeDefaults as ce } from "vue";
2
- import { useI18n as K } from "vue-i18n";
3
- import { b as ue } from "./controlSurface-t7OEFESJ.js";
4
- import { a as de, c as pe, _ as me, f as fe, b as he } from "./control-CX9BG2UB.js";
5
- import { _ as ve } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
- import { u as ge } from "./anchored-Cj4--8dT.js";
7
- import { l as O, m as ye, u as xe, c as be } from "./suggestions-BxMm6MQA.js";
8
- const _e = ["id", "aria-busy"], ke = { class: "min-h-0 flex-1 overflow-y-auto p-1.5" }, we = {
9
- key: 0,
10
- class: "px-2.5 pb-1 pt-1.5 text-caption font-semibold uppercase text-content-disabled",
11
- role: "presentation"
12
- }, $e = ["id", "aria-selected", "aria-disabled", "onMouseenter", "onClick"], Me = { class: "min-w-0 flex-1" }, qe = { class: "block truncate text-body text-content-strong" }, Be = {
13
- key: 0,
14
- class: "font-semibold"
15
- }, Le = {
16
- key: 0,
17
- class: "block truncate text-footnote text-content-muted"
18
- }, Ce = {
19
- key: 2,
20
- class: "px-3 py-2 text-footnote text-content-muted",
21
- role: "status"
22
- }, Se = {
23
- key: 3,
24
- class: "px-3 py-2 text-footnote text-content-destructive",
25
- role: "alert"
26
- }, De = {
27
- key: 4,
28
- class: "px-3 py-2 text-footnote text-content-muted"
29
- }, Ve = {
30
- key: 0,
31
- class: "mx-1.5 mb-1.5 mt-0.5 border-t border-border-separator px-2.5 pb-0.5 pt-2 text-caption text-content-muted compact:hidden",
32
- "aria-hidden": "true"
33
- }, Ee = /* @__PURE__ */ I({
34
- __name: "SuggestionList",
35
- props: {
36
- id: {},
37
- anchor: {},
38
- open: { type: Boolean },
39
- items: {},
40
- highlighted: {},
41
- query: {},
42
- status: {},
43
- recent: { type: Boolean },
44
- emptyMessage: { type: Boolean },
45
- hint: {}
46
- },
47
- emits: ["pick", "hover"],
48
- setup(w, { emit: B }) {
49
- const o = w, t = B, { t: c } = K(), b = P("panel"), _ = y(() => O(o.open, o.items.length, o.status, o.emptyMessage)), k = y(() => o.status === "loading"), f = (h) => ye(h.label, o.query), { style: L } = ge(b, {
50
- reference: () => o.anchor,
51
- placement: () => "bottom-start",
52
- offset: 4,
53
- padding: 8,
54
- fit: (h, v) => {
55
- h.style.width = `${o.anchor?.offsetWidth ?? 0}px`, h.style.maxHeight = `${Math.max(120, Math.min(320, v.height))}px`;
56
- }
57
- });
58
- return Y(() => o.highlighted, () => void Z(() => b.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" }))), (h, v) => _.value ? (n(), i("div", {
59
- key: 0,
60
- id: `${o.id}-list`,
61
- ref_key: "panel",
62
- ref: b,
63
- role: "listbox",
64
- "aria-busy": k.value || void 0,
65
- style: te(s(L)),
66
- "data-test": "suggestion-list",
67
- class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float",
68
- onMousedown: v[0] || (v[0] = ee(() => {
69
- }, ["prevent"]))
70
- }, [
71
- m("div", ke, [
72
- o.recent ? (n(), i("p", we, r(s(c)("core.form.suggestions.recent")), 1)) : d("", !0),
73
- o.items.length > 0 ? (n(!0), i(E, { key: 1 }, oe(o.items, (a, g) => (n(), i("div", {
74
- id: `${o.id}-option-${g}`,
75
- key: String(a.value),
76
- role: "option",
77
- "aria-selected": g === o.highlighted,
78
- "aria-disabled": a.disabled || void 0,
79
- "data-test": "suggestion-option",
80
- class: q(["flex cursor-pointer items-center gap-2.5 rounded-control px-2.5 py-2", [g === o.highlighted ? "bg-tint-soft" : "hover:bg-fill", a.disabled ? "cursor-not-allowed opacity-45" : "", k.value ? "opacity-60" : ""]]),
81
- onMouseenter: (l) => t("hover", g),
82
- onClick: (l) => !a.disabled && t("pick", a)
83
- }, [
84
- o.recent ? (n(), z(s(ve), {
85
- key: 0,
86
- name: "history",
87
- size: 16,
88
- class: "shrink-0 text-content-disabled"
89
- })) : d("", !0),
90
- m("span", Me, [
91
- m("span", qe, [
92
- o.recent ? (n(), i(E, { key: 0 }, [
93
- F(r(a.label), 1)
94
- ], 64)) : (n(), i(E, { key: 1 }, [
95
- F(r(f(a).before), 1),
96
- f(a).match ? (n(), i("strong", Be, r(f(a).match), 1)) : d("", !0),
97
- F(r(f(a).after), 1)
98
- ], 64))
99
- ]),
100
- a.description ? (n(), i("span", Le, r(a.description), 1)) : d("", !0)
101
- ])
102
- ], 42, $e))), 128)) : o.status === "loading" ? (n(), i("p", Ce, r(s(c)("core.form.select.loading")), 1)) : o.status === "failed" ? (n(), i("p", Se, r(s(c)("core.form.select.failed")), 1)) : (n(), i("p", De, r(s(c)("core.form.select.no_matches")), 1))
103
- ]),
104
- o.hint && o.items.length > 0 ? (n(), i("p", Ve, r(o.hint), 1)) : d("", !0)
105
- ], 44, _e)) : d("", !0);
106
- }
107
- }), Fe = {
108
- key: 0,
109
- class: "shrink-0 text-footnote text-content-muted"
110
- }, Pe = { class: "relative min-w-0 flex-1" }, ze = ["id", "type", "name", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby", "role", "aria-autocomplete", "aria-expanded", "aria-controls", "aria-activedescendant"], Ae = { class: "invisible" }, Ne = { class: "text-content-disabled" }, Re = {
111
- key: 1,
112
- class: "shrink-0 text-footnote text-content-muted"
113
- }, Ue = /* @__PURE__ */ I({
114
- __name: "TextField",
115
- props: /* @__PURE__ */ H(/* @__PURE__ */ ce({
116
- label: {},
117
- labelHidden: { type: Boolean },
118
- hint: {},
119
- error: {},
120
- required: { type: Boolean },
121
- editable: { type: Boolean },
122
- disabled: { type: Boolean },
123
- lockedReason: {},
124
- presentation: {},
125
- name: {},
126
- type: {},
127
- placeholder: {},
128
- maxLength: {},
129
- autocomplete: {},
130
- mono: { type: Boolean },
131
- prefix: {},
132
- suffix: {},
133
- width: {},
134
- suggestions: { type: [Array, Function] },
135
- suggestionsMinLength: {},
136
- suggestionsDebounce: {},
137
- suggestionsLimit: {},
138
- recents: {}
139
- }, {
140
- ...he,
141
- type: "text",
142
- placeholder: void 0,
143
- maxLength: void 0,
144
- autocomplete: void 0,
145
- mono: !1,
146
- prefix: void 0,
147
- suffix: void 0,
148
- width: "md",
149
- suggestions: void 0,
150
- suggestionsMinLength: 2,
151
- suggestionsDebounce: 300,
152
- suggestionsLimit: 8,
153
- recents: void 0
154
- }), {
155
- modelValue: { default: "" },
156
- modelModifiers: {}
157
- }),
158
- emits: /* @__PURE__ */ H(["picked"], ["update:modelValue"]),
159
- setup(w, { expose: B, emit: o }) {
160
- const t = w, c = se(w, "modelValue"), b = o, _ = P("input"), k = P("anchor"), f = !!de(), L = pe("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), h = y(() => f ? ue(t.width) : "w-full"), { t: v } = K(), a = (e) => typeof e == "string" ? { value: e, label: e } : { value: e.text, label: e.text, ...e.detail !== void 0 ? { description: e.detail } : {} }, g = y(() => {
161
- const e = t.suggestions;
162
- if (e)
163
- return typeof e == "function" ? async (p, x) => (await e(p, x)).map(a) : e.map(a);
164
- }), l = y(() => g.value !== void 0), u = xe({
165
- source: () => g.value,
166
- minLength: () => t.suggestionsMinLength,
167
- debounce: () => t.suggestionsDebounce,
168
- limit: () => t.suggestionsLimit,
169
- listAllWhenEmpty: !1,
170
- recents: () => t.recents
171
- }), { items: C, open: S, status: A, highlighted: N, showingRecent: R } = u, T = ne(!0), D = () => {
172
- const e = _.value;
173
- T.value = !e || e.selectionStart === e.value.length && e.selectionEnd === e.value.length;
174
- }, $ = y(() => l.value && S.value && !R.value && T.value && u.current.value ? be(c.value, u.current.value.label) : ""), W = y(() => O(S.value, C.value.length, A.value, !1));
175
- function G(e) {
176
- D(), l.value && u.ask(e.target.value);
177
- }
178
- function V(e) {
179
- c.value = e.value, u.remember(e), u.close(), b("picked", { text: e.value, ...e.description !== void 0 ? { detail: e.description } : {} });
180
- }
181
- function U() {
182
- l.value && c.value === "" && u.show("");
183
- }
184
- function j() {
185
- const e = u.current.value;
186
- return !$.value || !e ? !1 : (V(e), !0);
187
- }
188
- const J = (e) => {
189
- l.value && u.keydown(e, { pick: V, enterNeedsMove: !0, complete: j });
190
- };
191
- return B({ focus: () => _.value?.focus() }), (e, p) => (n(), z(me, ae(s(fe)(t), {
192
- value: c.value,
193
- prefix: t.prefix,
194
- suffix: t.suffix,
195
- "value-style": t.mono ? "mono" : void 0
196
- }), {
197
- default: ie(({ id: x, describedby: Q, invalid: X }) => [
198
- m("div", {
199
- ref_key: "anchor",
200
- ref: k,
201
- class: q(["flex items-center gap-1.5", [s(L), h.value]])
202
- }, [
203
- t.prefix ? (n(), i("span", Fe, r(t.prefix), 1)) : d("", !0),
204
- m("div", Pe, [
205
- le(m("input", {
206
- id: x,
207
- ref_key: "input",
208
- ref: _,
209
- "onUpdate:modelValue": p[0] || (p[0] = (M) => c.value = M),
210
- type: t.type,
211
- name: t.name,
212
- placeholder: t.placeholder,
213
- maxlength: t.maxLength,
214
- autocomplete: l.value ? "off" : t.autocomplete,
215
- disabled: t.disabled,
216
- required: t.required,
217
- "aria-required": t.required || void 0,
218
- "aria-invalid": X || void 0,
219
- "aria-describedby": Q,
220
- role: l.value ? "combobox" : void 0,
221
- "aria-autocomplete": l.value ? "both" : void 0,
222
- "aria-expanded": l.value ? W.value : void 0,
223
- "aria-controls": l.value ? `${x}-list` : void 0,
224
- "aria-activedescendant": l.value && W.value && s(C).length > 0 ? `${x}-option-${s(N)}` : void 0,
225
- class: q(["block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed", [t.mono ? "font-mono" : "", f && !l.value ? "compact:text-right" : ""]]),
226
- onInput: G,
227
- onKeyup: D,
228
- onClick: D,
229
- onKeydown: J,
230
- onFocus: U,
231
- onBlur: p[1] || (p[1] = (M) => s(u).close())
232
- }, null, 42, ze), [
233
- [re, c.value]
234
- ]),
235
- $.value ? (n(), i("span", {
236
- key: 0,
237
- "aria-hidden": "true",
238
- class: q(["pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre py-1 text-body", t.mono ? "font-mono" : ""]),
239
- "data-test": "completion"
240
- }, [
241
- m("span", Ae, r(c.value), 1),
242
- m("span", Ne, r($.value), 1)
243
- ], 2)) : d("", !0)
244
- ]),
245
- t.suffix ? (n(), i("span", Re, r(t.suffix), 1)) : d("", !0)
246
- ], 2),
247
- l.value ? (n(), z(Ee, {
248
- key: 0,
249
- id: x,
250
- anchor: k.value,
251
- open: s(S),
252
- items: s(C),
253
- highlighted: s(N),
254
- query: c.value,
255
- status: s(A),
256
- recent: s(R),
257
- "empty-message": !1,
258
- hint: $.value ? s(v)("core.form.suggestions.keys_complete") : s(v)("core.form.suggestions.keys_pick"),
259
- onPick: V,
260
- onHover: p[2] || (p[2] = (M) => s(u).highlight(M))
261
- }, null, 8, ["id", "anchor", "open", "items", "highlighted", "query", "status", "recent", "hint"])) : d("", !0)
262
- ]),
263
- _: 1
264
- }, 16, ["value", "prefix", "suffix", "value-style"]));
265
- }
266
- });
267
- export {
268
- Ue as _,
269
- Ee as a
270
- };
@@ -1,69 +0,0 @@
1
- import { defineComponent as k, useModel as _, useTemplateRef as B, computed as l, openBlock as d, createBlock as q, mergeProps as C, unref as i, withCtx as V, createElementVNode as u, normalizeClass as c, withDirectives as L, vModelText as M, createElementBlock as D, toDisplayString as z, createCommentVNode as E, mergeModels as F, mergeDefaults as P } from "vue";
2
- import { u as R } from "./mediaQuery-CygcXmFW.js";
3
- import { a as T, u as $, c as N, _ as S, f as j, b as G } from "./control-CX9BG2UB.js";
4
- const H = ["id", "name", "rows", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], U = {
5
- key: 0,
6
- class: "mt-1 self-end text-footnote tabular-nums text-content-muted"
7
- }, O = /* @__PURE__ */ k({
8
- __name: "TextareaField",
9
- props: /* @__PURE__ */ F(/* @__PURE__ */ P({
10
- label: {},
11
- labelHidden: { type: Boolean },
12
- hint: {},
13
- error: {},
14
- required: { type: Boolean },
15
- editable: { type: Boolean },
16
- disabled: { type: Boolean },
17
- lockedReason: {},
18
- presentation: {},
19
- name: {},
20
- placeholder: {},
21
- maxLength: {},
22
- rows: {},
23
- autocomplete: {},
24
- stacked: { type: Boolean }
25
- }, { ...G, placeholder: void 0, maxLength: void 0, rows: 3, autocomplete: void 0, stacked: !1 }), {
26
- modelValue: { default: "" },
27
- modelModifiers: {}
28
- }),
29
- emits: ["update:modelValue"],
30
- setup(r, { expose: m }) {
31
- const e = r, a = _(r, "modelValue"), s = B("area"), p = !!T(), f = R(), { editable: v } = $(e), t = l(() => p && !e.stacked && !f.value && v.value && !!e.label), o = l(() => e.maxLength ? `${a.value.length} / ${e.maxLength}` : void 0), b = l(() => t.value && o.value ? [e.hint, o.value].filter(Boolean).join(" · ") : e.hint), h = N("area", () => e.error ? "error" : e.disabled ? "locked" : "rest");
32
- return m({ focus: () => s.value?.focus() }), (A, n) => (d(), q(S, C({ ...i(j)(e), hint: b.value }, {
33
- value: a.value,
34
- "row-layout": t.value ? "entry" : "stacked",
35
- "row-label-align": "top"
36
- }), {
37
- default: V(({ id: x, describedby: y, invalid: g }) => [
38
- u("div", {
39
- class: c(["w-full", i(h)])
40
- }, [
41
- L(u("textarea", {
42
- id: x,
43
- ref_key: "area",
44
- ref: s,
45
- "onUpdate:modelValue": n[0] || (n[0] = (w) => a.value = w),
46
- name: e.name,
47
- rows: e.rows,
48
- placeholder: e.placeholder,
49
- maxlength: e.maxLength,
50
- autocomplete: e.autocomplete,
51
- disabled: e.disabled,
52
- required: e.required,
53
- "aria-required": e.required || void 0,
54
- "aria-invalid": g || void 0,
55
- "aria-describedby": y,
56
- class: c(["block w-full border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed", e.disabled ? "resize-none" : "resize-y"])
57
- }, null, 10, H), [
58
- [M, a.value]
59
- ])
60
- ], 2),
61
- !t.value && o.value ? (d(), D("p", U, z(o.value), 1)) : E("", !0)
62
- ]),
63
- _: 1
64
- }, 16, ["value", "row-layout"]));
65
- }
66
- });
67
- export {
68
- O as _
69
- };
@@ -1,165 +0,0 @@
1
- import { computed as u, defineComponent as H, useModel as K, useTemplateRef as v, openBlock as m, createBlock as E, mergeProps as w, unref as t, withCtx as b, createElementBlock as x, Fragment as N, createVNode as d, createTextVNode as W, toDisplayString as j, createCommentVNode as P, createElementVNode as h, normalizeClass as G, mergeModels as J, mergeDefaults as O, nextTick as U } from "vue";
2
- import { useI18n as L } from "vue-i18n";
3
- import { _ as X } from "./DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
4
- import { u as Y } from "./format-B8mJm946.js";
5
- import { _ as Z } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
- import { u as ee } from "./mediaQuery-CygcXmFW.js";
7
- import { _ as te } from "./Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
8
- import { c as oe, _ as ae, f as re, b as le } from "./control-CX9BG2UB.js";
9
- import { d as se, r as ie, t as z, p as ne, u as ue, a as me, i as F, _ as de, b as ce, c as pe } from "./useTypedEntry-aTfPBAhw.js";
10
- function fe(i) {
11
- const { t: n } = L(), e = u(() => [n("core.form.time.words.now").toLowerCase(), "now"]);
12
- return {
13
- placeholder: u(() => n("core.form.time.placeholder")),
14
- parse(o) {
15
- if (e.value.includes(o.trim().toLowerCase())) return { value: z(i()) };
16
- const r = ne(o, i());
17
- return "time" in r ? { value: r.time } : { error: r.error === "step" ? n("core.form.time.step", { step: i() }) : n("core.form.time.invalid") };
18
- },
19
- shortcuts: (o) => (o ?? se).map((r) => ie(r, n("core.form.time.now"), z(i())))
20
- };
21
- }
22
- const ve = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], be = ["aria-label", "onClick"], Ce = /* @__PURE__ */ H({
23
- __name: "TimeField",
24
- props: /* @__PURE__ */ J(/* @__PURE__ */ O({
25
- label: {},
26
- labelHidden: { type: Boolean },
27
- hint: {},
28
- error: {},
29
- required: { type: Boolean },
30
- editable: { type: Boolean },
31
- disabled: { type: Boolean },
32
- lockedReason: {},
33
- presentation: {},
34
- name: {},
35
- minuteStep: {},
36
- quickTimes: {}
37
- }, { ...le, minuteStep: 1, quickTimes: void 0 }), {
38
- modelValue: { default: null },
39
- modelModifiers: {}
40
- }),
41
- emits: ["update:modelValue"],
42
- setup(i, { expose: n }) {
43
- const e = i, o = K(i, "modelValue"), { t: r } = L(), M = Y(), I = ee(), T = v("input"), c = v("popover"), g = v("panel"), q = v("sheet"), k = fe(() => e.minuteStep), l = ue({ model: o, display: (a) => a, parse: k.parse }), C = u(() => k.shortcuts(e.quickTimes)), V = u(() => e.error || l.message.value), Q = oe("date", () => V.value ? "error" : e.disabled ? "locked" : "rest"), R = u(() => {
44
- const a = me(o.value);
45
- return a ? M.time(new Date(2e3, 0, 1, a.hour, a.minute)) : null;
46
- }), $ = u(() => F(l.typed.value) ? l.typed.value : F(o.value) ? o.value : null);
47
- async function y(a) {
48
- e.disabled || (c.value?.present(), a && (await U(), await U(), g.value?.querySelector("[role=listbox]")?.focus()));
49
- }
50
- function A(a) {
51
- a.key === "Enter" ? (l.commit(), c.value?.dismiss()) : a.key === "ArrowDown" && (a.preventDefault(), y(!0));
52
- }
53
- return n({ focus: () => T.value?.focus() }), (a, s) => (m(), E(ae, w({ ...t(re)(e), error: V.value }, {
54
- value: R.value,
55
- "value-style": "numeric"
56
- }), {
57
- default: b(({ id: B, describedby: S, invalid: D }) => [
58
- t(I) ? (m(), x(N, { key: 0 }, [
59
- d(X, w({ id: B, "aria-describedby": S }, {
60
- disabled: e.disabled,
61
- invalid: D,
62
- placeholder: t(r)("core.form.select.choose"),
63
- onClick: s[0] || (s[0] = (p) => q.value?.present())
64
- }), {
65
- default: b(() => [
66
- o.value ? (m(), x(N, { key: 0 }, [
67
- W(j(o.value), 1)
68
- ], 64)) : P("", !0)
69
- ]),
70
- _: 1
71
- }, 16, ["disabled", "invalid", "placeholder"]),
72
- d(de, {
73
- ref_key: "sheet",
74
- ref: q,
75
- title: e.label ?? t(r)("core.form.time.label"),
76
- mode: "time",
77
- "model-value": o.value,
78
- shortcuts: C.value,
79
- step: e.minuteStep,
80
- clearable: !e.required,
81
- "onUpdate:modelValue": t(l).set
82
- }, null, 8, ["title", "model-value", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
83
- ], 64)) : (m(), E(te, {
84
- key: 1,
85
- ref_key: "popover",
86
- ref: c,
87
- label: e.label ?? t(r)("core.form.time.label"),
88
- width: "sm",
89
- placement: "bottom-start",
90
- arrow: !1,
91
- autofocus: !1
92
- }, {
93
- trigger: b(({ attrs: p, presented: _ }) => [
94
- h("div", {
95
- class: G(["inline-flex max-w-full items-center gap-2", t(Q)])
96
- }, [
97
- h("input", w({
98
- id: B,
99
- ref_key: "input",
100
- ref: T
101
- }, p, {
102
- type: "text",
103
- role: "combobox",
104
- autocomplete: "off",
105
- size: "10",
106
- name: e.name,
107
- value: t(l).text.value,
108
- placeholder: t(k).placeholder.value,
109
- disabled: e.disabled,
110
- required: e.required,
111
- "aria-required": e.required || void 0,
112
- "aria-invalid": D || void 0,
113
- "aria-describedby": S,
114
- class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
115
- onInput: s[1] || (s[1] = (f) => t(l).input(f.target.value)),
116
- onBlur: s[2] || (s[2] = (f) => t(l).commit()),
117
- onKeydown: A,
118
- onClick: s[3] || (s[3] = (f) => y(!1))
119
- }), null, 16, ve),
120
- e.disabled ? P("", !0) : (m(), x("button", {
121
- key: 0,
122
- type: "button",
123
- tabindex: "-1",
124
- "aria-label": t(r)("core.form.time.open"),
125
- class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
126
- onClick: (f) => _ ? c.value?.dismiss() : y(!0)
127
- }, [
128
- d(t(Z), {
129
- name: "timeLine",
130
- size: 18
131
- })
132
- ], 8, be))
133
- ], 2)
134
- ]),
135
- default: b(({ dismiss: p }) => [
136
- h("div", {
137
- ref_key: "panel",
138
- ref: g,
139
- class: "flex flex-col gap-2.5"
140
- }, [
141
- d(ce, {
142
- "model-value": $.value,
143
- step: e.minuteStep,
144
- "onUpdate:modelValue": t(l).set
145
- }, null, 8, ["model-value", "step", "onUpdate:modelValue"]),
146
- d(pe, {
147
- items: C.value,
148
- selected: $.value,
149
- onPick: (_) => {
150
- t(l).set(_), p();
151
- }
152
- }, null, 8, ["items", "selected", "onPick"])
153
- ], 512)
154
- ]),
155
- _: 2
156
- }, 1032, ["label"]))
157
- ]),
158
- _: 1
159
- }, 16, ["value"]));
160
- }
161
- });
162
- export {
163
- Ce as _,
164
- fe as u
165
- };
@@ -1,77 +0,0 @@
1
- import { d as g } from "./context-Ch1r4fdN.js";
2
- const T = /^(\d{4})-(\d{2})-(\d{2})$/;
3
- function m(n) {
4
- if (n == null || n === "") return null;
5
- let r;
6
- if (n instanceof Date) r = n;
7
- else if (typeof n == "number") r = new Date(n);
8
- else {
9
- const i = T.exec(n);
10
- r = i ? new Date(Number(i[1]), Number(i[2]) - 1, Number(i[3])) : new Date(n);
11
- }
12
- return Number.isNaN(r.getTime()) || r.getTime() <= 0 ? null : r;
13
- }
14
- const s = { year: "numeric", month: "2-digit", day: "2-digit" }, u = { hour: "2-digit", minute: "2-digit" }, o = [
15
- ["year", 31536e3],
16
- ["month", 2592e3],
17
- ["week", 604800],
18
- ["day", 86400],
19
- ["hour", 3600],
20
- ["minute", 60],
21
- ["second", 1]
22
- ];
23
- function b() {
24
- const n = /* @__PURE__ */ new Map(), r = (e, t) => {
25
- let a = n.get(e);
26
- return a || (a = t(), n.set(e, a)), a;
27
- }, i = (e, t) => r(`d|${e}|${JSON.stringify(t)}`, () => new Intl.DateTimeFormat(e, t));
28
- return {
29
- date: (e, t) => i(t, s).format(e),
30
- dateTime: (e, t) => i(t, { ...s, ...u }).format(e),
31
- time: (e, t) => i(t, u).format(e),
32
- number: (e, t, a) => r(`n|${t}|${JSON.stringify(a ?? {})}`, () => new Intl.NumberFormat(t, a)).format(e),
33
- money: (e, t, a) => r(`m|${a}|${t}`, () => new Intl.NumberFormat(a, { style: "currency", currency: t })).format(e),
34
- relative(e, t, a) {
35
- const c = Math.trunc((e.getTime() - a.getTime()) / 1e3), [d, f] = o.find(([, l]) => Math.abs(c) >= l) ?? o[o.length - 1];
36
- return r(`r|${t}`, () => new Intl.RelativeTimeFormat(t, { numeric: "auto" })).format(Math.trunc(c / f), d);
37
- }
38
- };
39
- }
40
- function F(n) {
41
- const r = { ...b(), ...n.formatters }, i = (e) => typeof e == "number" && Number.isFinite(e);
42
- return {
43
- get locale() {
44
- return n.locale();
45
- },
46
- date: (e) => {
47
- const t = m(e);
48
- return t ? r.date(t, n.locale()) : "";
49
- },
50
- dateTime: (e) => {
51
- const t = m(e);
52
- return t ? r.dateTime(t, n.locale()) : "";
53
- },
54
- time: (e) => {
55
- const t = m(e);
56
- return t ? r.time(t, n.locale()) : "";
57
- },
58
- number: (e, t) => i(e) ? r.number(e, n.locale(), t) : "",
59
- money: (e, t) => i(e) ? r.money(e, t, n.locale()) : "",
60
- relative: (e, t = /* @__PURE__ */ new Date()) => {
61
- const a = m(e);
62
- return a ? r.relative(a, n.locale(), t) : "";
63
- }
64
- };
65
- }
66
- const [y, h] = g("vue-core.formatting");
67
- function w(n, r) {
68
- n.provide(y, r);
69
- }
70
- export {
71
- b as a,
72
- F as c,
73
- y as f,
74
- w as i,
75
- m as t,
76
- h as u
77
- };