-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.js
143 lines (143 loc) · 5.74 KB
/
ui.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import { defineComponent as p, ref as h, useAttrs as v, openBlock as e, createElementBlock as t, normalizeClass as _, createCommentVNode as s, renderSlot as w, Fragment as m, createTextVNode as g, toDisplayString as k, pushScopeId as f, popScopeId as y, createElementVNode as n } from "vue";
const l = (r) => (f("data-v-4829d22e"), r = r(), y(), r), z = ["type"], B = {
key: 0,
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
class: "w-4 h-4 mr-1 -ml-1 animate-spin"
}, V = /* @__PURE__ */ l(() => /* @__PURE__ */ n("circle", {
class: "opacity-25",
cx: "12",
cy: "12",
r: "10",
stroke: "currentColor",
"stroke-width": "4"
}, null, -1)), C = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
class: "opacity-75",
fill: "currentColor",
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
}, null, -1)), W = [
V,
C
], M = {
key: 1,
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
class: "w-4 h-4 mr-1 -ml-1"
}, H = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"fill-rule": "evenodd",
d: "M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",
"clip-rule": "evenodd"
}, null, -1)), S = [
H
], b = {
key: 2,
class: "w-4 h-4 mr-1 -ml-1",
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
stroke: "currentColor"
}, x = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
}, null, -1)), A = [
x
], I = {
key: 3,
class: "w-4 h-4 mr-1 -ml-1",
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
stroke: "currentColor"
}, L = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
}, null, -1)), T = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
}, null, -1)), j = [
L,
T
], N = {
key: 4,
class: "w-4 h-4 mr-1 -ml-1",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor"
}, E = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"fill-rule": "evenodd",
d: "M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",
"clip-rule": "evenodd"
}, null, -1)), F = [
E
], D = {
key: 5,
class: "w-4 h-4 mr-1 -ml-1",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor"
}, O = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"fill-rule": "evenodd",
d: "M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM6.293 6.707a1 1 0 010-1.414l3-3a1 1 0 011.414 0l3 3a1 1 0 01-1.414 1.414L11 5.414V13a1 1 0 11-2 0V5.414L7.707 6.707a1 1 0 01-1.414 0z",
"clip-rule": "evenodd"
}, null, -1)), P = [
O
], $ = {
key: 6,
class: "w-4 h-4 mr-1 -ml-1",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor"
}, q = /* @__PURE__ */ l(() => /* @__PURE__ */ n("path", {
"fill-rule": "evenodd",
d: "M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",
"clip-rule": "evenodd"
}, null, -1)), G = [
q
], J = /* @__PURE__ */ p({
__name: "SlipmatButton",
props: {
icon: {},
isWorking: { type: Boolean },
workingText: {}
},
setup(r) {
const a = h(!1), i = h(!1), d = h("button"), c = h(!1), u = v();
return u.primary !== void 0 ? a.value = !0 : u.secondary !== void 0 && (i.value = !0), u.submit !== void 0 && (d.value = "submit"), u["full-width"] !== void 0 && (c.value = !0), (o, Q) => (e(), t("button", {
type: d.value,
class: _(["btn", {
primary: a.value,
secondary: i.value,
"full-width": c.value
}])
}, [
o.isWorking ? (e(), t("svg", B, W)) : s("", !0),
o.icon === "trash" && !o.isWorking ? (e(), t("svg", M, S)) : s("", !0),
o.icon === "new" && !o.isWorking ? (e(), t("svg", b, A)) : s("", !0),
o.icon === "edit" && !o.isWorking ? (e(), t("svg", I, j)) : s("", !0),
o.icon === "download" && !o.isWorking ? (e(), t("svg", N, F)) : s("", !0),
o.icon === "upload" && !o.isWorking ? (e(), t("svg", D, P)) : s("", !0),
o.icon === "reset" && !o.isWorking ? (e(), t("svg", $, G)) : s("", !0),
o.isWorking ? s("", !0) : w(o.$slots, "default", { key: 7 }, void 0, !0),
o.isWorking ? (e(), t(m, { key: 8 }, [
g(k(o.workingText), 1)
], 64)) : s("", !0)
], 10, z));
}
});
const K = (r, a) => {
const i = r.__vccOpts || r;
for (const [d, c] of a)
i[d] = c;
return i;
}, U = /* @__PURE__ */ K(J, [["__scopeId", "data-v-4829d22e"]]);
export {
U as SlipmatButton
};