@wssto2/vue-core 0.4.18 → 0.4.19

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 (70) 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-CLyG5Y9o.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-xF1VMbqD.js} +3 -3
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CUoyYpaW.js → CollectionPage.vue_vue_type_script_setup_true_lang-nojILoAf.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-8mvjzRA-.js → DateField.vue_vue_type_script_setup_true_lang-CfPwcEM2.js} +3 -3
  9. package/dist/{DeadLetters-Bq5YpnvT.js → DeadLetters-AbbNs69D.js} +2 -2
  10. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js → FormGroup.vue_vue_type_script_setup_true_lang-C7nq7MJB.js} +1 -1
  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-De4Q6Wfn.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-QAv_XsT0.js} +3 -3
  15. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js → NumberField.vue_vue_type_script_setup_true_lang-djJvP6Og.js} +1 -1
  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-CjjKhkHX.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-FLJk6Kb2.js} +7 -7
  21. package/dist/{RolePage-IES_ADt5.js → RolePage-De7s2sYr.js} +7 -7
  22. package/dist/{RolesPage-D0K7tEL-.js → RolesPage-TXQKtK_J.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-ByDo_32P.js +493 -0
  27. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js → SessionList.vue_vue_type_script_setup_true_lang-CuxVe7rm.js} +2 -2
  28. package/dist/{Sessions-BfpiOhGs.js → Sessions-BDLI0o-z.js} +2 -2
  29. package/dist/{SettingsPage-BnEpURcU.js → SettingsPage-Kzcqv91E.js} +7 -7
  30. package/dist/{SignIn-DrLE0gNr.js → SignIn-DKo46hNK.js} +4 -4
  31. package/dist/{SignInPage-CRynZCU2.js → SignInPage-B2v3is80.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-D-_a_S6O.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-BslHroDP.js +314 -0
  36. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js → TextareaField.vue_vue_type_script_setup_true_lang-XZRHwx-n.js} +1 -1
  37. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-BebAIPeL.js → TimeField.vue_vue_type_script_setup_true_lang-BB7ZGpvP.js} +3 -3
  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-BR70ai9q.js} +7 -7
  40. package/dist/{UsersList-CHAray61.js → UsersList-BC9S6omH.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 +2 -0
  47. package/dist/form/Field.vue.d.ts +2 -0
  48. package/dist/form/SelectField.vue.d.ts +2 -0
  49. package/dist/form/TextField.vue.d.ts +6 -2
  50. package/dist/form/index.d.ts +1 -1
  51. package/dist/form/index.js +964 -957
  52. package/dist/identity/index.js +1 -1
  53. package/dist/{index-91Lo0hJy.js → index-B9KqrN-F.js} +3 -3
  54. package/dist/{index-wlRejl73.js → index-BrqxylSS.js} +7 -7
  55. package/dist/{index-sYamgVg7.js → index-D8akxuKo.js} +12 -12
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/notifications/index.js +1 -1
  59. package/dist/overlay/anchored.d.ts +2 -0
  60. package/dist/overlay/index.js +3 -3
  61. package/dist/page/index.js +5 -5
  62. package/dist/phone/index.js +2 -2
  63. package/dist/resource/index.js +1 -1
  64. package/dist/{rowLayout-BFz4Kdoy.js → rowLayout-D1vrdy0s.js} +2 -2
  65. package/dist/shell/index.js +2 -2
  66. package/dist/{status-B_IMA25a.js → status-vMwum3Y9.js} +1 -1
  67. package/dist/styles.css +1 -1
  68. package/package.json +1 -1
  69. package/dist/SelectField.vue_vue_type_script_setup_true_lang-DkbBJpYX.js +0 -489
  70. package/dist/TextField.vue_vue_type_script_setup_true_lang-CWgn-vGl.js +0 -299
@@ -1,489 +0,0 @@
1
- import { defineComponent as Q, shallowRef as Z, ref as N, useId as ee, useTemplateRef as X, computed as h, watch as U, nextTick as te, openBlock as s, createElementBlock as b, normalizeClass as y, createElementVNode as i, createVNode as F, unref as t, withDirectives as oe, vModelText as le, createCommentVNode as g, toDisplayString as S, createBlock as V, Fragment as I, renderList as j, renderSlot as B, 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 q } 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-BTOzgIQF.js";
9
- import { a as ce, c as pe, _ as me, f as fe, b as ve } from "./control-B_Nwtmag.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
- }, Se = { role: "status" }, Ve = {
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
- }, Le = {
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(d, { emit: k }) {
51
- const e = d, x = k, _ = Z(null), u = (n) => n, m = (n) => void (_.value = n), L = (n) => _.value === n.value, { t: a } = Y(), w = N(""), A = ee(), r = X("root"), $ = h(() => e.options.length >= e.searchFrom), z = h(() => be(ge(e.options, w.value))), D = (n) => e.multiple ? Array.isArray(e.modelValue) && e.modelValue.includes(n.value) : e.modelValue === n.value, O = h(() => e.multiple ? !1 : e.modelValue === null);
52
- function R(n) {
53
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(n.key)) return;
54
- const o = [...r.value?.querySelectorAll("[data-option]:not([disabled])") ?? []];
55
- if (o.length === 0) return;
56
- const f = o.indexOf(document.activeElement), p = n.key === "Home" ? 0 : n.key === "End" ? o.length - 1 : n.key === "ArrowDown" ? Math.min(f + 1, o.length - 1) : Math.max(f - 1, 0);
57
- n.key === "ArrowUp" && f <= 0 ? r.value?.querySelector("[data-option-search]")?.focus() : o[f === -1 && n.key === "ArrowDown" ? 0 : p]?.focus(), n.preventDefault();
58
- }
59
- const l = h(() => e.presentation === "grouped"), c = h(() => e.status === "loading"), P = h(() => e.status === "failed");
60
- return U(() => e.status, (n, v) => {
61
- v !== "loading" || n === "loading" || te(() => {
62
- const o = document.activeElement;
63
- (!o || o === document.body || o.getAttribute("role") === "dialog" && !!r.value && o.contains(r.value)) && r.value?.querySelector("[data-option-search], [data-option]:not([disabled])")?.focus({ preventScroll: !0 });
64
- });
65
- }), (n, v) => (s(), b("div", {
66
- ref_key: "root",
67
- ref: r,
68
- "data-test": "option-list",
69
- onKeydown: R
70
- }, [
71
- $.value ? (s(), b("div", {
72
- key: 0,
73
- class: y(["sticky top-0 z-10 pb-2", l.value ? "bg-surface-page pt-1" : "bg-surface-cell"])
74
- }, [
75
- i("label", he, [
76
- F(t(q), {
77
- name: "search",
78
- size: 16,
79
- class: "shrink-0"
80
- }),
81
- oe(i("input", {
82
- "onUpdate:modelValue": v[0] || (v[0] = (o) => w.value = o),
83
- "data-option-search": "",
84
- type: "search",
85
- enterkeyhint: "search",
86
- autocomplete: "off",
87
- autocapitalize: "off",
88
- spellcheck: "false",
89
- "aria-label": t(a)("core.form.select.search"),
90
- placeholder: t(a)("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)) : g("", !0),
97
- i("ul", {
98
- class: y(["flex flex-col", l.value ? "gap-group-gap" : "gap-2"]),
99
- role: "listbox",
100
- "aria-multiselectable": e.multiple || void 0,
101
- "aria-busy": c.value || void 0
102
- }, [
103
- e.noneLabel && w.value === "" ? (s(), b("li", we, [
104
- i("ul", {
105
- role: "group",
106
- class: y(l.value ? "rounded-group bg-surface-cell shadow-group" : "")
107
- }, [
108
- i("li", {
109
- role: "option",
110
- "aria-selected": O.value
111
- }, [
112
- i("button", {
113
- type: "button",
114
- "data-option": "",
115
- class: y(["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", [O.value ? "text-content-strong" : "text-content-muted", l.value ? "rounded-group" : "rounded-control"]]),
116
- onClick: v[1] || (v[1] = (o) => x("select", null))
117
- }, [
118
- i("span", $e, S(e.noneLabel), 1),
119
- O.value ? (s(), V(t(q), {
120
- key: 0,
121
- name: "checkCustom",
122
- size: 18,
123
- class: "shrink-0 text-content-link"
124
- })) : g("", !0)
125
- ], 2)
126
- ], 8, _e)
127
- ], 2)
128
- ])) : g("", !0),
129
- c.value ? (s(), b("li", Ce, [
130
- F(t(q), {
131
- name: "loader4Line",
132
- size: 16,
133
- class: "shrink-0 animate-spin text-content-link"
134
- }),
135
- i("span", Se, S(t(a)("core.form.select.loading")), 1)
136
- ])) : P.value ? (s(), b("li", Ve, [
137
- i("span", Le, S(t(a)("core.form.select.load_failed")), 1),
138
- i("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: v[2] || (v[2] = (o) => x("retry"))
144
- }, S(t(a)("core.actions.retry")), 1)
145
- ])) : g("", !0),
146
- (s(!0), b(I, null, j(z.value, (o, f) => (s(), b("li", {
147
- key: o.title ?? f,
148
- role: "presentation"
149
- }, [
150
- o.title ? (s(), b("p", {
151
- key: 0,
152
- id: `${t(A)}-${f}`,
153
- class: "px-row-inset pb-1.5 text-footnote uppercase tracking-wide text-content-muted"
154
- }, S(o.title), 9, ze)) : g("", !0),
155
- i("ul", {
156
- role: "group",
157
- "aria-labelledby": o.title ? `${t(A)}-${f}` : void 0,
158
- class: y(l.value ? "rounded-group bg-surface-cell shadow-group" : "")
159
- }, [
160
- (s(!0), b(I, null, j(o.options, (p) => (s(), b("li", {
161
- key: String(p.value),
162
- role: "option",
163
- "aria-selected": D(p),
164
- class: "group/option"
165
- }, [
166
- i("button", {
167
- type: "button",
168
- "data-option": "",
169
- "data-test": "option",
170
- disabled: p.disabled,
171
- class: y(["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", l.value ? "group-first/option:rounded-t-group group-last/option:rounded-b-group" : "rounded-control"]),
172
- onFocus: (M) => m(p.value),
173
- onBlur: v[3] || (v[3] = (M) => m(null)),
174
- onClick: (M) => x("select", p.value)
175
- }, [
176
- e.multiple ? (s(), b("span", Ae, [
177
- i("span", {
178
- class: y(["flex size-5.5 items-center justify-center rounded-full border", D(p) ? "border-control-on bg-control-on text-white" : "border-border-control"])
179
- }, [
180
- D(p) ? (s(), V(t(q), {
181
- key: 0,
182
- name: "checkCustom",
183
- size: 12
184
- })) : g("", !0)
185
- ], 2)
186
- ])) : g("", !0),
187
- i("span", {
188
- class: y(["flex min-h-row min-w-0 flex-1 items-center gap-3 py-2 pr-row-inset", l.value ? "border-t border-border-separator group-first/option:border-t-0" : ""])
189
- }, [
190
- B(n.$slots, "option", {
191
- option: u(p),
192
- active: L(p),
193
- selected: D(p)
194
- }, () => [
195
- p.dot ? (s(), V(H, {
196
- key: 0,
197
- tone: p.dot,
198
- class: "-mr-1.5"
199
- }, null, 8, ["tone"])) : g("", !0),
200
- i("span", Oe, S(p.label), 1),
201
- p.description ? (s(), b("span", Te, S(p.description), 1)) : g("", !0)
202
- ]),
203
- !e.multiple && D(p) ? (s(), V(t(q), {
204
- key: 0,
205
- name: "checkCustom",
206
- size: 18,
207
- class: "shrink-0 text-content-link"
208
- })) : g("", !0)
209
- ], 2)
210
- ], 42, qe)
211
- ], 8, Fe))), 128))
212
- ], 10, De)
213
- ]))), 128)),
214
- z.value.length === 0 && !c.value && !P.value ? (s(), b("li", Be, S(t(a)("core.form.select.no_matches")), 1)) : g("", !0)
215
- ], 10, xe)
216
- ], 544));
217
- }
218
- });
219
- function Ze(d) {
220
- const k = ye(), e = d.for !== void 0;
221
- let x = 0;
222
- function _() {
223
- const u = d.for?.();
224
- if (e && u == null) {
225
- k.cancel(), k.items.value = [], k.status.value = "idle";
226
- return;
227
- }
228
- k.run(
229
- (m) => e ? d.load(u, { signal: m }) : d.load({ signal: m })
230
- );
231
- }
232
- return U(
233
- () => d.for?.(),
234
- (u, m) => {
235
- m != 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 T = (d) => Array.isArray(d), Pe = [];
252
- function Re(d, k) {
253
- const e = h(() => {
254
- const a = d();
255
- return T(a) ? a : a.options;
256
- }), x = h(() => {
257
- const a = d();
258
- return T(a) ? "loaded" : a.status;
259
- }), _ = h(() => x.value === "loading" || x.value === "failed" ? Pe : e.value), u = h(() => x.value === "loading"), m = d();
260
- let L = T(m) ? 0 : m.generation;
261
- return U(
262
- () => {
263
- const a = d();
264
- return T(a) ? null : a.status === "loaded" || a.status === "idle" ? a.options : null;
265
- },
266
- (a) => {
267
- const w = d();
268
- a === null || T(w) || w.generation === L || (L = w.generation, k(a));
269
- }
270
- ), { known: e, rows: _, status: x, loading: u, reload: () => {
271
- const a = d();
272
- T(a) || a.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
- }, { ...ve, selected: null, placeholder: void 0, clearable: void 0, modelValue: void 0, searchFrom: 9 }),
295
- emits: ["update:modelValue"],
296
- setup(d, { emit: k }) {
297
- const e = d, x = k, _ = N(e.modelValue ?? null);
298
- U(() => e.modelValue, (l) => _.value = l ?? null);
299
- const u = h({
300
- get: () => _.value,
301
- set: (l) => {
302
- _.value = l, x("update:modelValue", l);
303
- }
304
- }), { t: m } = Y(), L = ie(), a = !!ce(), w = X("sheet"), A = N(!1), r = Re(() => e.options, (l) => {
305
- u.value !== null && !l.some((c) => c.value === u.value) && (u.value = null);
306
- }), $ = h(() => r.known.value.find((l) => l.value === u.value) ?? (e.selected?.value === u.value ? e.selected : null)), z = h(() => e.placeholder ?? m("core.form.select.choose")), D = pe("popup", () => e.error ? "error" : e.disabled ? "locked" : "rest");
307
- function O(l) {
308
- u.value = l, w.value?.dismiss();
309
- }
310
- const R = h(() => [
311
- "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",
312
- a ? "compact:pl-0 compact:pr-0" : "",
313
- e.disabled ? "cursor-not-allowed" : "cursor-pointer"
314
- ]);
315
- return (l, c) => (s(), V(me, G(t(fe)(e), {
316
- value: $.value?.label ?? null
317
- }), E({
318
- default: C(({ id: P, describedby: n, invalid: v }) => [
319
- i("div", {
320
- class: y(["inline-flex max-w-full min-w-0", t(D)])
321
- }, [
322
- t(L) ? (s(), b("button", {
323
- key: 0,
324
- id: P,
325
- type: "button",
326
- disabled: e.disabled,
327
- "aria-haspopup": "dialog",
328
- "aria-expanded": A.value,
329
- "aria-required": e.required || void 0,
330
- "aria-invalid": v || void 0,
331
- "aria-describedby": n,
332
- "aria-busy": t(r).loading.value || void 0,
333
- class: y(R.value),
334
- onClick: c[0] || (c[0] = (o) => w.value?.present())
335
- }, [
336
- $.value?.dot ? (s(), V(H, {
337
- key: 0,
338
- tone: $.value.dot
339
- }, null, 8, ["tone"])) : g("", !0),
340
- i("span", {
341
- class: y(["min-w-0 truncate", $.value ? a ? "text-content-strong compact:text-content-muted" : "text-content-strong" : "text-content-disabled"])
342
- }, S($.value?.label ?? z.value), 3),
343
- F(t(q), {
344
- name: t(r).loading.value ? "loader4Line" : "expandUpDownLine",
345
- size: 14,
346
- class: y(["shrink-0 text-content-muted", t(r).loading.value ? "animate-spin" : ""])
347
- }, null, 8, ["name", "class"])
348
- ], 10, Ee)) : (s(), V(de, {
349
- key: 1,
350
- label: e.label ?? z.value,
351
- width: "md",
352
- "match-trigger-width": "",
353
- placement: "bottom-start",
354
- arrow: !1
355
- }, {
356
- trigger: C(({ toggle: o, attrs: f }) => [
357
- i("button", G({
358
- id: P,
359
- type: "button"
360
- }, f, {
361
- "aria-haspopup": "listbox",
362
- disabled: e.disabled,
363
- "aria-required": e.required || void 0,
364
- "aria-invalid": v || void 0,
365
- "aria-describedby": n,
366
- "aria-busy": t(r).loading.value || void 0,
367
- class: R.value,
368
- onClick: o
369
- }), [
370
- $.value?.dot ? (s(), V(H, {
371
- key: 0,
372
- tone: $.value.dot
373
- }, null, 8, ["tone"])) : g("", !0),
374
- i("span", {
375
- class: y(["min-w-0 truncate", $.value ? "text-content-strong" : "text-content-disabled"])
376
- }, S($.value?.label ?? z.value), 3),
377
- F(t(q), {
378
- name: t(r).loading.value ? "loader4Line" : "expandUpDownLine",
379
- size: 14,
380
- class: y(["shrink-0 text-content-muted", t(r).loading.value ? "animate-spin" : ""])
381
- }, null, 8, ["name", "class"])
382
- ], 16, Ue)
383
- ]),
384
- default: C(({ dismiss: o }) => [
385
- i("div", Ne, [
386
- F(J, {
387
- options: t(r).rows.value,
388
- status: t(r).status.value,
389
- "model-value": u.value,
390
- "search-from": e.searchFrom,
391
- "none-label": e.clearable ? t(m)("core.form.select.clear") : void 0,
392
- presentation: "plain",
393
- onSelect: (f) => {
394
- u.value = f, o();
395
- },
396
- onRetry: c[1] || (c[1] = (f) => t(r).reload())
397
- }, E({ _: 2 }, [
398
- l.$slots.option ? {
399
- name: "option",
400
- fn: C((f) => [
401
- B(l.$slots, "option", K(W(f)))
402
- ]),
403
- key: "0"
404
- } : void 0
405
- ]), 1032, ["options", "status", "model-value", "search-from", "none-label", "onSelect"])
406
- ])
407
- ]),
408
- _: 2
409
- }, 1032, ["label"]))
410
- ], 2),
411
- t(L) ? (s(), V(ue, {
412
- key: 0,
413
- ref_key: "sheet",
414
- ref: w,
415
- title: e.label ?? z.value,
416
- grouped: "",
417
- onPresented: c[4] || (c[4] = (o) => A.value = !0),
418
- onDismissed: c[5] || (c[5] = (o) => A.value = !1)
419
- }, E({
420
- default: C(() => [
421
- F(J, {
422
- options: t(r).rows.value,
423
- status: t(r).status.value,
424
- "model-value": u.value,
425
- "search-from": e.searchFrom,
426
- "none-label": e.clearable ? t(m)("core.form.select.clear") : void 0,
427
- onSelect: O,
428
- onRetry: c[2] || (c[2] = (o) => t(r).reload())
429
- }, E({ _: 2 }, [
430
- l.$slots.option ? {
431
- name: "option",
432
- fn: C((o) => [
433
- B(l.$slots, "option", K(W(o)))
434
- ]),
435
- key: "0"
436
- } : void 0
437
- ]), 1032, ["options", "status", "model-value", "search-from", "none-label"])
438
- ]),
439
- _: 2
440
- }, [
441
- e.clearable && u.value !== null ? {
442
- name: "footer",
443
- fn: C(() => [
444
- F(re, {
445
- prominence: "plain",
446
- onClick: c[3] || (c[3] = (o) => O(null))
447
- }, {
448
- default: C(() => [
449
- ne(S(t(m)("core.form.select.clear")), 1)
450
- ]),
451
- _: 1
452
- })
453
- ]),
454
- key: "0"
455
- } : void 0
456
- ]), 1032, ["title"])) : g("", !0)
457
- ]),
458
- _: 2
459
- }, [
460
- l.$slots.trailing ? {
461
- name: "trailing",
462
- fn: C(() => [
463
- B(l.$slots, "trailing")
464
- ]),
465
- key: "0"
466
- } : void 0,
467
- l.$slots.labelTrailing ? {
468
- name: "labelTrailing",
469
- fn: C(() => [
470
- B(l.$slots, "labelTrailing")
471
- ]),
472
- key: "1"
473
- } : void 0,
474
- l.$slots.readonly ? {
475
- name: "readonly",
476
- fn: C(() => [
477
- B(l.$slots, "readonly")
478
- ]),
479
- key: "2"
480
- } : void 0
481
- ]), 1040, ["value"]));
482
- }
483
- });
484
- export {
485
- et as _,
486
- J as a,
487
- Ze as b,
488
- Re as u
489
- };