sakana-element 2.1.4 → 2.2.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.
- package/README.md +9 -6
- package/dist/es/Avatar-CxsRW-wl.js +9 -0
- package/dist/es/Badge-CoFWwBwv.js +14 -0
- package/dist/es/Breadcrumb-BtrwTVKW.js +15 -0
- package/dist/es/{Button-fW_ZOLmT.js → Button-S_31-UWJ.js} +3 -3
- package/dist/es/Card-DcW6nHYD.js +16 -0
- package/dist/es/Collapse-DsS7M-m3.js +53 -0
- package/dist/es/ConfigProvider-BgIewHXP.js +44 -0
- package/dist/es/{Dropdown-49nf6F8P.js → Dropdown-GcomGMAI.js} +10 -10
- package/dist/es/FileInput-BQ59woas.js +33 -0
- package/dist/es/Form-j90EzLXU.js +122 -0
- package/dist/es/{Input-DBPpvf0Y.js → Input-CiE4bPJN.js} +4 -4
- package/dist/es/Link-B9B2APZq.js +11 -0
- package/dist/es/Loading-BW99pE5N.js +92 -0
- package/dist/es/Message-DCNnTUje.js +123 -0
- package/dist/es/{Notification-D4RYHV9o.js → Notification-CBzY5904.js} +14 -14
- package/dist/es/Popconfirm-DF6d2ORS.js +23 -0
- package/dist/es/Select-Dwqv8isB.js +133 -0
- package/dist/es/Switch-B1Gnv1tB.js +34 -0
- package/dist/es/{Tooltip-HWx_i2FA.js → Tooltip-k6gKnMyt.js} +3 -3
- package/dist/es/hooks-BaG7l8K5.js +116 -0
- package/dist/es/index.js +73 -63
- package/dist/index.css +1 -1
- package/dist/theme/Alert.css +1 -1
- package/dist/theme/Avatar.css +116 -0
- package/dist/theme/Badge.css +36 -30
- package/dist/theme/Breadcrumb.css +150 -0
- package/dist/theme/Button.css +216 -216
- package/dist/theme/Card.css +170 -19
- package/dist/theme/Collapse.css +214 -54
- package/dist/theme/FileInput.css +365 -0
- package/dist/theme/Form.css +65 -34
- package/dist/theme/Link.css +50 -0
- package/dist/theme/Loading.css +154 -4
- package/dist/theme/Message.css +7 -4
- package/dist/theme/Notification.css +21 -21
- package/dist/theme/Popconfirm.css +5 -5
- package/dist/theme/Select.css +78 -78
- package/dist/theme/index.css +1 -5
- package/dist/types/components/Avatar/index.d.ts +30 -0
- package/dist/types/components/Avatar/types.d.ts +10 -0
- package/dist/types/components/Badge/types.d.ts +1 -0
- package/dist/types/components/Breadcrumb/constants.d.ts +3 -0
- package/dist/types/components/Breadcrumb/index.d.ts +45 -0
- package/dist/types/components/Breadcrumb/types.d.ts +13 -0
- package/dist/types/components/Card/types.d.ts +6 -0
- package/dist/types/components/Collapse/constants.d.ts +3 -0
- package/dist/types/components/Collapse/index.d.ts +9 -3
- package/dist/types/components/Collapse/types.d.ts +12 -0
- package/dist/types/components/FileInput/constants.d.ts +3 -0
- package/dist/types/components/FileInput/index.d.ts +58 -0
- package/dist/types/components/FileInput/types.d.ts +24 -0
- package/dist/types/components/Form/types.d.ts +17 -7
- package/dist/types/components/Input/index.d.ts +5 -5
- package/dist/types/components/Link/index.d.ts +34 -0
- package/dist/types/components/Link/types.d.ts +10 -0
- package/dist/types/components/Loading/index.d.ts +25 -0
- package/dist/types/components/Loading/types.d.ts +9 -0
- package/dist/types/components/Message/types.d.ts +2 -2
- package/dist/types/components/MessageBox/types.d.ts +2 -2
- package/dist/types/components/Notification/index.d.ts +1 -1
- package/dist/types/components/Notification/methods.d.ts +3 -1
- package/dist/types/components/Notification/types.d.ts +2 -2
- package/dist/types/components/Select/constants.d.ts +2 -1
- package/dist/types/components/Select/index.d.ts +11 -11
- package/dist/types/components/Select/useKeyMap.d.ts +1 -1
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/hooks/vitest.setup.d.ts +4 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +5 -14
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +59 -60
- package/dist/es/Badge-BG-vYP8Y.js +0 -13
- package/dist/es/Card-BCBnlVi_.js +0 -12
- package/dist/es/Collapse-B08VhCVq.js +0 -38
- package/dist/es/ConfigProvider-DZO1d5Eq.js +0 -44
- package/dist/es/Form-CGiTDSGI.js +0 -108
- package/dist/es/Loading-DlygqGOv.js +0 -88
- package/dist/es/Message-ganFfLeU.js +0 -123
- package/dist/es/Popconfirm-Cop44KwQ.js +0 -22
- package/dist/es/Select-TIoGsqKv.js +0 -133
- package/dist/es/Switch-CHjcLtHs.js +0 -34
- package/dist/es/hooks-CYdEHUVd.js +0 -105
- package/dist/theme/fonts/zpix.ttf +0 -0
package/README.md
CHANGED
|
@@ -34,23 +34,26 @@ createApp(App).use(SakanaElement).mount('#app')
|
|
|
34
34
|
| Component | Description / 描述 |
|
|
35
35
|
|-----------|-------------------|
|
|
36
36
|
| `PxButton` | Button / 按钮 |
|
|
37
|
+
| `PxIcon` | Icon / 图标 |
|
|
37
38
|
| `PxInput` | Input / 输入框 |
|
|
39
|
+
| `PxLink` | Link / 链接 |
|
|
38
40
|
| `PxSelect` | Select / 选择器 |
|
|
41
|
+
| `PxFileInput` | FileInput / 文件输入 |
|
|
39
42
|
| `PxSwitch` | Switch / 开关 |
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
43
|
+
| `PxForm` | Form / 表单 |
|
|
44
|
+
| `PxAvatar` | Avatar / 头像 |
|
|
42
45
|
| `PxBadge` | Badge / 徽章 |
|
|
43
46
|
| `PxCard` | Card / 卡片 |
|
|
44
47
|
| `PxCollapse` | Collapse / 折叠面板 |
|
|
48
|
+
| `PxBreadcrumb` | Breadcrumb / 面包屑 |
|
|
45
49
|
| `PxDropdown` | Dropdown / 下拉菜单 |
|
|
46
|
-
| `
|
|
47
|
-
| `PxTooltip` | Tooltip / 文字提示 |
|
|
48
|
-
| `PxPopconfirm` | Popconfirm / 气泡确认框 |
|
|
50
|
+
| `PxAlert` | Alert / 警告提示 |
|
|
49
51
|
| `PxMessage` | Message / 消息提示 |
|
|
50
52
|
| `PxMessageBox` | MessageBox / 消息弹框 |
|
|
51
53
|
| `PxNotification` | Notification / 通知 |
|
|
52
54
|
| `PxLoading` | Loading / 加载 |
|
|
53
|
-
| `
|
|
55
|
+
| `PxTooltip` | Tooltip / 文字提示 |
|
|
56
|
+
| `PxPopconfirm` | Popconfirm / 气泡确认框 |
|
|
54
57
|
| `PxConfigProvider` | ConfigProvider / 全局配置 |
|
|
55
58
|
|
|
56
59
|
## Bundled Font / 内置字体
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { r as a, c as s, S as t, _ as e, w as r } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as o, computed as l, createElementBlock as u, openBlock as p, normalizeStyle as d, normalizeClass as i, renderSlot as c, createCommentVNode as n } from "vue";
|
|
3
|
+
const v = r(e(o({ name: "PxAvatar", __name: "Avatar", props: { size: { default: "default" }, shape: { default: "circle" }, border: { type: Boolean, default: true }, color: {}, status: {} }, setup(e2) {
|
|
4
|
+
const r2 = e2, o2 = l((() => r2.color ? a(s(r2.color), "px-avatar", t.default) : {}));
|
|
5
|
+
return (a2, s2) => (p(), u("span", { class: i(["px-avatar", { [`px-avatar--${a2.size}`]: a2.size && "default" !== a2.size, "is-square": "square" === a2.shape, "is-border": a2.border }]), style: d(o2.value) }, [c(a2.$slots, "default", {}, void 0, true), a2.status ? (p(), u("span", { key: 0, class: i(["px-avatar__indicator", `is-${a2.status}`]) }, null, 2)) : n("", true)], 6));
|
|
6
|
+
} }), [["__scopeId", "data-v-47da9c60"]]));
|
|
7
|
+
export {
|
|
8
|
+
v as P
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { r as e, S as s, c as o, _ as a, w as t } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as l, useSlots as i, computed as n, createElementBlock as u, openBlock as d, normalizeStyle as r, normalizeClass as p, createBlock as c, createCommentVNode as f, renderSlot as m } from "vue";
|
|
3
|
+
import { P as y } from "./Icon-DpJyuj7c.js";
|
|
4
|
+
const x = t(a(l({ name: "PxBadge", __name: "Badge", props: { type: { default: "primary" }, size: { default: "default" }, outline: { type: Boolean }, dash: { type: Boolean }, color: {}, round: { type: Boolean }, icon: {} }, setup(a2) {
|
|
5
|
+
const t2 = a2, l2 = i(), x2 = n((() => !l2.default)), z = n((() => "small" === t2.size ? "xs" : "sm")), g = n((() => {
|
|
6
|
+
if (!t2.color) return {};
|
|
7
|
+
const a3 = t2.outline ? "outline" : t2.dash ? "dash" : "default";
|
|
8
|
+
return e(o(t2.color), "px-badge", s[a3]);
|
|
9
|
+
}));
|
|
10
|
+
return (e2, s2) => (d(), u("span", { class: p(["px-badge", { [`px-badge--${e2.type}`]: e2.type, [`px-badge--${e2.size}`]: e2.size && "default" !== e2.size, "is-outline": e2.outline, "is-dash": e2.dash, "is-round": e2.round, "is-empty": x2.value }]), style: r(g.value) }, [e2.icon ? (d(), c(y, { key: 0, icon: e2.icon, size: z.value }, null, 8, ["icon", "size"])) : f("", true), m(e2.$slots, "default", {}, void 0, true)], 6));
|
|
11
|
+
} }), [["__scopeId", "data-v-b16297ef"]]));
|
|
12
|
+
export {
|
|
13
|
+
x as P
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _ as a, w as r } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as e, useSlots as s, provide as o, createElementBlock as t, openBlock as d, createElementVNode as l, renderSlot as c, inject as i, normalizeClass as p, createBlock as b, resolveDynamicComponent as n, mergeProps as u, withModifiers as m, withCtx as _, createCommentVNode as f, unref as x, Fragment as v, createTextVNode as B, toDisplayString as k } from "vue";
|
|
3
|
+
import { P as y } from "./Icon-DpJyuj7c.js";
|
|
4
|
+
const I = Symbol("breadcrumbContext"), P = { class: "px-breadcrumb", "aria-label": "Breadcrumb" }, S = { class: "px-breadcrumb__list" }, h = a(e({ name: "PxBreadcrumb", __name: "Breadcrumb", props: { separator: { default: "/" } }, setup(a2) {
|
|
5
|
+
const r2 = a2, e2 = s();
|
|
6
|
+
return o(I, { separator: r2.separator, separatorSlot: e2.separator }), (a3, r3) => (d(), t("nav", P, [l("ol", S, [c(a3.$slots, "default", {}, void 0, true)])]));
|
|
7
|
+
} }), [["__scopeId", "data-v-a0927948"]]), j = { class: "px-breadcrumb__separator", "aria-hidden": "true" }, C = a(e({ name: "PxBreadcrumbItem", __name: "BreadcrumbItem", props: { to: {}, icon: {}, disabled: { type: Boolean } }, setup(a2) {
|
|
8
|
+
const r2 = i(I, { separator: "/" });
|
|
9
|
+
return (a3, e2) => (d(), t("li", { class: p(["px-breadcrumb__item", { "is-disabled": a3.disabled }]) }, [(d(), b(n(a3.to && !a3.disabled ? "a" : "span"), u({ class: ["px-breadcrumb__link", { "is-current": !a3.to, "is-disabled": a3.disabled }], "aria-current": a3.to || a3.disabled ? void 0 : "page" }, a3.to && !a3.disabled ? { href: a3.to } : {}, { onClick: e2[0] || (e2[0] = m((() => {
|
|
10
|
+
}), ["prevent"])) }), { default: _((() => [a3.icon ? (d(), b(y, { key: 0, icon: a3.icon, class: "px-breadcrumb__icon" }, null, 8, ["icon"])) : f("", true), c(a3.$slots, "default", {}, void 0, true)])), _: 3 }, 16, ["class", "aria-current"])), l("span", j, [x(r2).separatorSlot ? (d(), b(n((() => x(r2).separatorSlot())), { key: 0 })) : (d(), t(v, { key: 1 }, [B(k(x(r2).separator), 1)], 64))])], 2));
|
|
11
|
+
} }), [["__scopeId", "data-v-8be388ff"]]), $ = r(h), g = r(C);
|
|
12
|
+
export {
|
|
13
|
+
$ as P,
|
|
14
|
+
g as a
|
|
15
|
+
};
|
|
@@ -12,11 +12,11 @@ const I = Symbol("BUTTON_GROUP_CTX_KEY"), P = { link: { "text-color": "color", "
|
|
|
12
12
|
})), U = (o2) => z2("click", o2), A = $(U, _2.throttleDuration, { trailing: false });
|
|
13
13
|
return b((() => {
|
|
14
14
|
A.cancel();
|
|
15
|
-
})), a2({ ref: G2, disabled: O, size: D2, type: L2 }), (o2, t2) => (g(), p(u(C2.value), { ref_key: "_ref", ref: G2, autofocus: o2.autofocus, type: "button" === C2.value ? o2.nativeType : void 0, class: y(["px-button", { [`px-button--${L2.value}`]: L2.value, [`px-button--${D2.value}`]: D2.value, "is-plain": o2.plain, "is-round": o2.round, "is-circle": o2.circle, "is-dash": o2.dash, "is-ghost": o2.ghost, "is-link": o2.link, "is-block": o2.block, "is-responsive": o2.responsive, "is-disabled": O.value, "is-loading": o2.loading }]), "aria-label": o2.ariaLabel, disabled: !(!O.value && !o2.loading) || void 0, style: h(S.value), onClick: t2[0] || (t2[0] = (t3) => o2.useThrottle ? v(A)(t3) : U(t3)) }, { default: x((() => [o2.loading ? k(o2.$slots, "loading", { key: 0 }, (() => [B(T, { class: "loading-icon", icon: o2.loadingIcon ?? "loader", style: h(R.value), size: "1x", spin: "" }, null, 8, ["icon", "style"])]), true) : f("", true), o2.icon && !o2.loading ? (g(), p(T, { key: 1, icon: o2.icon, style: h(R.value), size: "1x" }, null, 8, ["icon", "style"])) : f("", true), k(o2.$slots, "default", {}, void 0, true)])), _: 3 }, 8, ["autofocus", "type", "aria-label", "disabled", "class", "style"]));
|
|
16
|
-
} }), [["__scopeId", "data-v-
|
|
15
|
+
})), a2({ ref: G2, disabled: O, size: D2, type: L2 }), (o2, t2) => (g(), p(u(C2.value), { ref_key: "_ref", ref: G2, autofocus: o2.autofocus, type: "button" === C2.value ? o2.nativeType : void 0, class: y(["px-button", { [`px-button--${L2.value}`]: L2.value, [`px-button--${D2.value}`]: D2.value, "is-plain": o2.plain, "is-round": o2.round, "is-circle": o2.circle, "is-dash": o2.dash, "is-ghost": o2.ghost, "is-link": o2.link, "is-block": o2.block, "is-responsive": o2.responsive, "is-disabled": O.value, "is-loading": o2.loading }]), "aria-label": o2.ariaLabel, "aria-busy": o2.loading || void 0, disabled: !(!O.value && !o2.loading) || void 0, style: h(S.value), onClick: t2[0] || (t2[0] = (t3) => o2.useThrottle ? v(A)(t3) : U(t3)) }, { default: x((() => [o2.loading ? k(o2.$slots, "loading", { key: 0 }, (() => [B(T, { class: "loading-icon", icon: o2.loadingIcon ?? "loader", style: h(R.value), size: "1x", spin: "" }, null, 8, ["icon", "style"])]), true) : f("", true), o2.icon && !o2.loading ? (g(), p(T, { key: 1, icon: o2.icon, style: h(R.value), size: "1x" }, null, 8, ["icon", "style"])) : f("", true), k(o2.$slots, "default", {}, void 0, true)])), _: 3 }, 8, ["autofocus", "type", "aria-label", "aria-busy", "disabled", "class", "style"]));
|
|
16
|
+
} }), [["__scopeId", "data-v-0d682c9b"]]), G = { class: "px-button-group", role: "group" }, C = l(i({ name: "PxButtonGroup", __name: "ButtonGroup", props: { size: {}, type: {}, disabled: { type: Boolean } }, setup(o2) {
|
|
17
17
|
const t2 = o2;
|
|
18
18
|
return m(I, _({ size: z(t2, "size"), type: z(t2, "type"), disabled: z(t2, "disabled") })), (o3, t3) => (g(), w("div", G, [k(o3.$slots, "default", {}, void 0, true)]));
|
|
19
|
-
} }), [["__scopeId", "data-v-
|
|
19
|
+
} }), [["__scopeId", "data-v-87af5dc3"]]), D = a(j), L = a(C);
|
|
20
20
|
export {
|
|
21
21
|
L as P,
|
|
22
22
|
D as a,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { r as o, S as a, c as e, _ as s, w as r } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as t, useSlots as d, computed as l, createElementBlock as c, openBlock as n, normalizeStyle as p, normalizeClass as i, createCommentVNode as h, createElementVNode as u, unref as v, renderSlot as y } from "vue";
|
|
3
|
+
const x = { key: 0, class: "px-card__header" }, _ = { class: "px-card__body" }, f = { key: 1, class: "px-card__footer" }, w = r(s(t({ name: "PxCard", __name: "Card", props: { type: {}, color: {}, hoverable: { type: Boolean }, shadow: { type: [Boolean, String], default: "always" }, size: {}, outline: { type: Boolean }, dash: { type: Boolean }, ghost: { type: Boolean } }, setup(s2) {
|
|
4
|
+
const r2 = { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent" }, t2 = s2, w2 = d(), g = l((() => {
|
|
5
|
+
const o2 = t2.shadow;
|
|
6
|
+
return true === o2 ? "px-card--shadow-always" : false === o2 ? "px-card--shadow-never" : `px-card--shadow-${o2}`;
|
|
7
|
+
})), b = l((() => {
|
|
8
|
+
if (!t2.color) return {};
|
|
9
|
+
const s3 = t2.ghost ? "ghost" : t2.outline ? "outline" : t2.dash ? "dash" : "default", d2 = { ...a, ghost: r2 };
|
|
10
|
+
return o(e(t2.color), "px-card", d2[s3]);
|
|
11
|
+
}));
|
|
12
|
+
return (o2, a2) => (n(), c("div", { class: i(["px-card", [g.value, { [`px-card--${o2.type}`]: o2.type, [`px-card--${o2.size}`]: o2.size, "is-hoverable": o2.hoverable, "is-outline": o2.outline, "is-dash": o2.dash, "is-ghost": o2.ghost }]]), style: p(b.value) }, [v(w2).header ? (n(), c("div", x, [y(o2.$slots, "header", {}, void 0, true)])) : h("", true), u("div", _, [y(o2.$slots, "default", {}, void 0, true)]), v(w2).footer ? (n(), c("div", f, [y(o2.$slots, "footer", {}, void 0, true)])) : h("", true)], 6));
|
|
13
|
+
} }), [["__scopeId", "data-v-61d3ab66"]]));
|
|
14
|
+
export {
|
|
15
|
+
w as P
|
|
16
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { c as e, r as o, _ as a, w as l } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as t, ref as s, computed as n, watchEffect as c, watch as i, provide as r, createElementBlock as d, openBlock as p, normalizeStyle as u, normalizeClass as m, renderSlot as v, inject as h, createElementVNode as f, createVNode as g, unref as b, createBlock as x, createCommentVNode as _, createTextVNode as w, toDisplayString as y, Transition as C, mergeProps as I, toHandlers as P, withCtx as $, withDirectives as k, vShow as B } from "vue";
|
|
3
|
+
import { P as O } from "./Icon-DpJyuj7c.js";
|
|
4
|
+
const V = Symbol("collapseContext"), A = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), j = { default: { "border-color": "color", "shadow-color": "dark", "active-bg-color": "light" }, ghost: { "border-color": "transparent", "shadow-color": "transparent", "active-bg-color": "transparent" } }, E = a(t({ name: "PxCollapse", __name: "Collapse", props: { modelValue: {}, accordion: { type: Boolean }, color: {}, ghost: { type: Boolean }, trigger: {}, iconPlacement: {} }, emits: ["update:modelValue", "change"], setup(a2, { emit: l2 }) {
|
|
5
|
+
const t2 = a2, h2 = l2, f2 = s(t2.modelValue);
|
|
6
|
+
t2.accordion && f2.value.length > 1 && (f2.value = [f2.value[0]]);
|
|
7
|
+
const g2 = n((() => A.has(t2.color ?? ""))), b2 = n((() => !!t2.color && !g2.value)), x2 = n((() => {
|
|
8
|
+
if (!b2.value) return {};
|
|
9
|
+
const a3 = e(t2.color), l3 = t2.ghost ? "ghost" : "default";
|
|
10
|
+
return o(a3, "px-collapse", j[l3]);
|
|
11
|
+
}));
|
|
12
|
+
function _2(e2) {
|
|
13
|
+
f2.value = e2, h2("update:modelValue", e2), h2("change", e2);
|
|
14
|
+
}
|
|
15
|
+
return c((() => {
|
|
16
|
+
t2.accordion && f2.value.length;
|
|
17
|
+
})), i((() => t2.modelValue), ((e2) => _2(e2))), r(V, { activeNames: f2, handleItemClick: function(e2) {
|
|
18
|
+
let o2 = [...f2.value];
|
|
19
|
+
if (t2.accordion) return o2 = [o2[0] === e2 ? "" : e2], void _2(o2);
|
|
20
|
+
const a3 = o2.indexOf(e2);
|
|
21
|
+
a3 > -1 ? o2.splice(a3, 1) : o2.push(e2), _2(o2);
|
|
22
|
+
}, color: t2.color, ghost: t2.ghost, trigger: t2.trigger, iconPlacement: t2.iconPlacement }), (e2, o2) => (p(), d("div", { class: m(["px-collapse", { "is-ghost": e2.ghost, [`px-collapse--${e2.color}`]: g2.value }]), style: u(x2.value) }, [v(e2.$slots, "default", {}, void 0, true)], 6));
|
|
23
|
+
} }), [["__scopeId", "data-v-dc792000"]]), F = (e2) => e2.style.height = "0px", L = (e2) => e2.style.height = `${e2.scrollHeight}px`, N = (e2) => e2.style.height = "", S = (e2) => e2.style.overflow = "hidden", H = (e2) => e2.style.overflow = "", q = { beforeEnter(e2) {
|
|
24
|
+
F(e2), S(e2);
|
|
25
|
+
}, enter: (e2) => L(e2), afterEnter(e2) {
|
|
26
|
+
N(e2), H(e2);
|
|
27
|
+
}, beforeLeave(e2) {
|
|
28
|
+
L(e2), S(e2);
|
|
29
|
+
}, leave: (e2) => F(e2), afterLeave(e2) {
|
|
30
|
+
N(e2), H(e2);
|
|
31
|
+
} }, z = ["id", "aria-expanded", "aria-controls", "tabindex"], D = { class: "px-collapse-item__title" }, G = { class: "px-collapse-item__wapper" }, J = ["id"], K = a(t({ name: "PxCollapseItem", __name: "CollapseItem", props: { name: {}, title: {}, disabled: { type: Boolean }, showArrow: { type: Boolean, default: true }, icon: {}, forceOpen: { type: Boolean }, forceClose: { type: Boolean } }, setup(e2) {
|
|
32
|
+
const o2 = e2, a2 = h(V, void 0), l2 = n((() => {
|
|
33
|
+
var _a;
|
|
34
|
+
return !o2.forceClose && (!!o2.forceOpen || ((_a = a2 == null ? void 0 : a2.activeNames.value) == null ? void 0 : _a.includes(o2.name)));
|
|
35
|
+
})), t2 = n((() => "focus" === (a2 == null ? void 0 : a2.trigger))), s2 = n((() => o2.icon ? "plus" === o2.icon ? l2.value ? "minus" : "plus" : o2.icon : "chevron-right"));
|
|
36
|
+
function c2() {
|
|
37
|
+
o2.disabled || o2.forceOpen || o2.forceClose || t2.value || (a2 == null ? void 0 : a2.handleItemClick(o2.name));
|
|
38
|
+
}
|
|
39
|
+
function i2() {
|
|
40
|
+
o2.disabled || o2.forceOpen || o2.forceClose || t2.value && (l2.value || (a2 == null ? void 0 : a2.handleItemClick(o2.name)));
|
|
41
|
+
}
|
|
42
|
+
function r2(e3) {
|
|
43
|
+
o2.disabled || o2.forceOpen || o2.forceClose || t2.value && l2.value && (a2 == null ? void 0 : a2.handleItemClick(o2.name));
|
|
44
|
+
}
|
|
45
|
+
return (e3, o3) => {
|
|
46
|
+
var _a;
|
|
47
|
+
return p(), d("div", { class: m(["px-collapse-item", { "is-disabled": e3.disabled }]) }, [f("div", { class: m(["px-collapse-item__header", { "is-disabled": e3.disabled, "is-active": l2.value, "is-hidden-arrow": false === e3.showArrow, "is-icon-start": "start" === ((_a = b(a2)) == null ? void 0 : _a.iconPlacement) }]), id: `item-header-${e3.name}`, role: "button", "aria-expanded": l2.value, "aria-controls": `item-content-${e3.name}`, tabindex: t2.value ? 0 : void 0, onClick: c2, onFocus: i2, onFocusout: r2 }, [f("span", D, [v(e3.$slots, "title", {}, (() => [w(y(e3.title), 1)]), true)]), false !== e3.showArrow ? (p(), x(O, { key: 0, icon: s2.value, class: m(["header-angle", { "is-toggle-icon": !!e3.icon }]) }, null, 8, ["icon", "class"])) : _("", true)], 42, z), g(C, I({ name: "slide" }, P(b(q))), { default: $((() => [k(f("div", G, [f("div", { class: "px-collapse-item__content", id: `item-content-${e3.name}` }, [v(e3.$slots, "default", {}, void 0, true)], 8, J)], 512), [[B, l2.value]])])), _: 3 }, 16)], 2);
|
|
48
|
+
};
|
|
49
|
+
} }), [["__scopeId", "data-v-47d8126b"]]), M = l(E), Q = l(K);
|
|
50
|
+
export {
|
|
51
|
+
M as P,
|
|
52
|
+
Q as a
|
|
53
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { w as e } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { ref as o, getCurrentInstance as n, unref as t, watch as a, provide as l, inject as s, computed as r, defineComponent as c, renderSlot as u } from "vue";
|
|
3
|
+
import { n as i, m as d, o as p } from "./vendor-DXmGx29U.js";
|
|
4
|
+
const m = { name: "en", el: { select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" } } }, g = Symbol(), v = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
5
|
+
function f(e2, ...o2) {
|
|
6
|
+
return d(e2, ...o2, ((e3, o3, n2) => {
|
|
7
|
+
if (v.has(n2)) return e3;
|
|
8
|
+
}));
|
|
9
|
+
}
|
|
10
|
+
const x = o();
|
|
11
|
+
function _(e2, o2 = void 0) {
|
|
12
|
+
const t2 = n() ? s(g, x) : x;
|
|
13
|
+
return e2 ? r((() => {
|
|
14
|
+
var _a;
|
|
15
|
+
return ((_a = t2.value) == null ? void 0 : _a[e2]) ?? o2;
|
|
16
|
+
})) : t2;
|
|
17
|
+
}
|
|
18
|
+
const h = (e2) => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const o2 = (o3) => f(o3, (e2 == null ? void 0 : e2.extendsI18nMsg) ?? {});
|
|
21
|
+
return p((e2 == null ? void 0 : e2.locale) ? { locale: ((_a = e2.locale) == null ? void 0 : _a.name) || "en", messages: o2({ en: m.el, [(_b = e2.locale) == null ? void 0 : _b.name]: ((_c = e2.locale) == null ? void 0 : _c.el) ?? {} }) } : { locale: "en", messages: o2({ en: m.el }) });
|
|
22
|
+
};
|
|
23
|
+
function w(e2 = { locale: m }, s2, r2 = false) {
|
|
24
|
+
const c2 = n(), u2 = c2 ? _() : void 0, d2 = (s2 == null ? void 0 : s2.provide) ?? (c2 ? l : void 0);
|
|
25
|
+
if (!d2) return;
|
|
26
|
+
const p2 = o(t(e2));
|
|
27
|
+
a((() => e2), ((e3) => {
|
|
28
|
+
const o2 = t(e3);
|
|
29
|
+
if (!(u2 == null ? void 0 : u2.value)) return o2;
|
|
30
|
+
p2.value = f(u2.value, o2);
|
|
31
|
+
}), { deep: true });
|
|
32
|
+
const v2 = o(h(p2.value));
|
|
33
|
+
return a((() => p2.value), ((e3) => v2.value = h(e3)), { deep: true }), d2(g, p2), d2(i, v2), !r2 && x.value || (x.value = p2.value), p2;
|
|
34
|
+
}
|
|
35
|
+
const C = e(c({ name: "PxConfigProvider", __name: "ConfigProvider", props: { locale: {}, extendsI18nMsg: {} }, setup(e2) {
|
|
36
|
+
const o2 = w(e2);
|
|
37
|
+
return (e3, n2) => u(e3.$slots, "default", { config: t(o2) });
|
|
38
|
+
} }));
|
|
39
|
+
export {
|
|
40
|
+
m as E,
|
|
41
|
+
C as P,
|
|
42
|
+
w as p,
|
|
43
|
+
_ as u
|
|
44
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { w as e } from "./utils-bsCscZfS.js";
|
|
2
|
-
import { defineComponent as o, inject as i, computed as t, createElementBlock as a, openBlock as l, Fragment as d, createCommentVNode as n, createElementVNode as s, normalizeClass as p, unref as r, renderSlot as
|
|
3
|
-
import { u as B, a as x, b as g } from "./hooks-
|
|
4
|
-
import { P as C, a as z } from "./Button-
|
|
5
|
-
import { T as $ } from "./Tooltip-
|
|
2
|
+
import { defineComponent as o, inject as i, computed as t, createElementBlock as a, openBlock as l, Fragment as d, createCommentVNode as n, createElementVNode as s, normalizeClass as p, unref as r, renderSlot as m, createTextVNode as u, toDisplayString as c, useSlots as f, ref as v, provide as h, createVNode as y, mergeProps as b, withCtx as k, createBlock as w, renderList as _ } from "vue";
|
|
3
|
+
import { u as B, a as x, b as g } from "./hooks-BaG7l8K5.js";
|
|
4
|
+
import { P as C, a as z } from "./Button-S_31-UWJ.js";
|
|
5
|
+
import { T as $ } from "./Tooltip-k6gKnMyt.js";
|
|
6
6
|
import { a as j, i as T } from "./vendor-DXmGx29U.js";
|
|
7
7
|
const D = Symbol("dropdownContext"), I = { key: 0, role: "separator", class: "divided-placeholder" }, O = ["id"], P = o({ name: "PxDropdownItem", __name: "DropdownItem", props: { command: { default: B().value }, label: {}, disabled: { type: Boolean, default: false }, divided: { type: Boolean, default: false } }, setup(e2) {
|
|
8
8
|
const o2 = e2, f2 = i(D), v2 = t((() => f2 == null ? void 0 : f2.size.value));
|
|
9
9
|
function h2() {
|
|
10
10
|
o2.disabled || (f2 == null ? void 0 : f2.handleItemClick(o2));
|
|
11
11
|
}
|
|
12
|
-
return (e3, o3) => (l(), a(d, null, [e3.divided ? (l(), a("li", I)) : n("", true), s("li", { id: `dropdown-item-${e3.command ?? r(B)().value}`, class: p({ "px-dropdown__item": true, ["px-dropdown__item--" + v2.value]: v2.value, "is-disabled": e3.disabled, "is-divided": e3.divided }), onClick: h2 }, [
|
|
13
|
-
} }), R = ["aria-expanded"], A = { class: "px-dropdown__menu" }, S = e(o({ name: "PxDropdown", inheritAttrs: false, __name: "Dropdown", props: { type: {}, size: {}, items: { default: () => [] }, hideOnClick: { type: Boolean, default: true }, splitButton: { type: Boolean }, content: {}, trigger: {}, placement: {}, manual: { type: Boolean }, disabled: { type: Boolean }, popperOptions: {}, transition: {}, showTimeout: {}, hideTimeout: {}, virtualRef: {}, virtualTriggering: { type: Boolean } }, emits: ["visible-change", "command", "click"], setup(e2, { expose: o2, emit: i2 }) {
|
|
14
|
-
const n2 = e2,
|
|
12
|
+
return (e3, o3) => (l(), a(d, null, [e3.divided ? (l(), a("li", I)) : n("", true), s("li", { role: "menuitem", id: `dropdown-item-${e3.command ?? r(B)().value}`, class: p({ "px-dropdown__item": true, ["px-dropdown__item--" + v2.value]: v2.value, "is-disabled": e3.disabled, "is-divided": e3.divided }), onClick: h2 }, [m(e3.$slots, "default", {}, (() => [u(c(e3.label), 1)]))], 10, O)], 64));
|
|
13
|
+
} }), R = ["aria-expanded"], A = { class: "px-dropdown__menu", role: "menu" }, S = e(o({ name: "PxDropdown", inheritAttrs: false, __name: "Dropdown", props: { type: {}, size: {}, items: { default: () => [] }, hideOnClick: { type: Boolean, default: true }, splitButton: { type: Boolean }, content: {}, trigger: {}, placement: {}, manual: { type: Boolean }, disabled: { type: Boolean }, popperOptions: {}, transition: {}, showTimeout: {}, hideTimeout: {}, virtualRef: {}, virtualTriggering: { type: Boolean } }, emits: ["visible-change", "command", "click"], setup(e2, { expose: o2, emit: i2 }) {
|
|
14
|
+
const n2 = e2, u2 = i2;
|
|
15
15
|
f();
|
|
16
16
|
const c2 = v(), B2 = v(), I2 = v(false), O2 = t((() => j(n2, ["items", "hideOnClick", "size", "type", "splitButton"])));
|
|
17
17
|
function S2() {
|
|
@@ -23,16 +23,16 @@ const D = Symbol("dropdownContext"), I = { key: 0, role: "separator", class: "di
|
|
|
23
23
|
n2.splitButton && ((_a = c2.value) == null ? void 0 : _a.hide());
|
|
24
24
|
})), g(), h(D, { handleItemClick: function(e3) {
|
|
25
25
|
var _a;
|
|
26
|
-
n2.hideOnClick && ((_a = c2.value) == null ? void 0 : _a.hide()), !T(e3.command) &&
|
|
26
|
+
n2.hideOnClick && ((_a = c2.value) == null ? void 0 : _a.hide()), !T(e3.command) && u2("command", e3.command);
|
|
27
27
|
}, size: t((() => n2.size)) }), o2({ open: () => {
|
|
28
28
|
var _a;
|
|
29
29
|
return (_a = c2.value) == null ? void 0 : _a.show();
|
|
30
30
|
}, close: () => {
|
|
31
31
|
var _a;
|
|
32
32
|
return (_a = c2.value) == null ? void 0 : _a.hide();
|
|
33
|
-
} }), (e3, o3) => (l(), a("div", { ref_key: "dropdownRef", ref: B2, class: p(["px-dropdown", { "is-disabled": n2.disabled }]),
|
|
33
|
+
} }), (e3, o3) => (l(), a("div", { ref_key: "dropdownRef", ref: B2, class: p(["px-dropdown", { "is-disabled": n2.disabled }]), "aria-haspopup": "true", "aria-expanded": I2.value }, [y($, b({ ref_key: "tooltipRef", ref: c2 }, O2.value, { manual: e3.splitButton, onVisibleChange: o3[1] || (o3[1] = (o4) => {
|
|
34
34
|
I2.value = o4, e3.$emit("visible-change", o4);
|
|
35
|
-
}) }), { content: k((() => [s("div", A, [
|
|
35
|
+
}) }), { content: k((() => [s("div", A, [m(e3.$slots, "dropdown", {}, (() => [(l(true), a(d, null, _(e3.items, ((e4) => (l(), w(P, b({ key: e4.command, ref_for: true }, e4), null, 16)))), 128))]))])])), default: k((() => [e3.splitButton ? (l(), w(r(C), { key: 0, type: e3.type, size: e3.size, disabled: e3.disabled }, { default: k((() => [y(r(z), { onClick: o3[0] || (o3[0] = (o4) => e3.$emit("click", o4)) }, { default: k((() => [m(e3.$slots, "default")])), _: 3 }), y(r(z), { icon: "chevron-down", onClick: S2 })])), _: 3 }, 8, ["type", "size", "disabled"])) : m(e3.$slots, "default", { key: 1 })])), _: 3 }, 16, ["manual"])], 10, R));
|
|
36
36
|
} })), V = e(P);
|
|
37
37
|
export {
|
|
38
38
|
S as P,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { c as e, r as l, w as o } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as a, shallowRef as t, ref as r, computed as i, createElementBlock as n, openBlock as s, normalizeStyle as c, normalizeClass as u, createElementVNode as p, createBlock as d, createCommentVNode as f, renderSlot as m, createTextVNode as h, toDisplayString as v, withModifiers as g } from "vue";
|
|
3
|
+
import { u as b } from "./Form-j90EzLXU.js";
|
|
4
|
+
import { P as x } from "./Icon-DpJyuj7c.js";
|
|
5
|
+
const _ = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), k = { default: { "border-color": "color", "hover-border-color": "dark", "shadow-color": "dark" }, ghost: { "border-color": "transparent", "hover-border-color": "color", "shadow-color": "transparent", "hover-shadow-color": "dark" } }, y = { class: "px-file-input__wrapper" }, w = ["disabled", "accept", "multiple", "form"], B = { class: "px-file-input__name" }, V = o(a({ name: "PxFileInput", inheritAttrs: false, __name: "FileInput", props: { modelValue: {}, id: {}, size: {}, color: {}, ghost: { type: Boolean }, disabled: { type: Boolean }, accept: {}, multiple: { type: Boolean }, placeholder: { default: "No file chosen" }, clearable: { type: Boolean }, form: {} }, emits: ["update:modelValue", "change", "clear"], setup(o2, { expose: a2, emit: V2 }) {
|
|
6
|
+
const I = o2, $ = V2, j = t(), { formItem: z } = b(), C = r(null), F = i((() => _.has(I.color ?? ""))), P = i((() => !!I.color && !F.value)), A = i((() => {
|
|
7
|
+
if (!P.value) return {};
|
|
8
|
+
const o3 = e(I.color), a3 = I.ghost ? "ghost" : "default";
|
|
9
|
+
return l(o3, "px-file-input", k[a3]);
|
|
10
|
+
})), N = i((() => {
|
|
11
|
+
const e2 = C.value;
|
|
12
|
+
return e2 && 0 !== e2.length ? 1 === e2.length ? e2[0].name : `${e2.length} files selected` : I.placeholder;
|
|
13
|
+
})), R = i((() => I.clearable && C.value && C.value.length > 0));
|
|
14
|
+
function S(e2) {
|
|
15
|
+
const l2 = e2.target.files ?? null;
|
|
16
|
+
C.value = l2, $("update:modelValue", l2), $("change", l2), z == null ? void 0 : z.validate("change").catch((() => {
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
function q() {
|
|
20
|
+
var _a;
|
|
21
|
+
I.disabled || ((_a = j.value) == null ? void 0 : _a.click());
|
|
22
|
+
}
|
|
23
|
+
function D() {
|
|
24
|
+
C.value = null, j.value && (j.value.value = ""), $("update:modelValue", null), $("clear"), z == null ? void 0 : z.clearValidate();
|
|
25
|
+
}
|
|
26
|
+
return a2({ ref: j, open: function() {
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = j.value) == null ? void 0 : _a.click();
|
|
29
|
+
}, clear: D }), (e2, l2) => (s(), n("div", { class: u(["px-file-input", { [`px-file-input--${e2.size}`]: e2.size, [`px-file-input--${e2.color}`]: F.value, "is-ghost": e2.ghost, "is-disabled": e2.disabled }]), style: c(A.value) }, [p("div", y, [p("input", { ref_key: "inputRef", ref: j, type: "file", class: "px-file-input__native", disabled: e2.disabled, accept: e2.accept, multiple: e2.multiple, form: e2.form, onChange: S }, null, 40, w), p("div", { class: "px-file-input__trigger", onClick: q }, [m(e2.$slots, "trigger", {}, (() => [l2[0] || (l2[0] = h("Browse"))]))]), p("span", B, v(N.value), 1), R.value ? (s(), d(x, { key: 0, icon: "close-box", class: "px-file-input__clear", onClick: g(D, ["stop"]) })) : f("", true)])], 6));
|
|
30
|
+
} }));
|
|
31
|
+
export {
|
|
32
|
+
V as P
|
|
33
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineComponent as e, reactive as r, toRefs as s, provide as t, createElementBlock as a, openBlock as l, normalizeClass as o, renderSlot as i, useCssVars as u, computed as n, useSlots as d, inject 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-bsCscZfS.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, p as D } from "./vendor-DXmGx29U.js";
|
|
4
|
+
import { u as E } from "./hooks-BaG7l8K5.js";
|
|
5
|
+
import { z as R } from "zod";
|
|
6
|
+
import { P as G } from "./Icon-DpJyuj7c.js";
|
|
7
|
+
const H = Symbol("formContext"), J = Symbol("formItemContext"), K = e({ 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: u2, emit: n2 }) {
|
|
8
|
+
const d2 = n2, c2 = [], p2 = async (e3, r2) => {
|
|
9
|
+
try {
|
|
10
|
+
const s2 = await (async function(e4 = []) {
|
|
11
|
+
let r3 = {};
|
|
12
|
+
for (const s3 of e4) try {
|
|
13
|
+
await s3.validate("");
|
|
14
|
+
} catch (e5) {
|
|
15
|
+
r3 = { ...r3, ...e5 };
|
|
16
|
+
}
|
|
17
|
+
return !B(Object.keys(r3)) || Promise.reject(r3);
|
|
18
|
+
})(m2(c2, e3 ?? []));
|
|
19
|
+
return true === s2 && (r2 == null ? void 0 : r2(s2)), s2;
|
|
20
|
+
} catch (e4) {
|
|
21
|
+
if (e4 instanceof Error) throw e4;
|
|
22
|
+
const s2 = e4;
|
|
23
|
+
return r2 == null ? void 0 : r2(false, s2), Promise.reject(s2);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function m2(e3, r2) {
|
|
27
|
+
return B(r2) ? $(e3, ((e4) => A(r2, e4.prop))) : e3;
|
|
28
|
+
}
|
|
29
|
+
const v2 = r({ ...s(e2), emits: d2, addField: (e3) => {
|
|
30
|
+
e3.prop && c2.push(e3);
|
|
31
|
+
}, removeField: (e3) => {
|
|
32
|
+
e3.prop && c2.splice(c2.indexOf(e3), 1);
|
|
33
|
+
} });
|
|
34
|
+
return t(H, v2), u2({ validate: async (e3) => p2([], e3), validateField: p2, resetFields: (e3) => {
|
|
35
|
+
j(m2(c2, e3 ?? []), ((e4) => e4.resetField()));
|
|
36
|
+
}, clearValidate: (e3) => {
|
|
37
|
+
j(m2(c2, e3 ?? []), ((e4) => e4.clearValidate()));
|
|
38
|
+
} }), (e3, r2) => (l(), a("form", { class: o(["px-form", { "is-inline": e3.inline }]) }, [i(e3.$slots, "default")], 2));
|
|
39
|
+
} }), L = ["aria-describedby"], N = { class: "px-form-item__input-wrap" }, Q = ["id"], U = I(e({ 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(e2, { expose: I2 }) {
|
|
40
|
+
u(((e3) => ({ ac9c6e38: le.value })));
|
|
41
|
+
const w2 = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), j2 = e2, K2 = d(), U2 = c(H), X2 = E().value, Y2 = p("init"), Z2 = p(""), ee = p([]), re = (e3) => {
|
|
42
|
+
return e3 && j2.prop && !W(V(e3, j2.prop)) ? (r2 = j2.prop, (T(r2) ? r2 : r2.split(".")).some(((e4) => w2.has(e4))) ? (F("PxFormItem", `Prop path "${j2.prop}" contains a dangerous segment and was rejected.`), null) : V(e3, j2.prop)) : null;
|
|
43
|
+
var r2;
|
|
44
|
+
}, se = n((() => !(!j2.label && !K2.label))), te = n((() => j2.for || (ee.value.length ? ee.value[0] : ""))), ae = n((() => `${j2.label ?? ""}${(U2 == null ? void 0 : U2.labelSuffix) ?? ""}`)), le = n((() => {
|
|
45
|
+
const e3 = (e4) => z(e4) ? `${e4}px` : C(e4, "px") ? e4 : `${e4}px`;
|
|
46
|
+
return j2.labelWidth ? e3(j2.labelWidth) : (U2 == null ? void 0 : U2.labelWidth) ? e3(U2 == null ? void 0 : U2.labelWidth) : "150px";
|
|
47
|
+
})), oe = n((() => (U2 == null ? void 0 : U2.labelPosition) ?? "right")), ie = n((() => "top" === oe.value)), ue = n((() => ie.value ? { width: "100%", textAlign: "left", padding: "0 0 8px 0" } : { textAlign: "left" === oe.value ? "left" : "right" })), ne = n((() => (U2 == null ? void 0 : U2.disabled) || j2.disabled)), de = n((() => {
|
|
48
|
+
const e3 = U2 == null ? void 0 : U2.model;
|
|
49
|
+
return re(e3);
|
|
50
|
+
})), ce = n((() => j2.prop ? S(j2.prop) ? j2.prop : j2.prop.join(".") : "")), pe = n((() => {
|
|
51
|
+
const { required: e3 } = j2, r2 = [];
|
|
52
|
+
j2.rules && r2.push(...j2.rules);
|
|
53
|
+
const s2 = U2 == null ? void 0 : U2.rules;
|
|
54
|
+
if (s2 && j2.prop) {
|
|
55
|
+
const e4 = re(s2);
|
|
56
|
+
e4 && r2.push(...e4);
|
|
57
|
+
}
|
|
58
|
+
if (!W(e3)) {
|
|
59
|
+
const s3 = $(M(r2, ((e4, r3) => [e4, r3])), ((e4) => A(D(e4[0]), "required")));
|
|
60
|
+
if (B(s3)) for (const t2 of s3) {
|
|
61
|
+
const [s4, a2] = t2;
|
|
62
|
+
s4.required !== e3 && (r2[a2] = { ...s4, required: e3 });
|
|
63
|
+
}
|
|
64
|
+
else r2.push({ required: e3 });
|
|
65
|
+
}
|
|
66
|
+
return r2;
|
|
67
|
+
})), me = n((() => W(j2.required) ? B($(pe.value, ((e3) => e3.required))) > 0 : j2.required));
|
|
68
|
+
let ve = null, fe = false;
|
|
69
|
+
const he = async (e3, r2) => {
|
|
70
|
+
if (fe || !j2.prop || ne.value) return false;
|
|
71
|
+
if (!Y2.value) return r2 == null ? void 0 : r2(false), false;
|
|
72
|
+
const s2 = (function(e4) {
|
|
73
|
+
const r3 = pe.value;
|
|
74
|
+
return r3 ? $(r3, ((r4) => !(r4 == null ? void 0 : r4.trigger) || !e4 || (T(r4.trigger) ? r4.trigger.includes(e4) : r4.trigger === e4))) : [];
|
|
75
|
+
})(e3);
|
|
76
|
+
return B(s2) ? (Y2.value = "validating", (async function(e4) {
|
|
77
|
+
var _a;
|
|
78
|
+
const r3 = de.value;
|
|
79
|
+
for (const s3 of e4) {
|
|
80
|
+
let e5 = s3.schema ?? null;
|
|
81
|
+
if (!e5 && s3.required && (e5 = R.string({ message: s3.message ?? "This field is required" }).min(1, s3.message ?? "This field is required")), !e5) continue;
|
|
82
|
+
const t2 = e5.safeParse(r3);
|
|
83
|
+
if (!t2.success) {
|
|
84
|
+
const e6 = s3.message ?? ((_a = t2.error.issues[0]) == null ? void 0 : _a.message) ?? "Validation failed";
|
|
85
|
+
Y2.value = "error", Z2.value = e6;
|
|
86
|
+
const r4 = { errors: [{ field: ce.value, message: e6 }], fields: { [ce.value]: [{ message: e6 }] } };
|
|
87
|
+
return U2 == null ? void 0 : U2.emits("validate", j2, false, e6), Promise.reject(r4);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return Y2.value = "success", U2 == null ? void 0 : U2.emits("validate", j2, true, ""), true;
|
|
91
|
+
})(s2).then((() => (r2 == null ? void 0 : r2(true), true))).catch(((e4) => {
|
|
92
|
+
const { fields: s3 } = e4;
|
|
93
|
+
return r2 == null ? void 0 : r2(false, s3), Promise.reject(s3);
|
|
94
|
+
}))) : (r2 == null ? void 0 : r2(true), true);
|
|
95
|
+
}, be = () => {
|
|
96
|
+
const e3 = U2 == null ? void 0 : U2.model;
|
|
97
|
+
e3 && ce.value && !W(V(e3, ce.value)) && (fe = true, e3[ce.value] = O(ve)), k((() => ge()));
|
|
98
|
+
}, ge = () => {
|
|
99
|
+
Y2.value = "init", Z2.value = "", fe = false;
|
|
100
|
+
}, ye = r({ ...s(j2), disabled: ne.value, validate: he, resetField: be, clearValidate: ge, addInputId: (e3) => {
|
|
101
|
+
A(ee.value, e3) || ee.value.push(e3);
|
|
102
|
+
}, removeInputId: (e3) => {
|
|
103
|
+
ee.value = $(ee.value, ((r2) => r2 !== e3));
|
|
104
|
+
} });
|
|
105
|
+
return m((() => {
|
|
106
|
+
j2.prop && (U2 == null ? void 0 : U2.addField(ye), ve = de.value);
|
|
107
|
+
})), v((() => {
|
|
108
|
+
j2.prop && (U2 == null ? void 0 : U2.removeField(ye));
|
|
109
|
+
})), t(J, ye), I2({ validateMessage: Z2, validateStatus: Y2, validate: he, resetField: be, clearValidate: ge }), (e3, r2) => {
|
|
110
|
+
var _a, _b, _c, _d, _e;
|
|
111
|
+
return l(), a("div", { class: o(["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(U2)) == null ? void 0 : _a.requiredAsteriskPosition), "asterisk-right": "right" === ((_b = h(U2)) == null ? void 0 : _b.requiredAsteriskPosition) }]), style: f(ie.value ? { flexDirection: "column" } : {}) }, [se.value ? (l(), b(x(te.value ? "label" : "div"), { key: 0, class: "px-form-item__label", style: f(ue.value), id: h(X2), for: te.value }, { default: _((() => [i(e3.$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", N, [i(e3.$slots, "default", { validate: he }, void 0, true), ((_c = h(U2)) == null ? void 0 : _c.statusIcon) && "success" === Y2.value ? (l(), b(G, { key: 0, icon: "check", class: "px-form-item__status-icon is-success", size: "sm" })) : g("", true), ((_d = h(U2)) == null ? void 0 : _d.statusIcon) && "error" === Y2.value ? (l(), b(G, { key: 1, icon: "close", class: "px-form-item__status-icon is-error", size: "sm" })) : g("", true)]), "error" === Y2.value ? (l(), a("div", { key: 0, class: "px-form-item__error-msg", id: `form-item-error-${h(X2)}` }, [((_e = h(U2)) == null ? void 0 : _e.showMessage) && e3.showMessage ? i(e3.$slots, "error", { key: 0, error: Z2.value }, (() => [q(P(Z2.value), 1)]), true) : g("", true)], 8, Q)) : g("", true)], 12, L)], 6);
|
|
112
|
+
};
|
|
113
|
+
} }), [["__scopeId", "data-v-0e2bbb22"]]);
|
|
114
|
+
function X() {
|
|
115
|
+
return { form: c(H, void 0), formItem: c(J, void 0) };
|
|
116
|
+
}
|
|
117
|
+
const Y = w(K), Z = w(U);
|
|
118
|
+
export {
|
|
119
|
+
Y as P,
|
|
120
|
+
Z as a,
|
|
121
|
+
X as u
|
|
122
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as e, r as o, d as a, w as l } from "./utils-bsCscZfS.js";
|
|
2
|
-
import { defineComponent as s, ref as r, shallowRef as u, useAttrs as t, computed as p, watch as n, createElementBlock as d, openBlock as c, normalizeStyle as i, normalizeClass as f, unref as v, withDirectives as m, Fragment as y, createCommentVNode as h, createElementVNode as x, renderSlot as _, mergeProps as w, vModelDynamic as k, createBlock as b, withModifiers as
|
|
3
|
-
import { c as V, u as I } from "./hooks-
|
|
4
|
-
import { u as P } from "./Form-
|
|
2
|
+
import { defineComponent as s, ref as r, shallowRef as u, useAttrs as t, computed as p, watch as n, createElementBlock as d, openBlock as c, normalizeStyle as i, normalizeClass as f, unref as v, withDirectives as m, Fragment as y, createCommentVNode as h, createElementVNode as x, renderSlot as _, mergeProps as w, vModelDynamic as k, createBlock as b, withModifiers as g, vModelText as $, nextTick as B } from "vue";
|
|
3
|
+
import { c as V, u as I } from "./hooks-BaG7l8K5.js";
|
|
4
|
+
import { u as P } from "./Form-j90EzLXU.js";
|
|
5
5
|
import { P as j } from "./Icon-DpJyuj7c.js";
|
|
6
6
|
import { q as C, f as F } from "./vendor-DXmGx29U.js";
|
|
7
7
|
const R = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), z = { default: { "border-color": "color", "hover-border-color": "dark", "focus-border-color": "dark", "shadow-color": "dark", "focus-shadow-color": "dark" }, ghost: { "border-color": "transparent", "hover-border-color": "color", "focus-border-color": "dark", "shadow-color": "transparent", "focus-shadow-color": "dark" } }, M = { key: 0, class: "px-input__prepend" }, U = { key: 0, class: "px-input__prefix" }, q = ["id", "type", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "form"], A = { key: 1, class: "px-input__suffix" }, S = { key: 1, class: "px-input__append" }, D = ["id", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "form"], E = s({ name: "PxInput", inheritAttrs: false, __name: "Input", props: { id: {}, modelValue: {}, type: { default: "text" }, size: {}, color: {}, ghost: { type: Boolean }, disabled: { type: Boolean }, clearable: { type: Boolean }, showPassword: { type: Boolean }, placeholder: {}, readonly: { type: Boolean }, autocomplete: { default: "off" }, autofocus: { type: Boolean }, form: {} }, emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"], setup(l2, { expose: s2, emit: E2 }) {
|
|
@@ -34,7 +34,7 @@ const R = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "i
|
|
|
34
34
|
}, select: () => {
|
|
35
35
|
var _a;
|
|
36
36
|
(_a = T.value) == null ? void 0 : _a.select();
|
|
37
|
-
}, clear: ue }), (e2, o2) => (c(), d("div", { class: f(["px-input", { [`px-input--${e2.type}`]: e2.type, [`px-input--${e2.size}`]: e2.size, [`px-input--${e2.color}`]: X.value, "is-ghost": e2.ghost, "is-disabled": W.value, "is-prepend": e2.$slots.prepend, "is-append": e2.$slots.append, "is-prefix": e2.$slots.prefix, "is-suffix": e2.$slots.suffix, "is-focus": v(le) }]), style: i(Z.value) }, ["textarea" !== e2.type ? (c(), d(y, { key: 0 }, [e2.$slots.prepend ? (c(), d("div", M, [_(e2.$slots, "prepend")])) : h("", true), x("div", { class: "px-input__wrapper", ref_key: "wrapperRef", ref: ae }, [e2.$slots.prefix ? (c(), d("span", U, [_(e2.$slots, "prefix")])) : h("", true), m(x("input", w({ class: "px-input__inner", ref_key: "inputRef", ref: L, id: v(I)().value, type: e2.showPassword ? K.value ? "text" : "password" : e2.type, disabled: W.value, readonly: e2.readonly, autocomplete: e2.autocomplete, placeholder: e2.placeholder, autofocus: e2.autofocus, form: e2.form, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => J.value = e3) }, v(O), { onInput: te, onChange: pe, onFocus: o2[1] || (o2[1] = (...e3) => v(se) && v(se)(...e3)), onBlur: o2[2] || (o2[2] = (...e3) => v(re) && v(re)(...e3)) }), null, 16, q), [[k, J.value]]), e2.$slots.suffix || ee.value || oe.value ? (c(), d("span", A, [_(e2.$slots, "suffix"), ee.value ? (c(), b(j, { key: 0, icon: "close-box", class: "px-input__clear", onClick: ue, onMousedown:
|
|
37
|
+
}, clear: ue }), (e2, o2) => (c(), d("div", { class: f(["px-input", { [`px-input--${e2.type}`]: e2.type, [`px-input--${e2.size}`]: e2.size, [`px-input--${e2.color}`]: X.value, "is-ghost": e2.ghost, "is-disabled": W.value, "is-prepend": e2.$slots.prepend, "is-append": e2.$slots.append, "is-prefix": e2.$slots.prefix, "is-suffix": e2.$slots.suffix, "is-focus": v(le) }]), style: i(Z.value) }, ["textarea" !== e2.type ? (c(), d(y, { key: 0 }, [e2.$slots.prepend ? (c(), d("div", M, [_(e2.$slots, "prepend")])) : h("", true), x("div", { class: "px-input__wrapper", ref_key: "wrapperRef", ref: ae }, [e2.$slots.prefix ? (c(), d("span", U, [_(e2.$slots, "prefix")])) : h("", true), m(x("input", w({ class: "px-input__inner", ref_key: "inputRef", ref: L, id: v(I)().value, type: e2.showPassword ? K.value ? "text" : "password" : e2.type, disabled: W.value, readonly: e2.readonly, autocomplete: e2.autocomplete, placeholder: e2.placeholder, autofocus: e2.autofocus, form: e2.form, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => J.value = e3) }, v(O), { onInput: te, onChange: pe, onFocus: o2[1] || (o2[1] = (...e3) => v(se) && v(se)(...e3)), onBlur: o2[2] || (o2[2] = (...e3) => v(re) && v(re)(...e3)) }), null, 16, q), [[k, J.value]]), e2.$slots.suffix || ee.value || oe.value ? (c(), d("span", A, [_(e2.$slots, "suffix"), ee.value ? (c(), b(j, { key: 0, icon: "close-box", class: "px-input__clear", onClick: ue, onMousedown: g(v(C), ["prevent"]) }, null, 8, ["onMousedown"])) : h("", true), oe.value && K.value ? (c(), b(j, { key: 1, icon: "eye", class: "px-input__password", onClick: ne })) : h("", true), oe.value && !K.value ? (c(), b(j, { key: 2, icon: "eye-closed", class: "px-input__password", onClick: ne })) : h("", true)])) : h("", true)], 512), e2.$slots.append ? (c(), d("div", S, [_(e2.$slots, "append")])) : h("", true)], 64)) : m((c(), d("textarea", w({ key: 1, class: "px-textarea__wrapper", ref_key: "textareaRef", ref: N, id: v(I)().value, disabled: W.value, readonly: e2.readonly, autocomplete: e2.autocomplete, placeholder: e2.placeholder, autofocus: e2.autofocus, form: e2.form, "onUpdate:modelValue": o2[3] || (o2[3] = (e3) => J.value = e3) }, v(O), { onInput: te, onChange: pe, onFocus: o2[4] || (o2[4] = (...e3) => v(se) && v(se)(...e3)), onBlur: o2[5] || (o2[5] = (...e3) => v(re) && v(re)(...e3)) }), null, 16, D)), [[$, J.value]])], 6));
|
|
38
38
|
} }), G = l(E);
|
|
39
39
|
export {
|
|
40
40
|
G as P,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { r as e, c as o, _ as t, w as l } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as r, computed as a, createElementBlock as i, openBlock as s, normalizeStyle as d, normalizeClass as n, renderSlot as c } from "vue";
|
|
3
|
+
const p = ["href", "target"], u = l(t(r({ name: "PxLink", __name: "Link", props: { type: {}, underline: { type: Boolean, default: true }, disabled: { type: Boolean }, href: {}, target: {}, color: {} }, emits: ["click"], setup(t2, { emit: l2 }) {
|
|
4
|
+
const r2 = t2, u2 = l2, k = { "text-color": "color", "hover-color": "dark" }, f = a((() => r2.color ? e(o(r2.color), "px-link", k) : {})), m = (e2) => {
|
|
5
|
+
r2.disabled || u2("click", e2);
|
|
6
|
+
};
|
|
7
|
+
return (e2, o2) => (s(), i("a", { class: n(["px-link", { [`px-link--${e2.type}`]: e2.type, "is-underline": e2.underline, "is-disabled": e2.disabled }]), href: e2.disabled ? void 0 : e2.href, target: e2.target, style: d(f.value), onClick: m }, [c(e2.$slots, "default", {}, void 0, true)], 14, p));
|
|
8
|
+
} }), [["__scopeId", "data-v-d754ba7d"]]));
|
|
9
|
+
export {
|
|
10
|
+
u as P
|
|
11
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { _ as e, w as n } from "./utils-bsCscZfS.js";
|
|
2
|
+
import { defineComponent as t, computed as o, createElementBlock as i, openBlock as a, normalizeStyle as l, normalizeClass as r, createElementVNode as s, useCssVars as d, createBlock as c, Transition as u, withCtx as p, withDirectives as b, createCommentVNode as m, toDisplayString as f, vShow as v, nextTick as g, ref as x, reactive as y, createApp as k } from "vue";
|
|
3
|
+
import { d as L } from "./hooks-BaG7l8K5.js";
|
|
4
|
+
import { i as _, d as $, r as A, u as I } from "./vendor-DXmGx29U.js";
|
|
5
|
+
const h = e(t({ name: "PxLoadingIndicator", __name: "LoadingIndicator", props: { variant: { default: "spinner" }, size: { default: "md" }, type: { default: "primary" }, color: {} }, setup(e2) {
|
|
6
|
+
const n2 = e2, t2 = o((() => n2.color ? { "--px-loading-indicator-color": n2.color } : {}));
|
|
7
|
+
return (e3, n3) => (a(), i("span", { class: r(["px-loading-indicator", [`px-loading-indicator--${e3.variant}`, `px-loading-indicator--${e3.size}`, `px-loading-indicator--${e3.type}`]]), style: l(t2.value), role: "status", "aria-label": "Loading" }, n3[0] || (n3[0] = [s("span", { class: "px-loading-indicator__inner" }, null, -1)]), 6));
|
|
8
|
+
} }), [["__scopeId", "data-v-1435ecee"]]), z = { class: "px-loading__spinner" }, C = { key: 1, class: "px-loading-text" }, P = t({ name: "PxLoading", inheritAttrs: false, __name: "Loading", props: { visible: {}, background: {}, spinner: {}, text: {}, fullscreen: {}, lock: {}, beforeClose: { type: Function }, closed: { type: Function }, target: {}, body: { type: Boolean }, zIndex: {}, onAfterLeave: { type: Function } }, setup(e2) {
|
|
9
|
+
d(((e3) => ({ d4003bba: e3.background, b5c47826: e3.zIndex })));
|
|
10
|
+
const n2 = e2;
|
|
11
|
+
return (e3, t2) => (a(), c(u, { name: "fade-in-linear", onAfterLeave: e3.onAfterLeave }, { default: p((() => [b(s("div", { class: r(["px-loading px-loading__mask", { "is-fullscreen": e3.fullscreen }]), role: "status", "aria-live": "polite" }, [s("div", z, [false !== n2.spinner ? (a(), c(h, { key: 0, variant: "spinner", size: "lg" })) : m("", true), e3.text ? (a(), i("p", C, f(e3.text), 1)) : m("", true)])], 2), [[v, n2.visible.value]])])), _: 1 }, 8, ["onAfterLeave"]));
|
|
12
|
+
} }), j = "px-loading-parent--relative", F = "px-loading-parent--hiden", N = "px-loading-numb", w = /* @__PURE__ */ new Map(), { nextZIndex: S } = L(3e3);
|
|
13
|
+
function T(e2 = document.body) {
|
|
14
|
+
e2.classList.remove(F);
|
|
15
|
+
}
|
|
16
|
+
function V(e2 = document.body) {
|
|
17
|
+
return e2.getAttribute(N);
|
|
18
|
+
}
|
|
19
|
+
let q = null;
|
|
20
|
+
function B(e2 = {}) {
|
|
21
|
+
var _a;
|
|
22
|
+
const n2 = (function(e3) {
|
|
23
|
+
let n3;
|
|
24
|
+
return n3 = $(e3.target) ? document.querySelector(e3.target) ?? document.body : e3.target || document.body, { parent: n3 === document.body || e3.body ? document.body : n3, background: e3.background ?? "rgba(0, 0, 0, 0.5)", spinner: e3.spinner, text: e3.text, fullscreen: n3 === document.body && (e3.fullscreen ?? true), lock: e3.lock ?? false, visible: e3.visible ?? true, target: n3 };
|
|
25
|
+
})(e2), t2 = n2.parent ?? document.body;
|
|
26
|
+
if (n2.fullscreen && !_(q)) return q;
|
|
27
|
+
if ((function(e3 = document.body) {
|
|
28
|
+
const n3 = V(e3) ?? "0";
|
|
29
|
+
e3.setAttribute(N, `${Number.parseInt(n3, 10) + 1}`);
|
|
30
|
+
})(n2 == null ? void 0 : n2.parent), w.has(t2)) return w.get(t2);
|
|
31
|
+
const o2 = (function(e3) {
|
|
32
|
+
const n3 = x(e3.visible), t3 = x(false), o3 = () => {
|
|
33
|
+
t3.value && a2();
|
|
34
|
+
}, i2 = y({ ...e3, onAfterLeave: o3 }), a2 = () => {
|
|
35
|
+
var _a2, _b;
|
|
36
|
+
const e4 = i2.parent;
|
|
37
|
+
!(function(e5 = document.body) {
|
|
38
|
+
const n4 = V(e5);
|
|
39
|
+
if (n4) {
|
|
40
|
+
const t4 = Number.parseInt(n4, 10) - 1;
|
|
41
|
+
0 === t4 ? (function(e6 = document.body) {
|
|
42
|
+
e6.removeAttribute(N);
|
|
43
|
+
})(e5) : e5.setAttribute(N, `${t4}`);
|
|
44
|
+
}
|
|
45
|
+
})(e4), V(e4) || (I((() => {
|
|
46
|
+
!(function(e5 = document.body) {
|
|
47
|
+
e5.classList.remove(j);
|
|
48
|
+
})(e4), T(e4);
|
|
49
|
+
}), 1), w.delete(e4 ?? document.body), (_b = (_a2 = s2.$el) == null ? void 0 : _a2.parentNode) == null ? void 0 : _b.removeChild(s2.$el), r2.unmount());
|
|
50
|
+
};
|
|
51
|
+
let l2;
|
|
52
|
+
const r2 = k(P, { ...i2, zIndex: i2.fullscreen ? S() : void 0, visible: n3 }), s2 = r2.mount(document.createElement("div"));
|
|
53
|
+
return { get $el() {
|
|
54
|
+
return s2.$el;
|
|
55
|
+
}, vm: s2, close: () => {
|
|
56
|
+
var _a2;
|
|
57
|
+
e3.beforeClose && !e3.beforeClose() || (t3.value = true, clearTimeout(l2), l2 = A(o3), n3.value = false, (_a2 = e3.closed) == null ? void 0 : _a2.call(e3));
|
|
58
|
+
}, visible: n3, setText: (e4) => i2.text = e4 };
|
|
59
|
+
})({ ...n2, closed: () => {
|
|
60
|
+
var _a2;
|
|
61
|
+
(_a2 = n2.closed) == null ? void 0 : _a2.call(n2), n2.fullscreen && (q = null);
|
|
62
|
+
} });
|
|
63
|
+
return (function(e3, n3 = document.body) {
|
|
64
|
+
e3.lock ? (function(e4 = document.body) {
|
|
65
|
+
e4.classList.add(F);
|
|
66
|
+
})(n3) : T(n3), (function(e4 = document.body) {
|
|
67
|
+
e4.classList.add(j);
|
|
68
|
+
})(n3);
|
|
69
|
+
})(e2, n2 == null ? void 0 : n2.parent), (_a = n2.parent) == null ? void 0 : _a.appendChild(o2.$el), g((() => o2.visible.value = !!n2.visible)), n2.fullscreen && (q = o2), w.set(t2, o2), o2;
|
|
70
|
+
}
|
|
71
|
+
const E = Symbol("loading");
|
|
72
|
+
function M(e2, n2) {
|
|
73
|
+
const t2 = (n3) => e2.getAttribute(`px-loading-${n3}`), o2 = (e3) => n2.modifiers[e3], i2 = o2("fullscreen"), a2 = { text: t2("text"), spinner: t2("spinner"), background: t2("background"), target: i2 ? void 0 : e2, body: o2("body"), lock: o2("lock"), fullscreen: i2 };
|
|
74
|
+
e2[E] = { options: a2, instance: B(a2) };
|
|
75
|
+
}
|
|
76
|
+
const Z = { mounted(e2, n2) {
|
|
77
|
+
n2.value && M(e2, n2);
|
|
78
|
+
}, updated(e2, n2) {
|
|
79
|
+
var _a;
|
|
80
|
+
n2.oldValue !== n2.value && (!n2.value || n2.oldValue ? (_a = e2[E]) == null ? void 0 : _a.instance.close() : M(e2, n2));
|
|
81
|
+
}, unmounted(e2) {
|
|
82
|
+
var _a;
|
|
83
|
+
(_a = e2[E]) == null ? void 0 : _a.instance.close(), e2[E] = void 0;
|
|
84
|
+
} }, D = n(h), G = { name: "PxLoading", install(e2) {
|
|
85
|
+
e2.directive("loading", Z), e2.config.globalProperties.$loading = B;
|
|
86
|
+
}, directive: Z, service: B };
|
|
87
|
+
export {
|
|
88
|
+
B as L,
|
|
89
|
+
G as P,
|
|
90
|
+
D as a,
|
|
91
|
+
Z as v
|
|
92
|
+
};
|