@marcoschwartz/lite-ui 0.1.0 → 0.3.1

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.js CHANGED
@@ -21,12 +21,53 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/index.ts
22
22
  var index_exports = {};
23
23
  __export(index_exports, {
24
+ ActionMenu: () => ActionMenu,
25
+ Alert: () => Alert,
26
+ Badge: () => Badge,
27
+ BellIcon: () => BellIcon,
24
28
  Button: () => Button,
29
+ CalendarIcon: () => CalendarIcon,
30
+ CameraIcon: () => CameraIcon,
31
+ Card: () => Card,
32
+ CheckIcon: () => CheckIcon,
33
+ Checkbox: () => Checkbox,
34
+ ChevronDownIcon: () => ChevronDownIcon,
35
+ ChevronRightIcon: () => ChevronRightIcon,
36
+ CloseIcon: () => CloseIcon,
37
+ DatePicker: () => DatePicker,
38
+ DateTimePicker: () => DateTimePicker,
39
+ DownloadIcon: () => DownloadIcon,
40
+ Drawer: () => Drawer,
41
+ EditIcon: () => EditIcon,
42
+ HeartIcon: () => HeartIcon,
43
+ HomeIcon: () => HomeIcon,
44
+ LockIcon: () => LockIcon,
45
+ MailIcon: () => MailIcon,
46
+ MenuIcon: () => MenuIcon,
47
+ Modal: () => Modal,
48
+ Navbar: () => Navbar,
49
+ Pagination: () => Pagination,
50
+ PlusIcon: () => PlusIcon,
51
+ SearchIcon: () => SearchIcon,
25
52
  Select: () => Select,
53
+ SettingsIcon: () => SettingsIcon,
54
+ Sidebar: () => Sidebar,
55
+ SidebarProvider: () => SidebarProvider,
56
+ Spinner: () => Spinner,
57
+ StarIcon: () => StarIcon,
58
+ Table: () => Table,
59
+ Tabs: () => Tabs,
60
+ TextInput: () => TextInput,
26
61
  ThemeProvider: () => ThemeProvider,
62
+ TimePicker: () => TimePicker,
63
+ Toggle: () => Toggle,
64
+ TrashIcon: () => TrashIcon,
65
+ UploadIcon: () => UploadIcon,
66
+ UserIcon: () => UserIcon,
27
67
  getThemeScript: () => getThemeScript,
28
68
  themeScript: () => themeScript,
29
69
  themes: () => themes,
70
+ useSidebar: () => useSidebar,
30
71
  useTheme: () => useTheme
31
72
  });
32
73
  module.exports = __toCommonJS(index_exports);
@@ -194,10 +235,10 @@ var Button = ({
194
235
  }) => {
195
236
  const { theme } = useTheme();
196
237
  const baseStyles = theme.button.base;
197
- const variantStyles = theme.button.variants[variant];
198
- const sizeStyles = theme.button.sizes[size];
238
+ const variantStyles3 = theme.button.variants[variant];
239
+ const sizeStyles2 = theme.button.sizes[size];
199
240
  const disabledStyles = disabled ? theme.button.disabled : "";
200
- const classes = `${baseStyles} ${variantStyles} ${sizeStyles} ${disabledStyles} ${className}`.trim();
241
+ const classes = `${baseStyles} ${variantStyles3} ${sizeStyles2} ${disabledStyles} ${className}`.trim();
201
242
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
202
243
  "button",
203
244
  {
@@ -253,9 +294,9 @@ var Select = ({
253
294
  }
254
295
  };
255
296
  const baseStyles = theme.select.base;
256
- const sizeStyles = theme.select.sizes[size];
297
+ const sizeStyles2 = theme.select.sizes[size];
257
298
  const disabledStyles = disabled ? theme.select.disabled : "";
258
- const buttonClasses = `${baseStyles} ${sizeStyles} ${disabledStyles} ${className}`.trim();
299
+ const buttonClasses = `${baseStyles} ${sizeStyles2} ${disabledStyles} ${className}`.trim();
259
300
  const iconColor = themeName === "minimalistic" ? disabled ? "text-gray-600" : "text-white" : disabled ? "text-gray-400" : "text-gray-500";
260
301
  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";
261
302
  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";
@@ -313,6 +354,818 @@ var Select = ({
313
354
  ] });
314
355
  };
315
356
 
357
+ // src/components/Modal.tsx
358
+ var import_react3 = require("react");
359
+ var import_jsx_runtime4 = require("react/jsx-runtime");
360
+ var sizeClasses = {
361
+ sm: "max-w-md",
362
+ md: "max-w-lg",
363
+ lg: "max-w-2xl",
364
+ xl: "max-w-4xl"
365
+ };
366
+ var Modal = ({
367
+ isOpen,
368
+ onClose,
369
+ title,
370
+ children,
371
+ size = "md",
372
+ showCloseButton = true
373
+ }) => {
374
+ const { theme } = useTheme();
375
+ (0, import_react3.useEffect)(() => {
376
+ const handleEscape = (e) => {
377
+ if (e.key === "Escape" && isOpen) {
378
+ onClose();
379
+ }
380
+ };
381
+ if (isOpen) {
382
+ document.addEventListener("keydown", handleEscape);
383
+ document.body.style.overflow = "hidden";
384
+ }
385
+ return () => {
386
+ document.removeEventListener("keydown", handleEscape);
387
+ document.body.style.overflow = "unset";
388
+ };
389
+ }, [isOpen, onClose]);
390
+ if (!isOpen) return null;
391
+ const sizeClass = sizeClasses[size];
392
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
393
+ "div",
394
+ {
395
+ className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm transition-all duration-200",
396
+ onClick: onClose,
397
+ role: "dialog",
398
+ "aria-modal": "true",
399
+ "aria-labelledby": title ? "modal-title" : void 0,
400
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
401
+ "div",
402
+ {
403
+ className: `relative w-full ${sizeClass} bg-white dark:bg-gray-800 rounded-lg shadow-2xl transform transition-all duration-200 scale-100 animate-in`,
404
+ onClick: (e) => e.stopPropagation(),
405
+ children: [
406
+ (title || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700", children: [
407
+ title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { id: "modal-title", className: "text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
408
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
409
+ "button",
410
+ {
411
+ onClick: onClose,
412
+ className: "ml-auto text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",
413
+ "aria-label": "Close modal",
414
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
415
+ }
416
+ )
417
+ ] }),
418
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "p-6", children })
419
+ ]
420
+ }
421
+ )
422
+ }
423
+ );
424
+ };
425
+
426
+ // src/components/Navbar.tsx
427
+ var import_jsx_runtime5 = require("react/jsx-runtime");
428
+ var Navbar = ({
429
+ logo,
430
+ children,
431
+ className = "",
432
+ sticky = false
433
+ }) => {
434
+ const { theme } = useTheme();
435
+ const baseClasses = sticky ? "sticky top-0 z-40" : "";
436
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("nav", { className: `bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${baseClasses} ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-between items-center h-16", children: [
437
+ logo && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex items-center", children: logo }),
438
+ children && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex items-center gap-6", children })
439
+ ] }) }) });
440
+ };
441
+
442
+ // src/components/Sidebar.tsx
443
+ var import_jsx_runtime6 = require("react/jsx-runtime");
444
+ var widthClasses = {
445
+ sm: "w-48",
446
+ md: "w-64",
447
+ lg: "w-80"
448
+ };
449
+ var Sidebar = ({
450
+ children,
451
+ className = "",
452
+ width = "md",
453
+ position = "left"
454
+ }) => {
455
+ const { theme } = useTheme();
456
+ const widthClass = widthClasses[width];
457
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
458
+ "aside",
459
+ {
460
+ 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}`,
461
+ children
462
+ }
463
+ );
464
+ };
465
+
466
+ // src/components/SidebarProvider.tsx
467
+ var import_react4 = require("react");
468
+ var import_jsx_runtime7 = require("react/jsx-runtime");
469
+ var SidebarContext = (0, import_react4.createContext)(void 0);
470
+ var SidebarProvider = ({
471
+ children,
472
+ defaultOpen = false
473
+ }) => {
474
+ const [isOpen, setIsOpen] = (0, import_react4.useState)(defaultOpen);
475
+ const [isMobile, setIsMobile] = (0, import_react4.useState)(false);
476
+ const open = () => setIsOpen(true);
477
+ const close = () => setIsOpen(false);
478
+ const toggle = () => setIsOpen((prev) => !prev);
479
+ const value = {
480
+ isOpen,
481
+ isMobile,
482
+ open,
483
+ close,
484
+ toggle,
485
+ setIsMobile
486
+ };
487
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SidebarContext.Provider, { value, children });
488
+ };
489
+ var useSidebar = () => {
490
+ const context = (0, import_react4.useContext)(SidebarContext);
491
+ if (!context) {
492
+ throw new Error("useSidebar must be used within a SidebarProvider");
493
+ }
494
+ return context;
495
+ };
496
+
497
+ // src/components/Drawer.tsx
498
+ var import_react5 = require("react");
499
+ var import_jsx_runtime8 = require("react/jsx-runtime");
500
+ var sizeClasses2 = {
501
+ left: {
502
+ sm: "w-64",
503
+ md: "w-80",
504
+ lg: "w-96"
505
+ },
506
+ right: {
507
+ sm: "w-64",
508
+ md: "w-80",
509
+ lg: "w-96"
510
+ },
511
+ top: {
512
+ sm: "h-48",
513
+ md: "h-64",
514
+ lg: "h-80"
515
+ },
516
+ bottom: {
517
+ sm: "h-48",
518
+ md: "h-64",
519
+ lg: "h-80"
520
+ }
521
+ };
522
+ var positionClasses = {
523
+ left: "left-0 top-0 h-full",
524
+ right: "right-0 top-0 h-full",
525
+ top: "top-0 left-0 w-full",
526
+ bottom: "bottom-0 left-0 w-full"
527
+ };
528
+ var slideClasses = {
529
+ left: "transform transition-transform duration-300",
530
+ right: "transform transition-transform duration-300",
531
+ top: "transform transition-transform duration-300",
532
+ bottom: "transform transition-transform duration-300"
533
+ };
534
+ var Drawer = ({
535
+ isOpen,
536
+ onClose,
537
+ title,
538
+ children,
539
+ position = "right",
540
+ size = "md",
541
+ showCloseButton = true
542
+ }) => {
543
+ const { theme } = useTheme();
544
+ (0, import_react5.useEffect)(() => {
545
+ const handleEscape = (e) => {
546
+ if (e.key === "Escape" && isOpen) {
547
+ onClose();
548
+ }
549
+ };
550
+ if (isOpen) {
551
+ document.addEventListener("keydown", handleEscape);
552
+ document.body.style.overflow = "hidden";
553
+ }
554
+ return () => {
555
+ document.removeEventListener("keydown", handleEscape);
556
+ document.body.style.overflow = "unset";
557
+ };
558
+ }, [isOpen, onClose]);
559
+ if (!isOpen) return null;
560
+ const sizeClass = sizeClasses2[position][size];
561
+ const positionClass = positionClasses[position];
562
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
563
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
564
+ "div",
565
+ {
566
+ className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm transition-all duration-200",
567
+ onClick: onClose
568
+ }
569
+ ),
570
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
571
+ "div",
572
+ {
573
+ className: `fixed z-50 ${positionClass} ${sizeClass} bg-white dark:bg-gray-800 shadow-2xl overflow-hidden flex flex-col ${slideClasses[position]}`,
574
+ children: [
575
+ (title || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700", children: [
576
+ title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
577
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
578
+ "button",
579
+ {
580
+ onClick: onClose,
581
+ className: "ml-auto text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",
582
+ "aria-label": "Close drawer",
583
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
584
+ }
585
+ )
586
+ ] }),
587
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-1 p-6 overflow-y-auto", children })
588
+ ]
589
+ }
590
+ )
591
+ ] });
592
+ };
593
+
594
+ // src/components/TextInput.tsx
595
+ var import_react6 = require("react");
596
+ var import_jsx_runtime9 = require("react/jsx-runtime");
597
+ var sizeClasses3 = {
598
+ sm: "px-3 py-1.5 text-sm",
599
+ md: "px-4 py-2.5 text-base",
600
+ lg: "px-4 py-3 text-lg"
601
+ };
602
+ var TextInput = (0, import_react6.forwardRef)(
603
+ ({
604
+ label,
605
+ error,
606
+ helperText,
607
+ size = "md",
608
+ fullWidth = false,
609
+ leftIcon,
610
+ rightIcon,
611
+ className = "",
612
+ disabled,
613
+ ...props
614
+ }, ref) => {
615
+ const { theme, themeName } = useTheme();
616
+ 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";
617
+ const sizeStyle = sizeClasses3[size];
618
+ const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
619
+ const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
620
+ const widthStyle = fullWidth ? "w-full" : "";
621
+ const paddingWithIcon = leftIcon ? "pl-10" : rightIcon ? "pr-10" : "";
622
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: `${widthStyle} ${className}`, children: [
623
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
624
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
625
+ leftIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: leftIcon }),
626
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
627
+ "input",
628
+ {
629
+ ref,
630
+ className: `${baseStyles} ${sizeStyle} ${errorStyles} ${disabledStyles} ${paddingWithIcon}`.trim(),
631
+ disabled,
632
+ ...props
633
+ }
634
+ ),
635
+ rightIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: rightIcon })
636
+ ] }),
637
+ error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
638
+ helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
639
+ ] });
640
+ }
641
+ );
642
+ TextInput.displayName = "TextInput";
643
+
644
+ // src/components/ActionMenu.tsx
645
+ var import_react7 = require("react");
646
+ var import_jsx_runtime10 = require("react/jsx-runtime");
647
+ var ActionMenu = ({
648
+ items,
649
+ trigger,
650
+ position = "right"
651
+ }) => {
652
+ const { themeName } = useTheme();
653
+ const [isOpen, setIsOpen] = (0, import_react7.useState)(false);
654
+ const menuRef = (0, import_react7.useRef)(null);
655
+ (0, import_react7.useEffect)(() => {
656
+ const handleClickOutside = (event) => {
657
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
658
+ setIsOpen(false);
659
+ }
660
+ };
661
+ if (isOpen) {
662
+ document.addEventListener("mousedown", handleClickOutside);
663
+ return () => document.removeEventListener("mousedown", handleClickOutside);
664
+ }
665
+ }, [isOpen]);
666
+ const handleItemClick = (item) => {
667
+ if (!item.disabled) {
668
+ item.onClick();
669
+ setIsOpen(false);
670
+ }
671
+ };
672
+ const defaultTrigger = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
673
+ "button",
674
+ {
675
+ className: "p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",
676
+ "aria-label": "Open menu",
677
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { className: "w-5 h-5 text-gray-600 dark:text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("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" }) })
678
+ }
679
+ );
680
+ 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";
681
+ 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";
682
+ const positionClass = position === "left" ? "left-0" : "right-0";
683
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative inline-block", ref: menuRef, children: [
684
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { onClick: () => setIsOpen(!isOpen), children: trigger || defaultTrigger }),
685
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
686
+ "div",
687
+ {
688
+ className: `absolute ${positionClass} mt-2 w-56 rounded-lg ${menuBaseStyles} z-50 overflow-hidden`,
689
+ style: { minWidth: "14rem" },
690
+ children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
691
+ "button",
692
+ {
693
+ onClick: () => handleItemClick(item),
694
+ disabled: item.disabled,
695
+ 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" : ""}`,
696
+ children: [
697
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-shrink-0", children: item.icon }),
698
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1", children: item.label })
699
+ ]
700
+ },
701
+ index
702
+ ))
703
+ }
704
+ )
705
+ ] });
706
+ };
707
+
708
+ // src/components/Card.tsx
709
+ var import_jsx_runtime11 = require("react/jsx-runtime");
710
+ var paddingClasses = {
711
+ none: "",
712
+ sm: "p-4",
713
+ md: "p-6",
714
+ lg: "p-8"
715
+ };
716
+ var Card = ({
717
+ children,
718
+ className = "",
719
+ padding = "md",
720
+ hover = false
721
+ }) => {
722
+ const { theme } = useTheme();
723
+ const paddingClass = paddingClasses[padding];
724
+ const hoverClass = hover ? "hover:shadow-lg transition-shadow duration-200" : "";
725
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
726
+ "div",
727
+ {
728
+ className: `bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 ${paddingClass} ${hoverClass} ${className}`,
729
+ children
730
+ }
731
+ );
732
+ };
733
+
734
+ // src/components/Alert.tsx
735
+ var import_jsx_runtime12 = require("react/jsx-runtime");
736
+ var variantStyles = {
737
+ info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-100",
738
+ success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-900 dark:text-green-100",
739
+ warning: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-900 dark:text-yellow-100",
740
+ error: "bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-900 dark:text-red-100"
741
+ };
742
+ var iconStyles = {
743
+ info: "text-blue-600 dark:text-blue-400",
744
+ success: "text-green-600 dark:text-green-400",
745
+ warning: "text-yellow-600 dark:text-yellow-400",
746
+ error: "text-red-600 dark:text-red-400"
747
+ };
748
+ var Alert = ({
749
+ variant = "info",
750
+ title,
751
+ children,
752
+ onClose,
753
+ className = ""
754
+ }) => {
755
+ const { theme } = useTheme();
756
+ const variantClass = variantStyles[variant];
757
+ const iconClass = iconStyles[variant];
758
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: `rounded-lg border p-4 ${variantClass} ${className}`, role: "alert", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start gap-3", children: [
759
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `flex-shrink-0 ${iconClass}`, children: [
760
+ variant === "info" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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" }) }),
761
+ variant === "success" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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" }) }),
762
+ variant === "warning" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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" }) }),
763
+ variant === "error" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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" }) })
764
+ ] }),
765
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-1", children: [
766
+ title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "font-semibold mb-1", children: title }),
767
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "text-sm", children })
768
+ ] }),
769
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
770
+ "button",
771
+ {
772
+ onClick: onClose,
773
+ className: `flex-shrink-0 ${iconClass} hover:opacity-70 transition-opacity`,
774
+ "aria-label": "Close alert",
775
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
776
+ }
777
+ )
778
+ ] }) });
779
+ };
780
+
781
+ // src/components/Checkbox.tsx
782
+ var import_react8 = require("react");
783
+ var import_jsx_runtime13 = require("react/jsx-runtime");
784
+ var Checkbox = (0, import_react8.forwardRef)(
785
+ ({ label, error, className = "", disabled, ...props }, ref) => {
786
+ const { theme } = useTheme();
787
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className, children: [
788
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer group", children: [
789
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
790
+ "input",
791
+ {
792
+ ref,
793
+ type: "checkbox",
794
+ disabled,
795
+ 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" : ""}`,
796
+ ...props
797
+ }
798
+ ),
799
+ label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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 })
800
+ ] }),
801
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error })
802
+ ] });
803
+ }
804
+ );
805
+ Checkbox.displayName = "Checkbox";
806
+
807
+ // src/components/Toggle.tsx
808
+ var import_react9 = require("react");
809
+ var import_jsx_runtime14 = require("react/jsx-runtime");
810
+ var Toggle = (0, import_react9.forwardRef)(
811
+ ({ label, size = "md", className = "", disabled, checked, ...props }, ref) => {
812
+ const { theme } = useTheme();
813
+ const toggleClasses = {
814
+ sm: {
815
+ switch: "w-9 h-5",
816
+ thumb: "w-4 h-4 peer-checked:translate-x-4"
817
+ },
818
+ md: {
819
+ switch: "w-11 h-6",
820
+ thumb: "w-5 h-5 peer-checked:translate-x-5"
821
+ },
822
+ lg: {
823
+ switch: "w-14 h-7",
824
+ thumb: "w-6 h-6 peer-checked:translate-x-7"
825
+ }
826
+ };
827
+ const currentSize = toggleClasses[size];
828
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: `inline-flex items-center gap-3 cursor-pointer ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${className}`, children: [
829
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative", children: [
830
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
831
+ "input",
832
+ {
833
+ ref,
834
+ type: "checkbox",
835
+ className: "sr-only peer",
836
+ disabled,
837
+ checked,
838
+ ...props
839
+ }
840
+ ),
841
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
842
+ "div",
843
+ {
844
+ 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`
845
+ }
846
+ ),
847
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
848
+ "div",
849
+ {
850
+ className: `${currentSize.thumb} bg-white rounded-full shadow-md absolute top-0.5 left-0.5 transition-transform`
851
+ }
852
+ )
853
+ ] }),
854
+ label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: label })
855
+ ] });
856
+ }
857
+ );
858
+ Toggle.displayName = "Toggle";
859
+
860
+ // src/components/Badge.tsx
861
+ var import_jsx_runtime15 = require("react/jsx-runtime");
862
+ var variantStyles2 = {
863
+ default: "bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",
864
+ primary: "bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200",
865
+ success: "bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200",
866
+ warning: "bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200",
867
+ error: "bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200",
868
+ info: "bg-cyan-100 dark:bg-cyan-900/30 text-cyan-800 dark:text-cyan-200"
869
+ };
870
+ var sizeStyles = {
871
+ sm: "px-2 py-0.5 text-xs",
872
+ md: "px-2.5 py-1 text-sm",
873
+ lg: "px-3 py-1.5 text-base"
874
+ };
875
+ var Badge = ({
876
+ children,
877
+ variant = "default",
878
+ size = "md",
879
+ className = ""
880
+ }) => {
881
+ const { theme } = useTheme();
882
+ const variantClass = variantStyles2[variant];
883
+ const sizeClass = sizeStyles[size];
884
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `inline-flex items-center font-medium rounded-full ${variantClass} ${sizeClass} ${className}`, children });
885
+ };
886
+
887
+ // src/components/Spinner.tsx
888
+ var import_jsx_runtime16 = require("react/jsx-runtime");
889
+ var sizeClasses4 = {
890
+ sm: "w-4 h-4 border-2",
891
+ md: "w-8 h-8 border-2",
892
+ lg: "w-12 h-12 border-3",
893
+ xl: "w-16 h-16 border-4"
894
+ };
895
+ var colorClasses = {
896
+ primary: "border-blue-600 border-t-transparent",
897
+ secondary: "border-gray-600 border-t-transparent",
898
+ white: "border-white border-t-transparent"
899
+ };
900
+ var Spinner = ({
901
+ size = "md",
902
+ color = "primary",
903
+ className = ""
904
+ }) => {
905
+ const { theme } = useTheme();
906
+ const sizeClass = sizeClasses4[size];
907
+ const colorClass = colorClasses[color];
908
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
909
+ "div",
910
+ {
911
+ className: `inline-block rounded-full animate-spin ${sizeClass} ${colorClass} ${className}`,
912
+ role: "status",
913
+ "aria-label": "Loading",
914
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "sr-only", children: "Loading..." })
915
+ }
916
+ );
917
+ };
918
+
919
+ // src/components/Tabs.tsx
920
+ var import_react10 = require("react");
921
+ var import_jsx_runtime17 = require("react/jsx-runtime");
922
+ var Tabs = ({
923
+ tabs,
924
+ defaultIndex = 0,
925
+ onChange,
926
+ className = ""
927
+ }) => {
928
+ const { theme } = useTheme();
929
+ const [activeIndex, setActiveIndex] = (0, import_react10.useState)(defaultIndex);
930
+ const handleTabClick = (index) => {
931
+ if (tabs[index].disabled) return;
932
+ setActiveIndex(index);
933
+ onChange?.(index);
934
+ };
935
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className, children: [
936
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "flex gap-8 px-6", "aria-label": "Tabs", children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
937
+ "button",
938
+ {
939
+ onClick: () => handleTabClick(index),
940
+ disabled: tab.disabled,
941
+ 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"}`,
942
+ "aria-current": activeIndex === index ? "page" : void 0,
943
+ children: tab.label
944
+ },
945
+ index
946
+ )) }) }),
947
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: tabs[activeIndex]?.content })
948
+ ] });
949
+ };
950
+
951
+ // src/components/Table.tsx
952
+ var import_jsx_runtime18 = require("react/jsx-runtime");
953
+ function Table({
954
+ columns,
955
+ data,
956
+ keyField = "id",
957
+ striped = false,
958
+ hoverable = true,
959
+ className = ""
960
+ }) {
961
+ const { theme } = useTheme();
962
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `overflow-x-auto ${className}`, children: [
963
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("table", { className: "w-full text-left", children: [
964
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { className: "bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
965
+ "th",
966
+ {
967
+ className: "px-6 py-3 text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",
968
+ style: { width: column.width },
969
+ children: column.title
970
+ },
971
+ column.key
972
+ )) }) }),
973
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { className: "bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700", children: data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
974
+ "tr",
975
+ {
976
+ className: `
977
+ ${striped && rowIndex % 2 === 1 ? "bg-gray-50 dark:bg-gray-800/50" : ""}
978
+ ${hoverable ? "hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors" : ""}
979
+ `,
980
+ children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
981
+ "td",
982
+ {
983
+ className: "px-6 py-4 text-sm text-gray-900 dark:text-gray-100",
984
+ children: column.render ? column.render(row[column.key], row, rowIndex) : row[column.key]
985
+ },
986
+ column.key
987
+ ))
988
+ },
989
+ row[keyField] || rowIndex
990
+ )) })
991
+ ] }),
992
+ data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-center py-8 text-gray-500 dark:text-gray-400", children: "No data available" })
993
+ ] });
994
+ }
995
+
996
+ // src/components/Pagination.tsx
997
+ var import_jsx_runtime19 = require("react/jsx-runtime");
998
+ var Pagination = ({
999
+ currentPage,
1000
+ totalPages,
1001
+ onPageChange,
1002
+ siblingCount = 1,
1003
+ className = ""
1004
+ }) => {
1005
+ const { theme } = useTheme();
1006
+ const range = (start, end) => {
1007
+ const length = end - start + 1;
1008
+ return Array.from({ length }, (_, idx) => idx + start);
1009
+ };
1010
+ const paginationRange = () => {
1011
+ const totalPageNumbers = siblingCount + 5;
1012
+ if (totalPageNumbers >= totalPages) {
1013
+ return range(1, totalPages);
1014
+ }
1015
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
1016
+ const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
1017
+ const shouldShowLeftDots = leftSiblingIndex > 2;
1018
+ const shouldShowRightDots = rightSiblingIndex < totalPages - 2;
1019
+ const firstPageIndex = 1;
1020
+ const lastPageIndex = totalPages;
1021
+ if (!shouldShowLeftDots && shouldShowRightDots) {
1022
+ const leftItemCount = 3 + 2 * siblingCount;
1023
+ const leftRange = range(1, leftItemCount);
1024
+ return [...leftRange, "...", totalPages];
1025
+ }
1026
+ if (shouldShowLeftDots && !shouldShowRightDots) {
1027
+ const rightItemCount = 3 + 2 * siblingCount;
1028
+ const rightRange = range(totalPages - rightItemCount + 1, totalPages);
1029
+ return [firstPageIndex, "...", ...rightRange];
1030
+ }
1031
+ if (shouldShowLeftDots && shouldShowRightDots) {
1032
+ const middleRange = range(leftSiblingIndex, rightSiblingIndex);
1033
+ return [firstPageIndex, "...", ...middleRange, "...", lastPageIndex];
1034
+ }
1035
+ return range(1, totalPages);
1036
+ };
1037
+ const pages = paginationRange();
1038
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: `flex items-center gap-1 ${className}`, "aria-label": "Pagination", children: [
1039
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1040
+ "button",
1041
+ {
1042
+ onClick: () => onPageChange(currentPage - 1),
1043
+ disabled: currentPage === 1,
1044
+ 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",
1045
+ "aria-label": "Previous page",
1046
+ children: "Previous"
1047
+ }
1048
+ ),
1049
+ pages.map((page, index) => {
1050
+ if (page === "...") {
1051
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1052
+ "span",
1053
+ {
1054
+ className: "px-3 py-2 text-gray-700 dark:text-gray-300",
1055
+ children: "..."
1056
+ },
1057
+ `dots-${index}`
1058
+ );
1059
+ }
1060
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1061
+ "button",
1062
+ {
1063
+ onClick: () => onPageChange(page),
1064
+ 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"}`,
1065
+ "aria-label": `Page ${page}`,
1066
+ "aria-current": currentPage === page ? "page" : void 0,
1067
+ children: page
1068
+ },
1069
+ page
1070
+ );
1071
+ }),
1072
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1073
+ "button",
1074
+ {
1075
+ onClick: () => onPageChange(currentPage + 1),
1076
+ disabled: currentPage === totalPages,
1077
+ 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",
1078
+ "aria-label": "Next page",
1079
+ children: "Next"
1080
+ }
1081
+ )
1082
+ ] });
1083
+ };
1084
+
1085
+ // src/components/DatePicker.tsx
1086
+ var import_react11 = require("react");
1087
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1088
+ var DatePicker = (0, import_react11.forwardRef)(
1089
+ ({ label, error, helperText, className = "", disabled, ...props }, ref) => {
1090
+ const { theme } = useTheme();
1091
+ 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";
1092
+ const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
1093
+ const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
1094
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className, children: [
1095
+ label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
1096
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1097
+ "input",
1098
+ {
1099
+ ref,
1100
+ type: "date",
1101
+ disabled,
1102
+ className: `${baseStyles} ${errorStyles} ${disabledStyles}`.trim(),
1103
+ ...props
1104
+ }
1105
+ ),
1106
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
1107
+ helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
1108
+ ] });
1109
+ }
1110
+ );
1111
+ DatePicker.displayName = "DatePicker";
1112
+
1113
+ // src/components/TimePicker.tsx
1114
+ var import_react12 = require("react");
1115
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1116
+ var TimePicker = (0, import_react12.forwardRef)(
1117
+ ({ label, error, helperText, className = "", disabled, ...props }, ref) => {
1118
+ const { theme } = useTheme();
1119
+ 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";
1120
+ const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
1121
+ const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
1122
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className, children: [
1123
+ label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
1124
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1125
+ "input",
1126
+ {
1127
+ ref,
1128
+ type: "time",
1129
+ disabled,
1130
+ className: `${baseStyles} ${errorStyles} ${disabledStyles}`.trim(),
1131
+ ...props
1132
+ }
1133
+ ),
1134
+ error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
1135
+ helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
1136
+ ] });
1137
+ }
1138
+ );
1139
+ TimePicker.displayName = "TimePicker";
1140
+
1141
+ // src/components/DateTimePicker.tsx
1142
+ var import_react13 = require("react");
1143
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1144
+ var DateTimePicker = (0, import_react13.forwardRef)(
1145
+ ({ label, error, helperText, className = "", disabled, ...props }, ref) => {
1146
+ const { theme } = useTheme();
1147
+ 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";
1148
+ const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
1149
+ const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
1150
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className, children: [
1151
+ label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
1152
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1153
+ "input",
1154
+ {
1155
+ ref,
1156
+ type: "datetime-local",
1157
+ disabled,
1158
+ className: `${baseStyles} ${errorStyles} ${disabledStyles}`.trim(),
1159
+ ...props
1160
+ }
1161
+ ),
1162
+ error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
1163
+ helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
1164
+ ] });
1165
+ }
1166
+ );
1167
+ DateTimePicker.displayName = "DateTimePicker";
1168
+
316
1169
  // src/utils/theme-script.ts
317
1170
  var themeScript = `
318
1171
  (function() {
@@ -345,14 +1198,173 @@ var themeScript = `
345
1198
  function getThemeScript() {
346
1199
  return themeScript;
347
1200
  }
1201
+
1202
+ // src/icons/Icon.tsx
1203
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1204
+ var sizeClasses5 = {
1205
+ xs: "w-3 h-3",
1206
+ sm: "w-4 h-4",
1207
+ md: "w-5 h-5",
1208
+ lg: "w-6 h-6",
1209
+ xl: "w-8 h-8"
1210
+ };
1211
+ var createIcon = (displayName, path) => {
1212
+ const Icon = ({ size = "md", className = "", color = "currentColor" }) => {
1213
+ const sizeClass = sizeClasses5[size];
1214
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1215
+ "svg",
1216
+ {
1217
+ className: `${sizeClass} ${className}`,
1218
+ fill: "none",
1219
+ viewBox: "0 0 24 24",
1220
+ stroke: color,
1221
+ "aria-hidden": "true",
1222
+ children: path
1223
+ }
1224
+ );
1225
+ };
1226
+ Icon.displayName = displayName;
1227
+ return Icon;
1228
+ };
1229
+ var HomeIcon = createIcon(
1230
+ "HomeIcon",
1231
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1232
+ );
1233
+ var UserIcon = createIcon(
1234
+ "UserIcon",
1235
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1236
+ );
1237
+ var SearchIcon = createIcon(
1238
+ "SearchIcon",
1239
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" })
1240
+ );
1241
+ var BellIcon = createIcon(
1242
+ "BellIcon",
1243
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1244
+ );
1245
+ var SettingsIcon = createIcon(
1246
+ "SettingsIcon",
1247
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1248
+ /* @__PURE__ */ (0, import_jsx_runtime23.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" }),
1249
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
1250
+ ] })
1251
+ );
1252
+ var MenuIcon = createIcon(
1253
+ "MenuIcon",
1254
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })
1255
+ );
1256
+ var CloseIcon = createIcon(
1257
+ "CloseIcon",
1258
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
1259
+ );
1260
+ var ChevronDownIcon = createIcon(
1261
+ "ChevronDownIcon",
1262
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
1263
+ );
1264
+ var ChevronRightIcon = createIcon(
1265
+ "ChevronRightIcon",
1266
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
1267
+ );
1268
+ var CheckIcon = createIcon(
1269
+ "CheckIcon",
1270
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" })
1271
+ );
1272
+ var PlusIcon = createIcon(
1273
+ "PlusIcon",
1274
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" })
1275
+ );
1276
+ var TrashIcon = createIcon(
1277
+ "TrashIcon",
1278
+ /* @__PURE__ */ (0, import_jsx_runtime23.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" })
1279
+ );
1280
+ var EditIcon = createIcon(
1281
+ "EditIcon",
1282
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1283
+ );
1284
+ var MailIcon = createIcon(
1285
+ "MailIcon",
1286
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1287
+ );
1288
+ var StarIcon = createIcon(
1289
+ "StarIcon",
1290
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1291
+ );
1292
+ var HeartIcon = createIcon(
1293
+ "HeartIcon",
1294
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1295
+ );
1296
+ var DownloadIcon = createIcon(
1297
+ "DownloadIcon",
1298
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1299
+ );
1300
+ var UploadIcon = createIcon(
1301
+ "UploadIcon",
1302
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1303
+ );
1304
+ var CameraIcon = createIcon(
1305
+ "CameraIcon",
1306
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1307
+ /* @__PURE__ */ (0, import_jsx_runtime23.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" }),
1308
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z" })
1309
+ ] })
1310
+ );
1311
+ var LockIcon = createIcon(
1312
+ "LockIcon",
1313
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
1314
+ );
1315
+ var CalendarIcon = createIcon(
1316
+ "CalendarIcon",
1317
+ /* @__PURE__ */ (0, import_jsx_runtime23.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" })
1318
+ );
348
1319
  // Annotate the CommonJS export names for ESM import in node:
349
1320
  0 && (module.exports = {
1321
+ ActionMenu,
1322
+ Alert,
1323
+ Badge,
1324
+ BellIcon,
350
1325
  Button,
1326
+ CalendarIcon,
1327
+ CameraIcon,
1328
+ Card,
1329
+ CheckIcon,
1330
+ Checkbox,
1331
+ ChevronDownIcon,
1332
+ ChevronRightIcon,
1333
+ CloseIcon,
1334
+ DatePicker,
1335
+ DateTimePicker,
1336
+ DownloadIcon,
1337
+ Drawer,
1338
+ EditIcon,
1339
+ HeartIcon,
1340
+ HomeIcon,
1341
+ LockIcon,
1342
+ MailIcon,
1343
+ MenuIcon,
1344
+ Modal,
1345
+ Navbar,
1346
+ Pagination,
1347
+ PlusIcon,
1348
+ SearchIcon,
351
1349
  Select,
1350
+ SettingsIcon,
1351
+ Sidebar,
1352
+ SidebarProvider,
1353
+ Spinner,
1354
+ StarIcon,
1355
+ Table,
1356
+ Tabs,
1357
+ TextInput,
352
1358
  ThemeProvider,
1359
+ TimePicker,
1360
+ Toggle,
1361
+ TrashIcon,
1362
+ UploadIcon,
1363
+ UserIcon,
353
1364
  getThemeScript,
354
1365
  themeScript,
355
1366
  themes,
1367
+ useSidebar,
356
1368
  useTheme
357
1369
  });
358
1370
  //# sourceMappingURL=index.js.map