@marcoschwartz/lite-ui 0.1.1 → 0.4.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/README.md +238 -134
- package/dist/index.d.mts +223 -2
- package/dist/index.d.ts +223 -2
- package/dist/index.js +1092 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1046 -19
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ var themes = {
|
|
|
8
8
|
default: {
|
|
9
9
|
name: "default",
|
|
10
10
|
button: {
|
|
11
|
-
base: "font-semibold rounded-lg transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 active:scale-95",
|
|
11
|
+
base: "font-semibold rounded-lg transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 active:scale-95 gap-2",
|
|
12
12
|
variants: {
|
|
13
13
|
primary: "bg-blue-600 hover:bg-blue-700 active:bg-blue-800 text-white shadow-sm hover:shadow-md dark:bg-blue-500 dark:hover:bg-blue-600 dark:active:bg-blue-700",
|
|
14
14
|
secondary: "bg-gray-600 hover:bg-gray-700 active:bg-gray-800 text-white shadow-sm hover:shadow-md dark:bg-gray-500 dark:hover:bg-gray-600 dark:active:bg-gray-700",
|
|
@@ -18,10 +18,10 @@ var themes = {
|
|
|
18
18
|
info: "bg-cyan-600 hover:bg-cyan-700 active:bg-cyan-800 text-white shadow-sm hover:shadow-md dark:bg-cyan-500 dark:hover:bg-cyan-600 dark:active:bg-cyan-700"
|
|
19
19
|
},
|
|
20
20
|
sizes: {
|
|
21
|
-
sm: "px-3 py-1.5 text-sm",
|
|
22
|
-
md: "px-4 py-2 text-base",
|
|
23
|
-
lg: "px-6 py-3 text-lg",
|
|
24
|
-
xl: "px-8 py-4 text-xl"
|
|
21
|
+
sm: "px-3 py-1.5 text-sm min-h-[30px]",
|
|
22
|
+
md: "px-4 py-2 text-base min-h-[38px]",
|
|
23
|
+
lg: "px-6 py-3 text-lg min-h-[48px]",
|
|
24
|
+
xl: "px-8 py-4 text-xl min-h-[60px]"
|
|
25
25
|
},
|
|
26
26
|
disabled: "opacity-50 cursor-not-allowed hover:shadow-sm active:scale-100"
|
|
27
27
|
},
|
|
@@ -39,7 +39,7 @@ var themes = {
|
|
|
39
39
|
minimalistic: {
|
|
40
40
|
name: "minimalistic",
|
|
41
41
|
button: {
|
|
42
|
-
base: "font-normal rounded-none transition-colors duration-200 focus:outline-none border-2",
|
|
42
|
+
base: "font-normal rounded-none transition-colors duration-200 focus:outline-none border-2 gap-2",
|
|
43
43
|
variants: {
|
|
44
44
|
primary: "bg-transparent border-white text-white hover:bg-white hover:text-black",
|
|
45
45
|
secondary: "bg-transparent border-gray-400 text-gray-400 hover:bg-gray-400 hover:text-black",
|
|
@@ -49,10 +49,10 @@ var themes = {
|
|
|
49
49
|
info: "bg-transparent border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-black"
|
|
50
50
|
},
|
|
51
51
|
sizes: {
|
|
52
|
-
sm: "px-4 py-2 text-sm uppercase tracking-wide",
|
|
53
|
-
md: "px-6 py-3 text-base uppercase tracking-wide",
|
|
54
|
-
lg: "px-8 py-4 text-lg uppercase tracking-wider",
|
|
55
|
-
xl: "px-10 py-5 text-xl uppercase tracking-wider"
|
|
52
|
+
sm: "px-4 py-2 text-sm uppercase tracking-wide min-h-[36px]",
|
|
53
|
+
md: "px-6 py-3 text-base uppercase tracking-wide min-h-[48px]",
|
|
54
|
+
lg: "px-8 py-4 text-lg uppercase tracking-wider min-h-[60px]",
|
|
55
|
+
xl: "px-10 py-5 text-xl uppercase tracking-wider min-h-[72px]"
|
|
56
56
|
},
|
|
57
57
|
disabled: "opacity-30 cursor-not-allowed hover:bg-transparent"
|
|
58
58
|
},
|
|
@@ -152,35 +152,43 @@ function ThemeProvider({
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/components/Button.tsx
|
|
155
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
155
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
156
156
|
var Button = ({
|
|
157
157
|
variant = "primary",
|
|
158
158
|
size = "md",
|
|
159
159
|
className = "",
|
|
160
160
|
children,
|
|
161
161
|
disabled,
|
|
162
|
+
leftIcon,
|
|
163
|
+
rightIcon,
|
|
164
|
+
iconOnly = false,
|
|
162
165
|
...props
|
|
163
166
|
}) => {
|
|
164
167
|
const { theme } = useTheme();
|
|
165
168
|
const baseStyles = theme.button.base;
|
|
166
|
-
const
|
|
167
|
-
const
|
|
169
|
+
const variantStyles3 = theme.button.variants[variant];
|
|
170
|
+
const sizeStyles2 = theme.button.sizes[size];
|
|
168
171
|
const disabledStyles = disabled ? theme.button.disabled : "";
|
|
169
|
-
const
|
|
172
|
+
const iconOnlyStyles = iconOnly ? "!p-0 aspect-square" : "";
|
|
173
|
+
const classes = `inline-flex items-center justify-center ${baseStyles} ${variantStyles3} ${sizeStyles2} ${disabledStyles} ${iconOnlyStyles} ${className}`.trim();
|
|
170
174
|
return /* @__PURE__ */ jsx2(
|
|
171
175
|
"button",
|
|
172
176
|
{
|
|
173
177
|
className: classes,
|
|
174
178
|
disabled,
|
|
175
179
|
...props,
|
|
176
|
-
children
|
|
180
|
+
children: iconOnly ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
181
|
+
leftIcon && /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0", children: leftIcon }),
|
|
182
|
+
children && /* @__PURE__ */ jsx2("span", { className: "inline-flex items-center", children }),
|
|
183
|
+
rightIcon && /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0", children: rightIcon })
|
|
184
|
+
] })
|
|
177
185
|
}
|
|
178
186
|
);
|
|
179
187
|
};
|
|
180
188
|
|
|
181
189
|
// src/components/Select.tsx
|
|
182
190
|
import { useState as useState2, useRef, useEffect as useEffect2 } from "react";
|
|
183
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
191
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
184
192
|
var Select = ({
|
|
185
193
|
options,
|
|
186
194
|
size = "md",
|
|
@@ -222,9 +230,9 @@ var Select = ({
|
|
|
222
230
|
}
|
|
223
231
|
};
|
|
224
232
|
const baseStyles = theme.select.base;
|
|
225
|
-
const
|
|
233
|
+
const sizeStyles2 = theme.select.sizes[size];
|
|
226
234
|
const disabledStyles = disabled ? theme.select.disabled : "";
|
|
227
|
-
const buttonClasses = `${baseStyles} ${
|
|
235
|
+
const buttonClasses = `${baseStyles} ${sizeStyles2} ${disabledStyles} ${className}`.trim();
|
|
228
236
|
const iconColor = themeName === "minimalistic" ? disabled ? "text-gray-600" : "text-white" : disabled ? "text-gray-400" : "text-gray-500";
|
|
229
237
|
const dropdownBaseStyles = themeName === "minimalistic" ? "bg-black border-2 border-white" : "bg-white border border-gray-300 shadow-lg dark:bg-gray-800 dark:border-gray-600";
|
|
230
238
|
const optionBaseStyles = themeName === "minimalistic" ? "text-white hover:bg-white hover:text-black transition-colors duration-200" : "text-gray-900 hover:bg-blue-50 transition-colors duration-150 dark:text-gray-100 dark:hover:bg-gray-700";
|
|
@@ -234,7 +242,7 @@ var Select = ({
|
|
|
234
242
|
lg: "px-4 py-3 text-lg",
|
|
235
243
|
xl: "px-5 py-4 text-xl"
|
|
236
244
|
}[size];
|
|
237
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ jsxs2("div", { className: "relative inline-block w-full", ref: dropdownRef, ...props, children: [
|
|
238
246
|
/* @__PURE__ */ jsx3(
|
|
239
247
|
"button",
|
|
240
248
|
{
|
|
@@ -282,6 +290,818 @@ var Select = ({
|
|
|
282
290
|
] });
|
|
283
291
|
};
|
|
284
292
|
|
|
293
|
+
// src/components/Modal.tsx
|
|
294
|
+
import { useEffect as useEffect3 } from "react";
|
|
295
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
296
|
+
var sizeClasses = {
|
|
297
|
+
sm: "max-w-md",
|
|
298
|
+
md: "max-w-lg",
|
|
299
|
+
lg: "max-w-2xl",
|
|
300
|
+
xl: "max-w-4xl"
|
|
301
|
+
};
|
|
302
|
+
var Modal = ({
|
|
303
|
+
isOpen,
|
|
304
|
+
onClose,
|
|
305
|
+
title,
|
|
306
|
+
children,
|
|
307
|
+
size = "md",
|
|
308
|
+
showCloseButton = true
|
|
309
|
+
}) => {
|
|
310
|
+
const { theme } = useTheme();
|
|
311
|
+
useEffect3(() => {
|
|
312
|
+
const handleEscape = (e) => {
|
|
313
|
+
if (e.key === "Escape" && isOpen) {
|
|
314
|
+
onClose();
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
if (isOpen) {
|
|
318
|
+
document.addEventListener("keydown", handleEscape);
|
|
319
|
+
document.body.style.overflow = "hidden";
|
|
320
|
+
}
|
|
321
|
+
return () => {
|
|
322
|
+
document.removeEventListener("keydown", handleEscape);
|
|
323
|
+
document.body.style.overflow = "unset";
|
|
324
|
+
};
|
|
325
|
+
}, [isOpen, onClose]);
|
|
326
|
+
if (!isOpen) return null;
|
|
327
|
+
const sizeClass = sizeClasses[size];
|
|
328
|
+
return /* @__PURE__ */ jsx4(
|
|
329
|
+
"div",
|
|
330
|
+
{
|
|
331
|
+
className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm transition-all duration-200",
|
|
332
|
+
onClick: onClose,
|
|
333
|
+
role: "dialog",
|
|
334
|
+
"aria-modal": "true",
|
|
335
|
+
"aria-labelledby": title ? "modal-title" : void 0,
|
|
336
|
+
children: /* @__PURE__ */ jsxs3(
|
|
337
|
+
"div",
|
|
338
|
+
{
|
|
339
|
+
className: `relative w-full ${sizeClass} bg-white dark:bg-gray-800 rounded-lg shadow-2xl transform transition-all duration-200 scale-100 animate-in`,
|
|
340
|
+
onClick: (e) => e.stopPropagation(),
|
|
341
|
+
children: [
|
|
342
|
+
(title || showCloseButton) && /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700", children: [
|
|
343
|
+
title && /* @__PURE__ */ jsx4("h3", { id: "modal-title", className: "text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
|
|
344
|
+
showCloseButton && /* @__PURE__ */ jsx4(
|
|
345
|
+
"button",
|
|
346
|
+
{
|
|
347
|
+
onClick: onClose,
|
|
348
|
+
className: "ml-auto text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",
|
|
349
|
+
"aria-label": "Close modal",
|
|
350
|
+
children: /* @__PURE__ */ jsx4("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
] }),
|
|
354
|
+
/* @__PURE__ */ jsx4("div", { className: "p-6", children })
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
)
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
// src/components/Navbar.tsx
|
|
363
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
364
|
+
var Navbar = ({
|
|
365
|
+
logo,
|
|
366
|
+
children,
|
|
367
|
+
className = "",
|
|
368
|
+
sticky = false
|
|
369
|
+
}) => {
|
|
370
|
+
const { theme } = useTheme();
|
|
371
|
+
const baseClasses = sticky ? "sticky top-0 z-40" : "";
|
|
372
|
+
return /* @__PURE__ */ jsx5("nav", { className: `bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${baseClasses} ${className}`, children: /* @__PURE__ */ jsx5("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between items-center h-16", children: [
|
|
373
|
+
logo && /* @__PURE__ */ jsx5("div", { className: "flex items-center", children: logo }),
|
|
374
|
+
children && /* @__PURE__ */ jsx5("div", { className: "flex items-center gap-6", children })
|
|
375
|
+
] }) }) });
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
// src/components/Sidebar.tsx
|
|
379
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
380
|
+
var widthClasses = {
|
|
381
|
+
sm: "w-48",
|
|
382
|
+
md: "w-64",
|
|
383
|
+
lg: "w-80"
|
|
384
|
+
};
|
|
385
|
+
var Sidebar = ({
|
|
386
|
+
children,
|
|
387
|
+
className = "",
|
|
388
|
+
width = "md",
|
|
389
|
+
position = "left"
|
|
390
|
+
}) => {
|
|
391
|
+
const { theme } = useTheme();
|
|
392
|
+
const widthClass = widthClasses[width];
|
|
393
|
+
return /* @__PURE__ */ jsx6(
|
|
394
|
+
"aside",
|
|
395
|
+
{
|
|
396
|
+
className: `${widthClass} bg-white dark:bg-gray-800 border-${position === "left" ? "r" : "l"} border-gray-200 dark:border-gray-700 h-full overflow-y-auto ${className}`,
|
|
397
|
+
children
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
// src/components/SidebarProvider.tsx
|
|
403
|
+
import { createContext as createContext2, useContext as useContext2, useState as useState3 } from "react";
|
|
404
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
405
|
+
var SidebarContext = createContext2(void 0);
|
|
406
|
+
var SidebarProvider = ({
|
|
407
|
+
children,
|
|
408
|
+
defaultOpen = false
|
|
409
|
+
}) => {
|
|
410
|
+
const [isOpen, setIsOpen] = useState3(defaultOpen);
|
|
411
|
+
const [isMobile, setIsMobile] = useState3(false);
|
|
412
|
+
const open = () => setIsOpen(true);
|
|
413
|
+
const close = () => setIsOpen(false);
|
|
414
|
+
const toggle = () => setIsOpen((prev) => !prev);
|
|
415
|
+
const value = {
|
|
416
|
+
isOpen,
|
|
417
|
+
isMobile,
|
|
418
|
+
open,
|
|
419
|
+
close,
|
|
420
|
+
toggle,
|
|
421
|
+
setIsMobile
|
|
422
|
+
};
|
|
423
|
+
return /* @__PURE__ */ jsx7(SidebarContext.Provider, { value, children });
|
|
424
|
+
};
|
|
425
|
+
var useSidebar = () => {
|
|
426
|
+
const context = useContext2(SidebarContext);
|
|
427
|
+
if (!context) {
|
|
428
|
+
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
429
|
+
}
|
|
430
|
+
return context;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
// src/components/Drawer.tsx
|
|
434
|
+
import { useEffect as useEffect4 } from "react";
|
|
435
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
436
|
+
var sizeClasses2 = {
|
|
437
|
+
left: {
|
|
438
|
+
sm: "w-64",
|
|
439
|
+
md: "w-80",
|
|
440
|
+
lg: "w-96"
|
|
441
|
+
},
|
|
442
|
+
right: {
|
|
443
|
+
sm: "w-64",
|
|
444
|
+
md: "w-80",
|
|
445
|
+
lg: "w-96"
|
|
446
|
+
},
|
|
447
|
+
top: {
|
|
448
|
+
sm: "h-48",
|
|
449
|
+
md: "h-64",
|
|
450
|
+
lg: "h-80"
|
|
451
|
+
},
|
|
452
|
+
bottom: {
|
|
453
|
+
sm: "h-48",
|
|
454
|
+
md: "h-64",
|
|
455
|
+
lg: "h-80"
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
var positionClasses = {
|
|
459
|
+
left: "left-0 top-0 h-full",
|
|
460
|
+
right: "right-0 top-0 h-full",
|
|
461
|
+
top: "top-0 left-0 w-full",
|
|
462
|
+
bottom: "bottom-0 left-0 w-full"
|
|
463
|
+
};
|
|
464
|
+
var slideClasses = {
|
|
465
|
+
left: "transform transition-transform duration-300",
|
|
466
|
+
right: "transform transition-transform duration-300",
|
|
467
|
+
top: "transform transition-transform duration-300",
|
|
468
|
+
bottom: "transform transition-transform duration-300"
|
|
469
|
+
};
|
|
470
|
+
var Drawer = ({
|
|
471
|
+
isOpen,
|
|
472
|
+
onClose,
|
|
473
|
+
title,
|
|
474
|
+
children,
|
|
475
|
+
position = "right",
|
|
476
|
+
size = "md",
|
|
477
|
+
showCloseButton = true
|
|
478
|
+
}) => {
|
|
479
|
+
const { theme } = useTheme();
|
|
480
|
+
useEffect4(() => {
|
|
481
|
+
const handleEscape = (e) => {
|
|
482
|
+
if (e.key === "Escape" && isOpen) {
|
|
483
|
+
onClose();
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
if (isOpen) {
|
|
487
|
+
document.addEventListener("keydown", handleEscape);
|
|
488
|
+
document.body.style.overflow = "hidden";
|
|
489
|
+
}
|
|
490
|
+
return () => {
|
|
491
|
+
document.removeEventListener("keydown", handleEscape);
|
|
492
|
+
document.body.style.overflow = "unset";
|
|
493
|
+
};
|
|
494
|
+
}, [isOpen, onClose]);
|
|
495
|
+
if (!isOpen) return null;
|
|
496
|
+
const sizeClass = sizeClasses2[position][size];
|
|
497
|
+
const positionClass = positionClasses[position];
|
|
498
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
499
|
+
/* @__PURE__ */ jsx8(
|
|
500
|
+
"div",
|
|
501
|
+
{
|
|
502
|
+
className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm transition-all duration-200",
|
|
503
|
+
onClick: onClose
|
|
504
|
+
}
|
|
505
|
+
),
|
|
506
|
+
/* @__PURE__ */ jsxs5(
|
|
507
|
+
"div",
|
|
508
|
+
{
|
|
509
|
+
className: `fixed z-50 ${positionClass} ${sizeClass} bg-white dark:bg-gray-800 shadow-2xl overflow-hidden flex flex-col ${slideClasses[position]}`,
|
|
510
|
+
children: [
|
|
511
|
+
(title || showCloseButton) && /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700", children: [
|
|
512
|
+
title && /* @__PURE__ */ jsx8("h3", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
|
|
513
|
+
showCloseButton && /* @__PURE__ */ jsx8(
|
|
514
|
+
"button",
|
|
515
|
+
{
|
|
516
|
+
onClick: onClose,
|
|
517
|
+
className: "ml-auto text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",
|
|
518
|
+
"aria-label": "Close drawer",
|
|
519
|
+
children: /* @__PURE__ */ jsx8("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
520
|
+
}
|
|
521
|
+
)
|
|
522
|
+
] }),
|
|
523
|
+
/* @__PURE__ */ jsx8("div", { className: "flex-1 p-6 overflow-y-auto", children })
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
)
|
|
527
|
+
] });
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
// src/components/TextInput.tsx
|
|
531
|
+
import { forwardRef } from "react";
|
|
532
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
533
|
+
var sizeClasses3 = {
|
|
534
|
+
sm: "px-3 py-1.5 text-sm",
|
|
535
|
+
md: "px-4 py-2.5 text-base",
|
|
536
|
+
lg: "px-4 py-3 text-lg"
|
|
537
|
+
};
|
|
538
|
+
var TextInput = forwardRef(
|
|
539
|
+
({
|
|
540
|
+
label,
|
|
541
|
+
error,
|
|
542
|
+
helperText,
|
|
543
|
+
size = "md",
|
|
544
|
+
fullWidth = false,
|
|
545
|
+
leftIcon,
|
|
546
|
+
rightIcon,
|
|
547
|
+
className = "",
|
|
548
|
+
disabled,
|
|
549
|
+
...props
|
|
550
|
+
}, ref) => {
|
|
551
|
+
const { theme, themeName } = useTheme();
|
|
552
|
+
const baseStyles = theme.select?.base || "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
553
|
+
const sizeStyle = sizeClasses3[size];
|
|
554
|
+
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
555
|
+
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
556
|
+
const widthStyle = fullWidth ? "w-full" : "";
|
|
557
|
+
const paddingWithIcon = leftIcon ? "pl-10" : rightIcon ? "pr-10" : "";
|
|
558
|
+
return /* @__PURE__ */ jsxs6("div", { className: `${widthStyle} ${className}`, children: [
|
|
559
|
+
label && /* @__PURE__ */ jsx9("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
560
|
+
/* @__PURE__ */ jsxs6("div", { className: "relative", children: [
|
|
561
|
+
leftIcon && /* @__PURE__ */ jsx9("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: leftIcon }),
|
|
562
|
+
/* @__PURE__ */ jsx9(
|
|
563
|
+
"input",
|
|
564
|
+
{
|
|
565
|
+
ref,
|
|
566
|
+
className: `${baseStyles} ${sizeStyle} ${errorStyles} ${disabledStyles} ${paddingWithIcon}`.trim(),
|
|
567
|
+
disabled,
|
|
568
|
+
...props
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
rightIcon && /* @__PURE__ */ jsx9("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: rightIcon })
|
|
572
|
+
] }),
|
|
573
|
+
error && /* @__PURE__ */ jsx9("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
574
|
+
helperText && !error && /* @__PURE__ */ jsx9("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
575
|
+
] });
|
|
576
|
+
}
|
|
577
|
+
);
|
|
578
|
+
TextInput.displayName = "TextInput";
|
|
579
|
+
|
|
580
|
+
// src/components/ActionMenu.tsx
|
|
581
|
+
import { useState as useState4, useRef as useRef2, useEffect as useEffect5 } from "react";
|
|
582
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
583
|
+
var ActionMenu = ({
|
|
584
|
+
items,
|
|
585
|
+
trigger,
|
|
586
|
+
position = "right"
|
|
587
|
+
}) => {
|
|
588
|
+
const { themeName } = useTheme();
|
|
589
|
+
const [isOpen, setIsOpen] = useState4(false);
|
|
590
|
+
const menuRef = useRef2(null);
|
|
591
|
+
useEffect5(() => {
|
|
592
|
+
const handleClickOutside = (event) => {
|
|
593
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
594
|
+
setIsOpen(false);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
if (isOpen) {
|
|
598
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
599
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
600
|
+
}
|
|
601
|
+
}, [isOpen]);
|
|
602
|
+
const handleItemClick = (item) => {
|
|
603
|
+
if (!item.disabled) {
|
|
604
|
+
item.onClick();
|
|
605
|
+
setIsOpen(false);
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
const defaultTrigger = /* @__PURE__ */ jsx10(
|
|
609
|
+
"button",
|
|
610
|
+
{
|
|
611
|
+
className: "p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",
|
|
612
|
+
"aria-label": "Open menu",
|
|
613
|
+
children: /* @__PURE__ */ jsx10("svg", { className: "w-5 h-5 text-gray-600 dark:text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx10("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" }) })
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
const menuBaseStyles = themeName === "minimalistic" ? "bg-black border-2 border-white" : "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-lg";
|
|
617
|
+
const itemBaseStyles = themeName === "minimalistic" ? "text-white hover:bg-white hover:text-black transition-colors duration-200" : "text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors";
|
|
618
|
+
const positionClass = position === "left" ? "left-0" : "right-0";
|
|
619
|
+
return /* @__PURE__ */ jsxs7("div", { className: "relative inline-block", ref: menuRef, children: [
|
|
620
|
+
/* @__PURE__ */ jsx10("div", { onClick: () => setIsOpen(!isOpen), children: trigger || defaultTrigger }),
|
|
621
|
+
isOpen && /* @__PURE__ */ jsx10(
|
|
622
|
+
"div",
|
|
623
|
+
{
|
|
624
|
+
className: `absolute ${positionClass} mt-2 w-56 rounded-lg ${menuBaseStyles} z-50 overflow-hidden`,
|
|
625
|
+
style: { minWidth: "14rem" },
|
|
626
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxs7(
|
|
627
|
+
"button",
|
|
628
|
+
{
|
|
629
|
+
onClick: () => handleItemClick(item),
|
|
630
|
+
disabled: item.disabled,
|
|
631
|
+
className: `w-full text-left px-4 py-3 flex items-center gap-3 ${itemBaseStyles} ${item.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${item.variant === "danger" ? "text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20" : ""}`,
|
|
632
|
+
children: [
|
|
633
|
+
item.icon && /* @__PURE__ */ jsx10("span", { className: "flex-shrink-0", children: item.icon }),
|
|
634
|
+
/* @__PURE__ */ jsx10("span", { className: "flex-1", children: item.label })
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
index
|
|
638
|
+
))
|
|
639
|
+
}
|
|
640
|
+
)
|
|
641
|
+
] });
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
// src/components/Card.tsx
|
|
645
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
646
|
+
var paddingClasses = {
|
|
647
|
+
none: "",
|
|
648
|
+
sm: "p-4",
|
|
649
|
+
md: "p-6",
|
|
650
|
+
lg: "p-8"
|
|
651
|
+
};
|
|
652
|
+
var Card = ({
|
|
653
|
+
children,
|
|
654
|
+
className = "",
|
|
655
|
+
padding = "md",
|
|
656
|
+
hover = false
|
|
657
|
+
}) => {
|
|
658
|
+
const { theme } = useTheme();
|
|
659
|
+
const paddingClass = paddingClasses[padding];
|
|
660
|
+
const hoverClass = hover ? "hover:shadow-lg transition-shadow duration-200" : "";
|
|
661
|
+
return /* @__PURE__ */ jsx11(
|
|
662
|
+
"div",
|
|
663
|
+
{
|
|
664
|
+
className: `bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 ${paddingClass} ${hoverClass} ${className}`,
|
|
665
|
+
children
|
|
666
|
+
}
|
|
667
|
+
);
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
// src/components/Alert.tsx
|
|
671
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
672
|
+
var variantStyles = {
|
|
673
|
+
info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-100",
|
|
674
|
+
success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-900 dark:text-green-100",
|
|
675
|
+
warning: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-900 dark:text-yellow-100",
|
|
676
|
+
error: "bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-900 dark:text-red-100"
|
|
677
|
+
};
|
|
678
|
+
var iconStyles = {
|
|
679
|
+
info: "text-blue-600 dark:text-blue-400",
|
|
680
|
+
success: "text-green-600 dark:text-green-400",
|
|
681
|
+
warning: "text-yellow-600 dark:text-yellow-400",
|
|
682
|
+
error: "text-red-600 dark:text-red-400"
|
|
683
|
+
};
|
|
684
|
+
var Alert = ({
|
|
685
|
+
variant = "info",
|
|
686
|
+
title,
|
|
687
|
+
children,
|
|
688
|
+
onClose,
|
|
689
|
+
className = ""
|
|
690
|
+
}) => {
|
|
691
|
+
const { theme } = useTheme();
|
|
692
|
+
const variantClass = variantStyles[variant];
|
|
693
|
+
const iconClass = iconStyles[variant];
|
|
694
|
+
return /* @__PURE__ */ jsx12("div", { className: `rounded-lg border p-4 ${variantClass} ${className}`, role: "alert", children: /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-3", children: [
|
|
695
|
+
/* @__PURE__ */ jsxs8("div", { className: `flex-shrink-0 ${iconClass}`, children: [
|
|
696
|
+
variant === "info" && /* @__PURE__ */ jsx12("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx12("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }),
|
|
697
|
+
variant === "success" && /* @__PURE__ */ jsx12("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx12("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }) }),
|
|
698
|
+
variant === "warning" && /* @__PURE__ */ jsx12("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx12("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }),
|
|
699
|
+
variant === "error" && /* @__PURE__ */ jsx12("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx12("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) })
|
|
700
|
+
] }),
|
|
701
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex-1", children: [
|
|
702
|
+
title && /* @__PURE__ */ jsx12("h3", { className: "font-semibold mb-1", children: title }),
|
|
703
|
+
/* @__PURE__ */ jsx12("div", { className: "text-sm", children })
|
|
704
|
+
] }),
|
|
705
|
+
onClose && /* @__PURE__ */ jsx12(
|
|
706
|
+
"button",
|
|
707
|
+
{
|
|
708
|
+
onClick: onClose,
|
|
709
|
+
className: `flex-shrink-0 ${iconClass} hover:opacity-70 transition-opacity`,
|
|
710
|
+
"aria-label": "Close alert",
|
|
711
|
+
children: /* @__PURE__ */ jsx12("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx12("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
712
|
+
}
|
|
713
|
+
)
|
|
714
|
+
] }) });
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
// src/components/Checkbox.tsx
|
|
718
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
719
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
720
|
+
var Checkbox = forwardRef2(
|
|
721
|
+
({ label, error, className = "", disabled, ...props }, ref) => {
|
|
722
|
+
const { theme } = useTheme();
|
|
723
|
+
return /* @__PURE__ */ jsxs9("div", { className, children: [
|
|
724
|
+
/* @__PURE__ */ jsxs9("label", { className: "flex items-center gap-2 cursor-pointer group", children: [
|
|
725
|
+
/* @__PURE__ */ jsx13(
|
|
726
|
+
"input",
|
|
727
|
+
{
|
|
728
|
+
ref,
|
|
729
|
+
type: "checkbox",
|
|
730
|
+
disabled,
|
|
731
|
+
className: `w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-2 focus:ring-blue-500 focus:ring-offset-0 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ${error ? "border-red-500 dark:border-red-500" : ""}`,
|
|
732
|
+
...props
|
|
733
|
+
}
|
|
734
|
+
),
|
|
735
|
+
label && /* @__PURE__ */ jsx13("span", { className: `text-sm text-gray-700 dark:text-gray-300 ${disabled ? "opacity-50 cursor-not-allowed" : "group-hover:text-gray-900 dark:group-hover:text-gray-100"}`, children: label })
|
|
736
|
+
] }),
|
|
737
|
+
error && /* @__PURE__ */ jsx13("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error })
|
|
738
|
+
] });
|
|
739
|
+
}
|
|
740
|
+
);
|
|
741
|
+
Checkbox.displayName = "Checkbox";
|
|
742
|
+
|
|
743
|
+
// src/components/Toggle.tsx
|
|
744
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
745
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
746
|
+
var Toggle = forwardRef3(
|
|
747
|
+
({ label, size = "md", className = "", disabled, checked, ...props }, ref) => {
|
|
748
|
+
const { theme } = useTheme();
|
|
749
|
+
const toggleClasses = {
|
|
750
|
+
sm: {
|
|
751
|
+
switch: "w-9 h-5",
|
|
752
|
+
thumb: "w-4 h-4 peer-checked:translate-x-4"
|
|
753
|
+
},
|
|
754
|
+
md: {
|
|
755
|
+
switch: "w-11 h-6",
|
|
756
|
+
thumb: "w-5 h-5 peer-checked:translate-x-5"
|
|
757
|
+
},
|
|
758
|
+
lg: {
|
|
759
|
+
switch: "w-14 h-7",
|
|
760
|
+
thumb: "w-6 h-6 peer-checked:translate-x-7"
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
const currentSize = toggleClasses[size];
|
|
764
|
+
return /* @__PURE__ */ jsxs10("label", { className: `inline-flex items-center gap-3 cursor-pointer ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${className}`, children: [
|
|
765
|
+
/* @__PURE__ */ jsxs10("div", { className: "relative", children: [
|
|
766
|
+
/* @__PURE__ */ jsx14(
|
|
767
|
+
"input",
|
|
768
|
+
{
|
|
769
|
+
ref,
|
|
770
|
+
type: "checkbox",
|
|
771
|
+
className: "sr-only peer",
|
|
772
|
+
disabled,
|
|
773
|
+
checked,
|
|
774
|
+
...props
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
/* @__PURE__ */ jsx14(
|
|
778
|
+
"div",
|
|
779
|
+
{
|
|
780
|
+
className: `${currentSize.switch} bg-gray-300 dark:bg-gray-700 peer-focus:ring-2 peer-focus:ring-blue-500 rounded-full peer peer-checked:bg-blue-600 dark:peer-checked:bg-blue-500 transition-colors`
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ jsx14(
|
|
784
|
+
"div",
|
|
785
|
+
{
|
|
786
|
+
className: `${currentSize.thumb} bg-white rounded-full shadow-md absolute top-0.5 left-0.5 transition-transform`
|
|
787
|
+
}
|
|
788
|
+
)
|
|
789
|
+
] }),
|
|
790
|
+
label && /* @__PURE__ */ jsx14("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: label })
|
|
791
|
+
] });
|
|
792
|
+
}
|
|
793
|
+
);
|
|
794
|
+
Toggle.displayName = "Toggle";
|
|
795
|
+
|
|
796
|
+
// src/components/Badge.tsx
|
|
797
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
798
|
+
var variantStyles2 = {
|
|
799
|
+
default: "bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",
|
|
800
|
+
primary: "bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200",
|
|
801
|
+
success: "bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200",
|
|
802
|
+
warning: "bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200",
|
|
803
|
+
error: "bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200",
|
|
804
|
+
info: "bg-cyan-100 dark:bg-cyan-900/30 text-cyan-800 dark:text-cyan-200"
|
|
805
|
+
};
|
|
806
|
+
var sizeStyles = {
|
|
807
|
+
sm: "px-2 py-0.5 text-xs",
|
|
808
|
+
md: "px-2.5 py-1 text-sm",
|
|
809
|
+
lg: "px-3 py-1.5 text-base"
|
|
810
|
+
};
|
|
811
|
+
var Badge = ({
|
|
812
|
+
children,
|
|
813
|
+
variant = "default",
|
|
814
|
+
size = "md",
|
|
815
|
+
className = ""
|
|
816
|
+
}) => {
|
|
817
|
+
const { theme } = useTheme();
|
|
818
|
+
const variantClass = variantStyles2[variant];
|
|
819
|
+
const sizeClass = sizeStyles[size];
|
|
820
|
+
return /* @__PURE__ */ jsx15("span", { className: `inline-flex items-center font-medium rounded-full ${variantClass} ${sizeClass} ${className}`, children });
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
// src/components/Spinner.tsx
|
|
824
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
825
|
+
var sizeClasses4 = {
|
|
826
|
+
sm: "w-4 h-4 border-2",
|
|
827
|
+
md: "w-8 h-8 border-2",
|
|
828
|
+
lg: "w-12 h-12 border-3",
|
|
829
|
+
xl: "w-16 h-16 border-4"
|
|
830
|
+
};
|
|
831
|
+
var colorClasses = {
|
|
832
|
+
primary: "border-blue-600 border-t-transparent",
|
|
833
|
+
secondary: "border-gray-600 border-t-transparent",
|
|
834
|
+
white: "border-white border-t-transparent"
|
|
835
|
+
};
|
|
836
|
+
var Spinner = ({
|
|
837
|
+
size = "md",
|
|
838
|
+
color = "primary",
|
|
839
|
+
className = ""
|
|
840
|
+
}) => {
|
|
841
|
+
const { theme } = useTheme();
|
|
842
|
+
const sizeClass = sizeClasses4[size];
|
|
843
|
+
const colorClass = colorClasses[color];
|
|
844
|
+
return /* @__PURE__ */ jsx16(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
className: `inline-block rounded-full animate-spin ${sizeClass} ${colorClass} ${className}`,
|
|
848
|
+
role: "status",
|
|
849
|
+
"aria-label": "Loading",
|
|
850
|
+
children: /* @__PURE__ */ jsx16("span", { className: "sr-only", children: "Loading..." })
|
|
851
|
+
}
|
|
852
|
+
);
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
// src/components/Tabs.tsx
|
|
856
|
+
import { useState as useState5 } from "react";
|
|
857
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
858
|
+
var Tabs = ({
|
|
859
|
+
tabs,
|
|
860
|
+
defaultIndex = 0,
|
|
861
|
+
onChange,
|
|
862
|
+
className = ""
|
|
863
|
+
}) => {
|
|
864
|
+
const { theme } = useTheme();
|
|
865
|
+
const [activeIndex, setActiveIndex] = useState5(defaultIndex);
|
|
866
|
+
const handleTabClick = (index) => {
|
|
867
|
+
if (tabs[index].disabled) return;
|
|
868
|
+
setActiveIndex(index);
|
|
869
|
+
onChange?.(index);
|
|
870
|
+
};
|
|
871
|
+
return /* @__PURE__ */ jsxs11("div", { className, children: [
|
|
872
|
+
/* @__PURE__ */ jsx17("div", { className: "border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsx17("nav", { className: "flex gap-8 px-6", "aria-label": "Tabs", children: tabs.map((tab, index) => /* @__PURE__ */ jsx17(
|
|
873
|
+
"button",
|
|
874
|
+
{
|
|
875
|
+
onClick: () => handleTabClick(index),
|
|
876
|
+
disabled: tab.disabled,
|
|
877
|
+
className: `py-4 px-1 border-b-2 font-medium text-sm transition-colors ${activeIndex === index ? "border-blue-600 text-blue-600 dark:text-blue-400" : "border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:border-gray-300 dark:hover:border-gray-600"} ${tab.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
878
|
+
"aria-current": activeIndex === index ? "page" : void 0,
|
|
879
|
+
children: tab.label
|
|
880
|
+
},
|
|
881
|
+
index
|
|
882
|
+
)) }) }),
|
|
883
|
+
/* @__PURE__ */ jsx17("div", { children: tabs[activeIndex]?.content })
|
|
884
|
+
] });
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
// src/components/Table.tsx
|
|
888
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
889
|
+
function Table({
|
|
890
|
+
columns,
|
|
891
|
+
data,
|
|
892
|
+
keyField = "id",
|
|
893
|
+
striped = false,
|
|
894
|
+
hoverable = true,
|
|
895
|
+
className = ""
|
|
896
|
+
}) {
|
|
897
|
+
const { theme } = useTheme();
|
|
898
|
+
return /* @__PURE__ */ jsxs12("div", { className: `overflow-x-auto ${className}`, children: [
|
|
899
|
+
/* @__PURE__ */ jsxs12("table", { className: "w-full text-left", children: [
|
|
900
|
+
/* @__PURE__ */ jsx18("thead", { className: "bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsx18("tr", { children: columns.map((column) => /* @__PURE__ */ jsx18(
|
|
901
|
+
"th",
|
|
902
|
+
{
|
|
903
|
+
className: "px-6 py-3 text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",
|
|
904
|
+
style: { width: column.width },
|
|
905
|
+
children: column.title
|
|
906
|
+
},
|
|
907
|
+
column.key
|
|
908
|
+
)) }) }),
|
|
909
|
+
/* @__PURE__ */ jsx18("tbody", { className: "bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700", children: data.map((row, rowIndex) => /* @__PURE__ */ jsx18(
|
|
910
|
+
"tr",
|
|
911
|
+
{
|
|
912
|
+
className: `
|
|
913
|
+
${striped && rowIndex % 2 === 1 ? "bg-gray-50 dark:bg-gray-800/50" : ""}
|
|
914
|
+
${hoverable ? "hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors" : ""}
|
|
915
|
+
`,
|
|
916
|
+
children: columns.map((column) => /* @__PURE__ */ jsx18(
|
|
917
|
+
"td",
|
|
918
|
+
{
|
|
919
|
+
className: "px-6 py-4 text-sm text-gray-900 dark:text-gray-100",
|
|
920
|
+
children: column.render ? column.render(row[column.key], row, rowIndex) : row[column.key]
|
|
921
|
+
},
|
|
922
|
+
column.key
|
|
923
|
+
))
|
|
924
|
+
},
|
|
925
|
+
row[keyField] || rowIndex
|
|
926
|
+
)) })
|
|
927
|
+
] }),
|
|
928
|
+
data.length === 0 && /* @__PURE__ */ jsx18("div", { className: "text-center py-8 text-gray-500 dark:text-gray-400", children: "No data available" })
|
|
929
|
+
] });
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
// src/components/Pagination.tsx
|
|
933
|
+
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
934
|
+
var Pagination = ({
|
|
935
|
+
currentPage,
|
|
936
|
+
totalPages,
|
|
937
|
+
onPageChange,
|
|
938
|
+
siblingCount = 1,
|
|
939
|
+
className = ""
|
|
940
|
+
}) => {
|
|
941
|
+
const { theme } = useTheme();
|
|
942
|
+
const range = (start, end) => {
|
|
943
|
+
const length = end - start + 1;
|
|
944
|
+
return Array.from({ length }, (_, idx) => idx + start);
|
|
945
|
+
};
|
|
946
|
+
const paginationRange = () => {
|
|
947
|
+
const totalPageNumbers = siblingCount + 5;
|
|
948
|
+
if (totalPageNumbers >= totalPages) {
|
|
949
|
+
return range(1, totalPages);
|
|
950
|
+
}
|
|
951
|
+
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
952
|
+
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
|
|
953
|
+
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
954
|
+
const shouldShowRightDots = rightSiblingIndex < totalPages - 2;
|
|
955
|
+
const firstPageIndex = 1;
|
|
956
|
+
const lastPageIndex = totalPages;
|
|
957
|
+
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
958
|
+
const leftItemCount = 3 + 2 * siblingCount;
|
|
959
|
+
const leftRange = range(1, leftItemCount);
|
|
960
|
+
return [...leftRange, "...", totalPages];
|
|
961
|
+
}
|
|
962
|
+
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
963
|
+
const rightItemCount = 3 + 2 * siblingCount;
|
|
964
|
+
const rightRange = range(totalPages - rightItemCount + 1, totalPages);
|
|
965
|
+
return [firstPageIndex, "...", ...rightRange];
|
|
966
|
+
}
|
|
967
|
+
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
968
|
+
const middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
969
|
+
return [firstPageIndex, "...", ...middleRange, "...", lastPageIndex];
|
|
970
|
+
}
|
|
971
|
+
return range(1, totalPages);
|
|
972
|
+
};
|
|
973
|
+
const pages = paginationRange();
|
|
974
|
+
return /* @__PURE__ */ jsxs13("nav", { className: `flex items-center gap-1 ${className}`, "aria-label": "Pagination", children: [
|
|
975
|
+
/* @__PURE__ */ jsx19(
|
|
976
|
+
"button",
|
|
977
|
+
{
|
|
978
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
979
|
+
disabled: currentPage === 1,
|
|
980
|
+
className: "px-3 py-2 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
981
|
+
"aria-label": "Previous page",
|
|
982
|
+
children: "Previous"
|
|
983
|
+
}
|
|
984
|
+
),
|
|
985
|
+
pages.map((page, index) => {
|
|
986
|
+
if (page === "...") {
|
|
987
|
+
return /* @__PURE__ */ jsx19(
|
|
988
|
+
"span",
|
|
989
|
+
{
|
|
990
|
+
className: "px-3 py-2 text-gray-700 dark:text-gray-300",
|
|
991
|
+
children: "..."
|
|
992
|
+
},
|
|
993
|
+
`dots-${index}`
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
return /* @__PURE__ */ jsx19(
|
|
997
|
+
"button",
|
|
998
|
+
{
|
|
999
|
+
onClick: () => onPageChange(page),
|
|
1000
|
+
className: `px-3 py-2 rounded-md text-sm font-medium transition-colors ${currentPage === page ? "bg-blue-600 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"}`,
|
|
1001
|
+
"aria-label": `Page ${page}`,
|
|
1002
|
+
"aria-current": currentPage === page ? "page" : void 0,
|
|
1003
|
+
children: page
|
|
1004
|
+
},
|
|
1005
|
+
page
|
|
1006
|
+
);
|
|
1007
|
+
}),
|
|
1008
|
+
/* @__PURE__ */ jsx19(
|
|
1009
|
+
"button",
|
|
1010
|
+
{
|
|
1011
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
1012
|
+
disabled: currentPage === totalPages,
|
|
1013
|
+
className: "px-3 py-2 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
1014
|
+
"aria-label": "Next page",
|
|
1015
|
+
children: "Next"
|
|
1016
|
+
}
|
|
1017
|
+
)
|
|
1018
|
+
] });
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
// src/components/DatePicker.tsx
|
|
1022
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1023
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1024
|
+
var DatePicker = forwardRef4(
|
|
1025
|
+
({ label, error, helperText, className = "", disabled, ...props }, ref) => {
|
|
1026
|
+
const { theme } = useTheme();
|
|
1027
|
+
const baseStyles = "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 px-4 py-2.5 text-base transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
1028
|
+
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
1029
|
+
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
1030
|
+
return /* @__PURE__ */ jsxs14("div", { className, children: [
|
|
1031
|
+
label && /* @__PURE__ */ jsx20("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1032
|
+
/* @__PURE__ */ jsx20(
|
|
1033
|
+
"input",
|
|
1034
|
+
{
|
|
1035
|
+
ref,
|
|
1036
|
+
type: "date",
|
|
1037
|
+
disabled,
|
|
1038
|
+
className: `${baseStyles} ${errorStyles} ${disabledStyles}`.trim(),
|
|
1039
|
+
...props
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
error && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1043
|
+
helperText && !error && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1044
|
+
] });
|
|
1045
|
+
}
|
|
1046
|
+
);
|
|
1047
|
+
DatePicker.displayName = "DatePicker";
|
|
1048
|
+
|
|
1049
|
+
// src/components/TimePicker.tsx
|
|
1050
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
1051
|
+
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1052
|
+
var TimePicker = forwardRef5(
|
|
1053
|
+
({ label, error, helperText, className = "", disabled, ...props }, ref) => {
|
|
1054
|
+
const { theme } = useTheme();
|
|
1055
|
+
const baseStyles = "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 px-4 py-2.5 text-base transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
1056
|
+
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
1057
|
+
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
1058
|
+
return /* @__PURE__ */ jsxs15("div", { className, children: [
|
|
1059
|
+
label && /* @__PURE__ */ jsx21("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1060
|
+
/* @__PURE__ */ jsx21(
|
|
1061
|
+
"input",
|
|
1062
|
+
{
|
|
1063
|
+
ref,
|
|
1064
|
+
type: "time",
|
|
1065
|
+
disabled,
|
|
1066
|
+
className: `${baseStyles} ${errorStyles} ${disabledStyles}`.trim(),
|
|
1067
|
+
...props
|
|
1068
|
+
}
|
|
1069
|
+
),
|
|
1070
|
+
error && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1071
|
+
helperText && !error && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1072
|
+
] });
|
|
1073
|
+
}
|
|
1074
|
+
);
|
|
1075
|
+
TimePicker.displayName = "TimePicker";
|
|
1076
|
+
|
|
1077
|
+
// src/components/DateTimePicker.tsx
|
|
1078
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
1079
|
+
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1080
|
+
var DateTimePicker = forwardRef6(
|
|
1081
|
+
({ label, error, helperText, className = "", disabled, ...props }, ref) => {
|
|
1082
|
+
const { theme } = useTheme();
|
|
1083
|
+
const baseStyles = "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 px-4 py-2.5 text-base transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
1084
|
+
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
1085
|
+
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
1086
|
+
return /* @__PURE__ */ jsxs16("div", { className, children: [
|
|
1087
|
+
label && /* @__PURE__ */ jsx22("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1088
|
+
/* @__PURE__ */ jsx22(
|
|
1089
|
+
"input",
|
|
1090
|
+
{
|
|
1091
|
+
ref,
|
|
1092
|
+
type: "datetime-local",
|
|
1093
|
+
disabled,
|
|
1094
|
+
className: `${baseStyles} ${errorStyles} ${disabledStyles}`.trim(),
|
|
1095
|
+
...props
|
|
1096
|
+
}
|
|
1097
|
+
),
|
|
1098
|
+
error && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1099
|
+
helperText && !error && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1100
|
+
] });
|
|
1101
|
+
}
|
|
1102
|
+
);
|
|
1103
|
+
DateTimePicker.displayName = "DateTimePicker";
|
|
1104
|
+
|
|
285
1105
|
// src/utils/theme-script.ts
|
|
286
1106
|
var themeScript = `
|
|
287
1107
|
(function() {
|
|
@@ -314,13 +1134,220 @@ var themeScript = `
|
|
|
314
1134
|
function getThemeScript() {
|
|
315
1135
|
return themeScript;
|
|
316
1136
|
}
|
|
1137
|
+
|
|
1138
|
+
// src/icons/Icon.tsx
|
|
1139
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1140
|
+
var sizeClasses5 = {
|
|
1141
|
+
xs: "w-3 h-3",
|
|
1142
|
+
sm: "w-4 h-4",
|
|
1143
|
+
md: "w-5 h-5",
|
|
1144
|
+
lg: "w-6 h-6",
|
|
1145
|
+
xl: "w-8 h-8"
|
|
1146
|
+
};
|
|
1147
|
+
var createIcon = (displayName, path, filled = false) => {
|
|
1148
|
+
const Icon = ({ size = "md", className = "", color = "currentColor" }) => {
|
|
1149
|
+
const sizeClass = sizeClasses5[size];
|
|
1150
|
+
return /* @__PURE__ */ jsx23(
|
|
1151
|
+
"svg",
|
|
1152
|
+
{
|
|
1153
|
+
className: `${sizeClass} ${className}`,
|
|
1154
|
+
fill: filled ? color : "none",
|
|
1155
|
+
viewBox: "0 0 24 24",
|
|
1156
|
+
stroke: filled ? "none" : color,
|
|
1157
|
+
"aria-hidden": "true",
|
|
1158
|
+
children: path
|
|
1159
|
+
}
|
|
1160
|
+
);
|
|
1161
|
+
};
|
|
1162
|
+
Icon.displayName = displayName;
|
|
1163
|
+
return Icon;
|
|
1164
|
+
};
|
|
1165
|
+
var HomeIcon = createIcon(
|
|
1166
|
+
"HomeIcon",
|
|
1167
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" })
|
|
1168
|
+
);
|
|
1169
|
+
var UserIcon = createIcon(
|
|
1170
|
+
"UserIcon",
|
|
1171
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" })
|
|
1172
|
+
);
|
|
1173
|
+
var SearchIcon = createIcon(
|
|
1174
|
+
"SearchIcon",
|
|
1175
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" })
|
|
1176
|
+
);
|
|
1177
|
+
var BellIcon = createIcon(
|
|
1178
|
+
"BellIcon",
|
|
1179
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" })
|
|
1180
|
+
);
|
|
1181
|
+
var SettingsIcon = createIcon(
|
|
1182
|
+
"SettingsIcon",
|
|
1183
|
+
/* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
1184
|
+
/* @__PURE__ */ jsx23("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" }),
|
|
1185
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
1186
|
+
] })
|
|
1187
|
+
);
|
|
1188
|
+
var MenuIcon = createIcon(
|
|
1189
|
+
"MenuIcon",
|
|
1190
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })
|
|
1191
|
+
);
|
|
1192
|
+
var CloseIcon = createIcon(
|
|
1193
|
+
"CloseIcon",
|
|
1194
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
|
|
1195
|
+
);
|
|
1196
|
+
var ChevronDownIcon = createIcon(
|
|
1197
|
+
"ChevronDownIcon",
|
|
1198
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
1199
|
+
);
|
|
1200
|
+
var ChevronRightIcon = createIcon(
|
|
1201
|
+
"ChevronRightIcon",
|
|
1202
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
1203
|
+
);
|
|
1204
|
+
var CheckIcon = createIcon(
|
|
1205
|
+
"CheckIcon",
|
|
1206
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" })
|
|
1207
|
+
);
|
|
1208
|
+
var PlusIcon = createIcon(
|
|
1209
|
+
"PlusIcon",
|
|
1210
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" })
|
|
1211
|
+
);
|
|
1212
|
+
var TrashIcon = createIcon(
|
|
1213
|
+
"TrashIcon",
|
|
1214
|
+
/* @__PURE__ */ jsx23("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" })
|
|
1215
|
+
);
|
|
1216
|
+
var EditIcon = createIcon(
|
|
1217
|
+
"EditIcon",
|
|
1218
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" })
|
|
1219
|
+
);
|
|
1220
|
+
var MailIcon = createIcon(
|
|
1221
|
+
"MailIcon",
|
|
1222
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" })
|
|
1223
|
+
);
|
|
1224
|
+
var StarIcon = createIcon(
|
|
1225
|
+
"StarIcon",
|
|
1226
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" })
|
|
1227
|
+
);
|
|
1228
|
+
var HeartIcon = createIcon(
|
|
1229
|
+
"HeartIcon",
|
|
1230
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z" })
|
|
1231
|
+
);
|
|
1232
|
+
var DownloadIcon = createIcon(
|
|
1233
|
+
"DownloadIcon",
|
|
1234
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" })
|
|
1235
|
+
);
|
|
1236
|
+
var UploadIcon = createIcon(
|
|
1237
|
+
"UploadIcon",
|
|
1238
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" })
|
|
1239
|
+
);
|
|
1240
|
+
var CameraIcon = createIcon(
|
|
1241
|
+
"CameraIcon",
|
|
1242
|
+
/* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
1243
|
+
/* @__PURE__ */ jsx23("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" }),
|
|
1244
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
1245
|
+
] })
|
|
1246
|
+
);
|
|
1247
|
+
var LockIcon = createIcon(
|
|
1248
|
+
"LockIcon",
|
|
1249
|
+
/* @__PURE__ */ jsx23("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" })
|
|
1250
|
+
);
|
|
1251
|
+
var CalendarIcon = createIcon(
|
|
1252
|
+
"CalendarIcon",
|
|
1253
|
+
/* @__PURE__ */ jsx23("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" })
|
|
1254
|
+
);
|
|
1255
|
+
var GoogleIcon = createIcon(
|
|
1256
|
+
"GoogleIcon",
|
|
1257
|
+
/* @__PURE__ */ jsx23("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }),
|
|
1258
|
+
true
|
|
1259
|
+
);
|
|
1260
|
+
var GitHubIcon = createIcon(
|
|
1261
|
+
"GitHubIcon",
|
|
1262
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" }),
|
|
1263
|
+
true
|
|
1264
|
+
);
|
|
1265
|
+
var TwitterIcon = createIcon(
|
|
1266
|
+
"TwitterIcon",
|
|
1267
|
+
/* @__PURE__ */ jsx23("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }),
|
|
1268
|
+
true
|
|
1269
|
+
);
|
|
1270
|
+
var FacebookIcon = createIcon(
|
|
1271
|
+
"FacebookIcon",
|
|
1272
|
+
/* @__PURE__ */ jsx23("path", { d: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" }),
|
|
1273
|
+
true
|
|
1274
|
+
);
|
|
1275
|
+
var AppleIcon = createIcon(
|
|
1276
|
+
"AppleIcon",
|
|
1277
|
+
/* @__PURE__ */ jsx23("path", { d: "M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }),
|
|
1278
|
+
true
|
|
1279
|
+
);
|
|
1280
|
+
var LinkedInIcon = createIcon(
|
|
1281
|
+
"LinkedInIcon",
|
|
1282
|
+
/* @__PURE__ */ jsx23("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }),
|
|
1283
|
+
true
|
|
1284
|
+
);
|
|
1285
|
+
var YouTubeIcon = createIcon(
|
|
1286
|
+
"YouTubeIcon",
|
|
1287
|
+
/* @__PURE__ */ jsx23("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }),
|
|
1288
|
+
true
|
|
1289
|
+
);
|
|
1290
|
+
var SlackIcon = createIcon(
|
|
1291
|
+
"SlackIcon",
|
|
1292
|
+
/* @__PURE__ */ jsx23("path", { d: "M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" }),
|
|
1293
|
+
true
|
|
1294
|
+
);
|
|
317
1295
|
export {
|
|
1296
|
+
ActionMenu,
|
|
1297
|
+
Alert,
|
|
1298
|
+
AppleIcon,
|
|
1299
|
+
Badge,
|
|
1300
|
+
BellIcon,
|
|
318
1301
|
Button,
|
|
1302
|
+
CalendarIcon,
|
|
1303
|
+
CameraIcon,
|
|
1304
|
+
Card,
|
|
1305
|
+
CheckIcon,
|
|
1306
|
+
Checkbox,
|
|
1307
|
+
ChevronDownIcon,
|
|
1308
|
+
ChevronRightIcon,
|
|
1309
|
+
CloseIcon,
|
|
1310
|
+
DatePicker,
|
|
1311
|
+
DateTimePicker,
|
|
1312
|
+
DownloadIcon,
|
|
1313
|
+
Drawer,
|
|
1314
|
+
EditIcon,
|
|
1315
|
+
FacebookIcon,
|
|
1316
|
+
GitHubIcon,
|
|
1317
|
+
GoogleIcon,
|
|
1318
|
+
HeartIcon,
|
|
1319
|
+
HomeIcon,
|
|
1320
|
+
LinkedInIcon,
|
|
1321
|
+
LockIcon,
|
|
1322
|
+
MailIcon,
|
|
1323
|
+
MenuIcon,
|
|
1324
|
+
Modal,
|
|
1325
|
+
Navbar,
|
|
1326
|
+
Pagination,
|
|
1327
|
+
PlusIcon,
|
|
1328
|
+
SearchIcon,
|
|
319
1329
|
Select,
|
|
1330
|
+
SettingsIcon,
|
|
1331
|
+
Sidebar,
|
|
1332
|
+
SidebarProvider,
|
|
1333
|
+
SlackIcon,
|
|
1334
|
+
Spinner,
|
|
1335
|
+
StarIcon,
|
|
1336
|
+
Table,
|
|
1337
|
+
Tabs,
|
|
1338
|
+
TextInput,
|
|
320
1339
|
ThemeProvider,
|
|
1340
|
+
TimePicker,
|
|
1341
|
+
Toggle,
|
|
1342
|
+
TrashIcon,
|
|
1343
|
+
TwitterIcon,
|
|
1344
|
+
UploadIcon,
|
|
1345
|
+
UserIcon,
|
|
1346
|
+
YouTubeIcon,
|
|
321
1347
|
getThemeScript,
|
|
322
1348
|
themeScript,
|
|
323
1349
|
themes,
|
|
1350
|
+
useSidebar,
|
|
324
1351
|
useTheme
|
|
325
1352
|
};
|
|
326
1353
|
//# sourceMappingURL=index.mjs.map
|