@wssto2/vue-core 0.4.19 → 0.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{Activity-CLyG5Y9o.js → Activity-DX-RK9xj.js} +3 -3
  2. package/dist/{Changes-xF1VMbqD.js → Changes-_nARQ9IC.js} +2 -2
  3. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-nojILoAf.js → CollectionPage.vue_vue_type_script_setup_true_lang-BNM_cbXa.js} +2 -2
  4. package/dist/DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js +281 -0
  5. package/dist/{DeadLetters-AbbNs69D.js → DeadLetters-O6QReswO.js} +2 -2
  6. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-C7nq7MJB.js → FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js} +2 -1
  7. package/dist/{General-De4Q6Wfn.js → General-CkZoXu29.js} +4 -4
  8. package/dist/{NewRolePage-QAv_XsT0.js → NewRolePage-OosTaMfZ.js} +2 -2
  9. package/dist/NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js +161 -0
  10. package/dist/{ProfilePage-CjjKhkHX.js → ProfilePage-Dn8fQ3ff.js} +3 -3
  11. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-FLJk6Kb2.js → RoleEditor.vue_vue_type_script_setup_true_lang-2IOio1Sa.js} +4 -4
  12. package/dist/{RolePage-De7s2sYr.js → RolePage-33RUvHYD.js} +5 -5
  13. package/dist/{RolesPage-TXQKtK_J.js → RolesPage-BGPoUCMP.js} +3 -3
  14. package/dist/SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js +515 -0
  15. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CuxVe7rm.js → SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js} +1 -1
  16. package/dist/{Sessions-BDLI0o-z.js → Sessions-BbAdbjmG.js} +2 -2
  17. package/dist/{SettingsPage-Kzcqv91E.js → SettingsPage-D47NSOYW.js} +3 -3
  18. package/dist/{SignIn-DKo46hNK.js → SignIn-DDCRzlUq.js} +2 -2
  19. package/dist/{SignInPage-B2v3is80.js → SignInPage-D9jryXA7.js} +2 -2
  20. package/dist/{SignIns-D-_a_S6O.js → SignIns-C_5sRrB4.js} +1 -1
  21. package/dist/{TextField.vue_vue_type_script_setup_true_lang-BslHroDP.js → TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js} +114 -111
  22. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js +93 -0
  23. package/dist/TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js +190 -0
  24. package/dist/{UserRecord-BR70ai9q.js → UserRecord-CUhbz62x.js} +5 -5
  25. package/dist/{UsersList-BC9S6omH.js → UsersList-BE8fnICz.js} +7 -7
  26. package/dist/access/index.js +1 -1
  27. package/dist/collection/index.js +1 -1
  28. package/dist/form/ComboField.vue.d.ts +7 -3
  29. package/dist/form/CommandDialog.vue.d.ts +4 -1
  30. package/dist/form/DateField.vue.d.ts +4 -0
  31. package/dist/form/DateTimeField.vue.d.ts +4 -0
  32. package/dist/form/MoneyField.vue.d.ts +10 -5
  33. package/dist/form/NumberField.vue.d.ts +13 -5
  34. package/dist/form/SelectField.vue.d.ts +3 -1
  35. package/dist/form/TextField.vue.d.ts +4 -0
  36. package/dist/form/TextareaField.vue.d.ts +4 -0
  37. package/dist/form/TimeField.vue.d.ts +4 -0
  38. package/dist/form/index.d.ts +1 -1
  39. package/dist/form/index.js +1215 -1182
  40. package/dist/form/options.d.ts +4 -0
  41. package/dist/form/useCommand.d.ts +18 -0
  42. package/dist/identity/index.js +1 -1
  43. package/dist/{index-BrqxylSS.js → index-C3HWRCEe.js} +6 -6
  44. package/dist/{index-B9KqrN-F.js → index-D-0JNiFF.js} +2 -2
  45. package/dist/{index-D8akxuKo.js → index-DiEoRV9D.js} +11 -11
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +1 -1
  48. package/dist/notifications/index.js +1 -1
  49. package/dist/{status-vMwum3Y9.js → status-UWWFHi9t.js} +1 -1
  50. package/dist/styles.css +1 -1
  51. package/dist/useCommand-VIZE7xG-.js +168 -0
  52. package/package.json +1 -1
  53. package/dist/DateField.vue_vue_type_script_setup_true_lang-CfPwcEM2.js +0 -278
  54. package/dist/NumberField.vue_vue_type_script_setup_true_lang-djJvP6Og.js +0 -150
  55. package/dist/SelectField.vue_vue_type_script_setup_true_lang-ByDo_32P.js +0 -493
  56. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-XZRHwx-n.js +0 -91
  57. package/dist/TimeField.vue_vue_type_script_setup_true_lang-BB7ZGpvP.js +0 -187
  58. package/dist/useCommand-YN9EMb7s.js +0 -138
@@ -1,493 +0,0 @@
1
- import { defineComponent as Q, shallowRef as Z, ref as N, useId as ee, useTemplateRef as X, computed as v, watch as U, nextTick as te, openBlock as r, createElementBlock as g, normalizeClass as h, createElementVNode as d, createVNode as A, unref as t, withDirectives as oe, vModelText as le, createCommentVNode as y, toDisplayString as L, createBlock as V, Fragment as I, renderList as j, renderSlot as R, onScopeDispose as ae, mergeProps as G, createSlots as E, withCtx as C, normalizeProps as K, guardReactiveProps as W, createTextVNode as ne, mergeDefaults as se } from "vue";
2
- import { useI18n as Y } from "vue-i18n";
3
- import { _ as re } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
4
- import { _ as O } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
5
- import { u as ie } from "./mediaQuery-CygcXmFW.js";
6
- import { _ as H } from "./ToneDot.vue_vue_type_script_setup_true_lang-99rNn-L5.js";
7
- import { _ as ue } from "./Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
8
- import { _ as de } from "./Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
9
- import { a as ce, c as pe, _ as me, f as fe, b as ve } from "./control-B4SdblL6.js";
10
- import { g as be, m as ge } from "./options-Ba_0uLWN.js";
11
- import { a as ye } from "./suggestions-DHJFKB26.js";
12
- const he = { class: "flex min-h-9 items-center gap-1.5 rounded-control bg-fill px-2.5 text-content-muted focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus" }, ke = ["aria-label", "placeholder"], xe = ["aria-multiselectable", "aria-busy"], we = {
13
- key: 0,
14
- role: "presentation"
15
- }, _e = ["aria-selected"], $e = { class: "flex-1 py-2" }, Ce = {
16
- key: 1,
17
- role: "presentation",
18
- class: "flex items-center gap-2.5 px-row-inset py-4 text-subheadline text-content-muted",
19
- "data-test": "options-loading"
20
- }, Le = { role: "status" }, Se = {
21
- key: 2,
22
- role: "presentation",
23
- class: "flex flex-col items-start gap-1 px-row-inset py-3",
24
- "data-test": "options-failed"
25
- }, Ve = {
26
- role: "alert",
27
- class: "text-subheadline text-content-destructive"
28
- }, ze = ["id"], De = ["aria-labelledby"], Fe = ["aria-selected"], qe = ["disabled", "onFocus", "onClick"], Ae = {
29
- key: 0,
30
- "aria-hidden": "true",
31
- class: "flex shrink-0 items-center"
32
- }, Oe = { class: "min-w-0 flex-1 text-content-strong" }, Te = {
33
- key: 1,
34
- class: "shrink-0 text-footnote text-content-muted"
35
- }, Be = {
36
- key: 3,
37
- class: "px-4 py-6 text-center text-subheadline text-content-muted"
38
- }, J = /* @__PURE__ */ Q({
39
- __name: "OptionList",
40
- props: {
41
- options: {},
42
- modelValue: { default: null },
43
- multiple: { type: Boolean, default: !1 },
44
- searchFrom: { default: 9 },
45
- noneLabel: { default: void 0 },
46
- presentation: { default: "grouped" },
47
- status: { default: "loaded" }
48
- },
49
- emits: ["select", "retry"],
50
- setup(p, { emit: k }) {
51
- const e = p, x = k, _ = Z(null), c = (n) => n, f = (n) => void (_.value = n), z = (n) => _.value === n.value, { t: o } = Y(), w = N(""), T = ee(), i = X("root"), $ = v(() => e.options.length >= e.searchFrom), D = v(() => be(ge(e.options, w.value))), F = (n) => e.multiple ? Array.isArray(e.modelValue) && e.modelValue.includes(n.value) : e.modelValue === n.value, B = v(() => e.multiple ? !1 : e.modelValue === null);
52
- function q(n) {
53
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(n.key)) return;
54
- const s = [...i.value?.querySelectorAll("[data-option]:not([disabled])") ?? []];
55
- if (s.length === 0) return;
56
- const u = s.indexOf(document.activeElement), a = n.key === "Home" ? 0 : n.key === "End" ? s.length - 1 : n.key === "ArrowDown" ? Math.min(u + 1, s.length - 1) : Math.max(u - 1, 0);
57
- n.key === "ArrowUp" && u <= 0 ? i.value?.querySelector("[data-option-search]")?.focus() : s[u === -1 && n.key === "ArrowDown" ? 0 : a]?.focus(), n.preventDefault();
58
- }
59
- const S = v(() => e.presentation === "grouped"), l = v(() => e.status === "loading"), m = v(() => e.status === "failed");
60
- return U(() => e.status, (n, b) => {
61
- b !== "loading" || n === "loading" || te(() => {
62
- const s = document.activeElement;
63
- (!s || s === document.body || s.getAttribute("role") === "dialog" && !!i.value && s.contains(i.value)) && i.value?.querySelector("[data-option-search], [data-option]:not([disabled])")?.focus({ preventScroll: !0 });
64
- });
65
- }), (n, b) => (r(), g("div", {
66
- ref_key: "root",
67
- ref: i,
68
- "data-test": "option-list",
69
- onKeydown: q
70
- }, [
71
- $.value ? (r(), g("div", {
72
- key: 0,
73
- class: h(["sticky top-0 z-10 pb-2", S.value ? "bg-surface-page pt-1" : "bg-surface-cell"])
74
- }, [
75
- d("label", he, [
76
- A(t(O), {
77
- name: "search",
78
- size: 16,
79
- class: "shrink-0"
80
- }),
81
- oe(d("input", {
82
- "onUpdate:modelValue": b[0] || (b[0] = (s) => w.value = s),
83
- "data-option-search": "",
84
- type: "search",
85
- enterkeyhint: "search",
86
- autocomplete: "off",
87
- autocapitalize: "off",
88
- spellcheck: "false",
89
- "aria-label": t(o)("core.form.select.search"),
90
- placeholder: t(o)("core.form.select.search"),
91
- class: "min-w-0 flex-1 border-0 bg-transparent p-0 text-body text-content-strong outline-none placeholder:text-content-disabled focus:ring-0"
92
- }, null, 8, ke), [
93
- [le, w.value]
94
- ])
95
- ])
96
- ], 2)) : y("", !0),
97
- d("ul", {
98
- class: h(["flex flex-col", S.value ? "gap-group-gap" : "gap-2"]),
99
- role: "listbox",
100
- "aria-multiselectable": e.multiple || void 0,
101
- "aria-busy": l.value || void 0
102
- }, [
103
- e.noneLabel && w.value === "" ? (r(), g("li", we, [
104
- d("ul", {
105
- role: "group",
106
- class: h(S.value ? "rounded-group bg-surface-cell shadow-group" : "")
107
- }, [
108
- d("li", {
109
- role: "option",
110
- "aria-selected": B.value
111
- }, [
112
- d("button", {
113
- type: "button",
114
- "data-option": "",
115
- class: h(["flex min-h-row w-full cursor-pointer items-center gap-3 px-row-inset text-left text-body hover:bg-fill focus-visible:bg-fill focus-visible:outline-none active:bg-fill", [B.value ? "text-content-strong" : "text-content-muted", S.value ? "rounded-group" : "rounded-control"]]),
116
- onClick: b[1] || (b[1] = (s) => x("select", null))
117
- }, [
118
- d("span", $e, L(e.noneLabel), 1),
119
- B.value ? (r(), V(t(O), {
120
- key: 0,
121
- name: "checkCustom",
122
- size: 18,
123
- class: "shrink-0 text-content-link"
124
- })) : y("", !0)
125
- ], 2)
126
- ], 8, _e)
127
- ], 2)
128
- ])) : y("", !0),
129
- l.value ? (r(), g("li", Ce, [
130
- A(t(O), {
131
- name: "loader4Line",
132
- size: 16,
133
- class: "shrink-0 animate-spin text-content-link"
134
- }),
135
- d("span", Le, L(t(o)("core.form.select.loading")), 1)
136
- ])) : m.value ? (r(), g("li", Se, [
137
- d("span", Ve, L(t(o)("core.form.select.load_failed")), 1),
138
- d("button", {
139
- type: "button",
140
- "data-option": "",
141
- "data-test": "options-retry",
142
- class: "-ml-2 cursor-pointer rounded-control px-2 py-1 text-subheadline font-medium text-content-link hover:bg-fill focus-visible:bg-fill focus-visible:outline-none",
143
- onClick: b[2] || (b[2] = (s) => x("retry"))
144
- }, L(t(o)("core.actions.retry")), 1)
145
- ])) : y("", !0),
146
- (r(!0), g(I, null, j(D.value, (s, u) => (r(), g("li", {
147
- key: s.title ?? u,
148
- role: "presentation"
149
- }, [
150
- s.title ? (r(), g("p", {
151
- key: 0,
152
- id: `${t(T)}-${u}`,
153
- class: "px-row-inset pb-1.5 text-footnote uppercase tracking-wide text-content-muted"
154
- }, L(s.title), 9, ze)) : y("", !0),
155
- d("ul", {
156
- role: "group",
157
- "aria-labelledby": s.title ? `${t(T)}-${u}` : void 0,
158
- class: h(S.value ? "rounded-group bg-surface-cell shadow-group" : "")
159
- }, [
160
- (r(!0), g(I, null, j(s.options, (a) => (r(), g("li", {
161
- key: String(a.value),
162
- role: "option",
163
- "aria-selected": F(a),
164
- class: "group/option"
165
- }, [
166
- d("button", {
167
- type: "button",
168
- "data-option": "",
169
- "data-test": "option",
170
- disabled: a.disabled,
171
- class: h(["flex w-full cursor-pointer items-stretch gap-3 pl-row-inset text-left text-body hover:bg-fill focus-visible:bg-fill focus-visible:outline-none active:bg-fill disabled:cursor-not-allowed disabled:opacity-45", S.value ? "group-first/option:rounded-t-group group-last/option:rounded-b-group" : "rounded-control"]),
172
- onFocus: (M) => f(a.value),
173
- onBlur: b[3] || (b[3] = (M) => f(null)),
174
- onClick: (M) => x("select", a.value)
175
- }, [
176
- e.multiple ? (r(), g("span", Ae, [
177
- d("span", {
178
- class: h(["flex size-5.5 items-center justify-center rounded-full border", F(a) ? "border-control-on bg-control-on text-white" : "border-border-control"])
179
- }, [
180
- F(a) ? (r(), V(t(O), {
181
- key: 0,
182
- name: "checkCustom",
183
- size: 12
184
- })) : y("", !0)
185
- ], 2)
186
- ])) : y("", !0),
187
- d("span", {
188
- class: h(["flex min-h-row min-w-0 flex-1 items-center gap-3 py-2 pr-row-inset", S.value ? "border-t border-border-separator group-first/option:border-t-0" : ""])
189
- }, [
190
- R(n.$slots, "option", {
191
- option: c(a),
192
- active: z(a),
193
- selected: F(a)
194
- }, () => [
195
- a.dot ? (r(), V(H, {
196
- key: 0,
197
- tone: a.dot,
198
- class: "-mr-1.5"
199
- }, null, 8, ["tone"])) : y("", !0),
200
- d("span", Oe, L(a.label), 1),
201
- a.description ? (r(), g("span", Te, L(a.description), 1)) : y("", !0)
202
- ]),
203
- !e.multiple && F(a) ? (r(), V(t(O), {
204
- key: 0,
205
- name: "checkCustom",
206
- size: 18,
207
- class: "shrink-0 text-content-link"
208
- })) : y("", !0)
209
- ], 2)
210
- ], 42, qe)
211
- ], 8, Fe))), 128))
212
- ], 10, De)
213
- ]))), 128)),
214
- D.value.length === 0 && !l.value && !m.value ? (r(), g("li", Be, L(t(o)("core.form.select.no_matches")), 1)) : y("", !0)
215
- ], 10, xe)
216
- ], 544));
217
- }
218
- });
219
- function Ze(p) {
220
- const k = ye(), e = p.for !== void 0;
221
- let x = 0;
222
- function _() {
223
- const c = p.for?.();
224
- if (e && c == null) {
225
- k.cancel(), k.items.value = [], k.status.value = "idle";
226
- return;
227
- }
228
- k.run(
229
- (f) => e ? p.load(c, { signal: f }) : p.load({ signal: f })
230
- );
231
- }
232
- return U(
233
- () => p.for?.(),
234
- (c, f) => {
235
- f != null && x++, _();
236
- },
237
- { immediate: !0 }
238
- ), ae(k.cancel), {
239
- get status() {
240
- return k.status.value;
241
- },
242
- get options() {
243
- return k.items.value;
244
- },
245
- get generation() {
246
- return x;
247
- },
248
- reload: _
249
- };
250
- }
251
- const P = (p) => Array.isArray(p), Pe = [];
252
- function Re(p, k) {
253
- const e = v(() => {
254
- const o = p();
255
- return P(o) ? o : o.options;
256
- }), x = v(() => {
257
- const o = p();
258
- return P(o) ? "loaded" : o.status;
259
- }), _ = v(() => x.value === "loading" || x.value === "failed" ? Pe : e.value), c = v(() => x.value === "loading"), f = p();
260
- let z = P(f) ? 0 : f.generation;
261
- return U(
262
- () => {
263
- const o = p();
264
- return P(o) ? null : o.status === "loaded" || o.status === "idle" ? o.options : null;
265
- },
266
- (o) => {
267
- const w = p();
268
- o === null || P(w) || w.generation === z || (z = w.generation, k(o));
269
- }
270
- ), { known: e, rows: _, status: x, loading: c, reload: () => {
271
- const o = p();
272
- P(o) || o.reload();
273
- } };
274
- }
275
- const Ee = ["id", "disabled", "aria-expanded", "aria-required", "aria-invalid", "aria-describedby", "aria-busy"], Ue = ["id", "disabled", "aria-required", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], Ne = { class: "max-h-72 overflow-y-auto" }, et = /* @__PURE__ */ Q({
276
- __name: "SelectField",
277
- props: /* @__PURE__ */ se({
278
- label: {},
279
- labelHidden: { type: Boolean },
280
- hint: {},
281
- error: {},
282
- required: { type: Boolean },
283
- editable: { type: Boolean },
284
- disabled: { type: Boolean },
285
- lockedReason: {},
286
- presentation: {},
287
- name: {},
288
- options: {},
289
- selected: {},
290
- placeholder: {},
291
- clearable: {},
292
- modelValue: {},
293
- searchFrom: {},
294
- rowLayout: {}
295
- }, { ...ve, selected: null, placeholder: void 0, clearable: void 0, modelValue: void 0, searchFrom: 9, rowLayout: void 0 }),
296
- emits: ["update:modelValue"],
297
- setup(p, { emit: k }) {
298
- const e = p, x = k, _ = N(e.modelValue ?? null);
299
- U(() => e.modelValue, (l) => _.value = l ?? null);
300
- const c = v({
301
- get: () => _.value,
302
- set: (l) => {
303
- _.value = l, x("update:modelValue", l);
304
- }
305
- }), { t: f } = Y(), z = ie(), o = !!ce(), w = X("sheet"), T = N(!1), i = Re(() => e.options, (l) => {
306
- c.value !== null && !l.some((m) => m.value === c.value) && (c.value = null);
307
- }), $ = v(() => i.known.value.find((l) => l.value === c.value) ?? (e.selected?.value === c.value ? e.selected : null)), D = v(() => e.placeholder ?? f("core.form.select.choose")), F = pe("popup", () => e.error ? "error" : e.disabled ? "locked" : "rest");
308
- function B(l) {
309
- c.value = l, w.value?.dismiss();
310
- }
311
- const q = v(() => e.rowLayout === "stacked"), S = v(() => [
312
- "flex max-w-full min-w-0 items-center gap-1.5 py-1 pl-2.5 pr-2 text-body focus-visible:outline-none",
313
- q.value ? "w-full" : "",
314
- o ? "compact:pl-0 compact:pr-0" : "",
315
- e.disabled ? "cursor-not-allowed" : "cursor-pointer"
316
- ]);
317
- return (l, m) => (r(), V(me, G(t(fe)(e), {
318
- value: $.value?.label ?? null,
319
- "row-layout": e.rowLayout
320
- }), E({
321
- default: C(({ id: n, describedby: b, invalid: s }) => [
322
- d("div", {
323
- class: h(["max-w-full min-w-0", [q.value ? "flex w-full" : "inline-flex", t(F)]])
324
- }, [
325
- t(z) ? (r(), g("button", {
326
- key: 0,
327
- id: n,
328
- type: "button",
329
- disabled: e.disabled,
330
- "aria-haspopup": "dialog",
331
- "aria-expanded": T.value,
332
- "aria-required": e.required || void 0,
333
- "aria-invalid": s || void 0,
334
- "aria-describedby": b,
335
- "aria-busy": t(i).loading.value || void 0,
336
- class: h(S.value),
337
- onClick: m[0] || (m[0] = (u) => w.value?.present())
338
- }, [
339
- $.value?.dot ? (r(), V(H, {
340
- key: 0,
341
- tone: $.value.dot
342
- }, null, 8, ["tone"])) : y("", !0),
343
- d("span", {
344
- class: h(["min-w-0 truncate", [q.value ? "flex-1 text-left" : "", $.value ? o ? "text-content-strong compact:text-content-muted" : "text-content-strong" : "text-content-disabled"]])
345
- }, L($.value?.label ?? D.value), 3),
346
- A(t(O), {
347
- name: t(i).loading.value ? "loader4Line" : "expandUpDownLine",
348
- size: 14,
349
- class: h(["shrink-0 text-content-muted", t(i).loading.value ? "animate-spin" : ""])
350
- }, null, 8, ["name", "class"])
351
- ], 10, Ee)) : (r(), V(de, {
352
- key: 1,
353
- label: e.label ?? D.value,
354
- width: "lg",
355
- "match-trigger-width": "",
356
- placement: "bottom-start",
357
- arrow: !1,
358
- block: q.value
359
- }, {
360
- trigger: C(({ toggle: u, attrs: a }) => [
361
- d("button", G({
362
- id: n,
363
- type: "button"
364
- }, a, {
365
- "aria-haspopup": "listbox",
366
- disabled: e.disabled,
367
- "aria-required": e.required || void 0,
368
- "aria-invalid": s || void 0,
369
- "aria-describedby": b,
370
- "aria-busy": t(i).loading.value || void 0,
371
- class: S.value,
372
- onClick: u
373
- }), [
374
- $.value?.dot ? (r(), V(H, {
375
- key: 0,
376
- tone: $.value.dot
377
- }, null, 8, ["tone"])) : y("", !0),
378
- d("span", {
379
- class: h(["min-w-0 truncate", [q.value ? "flex-1 text-left" : "", $.value ? "text-content-strong" : "text-content-disabled"]])
380
- }, L($.value?.label ?? D.value), 3),
381
- A(t(O), {
382
- name: t(i).loading.value ? "loader4Line" : "expandUpDownLine",
383
- size: 14,
384
- class: h(["shrink-0 text-content-muted", t(i).loading.value ? "animate-spin" : ""])
385
- }, null, 8, ["name", "class"])
386
- ], 16, Ue)
387
- ]),
388
- default: C(({ dismiss: u }) => [
389
- d("div", Ne, [
390
- A(J, {
391
- options: t(i).rows.value,
392
- status: t(i).status.value,
393
- "model-value": c.value,
394
- "search-from": e.searchFrom,
395
- "none-label": e.clearable ? t(f)("core.form.select.clear") : void 0,
396
- presentation: "plain",
397
- onSelect: (a) => {
398
- c.value = a, u();
399
- },
400
- onRetry: m[1] || (m[1] = (a) => t(i).reload())
401
- }, E({ _: 2 }, [
402
- l.$slots.option ? {
403
- name: "option",
404
- fn: C((a) => [
405
- R(l.$slots, "option", K(W(a)))
406
- ]),
407
- key: "0"
408
- } : void 0
409
- ]), 1032, ["options", "status", "model-value", "search-from", "none-label", "onSelect"])
410
- ])
411
- ]),
412
- _: 2
413
- }, 1032, ["label", "block"]))
414
- ], 2),
415
- t(z) ? (r(), V(ue, {
416
- key: 0,
417
- ref_key: "sheet",
418
- ref: w,
419
- title: e.label ?? D.value,
420
- grouped: "",
421
- onPresented: m[4] || (m[4] = (u) => T.value = !0),
422
- onDismissed: m[5] || (m[5] = (u) => T.value = !1)
423
- }, E({
424
- default: C(() => [
425
- A(J, {
426
- options: t(i).rows.value,
427
- status: t(i).status.value,
428
- "model-value": c.value,
429
- "search-from": e.searchFrom,
430
- "none-label": e.clearable ? t(f)("core.form.select.clear") : void 0,
431
- onSelect: B,
432
- onRetry: m[2] || (m[2] = (u) => t(i).reload())
433
- }, E({ _: 2 }, [
434
- l.$slots.option ? {
435
- name: "option",
436
- fn: C((u) => [
437
- R(l.$slots, "option", K(W(u)))
438
- ]),
439
- key: "0"
440
- } : void 0
441
- ]), 1032, ["options", "status", "model-value", "search-from", "none-label"])
442
- ]),
443
- _: 2
444
- }, [
445
- e.clearable && c.value !== null ? {
446
- name: "footer",
447
- fn: C(() => [
448
- A(re, {
449
- prominence: "plain",
450
- onClick: m[3] || (m[3] = (u) => B(null))
451
- }, {
452
- default: C(() => [
453
- ne(L(t(f)("core.form.select.clear")), 1)
454
- ]),
455
- _: 1
456
- })
457
- ]),
458
- key: "0"
459
- } : void 0
460
- ]), 1032, ["title"])) : y("", !0)
461
- ]),
462
- _: 2
463
- }, [
464
- l.$slots.trailing ? {
465
- name: "trailing",
466
- fn: C(() => [
467
- R(l.$slots, "trailing")
468
- ]),
469
- key: "0"
470
- } : void 0,
471
- l.$slots.labelTrailing ? {
472
- name: "labelTrailing",
473
- fn: C(() => [
474
- R(l.$slots, "labelTrailing")
475
- ]),
476
- key: "1"
477
- } : void 0,
478
- l.$slots.readonly ? {
479
- name: "readonly",
480
- fn: C(() => [
481
- R(l.$slots, "readonly")
482
- ]),
483
- key: "2"
484
- } : void 0
485
- ]), 1040, ["value", "row-layout"]));
486
- }
487
- });
488
- export {
489
- et as _,
490
- J as a,
491
- Ze as b,
492
- Re as u
493
- };
@@ -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-B4SdblL6.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
- };