@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
@@ -1,181 +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 { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, normalizeClass as p, normalizeStyle as m, openBlock as h, ref as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useAttrs as b, useId as x, useModel as S, useTemplateRef as C } from "vue";
5
- import { CircleAlert as w, LoaderCircle as T } from "@lucide/vue";
6
- import { buttonColorKey as E, formatCount as D, iconButton as O, input as k, setTextControlValue as A, spinner as j } from "@wirecore/wirelayer-recipes";
7
- import { Field as M, useFieldContext as N } from "@ark-ui/vue/field";
8
- //#region src/components/IconButton/IconButton.vue?vue&type=script&setup=true&lang.ts
9
- var P = [
10
- "type",
11
- "disabled",
12
- "aria-label"
13
- ], F = /* @__PURE__ */ u({
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", O, () => n.classes), i = t("spinner", j), l = b(), u = a(() => r({
36
- variant: n.variant,
37
- color: E(n.color),
38
- size: n.size,
39
- shape: n.shape
40
- })), d = a(() => typeof n.badge == "number" && n.badge > 0 ? n.badge : 0), m = a(() => d.value ? `${n.label}, ${n.badgeLabel(D(d.value))}` : n.badge === !0 ? `${n.label}, ${n.badgeLabel(null)}` : n.label), g = a(() => n.loading ? {
41
- "aria-disabled": !0,
42
- "aria-busy": !0
43
- } : {});
44
- function x(e) {
45
- n.loading ? e.preventDefault() : [l.onClick].flat().forEach((t) => t?.(e));
46
- }
47
- return (t, n) => (h(), c("button", f({
48
- ...y(l),
49
- class: u.value.base({ class: p(y(l).class) }),
50
- onClick: x,
51
- ...g.value
52
- }, {
53
- type: e.type,
54
- disabled: e.disabled,
55
- "aria-label": m.value
56
- }), [e.loading ? (h(), o(y(T), {
57
- key: 0,
58
- class: p(y(i)().icon({ class: u.value.icon() })),
59
- "aria-hidden": "true"
60
- }, null, 8, ["class"])) : (h(), o(_(e.icon), f({ key: 1 }, e.iconProps, {
61
- class: u.value.icon(),
62
- "aria-hidden": "true"
63
- }), null, 16, ["class"])), d.value ? (h(), c("span", {
64
- key: 2,
65
- class: p(u.value.badge()),
66
- "aria-hidden": "true"
67
- }, v(y(D)(d.value)), 3)) : e.badge === !0 ? (h(), c("span", {
68
- key: 3,
69
- class: p(u.value.dot()),
70
- "aria-hidden": "true"
71
- }, null, 2)) : s("", !0)], 16, P));
72
- }
73
- }), I = ["data-invalid", "data-disabled"], L = ["id"], R = ["id"], z = /* @__PURE__ */ u({
74
- inheritAttrs: !1,
75
- __name: "Input",
76
- props: /*@__PURE__*/ d({
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
- classes: {}
88
- }, {
89
- modelValue: {},
90
- modelModifiers: {}
91
- }),
92
- emits: ["update:modelValue"],
93
- setup(u) {
94
- let d = u, T = t("input", k, () => d.classes), E = e(), D = S(u, "modelValue"), O = b(), j = N(), P = r(), F = a(() => d.invalid || !!j?.value.invalid), z = a(() => !F.value && (d.success || P.value.success)), B = a(() => d.disabled || !!j?.value.disabled), V = a(() => !!O.readonly || O.readonly === "" || !!j?.value.readOnly), H = a(() => T({
95
- size: d.size,
96
- invalid: F.value,
97
- success: z.value,
98
- disabled: B.value,
99
- hasIcon: !!d.leadingIcon,
100
- hasStatusIcon: F.value || z.value || d.loading || d.clearable
101
- })), U = a(() => n(O)), W = g(String(O.defaultValue ?? "")), G = a(() => d.clearable && !!(D.value ?? W.value) && !B.value && !V.value), K = x(), q = x(), J = a(() => [
102
- j?.value.ariaDescribedby,
103
- d.prefix && K,
104
- d.suffix && q,
105
- U.value.rest["aria-describedby"]
106
- ].filter(Boolean).join(" ") || void 0), Y = C("control");
107
- function X() {
108
- let e = Y.value?.$el;
109
- e && (A(e), e.focus());
110
- }
111
- return (e, t) => (h(), c("div", {
112
- class: p(H.value.base({ class: U.value.className })),
113
- style: m(U.value.style),
114
- "data-invalid": F.value || void 0,
115
- "data-disabled": B.value || void 0
116
- }, [
117
- u.prefix ? (h(), c("span", {
118
- key: 0,
119
- id: y(K),
120
- class: p(H.value.prefix())
121
- }, v(u.prefix), 11, L)) : s("", !0),
122
- u.leadingIcon ? (h(), o(_(u.leadingIcon), {
123
- key: 1,
124
- class: p(H.value.icon()),
125
- "aria-hidden": "true"
126
- }, null, 8, ["class"])) : s("", !0),
127
- l(y(M).Input, f({
128
- ref_key: "control",
129
- ref: Y,
130
- modelValue: D.value,
131
- "onUpdate:modelValue": t[0] ||= (e) => D.value = e
132
- }, U.value.rest, {
133
- class: H.value.control(),
134
- disabled: B.value || void 0,
135
- "aria-invalid": F.value || void 0,
136
- "aria-describedby": J.value,
137
- "aria-busy": u.loading || void 0,
138
- onInput: t[1] ||= (e) => W.value = e.target.value
139
- }), null, 16, [
140
- "modelValue",
141
- "class",
142
- "disabled",
143
- "aria-invalid",
144
- "aria-describedby",
145
- "aria-busy"
146
- ]),
147
- u.loading || u.clearable || z.value ? (h(), o(i, {
148
- key: 2,
149
- loading: u.loading,
150
- clear: G.value,
151
- "clear-label": u.clearLabel ?? y(E).field.clear,
152
- success: z.value,
153
- classes: {
154
- spinner: H.value.spinner(),
155
- clear: H.value.clear(),
156
- clearIcon: H.value.clearIcon(),
157
- statusIcon: H.value.statusIcon()
158
- },
159
- onClear: X
160
- }, null, 8, [
161
- "loading",
162
- "clear",
163
- "clear-label",
164
- "success",
165
- "classes"
166
- ])) : s("", !0),
167
- F.value ? (h(), o(y(w), {
168
- key: 3,
169
- class: p(H.value.statusIcon()),
170
- "aria-hidden": "true"
171
- }, null, 8, ["class"])) : s("", !0),
172
- u.suffix ? (h(), c("span", {
173
- key: 4,
174
- id: y(q),
175
- class: p(H.value.suffix())
176
- }, v(u.suffix), 11, R)) : s("", !0)
177
- ], 14, I));
178
- }
179
- });
180
- //#endregion
181
- export { F as n, z as t };