@wirecore/wirelayer-vue 0.7.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 (68) hide show
  1. package/dist/{Checkbox-D175nhKK.js → Checkbox-DS2qfQK1.js} +2 -8
  2. package/dist/ContextMenu-B6agwyf_.js +2311 -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-CeZbSy6K.js} +111 -95
  7. package/dist/Tree-DgHt0P5P.js +807 -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/Checkbox/Checkbox.vue.d.ts +26 -23
  11. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  12. package/dist/components/Combobox/Combobox.vue.d.ts +9 -1
  13. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  14. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
  15. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +17 -1
  16. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  17. package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
  18. package/dist/components/Dialog/DialogContent.vue.d.ts +5 -0
  19. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  20. package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
  21. package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
  22. package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
  23. package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
  24. package/dist/components/Input/Input.vue.d.ts +3 -1
  25. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  26. package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
  27. package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
  28. package/dist/components/Menu/Menu.vue.d.ts +9 -1
  29. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  30. package/dist/components/Menu/state.d.ts +22 -0
  31. package/dist/components/Menu/state.d.ts.map +1 -1
  32. package/dist/components/NativeSelect/NativeSelect.vue.d.ts +26 -17
  33. package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
  34. package/dist/components/NumberInput/NumberInput.vue.d.ts +1 -1
  35. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  36. package/dist/components/Panel/Panel.vue.d.ts +1 -1
  37. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +9 -3
  38. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  39. package/dist/components/Popover/Popover.vue.d.ts +1 -1
  40. package/dist/components/Progress/Progress.vue.d.ts +11 -0
  41. package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
  42. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +24 -25
  43. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  44. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
  45. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
  46. package/dist/components/RadioGroup/context.d.ts +4 -0
  47. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  48. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +23 -22
  49. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  50. package/dist/components/Select/Select.vue.d.ts +9 -1
  51. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  52. package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
  53. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  54. package/dist/data-table.js +4 -4
  55. package/dist/editor.js +1 -1
  56. package/dist/form.js +2 -2
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +2691 -2636
  60. package/dist/pdf.js +3 -3
  61. package/dist/utils/text-field.d.ts +16 -0
  62. package/dist/utils/text-field.d.ts.map +1 -0
  63. package/llms-full.txt +66 -20
  64. package/llms.txt +5 -4
  65. package/package.json +2 -2
  66. package/dist/ContextMenu-BEOEyUa6.js +0 -2235
  67. package/dist/Input-Cn5q0yVE.js +0 -181
  68. package/dist/Tree-fd9LXqgZ.js +0 -792
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t } from "./recipes-BlM9aKyt.js";
2
- import { n } from "./InputStatus-D7kBGlew.js";
2
+ import { r as n } from "./InputStatus-Cgarj-yu.js";
3
3
  import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, onBeforeUnmount as p, openBlock as m, provide as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useAttrs as x, useSlots as S, useTemplateRef as C, watch as w, withCtx as T } from "vue";
4
4
  import { CircleCheck as E, Info as D } from "@lucide/vue";
5
5
  import { field as O, toggletip as k } from "@wirecore/wirelayer-recipes";
@@ -0,0 +1,183 @@
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 { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useAttrs as x, useId as S, useModel as C, useTemplateRef as w } from "vue";
5
+ import { CircleAlert as T, LoaderCircle as E } from "@lucide/vue";
6
+ import { buttonColorKey as D, formatCount as O, iconButton as k, input as A, setTextControlValue as j, spinner as M } from "@wirecore/wirelayer-recipes";
7
+ import { Field as N, useFieldContext as P } from "@ark-ui/vue/field";
8
+ //#region src/components/IconButton/IconButton.vue?vue&type=script&setup=true&lang.ts
9
+ var F = [
10
+ "type",
11
+ "disabled",
12
+ "aria-label"
13
+ ], I = /* @__PURE__ */ d({
14
+ inheritAttrs: !1,
15
+ __name: "IconButton",
16
+ props: {
17
+ icon: {},
18
+ iconProps: {},
19
+ label: {},
20
+ variant: {},
21
+ color: {},
22
+ size: {},
23
+ shape: {},
24
+ disabled: { type: Boolean },
25
+ loading: { type: Boolean },
26
+ type: { default: "button" },
27
+ badge: { type: [Number, Boolean] },
28
+ badgeLabel: {
29
+ type: Function,
30
+ default: (e) => e === null ? "new" : `${e} new`
31
+ },
32
+ classes: {}
33
+ },
34
+ setup(e) {
35
+ let n = e, r = t("iconButton", k, () => n.classes), i = t("spinner", M), a = x(), u = o(() => r({
36
+ variant: n.variant,
37
+ color: D(n.color),
38
+ size: n.size,
39
+ shape: n.shape
40
+ })), d = o(() => typeof n.badge == "number" && n.badge > 0 ? n.badge : 0), f = o(() => d.value ? `${n.label}, ${n.badgeLabel(O(d.value))}` : n.badge === !0 ? `${n.label}, ${n.badgeLabel(null)}` : n.label), h = o(() => n.loading ? {
41
+ "aria-disabled": !0,
42
+ "aria-busy": !0
43
+ } : {});
44
+ function _(e) {
45
+ n.loading ? e.preventDefault() : [a.onClick].flat().forEach((t) => t?.(e));
46
+ }
47
+ return (t, n) => (g(), l("button", p({
48
+ ...b(a),
49
+ class: u.value.base({ class: m(b(a).class) }),
50
+ onClick: _,
51
+ ...h.value
52
+ }, {
53
+ type: e.type,
54
+ disabled: e.disabled,
55
+ "aria-label": f.value
56
+ }), [e.loading ? (g(), s(b(E), {
57
+ key: 0,
58
+ class: m(b(i)().icon({ class: u.value.icon() })),
59
+ "aria-hidden": "true"
60
+ }, null, 8, ["class"])) : (g(), s(v(e.icon), p({ key: 1 }, e.iconProps, {
61
+ class: u.value.icon(),
62
+ "aria-hidden": "true"
63
+ }), null, 16, ["class"])), d.value ? (g(), l("span", {
64
+ key: 2,
65
+ class: m(u.value.badge()),
66
+ "aria-hidden": "true"
67
+ }, y(b(O)(d.value)), 3)) : e.badge === !0 ? (g(), l("span", {
68
+ key: 3,
69
+ class: m(u.value.dot()),
70
+ "aria-hidden": "true"
71
+ }, null, 2)) : c("", !0)], 16, F));
72
+ }
73
+ }), L = ["data-invalid", "data-disabled"], R = ["id"], z = ["id"], B = /* @__PURE__ */ d({
74
+ inheritAttrs: !1,
75
+ __name: "Input",
76
+ props: /*@__PURE__*/ f({
77
+ size: {},
78
+ invalid: { type: Boolean },
79
+ success: { type: Boolean },
80
+ disabled: { type: Boolean },
81
+ loading: { type: Boolean },
82
+ clearable: { type: Boolean },
83
+ clearLabel: {},
84
+ leadingIcon: {},
85
+ prefix: {},
86
+ suffix: {},
87
+ mono: { type: Boolean },
88
+ classes: {}
89
+ }, {
90
+ modelValue: {},
91
+ modelModifiers: {}
92
+ }),
93
+ emits: ["update:modelValue"],
94
+ setup(d, { expose: f }) {
95
+ let E = d, D = t("input", A, () => E.classes), O = e(), k = C(d, "modelValue"), M = x(), F = P(), I = r(), B = o(() => E.invalid || !!F?.value.invalid), V = o(() => !B.value && (E.success || I.value.success)), H = o(() => E.disabled || !!F?.value.disabled), U = o(() => !!M.readonly || M.readonly === "" || !!F?.value.readOnly), W = o(() => D({
96
+ size: E.size,
97
+ invalid: B.value,
98
+ success: V.value,
99
+ disabled: H.value,
100
+ hasIcon: !!E.leadingIcon,
101
+ hasStatusIcon: B.value || V.value || E.loading || E.clearable,
102
+ mono: E.mono
103
+ })), G = o(() => n(M)), K = _(String(M.defaultValue ?? "")), q = o(() => E.clearable && !!(k.value ?? K.value) && !H.value && !U.value), J = S(), Y = S(), X = o(() => [
104
+ F?.value.ariaDescribedby,
105
+ E.prefix && J,
106
+ E.suffix && Y,
107
+ G.value.rest["aria-describedby"]
108
+ ].filter(Boolean).join(" ") || void 0), Z = w("control");
109
+ function Q() {
110
+ let e = Z.value?.$el;
111
+ e && (j(e), e.focus());
112
+ }
113
+ return f(i(() => Z.value?.$el)), (e, t) => (g(), l("div", {
114
+ class: m(W.value.base({ class: G.value.className })),
115
+ style: h(G.value.style),
116
+ "data-invalid": B.value || void 0,
117
+ "data-disabled": H.value || void 0
118
+ }, [
119
+ d.prefix ? (g(), l("span", {
120
+ key: 0,
121
+ id: b(J),
122
+ class: m(W.value.prefix())
123
+ }, y(d.prefix), 11, R)) : c("", !0),
124
+ d.leadingIcon ? (g(), s(v(d.leadingIcon), {
125
+ key: 1,
126
+ class: m(W.value.icon()),
127
+ "aria-hidden": "true"
128
+ }, null, 8, ["class"])) : c("", !0),
129
+ u(b(N).Input, p({
130
+ ref_key: "control",
131
+ ref: Z,
132
+ modelValue: k.value,
133
+ "onUpdate:modelValue": t[0] ||= (e) => k.value = e
134
+ }, G.value.rest, {
135
+ class: W.value.control(),
136
+ disabled: H.value || void 0,
137
+ "aria-invalid": B.value || void 0,
138
+ "aria-describedby": X.value,
139
+ "aria-busy": d.loading || void 0,
140
+ onInput: t[1] ||= (e) => K.value = e.target.value
141
+ }), null, 16, [
142
+ "modelValue",
143
+ "class",
144
+ "disabled",
145
+ "aria-invalid",
146
+ "aria-describedby",
147
+ "aria-busy"
148
+ ]),
149
+ d.loading || d.clearable || V.value ? (g(), s(a, {
150
+ key: 2,
151
+ loading: d.loading,
152
+ clear: q.value,
153
+ "clear-label": d.clearLabel ?? b(O).field.clear,
154
+ success: V.value,
155
+ classes: {
156
+ spinner: W.value.spinner(),
157
+ clear: W.value.clear(),
158
+ clearIcon: W.value.clearIcon(),
159
+ statusIcon: W.value.statusIcon()
160
+ },
161
+ onClear: Q
162
+ }, null, 8, [
163
+ "loading",
164
+ "clear",
165
+ "clear-label",
166
+ "success",
167
+ "classes"
168
+ ])) : c("", !0),
169
+ B.value ? (g(), s(b(T), {
170
+ key: 3,
171
+ class: m(W.value.statusIcon()),
172
+ "aria-hidden": "true"
173
+ }, null, 8, ["class"])) : c("", !0),
174
+ d.suffix ? (g(), l("span", {
175
+ key: 4,
176
+ id: b(Y),
177
+ class: m(W.value.suffix())
178
+ }, y(d.suffix), 11, z)) : c("", !0)
179
+ ], 14, L));
180
+ }
181
+ });
182
+ //#endregion
183
+ export { I as n, B as t };
@@ -10,8 +10,21 @@ function g() {
10
10
  });
11
11
  }
12
12
  //#endregion
13
+ //#region src/utils/text-field.ts
14
+ function _(e) {
15
+ return {
16
+ get element() {
17
+ return e() ?? null;
18
+ },
19
+ focus: (t) => e()?.focus(t),
20
+ blur: () => e()?.blur(),
21
+ select: () => e()?.select(),
22
+ setSelectionRange: (t, n, r) => e()?.setSelectionRange(t, n, r)
23
+ };
24
+ }
25
+ //#endregion
13
26
  //#region src/components/Input/InputStatus.vue?vue&type=script&setup=true&lang.ts
14
- var _ = ["aria-label"], v = /* @__PURE__ */ o({
27
+ var v = ["aria-label"], y = /* @__PURE__ */ o({
15
28
  __name: "InputStatus",
16
29
  props: {
17
30
  loading: { type: Boolean },
@@ -41,7 +54,7 @@ var _ = ["aria-label"], v = /* @__PURE__ */ o({
41
54
  }, [a(u(m), {
42
55
  class: c(t.classes.clearIcon),
43
56
  "aria-hidden": "true"
44
- }, null, 8, ["class"])], 10, _)) : r("", !0),
57
+ }, null, 8, ["class"])], 10, v)) : r("", !0),
45
58
  t.invalid && t.invalidIcon ? (l(), n(u(d), {
46
59
  key: 2,
47
60
  class: c(t.classes.statusIcon),
@@ -55,4 +68,4 @@ var _ = ["aria-label"], v = /* @__PURE__ */ o({
55
68
  }
56
69
  });
57
70
  //#endregion
58
- export { h as n, g as r, v as t };
71
+ export { g as i, _ as n, h as r, y as t };