toy-element-csustedmer 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ import { defineComponent as I, useSlots as x, ref as B, computed as i, openBlock as l, createBlock as d, Transition as C, withCtx as N, withDirectives as S, createElementVNode as t, normalizeClass as c, createCommentVNode as f, normalizeStyle as b, renderSlot as u, createTextVNode as m, toDisplayString as h, createElementBlock as g, createVNode as V, withModifiers as $, vShow as A } from "vue";
2
+ import { t as D, w as z } from "./utils-qI_MYoyZ.js";
3
+ import { E as p } from "./icon-OPmgEkMN.js";
4
+ import { _ as M } from "./button-BrmH9o8y.js";
5
+ const T = { class: "er-alert__content" }, j = { class: "er-alert__description" }, q = {
6
+ key: 0,
7
+ class: "er-alert__close"
8
+ }, F = /* @__PURE__ */ I({
9
+ name: "ErAlert",
10
+ __name: "alert",
11
+ props: {
12
+ title: {},
13
+ type: { default: "info" },
14
+ description: {},
15
+ effect: { default: "light" },
16
+ closable: { type: Boolean, default: !0 },
17
+ center: { type: Boolean },
18
+ showIcon: { type: Boolean }
19
+ },
20
+ emits: ["close"],
21
+ setup(e, { expose: y, emit: v }) {
22
+ const n = e, w = v, _ = x(), o = B(!0), k = i(() => D.get(n.type) ?? "circle-info"), a = i(() => n.description || _.default);
23
+ function s() {
24
+ o.value = !1, w("close");
25
+ }
26
+ function E() {
27
+ o.value = !0;
28
+ }
29
+ return y({
30
+ open: E,
31
+ close: s
32
+ }), (r, H) => (l(), d(C, { name: "er-alert-fade" }, {
33
+ default: N(() => [
34
+ S(t("div", {
35
+ class: c(["er-alert", {
36
+ [`er-alert__${e.type}`]: e.type,
37
+ [`er-alert__${e.effect}`]: e.effect,
38
+ "text-center": e.center
39
+ }]),
40
+ role: "alert"
41
+ }, [
42
+ e.showIcon ? (l(), d(p, {
43
+ key: 0,
44
+ class: c(["er-alert__icon", { "big-icon": a.value }]),
45
+ icon: k.value
46
+ }, null, 8, ["class", "icon"])) : f("", !0),
47
+ t("div", T, [
48
+ t("span", {
49
+ class: c(["er-alert__title", { "with-desc": a.value }]),
50
+ style: b({ display: e.center && !e.showIcon ? "flow" : "inline" })
51
+ }, [
52
+ u(r.$slots, "title", {}, () => [
53
+ m(h(e.title), 1)
54
+ ], !0)
55
+ ], 6),
56
+ t("p", j, [
57
+ u(r.$slots, "default", {}, () => [
58
+ m(h(e.description), 1)
59
+ ], !0)
60
+ ]),
61
+ e.closable ? (l(), g("div", q, [
62
+ V(p, {
63
+ onClick: $(s, ["stop"]),
64
+ icon: "xmark"
65
+ })
66
+ ])) : f("", !0)
67
+ ])
68
+ ], 2), [
69
+ [A, o.value]
70
+ ])
71
+ ]),
72
+ _: 3
73
+ }));
74
+ }
75
+ }), G = /* @__PURE__ */ M(F, [["__scopeId", "data-v-6dea72a2"]]), P = z(G);
76
+ export {
77
+ P as E
78
+ };
@@ -0,0 +1,51 @@
1
+ import { defineComponent as i, useSlots as l, ref as d, openBlock as s, createBlock as c, resolveDynamicComponent as r, normalizeClass as u, withCtx as f, renderSlot as y } from "vue";
2
+ import { w as b } from "./utils-qI_MYoyZ.js";
3
+ const m = /* @__PURE__ */ i({
4
+ name: "ErButton",
5
+ __name: "button",
6
+ props: {
7
+ type: {},
8
+ tag: { default: "button" },
9
+ size: {},
10
+ nativeType: { default: "button" },
11
+ disabled: { type: Boolean },
12
+ loading: { type: Boolean },
13
+ icon: {},
14
+ circle: { type: Boolean },
15
+ plain: { type: Boolean },
16
+ round: { type: Boolean }
17
+ },
18
+ setup(e) {
19
+ l();
20
+ const n = d();
21
+ return (t, o) => (s(), c(r(e.tag), {
22
+ ref_key: "_ref",
23
+ ref: n,
24
+ class: u(["er-button", {
25
+ [`er-button--${e.type}`]: e.type,
26
+ [`er-button--${e.size}`]: e.size,
27
+ "is-circle": e.circle,
28
+ "is-plain": e.plain,
29
+ "is-round": e.round,
30
+ "is-loading": e.loading,
31
+ "is-disabled": e.disabled
32
+ }]),
33
+ disabled: e.disabled || e.loading ? !0 : void 0,
34
+ type: e.tag === "button" ? e.nativeType : void 0
35
+ }, {
36
+ default: f(() => [
37
+ y(t.$slots, "default", {}, void 0, !0)
38
+ ]),
39
+ _: 3
40
+ }, 8, ["disabled", "type", "class"]));
41
+ }
42
+ }), B = (e, n) => {
43
+ const t = e.__vccOpts || e;
44
+ for (const [o, a] of n)
45
+ t[o] = a;
46
+ return t;
47
+ }, v = /* @__PURE__ */ B(m, [["__scopeId", "data-v-2b337095"]]), z = b(v);
48
+ export {
49
+ z as E,
50
+ B as _
51
+ };
@@ -0,0 +1,50 @@
1
+ import { defineComponent as p, computed as t, openBlock as s, createElementBlock as l, mergeProps as c, createVNode as i, unref as m, normalizeProps as y, guardReactiveProps as B } from "vue";
2
+ import { FontAwesomeIcon as f } from "@fortawesome/vue-fontawesome";
3
+ import { o as u } from "./vendor-QFwx4i78.js";
4
+ import { _ as d } from "./button-BrmH9o8y.js";
5
+ import { w as v } from "./utils-qI_MYoyZ.js";
6
+ const I = /* @__PURE__ */ p({
7
+ name: "ErIcon",
8
+ inheritAttrs: !1,
9
+ __name: "icon",
10
+ props: {
11
+ border: { type: Boolean },
12
+ fixedWidth: { type: Boolean },
13
+ flip: {},
14
+ icon: {},
15
+ mask: {},
16
+ listItem: { type: Boolean },
17
+ pull: {},
18
+ pulse: { type: Boolean },
19
+ rotation: {},
20
+ swapOpacity: { type: Boolean },
21
+ size: {},
22
+ spin: { type: Boolean },
23
+ transform: {},
24
+ symbol: { type: [Boolean, String] },
25
+ title: {},
26
+ inverse: { type: Boolean },
27
+ bounce: { type: Boolean },
28
+ shake: { type: Boolean },
29
+ beat: { type: Boolean },
30
+ fade: { type: Boolean },
31
+ beatFade: { type: Boolean },
32
+ spinPulse: { type: Boolean },
33
+ spinReverse: { type: Boolean },
34
+ type: {},
35
+ color: {}
36
+ },
37
+ setup(e) {
38
+ const o = e, n = t(() => u(o, ["type", "color"])), a = t(() => ({ color: o.color ?? void 0 }));
39
+ return (r, _) => (s(), l("i", c({
40
+ class: ["er-icon", { [`er-icon--${e.type}`]: e.type }],
41
+ style: a.value
42
+ }, r.$attrs), [
43
+ i(m(f), y(B(n.value)), null, 16)
44
+ ], 16));
45
+ }
46
+ }), b = /* @__PURE__ */ d(I, [["__scopeId", "data-v-ba674521"]]), g = v(b);
47
+ export {
48
+ b as E,
49
+ g as a
50
+ };
@@ -0,0 +1,15 @@
1
+ import { m as r } from "./utils-qI_MYoyZ.js";
2
+ import { E as a } from "./button-BrmH9o8y.js";
3
+ import { a as o } from "./icon-OPmgEkMN.js";
4
+ import { E as m } from "./alert-DXo8N9hf.js";
5
+ import { library as t } from "@fortawesome/fontawesome-svg-core";
6
+ import { faXmark as f, faCircleInfo as i, faCheckCircle as e, faCircleExclamation as l, faCircleXmark as c } from "@fortawesome/free-solid-svg-icons";
7
+ const n = [a, m, o];
8
+ t.add(f, i, e, l, c);
9
+ const I = r(n);
10
+ export {
11
+ m as ErAlert,
12
+ a as ErButton,
13
+ o as ErIcon,
14
+ I as default
15
+ };
@@ -0,0 +1,32 @@
1
+ import { f as c, i } from "./vendor-QFwx4i78.js";
2
+ import { defineComponent as a } from "vue";
3
+ function l(e) {
4
+ return (r) => c(e, (t) => r.use(t));
5
+ }
6
+ const u = (e) => (e.install = (n) => {
7
+ const r = e.name;
8
+ n.component(r, e);
9
+ }, e);
10
+ a({
11
+ props: {
12
+ vNode: {
13
+ type: [String, Object, Function],
14
+ required: !0
15
+ }
16
+ },
17
+ setup(e) {
18
+ return () => i(e.vNode) ? e.vNode() : e.vNode;
19
+ }
20
+ });
21
+ const m = /* @__PURE__ */ new Map([
22
+ ["info", "circle-info"],
23
+ ["success", "check-circle"],
24
+ ["warning", "circle-exclamation"],
25
+ ["danger", "circle-xmark"],
26
+ ["error", "circle-xmark"]
27
+ ]);
28
+ export {
29
+ l as m,
30
+ m as t,
31
+ u as w
32
+ };