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