sakana-element 2.4.2 → 2.5.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/dist/es/Alert-Bh6HeGRU.js +57 -0
- package/dist/es/Avatar-NF4bQN7G.js +5 -0
- package/dist/es/Badge-CHgxCwjo.js +7 -0
- package/dist/es/Breadcrumb-lEWE4Gu6.js +6 -0
- package/dist/es/Button-BM129Q7H.js +28 -0
- package/dist/es/Card-DAAF5q-g.js +8 -0
- package/dist/es/Carousel-Cc98Eg3m.js +11 -0
- package/dist/es/ChatBubble-DvRSjkcV.js +5 -0
- package/dist/es/Checkbox-WwH8lZhh.js +228 -0
- package/dist/es/Collapse-CR_RWE5e.js +11 -0
- package/dist/es/Collapsible-BHg6BxmU.js +12 -0
- package/dist/es/Command-DM1kXZ6n.js +45 -0
- package/dist/es/ConfigProvider-Bfp86-Oj.js +35 -0
- package/dist/es/Diff-Cs62zIBX.js +17 -0
- package/dist/es/Divider-Yq-jZAD6.js +5 -0
- package/dist/es/Drawer-DTIUkiIQ.js +6 -0
- package/dist/es/Dropdown-uSRkAnxr.js +115 -0
- package/dist/es/FileInput-rT_BAYOK.js +113 -0
- package/dist/es/Filter-pj4lwoJ3.js +13 -0
- package/dist/es/Icon-DXRJjblp.js +3 -0
- package/dist/es/Indicator-BeFoSuXk.js +5 -0
- package/dist/es/Input-DL5clGaQ.js +8 -0
- package/dist/es/Kbd-BK_mWOUQ.js +5 -0
- package/dist/es/Link-t_r2AmyI.js +5 -0
- package/dist/es/Loading-CfMeogGy.js +27 -0
- package/dist/es/Message-DVd-37vE.js +51 -0
- package/dist/es/Notification-DzFscVIb.js +22 -0
- package/dist/es/Pixelate-CnY7ulip.js +12 -0
- package/dist/es/Popconfirm-BeIJD0c1.js +8 -0
- package/dist/es/Progress-DkjXY0in.js +6 -0
- package/dist/es/Radio-BEFq7s6x.js +11 -0
- package/dist/es/Resizable-CiWcvscr.js +59 -0
- package/dist/es/Select-_AakAT4E.js +31 -0
- package/dist/es/Skeleton-HaEvHu7t.js +7 -0
- package/dist/es/Switch-DTwoMkmG.js +11 -0
- package/dist/es/Table-CtnNz-I3.js +5 -0
- package/dist/es/Tooltip-C3XS2Ue8.js +4 -0
- package/dist/es/Validator-B_i9IpaG.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 +1 -2
- 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,92 +0,0 @@
|
|
|
1
|
-
import { _ as e, w as n } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as t, computed as o, createElementBlock as a, openBlock as i, 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 { a as L } from "./hooks-dJGu-5DG.js";
|
|
4
|
-
import { i as _, d as $, q as A, r as I } from "./vendor-eombfMkP.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) => (i(), a("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) => (i(), 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 ? (i(), c(h, { key: 0, variant: "spinner", size: "lg" })) : m("", true), e3.text ? (i(), a("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", q = /* @__PURE__ */ new Map(), { nextZIndex: w } = L(3e3);
|
|
13
|
-
function S(e2 = document.body) {
|
|
14
|
-
e2.classList.remove(F);
|
|
15
|
-
}
|
|
16
|
-
function T(e2 = document.body) {
|
|
17
|
-
return e2.getAttribute(N);
|
|
18
|
-
}
|
|
19
|
-
let V = 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 && !_(V)) return V;
|
|
27
|
-
if ((function(e3 = document.body) {
|
|
28
|
-
const n3 = T(e3) ?? "0";
|
|
29
|
-
e3.setAttribute(N, `${Number.parseInt(n3, 10) + 1}`);
|
|
30
|
-
})(n2 == null ? void 0 : n2.parent), q.has(t2)) return q.get(t2);
|
|
31
|
-
const o2 = (function(e3) {
|
|
32
|
-
const n3 = x(e3.visible), t3 = x(false), o3 = () => {
|
|
33
|
-
t3.value && i2();
|
|
34
|
-
}, a2 = y({ ...e3, onAfterLeave: o3 }), i2 = () => {
|
|
35
|
-
var _a2, _b;
|
|
36
|
-
const e4 = a2.parent;
|
|
37
|
-
!(function(e5 = document.body) {
|
|
38
|
-
const n4 = T(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), T(e4) || (I((() => {
|
|
46
|
-
!(function(e5 = document.body) {
|
|
47
|
-
e5.classList.remove(j);
|
|
48
|
-
})(e4), S(e4);
|
|
49
|
-
}), 1), q.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, { ...a2, zIndex: a2.fullscreen ? w() : 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) => a2.text = e4 };
|
|
59
|
-
})({ ...n2, closed: () => {
|
|
60
|
-
var _a2;
|
|
61
|
-
(_a2 = n2.closed) == null ? void 0 : _a2.call(n2), n2.fullscreen && (V = null);
|
|
62
|
-
} });
|
|
63
|
-
return (function(e3, n3 = document.body) {
|
|
64
|
-
e3.lock ? (function(e4 = document.body) {
|
|
65
|
-
e4.classList.add(F);
|
|
66
|
-
})(n3) : S(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 && (V = o2), q.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], a2 = o2("fullscreen"), i2 = { text: t2("text"), spinner: t2("spinner"), background: t2("background"), target: a2 ? void 0 : e2, body: o2("body"), lock: o2("lock"), fullscreen: a2 };
|
|
74
|
-
e2[E] = { options: i2, instance: B(i2) };
|
|
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
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { t as e, b as o, R as t, h as s, i as n, j as a } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as l, ref as i, computed as r, watch as c, onMounted as u, onBeforeUnmount as p, createBlock as d, openBlock as f, Transition as m, withCtx as g, withDirectives as y, createElementVNode as v, normalizeStyle as x, normalizeClass as b, createVNode as h, createElementBlock as B, createCommentVNode as _, renderSlot as C, unref as w, withModifiers as k, vShow as I, shallowReactive as T, isVNode as P, h as $, render as O, reactive as M, nextTick as z, createTextVNode as A, toDisplayString as E, resolveDynamicComponent as j, withKeys as L, Fragment as V } from "vue";
|
|
3
|
-
import { f as D, a as N, u as R, g as S, h as H, i as K, b as Z } from "./hooks-dJGu-5DG.js";
|
|
4
|
-
import { P as U } from "./Icon-BulvH9Wm.js";
|
|
5
|
-
import { u as q, r as F, f as G, d as J, v as Q, g as W, w as X, i as Y, x as ee, y as oe, z as te, A as se } from "./vendor-eombfMkP.js";
|
|
6
|
-
import { b as ne } from "./Button-GsSCWg5x.js";
|
|
7
|
-
import { _ as ae } from "./Input-BUHFulIW.js";
|
|
8
|
-
import { P as le } from "./Overlay-DeyTycv0.js";
|
|
9
|
-
const ie = ["aria-live"], re = { class: "px-message__content" }, ce = { key: 0, class: "px-message__close" }, ue = l({ name: "PxMessage", __name: "Message", props: { id: {}, message: {}, duration: { default: 3e3 }, showClose: { type: Boolean }, center: { type: Boolean }, type: { default: "info" }, offset: { default: 10 }, zIndex: {}, transitionName: { default: "fade-up" }, plain: { type: Boolean }, ghost: { type: Boolean }, icon: {}, showTimer: { type: Boolean, default: true }, onDestroy: {} }, setup(s2, { expose: n2 }) {
|
|
10
|
-
const a2 = s2, l2 = i(false), T2 = i(), P2 = i(0), { topOffset: $2, bottomOffset: O2 } = D({ getLastBottomOffset: q(ve, a2), offset: a2.offset, boxHeight: P2 }), M2 = r((() => a2.icon ?? e.get(a2.type) ?? "circle-info")), z2 = r((() => ({ top: o($2.value), zIndex: a2.zIndex })));
|
|
11
|
-
let A2;
|
|
12
|
-
function E2() {
|
|
13
|
-
0 !== a2.duration && (A2 = F(L2, a2.duration));
|
|
14
|
-
}
|
|
15
|
-
function j2() {
|
|
16
|
-
clearTimeout(A2);
|
|
17
|
-
}
|
|
18
|
-
function L2() {
|
|
19
|
-
j2(), l2.value = false;
|
|
20
|
-
}
|
|
21
|
-
return c(l2, ((e2) => {
|
|
22
|
-
e2 || (P2.value = -a2.offset);
|
|
23
|
-
})), u((() => {
|
|
24
|
-
l2.value = true, E2();
|
|
25
|
-
})), p((() => j2())), n2({ close: L2, bottomOffset: O2 }), (e2, o2) => (f(), d(m, { name: e2.transitionName, onEnter: o2[0] || (o2[0] = (e3) => P2.value = T2.value.getBoundingClientRect().height), onAfterLeave: o2[1] || (o2[1] = (o3) => !l2.value && e2.onDestroy()) }, { default: g((() => [y(v("div", { ref_key: "messageRef", ref: T2, class: b(["px-message", { [`px-message--${e2.type}`]: e2.type, "is-close": e2.showClose, "text-center": e2.center, "is-plain": e2.plain, "is-ghost": e2.ghost }]), style: x(z2.value), role: "alert", "aria-live": "danger" === e2.type || "warning" === e2.type ? "assertive" : "polite", onMouseenter: j2, onMouseleave: E2 }, [h(U, { class: "px-message__icon", icon: M2.value }, null, 8, ["icon"]), v("div", re, [C(e2.$slots, "default", {}, (() => [e2.message ? (f(), d(w(t), { key: 0, vNode: e2.message }, null, 8, ["vNode"])) : _("", true)]))]), e2.showClose ? (f(), B("div", ce, [h(U, { icon: "close", onClick: k(L2, ["stop"]) })])) : _("", true), e2.showTimer && e2.duration > 0 ? (f(), B("div", { key: 1, class: "px-message__timer", style: x({ animationDuration: `${e2.duration}ms` }) }, null, 4)) : _("", true)], 46, ie), [[I, l2.value]])])), _: 3 }, 8, ["name"]));
|
|
26
|
-
} }), pe = ["info", "success", "warning", "danger", "error"], de = T([]), { nextZIndex: fe } = N(), me = n((() => de.length ? de[de.length - 1] : void 0)), ge = { type: "info", duration: 3e3, offset: 10, transitionName: "fade-up" }, ye = (e2) => {
|
|
27
|
-
const o2 = !e2 || P(e2) || J(e2) ? { message: e2 } : e2;
|
|
28
|
-
return { ...ge, ...o2 };
|
|
29
|
-
};
|
|
30
|
-
function ve() {
|
|
31
|
-
const e2 = Q(de, { id: this.id });
|
|
32
|
-
return e2 <= 0 ? 0 : W(de, [e2 - 1, "vm", "exposed", "bottomOffset", "value"]);
|
|
33
|
-
}
|
|
34
|
-
const xe = (e2 = {}) => {
|
|
35
|
-
const o2 = ye(e2), t2 = (!e2 || P(e2) || J(e2) ? {} : e2).max;
|
|
36
|
-
return t2 && t2 > 0 && s(de, t2), ((e3) => {
|
|
37
|
-
const o3 = R().value, t3 = document.createElement("div"), s2 = { ...e3, id: o3, zIndex: fe(), onDestroy: () => {
|
|
38
|
-
const e4 = Q(de, { id: o3 });
|
|
39
|
-
-1 !== e4 && (de.splice(e4, 1), O(null, t3), me.unregister());
|
|
40
|
-
} }, n2 = $(ue, s2);
|
|
41
|
-
O(n2, t3), document.body.appendChild(t3.firstElementChild);
|
|
42
|
-
const a2 = n2.component, l2 = { close: () => a2.exposed.close() }, i2 = { props: s2, id: o3, vm: a2, vnode: n2, handler: l2 };
|
|
43
|
-
return de.push(i2), me.register(), i2;
|
|
44
|
-
})(o2).handler;
|
|
45
|
-
};
|
|
46
|
-
G(pe, ((e2) => {
|
|
47
|
-
X(xe, e2, ((o2) => {
|
|
48
|
-
const t2 = ye(o2);
|
|
49
|
-
return xe({ ...t2, type: e2 });
|
|
50
|
-
}));
|
|
51
|
-
})), xe.closeAll = function(e2) {
|
|
52
|
-
G(de, ((o2) => {
|
|
53
|
-
e2 ? o2.props.type === e2 && o2.handler.close() : o2.handler.close();
|
|
54
|
-
}));
|
|
55
|
-
};
|
|
56
|
-
const be = a(xe, "$message"), he = { class: "px-message-box__content" }, Be = { key: 1, class: "px-message-box__message" }, _e = { class: "px-message-box__input" }, Ce = { key: 0, class: "px-message-box__error" }, we = { class: "px-message-box__footer" }, ke = l({ name: "PxMessageBox", inheritAttrs: false, __name: "MessageBox", props: { visible: {}, doClose: {}, doAction: {}, destroy: {}, title: {}, message: {}, type: {}, boxType: { default: "" }, icon: {}, callback: {}, showClose: { type: Boolean, default: true }, showInput: { type: Boolean }, showCancelButton: { type: Boolean }, showConfirmButton: { type: Boolean, default: true }, cancelButtonText: {}, confirmButtonText: {}, cancelButtonLoading: { type: Boolean }, confirmButtonLoading: { type: Boolean }, cancelButtonDisabled: { type: Boolean }, confirmButtonDisabled: { type: Boolean }, cancelButtonType: {}, confirmButtonType: { default: "primary" }, roundButton: { type: Boolean, default: false }, center: { type: Boolean }, lockScroll: { type: Boolean, default: true }, closeOnClickModal: { type: Boolean, default: true }, inputPlaceholder: {}, inputValue: { default: "" }, inputType: {}, buttonSize: {}, beforeClose: {}, customClass: {}, customStyle: {}, width: {}, closeOnPressEscape: { type: Boolean, default: true }, inputSchema: {}, inputErrorMessage: {}, distinguishCancelAndClose: { type: Boolean, default: true }, overlayClass: {}, closeOnHashChange: { type: Boolean, default: true }, draggable: { type: Boolean, default: false }, footer: {} }, setup(o2) {
|
|
57
|
-
const s2 = o2, n2 = S(), { doAction: a2 } = s2, { nextZIndex: l2 } = N(), u2 = i(), p2 = i(), T2 = i(), P2 = i(), $2 = R(), O2 = `msgbox-title-${R().value}`, D2 = M({ ...s2, zIndex: l2() }), q2 = r((() => {
|
|
58
|
-
var _a;
|
|
59
|
-
return ((_a = s2.visible) == null ? void 0 : _a.value) ?? false;
|
|
60
|
-
})), F2 = r((() => !!D2.message)), G2 = r((() => D2.icon ?? e.get(D2.type ?? ""))), J2 = r((() => ({ ...D2.customStyle, ...D2.width ? { "--px-message-box-width": "number" == typeof D2.width ? `${D2.width}px` : D2.width } : {} }))), Q2 = i(""), { activate: W2, deactivate: X2 } = H(u2), { reset: oe2 } = K(r((() => D2.draggable ? u2.value : void 0)), r((() => D2.draggable ? p2.value : void 0)), { constrainToViewport: true });
|
|
61
|
-
function te2() {
|
|
62
|
-
s2.closeOnClickModal && re2();
|
|
63
|
-
}
|
|
64
|
-
function se2(e2) {
|
|
65
|
-
if ("textarea" !== D2.inputType) return e2.preventDefault(), ie2("confirm");
|
|
66
|
-
}
|
|
67
|
-
function ie2(e2) {
|
|
68
|
-
if ("confirm" !== e2 || !D2.showInput || (function() {
|
|
69
|
-
var _a;
|
|
70
|
-
if (!D2.inputSchema) return true;
|
|
71
|
-
const e3 = D2.inputSchema.safeParse(D2.inputValue ?? "");
|
|
72
|
-
return e3.success ? (Q2.value = "", true) : (Q2.value = D2.inputErrorMessage ?? ((_a = e3.error.issues[0]) == null ? void 0 : _a.message) ?? n2.value.t("messagebox.error"), false);
|
|
73
|
-
})()) if (ee(s2.beforeClose)) {
|
|
74
|
-
const o3 = "confirm" === e2 ? "confirmButtonLoading" : "cancel" === e2 ? "cancelButtonLoading" : void 0;
|
|
75
|
-
let t2;
|
|
76
|
-
o3 && (D2[o3] = true);
|
|
77
|
-
try {
|
|
78
|
-
t2 = s2.beforeClose(e2, D2, (() => {
|
|
79
|
-
o3 && (D2[o3] = false), a2(e2, D2.inputValue);
|
|
80
|
-
}));
|
|
81
|
-
} catch {
|
|
82
|
-
return void (o3 && (D2[o3] = false));
|
|
83
|
-
}
|
|
84
|
-
t2 instanceof Promise && t2.catch((() => {
|
|
85
|
-
o3 && (D2[o3] = false);
|
|
86
|
-
}));
|
|
87
|
-
} else a2(e2, D2.inputValue);
|
|
88
|
-
}
|
|
89
|
-
function re2() {
|
|
90
|
-
ie2(false === D2.distinguishCancelAndClose ? "cancel" : "close");
|
|
91
|
-
}
|
|
92
|
-
return c((() => {
|
|
93
|
-
var _a;
|
|
94
|
-
return (_a = s2.visible) == null ? void 0 : _a.value;
|
|
95
|
-
}), ((e2) => {
|
|
96
|
-
e2 ? (D2.zIndex = l2(), oe2(), z((() => {
|
|
97
|
-
var _a, _b, _c;
|
|
98
|
-
"prompt" === s2.boxType ? (_a = T2.value) == null ? void 0 : _a.focus() : (_c = (_b = P2.value) == null ? void 0 : _b.$el) == null ? void 0 : _c.focus(), W2();
|
|
99
|
-
}))) : (X2(), Q2.value = "");
|
|
100
|
-
})), Z(document, "keydown", ((e2) => {
|
|
101
|
-
D2.closeOnPressEscape && q2.value && "Escape" === e2.key && re2();
|
|
102
|
-
})), Z(window, "hashchange", (() => {
|
|
103
|
-
D2.closeOnHashChange && q2.value && re2();
|
|
104
|
-
})), (e2, o3) => (f(), d(m, { name: "fade-in-linear", onAfterLeave: e2.destroy }, { default: g((() => [y(h(le, { "z-index": D2.zIndex, "overlay-class": D2.overlayClass, mask: "" }, { default: g((() => [v("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": O2, class: "px-overlay-message-box", onClick: te2 }, [v("div", { ref_key: "rootRef", ref: u2, class: b(["px-message-box", { "is-center": D2.center, "is-draggable": D2.draggable }, D2.type ? `px-message-box--${D2.type}` : "", D2.customClass]), style: x(J2.value), onClick: o3[5] || (o3[5] = k((() => {
|
|
105
|
-
}), ["stop"])) }, [w(Y)(D2.title) ? _("", true) : (f(), B("div", { key: 0, ref_key: "headerRef", ref: p2, class: "px-message-box__header" }, [v("div", { class: "px-message-box__title", id: O2 }, [G2.value && D2.center ? (f(), d(U, { key: 0, class: b({ [`px-icon-${D2.type}`]: D2.type }), icon: G2.value }, null, 8, ["class", "icon"])) : _("", true), A(" " + E(D2.title), 1)]), e2.showClose ? (f(), B("button", { key: 0, class: "px-message-box__header-btn", onClick: k(re2, ["stop"]) }, [h(U, { icon: "close" })])) : _("", true)], 512)), v("div", he, [G2.value && !D2.center && F2.value ? (f(), d(U, { key: 0, class: b({ [`px-icon-${D2.type}`]: D2.type }), icon: G2.value }, null, 8, ["class", "icon"])) : _("", true), F2.value ? (f(), B("div", Be, [C(e2.$slots, "default", {}, (() => [(f(), d(j(D2.showInput ? "label" : "p"), { for: D2.showInput ? w($2) : void 0 }, { default: g((() => [A(E(D2.message), 1)])), _: 1 }, 8, ["for"]))]))])) : _("", true)]), y(v("div", _e, [h(ae, { modelValue: D2.inputValue, "onUpdate:modelValue": o3[0] || (o3[0] = (e3) => D2.inputValue = e3), ref_key: "inputRef", ref: T2, placeholder: D2.inputPlaceholder, type: D2.inputType, onKeyup: L(se2, ["enter"]) }, null, 8, ["modelValue", "placeholder", "type"]), Q2.value ? (f(), B("div", Ce, E(Q2.value), 1)) : _("", true)], 512), [[I, D2.showInput]]), v("div", we, [D2.footer ? (f(), d(w(t), { key: 0, vNode: D2.footer }, null, 8, ["vNode"])) : (f(), B(V, { key: 1 }, [D2.showCancelButton ? (f(), d(ne, { key: 0, class: "px-message-box__footer-btn px-message-box__cancel-btn", type: D2.cancelButtonType, round: D2.roundButton, loading: D2.cancelButtonLoading, onClick: o3[1] || (o3[1] = (e3) => ie2("cancel")), onKeydown: o3[2] || (o3[2] = L(k(((e3) => ie2("cancel")), ["prevent"]), ["enter"])) }, { default: g((() => [A(E(D2.cancelButtonText || w(n2).t("messagebox.cancel")), 1)])), _: 1 }, 8, ["type", "round", "loading"])) : _("", true), y(h(ne, { ref_key: "confirmBtnRef", ref: P2, class: "px-message-box__footer-btn px-message-box__confirm-btn", type: D2.confirmButtonType ?? "primary", round: D2.roundButton, loading: D2.confirmButtonLoading, onClick: o3[3] || (o3[3] = (e3) => ie2("confirm")), onKeydown: o3[4] || (o3[4] = L(k(((e3) => ie2("confirm")), ["prevent"]), ["enter"])) }, { default: g((() => [A(E(D2.confirmButtonText || w(n2).t("messagebox.confirm")), 1)])), _: 1 }, 8, ["type", "round", "loading"]), [[I, D2.showConfirmButton]])], 64))])], 6)])])), _: 3 }, 8, ["z-index", "overlay-class"]), [[I, q2.value]])])), _: 3 }, 8, ["onAfterLeave"]));
|
|
106
|
-
} }), Ie = /* @__PURE__ */ new Map();
|
|
107
|
-
function Te(e2) {
|
|
108
|
-
let o2;
|
|
109
|
-
J(e2) || P(e2) ? e2 = { message: e2 } : o2 = e2.callback;
|
|
110
|
-
const t2 = new Promise(((t3, s2) => {
|
|
111
|
-
const n2 = (function(e3) {
|
|
112
|
-
const o3 = document.createElement("div"), t4 = (function(e4, o4) {
|
|
113
|
-
const t5 = i(false), s4 = ee(e4 == null ? void 0 : e4.message) || P(e4 == null ? void 0 : e4.message), n3 = h(ke, { ...e4, visible: t5 }, s4 ? { default: (a2 = e4.message, ee(a2) ? a2 : () => a2) } : void 0);
|
|
114
|
-
var a2;
|
|
115
|
-
return O(n3, o4), document.body.appendChild(o4.firstElementChild), n3.component;
|
|
116
|
-
})({ ...e3, doClose: () => {
|
|
117
|
-
s3.visible.value = false;
|
|
118
|
-
}, doAction: (o4, t5) => {
|
|
119
|
-
const n3 = Ie.get(s3);
|
|
120
|
-
let a2;
|
|
121
|
-
z((() => s3.doClose())), a2 = e3.showInput ? { value: t5, action: o4 } : o4, e3.callback ? e3.callback(a2) : "cancel" !== o4 && "close" !== o4 ? n3 == null ? void 0 : n3.resolve(a2) : n3 == null ? void 0 : n3.reject(o4);
|
|
122
|
-
}, destroy: () => {
|
|
123
|
-
O(null, o3), Ie.delete(s3);
|
|
124
|
-
} }, o3), s3 = t4 == null ? void 0 : t4.proxy;
|
|
125
|
-
return s3.visible.value = true, s3;
|
|
126
|
-
})(e2);
|
|
127
|
-
Ie.set(n2, { options: e2, callback: o2, resolve: t3, reject: s2 });
|
|
128
|
-
}));
|
|
129
|
-
return t2.catch((() => {
|
|
130
|
-
})), t2;
|
|
131
|
-
}
|
|
132
|
-
const Pe = { alert: { closeOnClickModal: false }, confirm: { showCancelButton: true }, prompt: { showCancelButton: true, showInput: true } };
|
|
133
|
-
G(["alert", "confirm", "prompt"], ((e2) => {
|
|
134
|
-
return X(Te, e2, (o2 = e2, (e3, t2, s2) => {
|
|
135
|
-
let n2 = "";
|
|
136
|
-
return te(t2) ? (s2 = t2, n2 = "") : n2 = se(t2) ? "" : t2, Te(oe({ title: n2, message: e3, type: "", boxType: o2, ...Pe[o2] }, s2));
|
|
137
|
-
}));
|
|
138
|
-
var o2;
|
|
139
|
-
})), X(Te, "close", (() => {
|
|
140
|
-
Ie.forEach(((e2, o2) => {
|
|
141
|
-
o2.doClose();
|
|
142
|
-
})), Ie.clear();
|
|
143
|
-
}));
|
|
144
|
-
const $e = Te;
|
|
145
|
-
X($e, "install", ((e2) => {
|
|
146
|
-
e2.config.globalProperties.$msgbox = Te, e2.config.globalProperties.$messagebox = Te, e2.config.globalProperties.$alert = Te.alert, e2.config.globalProperties.$confirm = Te.confirm, e2.config.globalProperties.$prompt = Te.prompt;
|
|
147
|
-
}));
|
|
148
|
-
export {
|
|
149
|
-
be as P,
|
|
150
|
-
$e as a,
|
|
151
|
-
pe as m
|
|
152
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { t, b as o, R as e, _ as n, h as i, i as s, j as a } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as l, ref as r, computed as c, onMounted as p, onBeforeUnmount as f, createBlock as d, openBlock as u, Transition as m, withCtx as h, withDirectives as v, createElementVNode as g, normalizeStyle as x, normalizeClass as y, createVNode as _, createElementBlock as C, createCommentVNode as w, toDisplayString as b, renderSlot as k, unref as I, withModifiers as N, vShow as z, isVNode as B, h as j, render as E, shallowReactive as O } from "vue";
|
|
3
|
-
import { f as $, a as D, u as T } from "./hooks-dJGu-5DG.js";
|
|
4
|
-
import { P as M } from "./Icon-BulvH9Wm.js";
|
|
5
|
-
import { u as P, r as R, f as A, d as L, v as W, g as H, w as Z } from "./vendor-eombfMkP.js";
|
|
6
|
-
const q = ["aria-live"], F = { class: "px-notification__text" }, G = { class: "px-notification__title" }, J = { class: "px-notification__content" }, K = { key: 0, class: "px-notification__close" }, Q = n(l({ name: "PxNotification", __name: "Notification", props: { title: {}, id: {}, zIndex: {}, position: { default: "top-right" }, type: { default: "info" }, message: {}, duration: { default: 3e3 }, showClose: { type: Boolean, default: true }, offset: { default: 20 }, transitionName: { default: "fade" }, icon: {}, plain: { type: Boolean }, ghost: { type: Boolean }, showTimer: { type: Boolean, default: true }, onClick: {}, onClose: {}, onDestroy: {} }, setup(n2, { expose: i2 }) {
|
|
7
|
-
const s2 = n2, a2 = r(false), l2 = r(), B2 = r(0), { topOffset: j2, bottomOffset: E2 } = $({ getLastBottomOffset: P(it, s2), offset: s2.offset, boxHeight: B2 }), O2 = c((() => s2.icon ?? t.get(s2.type) ?? "circle-info")), D2 = c((() => s2.position.endsWith("right") ? "right" : "left")), T2 = c((() => s2.position.startsWith("top") ? "top" : "bottom")), A2 = c((() => ({ [T2.value]: o(j2.value), zIndex: s2.zIndex })));
|
|
8
|
-
let L2;
|
|
9
|
-
function W2() {
|
|
10
|
-
0 !== s2.duration && (L2 = R(Z2, s2.duration));
|
|
11
|
-
}
|
|
12
|
-
function H2() {
|
|
13
|
-
clearTimeout(L2);
|
|
14
|
-
}
|
|
15
|
-
function Z2() {
|
|
16
|
-
H2(), a2.value = false;
|
|
17
|
-
}
|
|
18
|
-
return p((() => {
|
|
19
|
-
a2.value = true, W2();
|
|
20
|
-
})), f((() => H2())), i2({ bottomOffset: E2, close: Z2 }), (t2, o2) => (u(), d(m, { name: `px-notification-${t2.transitionName}`, onAfterLeave: o2[1] || (o2[1] = (o3) => !a2.value && t2.onDestroy()), onEnter: o2[2] || (o2[2] = (t3) => B2.value = l2.value.getBoundingClientRect().height) }, { default: h((() => [v(g("div", { ref_key: "notifyRef", ref: l2, class: y(["px-notification", { [`px-notification--${t2.type}`]: t2.type, [D2.value]: true, "show-close": t2.showClose, "is-plain": t2.plain, "is-ghost": t2.ghost }]), style: x(A2.value), role: "alert", "aria-live": "danger" === t2.type || "warning" === t2.type ? "assertive" : "polite", onClick: o2[0] || (o2[0] = (...o3) => t2.onClick && t2.onClick(...o3)), onMouseenter: H2, onMouseleave: W2 }, [_(M, { icon: O2.value, class: "px-notification__icon" }, null, 8, ["icon"]), g("div", F, [g("div", G, b(t2.title), 1), g("div", J, [k(t2.$slots, "default", {}, (() => [t2.message ? (u(), d(I(e), { key: 0, vNode: t2.message }, null, 8, ["vNode"])) : w("", true)]), true)])]), t2.showClose ? (u(), C("div", K, [_(M, { icon: "close", onClick: N(Z2, ["stop"]) })])) : w("", true), t2.showTimer && t2.duration > 0 ? (u(), C("div", { key: 1, class: "px-notification__timer", style: x({ animationDuration: `${t2.duration}ms` }) }, null, 4)) : w("", true)], 46, q), [[z, a2.value]])])), _: 3 }, 8, ["name"]));
|
|
21
|
-
} }), [["__scopeId", "data-v-5c4c1be5"]]), S = ["info", "success", "warning", "danger", "error"], U = ["top-right", "top-left", "bottom-right", "bottom-left"], V = /* @__PURE__ */ new Map();
|
|
22
|
-
A(U, ((t2) => {
|
|
23
|
-
V.set(t2, O([]));
|
|
24
|
-
}));
|
|
25
|
-
const { nextZIndex: X } = D(), Y = s((() => {
|
|
26
|
-
let t2;
|
|
27
|
-
return V.forEach(((o2) => {
|
|
28
|
-
if (o2.length) {
|
|
29
|
-
const e2 = o2[o2.length - 1];
|
|
30
|
-
(!t2 || e2.props.zIndex > t2.props.zIndex) && (t2 = e2);
|
|
31
|
-
}
|
|
32
|
-
})), t2;
|
|
33
|
-
})), tt = { title: "", type: "info", duration: 3e3, offset: 20, position: "top-right", transitionName: "fade", showClose: true, showTimer: true }, ot = (t2) => {
|
|
34
|
-
const o2 = !t2 || B(t2) || L(t2) ? { message: t2 } : t2;
|
|
35
|
-
return { ...tt, ...o2 };
|
|
36
|
-
}, et = (t2) => V.get(t2), nt = (t2 = {}) => {
|
|
37
|
-
const o2 = ot(t2), e2 = (!t2 || B(t2) || L(t2) ? {} : t2).max, n2 = o2.position || "top-right";
|
|
38
|
-
return e2 && e2 > 0 && i(et(n2), e2), ((t3) => {
|
|
39
|
-
const o3 = T().value, e3 = document.createElement("div"), n3 = et(t3.position || "top-right"), i2 = { ...t3, id: o3, zIndex: X(), onDestroy: () => {
|
|
40
|
-
const t4 = W(n3, { id: o3 });
|
|
41
|
-
-1 !== t4 && (n3.splice(t4, 1), E(null, e3), Y.unregister());
|
|
42
|
-
} }, s2 = j(Q, i2);
|
|
43
|
-
E(s2, e3), document.body.appendChild(e3.firstElementChild);
|
|
44
|
-
const a2 = s2.component, l2 = { close: () => a2.exposed.close() }, r2 = { props: i2, id: o3, vm: a2, vnode: s2, handler: l2 };
|
|
45
|
-
return n3.push(r2), Y.register(), r2;
|
|
46
|
-
})(o2).handler;
|
|
47
|
-
};
|
|
48
|
-
function it() {
|
|
49
|
-
const t2 = et(this.position || "top-right"), o2 = W(t2, { id: this.id });
|
|
50
|
-
return o2 <= 0 ? 0 : H(t2, [o2 - 1, "vm", "exposed", "bottomOffset", "value"]);
|
|
51
|
-
}
|
|
52
|
-
A(S, ((t2) => {
|
|
53
|
-
Z(nt, t2, ((o2) => {
|
|
54
|
-
const e2 = ot(o2);
|
|
55
|
-
return nt({ ...e2, type: t2 });
|
|
56
|
-
}));
|
|
57
|
-
})), nt.closeAll = function(t2) {
|
|
58
|
-
V.forEach(((o2) => {
|
|
59
|
-
A(o2, ((o3) => {
|
|
60
|
-
t2 ? o3.props.type === t2 && o3.handler.close() : o3.handler.close();
|
|
61
|
-
}));
|
|
62
|
-
}));
|
|
63
|
-
};
|
|
64
|
-
const st = a(nt, "$notify");
|
|
65
|
-
export {
|
|
66
|
-
st as P,
|
|
67
|
-
U as a,
|
|
68
|
-
S as n
|
|
69
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineComponent as e, createElementBlock as s, openBlock as o, normalizeStyle as t, normalizeClass as a, renderSlot as l } from "vue";
|
|
2
|
-
import { _ as i } from "./utils-CnCdZsHG.js";
|
|
3
|
-
const d = i(e({ name: "PxOverlay", __name: "Overlay", props: { mask: { type: Boolean, default: true }, zIndex: {}, overlayClass: {} }, emits: ["click"], setup(e2, { emit: i2 }) {
|
|
4
|
-
const d2 = i2;
|
|
5
|
-
function n(e3) {
|
|
6
|
-
d2("click", e3);
|
|
7
|
-
}
|
|
8
|
-
return (e3, i3) => e3.mask ? (o(), s("div", { key: 0, class: a(["px-overlay", e3.overlayClass]), style: t({ zIndex: e3.zIndex }), onClick: n }, [l(e3.$slots, "default", {}, void 0, true)], 6)) : (o(), s("div", { key: 1, class: a(e3.overlayClass), style: t({ zIndex: e3.zIndex, position: "fixed", top: 0, left: 0, right: 0, bottom: 0 }) }, [l(e3.$slots, "default", {}, void 0, true)], 6));
|
|
9
|
-
} }), [["__scopeId", "data-v-a64cd74a"]]);
|
|
10
|
-
export {
|
|
11
|
-
d as P
|
|
12
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { b as e, p as t, w as n } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as a, ref as r, computed as i, watch as l, createElementBlock as u, openBlock as o, normalizeStyle as s, createElementVNode as c } from "vue";
|
|
3
|
-
const g = ["src"], d = n(a({ name: "PxPixelate", __name: "Pixelate", props: { src: {}, pixelSize: { default: 8 }, width: {}, height: {}, grayscale: { type: Boolean, default: false }, palette: {}, background: { default: "#FFFFFF" } }, emits: ["rendered", "error"], setup(n2, { expose: a2, emit: d2 }) {
|
|
4
|
-
const h = n2, p = d2, f = r(), v = r(), m = r(false), x = i((() => {
|
|
5
|
-
const t2 = {};
|
|
6
|
-
return null != h.width && (t2.width = e(h.width) ?? ""), null != h.height && (t2.height = e(h.height) ?? ""), t2;
|
|
7
|
-
})), y = i((() => {
|
|
8
|
-
const e2 = { "image-rendering": "pixelated" };
|
|
9
|
-
return null != h.width && (e2.width = "100%"), null != h.height && (e2.height = "100%"), e2;
|
|
10
|
-
}));
|
|
11
|
-
function w() {
|
|
12
|
-
const e2 = f.value, n3 = v.value;
|
|
13
|
-
e2 && n3 && m.value && (t(e2, n3, { pixelSize: h.pixelSize, grayscale: h.grayscale, palette: h.palette, background: h.background }), p("rendered"));
|
|
14
|
-
}
|
|
15
|
-
function k() {
|
|
16
|
-
m.value = true, w();
|
|
17
|
-
}
|
|
18
|
-
function F(e2) {
|
|
19
|
-
p("error", e2);
|
|
20
|
-
}
|
|
21
|
-
return l((() => [h.pixelSize, h.grayscale, h.palette, h.background]), (() => {
|
|
22
|
-
m.value && w();
|
|
23
|
-
})), l((() => h.src), (() => {
|
|
24
|
-
m.value = false;
|
|
25
|
-
})), a2({ render: function() {
|
|
26
|
-
w();
|
|
27
|
-
}, canvasRef: f, originRef: v, getSize: function() {
|
|
28
|
-
const e2 = f.value;
|
|
29
|
-
return { width: (e2 == null ? void 0 : e2.width) ?? 0, height: (e2 == null ? void 0 : e2.height) ?? 0 };
|
|
30
|
-
}, getImageData: function() {
|
|
31
|
-
const e2 = f.value;
|
|
32
|
-
if (!e2 || !m.value) return null;
|
|
33
|
-
const t2 = e2.getContext("2d");
|
|
34
|
-
return t2 ? t2.getImageData(0, 0, e2.width, e2.height) : null;
|
|
35
|
-
} }), (e2, t2) => (o(), u("div", { class: "px-pixelate", style: s(x.value) }, [c("canvas", { ref_key: "canvasRef", ref: f, style: s(y.value) }, null, 4), c("img", { ref_key: "originRef", ref: v, src: e2.src, style: { display: "none" }, crossorigin: "anonymous", onLoad: k, onError: F }, null, 40, g)], 4));
|
|
36
|
-
} }));
|
|
37
|
-
export {
|
|
38
|
-
d as P
|
|
39
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { b as o, _ as e, w as t } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as c, ref as n, computed as i, createBlock as l, openBlock as r, withCtx as a, renderSlot as f, createElementVNode as p, normalizeStyle as s, createCommentVNode as m, createTextVNode as d, toDisplayString as u, createVNode as _, unref as h } from "vue";
|
|
3
|
-
import { g as y } from "./hooks-dJGu-5DG.js";
|
|
4
|
-
import { b as B } from "./Button-GsSCWg5x.js";
|
|
5
|
-
import { P as x } from "./Icon-BulvH9Wm.js";
|
|
6
|
-
import { T as w } from "./Tooltip-DR4Mc5Fh.js";
|
|
7
|
-
const T = { class: "px-popconfirm__main" }, v = { class: "px-popconfirm__action" }, k = t(e(c({ name: "PxPopconfirm", __name: "Popconfirm", props: { title: { default: "" }, confirmButtonText: {}, cancelButtonText: {}, confirmButtonType: { default: "primary" }, cancelButtonType: {}, icon: { default: "question-circle" }, iconColor: { default: "#f90" }, hideIcon: { type: Boolean }, hideAfter: { default: 200 }, width: { default: 150 }, disabled: { type: Boolean }, placement: {}, showArrow: { type: Boolean }, effect: {} }, emits: ["confirm", "cancel"], setup(e2, { emit: t2 }) {
|
|
8
|
-
const c2 = e2, k2 = t2, b = y(), j = n(), P = i((() => ({ width: o(c2.width) })));
|
|
9
|
-
function g() {
|
|
10
|
-
var _a;
|
|
11
|
-
(_a = j.value) == null ? void 0 : _a.hide();
|
|
12
|
-
}
|
|
13
|
-
function A(o2) {
|
|
14
|
-
k2("confirm", o2), g();
|
|
15
|
-
}
|
|
16
|
-
function C(o2) {
|
|
17
|
-
k2("cancel", o2), g();
|
|
18
|
-
}
|
|
19
|
-
return (o2, e3) => (r(), l(w, { ref_key: "tooltipRef", ref: j, trigger: "click", "hide-timeout": o2.hideAfter, disabled: o2.disabled, placement: o2.placement, "show-arrow": o2.showArrow, effect: o2.effect }, { content: a((() => [p("div", { class: "px-popconfirm", role: "alertdialog", style: s(P.value) }, [p("div", T, [!o2.hideIcon && o2.icon ? (r(), l(x, { key: 0, icon: o2.icon, color: o2.iconColor }, null, 8, ["icon", "color"])) : m("", true), d(" " + u(o2.title), 1)]), p("div", v, [_(B, { class: "px-popconfirm__cancel", size: "small", type: o2.cancelButtonType, onClick: C }, { default: a((() => [d(u(o2.cancelButtonText || h(b).t("popconfirm.cancelButtonText")), 1)])), _: 1 }, 8, ["type"]), _(B, { class: "px-popconfirm__confirm", size: "small", type: o2.confirmButtonType, onClick: A }, { default: a((() => [d(u(o2.confirmButtonText || h(b).t("popconfirm.confirmButtonText")), 1)])), _: 1 }, 8, ["type"])])], 4)])), default: a((() => [f(o2.$slots, "reference", {}, (() => [f(o2.$slots, "default", {}, void 0, true)]), true)])), _: 3 }, 8, ["hide-timeout", "disabled", "placement", "show-arrow", "effect"]));
|
|
20
|
-
} }), [["__scopeId", "data-v-68772965"]]));
|
|
21
|
-
export {
|
|
22
|
-
k as P
|
|
23
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { r as e, c as t, w as r } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as a, computed as s, createElementBlock as o, openBlock as l, normalizeClass as i, createElementVNode as p, createCommentVNode as n, normalizeStyle as d, toDisplayString as u } from "vue";
|
|
3
|
-
const x = { "fill-color": "color", "fill-border-color": "dark", "track-border-color": "dark", "text-color": "dark", "shadow-color": "dark" }, c = ["aria-valuenow"], v = { class: "px-progress__track" }, m = { key: 0, class: "px-progress__inner-text" }, f = { key: 0, class: "px-progress__text" }, g = r(a({ name: "PxProgress", __name: "Progress", props: { percentage: { default: 0 }, type: { default: "primary" }, size: { default: "default" }, status: {}, variant: { default: "solid" }, stripedFlow: { type: Boolean, default: false }, indeterminate: { type: Boolean, default: false }, strokeWidth: { default: 0 }, showText: { type: Boolean, default: true }, textInside: { type: Boolean, default: false }, color: {}, format: {} }, setup(r2, { expose: a2 }) {
|
|
4
|
-
const g2 = r2, h = s((() => Math.max(0, Math.min(100, g2.percentage)))), k = s((() => g2.color ? "function" == typeof g2.color ? g2.color(h.value) : g2.color : "")), w = s((() => k.value ? e(t(k.value), "px-progress", x) : {})), y = s((() => {
|
|
5
|
-
const e2 = { ...w.value };
|
|
6
|
-
return g2.indeterminate || (e2.width = `${h.value}%`), g2.strokeWidth && (e2["--px-progress-height"] = `${g2.strokeWidth}px`), e2;
|
|
7
|
-
})), _ = s((() => g2.format ? g2.format(h.value) : `${h.value}%`)), $ = s((() => g2.status ? `px-progress--${g2.status}` : ""));
|
|
8
|
-
return a2({ clampedPercentage: h }), (e2, t2) => (l(), o("div", { class: i(["px-progress", [`px-progress--${e2.type}`, `px-progress--${e2.size}`, $.value, { [`px-progress--${e2.variant}`]: "solid" !== e2.variant, "is-striped-flow": e2.stripedFlow && "striped" === e2.variant, "is-indeterminate": e2.indeterminate, "is-text-inside": e2.textInside }]]), role: "progressbar", "aria-valuenow": e2.indeterminate ? void 0 : h.value, "aria-valuemin": 0, "aria-valuemax": 100 }, [p("div", v, [p("div", { class: "px-progress__fill", style: d(y.value) }, [e2.showText && e2.textInside && !e2.indeterminate ? (l(), o("span", m, u(_.value), 1)) : n("", true)], 4)]), !e2.showText || e2.textInside || e2.indeterminate ? n("", true) : (l(), o("span", f, u(_.value), 1))], 10, c));
|
|
9
|
-
} }));
|
|
10
|
-
export {
|
|
11
|
-
g as P
|
|
12
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { c as e, r as a, w as l } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as o, useSlots as d, inject as r, ref as u, computed as i, createElementBlock as t, openBlock as s, normalizeStyle as n, normalizeClass as c, createElementVNode as p, createCommentVNode as m, unref as v, renderSlot as f, createTextVNode as h, toDisplayString as b, provide as y } from "vue";
|
|
3
|
-
import { u as x } from "./hooks-dJGu-5DG.js";
|
|
4
|
-
import { u as _ } from "./Form-C1b8Igns.js";
|
|
5
|
-
const g = Symbol("radioGroupContext"), k = { "checked-color": "color", "checked-border-color": "dark" }, V = { class: "px-radio__input" }, z = ["aria-checked", "id", "name", "disabled", "checked"], B = { key: 0, class: "px-radio__label" }, R = o({ name: "PxRadio", inheritAttrs: false, __name: "Radio", props: { modelValue: { type: [String, Number, Boolean] }, value: { type: [String, Number, Boolean] }, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, label: {}, name: {}, id: {} }, emits: ["update:modelValue", "change"], setup(l2, { expose: o2, emit: y2 }) {
|
|
6
|
-
const R2 = l2, S2 = y2, $2 = d(), j2 = r(g, void 0), G2 = !!j2, { formItem: N } = _(), P = u(), C = x().value, E = i((() => G2 ? j2.modelValue.value === R2.value : R2.modelValue === R2.value)), I = i((() => !!(j2 == null ? void 0 : j2.disabled.value) || R2.disabled)), w = i((() => R2.size ?? (j2 == null ? void 0 : j2.size.value))), A = i((() => R2.type ?? (j2 == null ? void 0 : j2.type.value))), F = i((() => R2.color ?? (j2 == null ? void 0 : j2.color.value))), q = i((() => R2.name ?? (j2 == null ? void 0 : j2.name.value))), D = i((() => {
|
|
7
|
-
const l3 = F.value;
|
|
8
|
-
if (!l3) return {};
|
|
9
|
-
const o3 = e(l3);
|
|
10
|
-
return a(o3, "px-radio", k);
|
|
11
|
-
}));
|
|
12
|
-
function H() {
|
|
13
|
-
if (I.value) return;
|
|
14
|
-
if (E.value) return;
|
|
15
|
-
const e2 = R2.value;
|
|
16
|
-
G2 ? j2.changeEvent(e2) : (S2("update:modelValue", e2), S2("change", e2)), G2 || (N == null ? void 0 : N.validate("change").catch(((e3) => {
|
|
17
|
-
})));
|
|
18
|
-
}
|
|
19
|
-
return o2({ checked: E, focus: () => {
|
|
20
|
-
var _a;
|
|
21
|
-
(_a = P.value) == null ? void 0 : _a.focus();
|
|
22
|
-
} }), (e2, a2) => (s(), t("div", { class: c(["px-radio", { [`px-radio--${w.value}`]: w.value, [`px-radio--${A.value}`]: A.value, "is-disabled": I.value, "is-checked": E.value }]), style: n(D.value), onClick: H }, [p("span", V, [p("input", { ref_key: "inputRef", ref: P, class: "px-radio__original", type: "radio", "aria-checked": E.value, id: e2.id || v(C), name: q.value, disabled: I.value, checked: E.value }, null, 8, z), a2[0] || (a2[0] = p("span", { class: "px-radio__inner" }, [p("span", { class: "px-radio__dot" })], -1))]), e2.label || v($2).default ? (s(), t("span", B, [f(e2.$slots, "default", {}, (() => [h(b(e2.label), 1)]))])) : m("", true)], 6));
|
|
23
|
-
} }), S = { class: "px-radio-group", role: "radiogroup" }, $ = o({ name: "PxRadioGroup", __name: "RadioGroup", props: { modelValue: { type: [String, Number, Boolean] }, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, name: {} }, emits: ["update:modelValue", "change"], setup(e2, { emit: a2 }) {
|
|
24
|
-
const l2 = e2, o2 = a2, { formItem: d2 } = _();
|
|
25
|
-
return y(g, { modelValue: i((() => l2.modelValue)), disabled: i((() => l2.disabled)), size: i((() => l2.size)), type: i((() => l2.type)), color: i((() => l2.color)), name: i((() => l2.name)), changeEvent: (e3) => {
|
|
26
|
-
o2("update:modelValue", e3), o2("change", e3), d2 == null ? void 0 : d2.validate("change").catch(((e4) => {
|
|
27
|
-
}));
|
|
28
|
-
} }), (e3, a3) => (s(), t("div", S, [f(e3.$slots, "default")]));
|
|
29
|
-
} }), j = l(R), G = l($);
|
|
30
|
-
export {
|
|
31
|
-
j as P,
|
|
32
|
-
G as a
|
|
33
|
-
};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { a as e, w as i } from "./utils-CnCdZsHG.js";
|
|
2
|
-
import { defineComponent as t, ref as n, reactive as a, shallowRef as l, onMounted as o, onBeforeUnmount as s, computed as r, provide as u, createElementBlock as d, openBlock as c, normalizeClass as v, renderSlot as f, triggerRef as z, inject as p, normalizeStyle as m, watch as g } from "vue";
|
|
3
|
-
const S = Symbol("resizableGroupContext"), w = t({ name: "PxResizableGroup", __name: "ResizableGroup", props: { direction: {}, autoSaveId: {}, keyboardResizeBy: { default: 10 } }, emits: ["layout"], setup(i2, { emit: t2 }) {
|
|
4
|
-
const p2 = i2, m2 = t2, g2 = n(), w2 = a([]), x2 = l(/* @__PURE__ */ new Map()), b2 = a([]);
|
|
5
|
-
let h2 = 0, y2 = 0;
|
|
6
|
-
function P2(i3, t3, n2) {
|
|
7
|
-
const a2 = (x2.value.get(i3.id) ?? 0) + (x2.value.get(t3.id) ?? 0);
|
|
8
|
-
let l2 = a2 - (n2 = e(n2, i3.minSize, i3.maxSize));
|
|
9
|
-
l2 = e(l2, t3.minSize, t3.maxSize), n2 = a2 - l2, x2.value.set(i3.id, n2), x2.value.set(t3.id, l2), z(x2);
|
|
10
|
-
}
|
|
11
|
-
o((() => {
|
|
12
|
-
!(function() {
|
|
13
|
-
if (p2.autoSaveId) try {
|
|
14
|
-
const e3 = localStorage.getItem(`px-resizable-${p2.autoSaveId}`);
|
|
15
|
-
if (e3) {
|
|
16
|
-
const i4 = JSON.parse(e3);
|
|
17
|
-
if (i4.length === w2.length) {
|
|
18
|
-
const e4 = /* @__PURE__ */ new Map();
|
|
19
|
-
return w2.forEach(((t4, n3) => {
|
|
20
|
-
e4.set(t4.id, i4[n3]);
|
|
21
|
-
})), void (x2.value = e4);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
} catch {
|
|
25
|
-
}
|
|
26
|
-
const e2 = /* @__PURE__ */ new Map();
|
|
27
|
-
let i3 = 0, t3 = 0;
|
|
28
|
-
for (const n3 of w2) null != n3.defaultSize ? (e2.set(n3.id, n3.defaultSize), i3 += n3.defaultSize) : t3++;
|
|
29
|
-
const n2 = t3 > 0 ? (100 - i3) / t3 : 0;
|
|
30
|
-
for (const i4 of w2) null == i4.defaultSize && e2.set(i4.id, n2);
|
|
31
|
-
x2.value = e2;
|
|
32
|
-
})();
|
|
33
|
-
}));
|
|
34
|
-
let R = null, E = -1, L = null;
|
|
35
|
-
function k(e2) {
|
|
36
|
-
if (E < 0 || !R) return;
|
|
37
|
-
const i3 = "touches" in e2 ? e2.touches[0].clientX : e2.clientX, t3 = "touches" in e2 ? e2.touches[0].clientY : e2.clientY, n2 = "horizontal" === p2.direction, a2 = n2 ? i3 : t3, l2 = n2 ? R.left : R.top, o2 = n2 ? R.width : R.height;
|
|
38
|
-
if (0 === o2) return;
|
|
39
|
-
const s2 = (a2 - l2) / o2 * 100, r2 = w2[E], u2 = w2[E + 1];
|
|
40
|
-
if (!r2 || !u2) return;
|
|
41
|
-
let d2 = 0;
|
|
42
|
-
for (let e3 = 0; e3 < E; e3++) d2 += x2.value.get(w2[e3].id) ?? 0;
|
|
43
|
-
P2(r2, u2, s2 - d2), H();
|
|
44
|
-
}
|
|
45
|
-
function I() {
|
|
46
|
-
E = -1, R = null, window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", I), A(), L && (L(), L = null);
|
|
47
|
-
}
|
|
48
|
-
function H() {
|
|
49
|
-
const e2 = w2.map(((e3) => x2.value.get(e3.id) ?? 0));
|
|
50
|
-
m2("layout", e2);
|
|
51
|
-
}
|
|
52
|
-
function A() {
|
|
53
|
-
if (p2.autoSaveId) try {
|
|
54
|
-
const e2 = w2.map(((e3) => x2.value.get(e3.id) ?? 0));
|
|
55
|
-
localStorage.setItem(`px-resizable-${p2.autoSaveId}`, JSON.stringify(e2));
|
|
56
|
-
} catch {
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
s((() => {
|
|
60
|
-
window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", I);
|
|
61
|
-
}));
|
|
62
|
-
const B = r((() => p2.direction)), M = r((() => p2.keyboardResizeBy));
|
|
63
|
-
return u(S, { direction: B, keyboardResizeBy: M, registerPanel: function(e2) {
|
|
64
|
-
e2.id = h2++, w2.push(e2);
|
|
65
|
-
}, unregisterPanel: function(e2) {
|
|
66
|
-
const i3 = w2.findIndex(((i4) => i4.id === e2));
|
|
67
|
-
i3 > -1 && w2.splice(i3, 1), x2.value.delete(e2), z(x2);
|
|
68
|
-
}, getPanelSize: function(e2) {
|
|
69
|
-
return x2.value.get(e2) ?? 0;
|
|
70
|
-
}, setPanelSize: function(i3, t3, n2 = false) {
|
|
71
|
-
const a2 = w2.find(((e2) => e2.id === i3));
|
|
72
|
-
if (!a2) return;
|
|
73
|
-
const l2 = n2 ? t3 : e(t3, a2.minSize, a2.maxSize), o2 = l2 - (x2.value.get(i3) ?? 0);
|
|
74
|
-
if (0 === o2) return;
|
|
75
|
-
const s2 = w2.indexOf(a2), r2 = w2[s2 + 1] ?? w2[s2 - 1];
|
|
76
|
-
if (!r2) return;
|
|
77
|
-
const u2 = (x2.value.get(r2.id) ?? 0) - o2;
|
|
78
|
-
!n2 && (u2 < r2.minSize || u2 > r2.maxSize) || (x2.value.set(i3, l2), x2.value.set(r2.id, u2), z(x2), H());
|
|
79
|
-
}, startResize: function(e2, i3) {
|
|
80
|
-
var _a;
|
|
81
|
-
const t3 = b2.indexOf(e2);
|
|
82
|
-
t3 < 0 || (E = t3, R = ((_a = g2.value) == null ? void 0 : _a.getBoundingClientRect()) ?? null, L = i3 ?? null, window.addEventListener("mousemove", k), window.addEventListener("mouseup", I), window.addEventListener("touchmove", k, { passive: true }), window.addEventListener("touchend", I));
|
|
83
|
-
}, keyboardResize: function(e2, i3) {
|
|
84
|
-
const t3 = b2.indexOf(e2);
|
|
85
|
-
if (t3 < 0) return;
|
|
86
|
-
const n2 = w2[t3], a2 = w2[t3 + 1];
|
|
87
|
-
n2 && a2 && (P2(n2, a2, (x2.value.get(n2.id) ?? 0) + i3), H(), A());
|
|
88
|
-
}, getNextHandleId: function() {
|
|
89
|
-
return y2++;
|
|
90
|
-
}, registerHandle: function(e2) {
|
|
91
|
-
b2.push(e2);
|
|
92
|
-
}, unregisterHandle: function(e2) {
|
|
93
|
-
const i3 = b2.indexOf(e2);
|
|
94
|
-
i3 > -1 && b2.splice(i3, 1);
|
|
95
|
-
}, panelSizes: x2 }), (e2, i3) => (c(), d("div", { ref_key: "groupRef", ref: g2, class: v(["px-resizable-group", { "is-horizontal": "horizontal" === B.value, "is-vertical": "vertical" === B.value }]) }, [f(e2.$slots, "default")], 2));
|
|
96
|
-
} }), x = t({ name: "PxResizableHandle", __name: "ResizableHandle", props: { disabled: { type: Boolean, default: false }, hitAreaMargins: { default: 0 } }, emits: ["dragging"], setup(e2, { emit: i2 }) {
|
|
97
|
-
const t2 = e2, a2 = i2, l2 = p(S);
|
|
98
|
-
if (!l2) throw new Error("PxResizableHandle must be used inside PxResizableGroup");
|
|
99
|
-
let u2 = -1;
|
|
100
|
-
const f2 = n(false);
|
|
101
|
-
o((() => {
|
|
102
|
-
u2 = l2.getNextHandleId(), l2.registerHandle(u2);
|
|
103
|
-
})), s((() => {
|
|
104
|
-
l2.unregisterHandle(u2);
|
|
105
|
-
}));
|
|
106
|
-
const z2 = r((() => "vertical" === l2.direction.value));
|
|
107
|
-
function g2() {
|
|
108
|
-
t2.disabled || (f2.value = true, a2("dragging", true), l2.startResize(u2, (() => {
|
|
109
|
-
f2.value = false, a2("dragging", false);
|
|
110
|
-
})));
|
|
111
|
-
}
|
|
112
|
-
function w2(e3) {
|
|
113
|
-
if (t2.disabled) return;
|
|
114
|
-
const i3 = "horizontal" === l2.direction.value ? "ArrowRight" === e3.key ? 1 : "ArrowLeft" === e3.key ? -1 : 0 : "ArrowDown" === e3.key ? 1 : "ArrowUp" === e3.key ? -1 : 0;
|
|
115
|
-
0 !== i3 && (e3.preventDefault(), l2.keyboardResize(u2, i3 * l2.keyboardResizeBy.value));
|
|
116
|
-
}
|
|
117
|
-
const x2 = r((() => t2.hitAreaMargins ? { "--px-handle-hit-area": `${t2.hitAreaMargins}px` } : {}));
|
|
118
|
-
return (e3, i3) => (c(), d("div", { class: v(["px-resizable-handle", { "is-disabled": t2.disabled, "is-vertical": z2.value, "is-dragging": f2.value, "has-hit-area": !!t2.hitAreaMargins }]), style: m(x2.value), role: "separator", tabindex: "0", onMousedown: g2, onTouchstartPassive: g2, onKeydown: w2 }, null, 38));
|
|
119
|
-
} }), b = t({ name: "PxResizablePanel", __name: "ResizablePanel", props: { defaultSize: {}, minSize: { default: 10 }, maxSize: { default: 100 }, collapsible: { type: Boolean, default: false }, collapsedSize: { default: 0 } }, emits: ["resize", "collapse", "expand"], setup(e2, { expose: i2, emit: t2 }) {
|
|
120
|
-
const a2 = e2, l2 = t2, u2 = p(S);
|
|
121
|
-
if (!u2) throw new Error("PxResizablePanel must be used inside PxResizableGroup");
|
|
122
|
-
const z2 = n(-1), w2 = n(false);
|
|
123
|
-
let x2 = 0;
|
|
124
|
-
const b2 = { id: 0, minSize: a2.minSize, maxSize: a2.maxSize, collapsible: a2.collapsible, collapsedSize: a2.collapsedSize, defaultSize: a2.defaultSize };
|
|
125
|
-
g((() => [a2.minSize, a2.maxSize, a2.collapsible, a2.collapsedSize]), (([e3, i3, t3, n2]) => {
|
|
126
|
-
b2.minSize = e3, b2.maxSize = i3, b2.collapsible = t3, b2.collapsedSize = n2;
|
|
127
|
-
})), o((() => {
|
|
128
|
-
u2.registerPanel(b2), z2.value = b2.id;
|
|
129
|
-
})), s((() => {
|
|
130
|
-
u2.unregisterPanel(z2.value);
|
|
131
|
-
}));
|
|
132
|
-
const h2 = r((() => u2.panelSizes.value.get(z2.value) ?? 0));
|
|
133
|
-
g(h2, ((e3, i3) => {
|
|
134
|
-
void 0 !== i3 && e3 !== i3 && l2("resize", e3);
|
|
135
|
-
}));
|
|
136
|
-
const y2 = r((() => ({ flexBasis: `${h2.value}%`, flexGrow: 0, flexShrink: 0 })));
|
|
137
|
-
return i2({ collapse: function() {
|
|
138
|
-
a2.collapsible && !w2.value && (x2 = h2.value, w2.value = true, u2.setPanelSize(z2.value, a2.collapsedSize, true), l2("collapse"));
|
|
139
|
-
}, expand: function() {
|
|
140
|
-
w2.value && (w2.value = false, u2.setPanelSize(z2.value, x2, true), l2("expand"));
|
|
141
|
-
}, getSize: function() {
|
|
142
|
-
return h2.value;
|
|
143
|
-
}, resize: function(e3) {
|
|
144
|
-
u2.setPanelSize(z2.value, e3);
|
|
145
|
-
} }), (e3, i3) => (c(), d("div", { class: v(["px-resizable-panel", { "is-collapsed": w2.value }]), style: m(y2.value) }, [f(e3.$slots, "default")], 6));
|
|
146
|
-
} }), h = i(w), y = i(b), P = i(x);
|
|
147
|
-
export {
|
|
148
|
-
h as P,
|
|
149
|
-
P as a,
|
|
150
|
-
y as b
|
|
151
|
-
};
|