neogestify-ui-components 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/index.mjs ADDED
@@ -0,0 +1,656 @@
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
3
+ import Swal from 'sweetalert2';
4
+
5
+ // src/components/icons/icons.tsx
6
+ function SpinnerIcon({ className = "" }) {
7
+ return /* @__PURE__ */ jsxs("svg", { className: `animate-spin h-8 w-8 text-indigo-600 mx-auto mb-4 ${className}`, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
8
+ /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
9
+ /* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z" })
10
+ ] });
11
+ }
12
+ function AnimateSpin({ className }) {
13
+ return /* @__PURE__ */ jsxs(
14
+ "svg",
15
+ {
16
+ className: `animate-spin ${className}`,
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ fill: "none",
19
+ viewBox: "0 0 24 24",
20
+ "aria-hidden": "true",
21
+ children: [
22
+ /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
23
+ /* @__PURE__ */ jsx(
24
+ "path",
25
+ {
26
+ className: "opacity-75",
27
+ fill: "currentColor",
28
+ 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"
29
+ }
30
+ )
31
+ ]
32
+ }
33
+ );
34
+ }
35
+ function GearIcon({ className }) {
36
+ return /* @__PURE__ */ jsxs(
37
+ "svg",
38
+ {
39
+ className,
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ viewBox: "0 0 24 24",
43
+ xmlns: "http://www.w3.org/2000/svg",
44
+ "aria-hidden": "true",
45
+ children: [
46
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 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" }),
47
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ function CheckIcon({ className }) {
53
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) });
54
+ }
55
+ function BackIcon({ className }) {
56
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) });
57
+ }
58
+ function NotFoundIcon({ className }) {
59
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) });
60
+ }
61
+ function BoxIcon({ className }) {
62
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" }) });
63
+ }
64
+ function ChartIcon({ className }) {
65
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
66
+ "path",
67
+ {
68
+ strokeLinecap: "round",
69
+ strokeLinejoin: "round",
70
+ strokeWidth: 2,
71
+ d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
72
+ }
73
+ ) });
74
+ }
75
+ function UsersIcon({ className }) {
76
+ return /* @__PURE__ */ jsx("svg", { className, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M12 2a5 5 0 1 0 5 5a5 5 0 0 0-5-5m0 8a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9 11v-1a7 7 0 0 0-7-7h-4a7 7 0 0 0-7 7v1h2v-1a5 5 0 0 1 5-5h4a5 5 0 0 1 5 5v1z" }) });
77
+ }
78
+ function DocumentIcon({ className }) {
79
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
80
+ "path",
81
+ {
82
+ strokeLinecap: "round",
83
+ strokeLinejoin: "round",
84
+ strokeWidth: 2,
85
+ d: "M9 12h6m-6 4h6m2 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"
86
+ }
87
+ ) });
88
+ }
89
+ function LogoutIcon({ className }) {
90
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
91
+ "path",
92
+ {
93
+ strokeLinecap: "round",
94
+ strokeLinejoin: "round",
95
+ strokeWidth: 2,
96
+ d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
97
+ }
98
+ ) });
99
+ }
100
+ function TruckIcon({ className }) {
101
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
102
+ "path",
103
+ {
104
+ strokeLinecap: "round",
105
+ strokeLinejoin: "round",
106
+ strokeWidth: 2,
107
+ d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
108
+ }
109
+ ) });
110
+ }
111
+ function HomeIcon({ className }) {
112
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
113
+ "path",
114
+ {
115
+ strokeLinecap: "round",
116
+ strokeLinejoin: "round",
117
+ strokeWidth: 2,
118
+ d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
119
+ }
120
+ ) });
121
+ }
122
+ function BuildingIcon({ className }) {
123
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
124
+ "path",
125
+ {
126
+ strokeLinecap: "round",
127
+ strokeLinejoin: "round",
128
+ strokeWidth: 2,
129
+ d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"
130
+ }
131
+ ) });
132
+ }
133
+ function CashIcon({ className }) {
134
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
135
+ "path",
136
+ {
137
+ strokeLinecap: "round",
138
+ strokeLinejoin: "round",
139
+ strokeWidth: 2,
140
+ d: "M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z"
141
+ }
142
+ ) });
143
+ }
144
+ function MenuIcon({ className }) {
145
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
146
+ "path",
147
+ {
148
+ strokeLinecap: "round",
149
+ strokeLinejoin: "round",
150
+ strokeWidth: 2,
151
+ d: "M4 6h16M4 12h16M4 18h16"
152
+ }
153
+ ) });
154
+ }
155
+ function CloseIcon({ className }) {
156
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
157
+ "path",
158
+ {
159
+ strokeLinecap: "round",
160
+ strokeLinejoin: "round",
161
+ strokeWidth: 2,
162
+ d: "M6 18L18 6M6 6l12 12"
163
+ }
164
+ ) });
165
+ }
166
+ function AddIcon({ className }) {
167
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" }) });
168
+ }
169
+ function SearchIcon({ className }) {
170
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
171
+ "path",
172
+ {
173
+ strokeLinecap: "round",
174
+ strokeLinejoin: "round",
175
+ strokeWidth: 2,
176
+ d: "m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"
177
+ }
178
+ ) });
179
+ }
180
+ function SaveIcon({ className }) {
181
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
182
+ "path",
183
+ {
184
+ strokeLinecap: "round",
185
+ strokeLinejoin: "round",
186
+ strokeWidth: 2,
187
+ d: "M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"
188
+ }
189
+ ) });
190
+ }
191
+ function CancelIcon({ className }) {
192
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
193
+ "path",
194
+ {
195
+ strokeLinecap: "round",
196
+ strokeLinejoin: "round",
197
+ strokeWidth: 2,
198
+ d: "M6 18L18 6M6 6l12 12"
199
+ }
200
+ ) });
201
+ }
202
+ function DeleteIcon({ className }) {
203
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
204
+ "path",
205
+ {
206
+ strokeLinecap: "round",
207
+ strokeLinejoin: "round",
208
+ strokeWidth: 2,
209
+ d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
210
+ }
211
+ ) });
212
+ }
213
+ function EditIcon({ className }) {
214
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
215
+ "path",
216
+ {
217
+ strokeLinecap: "round",
218
+ strokeLinejoin: "round",
219
+ strokeWidth: 2,
220
+ d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
221
+ }
222
+ ) });
223
+ }
224
+ function CategorieIcon({ className }) {
225
+ return /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className, viewBox: "0 0 24 24", children: [
226
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M11.15 3.4L7.43 9.48c-.41.66.07 1.52.85 1.52h7.43c.78 0 1.26-.86.85-1.52L12.85 3.4a.993.993 0 0 0-1.7 0" }),
227
+ /* @__PURE__ */ jsx("circle", { cx: "17.5", cy: "17.5", r: "4.5", fill: "currentColor" }),
228
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M4 21.5h6c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1" })
229
+ ] });
230
+ }
231
+ function FolderIcon({ className }) {
232
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
233
+ "path",
234
+ {
235
+ strokeLinecap: "round",
236
+ strokeLinejoin: "round",
237
+ strokeWidth: 2,
238
+ d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
239
+ }
240
+ ) });
241
+ }
242
+ function ArrowIcon({ className }) {
243
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M17.77 3.77L16 2L6 12l10 10l1.77-1.77L9.54 12z" }) });
244
+ }
245
+ function FilterIcon({ className }) {
246
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M11.36 20.213L9 21v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4h16v2.172a2 2 0 0 1-.586 1.414L15 12m0 6a3 3 0 1 0 6 0a3 3 0 1 0-6 0m5.2 2.2L22 22" }) });
247
+ }
248
+ function QuestionIcon({ className }) {
249
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) });
250
+ }
251
+ function LocationIcon({ className }) {
252
+ return /* @__PURE__ */ jsxs("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: [
253
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
254
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
255
+ ] });
256
+ }
257
+ function CalendarIcon({ className }) {
258
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) });
259
+ }
260
+ function InfoIcon({ className }) {
261
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) });
262
+ }
263
+ function MoonIcon({ className }) {
264
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" }) });
265
+ }
266
+ function SunIcon({ className }) {
267
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" }) });
268
+ }
269
+ function CamaraIcon({ className }) {
270
+ return /* @__PURE__ */ jsxs("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
271
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
272
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z" })
273
+ ] });
274
+ }
275
+ function ArrowLeftIcon({ className }) {
276
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) });
277
+ }
278
+ function ArrowRightIcon({ className }) {
279
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) });
280
+ }
281
+ function TrashIcon({ className }) {
282
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) });
283
+ }
284
+ function MinusIcon({ className }) {
285
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 12H4" }) });
286
+ }
287
+ function MoneyIcon({ className }) {
288
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) });
289
+ }
290
+ function PercentIcon({ className }) {
291
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z" }) });
292
+ }
293
+ function StackIcon({ className }) {
294
+ return /* @__PURE__ */ jsxs("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
295
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 7h16M4 12h16M4 17h16" }),
296
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 3v18M17 3v18" })
297
+ ] });
298
+ }
299
+ function ClockIcon({ className }) {
300
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" }) });
301
+ }
302
+ function CheckCircleIcon({ className }) {
303
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) });
304
+ }
305
+ function CajasIcon({ className }) {
306
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" }) });
307
+ }
308
+ function PrinterIcon({ className }) {
309
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z" }) });
310
+ }
311
+ function NetworkIcon({ className }) {
312
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01" }) });
313
+ }
314
+ function TestIcon({ className }) {
315
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" }) });
316
+ }
317
+ function FacturacionIcon({ className }) {
318
+ return /* @__PURE__ */ jsxs("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
319
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 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" }),
320
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 6l4 4" }),
321
+ /* @__PURE__ */ jsx("text", { x: "12", y: "16", fontSize: "8", fill: "currentColor", textAnchor: "middle", children: "$" })
322
+ ] });
323
+ }
324
+ function WhatsAppIcon({ className }) {
325
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.465 3.488" }) });
326
+ }
327
+ function ArchiveIcon({ className }) {
328
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) });
329
+ }
330
+ function CopyIcon({ className }) {
331
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" }) });
332
+ }
333
+ function PasteIcon({ className }) {
334
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" }) });
335
+ }
336
+ function RestaurantMenuIcon({ className }) {
337
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 3v18h18V3H3zm16 16H5V5h14v14zM7 8h10v2H7V8zm0 4h10v2H7v-2zm0 4h7v2H7v-2z" }) });
338
+ }
339
+ function CloudIcon({ className }) {
340
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z" }) });
341
+ }
342
+ function ShieldIcon({ className }) {
343
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" }) });
344
+ }
345
+ function BarsChartsIcon({ className }) {
346
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) });
347
+ }
348
+ function LightingIcon({ className }) {
349
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) });
350
+ }
351
+ function LifeGuardIcon({ className }) {
352
+ return /* @__PURE__ */ jsx("svg", { className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M18.364 5.636l-3.536 3.536m0 5.656l3.536 3.536M9.172 9.172L5.636 5.636m3.536 9.192l-3.536 3.536M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-5 0a4 4 0 11-8 0 4 4 0 018 0z" }) });
353
+ }
354
+ var Button = ({
355
+ variant = "primary",
356
+ children,
357
+ isLoading = false,
358
+ loadingText,
359
+ isActive = false,
360
+ className = "",
361
+ disabled,
362
+ ...props
363
+ }) => {
364
+ const baseClasses = "transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed hover:cursor-pointer";
365
+ const variantClasses = {
366
+ primary: "py-2 px-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-400 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
367
+ secondary: "p-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-800 rounded-md border border-gray-300 dark:border-gray-600 shadow-sm hover:shadow-md focus:ring-indigo-500 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
368
+ icon: "p-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-800 rounded-full focus:ring-indigo-500 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
369
+ danger: "py-2 px-2 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600 focus:ring-red-500 dark:focus:ring-red-400 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
370
+ success: "py-2 px-2 border border-transparent text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-600 focus:ring-green-500 dark:focus:ring-green-400 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
371
+ outline: "py-2 px-2 border border-gray-300 dark:border-gray-600 text-sm font-medium rounded-md text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-indigo-500 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
372
+ nav: "w-full flex items-center px-4 py-2 text-sm font-medium rounded-md transition-all duration-200 hover:scale-105 text-gray-700 dark:text-gray-300 dark:hover:text-white hover:shadow-lg",
373
+ custom: "",
374
+ link: "text-sm text-indigo-600 dark:text-indigo-400 hover:text-indigo-700 dark:hover:text-indigo-300 transition-colors duration-200",
375
+ warning: "py-2 px-2 border border-transparent text-sm font-medium rounded-md text-white bg-yellow-600 hover:bg-yellow-700 dark:bg-yellow-500 dark:hover:bg-yellow-600 focus:ring-yellow-500 dark:focus:ring-yellow-400 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900",
376
+ toggle: "px-2 py-2 rounded-lg font-medium transition-all duration-200 disabled:cursor-not-allowed border-2 focus:outline-none focus:ring-2 focus:ring-indigo-500"
377
+ };
378
+ let classes = `${baseClasses} ${variantClasses[variant]} ${className}`;
379
+ if (variant === "nav" && isActive) {
380
+ classes += " bg-indigo-600 dark:bg-indigo-500 hover:bg-indigo-700 dark:hover:bg-indigo-600 text-white shadow-lg scale-105";
381
+ }
382
+ if (variant === "nav" && !isActive) {
383
+ classes += " hover:bg-white dark:hover:bg-gray-700 hover:shadow-lg";
384
+ }
385
+ if (variant === "toggle") {
386
+ if (isActive) {
387
+ classes += " bg-indigo-600 text-white border-indigo-500 hover:bg-indigo-700";
388
+ } else {
389
+ classes += " bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-600 hover:bg-gray-300 dark:hover:bg-gray-600 hover:border-gray-400 dark:hover:border-gray-500";
390
+ }
391
+ }
392
+ return /* @__PURE__ */ jsx(
393
+ "button",
394
+ {
395
+ className: classes,
396
+ disabled: disabled || isLoading,
397
+ ...props,
398
+ children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
399
+ /* @__PURE__ */ jsx(AnimateSpin, { className: "h-5 w-5 mr-2 inline-block text-current" }),
400
+ loadingText || "Cargando..."
401
+ ] }) : children
402
+ }
403
+ );
404
+ };
405
+ var Input = ({
406
+ label,
407
+ error,
408
+ helperText,
409
+ className = "",
410
+ id,
411
+ type,
412
+ ...props
413
+ }) => {
414
+ const inputId = id || `input-${Math.random().toString(36).substring(2, 9)}`;
415
+ const baseClasses = "appearance-none relative block w-full px-3 py-2 border placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-800 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-400 focus:border-indigo-500 focus:z-10 sm:text-sm disabled:opacity-50 disabled:cursor-not-allowed transition-colors duration-200";
416
+ const errorClasses = error ? "border-red-300 dark:border-red-600 focus:ring-red-500 dark:focus:ring-red-400 focus:border-red-500" : "border-gray-300 dark:border-gray-600";
417
+ const classes = `${baseClasses} ${errorClasses} ${className}`;
418
+ if (type === "checkbox") {
419
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1 w-full", children: [
420
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
421
+ /* @__PURE__ */ jsx(
422
+ "input",
423
+ {
424
+ id: inputId,
425
+ type: "checkbox",
426
+ className: "h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded",
427
+ ...props
428
+ }
429
+ ),
430
+ label && typeof label === "string" ? /* @__PURE__ */ jsx(
431
+ "label",
432
+ {
433
+ htmlFor: inputId,
434
+ className: "block text-sm font-medium text-gray-700 dark:text-gray-300",
435
+ children: label
436
+ }
437
+ ) : label
438
+ ] }),
439
+ error && /* @__PURE__ */ jsx("p", { className: "text-sm text-red-600 dark:text-red-400", role: "alert", children: error }),
440
+ helperText && !error && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: helperText })
441
+ ] });
442
+ }
443
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1 w-full", children: [
444
+ label && typeof label === "string" ? /* @__PURE__ */ jsx(
445
+ "label",
446
+ {
447
+ htmlFor: inputId,
448
+ className: "block text-sm font-medium text-gray-700 dark:text-gray-300",
449
+ children: label
450
+ }
451
+ ) : label,
452
+ /* @__PURE__ */ jsx(
453
+ "input",
454
+ {
455
+ id: inputId,
456
+ className: classes,
457
+ type,
458
+ ...props
459
+ }
460
+ ),
461
+ error && /* @__PURE__ */ jsx("p", { className: "text-sm text-red-600 dark:text-red-400", role: "alert", children: error }),
462
+ helperText && !error && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: helperText })
463
+ ] });
464
+ };
465
+ var Form = ({ onSubmit, children, variant = "default", className = "", ...props }) => {
466
+ const handleSubmit = (e) => {
467
+ e.preventDefault();
468
+ if (onSubmit) {
469
+ onSubmit(e);
470
+ }
471
+ };
472
+ const getVariantClasses = () => {
473
+ switch (variant) {
474
+ case "modal":
475
+ return "flex-1 px-6 py-4 overflow-y-auto";
476
+ case "card":
477
+ return "p-6 space-y-6";
478
+ case "inline":
479
+ return "flex flex-wrap gap-4 items-end";
480
+ case "compact":
481
+ return "space-y-3";
482
+ case "default":
483
+ default:
484
+ return "space-y-4";
485
+ }
486
+ };
487
+ const combinedClassName = `${getVariantClasses()} ${className}`.trim();
488
+ return /* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, className: combinedClassName, ...props, children });
489
+ };
490
+ var Select = ({
491
+ options,
492
+ placeholder,
493
+ variant = "default",
494
+ error = false,
495
+ helperText,
496
+ label,
497
+ className = "",
498
+ id,
499
+ ...props
500
+ }) => {
501
+ const selectId = id || `select-${Math.random().toString(36).substring(2, 9)}`;
502
+ const getVariantClasses = () => {
503
+ const baseClasses = "w-full bg-white dark:bg-gray-700 border rounded-lg text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-colors";
504
+ if (variant === "small") {
505
+ return `${baseClasses} px-2.5 py-1.5 text-sm border-gray-300 dark:border-gray-600`;
506
+ }
507
+ return `${baseClasses} px-3 py-2 border-gray-300 dark:border-gray-600 ${error ? "border-red-300 dark:border-red-600 focus:ring-red-500" : ""}`;
508
+ };
509
+ const combinedClassName = `${getVariantClasses()} ${className}`.trim();
510
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1 w-full", children: [
511
+ label && typeof label === "string" ? /* @__PURE__ */ jsx("label", { htmlFor: selectId, className: "block text-xs font-normal text-gray-700 dark:text-gray-300", children: label }) : label,
512
+ /* @__PURE__ */ jsxs("select", { id: selectId, className: combinedClassName, ...props, children: [
513
+ placeholder && placeholder.trim() && /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: placeholder }),
514
+ options.map((option) => /* @__PURE__ */ jsx(
515
+ "option",
516
+ {
517
+ value: option.value,
518
+ disabled: option.disabled,
519
+ selected: option.selected,
520
+ children: option.label
521
+ },
522
+ option.value
523
+ ))
524
+ ] }),
525
+ helperText && /* @__PURE__ */ jsx("p", { className: `mt-1 text-sm ${error ? "text-red-600 dark:text-red-400" : "text-gray-600 dark:text-gray-400"}`, children: helperText })
526
+ ] });
527
+ };
528
+ function Table({
529
+ headers,
530
+ rows,
531
+ variant = "default",
532
+ className = "",
533
+ thClassName = "",
534
+ tdClassName = ""
535
+ }) {
536
+ const baseTableClass = variant === "default" ? "w-full table-auto border-collapse border border-gray-300 dark:border-gray-600 min-w-full" : "";
537
+ const baseThClass = variant === "default" ? "border border-gray-300 dark:border-gray-600 px-4 py-2 text-left text-gray-900 dark:text-white" : "";
538
+ const baseTdClass = variant === "default" ? "border border-gray-300 dark:border-gray-600 px-4 py-2 text-gray-900 dark:text-white" : "";
539
+ const tableClass = `${baseTableClass} ${className}`.trim();
540
+ const thClass = `${baseThClass} ${thClassName}`.trim();
541
+ const tdClass = `${baseTdClass} ${tdClassName}`.trim();
542
+ return /* @__PURE__ */ jsx("div", { className: "overflow-x-auto w-full", children: /* @__PURE__ */ jsxs("table", { className: tableClass, children: [
543
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: variant === "default" ? "bg-gray-100 dark:bg-gray-700" : "", children: headers.map((header, index) => /* @__PURE__ */ jsx("th", { className: thClass, children: header }, index)) }) }),
544
+ /* @__PURE__ */ jsx("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx("tr", { className: variant === "default" ? "hover:bg-gray-50 dark:hover:bg-gray-600" : "", children: row.map((cell, cellIndex) => /* @__PURE__ */ jsx("td", { className: tdClass, children: cell }, cellIndex)) }, rowIndex)) })
545
+ ] }) });
546
+ }
547
+ var Modal = forwardRef(({
548
+ onClose,
549
+ title,
550
+ children,
551
+ footer,
552
+ maxWidth = "max-w-2xl",
553
+ showCloseButton = true,
554
+ zIndex = 50
555
+ }, ref) => {
556
+ const [show, setShow] = useState(false);
557
+ useEffect(() => {
558
+ setShow(true);
559
+ }, []);
560
+ const handleClose = () => {
561
+ setShow(false);
562
+ setTimeout(() => {
563
+ onClose();
564
+ }, 300);
565
+ };
566
+ useImperativeHandle(ref, () => ({
567
+ handleClose
568
+ }));
569
+ return /* @__PURE__ */ jsx(
570
+ "dialog",
571
+ {
572
+ open: show,
573
+ className: `fixed inset-0 w-full h-full flex items-center justify-center p-4 ${show && "opacity-100"} transition-opacity opacity-0 duration-300 bg-gray-900/60 backdrop-blur-sm`,
574
+ style: { zIndex: zIndex - 10 },
575
+ children: /* @__PURE__ */ jsxs(
576
+ "article",
577
+ {
578
+ className: `relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-2xl w-full ${maxWidth} max-h-[90vh] flex flex-col overflow-hidden`,
579
+ style: { zIndex },
580
+ children: [
581
+ /* @__PURE__ */ jsxs("header", { className: "shrink-0 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6 py-4 flex items-center justify-between", children: [
582
+ /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: title }),
583
+ showCloseButton && /* @__PURE__ */ jsx(
584
+ Button,
585
+ {
586
+ variant: "icon",
587
+ onClick: handleClose,
588
+ className: "text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
589
+ children: /* @__PURE__ */ jsx(CloseIcon, { className: "w-5 h-5" })
590
+ }
591
+ )
592
+ ] }),
593
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-6", children }),
594
+ footer && /* @__PURE__ */ jsx("footer", { className: "shrink-0 bg-gray-50 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 px-6 py-4 flex justify-end gap-3", children: footer })
595
+ ]
596
+ }
597
+ )
598
+ }
599
+ );
600
+ });
601
+ Modal.displayName = "Modal";
602
+ async function Alerta(options) {
603
+ const theme = localStorage.getItem("theme");
604
+ const isDark = theme === "dark";
605
+ const result = await Swal.fire({
606
+ title: options.title,
607
+ text: options.text,
608
+ icon: options.icon,
609
+ confirmButtonText: options.confirmButtonText || "Aceptar",
610
+ showCancelButton: options.showCancelButton || false,
611
+ cancelButtonText: options.cancelButtonText || "Cancelar",
612
+ showDenyButton: options.showDenyButton || false,
613
+ denyButtonText: options.denyButtonText || "No",
614
+ background: isDark ? "#1f2937" : "#f9fafb",
615
+ color: isDark ? "#f9fafb" : "#1f2937",
616
+ customClass: {
617
+ popup: isDark ? "swal-dark-popup" : "swal-light-popup",
618
+ title: isDark ? "swal-dark-title" : "swal-light-title",
619
+ confirmButton: isDark ? "swal-dark-confirm" : "swal-light-confirm",
620
+ cancelButton: isDark ? "swal-dark-cancel" : "swal-light-cancel",
621
+ denyButton: isDark ? "swal-dark-deny" : "swal-light-deny"
622
+ },
623
+ toast: options.toast || false,
624
+ timer: options.timer,
625
+ position: options.position || "center",
626
+ showConfirmButton: !options.toast && !options.timer,
627
+ timerProgressBar: options.toast || !!options.timer,
628
+ allowOutsideClick: options.allowOutsideClick !== false,
629
+ // Por defecto true
630
+ allowEscapeKey: options.allowEscapeKey !== false,
631
+ // Por defecto true
632
+ input: options.input,
633
+ inputLabel: options.inputLabel,
634
+ inputPlaceholder: options.inputPlaceholder,
635
+ inputValue: options.inputValue,
636
+ inputValidator: options.inputValidator,
637
+ inputAttributes: options.inputAttributes
638
+ });
639
+ if (result.isConfirmed && options.onConfirm) {
640
+ options.onConfirm();
641
+ } else if (result.isDenied && options.onDeny) {
642
+ options.onDeny();
643
+ } else if (result.isDismissed && options.onCancel) {
644
+ options.onCancel();
645
+ }
646
+ return result;
647
+ }
648
+ var AlertaExito = (title, text, onConfirm, options) => Alerta({ title, text, icon: "success", confirmButtonText: "Aceptar", onConfirm, ...options });
649
+ var AlertaError = (title, text, onConfirm, options) => Alerta({ title, text, icon: "error", confirmButtonText: "Aceptar", onConfirm, ...options });
650
+ var AlertaAdvertencia = (title, text, onConfirm, onCancel, options) => Alerta({ title, text, icon: "warning", confirmButtonText: "S\xED, continuar", cancelButtonText: "Cancelar", showCancelButton: true, onConfirm, onCancel, ...options });
651
+ var AlertaConfirmacion = (title, text, onConfirm, onCancel, options) => Alerta({ title, text, icon: "question", confirmButtonText: "S\xED", cancelButtonText: "No", showCancelButton: true, onConfirm, onCancel, ...options });
652
+ var AlertaToast = (title, text, icon = "info", timer = 3e3, position = "top-end") => Alerta({ title, text, icon, toast: true, timer, position });
653
+
654
+ export { AddIcon, Alerta, AlertaAdvertencia, AlertaConfirmacion, AlertaError, AlertaExito, AlertaToast, AnimateSpin, ArchiveIcon, ArrowIcon, ArrowLeftIcon, ArrowRightIcon, BackIcon, BarsChartsIcon, BoxIcon, BuildingIcon, Button, CajasIcon, CalendarIcon, CamaraIcon, CancelIcon, CashIcon, CategorieIcon, ChartIcon, CheckCircleIcon, CheckIcon, ClockIcon, CloseIcon, CloudIcon, CopyIcon, DeleteIcon, DocumentIcon, EditIcon, FacturacionIcon, FilterIcon, FolderIcon, Form, GearIcon, HomeIcon, InfoIcon, Input, LifeGuardIcon, LightingIcon, LocationIcon, LogoutIcon, MenuIcon, MinusIcon, Modal, MoneyIcon, MoonIcon, NetworkIcon, NotFoundIcon, PasteIcon, PercentIcon, PrinterIcon, QuestionIcon, RestaurantMenuIcon, SaveIcon, SearchIcon, Select, ShieldIcon, SpinnerIcon, StackIcon, SunIcon, Table, TestIcon, TrashIcon, TruckIcon, UsersIcon, WhatsAppIcon };
655
+ //# sourceMappingURL=index.mjs.map
656
+ //# sourceMappingURL=index.mjs.map