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