sakana-element 2.4.2 → 2.5.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/README.md +26 -2
- package/dist/es/Alert-Cq5F0XNt.js +57 -0
- package/dist/es/Avatar-CbgoH75Q.js +5 -0
- package/dist/es/Badge-BVu3hO8V.js +7 -0
- package/dist/es/Breadcrumb-Bh5y4LbC.js +6 -0
- package/dist/es/Button-B1wRI6I7.js +28 -0
- package/dist/es/Card-VMxMFix8.js +8 -0
- package/dist/es/Carousel-QnDHp3Ka.js +11 -0
- package/dist/es/ChatBubble-DYao4l85.js +5 -0
- package/dist/es/Checkbox-BbLzAqK2.js +228 -0
- package/dist/es/Collapse-BkKmhGQf.js +11 -0
- package/dist/es/Collapsible-B56M9eUW.js +12 -0
- package/dist/es/Command-CORaZKsJ.js +45 -0
- package/dist/es/ConfigProvider-CGLQ9b8M.js +35 -0
- package/dist/es/Diff-gDYKT1cl.js +17 -0
- package/dist/es/Divider-bI4lEaol.js +5 -0
- package/dist/es/Drawer-AnXxT-V6.js +6 -0
- package/dist/es/Dropdown-80RoE7gX.js +115 -0
- package/dist/es/FileInput-B6CyElTd.js +113 -0
- package/dist/es/Filter-CtIs_iO4.js +13 -0
- package/dist/es/Icon-hbRhI1iH.js +3 -0
- package/dist/es/Indicator-Bs6f41iJ.js +5 -0
- package/dist/es/Input-DJsDXAG1.js +8 -0
- package/dist/es/Kbd-DZf70Cdz.js +5 -0
- package/dist/es/Link-CLXoAvDl.js +5 -0
- package/dist/es/Loading-BHzOi8J-.js +27 -0
- package/dist/es/Message-DOxtRo8V.js +51 -0
- package/dist/es/Notification-F5UfnGWs.js +22 -0
- package/dist/es/Pixelate-DFpR42b2.js +12 -0
- package/dist/es/Popconfirm-C1LNG9db.js +8 -0
- package/dist/es/Progress-CDHJJUVL.js +6 -0
- package/dist/es/Radio-HMaWtyx9.js +11 -0
- package/dist/es/Resizable-DSYUZwLE.js +59 -0
- package/dist/es/Select-DaBVMoMB.js +31 -0
- package/dist/es/Skeleton-4hCbgDOF.js +7 -0
- package/dist/es/Switch-BCTrn4hn.js +11 -0
- package/dist/es/Table-B5twhEZC.js +5 -0
- package/dist/es/Tooltip-CDjXpGHn.js +4 -0
- package/dist/es/Validator-DoWa9KfA.js +16 -0
- package/dist/es/index.js +41 -140
- package/dist/index.css +2 -1
- package/dist/theme/Alert.css +1 -295
- package/dist/theme/Avatar.css +1 -86
- package/dist/theme/Badge.css +1 -214
- package/dist/theme/Breadcrumb.css +1 -192
- package/dist/theme/Button.css +1 -1570
- package/dist/theme/Card.css +1 -347
- package/dist/theme/Carousel.css +1 -0
- package/dist/theme/ChatBubble.css +1 -218
- package/dist/theme/Checkbox.css +1 -604
- package/dist/theme/Collapse.css +1 -764
- package/dist/theme/Collapsible.css +1 -0
- package/dist/theme/Command.css +1 -0
- package/dist/theme/Diff.css +1 -110
- package/dist/theme/Divider.css +1 -150
- package/dist/theme/Drawer.css +1 -206
- package/dist/theme/Dropdown.css +1 -471
- package/dist/theme/FileInput.css +1 -397
- package/dist/theme/Filter.css +1 -598
- package/dist/theme/Indicator.css +1 -159
- package/dist/theme/Input.css +1 -647
- package/dist/theme/Kbd.css +1 -104
- package/dist/theme/Link.css +1 -69
- package/dist/theme/Loading.css +1 -266
- package/dist/theme/Message.css +1 -565
- package/dist/theme/Notification.css +1 -316
- package/dist/theme/Popconfirm.css +1 -46
- package/dist/theme/Progress.css +1 -278
- package/dist/theme/Radio.css +1 -492
- package/dist/theme/Resizable.css +1 -95
- package/dist/theme/Select.css +1 -584
- package/dist/theme/Skeleton.css +1 -192
- package/dist/theme/Switch.css +1 -323
- package/dist/theme/Table.css +1 -680
- package/dist/theme/Validator.css +1 -25
- package/dist/theme/index.css +1 -341
- package/dist/types/components/Badge/types.d.ts +2 -0
- package/dist/types/components/Carousel/constants.d.ts +6 -0
- package/dist/types/components/Carousel/index.d.ts +77 -0
- package/dist/types/components/Carousel/types.d.ts +27 -0
- package/dist/types/components/Collapsible/constants.d.ts +6 -0
- package/dist/types/components/Collapsible/index.d.ts +85 -0
- package/dist/types/components/Collapsible/types.d.ts +22 -0
- package/dist/types/components/Command/constants.d.ts +4 -0
- package/dist/types/components/Command/index.d.ts +216 -0
- package/dist/types/components/Command/types.d.ts +59 -0
- package/dist/types/components/Validator/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/umd/index.css +2 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +1255 -5
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +15 -3
- package/dist/es/Alert-DdAShH-x.js +0 -19
- package/dist/es/Avatar-BGTH7x40.js +0 -9
- package/dist/es/Badge-CYZ55qNe.js +0 -14
- package/dist/es/Breadcrumb-BTWTtzrN.js +0 -15
- package/dist/es/Button-GsSCWg5x.js +0 -24
- package/dist/es/Card-BhgzwQqo.js +0 -16
- package/dist/es/ChatBubble-4F481Agj.js +0 -9
- package/dist/es/Checkbox-C7vZGSTh.js +0 -51
- package/dist/es/Collapse-CbcSQig5.js +0 -53
- package/dist/es/ConfigProvider-K1UzjlRm.js +0 -45
- package/dist/es/Diff-B747pgwb.js +0 -64
- package/dist/es/Divider-BSu_1-AU.js +0 -9
- package/dist/es/Drawer-I2lCgyba.js +0 -40
- package/dist/es/Dropdown-B0J_c8Wv.js +0 -104
- package/dist/es/FileInput-CFg1wpsH.js +0 -33
- package/dist/es/Filter-nA8j-62U.js +0 -40
- package/dist/es/Form-C1b8Igns.js +0 -123
- package/dist/es/Icon-BulvH9Wm.js +0 -27
- package/dist/es/Indicator-BbW4iUkh.js +0 -9
- package/dist/es/Input-BUHFulIW.js +0 -42
- package/dist/es/Kbd-CeP2wkdE.js +0 -13
- package/dist/es/Link-Dks2bXo8.js +0 -11
- package/dist/es/Loading-DoBtVGWo.js +0 -92
- package/dist/es/Message-Ba_P4Wvy.js +0 -152
- package/dist/es/Notification-DzG8dLuk.js +0 -69
- package/dist/es/Overlay-DeyTycv0.js +0 -12
- package/dist/es/Pixelate-B21HKbSE.js +0 -39
- package/dist/es/Popconfirm-BqN3JxJ_.js +0 -23
- package/dist/es/Progress--6EJjbbM.js +0 -12
- package/dist/es/Radio-CrdrvrFH.js +0 -33
- package/dist/es/Resizable-By3ijQf0.js +0 -151
- package/dist/es/Select-Cq1Ucs_U.js +0 -133
- package/dist/es/Skeleton-ChCVgMSk.js +0 -15
- package/dist/es/Switch-DURmSH-T.js +0 -34
- package/dist/es/Table-BE2f9u65.js +0 -10
- package/dist/es/Tooltip-DR4Mc5Fh.js +0 -74
- package/dist/es/Validator-BYn72MYn.js +0 -40
- package/dist/es/hooks-dJGu-5DG.js +0 -170
- package/dist/es/utils-CnCdZsHG.js +0 -155
- package/dist/es/vendor-eombfMkP.js +0 -1351
- package/dist/theme/Form.css +0 -83
- package/dist/theme/Icon.css +0 -168
- package/dist/theme/Overlay.css +0 -12
- package/dist/theme/Tooltip.css +0 -235
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { c as e, r as l, w as a } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as i, useSlots as t, inject as u, computed as o, createElementBlock as s, openBlock as r, normalizeStyle as d, normalizeClass as n, createElementVNode as v, createCommentVNode as c, unref as m, renderSlot as p, createTextVNode as f, toDisplayString as b, provide as y, createVNode as h, Fragment as k, renderList as x, createBlock as V } from "vue";
|
|
3
|
-
import { P as g } from "./Icon-BulvH9Wm.js";
|
|
4
|
-
import { u as _ } from "./hooks-dJGu-5DG.js";
|
|
5
|
-
const A = Symbol("filterContext"), z = { "active-color": "color", "active-border-color": "dark" }, F = ["type", "aria-checked", "id", "name", "disabled", "checked"], P = { key: 0, class: "px-filter-item__label" }, $ = i({ name: "PxFilterItem", inheritAttrs: false, __name: "FilterItem", props: { value: {}, label: {}, disabled: { type: Boolean } }, setup(a2) {
|
|
6
|
-
const i2 = a2, y2 = t(), h2 = u(A, void 0), k2 = !!h2, x2 = _().value, V2 = o((() => (h2 == null ? void 0 : h2.multiple.value) ?? false)), g2 = o((() => {
|
|
7
|
-
if (!k2) return false;
|
|
8
|
-
const e2 = h2.modelValue.value;
|
|
9
|
-
return V2.value ? Array.isArray(e2) && e2.includes(i2.value) : e2 === i2.value;
|
|
10
|
-
})), $2 = o((() => !!k2 && !V2.value && h2.hasSelection.value && !g2.value)), j2 = o((() => !!(h2 == null ? void 0 : h2.disabled.value) || (i2.disabled ?? false))), B2 = o((() => h2 == null ? void 0 : h2.size.value)), C2 = o((() => h2 == null ? void 0 : h2.type.value)), E = o((() => h2 == null ? void 0 : h2.color.value)), I = o((() => h2 == null ? void 0 : h2.name.value)), S = o((() => {
|
|
11
|
-
const a3 = E.value;
|
|
12
|
-
if (!a3) return {};
|
|
13
|
-
const i3 = e(a3);
|
|
14
|
-
return l(i3, "px-filter-item", z);
|
|
15
|
-
}));
|
|
16
|
-
function w() {
|
|
17
|
-
!j2.value && k2 && (V2.value ? h2.changeEvent(i2.value) : h2.changeEvent(g2.value ? void 0 : i2.value));
|
|
18
|
-
}
|
|
19
|
-
return (e2, l2) => (r(), s("div", { class: n(["px-filter-item", { [`px-filter-item--${B2.value}`]: B2.value, [`px-filter-item--${C2.value}`]: C2.value, "is-active": g2.value, "is-disabled": j2.value, "is-hidden": $2.value }]), style: d(S.value), onClick: w }, [v("input", { class: "px-filter-item__original", type: V2.value ? "checkbox" : "radio", "aria-checked": g2.value, id: m(x2), name: I.value, disabled: j2.value, checked: g2.value }, null, 8, F), e2.label || m(y2).default ? (r(), s("span", P, [p(e2.$slots, "default", {}, (() => [f(b(e2.label), 1)]))])) : c("", true)], 6));
|
|
20
|
-
} }), j = ["role"], B = a(i({ name: "PxFilter", __name: "Filter", props: { modelValue: {}, options: {}, name: {}, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, multiple: { type: Boolean, default: false } }, emits: ["update:modelValue", "change"], setup(e2, { emit: l2 }) {
|
|
21
|
-
const a2 = e2, i2 = l2, t2 = o((() => a2.multiple ? Array.isArray(a2.modelValue) && a2.modelValue.length > 0 : void 0 !== a2.modelValue)), u2 = (e3) => {
|
|
22
|
-
if (a2.multiple) {
|
|
23
|
-
const l3 = Array.isArray(a2.modelValue) ? [...a2.modelValue] : [];
|
|
24
|
-
if (void 0 === e3) return i2("update:modelValue", []), void i2("change", []);
|
|
25
|
-
const t3 = l3.indexOf(e3);
|
|
26
|
-
t3 >= 0 ? l3.splice(t3, 1) : l3.push(e3), i2("update:modelValue", l3), i2("change", l3);
|
|
27
|
-
} else i2("update:modelValue", e3), i2("change", e3);
|
|
28
|
-
};
|
|
29
|
-
function d2() {
|
|
30
|
-
u2(void 0);
|
|
31
|
-
}
|
|
32
|
-
return y(A, { modelValue: o((() => a2.modelValue)), disabled: o((() => a2.disabled)), size: o((() => a2.size)), type: o((() => a2.type)), color: o((() => a2.color)), name: o((() => a2.name)), multiple: o((() => a2.multiple)), hasSelection: t2, changeEvent: u2 }), (e3, l3) => {
|
|
33
|
-
var _a;
|
|
34
|
-
return r(), s("div", { class: n(["px-filter", { "is-collapsed": !e3.multiple && t2.value }]), role: e3.multiple ? "group" : "radiogroup" }, [t2.value ? (r(), s("div", { key: 0, class: "px-filter__reset", onClick: d2 }, [h(g, { icon: "close" })])) : c("", true), ((_a = e3.options) == null ? void 0 : _a.length) ? (r(true), s(k, { key: 1 }, x(e3.options, ((e4) => (r(), V($, { key: e4.value, value: e4.value, label: e4.label, disabled: e4.disabled }, null, 8, ["value", "label", "disabled"])))), 128)) : p(e3.$slots, "default", { key: 2 })], 10, j);
|
|
35
|
-
};
|
|
36
|
-
} })), C = a($);
|
|
37
|
-
export {
|
|
38
|
-
B as P,
|
|
39
|
-
C as a
|
|
40
|
-
};
|
package/dist/es/Form-C1b8Igns.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { inject as e, defineComponent as s, reactive as r, toRefs as t, provide as a, createElementBlock as l, openBlock as o, normalizeClass as i, renderSlot as u, useCssVars as n, computed as d, useSlots as c, ref as p, onMounted as m, onUnmounted as v, normalizeStyle as f, unref as h, createBlock as b, createCommentVNode as g, createElementVNode as y, resolveDynamicComponent as x, withCtx as _, createTextVNode as q, toDisplayString as P, nextTick as k } from "vue";
|
|
2
|
-
import { d as F, _ as I, w } from "./utils-CnCdZsHG.js";
|
|
3
|
-
import { f as j, b as $, s as B, c as A, d as S, i as W, e as M, g as V, h as z, j as C, k as O, l as T, n as D } from "./vendor-eombfMkP.js";
|
|
4
|
-
import { u as E } from "./hooks-dJGu-5DG.js";
|
|
5
|
-
import { z as R } from "zod";
|
|
6
|
-
import { P as G } from "./Icon-BulvH9Wm.js";
|
|
7
|
-
const H = Symbol("formContext"), J = Symbol("formItemContext");
|
|
8
|
-
function K() {
|
|
9
|
-
return { form: e(H, void 0), formItem: e(J, void 0) };
|
|
10
|
-
}
|
|
11
|
-
const L = s({ name: "PxForm", __name: "Form", props: { model: {}, rules: {}, disabled: { type: Boolean }, inline: { type: Boolean }, statusIcon: { type: Boolean }, labelWidth: {}, labelPosition: { default: "right" }, labelSuffix: {}, showMessage: { type: Boolean, default: true }, hideRequiredAsterisk: { type: Boolean, default: false }, requiredAsteriskPosition: { default: "left" } }, emits: ["validate"], setup(e2, { expose: s2, emit: n2 }) {
|
|
12
|
-
const d2 = n2, c2 = [], p2 = async (e3, s3) => {
|
|
13
|
-
try {
|
|
14
|
-
const r2 = await (async function(e4 = []) {
|
|
15
|
-
let s4 = {};
|
|
16
|
-
for (const r3 of e4) try {
|
|
17
|
-
await r3.validate("");
|
|
18
|
-
} catch (e5) {
|
|
19
|
-
s4 = { ...s4, ...e5 };
|
|
20
|
-
}
|
|
21
|
-
return !B(Object.keys(s4)) || Promise.reject(s4);
|
|
22
|
-
})(m2(c2, e3 ?? []));
|
|
23
|
-
return true === r2 && (s3 == null ? void 0 : s3(r2)), r2;
|
|
24
|
-
} catch (e4) {
|
|
25
|
-
if (e4 instanceof Error) throw e4;
|
|
26
|
-
const r2 = e4;
|
|
27
|
-
return s3 == null ? void 0 : s3(false, r2), Promise.reject(r2);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
function m2(e3, s3) {
|
|
31
|
-
return B(s3) ? $(e3, ((e4) => A(s3, e4.prop))) : e3;
|
|
32
|
-
}
|
|
33
|
-
const v2 = r({ ...t(e2), emits: d2, addField: (e3) => {
|
|
34
|
-
e3.prop && c2.push(e3);
|
|
35
|
-
}, removeField: (e3) => {
|
|
36
|
-
e3.prop && c2.splice(c2.indexOf(e3), 1);
|
|
37
|
-
} });
|
|
38
|
-
return a(H, v2), s2({ validate: async (e3) => p2([], e3), validateField: p2, resetFields: (e3) => {
|
|
39
|
-
j(m2(c2, e3 ?? []), ((e4) => e4.resetField()));
|
|
40
|
-
}, clearValidate: (e3) => {
|
|
41
|
-
j(m2(c2, e3 ?? []), ((e4) => e4.clearValidate()));
|
|
42
|
-
} }), (e3, s3) => (o(), l("form", { class: i(["px-form", { "is-inline": e3.inline }]) }, [u(e3.$slots, "default")], 2));
|
|
43
|
-
} }), N = ["aria-describedby"], Q = { class: "px-form-item__input-wrap" }, U = ["id"], X = I(s({ name: "PxFormItem", __name: "FormItem", props: { prop: {}, label: {}, for: {}, labelWidth: {}, disabled: { type: Boolean }, required: { type: Boolean, default: void 0 }, showMessage: { type: Boolean, default: true }, error: {}, rules: {} }, setup(s2, { expose: I2 }) {
|
|
44
|
-
n(((e2) => ({ ac9c6e38: le.value })));
|
|
45
|
-
const w2 = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), j2 = s2, K2 = c(), L2 = e(H), X2 = E().value, Y2 = p("init"), Z2 = p(""), ee = p([]), se = (e2) => {
|
|
46
|
-
return e2 && j2.prop && !W(V(e2, j2.prop)) ? (s3 = j2.prop, (T(s3) ? s3 : s3.split(".")).some(((e3) => w2.has(e3))) ? (F("PxFormItem", `Prop path "${j2.prop}" contains a dangerous segment and was rejected.`), null) : V(e2, j2.prop)) : null;
|
|
47
|
-
var s3;
|
|
48
|
-
}, re = d((() => !(!j2.label && !K2.label))), te = d((() => j2.for || (ee.value.length ? ee.value[0] : ""))), ae = d((() => `${j2.label ?? ""}${(L2 == null ? void 0 : L2.labelSuffix) ?? ""}`)), le = d((() => {
|
|
49
|
-
const e2 = (e3) => z(e3) ? `${e3}px` : C(e3, "px") ? e3 : `${e3}px`;
|
|
50
|
-
return j2.labelWidth ? e2(j2.labelWidth) : (L2 == null ? void 0 : L2.labelWidth) ? e2(L2 == null ? void 0 : L2.labelWidth) : "150px";
|
|
51
|
-
})), oe = d((() => (L2 == null ? void 0 : L2.labelPosition) ?? "right")), ie = d((() => "top" === oe.value)), ue = d((() => ie.value ? { width: "100%", textAlign: "left", padding: "0 0 8px 0" } : { textAlign: "left" === oe.value ? "left" : "right" })), ne = d((() => (L2 == null ? void 0 : L2.disabled) || j2.disabled)), de = d((() => {
|
|
52
|
-
const e2 = L2 == null ? void 0 : L2.model;
|
|
53
|
-
return se(e2);
|
|
54
|
-
})), ce = d((() => j2.prop ? S(j2.prop) ? j2.prop : j2.prop.join(".") : "")), pe = d((() => {
|
|
55
|
-
const { required: e2 } = j2, s3 = [];
|
|
56
|
-
j2.rules && s3.push(...j2.rules);
|
|
57
|
-
const r2 = L2 == null ? void 0 : L2.rules;
|
|
58
|
-
if (r2 && j2.prop) {
|
|
59
|
-
const e3 = se(r2);
|
|
60
|
-
e3 && s3.push(...e3);
|
|
61
|
-
}
|
|
62
|
-
if (!W(e2)) {
|
|
63
|
-
const r3 = $(M(s3, ((e3, s4) => [e3, s4])), ((e3) => A(D(e3[0]), "required")));
|
|
64
|
-
if (B(r3)) for (const t2 of r3) {
|
|
65
|
-
const [r4, a2] = t2;
|
|
66
|
-
r4.required !== e2 && (s3[a2] = { ...r4, required: e2 });
|
|
67
|
-
}
|
|
68
|
-
else s3.push({ required: e2 });
|
|
69
|
-
}
|
|
70
|
-
return s3;
|
|
71
|
-
})), me = d((() => W(j2.required) ? B($(pe.value, ((e2) => e2.required))) > 0 : j2.required));
|
|
72
|
-
let ve = null, fe = false;
|
|
73
|
-
const he = async (e2, s3) => {
|
|
74
|
-
if (fe || !j2.prop || ne.value) return false;
|
|
75
|
-
if (!Y2.value) return s3 == null ? void 0 : s3(false), false;
|
|
76
|
-
const r2 = (function(e3) {
|
|
77
|
-
const s4 = pe.value;
|
|
78
|
-
return s4 ? $(s4, ((s5) => !(s5 == null ? void 0 : s5.trigger) || !e3 || (T(s5.trigger) ? s5.trigger.includes(e3) : s5.trigger === e3))) : [];
|
|
79
|
-
})(e2);
|
|
80
|
-
return B(r2) ? (Y2.value = "validating", (async function(e3) {
|
|
81
|
-
var _a;
|
|
82
|
-
const s4 = de.value;
|
|
83
|
-
for (const r3 of e3) {
|
|
84
|
-
let e4 = r3.schema ?? null;
|
|
85
|
-
if (!e4 && r3.required && (e4 = R.string({ message: r3.message ?? "This field is required" }).min(1, r3.message ?? "This field is required")), !e4) continue;
|
|
86
|
-
const t2 = e4.safeParse(s4);
|
|
87
|
-
if (!t2.success) {
|
|
88
|
-
const e5 = r3.message ?? ((_a = t2.error.issues[0]) == null ? void 0 : _a.message) ?? "Validation failed";
|
|
89
|
-
Y2.value = "error", Z2.value = e5;
|
|
90
|
-
const s5 = { errors: [{ field: ce.value, message: e5 }], fields: { [ce.value]: [{ message: e5 }] } };
|
|
91
|
-
return L2 == null ? void 0 : L2.emits("validate", j2, false, e5), Promise.reject(s5);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return Y2.value = "success", L2 == null ? void 0 : L2.emits("validate", j2, true, ""), true;
|
|
95
|
-
})(r2).then((() => (s3 == null ? void 0 : s3(true), true))).catch(((e3) => {
|
|
96
|
-
const { fields: r3 } = e3;
|
|
97
|
-
return s3 == null ? void 0 : s3(false, r3), Promise.reject(r3);
|
|
98
|
-
}))) : (s3 == null ? void 0 : s3(true), true);
|
|
99
|
-
}, be = () => {
|
|
100
|
-
const e2 = L2 == null ? void 0 : L2.model;
|
|
101
|
-
e2 && ce.value && !W(V(e2, ce.value)) && (fe = true, e2[ce.value] = O(ve)), k((() => ge()));
|
|
102
|
-
}, ge = () => {
|
|
103
|
-
Y2.value = "init", Z2.value = "", fe = false;
|
|
104
|
-
}, ye = r({ ...t(j2), disabled: ne.value, validate: he, resetField: be, clearValidate: ge, addInputId: (e2) => {
|
|
105
|
-
A(ee.value, e2) || ee.value.push(e2);
|
|
106
|
-
}, removeInputId: (e2) => {
|
|
107
|
-
ee.value = $(ee.value, ((s3) => s3 !== e2));
|
|
108
|
-
} });
|
|
109
|
-
return m((() => {
|
|
110
|
-
j2.prop && (L2 == null ? void 0 : L2.addField(ye), ve = de.value);
|
|
111
|
-
})), v((() => {
|
|
112
|
-
j2.prop && (L2 == null ? void 0 : L2.removeField(ye));
|
|
113
|
-
})), a(J, ye), I2({ validateMessage: Z2, validateStatus: Y2, validate: he, resetField: be, clearValidate: ge }), (e2, s3) => {
|
|
114
|
-
var _a, _b, _c, _d, _e;
|
|
115
|
-
return o(), l("div", { class: i(["px-form-item", { "is-error": "error" === Y2.value, "is-success": "success" === Y2.value, "is-disabled": ne.value, "is-required": me.value, "asterisk-left": "left" === ((_a = h(L2)) == null ? void 0 : _a.requiredAsteriskPosition), "asterisk-right": "right" === ((_b = h(L2)) == null ? void 0 : _b.requiredAsteriskPosition) }]), style: f(ie.value ? { flexDirection: "column" } : {}) }, [re.value ? (o(), b(x(te.value ? "label" : "div"), { key: 0, class: "px-form-item__label", style: f(ue.value), id: h(X2), for: te.value }, { default: _((() => [u(e2.$slots, "label", { label: ae.value }, (() => [q(P(ae.value), 1)]), true)])), _: 3 }, 8, ["style", "id", "for"])) : g("", true), y("div", { class: "px-form-item__content", style: f(ie.value ? { width: "100%" } : {}), "aria-describedby": "error" === Y2.value ? `form-item-error-${h(X2)}` : void 0 }, [y("div", Q, [u(e2.$slots, "default", { validate: he }, void 0, true), ((_c = h(L2)) == null ? void 0 : _c.statusIcon) && "success" === Y2.value ? (o(), b(G, { key: 0, icon: "check", class: "px-form-item__status-icon is-success", size: "sm" })) : g("", true), ((_d = h(L2)) == null ? void 0 : _d.statusIcon) && "error" === Y2.value ? (o(), b(G, { key: 1, icon: "close", class: "px-form-item__status-icon is-error", size: "sm" })) : g("", true)]), "error" === Y2.value ? (o(), l("div", { key: 0, class: "px-form-item__error-msg", id: `form-item-error-${h(X2)}` }, [((_e = h(L2)) == null ? void 0 : _e.showMessage) && e2.showMessage ? u(e2.$slots, "error", { key: 0, error: Z2.value }, (() => [q(P(Z2.value), 1)]), true) : g("", true)], 8, U)) : g("", true)], 12, N)], 6);
|
|
116
|
-
};
|
|
117
|
-
} }), [["__scopeId", "data-v-0e2bbb22"]]), Y = w(L), Z = w(X);
|
|
118
|
-
export {
|
|
119
|
-
J as F,
|
|
120
|
-
Y as P,
|
|
121
|
-
Z as a,
|
|
122
|
-
K as u
|
|
123
|
-
};
|