prisma-goat 0.1.3 → 0.1.4
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 -1
- package/dist/prisma-goat.js +139 -128
- package/dist/prisma-goat.umd.cjs +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/prisma-goat.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as C, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import i, { forwardRef as S, useEffect as $, useState as
|
|
2
|
+
import i, { forwardRef as S, useEffect as $, useState as h, useRef as MA } from "react";
|
|
3
3
|
var _ = {
|
|
4
4
|
color: void 0,
|
|
5
5
|
size: void 0,
|
|
6
6
|
className: void 0,
|
|
7
7
|
style: void 0,
|
|
8
8
|
attr: void 0
|
|
9
|
-
},
|
|
10
|
-
function
|
|
9
|
+
}, J = i.createContext && /* @__PURE__ */ i.createContext(_), EA = ["attr", "size", "title"];
|
|
10
|
+
function lA(g, A) {
|
|
11
11
|
if (g == null) return {};
|
|
12
|
-
var B =
|
|
12
|
+
var B = IA(g, A), w, I;
|
|
13
13
|
if (Object.getOwnPropertySymbols) {
|
|
14
|
-
var
|
|
15
|
-
for (
|
|
16
|
-
w =
|
|
14
|
+
var l = Object.getOwnPropertySymbols(g);
|
|
15
|
+
for (I = 0; I < l.length; I++)
|
|
16
|
+
w = l[I], !(A.indexOf(w) >= 0) && Object.prototype.propertyIsEnumerable.call(g, w) && (B[w] = g[w]);
|
|
17
17
|
}
|
|
18
18
|
return B;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function IA(g, A) {
|
|
21
21
|
if (g == null) return {};
|
|
22
22
|
var B = {};
|
|
23
23
|
for (var w in g)
|
|
@@ -27,27 +27,27 @@ function lA(g, A) {
|
|
|
27
27
|
}
|
|
28
28
|
return B;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
30
|
+
function R() {
|
|
31
|
+
return R = Object.assign ? Object.assign.bind() : function(g) {
|
|
32
32
|
for (var A = 1; A < arguments.length; A++) {
|
|
33
33
|
var B = arguments[A];
|
|
34
34
|
for (var w in B)
|
|
35
35
|
Object.prototype.hasOwnProperty.call(B, w) && (g[w] = B[w]);
|
|
36
36
|
}
|
|
37
37
|
return g;
|
|
38
|
-
},
|
|
38
|
+
}, R.apply(this, arguments);
|
|
39
39
|
}
|
|
40
40
|
function T(g, A) {
|
|
41
41
|
var B = Object.keys(g);
|
|
42
42
|
if (Object.getOwnPropertySymbols) {
|
|
43
43
|
var w = Object.getOwnPropertySymbols(g);
|
|
44
|
-
A && (w = w.filter(function(
|
|
45
|
-
return Object.getOwnPropertyDescriptor(g,
|
|
44
|
+
A && (w = w.filter(function(I) {
|
|
45
|
+
return Object.getOwnPropertyDescriptor(g, I).enumerable;
|
|
46
46
|
})), B.push.apply(B, w);
|
|
47
47
|
}
|
|
48
48
|
return B;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Z(g) {
|
|
51
51
|
for (var A = 1; A < arguments.length; A++) {
|
|
52
52
|
var B = arguments[A] != null ? arguments[A] : {};
|
|
53
53
|
A % 2 ? T(Object(B), !0).forEach(function(w) {
|
|
@@ -76,45 +76,45 @@ function tA(g, A) {
|
|
|
76
76
|
return (A === "string" ? String : Number)(g);
|
|
77
77
|
}
|
|
78
78
|
function AA(g) {
|
|
79
|
-
return g && g.map((A, B) => /* @__PURE__ */ i.createElement(A.tag,
|
|
79
|
+
return g && g.map((A, B) => /* @__PURE__ */ i.createElement(A.tag, Z({
|
|
80
80
|
key: B
|
|
81
81
|
}, A.attr), AA(A.child)));
|
|
82
82
|
}
|
|
83
83
|
function D(g) {
|
|
84
|
-
return (A) => /* @__PURE__ */ i.createElement(cA,
|
|
85
|
-
attr:
|
|
84
|
+
return (A) => /* @__PURE__ */ i.createElement(cA, R({
|
|
85
|
+
attr: Z({}, g.attr)
|
|
86
86
|
}, A), AA(g.child));
|
|
87
87
|
}
|
|
88
88
|
function cA(g) {
|
|
89
89
|
var A = (B) => {
|
|
90
90
|
var {
|
|
91
91
|
attr: w,
|
|
92
|
-
size:
|
|
93
|
-
title:
|
|
94
|
-
} = g, c =
|
|
95
|
-
return B.className && (
|
|
92
|
+
size: I,
|
|
93
|
+
title: l
|
|
94
|
+
} = g, c = lA(g, EA), n = I || B.size || "1em", M;
|
|
95
|
+
return B.className && (M = B.className), g.className && (M = (M ? M + " " : "") + g.className), /* @__PURE__ */ i.createElement("svg", R({
|
|
96
96
|
stroke: "currentColor",
|
|
97
97
|
fill: "currentColor",
|
|
98
98
|
strokeWidth: "0"
|
|
99
99
|
}, B.attr, w, c, {
|
|
100
|
-
className:
|
|
101
|
-
style:
|
|
100
|
+
className: M,
|
|
101
|
+
style: Z(Z({
|
|
102
102
|
color: g.color || B.color
|
|
103
103
|
}, B.style), g.style),
|
|
104
104
|
height: n,
|
|
105
105
|
width: n,
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg"
|
|
107
|
-
}),
|
|
107
|
+
}), l && /* @__PURE__ */ i.createElement("title", null, l), g.children);
|
|
108
108
|
};
|
|
109
|
-
return
|
|
109
|
+
return J !== void 0 ? /* @__PURE__ */ i.createElement(J.Consumer, null, (B) => A(B)) : A(_);
|
|
110
110
|
}
|
|
111
111
|
function nA(g) {
|
|
112
112
|
return D({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.586 4l-6.586 6.586a2 2 0 0 0 0 2.828l6.586 6.586a2 2 0 0 0 2.18 .434l.145 -.068a2 2 0 0 0 1.089 -1.78v-2.586h2a1 1 0 0 0 1 -1v-6l-.007 -.117a1 1 0 0 0 -.993 -.883l-2 -.001v-2.585a2 2 0 0 0 -3.414 -1.414z" }, child: [] }, { tag: "path", attr: { d: "M21 8a1 1 0 0 1 .993 .883l.007 .117v6a1 1 0 0 1 -1.993 .117l-.007 -.117v-6a1 1 0 0 1 1 -1z" }, child: [] }, { tag: "path", attr: { d: "M18 8a1 1 0 0 1 .993 .883l.007 .117v6a1 1 0 0 1 -1.993 .117l-.007 -.117v-6a1 1 0 0 1 1 -1z" }, child: [] }] })(g);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function sA(g) {
|
|
115
115
|
return D({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12.089 3.634a2 2 0 0 0 -1.089 1.78l-.001 2.585l-1.999 .001a1 1 0 0 0 -1 1v6l.007 .117a1 1 0 0 0 .993 .883l1.999 -.001l.001 2.587a2 2 0 0 0 3.414 1.414l6.586 -6.586a2 2 0 0 0 0 -2.828l-6.586 -6.586a2 2 0 0 0 -2.18 -.434l-.145 .068z" }, child: [] }, { tag: "path", attr: { d: "M3 8a1 1 0 0 1 .993 .883l.007 .117v6a1 1 0 0 1 -1.993 .117l-.007 -.117v-6a1 1 0 0 1 1 -1z" }, child: [] }, { tag: "path", attr: { d: "M6 8a1 1 0 0 1 .993 .883l.007 .117v6a1 1 0 0 1 -1.993 .117l-.007 -.117v-6a1 1 0 0 1 1 -1z" }, child: [] }] })(g);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function oA(g) {
|
|
118
118
|
return D({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z" }, child: [] }] })(g);
|
|
119
119
|
}
|
|
120
120
|
function iA(g) {
|
|
@@ -126,16 +126,16 @@ function fA(g) {
|
|
|
126
126
|
function uA(g) {
|
|
127
127
|
return D({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M10 8v6l4.7 2.9.8-1.2-4-2.4V8z" }, child: [] }, { tag: "path", attr: { d: "M17.92 12A6.957 6.957 0 0 1 11 20c-3.9 0-7-3.1-7-7s3.1-7 7-7c.7 0 1.37.1 2 .29V4.23c-.64-.15-1.31-.23-2-.23-5 0-9 4-9 9s4 9 9 9a8.963 8.963 0 0 0 8.94-10h-2.02z" }, child: [] }, { tag: "path", attr: { d: "M20 5V2h-2v3h-3v2h3v3h2V7h3V5z" }, child: [] }] })(g);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function dA(g) {
|
|
130
130
|
return D({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm3 5.5h-2.5V21h-1v-2.5H15v-1h2.5V15h1v2.5H21v1zM7 5h13v2H7z" }, child: [] }, { tag: "circle", attr: { cx: "3.5", cy: "18", r: "1.5" }, child: [] }, { tag: "path", attr: { d: "M18 11H7v2h6.11c1.26-1.24 2.99-2 4.89-2zM7 17v2h4.08c-.05-.33-.08-.66-.08-1s.03-.67.08-1H7z" }, child: [] }, { tag: "circle", attr: { cx: "3.5", cy: "6", r: "1.5" }, child: [] }, { tag: "circle", attr: { cx: "3.5", cy: "12", r: "1.5" }, child: [] }] })(g);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function vA(g) {
|
|
133
133
|
return D({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M11 8v5l4.25 2.52.77-1.28-3.52-2.09V8H11zm10 2V3l-2.64 2.64A8.937 8.937 0 0 0 12 3a9 9 0 1 0 9 9h-2c0 3.86-3.14 7-7 7s-7-3.14-7-7 3.14-7 7-7c1.93 0 3.68.79 4.95 2.05L14 10h7z" }, child: [] }] })(g);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function mA(g) {
|
|
136
136
|
return D({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM72 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm104-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zM72 368a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm88 0c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z" }, child: [] }] })(g);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function UA(g) {
|
|
139
139
|
return D({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM440.2 765h-50.8c-2.2 0-4.5-1.1-5.9-2.9L348 718.6l-35.5 43.5a7.38 7.38 0 0 1-5.9 2.9h-50.8c-6.6 0-10.2-7.9-5.8-13.1l62.7-76.8-61.2-74.9c-4.3-5.2-.7-13.1 5.9-13.1h50.9c2.2 0 4.5 1.1 5.9 2.9l34 41.6 34-41.6c1.5-1.9 3.6-2.9 5.9-2.9h50.8c6.6 0 10.2 7.9 5.9 13.1L383.5 675l62.7 76.8c4.2 5.3.6 13.2-6 13.2zm7.8-382c0 2.2-1.4 4-3.2 4H376v68.7c0 1.9-1.8 3.3-4 3.3h-48c-2.2 0-4-1.4-4-3.2V387h-68.8c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4H320v-68.8c0-1.8 1.8-3.2 4-3.2h48c2.2 0 4 1.4 4 3.2V331h68.7c1.9 0 3.3 1.8 3.3 4v48zm328 369c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48zm0-104c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48zm0-265c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48z" }, child: [] }] })(g);
|
|
140
140
|
}
|
|
141
141
|
function VA(g) {
|
|
@@ -169,13 +169,13 @@ function gA(g) {
|
|
|
169
169
|
var A, B, w = "";
|
|
170
170
|
if (typeof g == "string" || typeof g == "number") w += g;
|
|
171
171
|
else if (typeof g == "object") if (Array.isArray(g)) {
|
|
172
|
-
var
|
|
173
|
-
for (A = 0; A <
|
|
172
|
+
var I = g.length;
|
|
173
|
+
for (A = 0; A < I; A++) g[A] && (B = gA(g[A])) && (w && (w += " "), w += B);
|
|
174
174
|
} else for (B in g) g[B] && (w && (w += " "), w += B);
|
|
175
175
|
return w;
|
|
176
176
|
}
|
|
177
177
|
function s() {
|
|
178
|
-
for (var g, A, B = 0, w = "",
|
|
178
|
+
for (var g, A, B = 0, w = "", I = arguments.length; B < I; B++) (g = arguments[B]) && (A = gA(g)) && (w && (w += " "), w += A);
|
|
179
179
|
return w;
|
|
180
180
|
}
|
|
181
181
|
const YA = S(
|
|
@@ -184,24 +184,24 @@ const YA = S(
|
|
|
184
184
|
variant: A = "primary",
|
|
185
185
|
size: B = "medium",
|
|
186
186
|
isLoading: w = !1,
|
|
187
|
-
loadingPosition:
|
|
188
|
-
disabled:
|
|
187
|
+
loadingPosition: I = "left",
|
|
188
|
+
disabled: l = !1,
|
|
189
189
|
isSubmit: c = !1,
|
|
190
190
|
icon: n,
|
|
191
|
-
iconPosition:
|
|
192
|
-
iconType:
|
|
193
|
-
label:
|
|
194
|
-
className:
|
|
195
|
-
onClick:
|
|
196
|
-
...
|
|
197
|
-
},
|
|
198
|
-
const
|
|
191
|
+
iconPosition: M = "left",
|
|
192
|
+
iconType: e,
|
|
193
|
+
label: b,
|
|
194
|
+
className: Y,
|
|
195
|
+
onClick: v,
|
|
196
|
+
...x
|
|
197
|
+
}, F) => {
|
|
198
|
+
const P = s(
|
|
199
199
|
"inline-flex items-center justify-center rounded-lg font-bold focus:outline-none focus:ring-2 focus:ring-offset-2 w-full",
|
|
200
200
|
{
|
|
201
201
|
"text-white": A !== "secondary",
|
|
202
202
|
"text-[#1F2937]": A === "secondary"
|
|
203
203
|
}
|
|
204
|
-
),
|
|
204
|
+
), U = {
|
|
205
205
|
primary: "bg-[#1F2937] hover:bg-[#374151] focus:ring-[#1F2937] focus:border-[#1F2937]",
|
|
206
206
|
secondary: "bg-transparent border-2 border-[#1F2937] hover:border-[#374151] focus:ring-[#1F2937] focus:border-[#1F2937]",
|
|
207
207
|
vividPink: "bg-[#ff0145] hover:bg-[#e6003f] focus:ring-[#ff0145] focus:border-[#ff0145]",
|
|
@@ -214,7 +214,7 @@ const YA = S(
|
|
|
214
214
|
small: "px-4 py-1.5 text-xs",
|
|
215
215
|
medium: "px-6 py-2.5 text-base",
|
|
216
216
|
large: "px-8 py-3 text-lg"
|
|
217
|
-
},
|
|
217
|
+
}, d = () => e === "home" ? /* @__PURE__ */ C(aA, { className: "w-5 h-5" }) : e === "Left" ? /* @__PURE__ */ C(nA, { className: "w-5 h-5" }) : e === "right" ? /* @__PURE__ */ C(sA, { className: "w-5 h-5" }) : e === "save" ? /* @__PURE__ */ C(hA, { className: "w-5 h-5" }) : e === "more" ? /* @__PURE__ */ C(uA, { className: "w-5 h-5" }) : e === "update" ? /* @__PURE__ */ C(vA, { className: "w-5 h-5" }) : e === "attach" ? /* @__PURE__ */ C(GA, { className: "w-5 h-5" }) : e === "send" ? /* @__PURE__ */ C(bA, { className: "w-5 h-5" }) : e === "delete" ? /* @__PURE__ */ C(oA, { className: "w-5 h-5" }) : e === "edit" ? /* @__PURE__ */ C(iA, { className: "w-5 h-5" }) : e === "login" ? /* @__PURE__ */ C(ZA, { className: "w-5 h-5" }) : e === "reset" ? /* @__PURE__ */ C(fA, { className: "w-5 h-5" }) : e === "add" ? /* @__PURE__ */ C(dA, { className: "w-5 h-5" }) : e === "exit" ? /* @__PURE__ */ C(RA, { className: "w-5 h-5" }) : e === "off" ? /* @__PURE__ */ C(pA, { className: "w-5 h-5" }) : e === "calculator" ? /* @__PURE__ */ C(UA, { className: "w-5 h-5" }) : e === "list" ? /* @__PURE__ */ C(mA, { className: "w-5 h-5" }) : e === "futbol" ? /* @__PURE__ */ C(yA, { className: "w-5 h-5" }) : null, V = /* @__PURE__ */ C(
|
|
218
218
|
"div",
|
|
219
219
|
{
|
|
220
220
|
className: s(
|
|
@@ -222,44 +222,44 @@ const YA = S(
|
|
|
222
222
|
A === "secondary" ? "border-[#1F2937]" : "border-white"
|
|
223
223
|
)
|
|
224
224
|
}
|
|
225
|
-
), a = () => i.isValidElement(n) ? i.cloneElement(n, { className: "w-5 h-5" }) :
|
|
225
|
+
), a = () => i.isValidElement(n) ? i.cloneElement(n, { className: "w-5 h-5" }) : d(), G = b || g;
|
|
226
226
|
return $(() => {
|
|
227
|
-
const
|
|
228
|
-
if (c &&
|
|
229
|
-
const
|
|
227
|
+
const m = (O) => {
|
|
228
|
+
if (c && O.key === "Enter" && !l && v) {
|
|
229
|
+
const p = new MouseEvent("click", {
|
|
230
230
|
bubbles: !0,
|
|
231
231
|
cancelable: !0,
|
|
232
232
|
view: window
|
|
233
233
|
});
|
|
234
|
-
|
|
234
|
+
v(p);
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
-
return window.addEventListener("keydown",
|
|
238
|
-
window.removeEventListener("keydown",
|
|
237
|
+
return window.addEventListener("keydown", m), () => {
|
|
238
|
+
window.removeEventListener("keydown", m);
|
|
239
239
|
};
|
|
240
|
-
}, [c,
|
|
240
|
+
}, [c, v, l]), /* @__PURE__ */ r(
|
|
241
241
|
"button",
|
|
242
242
|
{
|
|
243
|
-
ref:
|
|
243
|
+
ref: F,
|
|
244
244
|
className: s(
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
P,
|
|
246
|
+
U[A],
|
|
247
247
|
u[B],
|
|
248
248
|
{
|
|
249
249
|
"opacity-60 cursor-not-allowed": w,
|
|
250
|
-
"opacity-20 cursor-not-allowed":
|
|
250
|
+
"opacity-20 cursor-not-allowed": l && !w
|
|
251
251
|
},
|
|
252
|
-
|
|
252
|
+
Y
|
|
253
253
|
),
|
|
254
|
-
disabled: w ||
|
|
255
|
-
onClick:
|
|
256
|
-
...
|
|
254
|
+
disabled: w || l,
|
|
255
|
+
onClick: v,
|
|
256
|
+
...x,
|
|
257
257
|
children: [
|
|
258
|
-
w &&
|
|
259
|
-
|
|
258
|
+
w && I === "left" && /* @__PURE__ */ C("span", { className: "mr-2", children: V }),
|
|
259
|
+
M === "left" && /* @__PURE__ */ C("span", { className: "mr-2", children: a() }),
|
|
260
260
|
G,
|
|
261
|
-
|
|
262
|
-
w &&
|
|
261
|
+
M === "right" && /* @__PURE__ */ C("span", { className: "ml-2", children: a() }),
|
|
262
|
+
w && I === "right" && /* @__PURE__ */ C("span", { className: "ml-2", children: V })
|
|
263
263
|
]
|
|
264
264
|
}
|
|
265
265
|
);
|
|
@@ -302,7 +302,7 @@ const y = {
|
|
|
302
302
|
danger: "white",
|
|
303
303
|
warning: "white",
|
|
304
304
|
success: "white"
|
|
305
|
-
},
|
|
305
|
+
}, X = {
|
|
306
306
|
primary: "text-white",
|
|
307
307
|
secondary: "text-[#1F2937]",
|
|
308
308
|
vividPink: "text-white",
|
|
@@ -357,7 +357,7 @@ const y = {
|
|
|
357
357
|
toggleTheme: g,
|
|
358
358
|
variant: A
|
|
359
359
|
}) => {
|
|
360
|
-
const [B, w] =
|
|
360
|
+
const [B, w] = h(!1);
|
|
361
361
|
return /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ C(
|
|
362
362
|
"button",
|
|
363
363
|
{
|
|
@@ -379,29 +379,29 @@ const y = {
|
|
|
379
379
|
children: /* @__PURE__ */ C(VA, { className: "text-white text-lg" })
|
|
380
380
|
}
|
|
381
381
|
) }), KA = S(
|
|
382
|
-
({ children: g, variant: A = "primary", user: B, list: w = [], listMenu:
|
|
383
|
-
var z, q, N,
|
|
384
|
-
const [
|
|
385
|
-
Q.subItems && Q.subItems.length > 0 ? G((t) => t ===
|
|
386
|
-
}, BA = (Q,
|
|
387
|
-
Q.subItems && Q.subItems.length > 0 ? G((t) => t ===
|
|
388
|
-
}, QA = (Q,
|
|
389
|
-
G((t) => t ===
|
|
382
|
+
({ children: g, variant: A = "primary", user: B, list: w = [], listMenu: I = [], logo: l, heightLogo: c, widthLogo: n, activeRoute: M, router: e, toggleTheme: b, toggeInstallApp: Y, theme: v, InstallApp: x, ...F }, P) => {
|
|
383
|
+
var z, q, N, k;
|
|
384
|
+
const [U, u] = h(!1), [d, V] = h(!1), [a, G] = h(null), m = MA(null), O = () => u(!U), p = () => V(!d), K = () => V(!1), CA = (Q, E) => {
|
|
385
|
+
Q.subItems && Q.subItems.length > 0 ? G((t) => t === E ? -1 : E) : Q.link && e && e.push(Q.link);
|
|
386
|
+
}, BA = (Q, E) => {
|
|
387
|
+
Q.subItems && Q.subItems.length > 0 ? G((t) => t === E ? -1 : E) : Q.link && e && (e.push(Q.link), u(!1));
|
|
388
|
+
}, QA = (Q, E) => {
|
|
389
|
+
G((t) => t === E ? -1 : E), Q.link && e && e.push(Q.link);
|
|
390
390
|
}, wA = (Q) => {
|
|
391
|
-
Q.link &&
|
|
392
|
-
},
|
|
393
|
-
Q.link &&
|
|
391
|
+
Q.link && e && (e.push(Q.link), K());
|
|
392
|
+
}, eA = (Q) => {
|
|
393
|
+
Q.link && e && (e.push(Q.link), u(!1));
|
|
394
394
|
};
|
|
395
395
|
return $(() => {
|
|
396
|
-
const Q = (
|
|
397
|
-
|
|
396
|
+
const Q = (E) => {
|
|
397
|
+
m.current && !m.current.contains(E.target) && K();
|
|
398
398
|
};
|
|
399
|
-
return
|
|
399
|
+
return d && document.addEventListener("mousedown", Q), () => {
|
|
400
400
|
document.removeEventListener("mousedown", Q);
|
|
401
401
|
};
|
|
402
|
-
}, [
|
|
402
|
+
}, [d]), /* @__PURE__ */ r("nav", { ref: P, ...F, className: `fixed top-0 left-0 right-0 z-10 ${y[A]}`, children: [
|
|
403
403
|
/* @__PURE__ */ C("div", { className: "mx-auto max-w-7xl px-2 sm:px-6 lg:px-8", children: /* @__PURE__ */ r("div", { className: "relative flex h-16 items-center justify-between", children: [
|
|
404
|
-
/* @__PURE__ */ C("div", { className: "absolute inset-y-0 left-0 flex items-center sm:hidden", children: /* @__PURE__ */ C("button", { className: `menu ${
|
|
404
|
+
/* @__PURE__ */ C("div", { className: "absolute inset-y-0 left-0 flex items-center sm:hidden", children: /* @__PURE__ */ C("button", { className: `menu ${U ? A === "secondary" ? "openedark" : "opened" : ""}`, onClick: O, "aria-label": "Main Menu", children: /* @__PURE__ */ r("svg", { width: "45", height: "45", viewBox: "0 0 100 100", style: { fill: "#f9f8f8 !important" }, children: [
|
|
405
405
|
/* @__PURE__ */ C("path", { className: A === "secondary" ? "linedark linedark1" : "line line1", d: "M 20,29.000046 H 80.000231 C 80.000231,29.000046 94.498839,28.817352 94.532987,66.711331 94.543142,77.980673 90.966081,81.670246 85.259173,81.668997 79.552261,81.667751 75.000211,74.999942 75.000211,74.999942 L 25.000021,25.000058" }),
|
|
406
406
|
/* @__PURE__ */ C("path", { className: A === "secondary" ? "linedark linedark2" : "line line2", d: "M 20,50 H 80" }),
|
|
407
407
|
/* @__PURE__ */ C("path", { className: A === "secondary" ? "linedark linedark3" : "line line3", d: "M 20,70.999954 H 80.000231 C 80.000231,70.999954 94.498839,71.182648 94.532987,33.288669 94.543142,22.019327 90.966081,18.329754 85.259173,18.331003 79.552261,18.332249 75.000211,25.000058 75.000211,25.000058 L 25.000021,74.999942" })
|
|
@@ -414,7 +414,7 @@ const y = {
|
|
|
414
414
|
alt: "logo",
|
|
415
415
|
className: "block w-auto lg:hidden",
|
|
416
416
|
style: { height: c && c.trim() !== "" ? c : "40px", width: n && n.trim() !== "" ? n : "65px" },
|
|
417
|
-
src:
|
|
417
|
+
src: l && l.trim() !== "" ? l : A === "secondary" ? W : "https://goatdata.com.ar/images/logogoatblanco.png"
|
|
418
418
|
}
|
|
419
419
|
),
|
|
420
420
|
/* @__PURE__ */ C(
|
|
@@ -423,13 +423,13 @@ const y = {
|
|
|
423
423
|
alt: "logo",
|
|
424
424
|
className: "hidden lg:block",
|
|
425
425
|
style: { height: c && c.trim() !== "" ? c : "40px", width: n && n.trim() !== "" ? n : "65px" },
|
|
426
|
-
src:
|
|
426
|
+
src: l && l.trim() !== "" ? l : A === "secondary" ? W : "https://goatdata.com.ar/images/logogoatblanco.png"
|
|
427
427
|
}
|
|
428
428
|
),
|
|
429
|
-
(!
|
|
429
|
+
(!l || l.trim() === "") && /* @__PURE__ */ C("div", { className: `${X[A]}`, style: { fontSize: "10px", letterSpacing: "4px" }, children: "DATA" })
|
|
430
430
|
] }),
|
|
431
431
|
/* @__PURE__ */ r("div", { className: "hidden sm:ml-6 sm:block", children: [
|
|
432
|
-
/* @__PURE__ */ C("div", { className: `flex space-x-4 ${
|
|
432
|
+
/* @__PURE__ */ C("div", { className: `flex space-x-4 ${l && l.trim() !== "" ? "mt-0" : "mt-2"}`, children: w.map((Q, E) => /* @__PURE__ */ r("div", { className: "relative group", children: [
|
|
433
433
|
/* @__PURE__ */ C(
|
|
434
434
|
"button",
|
|
435
435
|
{
|
|
@@ -438,10 +438,10 @@ const y = {
|
|
|
438
438
|
"flex items-center justify-center px-4 py-2 text-sm cursor-pointer rounded-md transition duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
439
439
|
o[A],
|
|
440
440
|
f[A],
|
|
441
|
-
|
|
442
|
-
|
|
441
|
+
M === Q.link ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
442
|
+
M === Q.link ? "font-semibold" : "font-normal"
|
|
443
443
|
),
|
|
444
|
-
onClick: () => CA(Q,
|
|
444
|
+
onClick: () => CA(Q, E),
|
|
445
445
|
children: Q.label
|
|
446
446
|
}
|
|
447
447
|
),
|
|
@@ -449,7 +449,7 @@ const y = {
|
|
|
449
449
|
"div",
|
|
450
450
|
{
|
|
451
451
|
style: { border: `1px ${L[A]} solid` },
|
|
452
|
-
className: `absolute top-full left-1/2 transform -translate-x-1/2 translate-y-2 opacity-0 mt-2 w-max px-4 py-4 text-xs ${
|
|
452
|
+
className: `absolute top-full left-1/2 transform -translate-x-1/2 translate-y-2 opacity-0 mt-2 w-max px-4 py-4 text-xs ${X[A]} ${y[A]} rounded-md transition-all duration-300 group-hover:opacity-100 group-hover:translate-y-4`,
|
|
453
453
|
children: [
|
|
454
454
|
Q.image && Q.image.trim() !== "" && /* @__PURE__ */ r("div", { className: "relative w-full h-24 mb-2", children: [
|
|
455
455
|
/* @__PURE__ */ C(
|
|
@@ -467,7 +467,7 @@ const y = {
|
|
|
467
467
|
]
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
|
-
Q.subItems && Q.subItems.length > 0 && a ===
|
|
470
|
+
Q.subItems && Q.subItems.length > 0 && a === E && /* @__PURE__ */ C(
|
|
471
471
|
"div",
|
|
472
472
|
{
|
|
473
473
|
className: `absolute left-0 mt-2 w-48 ${y[A]} ${H[A]} rounded-md shadow-lg ring-4 ring-black ring-opacity-5`,
|
|
@@ -478,23 +478,23 @@ const y = {
|
|
|
478
478
|
className: s(
|
|
479
479
|
`block px-4 py-2 text-sm cursor-pointer ${y[A]}e`,
|
|
480
480
|
o[A] && `${o[A]}`,
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
M === t.link ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
482
|
+
M === t.link ? "font-semibold" : "font-normal"
|
|
483
483
|
),
|
|
484
|
-
onClick: () => QA(t,
|
|
484
|
+
onClick: () => QA(t, E),
|
|
485
485
|
children: t.label
|
|
486
486
|
},
|
|
487
487
|
j
|
|
488
488
|
))
|
|
489
489
|
}
|
|
490
490
|
)
|
|
491
|
-
] },
|
|
491
|
+
] }, E)) }),
|
|
492
492
|
g && /* @__PURE__ */ C("div", { className: "mt-2 text-sm text-gray-500", children: g })
|
|
493
493
|
] })
|
|
494
494
|
] }),
|
|
495
495
|
/* @__PURE__ */ r("div", { className: "absolute inset-y-0 right-0 items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 flex space-x-2", children: [
|
|
496
|
-
|
|
497
|
-
|
|
496
|
+
x && /* @__PURE__ */ C(OA, { variant: A, onClick: Y }),
|
|
497
|
+
v && /* @__PURE__ */ C(PA, { variant: A, toggleTheme: b }),
|
|
498
498
|
B ? /* @__PURE__ */ r("div", { className: "relative ml-3 hidden sm:block", children: [
|
|
499
499
|
/* @__PURE__ */ C("div", { children: /* @__PURE__ */ C(
|
|
500
500
|
"button",
|
|
@@ -502,9 +502,9 @@ const y = {
|
|
|
502
502
|
type: "button",
|
|
503
503
|
className: `flex rounded-full bg-gray-800 text-sm transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2`,
|
|
504
504
|
id: "user-menu-button",
|
|
505
|
-
"aria-expanded":
|
|
505
|
+
"aria-expanded": d,
|
|
506
506
|
"aria-haspopup": "true",
|
|
507
|
-
onClick:
|
|
507
|
+
onClick: p,
|
|
508
508
|
children: /* @__PURE__ */ C(
|
|
509
509
|
"div",
|
|
510
510
|
{
|
|
@@ -525,27 +525,27 @@ const y = {
|
|
|
525
525
|
)
|
|
526
526
|
}
|
|
527
527
|
) }),
|
|
528
|
-
|
|
528
|
+
d && /* @__PURE__ */ C(
|
|
529
529
|
"div",
|
|
530
530
|
{
|
|
531
|
-
ref:
|
|
531
|
+
ref: m,
|
|
532
532
|
className: `absolute right-0 mt-2 w-48 ${y[A]} ${H[A]} rounded-md shadow-lg ring-4 ring-black ring-opacity-5`,
|
|
533
533
|
role: "menu",
|
|
534
|
-
children:
|
|
534
|
+
children: I.map((Q, E) => /* @__PURE__ */ C(
|
|
535
535
|
"div",
|
|
536
536
|
{
|
|
537
537
|
className: s(
|
|
538
538
|
"block px-4 py-2 text-sm cursor-pointer",
|
|
539
539
|
o[A] && `${o[A]}`,
|
|
540
|
-
|
|
541
|
-
|
|
540
|
+
M === Q.link ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
541
|
+
M === Q.link ? "font-semibold" : "font-normal"
|
|
542
542
|
),
|
|
543
543
|
onClick: () => {
|
|
544
544
|
wA(Q);
|
|
545
545
|
},
|
|
546
546
|
children: Q.label
|
|
547
547
|
},
|
|
548
|
-
|
|
548
|
+
E
|
|
549
549
|
))
|
|
550
550
|
}
|
|
551
551
|
)
|
|
@@ -553,41 +553,46 @@ const y = {
|
|
|
553
553
|
"button",
|
|
554
554
|
{
|
|
555
555
|
type: "button",
|
|
556
|
-
className:
|
|
557
|
-
|
|
556
|
+
className: s(
|
|
557
|
+
`items-center justify-center px-4 py-2 text-sm cursor-pointer hidden sm:block
|
|
558
|
+
${o[A]}
|
|
558
559
|
rounded-md transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2`,
|
|
560
|
+
M === "/login" ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
561
|
+
M === "/login" ? "font-semibold" : "font-normal"
|
|
562
|
+
),
|
|
559
563
|
onClick: () => {
|
|
564
|
+
e.push("/login"), K();
|
|
560
565
|
},
|
|
561
566
|
children: "Login"
|
|
562
567
|
}
|
|
563
568
|
)
|
|
564
569
|
] })
|
|
565
570
|
] }) }),
|
|
566
|
-
|
|
567
|
-
w.map((Q,
|
|
571
|
+
U && /* @__PURE__ */ r("div", { className: "sm:hidden px-2 pt-2 pb-3 space-y-1", children: [
|
|
572
|
+
w.map((Q, E) => /* @__PURE__ */ r("div", { children: [
|
|
568
573
|
/* @__PURE__ */ C(
|
|
569
574
|
"button",
|
|
570
575
|
{
|
|
571
576
|
className: s(
|
|
572
577
|
`block w-full px-4 py-2 text-base ${o[A]}
|
|
573
578
|
rounded-md transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2 text-left`,
|
|
574
|
-
|
|
575
|
-
|
|
579
|
+
M === Q.link ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
580
|
+
M === Q.link ? "font-semibold" : "font-normal"
|
|
576
581
|
),
|
|
577
582
|
onClick: () => {
|
|
578
|
-
BA(Q,
|
|
583
|
+
BA(Q, E);
|
|
579
584
|
},
|
|
580
585
|
children: Q.label
|
|
581
586
|
}
|
|
582
587
|
),
|
|
583
|
-
Q.subItems && Q.subItems.length > 0 && a ===
|
|
588
|
+
Q.subItems && Q.subItems.length > 0 && a === E && /* @__PURE__ */ C("div", { className: "pl-4 py-4", children: Q.subItems.map((t, j) => /* @__PURE__ */ C(
|
|
584
589
|
"button",
|
|
585
590
|
{
|
|
586
591
|
className: s(
|
|
587
592
|
`block w-full px-4 py-1 text-sm ${o[A]}
|
|
588
593
|
rounded-md transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2 text-left`,
|
|
589
|
-
|
|
590
|
-
|
|
594
|
+
M === t.link ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
595
|
+
M === t.link ? "font-semibold" : "font-normal"
|
|
591
596
|
),
|
|
592
597
|
onClick: () => {
|
|
593
598
|
u(!1);
|
|
@@ -596,7 +601,7 @@ const y = {
|
|
|
596
601
|
},
|
|
597
602
|
j
|
|
598
603
|
)) })
|
|
599
|
-
] },
|
|
604
|
+
] }, E)),
|
|
600
605
|
B ? /* @__PURE__ */ r("div", { className: "relative mt-3", children: [
|
|
601
606
|
/* @__PURE__ */ C("div", { className: "ml-3 mt-4", style: { borderBottom: `1px ${L[A]} solid` } }),
|
|
602
607
|
/* @__PURE__ */ r("div", { style: { display: "flex" }, children: [
|
|
@@ -607,7 +612,7 @@ const y = {
|
|
|
607
612
|
className: `flex rounded-full bg-gray-800 text-sm transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2 mb-4 ml-3 mt-3`,
|
|
608
613
|
id: "user-menu-button",
|
|
609
614
|
"aria-haspopup": "true",
|
|
610
|
-
onClick:
|
|
615
|
+
onClick: p,
|
|
611
616
|
children: /* @__PURE__ */ C(
|
|
612
617
|
"div",
|
|
613
618
|
{
|
|
@@ -623,34 +628,40 @@ const y = {
|
|
|
623
628
|
Q.currentTarget.onerror = null, Q.currentTarget.src = "";
|
|
624
629
|
}
|
|
625
630
|
}
|
|
626
|
-
) : ((
|
|
631
|
+
) : ((k = (N = B.name) == null ? void 0 : N.charAt(0)) == null ? void 0 : k.toUpperCase()) || "?"
|
|
627
632
|
}
|
|
628
633
|
)
|
|
629
634
|
}
|
|
630
635
|
),
|
|
631
|
-
/* @__PURE__ */ C("div", { className: `block w-full px-4 py-4 ${
|
|
636
|
+
/* @__PURE__ */ C("div", { className: `block w-full px-4 py-4 ${X[A]} text-left`, children: B.name })
|
|
632
637
|
] }),
|
|
633
|
-
|
|
638
|
+
I.map((Q, E) => /* @__PURE__ */ C(
|
|
634
639
|
"button",
|
|
635
640
|
{
|
|
636
641
|
className: s(
|
|
637
642
|
`block w-full px-4 py-2 text-base ${o[A]}
|
|
638
643
|
rounded-md transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2 text-left`,
|
|
639
|
-
|
|
640
|
-
|
|
644
|
+
M === Q.link ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
645
|
+
M === Q.link ? "font-semibold" : "font-normal"
|
|
641
646
|
),
|
|
642
|
-
onClick: () =>
|
|
647
|
+
onClick: () => eA(Q),
|
|
643
648
|
children: Q.label
|
|
644
649
|
},
|
|
645
|
-
|
|
650
|
+
E
|
|
646
651
|
))
|
|
647
652
|
] }) : /* @__PURE__ */ C(
|
|
648
653
|
"button",
|
|
649
654
|
{
|
|
650
655
|
type: "button",
|
|
651
|
-
className:
|
|
656
|
+
className: s(
|
|
657
|
+
`block w-full px-4 py-2 text-base ${o[A]}
|
|
652
658
|
rounded-md transition duration-300 focus:outline-none focus:ring-2 ${f[A]} focus:ring-offset-2 text-left`,
|
|
653
|
-
|
|
659
|
+
M === "/login" ? A === "secondary" || A === "primary" || A === "darkMagenta" || A === "veryDarkViolet" || A === "success" ? "text-custom-red" : "text-custom-blue" : A === "primary" || A === "vividPink" || A === "darkMagenta" || A === "veryDarkViolet" || A === "danger" || A === "warning" || A === "success" ? "text-white" : "text-custom-blue",
|
|
660
|
+
M === "/login" ? "font-semibold" : "font-normal"
|
|
661
|
+
),
|
|
662
|
+
onClick: () => {
|
|
663
|
+
e.push("/login"), u(!1);
|
|
664
|
+
},
|
|
654
665
|
children: "Login"
|
|
655
666
|
}
|
|
656
667
|
)
|