@wirecore/wirelayer-vue 0.14.0 → 0.15.1
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.
- package/dist/Field-xVx6PoU7.js +109 -0
- package/dist/{Input-CH-ntEjv.js → Input-DqFiLzOR.js} +1 -1
- package/dist/InputStatus-BdHg-ibH.js +123 -0
- package/dist/{RecipesProvider-DzlYvZ-I.js → RecipesProvider-z4RUE-Pk.js} +402 -359
- package/dist/{Tree-C8vsEA6K.js → Tree-BD13Var1.js} +9 -9
- package/dist/components/Confirm/confirm.d.ts +10 -2
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/Countdown/Countdown.vue.d.ts +2 -0
- package/dist/components/Countdown/Countdown.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerTimes.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/announcements.d.ts +3 -0
- package/dist/components/DatePicker/announcements.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.vue.d.ts +4 -1
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/components/DialogService/dialogs.d.ts +4 -1
- package/dist/components/DialogService/dialogs.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.vue.d.ts +4 -1
- package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +1 -0
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
- package/dist/components/Sortable/Sortable.vue.d.ts.map +1 -1
- package/dist/components/TagsInput/TagsInput.vue.d.ts +4 -0
- package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +10 -1
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table/ValueInput.vue.d.ts +6 -4
- package/dist/data-table/ValueInput.vue.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +43 -2
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1859 -1785
- package/dist/form.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2896 -2850
- package/dist/pdf.js +2 -2
- package/dist/sources/DataTable.css +1 -0
- package/dist/sources/Dialog.css +1 -1
- package/dist/sources/Drawer.css +1 -1
- package/llms-full.txt +27 -10
- package/package.json +2 -2
- package/dist/Field-DuZfFNFT.js +0 -155
- package/dist/InputStatus-Cgarj-yu.js +0 -71
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { n as e, o as t } from "./recipes-CD2Ibsv9.js";
|
|
2
|
+
import { i as n, r } from "./InputStatus-BdHg-ibH.js";
|
|
3
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, openBlock as p, provide as m, renderSlot as h, toDisplayString as g, unref as _, useAttrs as v, useSlots as y, withCtx as b } from "vue";
|
|
4
|
+
import { CircleCheck as x } from "@lucide/vue";
|
|
5
|
+
import { field as S } from "@wirecore/wirelayer-recipes";
|
|
6
|
+
import { Field as C } from "@ark-ui/vue/field";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/Field/Field.vue
|
|
9
|
+
var w = /* @__PURE__ */ u({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "Field",
|
|
12
|
+
props: {
|
|
13
|
+
label: {},
|
|
14
|
+
helperText: {},
|
|
15
|
+
error: {},
|
|
16
|
+
invalid: { type: Boolean },
|
|
17
|
+
success: {},
|
|
18
|
+
required: { type: Boolean },
|
|
19
|
+
optional: { type: Boolean },
|
|
20
|
+
optionalText: {},
|
|
21
|
+
disabled: { type: Boolean },
|
|
22
|
+
readOnly: { type: Boolean },
|
|
23
|
+
labelHelp: {},
|
|
24
|
+
classes: {}
|
|
25
|
+
},
|
|
26
|
+
setup(u) {
|
|
27
|
+
let w = u, T = y(), E = e("field", S, () => w.classes), D = t(), O = v(), k = E(), A = () => !!w.label || !!T.label, j = () => !!w.error || !!T.error, M = i(() => w.invalid || j()), N = i(() => (!!w.success || !!T.success) && !M.value);
|
|
28
|
+
return m(n, i(() => ({
|
|
29
|
+
success: N.value,
|
|
30
|
+
labelled: A()
|
|
31
|
+
}))), (e, t) => (p(), a(_(C).Root, d({
|
|
32
|
+
..._(O),
|
|
33
|
+
class: _(k).base({ class: f(_(O).class) })
|
|
34
|
+
}, {
|
|
35
|
+
invalid: M.value,
|
|
36
|
+
required: u.required,
|
|
37
|
+
disabled: u.disabled,
|
|
38
|
+
"read-only": u.readOnly
|
|
39
|
+
}), {
|
|
40
|
+
default: b(() => [
|
|
41
|
+
A() && (u.labelHelp || T["label-help"]) ? (p(), s("div", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: f(_(k).labelRow())
|
|
44
|
+
}, [l(_(C).Label, { class: f(_(k).label()) }, {
|
|
45
|
+
default: b(() => [
|
|
46
|
+
h(e.$slots, "label", {}, () => [c(g(u.label), 1)]),
|
|
47
|
+
u.required ? (p(), a(_(C).RequiredIndicator, {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: f(_(k).requiredIndicator())
|
|
50
|
+
}, null, 8, ["class"])) : o("", !0),
|
|
51
|
+
u.optional && !u.required ? (p(), s("span", {
|
|
52
|
+
key: 1,
|
|
53
|
+
class: f(_(k).optionalIndicator())
|
|
54
|
+
}, g(` (${u.optionalText ?? _(D).field.optional})`), 3)) : o("", !0)
|
|
55
|
+
]),
|
|
56
|
+
_: 3
|
|
57
|
+
}, 8, ["class"]), l(r, { label: u.label }, {
|
|
58
|
+
default: b(() => [h(e.$slots, "label-help", {}, () => [c(g(u.labelHelp), 1)])]),
|
|
59
|
+
_: 3
|
|
60
|
+
}, 8, ["label"])], 2)) : A() ? (p(), a(_(C).Label, {
|
|
61
|
+
key: 1,
|
|
62
|
+
class: f(_(k).label())
|
|
63
|
+
}, {
|
|
64
|
+
default: b(() => [
|
|
65
|
+
h(e.$slots, "label", {}, () => [c(g(u.label), 1)]),
|
|
66
|
+
u.required ? (p(), a(_(C).RequiredIndicator, {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: f(_(k).requiredIndicator())
|
|
69
|
+
}, null, 8, ["class"])) : o("", !0),
|
|
70
|
+
u.optional && !u.required ? (p(), s("span", {
|
|
71
|
+
key: 1,
|
|
72
|
+
class: f(_(k).optionalIndicator())
|
|
73
|
+
}, g(` (${u.optionalText ?? _(D).field.optional})`), 3)) : o("", !0)
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 8, ["class"])) : o("", !0),
|
|
77
|
+
h(e.$slots, "default"),
|
|
78
|
+
u.helperText || T["helper-text"] || N.value ? (p(), a(_(C).HelperText, {
|
|
79
|
+
key: 2,
|
|
80
|
+
class: f(_(k).helperText())
|
|
81
|
+
}, {
|
|
82
|
+
default: b(() => [h(e.$slots, "helper-text", {}, () => [c(g(u.helperText), 1)]), N.value ? (p(), s("span", {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: f(_(k).successText())
|
|
85
|
+
}, [l(_(x), {
|
|
86
|
+
class: f(_(k).successIcon()),
|
|
87
|
+
"aria-hidden": "true"
|
|
88
|
+
}, null, 8, ["class"]), h(e.$slots, "success", {}, () => [c(g(u.success), 1)])], 2)) : o("", !0)]),
|
|
89
|
+
_: 3
|
|
90
|
+
}, 8, ["class"])) : o("", !0),
|
|
91
|
+
j() ? (p(), a(_(C).ErrorText, {
|
|
92
|
+
key: 3,
|
|
93
|
+
class: f(_(k).errorText())
|
|
94
|
+
}, {
|
|
95
|
+
default: b(() => [h(e.$slots, "error", {}, () => [c(g(u.error), 1)])]),
|
|
96
|
+
_: 3
|
|
97
|
+
}, 8, ["class"])) : o("", !0)
|
|
98
|
+
]),
|
|
99
|
+
_: 3
|
|
100
|
+
}, 16, [
|
|
101
|
+
"invalid",
|
|
102
|
+
"required",
|
|
103
|
+
"disabled",
|
|
104
|
+
"read-only"
|
|
105
|
+
]));
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
//#endregion
|
|
109
|
+
export { w as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, o as t } from "./recipes-CD2Ibsv9.js";
|
|
2
2
|
import { t as n } from "./attrs-KNjeRUCf.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as r, n as i, t as a } from "./InputStatus-BdHg-ibH.js";
|
|
4
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
5
|
import { CircleAlert as T, LoaderCircle as E } from "@lucide/vue";
|
|
6
6
|
import { buttonColorKey as D, formatCount as O, iconButton as k, input as A, setTextControlValue as j, spinner as M } from "@wirecore/wirelayer-recipes";
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { n as e, o as t } from "./recipes-CD2Ibsv9.js";
|
|
2
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, inject as d, mergeProps as f, normalizeClass as p, onBeforeUnmount as m, openBlock as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useAttrs as x, useTemplateRef as S, watch as C } from "vue";
|
|
3
|
+
import { CircleAlert as w, CircleCheck as T, Info as E, LoaderCircle as D, X as O } from "@lucide/vue";
|
|
4
|
+
import { toggletip as k } from "@wirecore/wirelayer-recipes";
|
|
5
|
+
//#region src/components/Field/context.ts
|
|
6
|
+
var A = Symbol("FieldStatus");
|
|
7
|
+
function j() {
|
|
8
|
+
let e = d(A, null);
|
|
9
|
+
return r(() => e?.value ?? {
|
|
10
|
+
success: !1,
|
|
11
|
+
labelled: !1
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/Toggletip/Toggletip.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
+
var M = ["aria-label", "aria-expanded"], N = { role: "status" }, P = /* @__PURE__ */ u({
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
__name: "Toggletip",
|
|
19
|
+
props: {
|
|
20
|
+
content: {},
|
|
21
|
+
label: {},
|
|
22
|
+
triggerLabel: {},
|
|
23
|
+
open: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
icon: {},
|
|
28
|
+
classes: {}
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:open"],
|
|
31
|
+
setup(n, { emit: l }) {
|
|
32
|
+
let u = n, d = e("toggletip", k, () => u.classes), w = l, T = x(), D = t(), O = d(), A = g(!1), j = r(() => u.open ?? A.value), P = S("root"), F = r(() => u.triggerLabel ?? (u.label ? D.toggletip.labelFor(u.label) : D.toggletip.label));
|
|
33
|
+
function I(e) {
|
|
34
|
+
A.value = e, w("update:open", e);
|
|
35
|
+
}
|
|
36
|
+
let L = (e) => {
|
|
37
|
+
e.key === "Escape" && (e.stopPropagation(), I(!1));
|
|
38
|
+
}, R = (e) => {
|
|
39
|
+
P.value?.contains(e.target) || I(!1);
|
|
40
|
+
}, z = (e) => {
|
|
41
|
+
typeof document < "u" && (e ? (document.addEventListener("keydown", L), document.addEventListener("pointerdown", R)) : (document.removeEventListener("keydown", L), document.removeEventListener("pointerdown", R)));
|
|
42
|
+
};
|
|
43
|
+
return C(j, z), m(() => z(!1)), (e, t) => (h(), o("span", f({
|
|
44
|
+
ref_key: "root",
|
|
45
|
+
ref: P
|
|
46
|
+
}, {
|
|
47
|
+
...b(T),
|
|
48
|
+
class: b(O).base({ class: p(b(T).class) })
|
|
49
|
+
}), [s("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
class: p(b(O).trigger()),
|
|
52
|
+
"aria-label": F.value,
|
|
53
|
+
"aria-expanded": j.value,
|
|
54
|
+
onClick: t[0] ||= (e) => I(!j.value)
|
|
55
|
+
}, [(h(), i(v(n.icon ?? b(E)), {
|
|
56
|
+
class: p(b(O).icon()),
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
}, null, 8, ["class"]))], 10, M), s("span", N, [j.value ? (h(), o("span", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: p(b(O).bubble())
|
|
61
|
+
}, [_(e.$slots, "default", {}, () => [c(y(n.content), 1)])], 2)) : a("", !0)])], 16));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/utils/text-field.ts
|
|
66
|
+
function F(e) {
|
|
67
|
+
return {
|
|
68
|
+
get element() {
|
|
69
|
+
return e() ?? null;
|
|
70
|
+
},
|
|
71
|
+
focus: (t) => e()?.focus(t),
|
|
72
|
+
blur: () => e()?.blur(),
|
|
73
|
+
select: () => e()?.select(),
|
|
74
|
+
setSelectionRange: (t, n, r) => e()?.setSelectionRange(t, n, r)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/Input/InputStatus.vue?vue&type=script&setup=true&lang.ts
|
|
79
|
+
var I = ["aria-label"], L = /* @__PURE__ */ u({
|
|
80
|
+
__name: "InputStatus",
|
|
81
|
+
props: {
|
|
82
|
+
loading: { type: Boolean },
|
|
83
|
+
clear: { type: Boolean },
|
|
84
|
+
clearLabel: {},
|
|
85
|
+
invalid: { type: Boolean },
|
|
86
|
+
success: { type: Boolean },
|
|
87
|
+
invalidIcon: { type: Boolean },
|
|
88
|
+
classes: {}
|
|
89
|
+
},
|
|
90
|
+
emits: ["clear"],
|
|
91
|
+
setup(e, { emit: t }) {
|
|
92
|
+
let r = t;
|
|
93
|
+
return (t, s) => (h(), o(n, null, [
|
|
94
|
+
e.loading ? (h(), i(b(D), {
|
|
95
|
+
key: 0,
|
|
96
|
+
class: p(e.classes.spinner),
|
|
97
|
+
"aria-hidden": "true"
|
|
98
|
+
}, null, 8, ["class"])) : a("", !0),
|
|
99
|
+
e.clear ? (h(), o("button", {
|
|
100
|
+
key: 1,
|
|
101
|
+
type: "button",
|
|
102
|
+
tabindex: "-1",
|
|
103
|
+
class: p(e.classes.clear),
|
|
104
|
+
"aria-label": e.clearLabel,
|
|
105
|
+
onClick: s[0] ||= (e) => r("clear")
|
|
106
|
+
}, [l(b(O), {
|
|
107
|
+
class: p(e.classes.clearIcon),
|
|
108
|
+
"aria-hidden": "true"
|
|
109
|
+
}, null, 8, ["class"])], 10, I)) : a("", !0),
|
|
110
|
+
e.invalid && e.invalidIcon ? (h(), i(b(w), {
|
|
111
|
+
key: 2,
|
|
112
|
+
class: p(e.classes.statusIcon),
|
|
113
|
+
"aria-hidden": "true"
|
|
114
|
+
}, null, 8, ["class"])) : e.success && !e.invalid ? (h(), i(b(T), {
|
|
115
|
+
key: 3,
|
|
116
|
+
class: p(e.classes.statusIcon),
|
|
117
|
+
"aria-hidden": "true"
|
|
118
|
+
}, null, 8, ["class"])) : a("", !0)
|
|
119
|
+
], 64));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
export { j as a, A as i, F as n, P as r, L as t };
|