mgv-backoffice 1.0.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/components/BaseAlert.vue.d.ts +26 -0
- package/dist/components/BaseBadge.vue.d.ts +27 -0
- package/dist/components/BaseButton.vue.d.ts +119 -0
- package/dist/components/BaseLine.vue.d.ts +17 -0
- package/dist/components/BaseLogo.vue.d.ts +17 -0
- package/dist/components/BaseModal.vue.d.ts +49 -0
- package/dist/components/BaseRow.vue.d.ts +31 -0
- package/dist/components/BaseSpinner.vue.d.ts +2 -0
- package/dist/components/BaseToast.vue.d.ts +45 -0
- package/dist/components/ColoredSquares.vue.d.ts +27 -0
- package/dist/components/EuroAmount.vue.d.ts +35 -0
- package/dist/components/Pagination.vue.d.ts +29 -0
- package/dist/components/TrendArrow.vue.d.ts +20 -0
- package/dist/enums/AlertEnum.d.ts +6 -0
- package/dist/enums/BaseBadgeEnum.d.ts +4 -0
- package/dist/enums/BaseButtonEnum.d.ts +9 -0
- package/dist/enums/BaseButtonSizeEnum.d.ts +7 -0
- package/dist/enums/BaseLogoEnum.d.ts +5 -0
- package/dist/enums/BaseModalEnum.d.ts +4 -0
- package/dist/enums/BaseToastEnum.d.ts +5 -0
- package/dist/enums/ColorsEnums.d.ts +9 -0
- package/dist/enums/LineEnum.d.ts +5 -0
- package/dist/enums/PositioningEnum.d.ts +6 -0
- package/dist/index.d.ts +24 -0
- package/dist/style.css +1 -0
- package/dist/ui-lib.js +920 -0
- package/dist/ui-lib.umd.cjs +1 -0
- package/dist/utils/util.d.ts +5 -0
- package/package.json +31 -0
- package/src/components/BaseAlert.vue +32 -0
- package/src/components/BaseBadge.vue +24 -0
- package/src/components/BaseButton.vue +132 -0
- package/src/components/BaseLine.vue +17 -0
- package/src/components/BaseLogo.vue +27 -0
- package/src/components/BaseModal.vue +75 -0
- package/src/components/BaseRow.vue +19 -0
- package/src/components/BaseSpinner.vue +9 -0
- package/src/components/BaseToast.vue +101 -0
- package/src/components/ColoredSquares.vue +51 -0
- package/src/components/EuroAmount.vue +40 -0
- package/src/components/Pagination.vue +136 -0
- package/src/components/TrendArrow.vue +33 -0
- package/src/enums/AlertEnum.ts +6 -0
- package/src/enums/BaseBadgeEnum.ts +4 -0
- package/src/enums/BaseButtonEnum.ts +9 -0
- package/src/enums/BaseButtonSizeEnum.ts +7 -0
- package/src/enums/BaseLogoEnum.ts +5 -0
- package/src/enums/BaseModalEnum.ts +4 -0
- package/src/enums/BaseToastEnum.ts +5 -0
- package/src/enums/ColorsEnums.ts +9 -0
- package/src/enums/LineEnum.ts +3 -0
- package/src/enums/PositioningEnum.ts +3 -0
- package/src/index.ts +29 -0
- package/src/utils/util.ts +53 -0
package/dist/ui-lib.js
ADDED
|
@@ -0,0 +1,920 @@
|
|
|
1
|
+
import { defineComponent as m, openBlock as l, createElementBlock as i, normalizeClass as h, createVNode as y, unref as f, createElementVNode as s, toDisplayString as p, useSlots as F, computed as C, renderSlot as A, createCommentVNode as d, resolveComponent as G, createBlock as q, withCtx as T, Fragment as $, ref as O, createTextVNode as U, watch as H, renderList as Y } from "vue";
|
|
2
|
+
import { InformationCircleIcon as j, ExclamationCircleIcon as D, CheckCircleIcon as X, ExclamationTriangleIcon as Z, XMarkIcon as K, ArrowDownIcon as V, ArrowUpIcon as Q } from "@heroicons/vue/24/outline";
|
|
3
|
+
var S = /* @__PURE__ */ ((e) => (e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFROM = "INFROM", e))(S || {}), b = /* @__PURE__ */ ((e) => (e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e))(b || {});
|
|
4
|
+
function J(e) {
|
|
5
|
+
let t = "red";
|
|
6
|
+
switch (e) {
|
|
7
|
+
case S.ERROR:
|
|
8
|
+
t = "red";
|
|
9
|
+
break;
|
|
10
|
+
case S.SUCCESS:
|
|
11
|
+
t = "green";
|
|
12
|
+
break;
|
|
13
|
+
case S.INFROM:
|
|
14
|
+
t = "gray";
|
|
15
|
+
break;
|
|
16
|
+
case S.WARNING:
|
|
17
|
+
t = "yellow";
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function ee(e) {
|
|
23
|
+
let t = "red";
|
|
24
|
+
switch (e) {
|
|
25
|
+
case b.GREEN: {
|
|
26
|
+
t = "green";
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
case b.RED: {
|
|
30
|
+
t = "red";
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
case b.BLUE: {
|
|
34
|
+
t = "blue";
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
case b.YELLOW: {
|
|
38
|
+
t = "yellow";
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
case b.NONE: {
|
|
42
|
+
t = "";
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
const te = { class: "font-medium pl-1" }, Be = /* @__PURE__ */ m({
|
|
49
|
+
__name: "BaseAlert",
|
|
50
|
+
props: {
|
|
51
|
+
title: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: !1,
|
|
54
|
+
default: S.ERROR
|
|
55
|
+
},
|
|
56
|
+
color: {
|
|
57
|
+
type: Object,
|
|
58
|
+
required: !1
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
setup(e) {
|
|
62
|
+
const t = e;
|
|
63
|
+
function a() {
|
|
64
|
+
let n = J(t.color);
|
|
65
|
+
return "flex items-center p-4 mb-4 text-sm text-" + n + "-800 border border-" + n + "-300 rounded-lg bg-" + n + "-50 dark:bg-gray-800 dark:text-" + n + "-400 dark:border-" + n + "-800";
|
|
66
|
+
}
|
|
67
|
+
return (n, r) => (l(), i("div", {
|
|
68
|
+
class: h(a()),
|
|
69
|
+
role: "alert"
|
|
70
|
+
}, [
|
|
71
|
+
y(f(j), { class: "w-6 h-6 text-gray-400" }),
|
|
72
|
+
s("div", null, [
|
|
73
|
+
s("span", te, p(e.title), 1)
|
|
74
|
+
])
|
|
75
|
+
], 2));
|
|
76
|
+
}
|
|
77
|
+
}), B = /* @__PURE__ */ m({
|
|
78
|
+
__name: "BaseBadge",
|
|
79
|
+
props: {
|
|
80
|
+
color: {
|
|
81
|
+
type: String,
|
|
82
|
+
required: !1
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
setup(e) {
|
|
86
|
+
const t = F(), a = C(() => !!t.default), n = e;
|
|
87
|
+
function r() {
|
|
88
|
+
let o = ee(n.color);
|
|
89
|
+
return "font-bold bg-" + o + "-100 text-" + o + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
90
|
+
}
|
|
91
|
+
return (o, c) => a.value ? (l(), i("span", {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: h(r())
|
|
94
|
+
}, [
|
|
95
|
+
A(o.$slots, "default")
|
|
96
|
+
], 2)) : d("", !0);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
var v = /* @__PURE__ */ ((e) => (e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e))(v || {}), w = /* @__PURE__ */ ((e) => (e.EXTRA_SMALL = "EXTRA SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e))(w || {});
|
|
100
|
+
const re = ["type", "disabled"], se = { key: 0 }, oe = { key: 1 }, ae = ["type", "disabled"], ne = { key: 0 }, le = { key: 1 }, ie = { key: 2 }, qe = /* @__PURE__ */ m({
|
|
101
|
+
__name: "BaseButton",
|
|
102
|
+
props: {
|
|
103
|
+
description: {
|
|
104
|
+
type: String,
|
|
105
|
+
required: !0
|
|
106
|
+
},
|
|
107
|
+
color: {
|
|
108
|
+
type: String,
|
|
109
|
+
required: !1,
|
|
110
|
+
default: v.BLUE
|
|
111
|
+
},
|
|
112
|
+
to: {
|
|
113
|
+
type: String,
|
|
114
|
+
required: !1
|
|
115
|
+
},
|
|
116
|
+
type: {
|
|
117
|
+
type: String,
|
|
118
|
+
required: !1,
|
|
119
|
+
default: "button"
|
|
120
|
+
},
|
|
121
|
+
icon: {
|
|
122
|
+
type: String,
|
|
123
|
+
required: !1
|
|
124
|
+
},
|
|
125
|
+
iconSize: {
|
|
126
|
+
type: String,
|
|
127
|
+
required: !1
|
|
128
|
+
},
|
|
129
|
+
iconLeft: {
|
|
130
|
+
type: String,
|
|
131
|
+
required: !1
|
|
132
|
+
},
|
|
133
|
+
isRounded: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: !1
|
|
136
|
+
},
|
|
137
|
+
isDisable: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
required: !1
|
|
140
|
+
},
|
|
141
|
+
size: {
|
|
142
|
+
type: String,
|
|
143
|
+
required: !1
|
|
144
|
+
},
|
|
145
|
+
isLoading: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
required: !1
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
setup(e) {
|
|
151
|
+
const t = e;
|
|
152
|
+
function a() {
|
|
153
|
+
let n = "inline-flex items-center", r;
|
|
154
|
+
switch (t.color) {
|
|
155
|
+
case v.BLUE: {
|
|
156
|
+
r = "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300", t.isDisable && (r += " bg-blue-400");
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
case v.WHITE: {
|
|
160
|
+
r = "focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200", t.isDisable && (r += " bg-gray-400");
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
case v.DARK: {
|
|
164
|
+
r = "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 ", t.isDisable && (r += " bg-gray-400");
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case v.GREEN: {
|
|
168
|
+
r = "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300", t.isDisable && (r += " bg-green-400");
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
case v.RED: {
|
|
172
|
+
r = "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300", t.isDisable && (r += " bg-red-400");
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case v.YELLOW: {
|
|
176
|
+
r = "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300", t.isDisable && (r += " bg-yellow-400");
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case v.PURPLE: {
|
|
180
|
+
r = "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 px-5 py-2.5 mb-2", t.isDisable && (r += " bg-purple-400");
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
185
|
+
switch (t.size) {
|
|
186
|
+
case w.EXTRA_SMALL: {
|
|
187
|
+
o = "px-3 py-2 text-xs";
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
case w.SMALL: {
|
|
191
|
+
o = "px-3 py-2 text-sm";
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case w.BASE: {
|
|
195
|
+
o = "px-5 py-2.5 text-sm";
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
case w.LARGE: {
|
|
199
|
+
o = "px-5 py-3 text-base";
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
case w.EXTRA_LARGE: {
|
|
203
|
+
o = "px-6 py-3.5 text-base";
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
let c = "rounded-lg";
|
|
208
|
+
return t.isRounded && (c = "rounded-full"), t.isDisable && (r += " cursor-not-allowed"), n + " " + o + " " + r + " " + "font-medium" + " " + c;
|
|
209
|
+
}
|
|
210
|
+
return (n, r) => {
|
|
211
|
+
const o = G("router-link");
|
|
212
|
+
return e.to ? (l(), q(o, {
|
|
213
|
+
key: 0,
|
|
214
|
+
to: e.to
|
|
215
|
+
}, {
|
|
216
|
+
default: T(() => [
|
|
217
|
+
s("button", {
|
|
218
|
+
type: t.type,
|
|
219
|
+
class: h(a()),
|
|
220
|
+
disabled: e.isDisable
|
|
221
|
+
}, [
|
|
222
|
+
e.iconLeft ? d("", !0) : (l(), i("span", se, p(e.description), 1)),
|
|
223
|
+
A(n.$slots, "default"),
|
|
224
|
+
e.iconLeft ? (l(), i("span", oe, p(e.description), 1)) : d("", !0)
|
|
225
|
+
], 10, re)
|
|
226
|
+
]),
|
|
227
|
+
_: 3
|
|
228
|
+
}, 8, ["to"])) : (l(), i("button", {
|
|
229
|
+
key: 1,
|
|
230
|
+
type: t.type,
|
|
231
|
+
class: h(a()),
|
|
232
|
+
disabled: e.isDisable
|
|
233
|
+
}, [
|
|
234
|
+
e.isLoading ? (l(), i("div", ne, [...r[0] || (r[0] = [
|
|
235
|
+
s("svg", {
|
|
236
|
+
"aria-hidden": "true",
|
|
237
|
+
role: "status",
|
|
238
|
+
class: "inline w-4 h-4 me-3 text-white animate-spin",
|
|
239
|
+
viewBox: "0 0 100 101",
|
|
240
|
+
fill: "none",
|
|
241
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
242
|
+
}, [
|
|
243
|
+
s("path", {
|
|
244
|
+
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
245
|
+
fill: "#E5E7EB"
|
|
246
|
+
}),
|
|
247
|
+
s("path", {
|
|
248
|
+
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
249
|
+
fill: "currentColor"
|
|
250
|
+
})
|
|
251
|
+
], -1)
|
|
252
|
+
])])) : d("", !0),
|
|
253
|
+
e.iconLeft ? d("", !0) : (l(), i("span", le, p(e.description), 1)),
|
|
254
|
+
A(n.$slots, "default"),
|
|
255
|
+
e.iconLeft ? (l(), i("span", ie, p(e.description), 1)) : d("", !0)
|
|
256
|
+
], 10, ae));
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
var R = /* @__PURE__ */ ((e) => (e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e))(R || {});
|
|
261
|
+
const ce = {
|
|
262
|
+
key: 0,
|
|
263
|
+
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
264
|
+
}, ue = {
|
|
265
|
+
key: 1,
|
|
266
|
+
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
267
|
+
}, de = {
|
|
268
|
+
key: 2,
|
|
269
|
+
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
270
|
+
}, De = /* @__PURE__ */ m({
|
|
271
|
+
__name: "BaseLine",
|
|
272
|
+
props: {
|
|
273
|
+
mode: {
|
|
274
|
+
type: String,
|
|
275
|
+
required: !1,
|
|
276
|
+
default: R.BASE
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
setup(e) {
|
|
280
|
+
return (t, a) => (l(), i($, null, [
|
|
281
|
+
e.mode === f(R).BASE ? (l(), i("hr", ce)) : d("", !0),
|
|
282
|
+
e.mode === f(R).BASE_SHORTER ? (l(), i("hr", ue)) : d("", !0),
|
|
283
|
+
e.mode === f(R).SQUARE ? (l(), i("hr", de)) : d("", !0)
|
|
284
|
+
], 64));
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
var _ = /* @__PURE__ */ ((e) => (e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e))(_ || {});
|
|
288
|
+
const fe = ["height", "width"], ze = /* @__PURE__ */ m({
|
|
289
|
+
__name: "BaseLogo",
|
|
290
|
+
props: {
|
|
291
|
+
size: {
|
|
292
|
+
type: String,
|
|
293
|
+
required: !1,
|
|
294
|
+
default: _.MEDIUM
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
setup(e) {
|
|
298
|
+
const t = e;
|
|
299
|
+
function a() {
|
|
300
|
+
let n = "";
|
|
301
|
+
switch (t.size) {
|
|
302
|
+
case _.SMALL: {
|
|
303
|
+
n = "50px";
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
case _.MEDIUM: {
|
|
307
|
+
n = "100px";
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
case _.LARGE: {
|
|
311
|
+
n = "150px";
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return n;
|
|
316
|
+
}
|
|
317
|
+
return (n, r) => {
|
|
318
|
+
const o = G("router-link");
|
|
319
|
+
return l(), q(o, {
|
|
320
|
+
to: "/",
|
|
321
|
+
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
322
|
+
}, {
|
|
323
|
+
default: T(() => [
|
|
324
|
+
(l(), i("svg", {
|
|
325
|
+
height: a(),
|
|
326
|
+
width: a(),
|
|
327
|
+
viewBox: "33.6 130.6 499.7 242.9",
|
|
328
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
329
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
330
|
+
}, [...r[0] || (r[0] = [
|
|
331
|
+
s("linearGradient", { id: "a" }, [
|
|
332
|
+
s("stop", {
|
|
333
|
+
offset: ".085",
|
|
334
|
+
"stop-color": "#469e43"
|
|
335
|
+
}),
|
|
336
|
+
s("stop", {
|
|
337
|
+
offset: "1",
|
|
338
|
+
"stop-color": "#132d13"
|
|
339
|
+
})
|
|
340
|
+
], -1),
|
|
341
|
+
s("linearGradient", {
|
|
342
|
+
id: "b",
|
|
343
|
+
gradientUnits: "userSpaceOnUse",
|
|
344
|
+
x1: "64.863",
|
|
345
|
+
x2: "64.863",
|
|
346
|
+
"xlink:href": "#a",
|
|
347
|
+
y1: "288.291",
|
|
348
|
+
y2: "369.4"
|
|
349
|
+
}, null, -1),
|
|
350
|
+
s("linearGradient", {
|
|
351
|
+
id: "c",
|
|
352
|
+
gradientUnits: "userSpaceOnUse",
|
|
353
|
+
x1: "138.367",
|
|
354
|
+
x2: "138.367",
|
|
355
|
+
"xlink:href": "#a",
|
|
356
|
+
y1: "308.454",
|
|
357
|
+
y2: "370.601"
|
|
358
|
+
}, null, -1),
|
|
359
|
+
s("linearGradient", {
|
|
360
|
+
id: "d",
|
|
361
|
+
gradientUnits: "userSpaceOnUse",
|
|
362
|
+
x1: "195.475",
|
|
363
|
+
x2: "195.475",
|
|
364
|
+
"xlink:href": "#a",
|
|
365
|
+
y1: "288.291",
|
|
366
|
+
y2: "369.85"
|
|
367
|
+
}, null, -1),
|
|
368
|
+
s("linearGradient", {
|
|
369
|
+
id: "e",
|
|
370
|
+
gradientUnits: "userSpaceOnUse",
|
|
371
|
+
x1: "249.634",
|
|
372
|
+
x2: "249.634",
|
|
373
|
+
"xlink:href": "#a",
|
|
374
|
+
y1: "307.312",
|
|
375
|
+
y2: "369.511"
|
|
376
|
+
}, null, -1),
|
|
377
|
+
s("linearGradient", {
|
|
378
|
+
id: "f",
|
|
379
|
+
gradientUnits: "userSpaceOnUse",
|
|
380
|
+
x1: "302.884",
|
|
381
|
+
x2: "302.884",
|
|
382
|
+
"xlink:href": "#a",
|
|
383
|
+
y1: "288.291",
|
|
384
|
+
y2: "367.857"
|
|
385
|
+
}, null, -1),
|
|
386
|
+
s("linearGradient", {
|
|
387
|
+
id: "g",
|
|
388
|
+
gradientUnits: "userSpaceOnUse",
|
|
389
|
+
x1: "354.118",
|
|
390
|
+
x2: "354.118",
|
|
391
|
+
"xlink:href": "#a",
|
|
392
|
+
y1: "307.312",
|
|
393
|
+
y2: "369.511"
|
|
394
|
+
}, null, -1),
|
|
395
|
+
s("linearGradient", {
|
|
396
|
+
id: "h",
|
|
397
|
+
gradientUnits: "userSpaceOnUse",
|
|
398
|
+
x1: "428.02",
|
|
399
|
+
x2: "428.02",
|
|
400
|
+
"xlink:href": "#a",
|
|
401
|
+
y1: "306.156",
|
|
402
|
+
y2: "367.742"
|
|
403
|
+
}, null, -1),
|
|
404
|
+
s("linearGradient", {
|
|
405
|
+
id: "i",
|
|
406
|
+
gradientUnits: "userSpaceOnUse",
|
|
407
|
+
x1: "502.066",
|
|
408
|
+
x2: "502.066",
|
|
409
|
+
"xlink:href": "#a",
|
|
410
|
+
y1: "288.291",
|
|
411
|
+
y2: "369.4"
|
|
412
|
+
}, null, -1),
|
|
413
|
+
s("linearGradient", {
|
|
414
|
+
id: "j",
|
|
415
|
+
gradientUnits: "userSpaceOnUse",
|
|
416
|
+
x1: "283.264",
|
|
417
|
+
x2: "283.264",
|
|
418
|
+
"xlink:href": "#a",
|
|
419
|
+
y1: "131.629",
|
|
420
|
+
y2: "232.559"
|
|
421
|
+
}, null, -1),
|
|
422
|
+
s("linearGradient", {
|
|
423
|
+
id: "k",
|
|
424
|
+
gradientUnits: "userSpaceOnUse",
|
|
425
|
+
x1: "283.46",
|
|
426
|
+
x2: "283.46",
|
|
427
|
+
y1: "202.275",
|
|
428
|
+
y2: "183.785"
|
|
429
|
+
}, [
|
|
430
|
+
s("stop", {
|
|
431
|
+
offset: "0",
|
|
432
|
+
"stop-color": "#969799",
|
|
433
|
+
"stop-opacity": "0"
|
|
434
|
+
}),
|
|
435
|
+
s("stop", {
|
|
436
|
+
offset: "1",
|
|
437
|
+
"stop-color": "#808183"
|
|
438
|
+
})
|
|
439
|
+
], -1),
|
|
440
|
+
s("path", {
|
|
441
|
+
d: "m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",
|
|
442
|
+
fill: "url(#b)"
|
|
443
|
+
}, null, -1),
|
|
444
|
+
s("path", {
|
|
445
|
+
d: "m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",
|
|
446
|
+
fill: "url(#c)"
|
|
447
|
+
}, null, -1),
|
|
448
|
+
s("path", {
|
|
449
|
+
d: "m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",
|
|
450
|
+
fill: "url(#d)"
|
|
451
|
+
}, null, -1),
|
|
452
|
+
s("path", {
|
|
453
|
+
d: "m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
454
|
+
fill: "url(#e)"
|
|
455
|
+
}, null, -1),
|
|
456
|
+
s("path", {
|
|
457
|
+
d: "m296.4 288.3h13v79.6h-13z",
|
|
458
|
+
fill: "url(#f)"
|
|
459
|
+
}, null, -1),
|
|
460
|
+
s("path", {
|
|
461
|
+
d: "m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
462
|
+
fill: "url(#g)"
|
|
463
|
+
}, null, -1),
|
|
464
|
+
s("path", {
|
|
465
|
+
d: "m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",
|
|
466
|
+
fill: "url(#h)"
|
|
467
|
+
}, null, -1),
|
|
468
|
+
s("path", {
|
|
469
|
+
d: "m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",
|
|
470
|
+
fill: "url(#i)"
|
|
471
|
+
}, null, -1),
|
|
472
|
+
s("path", {
|
|
473
|
+
d: "m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",
|
|
474
|
+
fill: "url(#j)"
|
|
475
|
+
}, null, -1),
|
|
476
|
+
s("path", {
|
|
477
|
+
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
478
|
+
fill: "url(#k)"
|
|
479
|
+
}, null, -1)
|
|
480
|
+
])], 8, fe))
|
|
481
|
+
]),
|
|
482
|
+
_: 1
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
var z = /* @__PURE__ */ ((e) => (e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e))(z || {});
|
|
488
|
+
const ge = { class: "dialog relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white" }, pe = {
|
|
489
|
+
key: 0,
|
|
490
|
+
class: "p-6 text-center"
|
|
491
|
+
}, be = { class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400" }, he = { class: "flex justify-center" }, ye = /* @__PURE__ */ m({
|
|
492
|
+
__name: "BaseModal",
|
|
493
|
+
props: {
|
|
494
|
+
title: {
|
|
495
|
+
type: String,
|
|
496
|
+
required: !0
|
|
497
|
+
},
|
|
498
|
+
description: {
|
|
499
|
+
type: String,
|
|
500
|
+
required: !1
|
|
501
|
+
},
|
|
502
|
+
to: {
|
|
503
|
+
type: String,
|
|
504
|
+
required: !1,
|
|
505
|
+
default: "/"
|
|
506
|
+
},
|
|
507
|
+
mode: {
|
|
508
|
+
type: String,
|
|
509
|
+
required: !1,
|
|
510
|
+
default: "SUCCESS"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
emits: ["closeModal", "confirmModal"],
|
|
514
|
+
setup(e) {
|
|
515
|
+
return (t, a) => {
|
|
516
|
+
const n = G("base-button");
|
|
517
|
+
return l(), i($, null, [
|
|
518
|
+
s("div", {
|
|
519
|
+
class: "outside",
|
|
520
|
+
onClick: a[0] || (a[0] = (r) => t.$emit("closeModal"))
|
|
521
|
+
}),
|
|
522
|
+
s("div", ge, [
|
|
523
|
+
e.mode === f(z).DELETE ? (l(), i("div", pe, [
|
|
524
|
+
y(f(D), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
525
|
+
s("h3", be, " Are you sure you want to delete this " + p(e.title) + "? ", 1),
|
|
526
|
+
s("div", he, [
|
|
527
|
+
y(n, {
|
|
528
|
+
color: f(v).RED,
|
|
529
|
+
onClick: a[1] || (a[1] = (r) => t.$emit("confirmModal")),
|
|
530
|
+
description: "Yes, I'm sure"
|
|
531
|
+
}, null, 8, ["color"]),
|
|
532
|
+
y(n, {
|
|
533
|
+
color: f(v).WHITE,
|
|
534
|
+
onClick: a[2] || (a[2] = (r) => t.$emit("closeModal")),
|
|
535
|
+
description: "No, cancel"
|
|
536
|
+
}, null, 8, ["color"])
|
|
537
|
+
])
|
|
538
|
+
])) : d("", !0)
|
|
539
|
+
])
|
|
540
|
+
], 64);
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
}), M = (e, t) => {
|
|
544
|
+
const a = e.__vccOpts || e;
|
|
545
|
+
for (const [n, r] of t)
|
|
546
|
+
a[n] = r;
|
|
547
|
+
return a;
|
|
548
|
+
}, Pe = /* @__PURE__ */ M(ye, [["__scopeId", "data-v-492169b3"]]), We = /* @__PURE__ */ m({
|
|
549
|
+
__name: "BaseRow",
|
|
550
|
+
props: {
|
|
551
|
+
bgColor: {
|
|
552
|
+
type: String,
|
|
553
|
+
required: !1,
|
|
554
|
+
default: "white"
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
setup(e) {
|
|
558
|
+
const t = e;
|
|
559
|
+
function a() {
|
|
560
|
+
return "block p-6 border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700 global " + t.bgColor;
|
|
561
|
+
}
|
|
562
|
+
return (n, r) => (l(), i("div", {
|
|
563
|
+
class: h(a())
|
|
564
|
+
}, [
|
|
565
|
+
A(n.$slots, "default")
|
|
566
|
+
], 2));
|
|
567
|
+
}
|
|
568
|
+
}), me = {}, xe = { class: "mb-3" };
|
|
569
|
+
function ve(e, t) {
|
|
570
|
+
return l(), i("div", xe, [...t[0] || (t[0] = [
|
|
571
|
+
s("svg", {
|
|
572
|
+
"aria-hidden": "true",
|
|
573
|
+
class: "inline w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",
|
|
574
|
+
viewBox: "0 0 100 101",
|
|
575
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
576
|
+
}, [
|
|
577
|
+
s("path", {
|
|
578
|
+
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
579
|
+
fill: "currentColor"
|
|
580
|
+
}),
|
|
581
|
+
s("path", {
|
|
582
|
+
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
583
|
+
fill: "currentFill"
|
|
584
|
+
})
|
|
585
|
+
], -1),
|
|
586
|
+
s("span", { class: "sr-only" }, "Loading...", -1)
|
|
587
|
+
])]);
|
|
588
|
+
}
|
|
589
|
+
const Fe = /* @__PURE__ */ M(me, [["render", ve]]);
|
|
590
|
+
var E = /* @__PURE__ */ ((e) => (e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e))(E || {}), L = /* @__PURE__ */ ((e) => (e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e))(L || {});
|
|
591
|
+
const ke = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, Ce = { class: "ml-3 text-sm font-normal" }, Ee = {
|
|
592
|
+
key: 3,
|
|
593
|
+
type: "button",
|
|
594
|
+
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700",
|
|
595
|
+
"data-dismiss-target": "#toast-danger",
|
|
596
|
+
"aria-label": "Close"
|
|
597
|
+
}, He = /* @__PURE__ */ m({
|
|
598
|
+
__name: "BaseToast",
|
|
599
|
+
props: {
|
|
600
|
+
mode: {
|
|
601
|
+
type: Object,
|
|
602
|
+
required: !0
|
|
603
|
+
},
|
|
604
|
+
description: {
|
|
605
|
+
type: String,
|
|
606
|
+
required: !0
|
|
607
|
+
},
|
|
608
|
+
hasCloseIcon: {
|
|
609
|
+
type: Boolean,
|
|
610
|
+
required: !1,
|
|
611
|
+
default: !0
|
|
612
|
+
},
|
|
613
|
+
positioning: {
|
|
614
|
+
type: String,
|
|
615
|
+
required: !1,
|
|
616
|
+
default: "right"
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
setup(e) {
|
|
620
|
+
const t = e;
|
|
621
|
+
function a() {
|
|
622
|
+
let c = "";
|
|
623
|
+
switch (t.mode) {
|
|
624
|
+
case E.ERROR:
|
|
625
|
+
c = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
626
|
+
break;
|
|
627
|
+
case E.SUCCESS:
|
|
628
|
+
c = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
629
|
+
break;
|
|
630
|
+
case E.WARNING:
|
|
631
|
+
c = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
return "inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg " + c;
|
|
635
|
+
}
|
|
636
|
+
function n() {
|
|
637
|
+
let c = "top-5 right-5";
|
|
638
|
+
switch (t.positioning) {
|
|
639
|
+
case L.BOTTOM_LEFT:
|
|
640
|
+
c = "bottom-5";
|
|
641
|
+
break;
|
|
642
|
+
case L.TOP_LEFT:
|
|
643
|
+
c = "top-5";
|
|
644
|
+
break;
|
|
645
|
+
case L.TOP_RIGHT:
|
|
646
|
+
c = "top-5 right-5";
|
|
647
|
+
break;
|
|
648
|
+
case L.BOTTOM_RIGHT:
|
|
649
|
+
c = "bottom-5 right-5";
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + c + " space-x";
|
|
653
|
+
}
|
|
654
|
+
const r = O(!0);
|
|
655
|
+
function o() {
|
|
656
|
+
setTimeout(() => r.value = !1, 1e6);
|
|
657
|
+
}
|
|
658
|
+
return o(), (c, g) => r.value ? (l(), i("div", {
|
|
659
|
+
key: 0,
|
|
660
|
+
id: "toast-top-right",
|
|
661
|
+
class: h(n()),
|
|
662
|
+
role: "alert"
|
|
663
|
+
}, [
|
|
664
|
+
s("div", ke, [
|
|
665
|
+
e.mode == f(E).ERROR ? (l(), i("div", {
|
|
666
|
+
key: 0,
|
|
667
|
+
class: h(a())
|
|
668
|
+
}, [
|
|
669
|
+
y(f(D), { class: "h-6 w-6 text-red-500" }),
|
|
670
|
+
g[1] || (g[1] = s("span", { class: "sr-only" }, "Error icon", -1))
|
|
671
|
+
], 2)) : e.mode == f(E).SUCCESS ? (l(), i("div", {
|
|
672
|
+
key: 1,
|
|
673
|
+
class: h(a())
|
|
674
|
+
}, [
|
|
675
|
+
y(f(X), { class: "h-6 w-6 text-green-500" }),
|
|
676
|
+
g[2] || (g[2] = s("span", { class: "sr-only" }, "Check icon", -1))
|
|
677
|
+
], 2)) : e.mode == f(E).WARNING ? (l(), i("div", {
|
|
678
|
+
key: 2,
|
|
679
|
+
class: h(a())
|
|
680
|
+
}, [
|
|
681
|
+
y(f(Z), { class: "h-6 w-6 text-yellow-500" }),
|
|
682
|
+
g[3] || (g[3] = s("span", { class: "sr-only" }, "Warning icon", -1))
|
|
683
|
+
], 2)) : d("", !0),
|
|
684
|
+
s("div", Ce, p(e.description), 1),
|
|
685
|
+
e.hasCloseIcon ? (l(), i("button", Ee, [
|
|
686
|
+
g[4] || (g[4] = s("span", { class: "sr-only" }, "Close", -1)),
|
|
687
|
+
y(f(K), {
|
|
688
|
+
class: "h-6 w-6 text-gray-500 cursor-pointer",
|
|
689
|
+
onClick: g[0] || (g[0] = (u) => r.value = !r.value)
|
|
690
|
+
})
|
|
691
|
+
])) : d("", !0)
|
|
692
|
+
])
|
|
693
|
+
], 2)) : d("", !0);
|
|
694
|
+
}
|
|
695
|
+
}), we = { class: "w-13" }, Ye = /* @__PURE__ */ m({
|
|
696
|
+
__name: "ColoredSquares",
|
|
697
|
+
props: {
|
|
698
|
+
color: {
|
|
699
|
+
type: String,
|
|
700
|
+
required: !1
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
setup(e) {
|
|
704
|
+
const t = e, a = [
|
|
705
|
+
"bg-slate-300",
|
|
706
|
+
"bg-zinc-300",
|
|
707
|
+
"bg-neutral-300",
|
|
708
|
+
"bg-stone-300",
|
|
709
|
+
"bg-blue-300",
|
|
710
|
+
"bg-green-300",
|
|
711
|
+
"bg-yellow-300",
|
|
712
|
+
"bg-purple-300",
|
|
713
|
+
"bg-pink-300"
|
|
714
|
+
], n = C(() => a[Math.floor(Math.random() * a.length)]);
|
|
715
|
+
function r() {
|
|
716
|
+
let o = "gray";
|
|
717
|
+
switch (t.color) {
|
|
718
|
+
case b.GREEN: {
|
|
719
|
+
o = "green";
|
|
720
|
+
break;
|
|
721
|
+
}
|
|
722
|
+
case b.RED: {
|
|
723
|
+
o = "red";
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
case b.BLUE: {
|
|
727
|
+
o = "blue";
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
case b.YELLOW: {
|
|
731
|
+
o = "yellow";
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
734
|
+
case b.NONE: {
|
|
735
|
+
o = "";
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
return "font-bold bg-" + o + "-100 text-" + o + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
740
|
+
}
|
|
741
|
+
return (o, c) => (l(), i("div", we, [
|
|
742
|
+
s("div", {
|
|
743
|
+
class: h(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", r()])
|
|
744
|
+
}, [
|
|
745
|
+
A(o.$slots, "default"),
|
|
746
|
+
s("div", {
|
|
747
|
+
class: h(["absolute bottom-0 left-0 h-1 w-full", n.value])
|
|
748
|
+
}, null, 2)
|
|
749
|
+
], 2)
|
|
750
|
+
]));
|
|
751
|
+
}
|
|
752
|
+
}), Se = {
|
|
753
|
+
key: 0,
|
|
754
|
+
class: "font-bold text-green-800"
|
|
755
|
+
}, Re = { key: 0 }, _e = { key: 0 }, Le = "font-bold", je = /* @__PURE__ */ m({
|
|
756
|
+
__name: "EuroAmount",
|
|
757
|
+
props: {
|
|
758
|
+
amount: {
|
|
759
|
+
type: Number,
|
|
760
|
+
required: !1
|
|
761
|
+
},
|
|
762
|
+
beforeAmount: {
|
|
763
|
+
type: Number,
|
|
764
|
+
default: null,
|
|
765
|
+
required: !1
|
|
766
|
+
},
|
|
767
|
+
showCurrency: {
|
|
768
|
+
type: Boolean,
|
|
769
|
+
default: !0,
|
|
770
|
+
required: !1
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
setup(e) {
|
|
774
|
+
const t = e, a = C(() => t.amount !== null && t.amount !== void 0), n = C(() => a.value && t.amount < 0), r = C(() => t.beforeAmount === null || t.beforeAmount === void 0 ? !1 : t.amount < t.beforeAmount), o = C(() => n.value || r.value), c = C(() => !n.value && !r.value && !(t.beforeAmount === null || t.beforeAmount === void 0));
|
|
775
|
+
return (g, u) => (l(), i($, null, [
|
|
776
|
+
a.value && c.value ? (l(), i("span", Se, [
|
|
777
|
+
U(p(e.amount) + " ", 1),
|
|
778
|
+
e.showCurrency ? (l(), i("span", Re, "€")) : d("", !0)
|
|
779
|
+
])) : d("", !0),
|
|
780
|
+
a.value && !c.value ? (l(), i("span", {
|
|
781
|
+
key: 1,
|
|
782
|
+
class: h([Le, o.value ? "text-red-800" : "text-gray-800"])
|
|
783
|
+
}, [
|
|
784
|
+
U(p(e.amount) + " ", 1),
|
|
785
|
+
e.showCurrency ? (l(), i("span", _e, "€")) : d("", !0)
|
|
786
|
+
], 2)) : d("", !0)
|
|
787
|
+
], 64));
|
|
788
|
+
}
|
|
789
|
+
}), Ae = ["onClick"], Oe = {
|
|
790
|
+
key: 1,
|
|
791
|
+
style: { cursor: "not-allowed" }
|
|
792
|
+
}, Te = /* @__PURE__ */ m({
|
|
793
|
+
__name: "Pagination",
|
|
794
|
+
props: {
|
|
795
|
+
totalItems: {
|
|
796
|
+
type: Number,
|
|
797
|
+
required: !0,
|
|
798
|
+
default: 10
|
|
799
|
+
},
|
|
800
|
+
itemsPerPage: {
|
|
801
|
+
type: Number,
|
|
802
|
+
default: 20
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
emits: ["page-changed"],
|
|
806
|
+
setup(e, { emit: t }) {
|
|
807
|
+
const a = e, n = O(1), r = O(0), o = O([]), c = t;
|
|
808
|
+
function g(u) {
|
|
809
|
+
if (u !== n.value && u >= 1 && u <= r.value && (n.value = u), r.value > 5) {
|
|
810
|
+
o.value = [], u - 3 > 0 && (o.value.push(1), o.value.push(0));
|
|
811
|
+
for (let x = 2; x >= 1; x--) {
|
|
812
|
+
let N = u - x;
|
|
813
|
+
N > 0 && o.value.push(N);
|
|
814
|
+
}
|
|
815
|
+
o.value.push(n.value);
|
|
816
|
+
let k = r.value - u, I = k > 2, W = 2;
|
|
817
|
+
if (I) {
|
|
818
|
+
for (let x = 1; x <= W; x++)
|
|
819
|
+
o.value.push(u + x);
|
|
820
|
+
o.value.push(0), o.value.push(r.value);
|
|
821
|
+
} else
|
|
822
|
+
for (let x = 1; x <= k; x++)
|
|
823
|
+
o.value.push(u + x);
|
|
824
|
+
}
|
|
825
|
+
c("page-changed", u);
|
|
826
|
+
}
|
|
827
|
+
return H(() => a.totalItems, () => {
|
|
828
|
+
if (r.value = Math.ceil(a.totalItems / a.itemsPerPage), o.value = [], r.value > 5) {
|
|
829
|
+
for (let u = 1; u < 5; u++)
|
|
830
|
+
o.value.push(u);
|
|
831
|
+
o.value.push(0), o.value.push(r.value);
|
|
832
|
+
} else
|
|
833
|
+
for (let u = 1; u <= r.value; u++)
|
|
834
|
+
o.value.push(u);
|
|
835
|
+
}), (u, P) => (l(), i("div", null, [
|
|
836
|
+
s("ul", null, [
|
|
837
|
+
(l(!0), i($, null, Y(o.value, (k) => (l(), i("li", { key: k }, [
|
|
838
|
+
k !== 0 ? (l(), i("a", {
|
|
839
|
+
key: 0,
|
|
840
|
+
onClick: (I) => g(k),
|
|
841
|
+
class: h({ active: k === n.value })
|
|
842
|
+
}, p(k), 11, Ae)) : d("", !0),
|
|
843
|
+
k === 0 ? (l(), i("span", Oe, "...")) : d("", !0)
|
|
844
|
+
]))), 128))
|
|
845
|
+
])
|
|
846
|
+
]));
|
|
847
|
+
}
|
|
848
|
+
}), Xe = /* @__PURE__ */ M(Te, [["__scopeId", "data-v-248e09af"]]), Ue = { key: 0 }, $e = {
|
|
849
|
+
key: 0,
|
|
850
|
+
class: "flex items-center space-x-2"
|
|
851
|
+
}, Ge = {
|
|
852
|
+
key: 1,
|
|
853
|
+
class: "flex items-center space-x-2"
|
|
854
|
+
}, Ze = /* @__PURE__ */ m({
|
|
855
|
+
__name: "TrendArrow",
|
|
856
|
+
props: {
|
|
857
|
+
number: {
|
|
858
|
+
type: Number,
|
|
859
|
+
required: !1
|
|
860
|
+
},
|
|
861
|
+
icon: {
|
|
862
|
+
type: String,
|
|
863
|
+
required: !1
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
setup(e) {
|
|
867
|
+
const t = e, a = C(() => t.number !== null && t.number !== void 0 && t.number < 0);
|
|
868
|
+
return (n, r) => e.number ? (l(), i("div", Ue, [
|
|
869
|
+
a.value ? (l(), i("span", $e, [
|
|
870
|
+
y(B, {
|
|
871
|
+
color: f(b).RED
|
|
872
|
+
}, {
|
|
873
|
+
default: T(() => [
|
|
874
|
+
U(p(e.number) + p(t.icon), 1)
|
|
875
|
+
]),
|
|
876
|
+
_: 1
|
|
877
|
+
}, 8, ["color"]),
|
|
878
|
+
y(f(V), { class: "h-5 w-5 text-red-500" })
|
|
879
|
+
])) : (l(), i("span", Ge, [
|
|
880
|
+
y(B, {
|
|
881
|
+
color: f(b).GREEN
|
|
882
|
+
}, {
|
|
883
|
+
default: T(() => [
|
|
884
|
+
U(p(e.number) + p(t.icon), 1)
|
|
885
|
+
]),
|
|
886
|
+
_: 1
|
|
887
|
+
}, 8, ["color"]),
|
|
888
|
+
y(f(Q), { class: "h-5 w-5 text-green-500" })
|
|
889
|
+
]))
|
|
890
|
+
])) : d("", !0);
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
var Me = /* @__PURE__ */ ((e) => (e.WIN = "WIN", e.LOSE = "LOSE", e))(Me || {});
|
|
894
|
+
export {
|
|
895
|
+
S as AlertEnum,
|
|
896
|
+
Be as BaseAlert,
|
|
897
|
+
B as BaseBadge,
|
|
898
|
+
Me as BaseBadgeEnum,
|
|
899
|
+
qe as BaseButton,
|
|
900
|
+
v as BaseButtonEnum,
|
|
901
|
+
w as BaseButtonSizeEnum,
|
|
902
|
+
De as BaseLine,
|
|
903
|
+
_ as BaseLoginEnum,
|
|
904
|
+
ze as BaseLogo,
|
|
905
|
+
Pe as BaseModal,
|
|
906
|
+
z as BaseModalEnum,
|
|
907
|
+
We as BaseRow,
|
|
908
|
+
Fe as BaseSpinner,
|
|
909
|
+
He as BaseToast,
|
|
910
|
+
E as BaseToastEnum,
|
|
911
|
+
Ye as ColoredSquares,
|
|
912
|
+
b as ColorsEnums,
|
|
913
|
+
je as EuroAmount,
|
|
914
|
+
R as LineEnum,
|
|
915
|
+
Xe as Pagination,
|
|
916
|
+
L as PositioningEnum,
|
|
917
|
+
Ze as TrendArrow,
|
|
918
|
+
J as getBaseColor,
|
|
919
|
+
ee as getBaseColorOf
|
|
920
|
+
};
|