@wirecore/wirelayer-vue 0.6.0 → 0.8.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 (158) hide show
  1. package/dist/{Checkbox-D9f77jtl.js → Checkbox-DS2qfQK1.js} +28 -30
  2. package/dist/ContextMenu-B6agwyf_.js +2311 -0
  3. package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
  4. package/dist/{Highlight-Cg8DvCfq.js → Highlight-uwptdaUw.js} +35 -32
  5. package/dist/Input-C5dyvZfJ.js +183 -0
  6. package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
  7. package/dist/{Select-DAuYpE1c.js → Select-CeZbSy6K.js} +137 -112
  8. package/dist/Slider-Cpv7Vj3B.js +143 -0
  9. package/dist/Tree-DgHt0P5P.js +807 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/components/Alert/Alert.vue.d.ts +5 -3
  12. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  13. package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
  14. package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
  16. package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
  17. package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
  18. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  19. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
  20. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
  21. package/dist/components/Checkbox/Checkbox.vue.d.ts +28 -23
  22. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  23. package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
  24. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
  25. package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
  26. package/dist/components/Combobox/Combobox.vue.d.ts +11 -1
  27. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
  29. package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
  30. package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
  31. package/dist/components/Confirm/confirm.d.ts +7 -0
  32. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +17 -1
  34. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  35. package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
  36. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  37. package/dist/components/DatePicker/DatePickerBase.vue.d.ts +2 -0
  38. package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
  39. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +2 -0
  40. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
  41. package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
  42. package/dist/components/Dialog/DialogContent.vue.d.ts +7 -0
  43. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  44. package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
  45. package/dist/components/Drawer/DrawerContent.vue.d.ts +2 -0
  46. package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
  47. package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
  48. package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
  49. package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
  50. package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
  51. package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
  52. package/dist/components/IconButton/IconButton.vue.d.ts +2 -0
  53. package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
  54. package/dist/components/Input/Input.vue.d.ts +3 -1
  55. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  56. package/dist/components/Knob/Knob.vue.d.ts +2 -0
  57. package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
  58. package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
  59. package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
  60. package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
  61. package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
  62. package/dist/components/Menu/Menu.vue.d.ts +9 -1
  63. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  64. package/dist/components/Menu/state.d.ts +22 -0
  65. package/dist/components/Menu/state.d.ts.map +1 -1
  66. package/dist/components/MonthPicker/MonthPicker.vue.d.ts +2 -0
  67. package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
  68. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  69. package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
  70. package/dist/components/NativeSelect/NativeSelect.vue.d.ts +26 -17
  71. package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
  72. package/dist/components/NumberInput/NumberInput.vue.d.ts +3 -1
  73. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  74. package/dist/components/Panel/Panel.vue.d.ts +1 -1
  75. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +11 -3
  76. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  77. package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
  78. package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
  79. package/dist/components/Popover/Popover.vue.d.ts +1 -1
  80. package/dist/components/Progress/Progress.vue.d.ts +11 -0
  81. package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
  82. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +24 -25
  83. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  84. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
  85. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
  86. package/dist/components/RadioGroup/context.d.ts +4 -0
  87. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  88. package/dist/components/Rating/Rating.vue.d.ts +2 -0
  89. package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
  90. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +23 -22
  91. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  92. package/dist/components/Select/Select.vue.d.ts +11 -1
  93. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  94. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
  95. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
  96. package/dist/components/Slider/Slider.vue.d.ts +2 -0
  97. package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
  98. package/dist/components/Switch/Switch.vue.d.ts +2 -0
  99. package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
  100. package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
  101. package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
  102. package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
  103. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  104. package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
  105. package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
  106. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
  107. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
  108. package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
  109. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  110. package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
  111. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  112. package/dist/components/YearPicker/YearPicker.vue.d.ts +2 -0
  113. package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
  114. package/dist/data-table/DataTable.vue.d.ts +9 -1
  115. package/dist/data-table/DataTable.vue.d.ts.map +1 -1
  116. package/dist/data-table.js +1007 -994
  117. package/dist/editor.js +1 -1
  118. package/dist/form/FormField.vue.d.ts +3 -0
  119. package/dist/form/FormField.vue.d.ts.map +1 -1
  120. package/dist/form.js +8 -5
  121. package/dist/index.d.ts +2 -1
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +5834 -5626
  124. package/dist/label-for-eQvYjsM5.js +8 -0
  125. package/dist/pdf.js +3 -3
  126. package/dist/sources/ActionBar.css +1 -0
  127. package/dist/sources/AppShell.css +1 -0
  128. package/dist/sources/ChatPrompt.css +1 -0
  129. package/dist/sources/Gallery.css +1 -0
  130. package/dist/sources/IconButton.css +1 -0
  131. package/dist/sources/Image.css +1 -0
  132. package/dist/sources/ImageCropper.css +1 -0
  133. package/dist/sources/InlineEdit.css +1 -0
  134. package/dist/sources/Marquee.css +1 -0
  135. package/dist/sources/MegaMenu.css +1 -0
  136. package/dist/sources/Menubar.css +1 -0
  137. package/dist/sources/OrderList.css +1 -0
  138. package/dist/sources/PickList.css +1 -0
  139. package/dist/sources/ScrollTop.css +1 -0
  140. package/dist/{useTree-H8XsFHMk.js → useTree-UhG1TMeM.js} +1 -1
  141. package/dist/utils/label-for.d.ts +3 -0
  142. package/dist/utils/label-for.d.ts.map +1 -0
  143. package/dist/utils/list.d.ts +5 -0
  144. package/dist/utils/list.d.ts.map +1 -1
  145. package/dist/utils/text-field.d.ts +16 -0
  146. package/dist/utils/text-field.d.ts.map +1 -0
  147. package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
  148. package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
  149. package/dist/virtual.js +207 -197
  150. package/fonts.css +2 -0
  151. package/llms-full.txt +254 -23
  152. package/llms.txt +9 -5
  153. package/package.json +7 -3
  154. package/theme.css +14 -0
  155. package/dist/ContextMenu-C5JKyNlX.js +0 -2209
  156. package/dist/Input-BhnYMKjE.js +0 -168
  157. package/dist/Slider-CyoZc5A8.js +0 -135
  158. package/dist/Tree-DWxqSrO6.js +0 -789
@@ -1,789 +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 { r, t as i } from "./InputStatus-D7kBGlew.js";
4
- import { a, i as o, n as s, r as c, t as l } from "./useTree-H8XsFHMk.js";
5
- import { Fragment as u, Teleport as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as v, createVNode as y, defineComponent as b, inject as x, mergeModels as S, mergeProps as C, normalizeClass as w, normalizeProps as T, normalizeStyle 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 B, useSlots as V, useTemplateRef as H, watch as U, withCtx as W } from "vue";
6
- import { Check as te, ChevronLeft as ne, ChevronRight as G, Circle as re, Eye as ie, EyeOff as ae, Maximize2 as oe, Minimize2 as K, X as q } from "@lucide/vue";
7
- import { checkPasswordRequirements as se, clampDialogOffset as ce, closeTab as le, dialog as ue, dialogMoveForKey as de, dialogMoveKeys as fe, passwordInput as pe, passwordStrength as me, scrollEdges as he, setTextControlValue as ge, tabs as J, tree as _e } from "@wirecore/wirelayer-recipes";
8
- import { useFieldContext as ve } from "@ark-ui/vue/field";
9
- import { Tabs as Y } from "@ark-ui/vue/tabs";
10
- import { Dialog as X, useDialogContext as ye } 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 be = /* @__PURE__ */ b({
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(), p(R(Y).Root, C({
38
- ...R(o),
39
- class: R(s).base({ class: w(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: W(() => [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
- }), xe = /* @__PURE__ */ b({
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(), p(R(Y).Content, C({
72
- ...R(i),
73
- class: R(a).content({ class: w(R(i).class) })
74
- }, { value: e.value }), {
75
- default: W(() => [N(t.$slots, "default")]),
76
- _: 3
77
- }, 16, ["value"]));
78
- }
79
- }), Se = /* @__PURE__ */ b({
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 = H("list"), s = j({
85
- start: !1,
86
- end: !1
87
- }), c = () => {
88
- o.value?.$el && (s.value = he(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(), h("div", {
103
- key: 0,
104
- class: w(R(a).scroller())
105
- }, [
106
- s.value.start ? (k(), h("button", {
107
- key: 0,
108
- type: "button",
109
- tabindex: "-1",
110
- "aria-hidden": "true",
111
- "data-side": "start",
112
- class: w(R(a).scrollButton()),
113
- onClick: n[0] ||= (e) => u(!1)
114
- }, [y(R(ne), { class: w(R(a).scrollIcon()) }, null, 8, ["class"])], 2)) : m("", !0),
115
- y(R(Y).List, C({
116
- ref_key: "list",
117
- ref: o
118
- }, {
119
- ...R(i),
120
- class: R(a).list({ class: [R(a).scrollList(), w(R(i).class)] })
121
- }, { onScroll: c }), {
122
- default: W(() => [N(t.$slots, "default")]),
123
- _: 3
124
- }, 16),
125
- s.value.end ? (k(), h("button", {
126
- key: 1,
127
- type: "button",
128
- tabindex: "-1",
129
- "aria-hidden": "true",
130
- "data-side": "end",
131
- class: w(R(a).scrollButton()),
132
- onClick: n[1] ||= (e) => u(!0)
133
- }, [y(R(G), { class: w(R(a).scrollIcon()) }, null, 8, ["class"])], 2)) : m("", !0)
134
- ], 2)) : (k(), p(R(Y).List, T(C({ key: 1 }, {
135
- ...R(i),
136
- class: R(a).list({ class: w(R(i).class) })
137
- })), {
138
- default: W(() => [N(t.$slots, "default")]),
139
- _: 3
140
- }, 16));
141
- }
142
- }), Ce = ["disabled"], we = /* @__PURE__ */ b({
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 = f(() => a({ closable: r.closable }));
161
- function c(e) {
162
- !r.closable || e.key !== "Delete" || e.defaultPrevented || r.disabled || (e.preventDefault(), le(e.currentTarget, () => i("close", r.value)));
163
- }
164
- function l(e) {
165
- let t = e.currentTarget.parentElement?.querySelector("[role=tab]");
166
- t && le(t, () => i("close", r.value));
167
- }
168
- return (t, n) => e.closable ? (k(), h("span", {
169
- key: 0,
170
- role: "presentation",
171
- class: w(s.value.tab())
172
- }, [y(R(Y).Trigger, C({
173
- ...R(o),
174
- class: s.value.trigger({ class: w(R(o).class) })
175
- }, {
176
- value: e.value,
177
- disabled: e.disabled,
178
- "aria-keyshortcuts": "Delete",
179
- onKeydown: c
180
- }), {
181
- default: W(() => [e.icon ? (k(), p(P(e.icon), {
182
- key: 0,
183
- class: w(s.value.icon()),
184
- "aria-hidden": "true"
185
- }, null, 8, ["class"])) : m("", !0), N(t.$slots, "default")]),
186
- _: 3
187
- }, 16, ["value", "disabled"]), g("button", {
188
- type: "button",
189
- tabindex: "-1",
190
- "aria-hidden": "true",
191
- class: w(s.value.close()),
192
- disabled: e.disabled,
193
- onClick: l
194
- }, [y(R(q), { class: w(s.value.closeIcon()) }, null, 8, ["class"])], 10, Ce)], 2)) : (k(), p(R(Y).Trigger, C({ key: 1 }, {
195
- ...R(o),
196
- class: s.value.trigger({ class: w(R(o).class) })
197
- }, {
198
- value: e.value,
199
- disabled: e.disabled
200
- }), {
201
- default: W(() => [e.icon ? (k(), p(P(e.icon), {
202
- key: 0,
203
- class: w(s.value.icon()),
204
- "aria-hidden": "true"
205
- }, null, 8, ["class"])) : m("", !0), N(t.$slots, "default")]),
206
- _: 3
207
- }, 16, ["value", "disabled"]));
208
- }
209
- }), $ = Symbol("wirecore-dialog-root"), Te = /* @__PURE__ */ b({
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($, f(() => ({ modal: n.modal }))), (t, n) => (k(), p(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: W(() => [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 Ee(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 = ce(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 = de(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: f(() => 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 De = ["aria-label"], Oe = /* @__PURE__ */ b({
327
- inheritAttrs: !1,
328
- __name: "DialogContent",
329
- props: {
330
- title: {},
331
- description: {},
332
- icon: {},
333
- status: {},
334
- size: {},
335
- position: {},
336
- fullscreen: { type: Boolean },
337
- maximizable: { type: Boolean },
338
- maximized: {
339
- type: Boolean,
340
- default: void 0
341
- },
342
- defaultMaximized: { type: Boolean },
343
- draggable: { type: Boolean },
344
- closable: {
345
- type: Boolean,
346
- default: !0
347
- },
348
- scrollBehavior: {},
349
- responsive: {
350
- type: Boolean,
351
- default: !0
352
- },
353
- closeLabel: {},
354
- maximizeLabel: {},
355
- restoreLabel: {},
356
- portalTarget: {},
357
- classes: {}
358
- },
359
- emits: ["update:maximized"],
360
- setup(n, { emit: r }) {
361
- let i = e(), a = n, o = r, s = t("dialog", ue, () => a.classes), c = z(), l = x($, null), u = f(() => l?.value.modal ?? !0), _ = j(a.defaultMaximized ?? !1), b = f(() => a.maximized ?? _.value);
362
- function S() {
363
- let e = !b.value;
364
- _.value = e, o("update:maximized", e);
365
- }
366
- let T = Ee(() => a.draggable && !b.value && !a.fullscreen), E = ye();
367
- U(() => E.value.open, (e) => !e && T.reset());
368
- let D = f(() => s({
369
- status: a.status,
370
- size: a.size,
371
- position: a.position,
372
- scrollBehavior: a.scrollBehavior,
373
- fullscreen: a.fullscreen || b.value,
374
- responsive: a.responsive,
375
- draggable: a.draggable && !b.value,
376
- maximizable: a.maximizable
377
- }));
378
- return (e, t) => (k(), p(d, { to: n.portalTarget ?? "body" }, [u.value ? (k(), p(R(X).Backdrop, {
379
- key: 0,
380
- class: w(D.value.backdrop())
381
- }, null, 8, ["class"])) : m("", !0), y(R(X).Positioner, { class: w(D.value.positioner()) }, {
382
- default: W(() => [y(R(X).Content, C({
383
- ...R(c),
384
- class: D.value.content({ class: w(R(c).class) }),
385
- ...R(T).style.value ? { style: [R(c).style, R(T).style.value] } : {},
386
- ...n.draggable ? { "aria-keyshortcuts": R(fe) } : {}
387
- }, { onKeydown: t[0] ||= (e) => n.draggable && R(T).onKeyDown(e) }), {
388
- default: W(() => [
389
- g("div", C({ class: D.value.header() }, I(n.draggable ? R(T).header : {}, !0)), [
390
- n.icon ? (k(), h("span", {
391
- key: 0,
392
- class: w(D.value.iconBox())
393
- }, [(k(), p(P(n.icon), {
394
- class: w(D.value.icon()),
395
- "aria-hidden": "true"
396
- }, null, 8, ["class"]))], 2)) : m("", !0),
397
- n.maximizable ? (k(), h("button", {
398
- key: 1,
399
- type: "button",
400
- class: w(D.value.maximize()),
401
- "aria-label": b.value ? n.restoreLabel ?? R(i).dialog.restore : n.maximizeLabel ?? R(i).dialog.maximize,
402
- onClick: S
403
- }, [(k(), p(P(b.value ? R(K) : R(oe)), {
404
- class: w(D.value.maximizeIcon()),
405
- "aria-hidden": "true"
406
- }, null, 8, ["class"]))], 10, De)) : m("", !0),
407
- n.closable ? (k(), p(R(X).CloseTrigger, {
408
- key: 2,
409
- class: w(D.value.close()),
410
- "aria-label": n.closeLabel ?? R(i).common.close
411
- }, {
412
- default: W(() => [y(R(q), {
413
- class: w(D.value.closeIcon()),
414
- "aria-hidden": "true"
415
- }, null, 8, ["class"])]),
416
- _: 1
417
- }, 8, ["class", "aria-label"])) : m("", !0)
418
- ], 16),
419
- g("div", { class: w(D.value.body()) }, [
420
- y(R(X).Title, { class: w(D.value.title()) }, {
421
- default: W(() => [v(F(n.title), 1)]),
422
- _: 1
423
- }, 8, ["class"]),
424
- n.description ? (k(), p(R(X).Description, {
425
- key: 0,
426
- class: w(D.value.description())
427
- }, {
428
- default: W(() => [v(F(n.description), 1)]),
429
- _: 1
430
- }, 8, ["class"])) : m("", !0),
431
- N(e.$slots, "default")
432
- ], 2),
433
- e.$slots.footer ? (k(), h("div", {
434
- key: 0,
435
- class: w(D.value.footer())
436
- }, [N(e.$slots, "footer")], 2)) : m("", !0)
437
- ]),
438
- _: 3
439
- }, 16)]),
440
- _: 3
441
- }, 8, ["class"])], 8, ["to"]));
442
- }
443
- }), ke = ["data-level", "data-filled"], Ae = ["id"], je = ["id", "aria-label"], Me = ["data-met"], Ne = /* @__PURE__ */ b({
444
- inheritAttrs: !1,
445
- __name: "PasswordInput",
446
- props: /*@__PURE__*/ S({
447
- size: {},
448
- invalid: {
449
- type: Boolean,
450
- default: void 0
451
- },
452
- success: {
453
- type: Boolean,
454
- default: void 0
455
- },
456
- disabled: {
457
- type: Boolean,
458
- default: void 0
459
- },
460
- readOnly: {
461
- type: Boolean,
462
- default: void 0
463
- },
464
- required: {
465
- type: Boolean,
466
- default: void 0
467
- },
468
- name: {},
469
- defaultVisible: {
470
- type: Boolean,
471
- default: void 0
472
- },
473
- visible: {
474
- type: Boolean,
475
- default: void 0
476
- },
477
- autocomplete: { default: "current-password" },
478
- strength: {
479
- type: Boolean,
480
- default: !1
481
- },
482
- requirements: { default: void 0 },
483
- loading: { type: Boolean },
484
- clearable: { type: Boolean },
485
- clearLabel: {},
486
- defaultValue: { default: void 0 },
487
- classes: {}
488
- }, {
489
- modelValue: {},
490
- modelModifiers: {}
491
- }),
492
- emits: /*@__PURE__*/ S(["update:visible"], ["update:modelValue"]),
493
- setup(a, { emit: o }) {
494
- let s = e(), c = a, l = o, d = t("passwordInput", pe, () => c.classes), _ = B(a, "modelValue"), b = z(), x = f(() => n(b)), S = ve(), T = r(), D = f(() => !!c.invalid || !!S?.value.invalid), O = f(() => !D.value && (!!c.success || T.value.success)), A = f(() => d({
495
- size: c.size,
496
- success: O.value
497
- })), N = ee(), P = j(c.defaultValue), I = f(() => _.value ?? P.value), L = f(() => me(I.value ?? "")), V = f(() => I.value ? s.passwordStrength.levels[L.value] : ""), U = f(() => se(I.value ?? "", c.requirements ?? []));
498
- function ne(e) {
499
- P.value = e.target.value, _.value = P.value;
500
- }
501
- let G = f(() => c.strength || c.requirements?.length ? [
502
- S?.value.ariaDescribedby,
503
- c.strength && `${N}strength`,
504
- c.requirements?.length && `${N}requirements`
505
- ].filter(Boolean).join(" ") : void 0), oe = f(() => !!c.disabled || !!S?.value.disabled), K = f(() => !!c.readOnly || !!S?.value.readOnly), q = H("control");
506
- function ce() {
507
- let e = q.value?.$el.querySelector("input");
508
- e && (ge(e), e.focus());
509
- }
510
- return (e, t) => (k(), p(R(Z).Root, {
511
- class: w(A.value.base({ class: x.value.className })),
512
- style: E(x.value.style),
513
- invalid: a.invalid,
514
- disabled: a.disabled,
515
- "read-only": a.readOnly,
516
- required: a.required,
517
- name: a.name,
518
- "default-visible": a.defaultVisible,
519
- visible: a.visible,
520
- "auto-complete": a.autocomplete,
521
- translations: R(s).passwordInput,
522
- onVisibilityChange: t[0] ||= (e) => l("update:visible", e.visible)
523
- }, {
524
- default: W(() => [
525
- y(R(Z).Control, {
526
- ref_key: "control",
527
- ref: q,
528
- class: w(A.value.control())
529
- }, {
530
- default: W(() => [
531
- y(R(Z).Input, C(x.value.rest, {
532
- "aria-describedby": G.value,
533
- "aria-busy": a.loading || void 0,
534
- value: I.value,
535
- class: A.value.input(),
536
- onInput: ne
537
- }), null, 16, [
538
- "aria-describedby",
539
- "aria-busy",
540
- "value",
541
- "class"
542
- ]),
543
- a.loading || a.clearable || O.value ? (k(), p(i, {
544
- key: 0,
545
- loading: a.loading,
546
- clear: a.clearable && !!I.value && !oe.value && !K.value,
547
- "clear-label": a.clearLabel ?? R(s).field.clear,
548
- success: O.value,
549
- classes: {
550
- spinner: A.value.spinner(),
551
- clear: A.value.clear(),
552
- clearIcon: A.value.clearIcon(),
553
- statusIcon: A.value.statusIcon()
554
- },
555
- onClear: ce
556
- }, null, 8, [
557
- "loading",
558
- "clear",
559
- "clear-label",
560
- "success",
561
- "classes"
562
- ])) : m("", !0),
563
- y(R(Z).VisibilityTrigger, { class: w(A.value.toggle()) }, {
564
- default: W(() => [y(R(Z).Indicator, null, {
565
- fallback: W(() => [y(R(ie), {
566
- class: w(A.value.toggleIcon()),
567
- "aria-hidden": "true"
568
- }, null, 8, ["class"])]),
569
- default: W(() => [y(R(ae), {
570
- class: w(A.value.toggleIcon()),
571
- "aria-hidden": "true"
572
- }, null, 8, ["class"])]),
573
- _: 1
574
- })]),
575
- _: 1
576
- }, 8, ["class"])
577
- ]),
578
- _: 1
579
- }, 8, ["class"]),
580
- a.strength ? (k(), h("div", {
581
- key: 0,
582
- class: w(A.value.strength())
583
- }, [g("div", {
584
- class: w(A.value.meter()),
585
- "aria-hidden": "true"
586
- }, [(k(), h(u, null, M(4, (e) => g("span", {
587
- key: e,
588
- class: w(A.value.bar()),
589
- "data-level": L.value,
590
- "data-filled": e <= L.value || void 0
591
- }, null, 10, ke)), 64))], 2), g("span", {
592
- id: `${R(N)}strength`,
593
- class: w(A.value.strengthText()),
594
- "aria-live": "polite"
595
- }, [V.value ? (k(), h(u, { key: 0 }, [v(F(R(s).passwordStrength.label(V.value)), 1)], 64)) : m("", !0)], 10, Ae)], 2)) : m("", !0),
596
- a.requirements?.length ? (k(), h("ul", {
597
- key: 1,
598
- id: `${R(N)}requirements`,
599
- class: w(A.value.requirements()),
600
- "aria-label": R(s).passwordRequirements.label
601
- }, [(k(!0), h(u, null, M(a.requirements, (e, t) => (k(), h("li", {
602
- key: e.label,
603
- class: w(A.value.requirement()),
604
- "data-met": U.value[t] || void 0
605
- }, [
606
- U.value[t] ? (k(), p(R(te), {
607
- key: 0,
608
- class: w(A.value.requirementIcon()),
609
- "aria-hidden": "true"
610
- }, null, 8, ["class"])) : (k(), p(R(re), {
611
- key: 1,
612
- class: w(A.value.requirementIcon()),
613
- "aria-hidden": "true"
614
- }, null, 8, ["class"])),
615
- v(" " + F(e.label), 1),
616
- g("span", { class: w(A.value.requirementState()) }, F(`: ${U.value[t] ? R(s).passwordRequirements.met : R(s).passwordRequirements.unmet}`), 3)
617
- ], 10, Me))), 128))], 10, je)) : m("", !0)
618
- ]),
619
- _: 1
620
- }, 8, [
621
- "class",
622
- "style",
623
- "invalid",
624
- "disabled",
625
- "read-only",
626
- "required",
627
- "name",
628
- "default-visible",
629
- "visible",
630
- "auto-complete",
631
- "translations"
632
- ]));
633
- }
634
- }), Pe = /* @__PURE__ */ b({
635
- inheritAttrs: !1,
636
- __name: "Tree",
637
- props: {
638
- items: {},
639
- label: {},
640
- selectionMode: { default: "single" },
641
- selectedValue: { default: void 0 },
642
- defaultSelectedValue: { default: void 0 },
643
- expandedValue: { default: void 0 },
644
- defaultExpandedValue: { default: void 0 },
645
- checkable: {
646
- type: Boolean,
647
- default: !1
648
- },
649
- checkedValue: { default: void 0 },
650
- defaultCheckedValue: { default: void 0 },
651
- checkStrictly: {
652
- type: Boolean,
653
- default: !1
654
- },
655
- checkedStrategy: { default: void 0 },
656
- reorderable: {
657
- type: Boolean,
658
- default: !1
659
- },
660
- allowDrop: {},
661
- group: {},
662
- name: {},
663
- loadChildren: {},
664
- dataSource: {},
665
- filter: {
666
- type: Boolean,
667
- default: !1
668
- },
669
- filterValue: { default: void 0 },
670
- filterMode: { default: "filter" },
671
- expandControls: {
672
- type: Boolean,
673
- default: !1
674
- },
675
- showLines: {
676
- type: Boolean,
677
- default: !1
678
- },
679
- emptyText: {},
680
- classes: {}
681
- },
682
- emits: [
683
- "update:selectedValue",
684
- "update:expandedValue",
685
- "update:checkedValue",
686
- "update:filterValue",
687
- "move",
688
- "transfer",
689
- "loadChildren"
690
- ],
691
- setup(n, { expose: r, emit: i }) {
692
- let d = e(), g = n, b = t("tree", _e, () => g.classes), x = i, S = V(), T = z(), E = b(), D = d.tree, O = j(null), P = f(() => O.value?.$el ?? null), I = l(g, x, P);
693
- A(o, I.drag), A(a, {
694
- ...I,
695
- showLines: L(g, "showLines")
696
- });
697
- let ee = f(() => g.label ?? T["aria-label"] ?? d.tree.treeLabel), B = f(() => g.filter || g.filterValue !== void 0), H = f(() => !I.view.value.length && (U.value !== void 0 || !!S.empty || g.group !== void 0)), U = f(() => g.emptyText ?? (I.query.value.trim() ? D.noMatches : g.group === void 0 ? void 0 : d.common.empty)), te = f(() => g.reorderable || I.lazy.value || B.value || g.group !== void 0);
698
- return r({
699
- expandAll: I.expandAll,
700
- collapseAll: I.collapseAll,
701
- invalidate: I.invalidate,
702
- focusNode: I.focusNode
703
- }), (e, t) => (k(), p(R(Q).Root, C({
704
- ref_key: "root",
705
- ref: O,
706
- class: R(E).base({ class: w(R(T).class) }),
707
- style: R(T).style,
708
- collection: R(I).collection.value,
709
- "selection-mode": n.selectionMode,
710
- "selected-value": R(I).selected.value,
711
- "expanded-value": R(I).expanded.value
712
- }, R(I).ownChecks.value ? {} : {
713
- checkedValue: n.checkedValue,
714
- defaultCheckedValue: n.defaultCheckedValue
715
- }, {
716
- translations: { treeLabel: ee.value },
717
- onSelectionChange: t[2] ||= (e) => R(I).onSelectionChange(e.selectedValue),
718
- onExpandedChange: t[3] ||= (e) => R(I).setExpanded(e.expandedValue),
719
- onCheckedChange: t[4] ||= (e) => R(I).ownChecks.value || R(I).onArkCheckedChange(e.checkedValue),
720
- onKeydownCapture: R(I).onKeydown
721
- }), {
722
- default: W(() => [
723
- n.label ? (k(), p(R(Q).Label, {
724
- key: 0,
725
- class: w(R(E).label())
726
- }, {
727
- default: W(() => [v(F(n.label), 1)]),
728
- _: 1
729
- }, 8, ["class"])) : m("", !0),
730
- y(s, {
731
- model: R(I),
732
- filter: n.filter,
733
- "filter-mode": n.filterMode,
734
- "expand-controls": n.expandControls,
735
- classes: n.classes
736
- }, null, 8, [
737
- "model",
738
- "filter",
739
- "filter-mode",
740
- "expand-controls",
741
- "classes"
742
- ]),
743
- y(R(Q).Tree, {
744
- class: w(R(E).tree()),
745
- hidden: H.value || void 0
746
- }, {
747
- default: W(() => [(k(!0), h(u, null, M(R(I).view.value, (t, r) => (k(), p(c, {
748
- key: t.id,
749
- node: t,
750
- "index-path": [r],
751
- checkable: n.checkable
752
- }, _({ _: 2 }, [e.$slots.node ? {
753
- name: "node",
754
- fn: W((t) => [N(e.$slots, "node", C({ ref_for: !0 }, t))]),
755
- key: "0"
756
- } : void 0]), 1032, [
757
- "node",
758
- "index-path",
759
- "checkable"
760
- ]))), 128))]),
761
- _: 3
762
- }, 8, ["class", "hidden"]),
763
- H.value ? (k(), h("div", {
764
- key: 1,
765
- class: w(R(E).empty()),
766
- onDragover: t[0] ||= (...e) => R(I).onEmptyDragOver && R(I).onEmptyDragOver(...e),
767
- onDrop: t[1] ||= (...e) => R(I).onEmptyDrop && R(I).onEmptyDrop(...e)
768
- }, [N(e.$slots, "empty", {}, () => [v(F(U.value), 1)])], 34)) : m("", !0),
769
- te.value ? (k(), h("p", {
770
- key: 2,
771
- role: "status",
772
- class: w(R(E).status())
773
- }, F(R(I).status.value), 3)) : m("", !0)
774
- ]),
775
- _: 3
776
- }, 16, [
777
- "class",
778
- "style",
779
- "collection",
780
- "selection-mode",
781
- "selected-value",
782
- "expanded-value",
783
- "translations",
784
- "onKeydownCapture"
785
- ]));
786
- }
787
- });
788
- //#endregion
789
- export { $ as a, xe as c, Te as i, be as l, Ne as n, we as o, Oe as r, Se as s, Pe as t };