sakana-element 2.1.2 → 2.1.3
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 +1 -0
- package/dist/es/Alert-A4stKumX.js +19 -0
- package/dist/es/Badge-BG-vYP8Y.js +13 -0
- package/dist/es/Button-CFGE4_Ng.js +22 -0
- package/dist/es/{Collapse-l_8qKOBG.js → Collapse-B08VhCVq.js} +2 -2
- package/dist/es/{ConfigProvider-BPm3h9RG.js → ConfigProvider-DZO1d5Eq.js} +1 -1
- package/dist/es/{Dropdown-ZjZ0qSn2.js → Dropdown-CA-nv-2j.js} +3 -3
- package/dist/es/{Form-pxRZxseS.js → Form-VB1SL_iW.js} +1 -1
- package/dist/es/{Icon-UBaqO2nY.js → Icon-DpJyuj7c.js} +1 -1
- package/dist/es/{Input-BJoBaFXa.js → Input-C-bIqqo_.js} +3 -3
- package/dist/es/{Loading-BJJBJhg3.js → Loading-4MsOvzx9.js} +3 -3
- package/dist/es/{Message-CqBKW0c8.js → Message-CxT9rRUp.js} +5 -5
- package/dist/es/{Notification-CVACM2cj.js → Notification-D6em5HmO.js} +7 -7
- package/dist/es/{Overlay-C1k4Jcl7.js → Overlay-BRDSWspM.js} +1 -1
- package/dist/es/{Popconfirm-CW8oRycq.js → Popconfirm-D0ABSr-F.js} +4 -4
- package/dist/es/{Select-C7mwByXa.js → Select-BKYDP224.js} +4 -4
- package/dist/es/{Switch-CgFPFC3j.js → Switch-C1IdbnUa.js} +1 -1
- package/dist/es/{Tooltip-D9rQ4LEg.js → Tooltip-KpwbZdMX.js} +16 -16
- package/dist/es/index.js +54 -52
- package/dist/es/utils-bsCscZfS.js +84 -0
- package/dist/index.css +1 -1
- package/dist/theme/Alert.css +114 -38
- package/dist/theme/Badge.css +208 -0
- package/dist/theme/Button.css +83 -83
- package/dist/types/components/Alert/types.d.ts +3 -0
- package/dist/types/components/Badge/index.d.ts +27 -0
- package/dist/types/components/Badge/types.d.ts +10 -0
- package/dist/types/components/Button/constants.d.ts +2 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/hooks/useSystemTheme.d.ts +1 -1
- package/dist/types/utils/color.d.ts +33 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +3 -3
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/Alert-C5X-XFGJ.js +0 -15
- package/dist/es/Button-DTik2ZP6.js +0 -33
- package/dist/es/utils-340oIQ8K.js +0 -59
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { t as e, _ as t, w as l } from "./utils-340oIQ8K.js";
|
|
2
|
-
import { defineComponent as o, useSlots as s, ref as a, computed as c, createBlock as n, openBlock as i, Transition as p, withCtx as r, withDirectives as f, createElementVNode as _, normalizeClass as u, createCommentVNode as d, createElementBlock as x, normalizeStyle as m, renderSlot as v, createTextVNode as y, toDisplayString as w, createVNode as h, withModifiers as I, vShow as $ } from "vue";
|
|
3
|
-
import { P as b } from "./Icon-UBaqO2nY.js";
|
|
4
|
-
const g = { class: "px-alert__content" }, k = { class: "px-alert__description" }, B = { key: 0, class: "px-alert__close" }, P = l(t(o({ name: "PxAlert", __name: "Alert", props: { title: {}, type: { default: "info" }, description: {}, effect: { default: "light" }, closable: { type: Boolean, default: true }, center: { type: Boolean }, showIcon: { type: Boolean } }, emits: ["close"], setup(t2, { expose: l2, emit: o2 }) {
|
|
5
|
-
const P2 = t2, j = o2, A = s(), C = a(true), q = c((() => e.get(P2.type) ?? "circle-info")), z = c((() => P2.description || A.default));
|
|
6
|
-
function D() {
|
|
7
|
-
C.value = false, j("close");
|
|
8
|
-
}
|
|
9
|
-
return l2({ open: function() {
|
|
10
|
-
C.value = true;
|
|
11
|
-
}, close: D }), (e2, t3) => (i(), n(p, { name: "px-alert-fade" }, { default: r((() => [f(_("div", { class: u(["px-alert", { [`px-alert__${e2.type}`]: e2.type, [`px-alert__${e2.effect}`]: e2.effect, "text-center": e2.center }]), role: "alert" }, [e2.showIcon ? (i(), n(b, { key: 0, class: u(["px-alert__icon", { "big-icon": z.value }]), icon: q.value }, null, 8, ["class", "icon"])) : d("", true), _("div", g, [_("span", { class: u(["px-alert__title", { "with-desc": z.value }]), style: m({ display: e2.center && !e2.showIcon ? "flow" : "inline" }) }, [v(e2.$slots, "title", {}, (() => [y(w(e2.title), 1)]), true)], 6), _("p", k, [v(e2.$slots, "default", {}, (() => [y(w(e2.description), 1)]), true)]), e2.closable ? (i(), x("div", B, [h(b, { onClick: I(D, ["stop"]), icon: "close" })])) : d("", true)])], 2), [[$, C.value]])])), _: 3 }));
|
|
12
|
-
} }), [["__scopeId", "data-v-9f432773"]]));
|
|
13
|
-
export {
|
|
14
|
-
P
|
|
15
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { d as t, _ as o, w as e } from "./utils-340oIQ8K.js";
|
|
2
|
-
import { defineComponent as a, useSlots as r, inject as n, ref as l, computed as u, createBlock as b, openBlock as s, resolveDynamicComponent as i, unref as p, normalizeStyle as c, normalizeClass as d, withCtx as x, renderSlot as v, createCommentVNode as g, createVNode as h, provide as y, reactive as f, toRef as m, createElementBlock as B } from "vue";
|
|
3
|
-
import { P as _ } from "./Icon-UBaqO2nY.js";
|
|
4
|
-
import { t as M } from "./vendor-DXmGx29U.js";
|
|
5
|
-
const z = Symbol("BUTTON_GROUP_CTX_KEY"), I = o(a({ name: "PxButton", __name: "Button", props: { tag: { default: "button" }, type: {}, size: {}, nativeType: { default: "button" }, disabled: { type: Boolean }, loading: { type: Boolean }, icon: {}, circle: { type: Boolean }, plain: { type: Boolean }, round: { type: Boolean }, dash: { type: Boolean }, ghost: { type: Boolean }, color: {}, loadingIcon: {}, ariaLabel: {}, autofocus: { type: Boolean }, useThrottle: { type: Boolean, default: true }, throttleDuration: { default: 500 } }, emits: ["click"], setup(o2, { expose: e2, emit: a2 }) {
|
|
6
|
-
const y2 = /* @__PURE__ */ new Set(["button", "a", "div", "span", "router-link"]), f2 = o2;
|
|
7
|
-
"string" != typeof f2.tag || y2.has(f2.tag) || t("PxButton", `Invalid tag "${f2.tag}". Allowed tags: ${[...y2].join(", ")}. Falling back to "button".`);
|
|
8
|
-
const m2 = a2, B2 = r(), I2 = n(z, void 0), $2 = l(), k2 = u((() => "string" != typeof f2.tag || y2.has(f2.tag) ? f2.tag : "button")), T2 = u((() => (I2 == null ? void 0 : I2.size) ?? (f2 == null ? void 0 : f2.size) ?? "")), w2 = u((() => (I2 == null ? void 0 : I2.type) ?? (f2 == null ? void 0 : f2.type) ?? "")), P = u((() => (I2 == null ? void 0 : I2.disabled) || (f2 == null ? void 0 : f2.disabled) || false)), S = u((() => ({ marginRight: B2.default ? "6px" : "0px" })));
|
|
9
|
-
function j(t2, o3) {
|
|
10
|
-
const e3 = parseInt(t2.replace("#", ""), 16);
|
|
11
|
-
return `#${(Math.min(255, (e3 >> 16) + Math.round(2.55 * o3)) << 16 | Math.min(255, (e3 >> 8 & 255) + Math.round(2.55 * o3)) << 8 | Math.min(255, (255 & e3) + Math.round(2.55 * o3))).toString(16).padStart(6, "0")}`;
|
|
12
|
-
}
|
|
13
|
-
const G = u((() => {
|
|
14
|
-
if (!f2.color) return {};
|
|
15
|
-
const t2 = f2.color, o3 = (function(t3) {
|
|
16
|
-
const o4 = parseInt(t3.replace("#", ""), 16);
|
|
17
|
-
return (0.299 * (o4 >> 16) + 0.587 * (o4 >> 8 & 255) + 0.114 * (255 & o4)) / 255 > 0.6 ? "#1e1e2e" : "#ffffff";
|
|
18
|
-
})(t2), e3 = (function(t3) {
|
|
19
|
-
const o4 = parseInt(t3.replace("#", ""), 16);
|
|
20
|
-
return `#${(Math.max(0, (o4 >> 16) - Math.round(38.25)) << 16 | Math.max(0, (o4 >> 8 & 255) - Math.round(38.25)) << 8 | Math.max(0, (255 & o4) - Math.round(38.25))).toString(16).padStart(6, "0")}`;
|
|
21
|
-
})(t2), a3 = j(t2, 20), r2 = j(t2, 35);
|
|
22
|
-
return f2.ghost ? { "--px-button-text-color": t2, "--px-button-bg-color": "transparent", "--px-button-border-color": "transparent", "--px-button-shadow-color": "transparent", "--px-button-hover-text-color": e3, "--px-button-hover-bg-color": r2, "--px-button-hover-border-color": "transparent", "--px-button-active-text-color": e3, "--px-button-active-bg-color": a3, "--px-button-active-border-color": "transparent", "--px-button-disabled-text-color": a3, "--px-button-disabled-bg-color": "transparent", "--px-button-disabled-border-color": "transparent" } : f2.dash ? { "--px-button-text-color": t2, "--px-button-bg-color": r2, "--px-button-border-color": t2, "--px-button-shadow-color": "transparent", "--px-button-hover-text-color": e3, "--px-button-hover-bg-color": a3, "--px-button-hover-border-color": e3, "--px-button-active-text-color": e3, "--px-button-active-bg-color": t2, "--px-button-active-border-color": e3, "--px-button-disabled-text-color": a3, "--px-button-disabled-bg-color": r2, "--px-button-disabled-border-color": a3 } : f2.plain ? { "--px-button-text-color": t2, "--px-button-bg-color": r2, "--px-button-border-color": t2, "--px-button-hover-text-color": o3, "--px-button-hover-bg-color": t2, "--px-button-hover-border-color": t2, "--px-button-active-text-color": o3, "--px-button-active-bg-color": e3, "--px-button-active-border-color": e3, "--px-button-disabled-text-color": a3, "--px-button-disabled-bg-color": r2, "--px-button-disabled-border-color": a3 } : { "--px-button-text-color": o3, "--px-button-bg-color": t2, "--px-button-border-color": e3, "--px-button-shadow-color": e3, "--px-button-hover-text-color": o3, "--px-button-hover-bg-color": a3, "--px-button-hover-border-color": t2, "--px-button-active-text-color": o3, "--px-button-active-bg-color": e3, "--px-button-active-border-color": e3, "--px-button-disabled-text-color": o3, "--px-button-disabled-bg-color": a3, "--px-button-disabled-border-color": a3 };
|
|
23
|
-
})), C = (t2) => m2("click", t2), D = M(C, f2.throttleDuration, { trailing: false });
|
|
24
|
-
return e2({ ref: $2, disabled: P, size: T2, type: w2 }), (t2, o3) => (s(), b(i(k2.value), { ref_key: "_ref", ref: $2, autofocus: t2.autofocus, type: "button" === k2.value ? t2.nativeType : void 0, class: d(["px-button", { [`px-button--${w2.value}`]: w2.value, [`px-button--${T2.value}`]: T2.value, "is-plain": t2.plain, "is-round": t2.round, "is-circle": t2.circle, "is-dash": t2.dash, "is-ghost": t2.ghost, "is-disabled": P.value, "is-loading": t2.loading }]), "aria-label": t2.ariaLabel, disabled: !(!P.value && !t2.loading) || void 0, style: c(G.value), onClick: o3[0] || (o3[0] = (o4) => t2.useThrottle ? p(D)(o4) : C(o4)) }, { default: x((() => [t2.loading ? v(t2.$slots, "loading", { key: 0 }, (() => [h(_, { class: "loading-icon", icon: t2.loadingIcon ?? "loader", style: c(S.value), size: "1x", spin: "" }, null, 8, ["icon", "style"])]), true) : g("", true), t2.icon && !t2.loading ? (s(), b(_, { key: 1, icon: t2.icon, style: c(S.value), size: "1x" }, null, 8, ["icon", "style"])) : g("", true), v(t2.$slots, "default", {}, void 0, true)])), _: 3 }, 8, ["autofocus", "type", "aria-label", "disabled", "class", "style"]));
|
|
25
|
-
} }), [["__scopeId", "data-v-7044e22a"]]), $ = { class: "px-button-group" }, k = o(a({ name: "PxButtonGroup", __name: "ButtonGroup", props: { size: {}, type: {}, disabled: { type: Boolean } }, setup(t2) {
|
|
26
|
-
const o2 = t2;
|
|
27
|
-
return y(z, f({ size: m(o2, "size"), type: m(o2, "type"), disabled: m(o2, "disabled") })), (t3, o3) => (s(), B("div", $, [v(t3.$slots, "default", {}, void 0, true)]));
|
|
28
|
-
} }), [["__scopeId", "data-v-7bc34bb7"]]), T = e(I), w = e(k);
|
|
29
|
-
export {
|
|
30
|
-
w as P,
|
|
31
|
-
T as a,
|
|
32
|
-
I as b
|
|
33
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { h as e, d as o, y as r } from "./vendor-DXmGx29U.js";
|
|
2
|
-
import { defineComponent as n } from "vue";
|
|
3
|
-
function c(e2, o2) {
|
|
4
|
-
}
|
|
5
|
-
const t = { spinner: "loader", loading: "loader", "eye-slash": "eye-closed", "eye-off": "eye-closed", xmark: "close", x: "close", times: "close", "circle-xmark": "close-box", "x-circle": "close-box", "times-circle": "close-box", error: "close-box", "circle-info": "info-box", "info-circle": "info-box", info: "info-box", "check-circle": "check", "circle-check": "check", success: "check", "circle-exclamation": "warning-box", "exclamation-circle": "warning-box", warning: "warning-box", "angle-down": "chevron-down", "caret-down": "chevron-down", "angle-up": "chevron-up", "caret-up": "chevron-up", "angle-left": "chevron-left", "caret-left": "chevron-left", "angle-right": "chevron-right", "caret-right": "chevron-right", "question-circle": "info-box", "circle-question": "info-box", help: "info-box", question: "info-box", gear: "sliders", cog: "sliders", settings: "sliders", star: "bookmark", "star-solid": "bookmark" };
|
|
6
|
-
function s(e2) {
|
|
7
|
-
return e2 in t ? t[e2] : e2;
|
|
8
|
-
}
|
|
9
|
-
const i = /* @__PURE__ */ new Set(["svg", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon", "g", "defs", "clipPath", "mask", "title", "desc", "linearGradient", "radialGradient", "stop", "symbol", "use"]), a = /^on/i, l = /^\s*javascript\s*:/i;
|
|
10
|
-
function f(e2) {
|
|
11
|
-
if (!e2 || "string" != typeof e2) return "";
|
|
12
|
-
if ("undefined" == typeof DOMParser) return "";
|
|
13
|
-
const o2 = new DOMParser().parseFromString(e2, "image/svg+xml");
|
|
14
|
-
return o2.querySelector("parsererror") ? "" : (u(o2.documentElement), o2.documentElement.outerHTML);
|
|
15
|
-
}
|
|
16
|
-
function u(e2) {
|
|
17
|
-
const o2 = Array.from(e2.children);
|
|
18
|
-
for (const e3 of o2) {
|
|
19
|
-
const o3 = e3.tagName.toLowerCase();
|
|
20
|
-
if (i.has(o3)) {
|
|
21
|
-
for (const o4 of Array.from(e3.attributes)) (a.test(o4.name) || "href" === o4.name && l.test(o4.value) || "xlink:href" === o4.name && l.test(o4.value)) && e3.removeAttribute(o4.name);
|
|
22
|
-
u(e3);
|
|
23
|
-
} else e3.remove();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const m = /* @__PURE__ */ new Map();
|
|
27
|
-
function d(e2) {
|
|
28
|
-
for (const [o2, r2] of Object.entries(e2)) m.set(o2, f(r2));
|
|
29
|
-
}
|
|
30
|
-
function g(e2) {
|
|
31
|
-
return m.get(e2);
|
|
32
|
-
}
|
|
33
|
-
const p = (e2) => (e2.install = (o2) => {
|
|
34
|
-
const r2 = e2.name;
|
|
35
|
-
o2.component(r2, e2);
|
|
36
|
-
}, e2), b = (e2, o2) => (e2.install = (r2) => {
|
|
37
|
-
r2.config.globalProperties[o2] = e2;
|
|
38
|
-
}, e2);
|
|
39
|
-
function x(r2, n2 = "px") {
|
|
40
|
-
return r2 ? e(r2) || ((e2) => !!o(e2) && !Number.isNaN(Number(e2)))(r2) ? `${r2}${n2}` : o(r2) ? r2 : void 0 : "";
|
|
41
|
-
}
|
|
42
|
-
const h = /* @__PURE__ */ new Map([["info", "info-box"], ["success", "check"], ["warning", "warning-box"], ["danger", "close-box"], ["error", "close-box"]]), v = n({ props: { vNode: { type: [String, Object, Function], required: true } }, setup: (e2) => () => r(e2.vNode) ? e2.vNode() : e2.vNode }), w = (e2, o2) => {
|
|
43
|
-
const r2 = e2.__vccOpts || e2;
|
|
44
|
-
for (const [e3, n2] of o2) r2[e3] = n2;
|
|
45
|
-
return r2;
|
|
46
|
-
};
|
|
47
|
-
export {
|
|
48
|
-
v as R,
|
|
49
|
-
w as _,
|
|
50
|
-
d as a,
|
|
51
|
-
x as b,
|
|
52
|
-
b as c,
|
|
53
|
-
c as d,
|
|
54
|
-
g,
|
|
55
|
-
s as r,
|
|
56
|
-
f as s,
|
|
57
|
-
h as t,
|
|
58
|
-
p as w
|
|
59
|
-
};
|