@wirecore/wirelayer-vue 0.7.0 → 0.9.0

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 (92) hide show
  1. package/dist/{Checkbox-D175nhKK.js → Checkbox-DS2qfQK1.js} +2 -8
  2. package/dist/ContextMenu-CBE9YnDW.js +2321 -0
  3. package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
  4. package/dist/Input-C5dyvZfJ.js +183 -0
  5. package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
  6. package/dist/{Select-Bd2Vpr7G.js → Select-q8FUIWLi.js} +141 -124
  7. package/dist/Tree-B-0NXpUq.js +839 -0
  8. package/dist/components/Alert/Alert.vue.d.ts +5 -3
  9. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  10. package/dist/components/Avatar/Avatar.vue.d.ts +2 -0
  11. package/dist/components/Avatar/Avatar.vue.d.ts.map +1 -1
  12. package/dist/components/Card/Card.vue.d.ts +2 -0
  13. package/dist/components/Card/Card.vue.d.ts.map +1 -1
  14. package/dist/components/Checkbox/Checkbox.vue.d.ts +26 -23
  15. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  16. package/dist/components/Code/Code.vue.d.ts +21 -0
  17. package/dist/components/Code/Code.vue.d.ts.map +1 -0
  18. package/dist/components/Combobox/Combobox.vue.d.ts +9 -1
  19. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
  21. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +18 -2
  22. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  23. package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
  24. package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
  25. package/dist/components/Dialog/DialogContent.vue.d.ts +12 -1
  26. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  27. package/dist/components/Dialog/context.d.ts +3 -1
  28. package/dist/components/Dialog/context.d.ts.map +1 -1
  29. package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
  30. package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
  31. package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
  32. package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
  33. package/dist/components/Input/Input.vue.d.ts +3 -1
  34. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  35. package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
  36. package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
  37. package/dist/components/Menu/Menu.vue.d.ts +9 -1
  38. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  39. package/dist/components/Menu/state.d.ts +22 -0
  40. package/dist/components/Menu/state.d.ts.map +1 -1
  41. package/dist/components/NativeSelect/NativeSelect.vue.d.ts +31 -19
  42. package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
  43. package/dist/components/NumberInput/NumberInput.vue.d.ts +27 -20
  44. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  45. package/dist/components/Panel/Panel.vue.d.ts +1 -1
  46. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +9 -3
  47. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  48. package/dist/components/Popover/Popover.vue.d.ts +1 -1
  49. package/dist/components/Progress/Progress.vue.d.ts +14 -0
  50. package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
  51. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +32 -26
  52. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  53. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
  54. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
  55. package/dist/components/RadioGroup/context.d.ts +4 -0
  56. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  57. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +31 -22
  58. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  59. package/dist/components/Select/Select.vue.d.ts +21 -7
  60. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  61. package/dist/components/Stepper/Stepper.vue.d.ts +2 -0
  62. package/dist/components/Stepper/Stepper.vue.d.ts.map +1 -1
  63. package/dist/components/Tabs/Tabs.vue.d.ts +6 -3
  64. package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
  65. package/dist/components/Tabs/TabsTrigger.vue.d.ts +6 -0
  66. package/dist/components/Tabs/TabsTrigger.vue.d.ts.map +1 -1
  67. package/dist/components/Tabs/context.d.ts +4 -0
  68. package/dist/components/Tabs/context.d.ts.map +1 -0
  69. package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
  70. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  71. package/dist/components/Wizard/Wizard.vue.d.ts +10 -2
  72. package/dist/components/Wizard/Wizard.vue.d.ts.map +1 -1
  73. package/dist/composables/index.d.ts +1 -1
  74. package/dist/composables/index.d.ts.map +1 -1
  75. package/dist/composables/media.d.ts +8 -1
  76. package/dist/composables/media.d.ts.map +1 -1
  77. package/dist/data-table.js +4 -4
  78. package/dist/editor.js +1 -1
  79. package/dist/form.js +2 -2
  80. package/dist/index.d.ts +6 -3
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +2751 -2649
  83. package/dist/pdf.js +3 -3
  84. package/dist/sources/Code.css +2 -0
  85. package/dist/utils/text-field.d.ts +16 -0
  86. package/dist/utils/text-field.d.ts.map +1 -0
  87. package/llms-full.txt +117 -27
  88. package/llms.txt +6 -4
  89. package/package.json +3 -3
  90. package/dist/ContextMenu-BEOEyUa6.js +0 -2235
  91. package/dist/Input-Cn5q0yVE.js +0 -181
  92. package/dist/Tree-fd9LXqgZ.js +0 -792
@@ -0,0 +1,839 @@
1
+ import { a as e, n as t } from "./recipes-BlM9aKyt.js";
2
+ import { t as n } from "./attrs-KNjeRUCf.js";
3
+ import { i as r, n as i, t as a } from "./InputStatus-Cgarj-yu.js";
4
+ import { a as o, i as s, n as c, r as l, t as u } from "./useTree-UhG1TMeM.js";
5
+ import { Fragment as d, Teleport as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, defineComponent as x, inject as S, mergeModels as C, mergeProps as w, normalizeClass as T, normalizeProps as E, onBeforeUnmount as D, onMounted as O, onUpdated as k, openBlock as A, provide as j, ref as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, shallowRef as I, toDisplayString as L, toHandlers as R, toRef as z, unref as B, useAttrs as V, useId as H, useModel as U, useSlots as W, useTemplateRef as G, watch as K, withCtx as q } from "vue";
6
+ import { Check as ee, ChevronLeft as te, ChevronRight as ne, Circle as re, Eye as ie, EyeOff as ae, Maximize2 as oe, Minimize2 as J, X as Y } from "@lucide/vue";
7
+ import { autoselectElement as se, checkPasswordRequirements as ce, clampDialogOffset as le, closeTab as ue, controlIds as de, dialog as fe, dialogMoveForKey as pe, dialogMoveKeys as me, focusFirst as he, passwordInput as ge, passwordStrength as _e, scrollEdges as ve, setTextControlValue as ye, tabs as X, tree as be } from "@wirecore/wirelayer-recipes";
8
+ import { useFieldContext as xe } from "@ark-ui/vue/field";
9
+ import { Tabs as Z } from "@ark-ui/vue/tabs";
10
+ import { Dialog as Q, useDialogContext as Se } from "@ark-ui/vue/dialog";
11
+ import { PasswordInput as $ } from "@ark-ui/vue/password-input";
12
+ import { TreeView as Ce } from "@ark-ui/vue/tree-view";
13
+ //#region src/components/Tabs/context.ts
14
+ var we = Symbol("wirecore-tabs-none-selected"), Te = /* @__PURE__ */ x({
15
+ inheritAttrs: !1,
16
+ __name: "Tabs",
17
+ props: {
18
+ modelValue: { default: void 0 },
19
+ defaultValue: { default: void 0 },
20
+ label: {},
21
+ orientation: { default: void 0 },
22
+ activationMode: { default: void 0 },
23
+ lazyMount: {
24
+ type: Boolean,
25
+ default: void 0
26
+ },
27
+ unmountOnExit: {
28
+ type: Boolean,
29
+ default: void 0
30
+ },
31
+ classes: {}
32
+ },
33
+ emits: ["update:modelValue"],
34
+ setup(e, { emit: n }) {
35
+ let r = e, i = t("tabs", X, () => r.classes), a = n, o = V(), s = i(), c = p(() => r.modelValue);
36
+ return j(we, p(() => r.modelValue === null)), (t, n) => (A(), m(B(Z).Root, w({
37
+ ...B(o),
38
+ class: B(s).base({ class: T(B(o).class) })
39
+ }, {
40
+ "model-value": c.value,
41
+ "default-value": e.defaultValue,
42
+ orientation: e.orientation,
43
+ "activation-mode": e.activationMode,
44
+ "lazy-mount": e.lazyMount,
45
+ "unmount-on-exit": e.unmountOnExit,
46
+ translations: e.label ? { listLabel: e.label } : void 0,
47
+ "onUpdate:modelValue": n[0] ||= (e) => a("update:modelValue", e)
48
+ }), {
49
+ default: q(() => [P(t.$slots, "default")]),
50
+ _: 3
51
+ }, 16, [
52
+ "model-value",
53
+ "default-value",
54
+ "orientation",
55
+ "activation-mode",
56
+ "lazy-mount",
57
+ "unmount-on-exit",
58
+ "translations"
59
+ ]));
60
+ }
61
+ }), Ee = /* @__PURE__ */ x({
62
+ inheritAttrs: !1,
63
+ __name: "TabsContent",
64
+ props: {
65
+ value: {},
66
+ classes: {}
67
+ },
68
+ setup(e) {
69
+ let n = e, r = t("tabs", X, () => n.classes), i = V(), a = r();
70
+ return (t, n) => (A(), m(B(Z).Content, w({
71
+ ...B(i),
72
+ class: B(a).content({ class: T(B(i).class) })
73
+ }, { value: e.value }), {
74
+ default: q(() => [P(t.$slots, "default")]),
75
+ _: 3
76
+ }, 16, ["value"]));
77
+ }
78
+ }), De = /* @__PURE__ */ x({
79
+ inheritAttrs: !1,
80
+ __name: "TabsList",
81
+ props: { scrollable: { type: Boolean } },
82
+ setup(e) {
83
+ let n = e, r = t("tabs", X), i = V(), a = r(), o = G("list"), s = M({
84
+ start: !1,
85
+ end: !1
86
+ }), c = () => {
87
+ o.value?.$el && (s.value = ve(o.value.$el));
88
+ }, l;
89
+ O(() => {
90
+ n.scrollable && o.value?.$el && (c(), l = new ResizeObserver(c), l.observe(o.value.$el));
91
+ }), D(() => l?.disconnect());
92
+ function u(e) {
93
+ let t = o.value?.$el;
94
+ if (!t) return;
95
+ let n = getComputedStyle(t).direction === "rtl", r = t.clientWidth * .8 * (e ? 1 : -1) * (n ? -1 : 1), i = !matchMedia("(prefers-reduced-motion: reduce)").matches;
96
+ t.scrollBy({
97
+ left: r,
98
+ behavior: i ? "smooth" : "auto"
99
+ });
100
+ }
101
+ return (t, n) => e.scrollable ? (A(), g("div", {
102
+ key: 0,
103
+ class: T(B(a).scroller())
104
+ }, [
105
+ s.value.start ? (A(), g("button", {
106
+ key: 0,
107
+ type: "button",
108
+ tabindex: "-1",
109
+ "aria-hidden": "true",
110
+ "data-side": "start",
111
+ class: T(B(a).scrollButton()),
112
+ onClick: n[0] ||= (e) => u(!1)
113
+ }, [b(B(te), { class: T(B(a).scrollIcon()) }, null, 8, ["class"])], 2)) : h("", !0),
114
+ b(B(Z).List, w({
115
+ ref_key: "list",
116
+ ref: o
117
+ }, {
118
+ ...B(i),
119
+ class: B(a).list({ class: [B(a).scrollList(), T(B(i).class)] })
120
+ }, { onScroll: c }), {
121
+ default: q(() => [P(t.$slots, "default")]),
122
+ _: 3
123
+ }, 16),
124
+ s.value.end ? (A(), g("button", {
125
+ key: 1,
126
+ type: "button",
127
+ tabindex: "-1",
128
+ "aria-hidden": "true",
129
+ "data-side": "end",
130
+ class: T(B(a).scrollButton()),
131
+ onClick: n[1] ||= (e) => u(!0)
132
+ }, [b(B(ne), { class: T(B(a).scrollIcon()) }, null, 8, ["class"])], 2)) : h("", !0)
133
+ ], 2)) : (A(), m(B(Z).List, E(w({ key: 1 }, {
134
+ ...B(i),
135
+ class: B(a).list({ class: T(B(i).class) })
136
+ })), {
137
+ default: q(() => [P(t.$slots, "default")]),
138
+ _: 3
139
+ }, 16));
140
+ }
141
+ }), Oe = ["disabled"], ke = /* @__PURE__ */ x({
142
+ inheritAttrs: !1,
143
+ __name: "TabsTrigger",
144
+ props: {
145
+ value: {},
146
+ icon: {},
147
+ disabled: {
148
+ type: Boolean,
149
+ default: void 0
150
+ },
151
+ closable: {
152
+ type: Boolean,
153
+ default: !1
154
+ },
155
+ controls: { default: void 0 },
156
+ classes: {}
157
+ },
158
+ emits: ["close"],
159
+ setup(e, { emit: n }) {
160
+ let r = e, i = n, a = t("tabs", X, () => r.classes), o = V(), s = p(() => a({ closable: r.closable })), c = S(we, null), l = G("trigger"), u = M(!1), d = () => {
161
+ let e = l.value?.$el;
162
+ u.value = !!e && e.closest("[role=tablist]")?.querySelector("[role=tab]:not([disabled])") === e;
163
+ };
164
+ O(d), k(d);
165
+ let f = p(() => ({
166
+ ...r.controls === void 0 ? {} : { "aria-controls": r.controls },
167
+ ...c?.value && u.value ? { tabIndex: 0 } : {}
168
+ }));
169
+ function v(e) {
170
+ !r.closable || e.key !== "Delete" || e.defaultPrevented || r.disabled || (e.preventDefault(), ue(e.currentTarget, () => i("close", r.value)));
171
+ }
172
+ function y(e) {
173
+ let t = e.currentTarget.parentElement?.querySelector("[role=tab]");
174
+ t && ue(t, () => i("close", r.value));
175
+ }
176
+ return (t, n) => e.closable ? (A(), g("span", {
177
+ key: 0,
178
+ role: "presentation",
179
+ class: T(s.value.tab())
180
+ }, [b(B(Z).Trigger, w({
181
+ ref_key: "trigger",
182
+ ref: l
183
+ }, {
184
+ ...B(o),
185
+ ...f.value,
186
+ class: s.value.trigger({ class: T(B(o).class) })
187
+ }, {
188
+ value: e.value,
189
+ disabled: e.disabled,
190
+ "aria-keyshortcuts": "Delete",
191
+ onKeydown: v
192
+ }), {
193
+ default: q(() => [e.icon ? (A(), m(F(e.icon), {
194
+ key: 0,
195
+ class: T(s.value.icon()),
196
+ "aria-hidden": "true"
197
+ }, null, 8, ["class"])) : h("", !0), P(t.$slots, "default")]),
198
+ _: 3
199
+ }, 16, ["value", "disabled"]), _("button", {
200
+ type: "button",
201
+ tabindex: "-1",
202
+ "aria-hidden": "true",
203
+ class: T(s.value.close()),
204
+ disabled: e.disabled,
205
+ onClick: y
206
+ }, [b(B(Y), { class: T(s.value.closeIcon()) }, null, 8, ["class"])], 10, Oe)], 2)) : (A(), m(B(Z).Trigger, w({
207
+ key: 1,
208
+ ref_key: "trigger",
209
+ ref: l
210
+ }, {
211
+ ...B(o),
212
+ ...f.value,
213
+ class: s.value.trigger({ class: T(B(o).class) })
214
+ }, {
215
+ value: e.value,
216
+ disabled: e.disabled
217
+ }), {
218
+ default: q(() => [e.icon ? (A(), m(F(e.icon), {
219
+ key: 0,
220
+ class: T(s.value.icon()),
221
+ "aria-hidden": "true"
222
+ }, null, 8, ["class"])) : h("", !0), P(t.$slots, "default")]),
223
+ _: 3
224
+ }, 16, ["value", "disabled"]));
225
+ }
226
+ }), Ae = Symbol("wirecore-dialog-root"), je = Symbol("wirecore-dialog-content"), Me = /* @__PURE__ */ x({
227
+ __name: "Dialog",
228
+ props: {
229
+ open: {
230
+ type: Boolean,
231
+ default: void 0
232
+ },
233
+ defaultOpen: {
234
+ type: Boolean,
235
+ default: void 0
236
+ },
237
+ role: { default: "dialog" },
238
+ modal: {
239
+ type: Boolean,
240
+ default: !0
241
+ },
242
+ closeOnEscape: {
243
+ type: Boolean,
244
+ default: !0
245
+ },
246
+ closeOnInteractOutside: {
247
+ type: Boolean,
248
+ default: void 0
249
+ }
250
+ },
251
+ emits: ["update:open"],
252
+ setup(e, { emit: t }) {
253
+ let n = e, r = t;
254
+ j(Ae, p(() => ({ modal: n.modal })));
255
+ let i = I(null);
256
+ j(je, i);
257
+ let a = () => se(i.value) ?? (n.role === "alertdialog" ? i.value?.querySelector("[data-part=close-trigger]") : null) ?? null;
258
+ return (t, n) => (A(), m(B(Q).Root, {
259
+ open: e.open,
260
+ "default-open": e.defaultOpen,
261
+ role: e.role,
262
+ modal: e.modal,
263
+ "close-on-escape": e.closeOnEscape,
264
+ "close-on-interact-outside": e.closeOnInteractOutside,
265
+ "initial-focus-el": a,
266
+ "lazy-mount": "",
267
+ "unmount-on-exit": "",
268
+ "onUpdate:open": n[0] ||= (e) => r("update:open", e)
269
+ }, {
270
+ default: q(() => [P(t.$slots, "default")]),
271
+ _: 3
272
+ }, 8, [
273
+ "open",
274
+ "default-open",
275
+ "role",
276
+ "modal",
277
+ "close-on-escape",
278
+ "close-on-interact-outside"
279
+ ]));
280
+ }
281
+ });
282
+ //#endregion
283
+ //#region src/components/Dialog/drag.ts
284
+ function Ne(e) {
285
+ let t = M({
286
+ x: 0,
287
+ y: 0
288
+ }), n = null, r = (e, n) => {
289
+ let r = n.getBoundingClientRect(), i = {
290
+ x: r.x - t.value.x,
291
+ y: r.y - t.value.y,
292
+ width: r.width,
293
+ height: r.height
294
+ };
295
+ t.value = le(e, i, {
296
+ width: innerWidth,
297
+ height: innerHeight
298
+ });
299
+ };
300
+ function i(r) {
301
+ let i = r.currentTarget;
302
+ if (!e() || r.button !== 0 || r.target.closest("button, a, input")) return;
303
+ let a = i.closest("[data-part=content]");
304
+ a && (n = {
305
+ id: r.pointerId,
306
+ x: r.clientX,
307
+ y: r.clientY,
308
+ origin: { ...t.value },
309
+ content: a
310
+ }, i.setPointerCapture?.(r.pointerId), r.preventDefault());
311
+ }
312
+ function a(e) {
313
+ n && e.pointerId === n.id && r({
314
+ x: n.origin.x + e.clientX - n.x,
315
+ y: n.origin.y + e.clientY - n.y
316
+ }, n.content);
317
+ }
318
+ function o() {
319
+ n = null;
320
+ }
321
+ function s(n) {
322
+ if (!e()) return;
323
+ let i = pe(n);
324
+ i && (n.preventDefault(), r({
325
+ x: t.value.x + i.x,
326
+ y: t.value.y + i.y
327
+ }, n.currentTarget));
328
+ }
329
+ return {
330
+ style: p(() => e() && (t.value.x || t.value.y) ? { translate: `${t.value.x}px ${t.value.y}px` } : void 0),
331
+ reset: () => {
332
+ t.value = {
333
+ x: 0,
334
+ y: 0
335
+ };
336
+ },
337
+ header: {
338
+ pointerdown: i,
339
+ pointermove: a,
340
+ pointerup: o,
341
+ pointercancel: o
342
+ },
343
+ onKeyDown: s
344
+ };
345
+ }
346
+ //#endregion
347
+ //#region src/components/Dialog/DialogContent.vue?vue&type=script&setup=true&lang.ts
348
+ var Pe = ["aria-label"], Fe = /* @__PURE__ */ x({
349
+ inheritAttrs: !1,
350
+ __name: "DialogContent",
351
+ props: {
352
+ title: {},
353
+ hideTitle: { type: Boolean },
354
+ titlePosition: {},
355
+ description: {},
356
+ icon: {},
357
+ status: {},
358
+ size: {},
359
+ position: {},
360
+ fullscreen: { type: Boolean },
361
+ maximizable: { type: Boolean },
362
+ maximized: {
363
+ type: Boolean,
364
+ default: void 0
365
+ },
366
+ defaultMaximized: { type: Boolean },
367
+ draggable: { type: Boolean },
368
+ closable: {
369
+ type: Boolean,
370
+ default: !0
371
+ },
372
+ scrollBehavior: {},
373
+ responsive: {
374
+ type: Boolean,
375
+ default: !0
376
+ },
377
+ closeLabel: {},
378
+ maximizeLabel: {},
379
+ restoreLabel: {},
380
+ portalTarget: {},
381
+ classes: {}
382
+ },
383
+ emits: ["update:maximized"],
384
+ setup(n, { expose: r, emit: i }) {
385
+ let a = e(), o = n, s = i, c = t("dialog", fe, () => o.classes), l = V(), u = S(Ae, null), d = p(() => u?.value.modal ?? !0), v = S(je, null), x = G("content");
386
+ K(() => x.value?.$el ?? null, (e) => {
387
+ v && (v.value = e);
388
+ }, {
389
+ immediate: !0,
390
+ flush: "sync"
391
+ }), r({ focusFirst: () => he(x.value?.$el) });
392
+ let C = M(o.defaultMaximized ?? !1), E = p(() => o.maximized ?? C.value);
393
+ function D() {
394
+ let e = !E.value;
395
+ C.value = e, s("update:maximized", e);
396
+ }
397
+ let O = Ne(() => o.draggable && !E.value && !o.fullscreen), k = Se();
398
+ K(() => k.value.open, (e) => !e && O.reset());
399
+ let j = p(() => c({
400
+ status: o.status,
401
+ size: o.size,
402
+ position: o.position,
403
+ scrollBehavior: o.scrollBehavior,
404
+ fullscreen: o.fullscreen || E.value,
405
+ responsive: o.responsive,
406
+ draggable: o.draggable && !E.value,
407
+ maximizable: o.maximizable,
408
+ hideTitle: o.hideTitle,
409
+ titleInHeader: o.titlePosition === "header"
410
+ }));
411
+ return (e, t) => (A(), m(f, { to: n.portalTarget ?? "body" }, [d.value ? (A(), m(B(Q).Backdrop, {
412
+ key: 0,
413
+ class: T(j.value.backdrop())
414
+ }, null, 8, ["class"])) : h("", !0), b(B(Q).Positioner, { class: T(j.value.positioner()) }, {
415
+ default: q(() => [b(B(Q).Content, w({
416
+ ref_key: "content",
417
+ ref: x
418
+ }, {
419
+ ...B(l),
420
+ class: j.value.content({ class: T(B(l).class) }),
421
+ ...B(O).style.value ? { style: [B(l).style, B(O).style.value] } : {},
422
+ ...n.draggable ? { "aria-keyshortcuts": B(me) } : {}
423
+ }, { onKeydown: t[0] ||= (e) => n.draggable && B(O).onKeyDown(e) }), {
424
+ default: q(() => [
425
+ _("div", w({ class: j.value.header() }, R(n.draggable ? B(O).header : {}, !0)), [
426
+ n.icon ? (A(), g("span", {
427
+ key: 0,
428
+ class: T(j.value.iconBox())
429
+ }, [(A(), m(F(n.icon), {
430
+ class: T(j.value.icon()),
431
+ "aria-hidden": "true"
432
+ }, null, 8, ["class"]))], 2)) : h("", !0),
433
+ n.titlePosition === "header" ? (A(), m(B(Q).Title, {
434
+ key: 1,
435
+ class: T(j.value.title())
436
+ }, {
437
+ default: q(() => [y(L(n.title), 1)]),
438
+ _: 1
439
+ }, 8, ["class"])) : h("", !0),
440
+ n.maximizable ? (A(), g("button", {
441
+ key: 2,
442
+ type: "button",
443
+ class: T(j.value.maximize()),
444
+ "aria-label": E.value ? n.restoreLabel ?? B(a).dialog.restore : n.maximizeLabel ?? B(a).dialog.maximize,
445
+ onClick: D
446
+ }, [(A(), m(F(E.value ? B(J) : B(oe)), {
447
+ class: T(j.value.maximizeIcon()),
448
+ "aria-hidden": "true"
449
+ }, null, 8, ["class"]))], 10, Pe)) : h("", !0),
450
+ n.closable ? (A(), m(B(Q).CloseTrigger, {
451
+ key: 3,
452
+ class: T(j.value.close()),
453
+ "aria-label": n.closeLabel ?? B(a).common.close
454
+ }, {
455
+ default: q(() => [b(B(Y), {
456
+ class: T(j.value.closeIcon()),
457
+ "aria-hidden": "true"
458
+ }, null, 8, ["class"])]),
459
+ _: 1
460
+ }, 8, ["class", "aria-label"])) : h("", !0)
461
+ ], 16),
462
+ _("div", { class: T(j.value.body()) }, [
463
+ n.titlePosition === "header" ? h("", !0) : (A(), m(B(Q).Title, {
464
+ key: 0,
465
+ class: T(j.value.title())
466
+ }, {
467
+ default: q(() => [y(L(n.title), 1)]),
468
+ _: 1
469
+ }, 8, ["class"])),
470
+ n.description ? (A(), m(B(Q).Description, {
471
+ key: 1,
472
+ class: T(j.value.description())
473
+ }, {
474
+ default: q(() => [y(L(n.description), 1)]),
475
+ _: 1
476
+ }, 8, ["class"])) : h("", !0),
477
+ P(e.$slots, "default")
478
+ ], 2),
479
+ e.$slots.footer ? (A(), g("div", {
480
+ key: 0,
481
+ class: T(j.value.footer())
482
+ }, [P(e.$slots, "footer")], 2)) : h("", !0)
483
+ ]),
484
+ _: 3
485
+ }, 16)]),
486
+ _: 3
487
+ }, 8, ["class"])], 8, ["to"]));
488
+ }
489
+ }), Ie = ["data-level", "data-filled"], Le = ["id"], Re = ["id", "aria-label"], ze = ["data-met"], Be = /* @__PURE__ */ x({
490
+ inheritAttrs: !1,
491
+ __name: "PasswordInput",
492
+ props: /*@__PURE__*/ C({
493
+ size: {},
494
+ invalid: {
495
+ type: Boolean,
496
+ default: void 0
497
+ },
498
+ success: {
499
+ type: Boolean,
500
+ default: void 0
501
+ },
502
+ disabled: {
503
+ type: Boolean,
504
+ default: void 0
505
+ },
506
+ readOnly: {
507
+ type: Boolean,
508
+ default: void 0
509
+ },
510
+ required: {
511
+ type: Boolean,
512
+ default: void 0
513
+ },
514
+ name: {},
515
+ defaultVisible: {
516
+ type: Boolean,
517
+ default: void 0
518
+ },
519
+ visible: {
520
+ type: Boolean,
521
+ default: void 0
522
+ },
523
+ autocomplete: { default: "current-password" },
524
+ strength: {
525
+ type: Boolean,
526
+ default: !1
527
+ },
528
+ requirements: { default: void 0 },
529
+ loading: { type: Boolean },
530
+ clearable: { type: Boolean },
531
+ clearLabel: {},
532
+ defaultValue: { default: void 0 },
533
+ id: {},
534
+ mono: { type: Boolean },
535
+ classes: {}
536
+ }, {
537
+ modelValue: {},
538
+ modelModifiers: {}
539
+ }),
540
+ emits: /*@__PURE__*/ C(["update:visible"], ["update:modelValue"]),
541
+ setup(o, { expose: s, emit: c }) {
542
+ let l = e(), u = o, f = c, v = t("passwordInput", ge, () => u.classes), x = U(o, "modelValue"), S = V(), C = p(() => n(S)), E = xe(), D = r(), O = p(() => !!u.invalid || !!E?.value.invalid), k = p(() => !O.value && (!!u.success || D.value.success)), j = p(() => v({
543
+ size: u.size,
544
+ success: k.value,
545
+ mono: u.mono
546
+ })), P = H(), F = M(u.defaultValue), I = p(() => x.value ?? F.value), R = p(() => _e(I.value ?? "")), z = p(() => I.value ? l.passwordStrength.levels[R.value] : ""), W = p(() => ce(I.value ?? "", u.requirements ?? []));
547
+ function K(e) {
548
+ F.value = e.target.value, x.value = F.value;
549
+ }
550
+ let te = p(() => u.strength || u.requirements?.length ? [
551
+ E?.value.ariaDescribedby,
552
+ u.strength && `${P}strength`,
553
+ u.requirements?.length && `${P}requirements`
554
+ ].filter(Boolean).join(" ") : void 0), ne = p(() => !!u.disabled || !!E?.value.disabled), oe = p(() => !!u.readOnly || !!E?.value.readOnly), J = G("control");
555
+ function Y() {
556
+ let e = J.value?.$el.querySelector("input");
557
+ e && (ye(e), e.focus());
558
+ }
559
+ s(i(() => J.value?.$el.querySelector("input")));
560
+ let se = p(() => u.autocomplete), le = p(() => de(u.id, "input", { input: E?.value.ids.control }));
561
+ return (e, t) => (A(), m(B($).Root, w({
562
+ class: j.value.base({ class: C.value.className }),
563
+ style: C.value.style,
564
+ invalid: o.invalid,
565
+ disabled: o.disabled,
566
+ "read-only": o.readOnly,
567
+ required: o.required,
568
+ name: o.name,
569
+ "default-visible": o.defaultVisible,
570
+ visible: o.visible,
571
+ "auto-complete": se.value,
572
+ translations: B(l).passwordInput
573
+ }, le.value, { onVisibilityChange: t[0] ||= (e) => f("update:visible", e.visible) }), {
574
+ default: q(() => [
575
+ b(B($).Control, {
576
+ ref_key: "control",
577
+ ref: J,
578
+ class: T(j.value.control())
579
+ }, {
580
+ default: q(() => [
581
+ b(B($).Input, w(C.value.rest, {
582
+ "aria-describedby": te.value,
583
+ "aria-busy": o.loading || void 0,
584
+ value: I.value,
585
+ class: j.value.input(),
586
+ onInput: K
587
+ }), null, 16, [
588
+ "aria-describedby",
589
+ "aria-busy",
590
+ "value",
591
+ "class"
592
+ ]),
593
+ o.loading || o.clearable || k.value ? (A(), m(a, {
594
+ key: 0,
595
+ loading: o.loading,
596
+ clear: o.clearable && !!I.value && !ne.value && !oe.value,
597
+ "clear-label": o.clearLabel ?? B(l).field.clear,
598
+ success: k.value,
599
+ classes: {
600
+ spinner: j.value.spinner(),
601
+ clear: j.value.clear(),
602
+ clearIcon: j.value.clearIcon(),
603
+ statusIcon: j.value.statusIcon()
604
+ },
605
+ onClear: Y
606
+ }, null, 8, [
607
+ "loading",
608
+ "clear",
609
+ "clear-label",
610
+ "success",
611
+ "classes"
612
+ ])) : h("", !0),
613
+ b(B($).VisibilityTrigger, { class: T(j.value.toggle()) }, {
614
+ default: q(() => [b(B($).Indicator, null, {
615
+ fallback: q(() => [b(B(ie), {
616
+ class: T(j.value.toggleIcon()),
617
+ "aria-hidden": "true"
618
+ }, null, 8, ["class"])]),
619
+ default: q(() => [b(B(ae), {
620
+ class: T(j.value.toggleIcon()),
621
+ "aria-hidden": "true"
622
+ }, null, 8, ["class"])]),
623
+ _: 1
624
+ })]),
625
+ _: 1
626
+ }, 8, ["class"])
627
+ ]),
628
+ _: 1
629
+ }, 8, ["class"]),
630
+ o.strength ? (A(), g("div", {
631
+ key: 0,
632
+ class: T(j.value.strength())
633
+ }, [_("div", {
634
+ class: T(j.value.meter()),
635
+ "aria-hidden": "true"
636
+ }, [(A(), g(d, null, N(4, (e) => _("span", {
637
+ key: e,
638
+ class: T(j.value.bar()),
639
+ "data-level": R.value,
640
+ "data-filled": e <= R.value || void 0
641
+ }, null, 10, Ie)), 64))], 2), _("span", {
642
+ id: `${B(P)}strength`,
643
+ class: T(j.value.strengthText()),
644
+ "aria-live": "polite"
645
+ }, [z.value ? (A(), g(d, { key: 0 }, [y(L(B(l).passwordStrength.label(z.value)), 1)], 64)) : h("", !0)], 10, Le)], 2)) : h("", !0),
646
+ o.requirements?.length ? (A(), g("ul", {
647
+ key: 1,
648
+ id: `${B(P)}requirements`,
649
+ class: T(j.value.requirements()),
650
+ "aria-label": B(l).passwordRequirements.label
651
+ }, [(A(!0), g(d, null, N(o.requirements, (e, t) => (A(), g("li", {
652
+ key: e.label,
653
+ class: T(j.value.requirement()),
654
+ "data-met": W.value[t] || void 0
655
+ }, [
656
+ W.value[t] ? (A(), m(B(ee), {
657
+ key: 0,
658
+ class: T(j.value.requirementIcon()),
659
+ "aria-hidden": "true"
660
+ }, null, 8, ["class"])) : (A(), m(B(re), {
661
+ key: 1,
662
+ class: T(j.value.requirementIcon()),
663
+ "aria-hidden": "true"
664
+ }, null, 8, ["class"])),
665
+ y(" " + L(e.label), 1),
666
+ _("span", { class: T(j.value.requirementState()) }, L(`: ${W.value[t] ? B(l).passwordRequirements.met : B(l).passwordRequirements.unmet}`), 3)
667
+ ], 10, ze))), 128))], 10, Re)) : h("", !0)
668
+ ]),
669
+ _: 1
670
+ }, 16, [
671
+ "class",
672
+ "style",
673
+ "invalid",
674
+ "disabled",
675
+ "read-only",
676
+ "required",
677
+ "name",
678
+ "default-visible",
679
+ "visible",
680
+ "auto-complete",
681
+ "translations"
682
+ ]));
683
+ }
684
+ }), Ve = /* @__PURE__ */ x({
685
+ inheritAttrs: !1,
686
+ __name: "Tree",
687
+ props: {
688
+ items: {},
689
+ label: {},
690
+ selectionMode: { default: "single" },
691
+ selectedValue: { default: void 0 },
692
+ defaultSelectedValue: { default: void 0 },
693
+ expandedValue: { default: void 0 },
694
+ defaultExpandedValue: { default: void 0 },
695
+ checkable: {
696
+ type: Boolean,
697
+ default: !1
698
+ },
699
+ checkedValue: { default: void 0 },
700
+ defaultCheckedValue: { default: void 0 },
701
+ checkStrictly: {
702
+ type: Boolean,
703
+ default: !1
704
+ },
705
+ checkedStrategy: { default: void 0 },
706
+ reorderable: {
707
+ type: Boolean,
708
+ default: !1
709
+ },
710
+ allowDrop: {},
711
+ group: {},
712
+ name: {},
713
+ loadChildren: {},
714
+ dataSource: {},
715
+ filter: {
716
+ type: Boolean,
717
+ default: !1
718
+ },
719
+ filterValue: { default: void 0 },
720
+ filterMode: { default: "filter" },
721
+ expandControls: {
722
+ type: Boolean,
723
+ default: !1
724
+ },
725
+ showLines: {
726
+ type: Boolean,
727
+ default: !1
728
+ },
729
+ emptyText: {},
730
+ classes: {}
731
+ },
732
+ emits: [
733
+ "update:selectedValue",
734
+ "update:expandedValue",
735
+ "update:checkedValue",
736
+ "update:filterValue",
737
+ "move",
738
+ "transfer",
739
+ "loadChildren"
740
+ ],
741
+ setup(n, { expose: r, emit: i }) {
742
+ let a = e(), f = n, _ = t("tree", be, () => f.classes), x = i, S = W(), C = V(), E = _(), D = a.tree, O = M(null), k = p(() => O.value?.$el ?? null), F = u(f, x, k);
743
+ j(s, F.drag), j(o, {
744
+ ...F,
745
+ showLines: z(f, "showLines")
746
+ });
747
+ let I = p(() => f.label ?? C["aria-label"] ?? a.tree.treeLabel), R = p(() => f.filter || f.filterValue !== void 0), H = p(() => !F.view.value.length && (U.value !== void 0 || !!S.empty || f.group !== void 0)), U = p(() => f.emptyText ?? (F.query.value.trim() ? D.noMatches : f.group === void 0 ? void 0 : a.common.empty)), G = p(() => f.reorderable || F.lazy.value || R.value || f.group !== void 0);
748
+ return r({
749
+ expandAll: F.expandAll,
750
+ collapseAll: F.collapseAll,
751
+ invalidate: F.invalidate,
752
+ focusNode: F.focusNode
753
+ }), (e, t) => (A(), m(B(Ce).Root, w({
754
+ ref_key: "root",
755
+ ref: O,
756
+ class: B(E).base({ class: T(B(C).class) }),
757
+ style: B(C).style,
758
+ collection: B(F).collection.value,
759
+ "selection-mode": n.selectionMode,
760
+ "selected-value": B(F).selected.value,
761
+ "expanded-value": B(F).expanded.value
762
+ }, B(F).ownChecks.value ? {} : {
763
+ checkedValue: n.checkedValue,
764
+ defaultCheckedValue: n.defaultCheckedValue
765
+ }, {
766
+ translations: { treeLabel: I.value },
767
+ onSelectionChange: t[2] ||= (e) => B(F).onSelectionChange(e.selectedValue),
768
+ onExpandedChange: t[3] ||= (e) => B(F).setExpanded(e.expandedValue),
769
+ onCheckedChange: t[4] ||= (e) => B(F).ownChecks.value || B(F).onArkCheckedChange(e.checkedValue),
770
+ onKeydownCapture: B(F).onKeydown
771
+ }), {
772
+ default: q(() => [
773
+ n.label ? (A(), m(B(Ce).Label, {
774
+ key: 0,
775
+ class: T(B(E).label())
776
+ }, {
777
+ default: q(() => [y(L(n.label), 1)]),
778
+ _: 1
779
+ }, 8, ["class"])) : h("", !0),
780
+ b(c, {
781
+ model: B(F),
782
+ filter: n.filter,
783
+ "filter-mode": n.filterMode,
784
+ "expand-controls": n.expandControls,
785
+ classes: n.classes
786
+ }, null, 8, [
787
+ "model",
788
+ "filter",
789
+ "filter-mode",
790
+ "expand-controls",
791
+ "classes"
792
+ ]),
793
+ b(B(Ce).Tree, {
794
+ class: T(B(E).tree()),
795
+ hidden: H.value || void 0
796
+ }, {
797
+ default: q(() => [(A(!0), g(d, null, N(B(F).view.value, (t, r) => (A(), m(l, {
798
+ key: t.id,
799
+ node: t,
800
+ "index-path": [r],
801
+ checkable: n.checkable
802
+ }, v({ _: 2 }, [e.$slots.node ? {
803
+ name: "node",
804
+ fn: q((t) => [P(e.$slots, "node", w({ ref_for: !0 }, t))]),
805
+ key: "0"
806
+ } : void 0]), 1032, [
807
+ "node",
808
+ "index-path",
809
+ "checkable"
810
+ ]))), 128))]),
811
+ _: 3
812
+ }, 8, ["class", "hidden"]),
813
+ H.value ? (A(), g("div", {
814
+ key: 1,
815
+ class: T(B(E).empty()),
816
+ onDragover: t[0] ||= (...e) => B(F).onEmptyDragOver && B(F).onEmptyDragOver(...e),
817
+ onDrop: t[1] ||= (...e) => B(F).onEmptyDrop && B(F).onEmptyDrop(...e)
818
+ }, [P(e.$slots, "empty", {}, () => [y(L(U.value), 1)])], 34)) : h("", !0),
819
+ G.value ? (A(), g("p", {
820
+ key: 2,
821
+ role: "status",
822
+ class: T(B(E).status())
823
+ }, L(B(F).status.value), 3)) : h("", !0)
824
+ ]),
825
+ _: 3
826
+ }, 16, [
827
+ "class",
828
+ "style",
829
+ "collection",
830
+ "selection-mode",
831
+ "selected-value",
832
+ "expanded-value",
833
+ "translations",
834
+ "onKeydownCapture"
835
+ ]));
836
+ }
837
+ });
838
+ //#endregion
839
+ export { Ae as a, Ee as c, Me as i, Te as l, Be as n, ke as o, Fe as r, De as s, Ve as t };