@gamecp/ui 0.1.0 → 0.1.14

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
@@ -1,22 +1,78 @@
1
1
  'use strict';
2
2
 
3
- var React4 = require('react');
4
3
  var jsxRuntime = require('react/jsx-runtime');
4
+ var React4 = require('react');
5
5
  var ri = require('react-icons/ri');
6
- var NextLink = require('next/link');
7
6
  var reactDom = require('react-dom');
8
7
  var framerMotion = require('framer-motion');
8
+ var NextLink = require('next/link');
9
+ var reactTooltip = require('react-tooltip');
10
+ var nextIntlayer = require('next-intlayer');
9
11
 
10
12
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
13
 
12
14
  var React4__default = /*#__PURE__*/_interopDefault(React4);
13
15
  var NextLink__default = /*#__PURE__*/_interopDefault(NextLink);
14
16
 
15
- // src/Button.tsx
17
+ // src/Badge.tsx
18
+ var badgeVariants = {
19
+ default: "bg-gray-100 text-foreground border-border",
20
+ primary: "bg-primary-100 text-primary-800 border-primary-200",
21
+ secondary: "bg-gray-100 text-foreground border-border",
22
+ success: "bg-success text-success-dark border-success-light",
23
+ warning: "bg-yellow-100 text-yellow-800 border-yellow-200",
24
+ error: "bg-red-100 text-red-800 border-red-200",
25
+ info: "bg-muted text-muted-foreground border-ring",
26
+ gray: "bg-gray-100 text-foreground border-border",
27
+ purple: "bg-purple-100 text-purple-800 border-purple-200",
28
+ pink: "bg-pink-100 text-pink-800 border-pink-200",
29
+ indigo: "bg-indigo-100 text-indigo-800 border-indigo-200",
30
+ yellow: "bg-yellow-100 text-yellow-800 border-yellow-200",
31
+ orange: "bg-orange-100 text-orange-800 border-orange-200",
32
+ teal: "bg-teal-100 text-teal-800 border-teal-200",
33
+ cyan: "bg-cyan-100 text-cyan-800 border-cyan-200",
34
+ lime: "bg-lime-100 text-lime-800 border-lime-200",
35
+ emerald: "bg-emerald-100 text-emerald-800 border-emerald-200",
36
+ rose: "bg-rose-100 text-rose-800 border-rose-200",
37
+ sky: "bg-sky-100 text-sky-800 border-sky-200",
38
+ violet: "bg-violet-100 text-violet-800 border-violet-200",
39
+ fuchsia: "bg-fuchsia-100 text-fuchsia-800 border-fuchsia-200",
40
+ amber: "bg-amber-100 text-amber-800 border-amber-200"
41
+ };
42
+ var badgeSizes = {
43
+ sm: "px-2 py-0.5 text-xs",
44
+ md: "px-2.5 py-0.5 text-xs",
45
+ lg: "px-3 py-1 text-sm"
46
+ };
47
+ function Badge({
48
+ children,
49
+ variant = "default",
50
+ size = "md",
51
+ className = "",
52
+ customColors
53
+ }) {
54
+ const baseClasses = "inline-flex items-center font-medium rounded-full border";
55
+ const variantClasses5 = variant === "custom" ? "" : badgeVariants[variant];
56
+ const sizeClasses5 = badgeSizes[size];
57
+ const customStyles = variant === "custom" && customColors ? {
58
+ backgroundColor: customColors.background,
59
+ color: customColors.text,
60
+ borderColor: customColors.border || customColors.background
61
+ } : {};
62
+ return /* @__PURE__ */ jsxRuntime.jsx(
63
+ "span",
64
+ {
65
+ className: `${baseClasses} ${variantClasses5} ${sizeClasses5} ${className}`,
66
+ style: customStyles,
67
+ children
68
+ }
69
+ );
70
+ }
16
71
  var variantClasses = {
17
72
  primary: "bg-primary text-primary-foreground hover:bg-primary/90 border-transparent",
18
73
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
19
74
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 border-transparent",
75
+ danger: "bg-red-600 text-white hover:bg-red-700 border-transparent",
20
76
  ghost: "bg-transparent hover:bg-muted hover:text-foreground border-transparent",
21
77
  link: "bg-transparent text-primary underline-offset-4 hover:underline border-transparent p-0",
22
78
  outline: "bg-transparent border-border hover:bg-muted hover:text-foreground"
@@ -95,73 +151,6 @@ var Button = React4.forwardRef(
95
151
  );
96
152
  Button.displayName = "Button";
97
153
  var Button_default = Button;
98
- var badgeVariants = {
99
- default: "bg-gray-100 text-foreground border-border",
100
- primary: "bg-primary-100 text-primary-800 border-primary-200",
101
- secondary: "bg-gray-100 text-foreground border-border",
102
- success: "bg-success text-success-dark border-success-light",
103
- warning: "bg-yellow-100 text-yellow-800 border-yellow-200",
104
- error: "bg-red-100 text-red-800 border-red-200",
105
- info: "bg-muted text-muted-foreground border-ring",
106
- gray: "bg-gray-100 text-foreground border-border",
107
- purple: "bg-purple-100 text-purple-800 border-purple-200",
108
- pink: "bg-pink-100 text-pink-800 border-pink-200",
109
- indigo: "bg-indigo-100 text-indigo-800 border-indigo-200",
110
- yellow: "bg-yellow-100 text-yellow-800 border-yellow-200",
111
- orange: "bg-orange-100 text-orange-800 border-orange-200",
112
- teal: "bg-teal-100 text-teal-800 border-teal-200",
113
- cyan: "bg-cyan-100 text-cyan-800 border-cyan-200",
114
- lime: "bg-lime-100 text-lime-800 border-lime-200",
115
- emerald: "bg-emerald-100 text-emerald-800 border-emerald-200",
116
- rose: "bg-rose-100 text-rose-800 border-rose-200",
117
- sky: "bg-sky-100 text-sky-800 border-sky-200",
118
- violet: "bg-violet-100 text-violet-800 border-violet-200",
119
- fuchsia: "bg-fuchsia-100 text-fuchsia-800 border-fuchsia-200",
120
- amber: "bg-amber-100 text-amber-800 border-amber-200"
121
- };
122
- var badgeSizes = {
123
- sm: "px-2 py-0.5 text-xs",
124
- md: "px-2.5 py-0.5 text-xs",
125
- lg: "px-3 py-1 text-sm"
126
- };
127
- function Badge({
128
- children,
129
- variant = "default",
130
- size = "md",
131
- className = "",
132
- customColors
133
- }) {
134
- const baseClasses = "inline-flex items-center font-medium rounded-full border";
135
- const variantClasses4 = variant === "custom" ? "" : badgeVariants[variant];
136
- const sizeClasses4 = badgeSizes[size];
137
- const customStyles = variant === "custom" && customColors ? {
138
- backgroundColor: customColors.background,
139
- color: customColors.text,
140
- borderColor: customColors.border || customColors.background
141
- } : {};
142
- return /* @__PURE__ */ jsxRuntime.jsx(
143
- "span",
144
- {
145
- className: `${baseClasses} ${variantClasses4} ${sizeClasses4} ${className}`,
146
- style: customStyles,
147
- children
148
- }
149
- );
150
- }
151
- var SuccessBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: "success" });
152
- var WarningBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: "warning" });
153
- var ErrorBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: "error" });
154
- var InfoBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: "info" });
155
- var PrimaryBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: "primary" });
156
- var GrayBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: "gray" });
157
- function StatusBadge({
158
- isActive,
159
- activeText = "Active",
160
- inactiveText = "Inactive",
161
- ...props
162
- }) {
163
- return /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...props, variant: isActive ? "success" : "error", children: isActive ? activeText : inactiveText });
164
- }
165
154
  var sizeClasses2 = {
166
155
  xs: "w-3 h-3",
167
156
  sm: "w-4 h-4",
@@ -267,7 +256,8 @@ function Card({
267
256
  contentClassName = "",
268
257
  status,
269
258
  statusIcon,
270
- statusText
259
+ statusText,
260
+ id
271
261
  }) {
272
262
  const [isExpanded, setIsExpanded] = React4.useState(defaultExpanded);
273
263
  const baseClasses = [
@@ -297,6 +287,7 @@ function Card({
297
287
  return /* @__PURE__ */ jsxRuntime.jsxs(
298
288
  "div",
299
289
  {
290
+ id,
300
291
  className: `${baseClasses} ${className}`,
301
292
  style,
302
293
  onClick: clickable || onClick ? handleClick : void 0,
@@ -350,957 +341,3258 @@ function Card({
350
341
  }
351
342
  );
352
343
  }
353
- function SimpleCard({
344
+ var sizeClasses3 = {
345
+ sm: "max-w-md",
346
+ md: "max-w-2xl",
347
+ lg: "max-w-4xl",
348
+ xl: "max-w-6xl",
349
+ full: "max-w-full mx-4"
350
+ };
351
+ function Modal({
352
+ isOpen,
353
+ onClose,
354
354
  children,
355
- className = "",
356
- ...props
357
- }) {
358
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { className, ...props, children });
359
- }
360
- function HeaderCard({
361
355
  title,
362
- subtitle,
363
- description,
364
- icon,
365
- iconColor,
366
- iconSize,
367
- actionButton,
368
- children,
356
+ header,
357
+ blocking = false,
358
+ size = "md",
369
359
  className = "",
370
- ...props
360
+ footer,
361
+ fullScreen = false,
362
+ noPadding = false,
363
+ footerBg = "gray",
364
+ variant = "default",
365
+ scrollable = true,
366
+ "aria-describedby": ariaDescribedBy,
367
+ customStyles = {}
371
368
  }) {
372
- return /* @__PURE__ */ jsxRuntime.jsx(
373
- Card,
374
- {
375
- title,
376
- subtitle,
377
- description,
378
- icon,
379
- iconColor,
380
- iconSize,
381
- actionButton,
382
- className,
383
- ...props,
384
- children
369
+ const modalContentRef = React4.useRef(null);
370
+ const previousActiveElementRef = React4.useRef(null);
371
+ const hasPerformedInitialFocusRef = React4.useRef(false);
372
+ const getFocusableElements = () => {
373
+ if (!modalContentRef.current) return [];
374
+ const focusableSelectors = [
375
+ "button:not([disabled])",
376
+ "a[href]",
377
+ "input:not([disabled])",
378
+ "select:not([disabled])",
379
+ "textarea:not([disabled])",
380
+ '[tabindex]:not([tabindex="-1"])'
381
+ ].join(", ");
382
+ return Array.from(
383
+ modalContentRef.current.querySelectorAll(focusableSelectors)
384
+ );
385
+ };
386
+ React4.useEffect(() => {
387
+ if (!isOpen) {
388
+ hasPerformedInitialFocusRef.current = false;
389
+ return;
385
390
  }
386
- );
387
- }
388
- function StatusCard({
389
- status,
390
- statusIcon,
391
- statusText,
392
- children,
393
- className = "",
394
- ...props
395
- }) {
396
- return /* @__PURE__ */ jsxRuntime.jsx(
397
- Card,
398
- {
399
- status,
400
- statusIcon,
401
- statusText,
402
- className,
403
- ...props,
404
- children
391
+ if (!hasPerformedInitialFocusRef.current) {
392
+ previousActiveElementRef.current = document.activeElement;
405
393
  }
406
- );
407
- }
408
- function ClickableCard({
409
- onClick,
410
- children,
411
- className = "",
412
- ...props
413
- }) {
414
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { onClick, clickable: true, hover: true, className, ...props, children });
415
- }
416
- function AccordionCard({
417
- accordion = true,
418
- children,
419
- className = "",
420
- ...props
421
- }) {
422
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { accordion, className, ...props, children });
423
- }
424
- var variantClasses3 = {
425
- default: "text-foreground hover:text-primary",
426
- primary: "text-primary hover:text-primary/80",
427
- muted: "text-muted-foreground hover:text-foreground"
428
- };
429
- var Link = React4.forwardRef(
430
- ({
431
- href,
432
- variant = "default",
433
- underline = false,
434
- external = false,
435
- className = "",
436
- children,
437
- ...props
438
- }, ref) => {
439
- const classes = [
440
- "transition-colors",
441
- variantClasses3[variant],
442
- underline ? "underline underline-offset-4" : "hover:underline hover:underline-offset-4",
443
- className
444
- ].filter(Boolean).join(" ");
445
- if (external || href.startsWith("http")) {
446
- return /* @__PURE__ */ jsxRuntime.jsx(
447
- "a",
448
- {
449
- ref,
450
- href,
451
- className: classes,
452
- target: "_blank",
453
- rel: "noopener noreferrer",
454
- ...props,
455
- children
394
+ let timeoutId = null;
395
+ if (!hasPerformedInitialFocusRef.current) {
396
+ const focusableElements = getFocusableElements();
397
+ const firstFocusable = focusableElements[0];
398
+ timeoutId = setTimeout(() => {
399
+ const activeElement = document.activeElement;
400
+ const isHTMLElement = activeElement instanceof HTMLElement;
401
+ const isUserTyping = activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || isHTMLElement && activeElement.isContentEditable);
402
+ const isFocusInModal = modalContentRef.current?.contains(activeElement);
403
+ if (!isUserTyping && !isFocusInModal) {
404
+ if (firstFocusable) {
405
+ firstFocusable.focus();
406
+ hasPerformedInitialFocusRef.current = true;
407
+ } else if (modalContentRef.current) {
408
+ modalContentRef.current.focus();
409
+ hasPerformedInitialFocusRef.current = true;
410
+ }
411
+ } else if (isFocusInModal) {
412
+ hasPerformedInitialFocusRef.current = true;
456
413
  }
457
- );
414
+ }, 100);
458
415
  }
459
- return /* @__PURE__ */ jsxRuntime.jsx(NextLink__default.default, { ref, href, className: classes, ...props, children });
460
- }
461
- );
462
- Link.displayName = "Link";
463
- var Link_default = Link;
464
- function FormInput({
465
- label,
466
- name,
467
- type = "text",
468
- value,
469
- onChange,
470
- placeholder,
471
- required = false,
472
- disabled = false,
473
- error,
474
- className = "",
475
- inputClassName = "",
476
- min,
477
- max,
478
- step,
479
- maxLength,
480
- autoComplete,
481
- description,
482
- footerDescription,
483
- autoFocus = false,
484
- onKeyDown,
485
- onBlur,
486
- icon,
487
- rows = 3,
488
- showHidePassword = false,
489
- onGeneratePassword,
490
- copyable = false,
491
- readOnly = false,
492
- clearable = true
493
- }) {
494
- const [showPassword, setShowPassword] = React4.useState(false);
495
- const [copied, setCopied] = React4.useState(false);
496
- const handleCopy = async () => {
497
- try {
498
- await navigator.clipboard.writeText(String(value));
499
- setCopied(true);
500
- setTimeout(() => setCopied(false), 2e3);
501
- } catch (err) {
502
- console.error("Failed to copy:", err);
503
- }
504
- };
505
- const shouldShowIcons = (inputType) => {
506
- return inputType !== "checkbox" && inputType !== "textarea";
507
- };
508
- const getIconConfig = (iconProp) => {
509
- if (!iconProp) return { left: null, right: null };
510
- if (React4__default.default.isValidElement(iconProp)) {
511
- return { left: iconProp, right: null };
512
- }
513
- if (typeof iconProp === "object" && iconProp !== null && ("left" in iconProp || "right" in iconProp)) {
514
- return { left: iconProp.left || null, right: iconProp.right || null };
515
- }
516
- return {
517
- left: React4__default.default.isValidElement(iconProp) ? iconProp : null,
518
- right: null
416
+ const handleTab = (event) => {
417
+ if (event.key !== "Tab") return;
418
+ const focusableElements = getFocusableElements();
419
+ if (focusableElements.length === 0) return;
420
+ const firstElement = focusableElements[0];
421
+ const lastElement = focusableElements[focusableElements.length - 1];
422
+ if (event.shiftKey) {
423
+ if (document.activeElement === firstElement) {
424
+ event.preventDefault();
425
+ lastElement.focus();
426
+ }
427
+ } else {
428
+ if (document.activeElement === lastElement) {
429
+ event.preventDefault();
430
+ firstElement.focus();
431
+ }
432
+ }
519
433
  };
520
- };
521
- const renderIcon = (iconNode, position) => {
522
- if (!iconNode) return null;
523
- const rightPositionClass = position === "right" && type === "number" ? "right-4 pr-3" : position === "right" ? "right-0 pr-3" : "left-0 pl-3";
524
- return /* @__PURE__ */ jsxRuntime.jsx(
525
- "div",
526
- {
527
- className: `absolute inset-y-0 ${rightPositionClass} flex items-center pointer-events-none`,
528
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: iconNode })
434
+ const handleEsc = (event) => {
435
+ if (event.key === "Escape" && !blocking) {
436
+ onClose();
529
437
  }
530
- );
438
+ };
439
+ document.addEventListener("keydown", handleTab);
440
+ document.addEventListener("keydown", handleEsc);
441
+ document.body.style.overflow = "hidden";
442
+ return () => {
443
+ if (timeoutId) {
444
+ clearTimeout(timeoutId);
445
+ }
446
+ document.removeEventListener("keydown", handleTab);
447
+ document.removeEventListener("keydown", handleEsc);
448
+ document.body.style.overflow = "unset";
449
+ if (!isOpen && previousActiveElementRef.current) {
450
+ previousActiveElementRef.current.focus();
451
+ }
452
+ };
453
+ }, [isOpen, onClose, blocking]);
454
+ const modalRoot = (() => {
455
+ if (typeof document === "undefined") return null;
456
+ let root = document.getElementById("modal-root");
457
+ if (!root) {
458
+ root = document.createElement("div");
459
+ root.id = "modal-root";
460
+ document.body.appendChild(root);
461
+ }
462
+ return root;
463
+ })();
464
+ if (!modalRoot) {
465
+ return null;
466
+ }
467
+ const backdropVariants = {
468
+ hidden: { opacity: 0 },
469
+ visible: { opacity: 1 }
531
470
  };
532
- const getInputPaddingClasses = (inputType, iconConfig) => {
533
- if (!shouldShowIcons(inputType)) return "";
534
- const paddingClasses2 = [];
535
- if (iconConfig.left) paddingClasses2.push("pl-10");
536
- if (iconConfig.right) {
537
- paddingClasses2.push(inputType === "number" ? "pr-12" : "pr-10");
471
+ const modalVariants = {
472
+ hidden: {
473
+ opacity: 0,
474
+ scale: 0.95,
475
+ y: 20
476
+ },
477
+ visible: {
478
+ opacity: 1,
479
+ scale: 1,
480
+ y: 0,
481
+ transition: {
482
+ duration: 0.2,
483
+ ease: "easeOut"
484
+ }
485
+ },
486
+ exit: {
487
+ opacity: 0,
488
+ scale: 0.9,
489
+ y: 100,
490
+ // Slide down much further for reverse effect
491
+ transition: {
492
+ duration: 0.3,
493
+ ease: "easeIn"
494
+ }
538
495
  }
539
- return paddingClasses2.join(" ");
540
496
  };
541
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `form-group ${className}`, children: type === "checkbox" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center p-2 space-x-3 h-full", children: [
542
- /* @__PURE__ */ jsxRuntime.jsx(
543
- "input",
544
- {
545
- id: name,
546
- name,
547
- type: "checkbox",
548
- checked: Boolean(value),
549
- onChange: (e) => {
550
- const newValue = e.target.checked;
551
- const syntheticEvent = {
552
- target: {
553
- name: e.target.name,
554
- value: newValue,
555
- checked: newValue
497
+ if (!isOpen) return null;
498
+ if (variant === "plain") {
499
+ return reactDom.createPortal(
500
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
501
+ framerMotion.motion.div,
502
+ {
503
+ className: `modal-backdrop fixed inset-0 w-screen h-screen flex items-center ${customStyles.backdrop?.includes("justify-") ? customStyles.backdrop : customStyles.backdrop ? `${customStyles.backdrop} justify-center` : "justify-center bg-black/10"} z-[999999] m-0 ${fullScreen ? "p-0" : "p-4"}`,
504
+ variants: backdropVariants,
505
+ initial: "hidden",
506
+ animate: isOpen ? "visible" : "hidden",
507
+ exit: "hidden",
508
+ onClick: blocking ? void 0 : onClose,
509
+ children: /* @__PURE__ */ jsxRuntime.jsx(
510
+ framerMotion.motion.div,
511
+ {
512
+ ref: modalContentRef,
513
+ role: "dialog",
514
+ "aria-modal": "true",
515
+ "aria-labelledby": title ? "modal-title-plain" : void 0,
516
+ "aria-describedby": ariaDescribedBy || "modal-content-plain",
517
+ tabIndex: -1,
518
+ className: `w-full flex flex-col overflow-hidden relative z-[1000000] ${customStyles.container || "bg-card shadow-xl"} ${fullScreen ? "h-full rounded-none" : `rounded-lg ${className} ${sizeClasses3[size]} max-h-[90vh]`}`,
519
+ variants: modalVariants,
520
+ initial: "hidden",
521
+ animate: isOpen ? "visible" : "exit",
522
+ exit: "exit",
523
+ onClick: (e) => e.stopPropagation(),
524
+ children: /* @__PURE__ */ jsxRuntime.jsx(
525
+ "div",
526
+ {
527
+ id: "modal-content-plain",
528
+ className: `flex-1 ${customStyles.content || ""}`,
529
+ children
530
+ }
531
+ )
556
532
  },
557
- currentTarget: {
558
- name: e.target.name,
559
- value: newValue,
560
- checked: newValue
561
- }
562
- };
563
- onChange(syntheticEvent);
533
+ "modal-content"
534
+ )
564
535
  },
565
- required,
566
- disabled,
567
- onKeyDown,
568
- className: "sr-only",
569
- "aria-label": label,
570
- "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
571
- "aria-invalid": error ? "true" : "false"
572
- }
573
- ),
574
- /* @__PURE__ */ jsxRuntime.jsx(
575
- "button",
536
+ "modal-backdrop"
537
+ ) }),
538
+ modalRoot
539
+ );
540
+ }
541
+ return reactDom.createPortal(
542
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
543
+ framerMotion.motion.div,
576
544
  {
577
- type: "button",
578
- onClick: () => {
579
- if (!disabled) {
580
- const checkbox = document.getElementById(
581
- name
582
- );
583
- if (checkbox) {
584
- checkbox.click();
585
- }
586
- }
587
- },
588
- disabled,
589
- className: `
590
- relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
591
- ${Boolean(value) ? "bg-primary" : "bg-muted"}
592
- ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
593
- ${error ? "ring-2 ring-destructive" : ""}
594
- `,
595
- "aria-label": `${label}${required ? " (required)" : ""}`,
596
- "aria-describedby": name,
597
- children: /* @__PURE__ */ jsxRuntime.jsx(
598
- "span",
545
+ className: `modal-backdrop fixed inset-0 w-screen h-screen bg-black/10 flex items-center ${customStyles.backdrop || "justify-center"} z-[999999] m-0 ${fullScreen ? "p-0" : "p-4"}`,
546
+ variants: backdropVariants,
547
+ initial: "hidden",
548
+ animate: isOpen ? "visible" : "hidden",
549
+ exit: "hidden",
550
+ onClick: blocking ? void 0 : onClose,
551
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
552
+ framerMotion.motion.div,
599
553
  {
600
- className: `
601
- inline-block h-4 w-4 transform rounded-full bg-background border border-border transition duration-200 ease-in-out
602
- ${Boolean(value) ? "translate-x-6" : "translate-x-1"}
603
- `
604
- }
605
- )
606
- }
607
- ),
608
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
609
- /* @__PURE__ */ jsxRuntime.jsxs(
610
- "label",
611
- {
612
- htmlFor: name,
613
- className: "text-sm font-medium text-foreground cursor-pointer",
614
- onClick: () => {
615
- if (!disabled) {
616
- const checkbox = document.getElementById(
617
- name
618
- );
619
- if (checkbox) {
620
- checkbox.click();
621
- }
622
- }
554
+ ref: modalContentRef,
555
+ role: "dialog",
556
+ "aria-modal": "true",
557
+ "aria-labelledby": title ? "modal-title" : void 0,
558
+ "aria-describedby": ariaDescribedBy || "modal-content",
559
+ tabIndex: -1,
560
+ className: `bg-card border border-border shadow-xl w-full flex flex-col overflow-hidden relative z-[1000000] ${fullScreen ? "h-full rounded-none" : `rounded-lg ${customStyles.container || className || sizeClasses3[size]} max-h-[90vh]`}`,
561
+ variants: modalVariants,
562
+ initial: "hidden",
563
+ animate: isOpen ? "visible" : "exit",
564
+ exit: "exit",
565
+ onClick: (e) => e.stopPropagation(),
566
+ children: [
567
+ header ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: header }) : title ? /* @__PURE__ */ jsxRuntime.jsxs(
568
+ "div",
569
+ {
570
+ className: `px-6 py-4 border-b border-border flex justify-between items-center flex-shrink-0 ${customStyles.header || ""}`,
571
+ children: [
572
+ /* @__PURE__ */ jsxRuntime.jsx(
573
+ "h2",
574
+ {
575
+ id: "modal-title",
576
+ className: "text-xl font-semibold text-foreground",
577
+ children: title
578
+ }
579
+ ),
580
+ /* @__PURE__ */ jsxRuntime.jsx(
581
+ "button",
582
+ {
583
+ onClick: onClose,
584
+ className: "p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-full transition-colors",
585
+ title: "Close",
586
+ "aria-label": "Close modal",
587
+ disabled: blocking,
588
+ children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: "w-5 h-5", "aria-hidden": "true" })
589
+ }
590
+ )
591
+ ]
592
+ }
593
+ ) : null,
594
+ /* @__PURE__ */ jsxRuntime.jsx(
595
+ "div",
596
+ {
597
+ id: "modal-content",
598
+ className: `bg-background text-foreground flex-1 ${scrollable ? "overflow-y-auto" : ""} ${fullScreen || noPadding ? "p-0" : "px-6 py-4"}`,
599
+ children
600
+ }
601
+ ),
602
+ footer && /* @__PURE__ */ jsxRuntime.jsx(
603
+ "div",
604
+ {
605
+ className: `flex-shrink-0 px-6 py-4 border-t border-border ${footerBg === "white" ? "bg-card" : "bg-muted"} ${customStyles.footer || ""}`,
606
+ children: footer
607
+ }
608
+ )
609
+ ]
623
610
  },
624
- children: [
625
- label,
626
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", "aria-label": "required", children: "*" })
627
- ]
628
- }
629
- ),
630
- description && /* @__PURE__ */ jsxRuntime.jsx(
631
- "span",
632
- {
633
- id: `${name}-description`,
634
- className: "text-xs text-muted-foreground",
635
- children: description
636
- }
637
- )
638
- ] }),
639
- error && /* @__PURE__ */ jsxRuntime.jsx("div", { id: `${name}-error`, className: "form-error", role: "alert", children: typeof error === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: error }) : error })
640
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
641
- label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: name, className: "form-label", children: [
642
- label,
643
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "form-label-required", children: "*" })
644
- ] }),
645
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${name}-description`, className: "form-description", children: description }),
646
- type === "textarea" ? /* @__PURE__ */ jsxRuntime.jsx(
647
- "textarea",
648
- {
649
- id: name,
650
- name,
651
- value,
652
- onChange,
653
- placeholder,
654
- required,
655
- disabled,
656
- autoFocus,
657
- onKeyDown,
658
- onBlur,
659
- rows,
660
- maxLength,
661
- "aria-invalid": error ? "true" : "false",
662
- "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
663
- className: `form-input ${error ? "form-input-error" : ""} ${inputClassName}`
664
- }
665
- ) : type === "color" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
666
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-10 h-10 border border-input rounded-md overflow-hidden bg-card", children: [
667
- /* @__PURE__ */ jsxRuntime.jsx(
668
- "input",
669
- {
670
- id: name,
671
- name,
672
- type: "color",
673
- value,
674
- onChange,
675
- required,
676
- disabled,
677
- className: "absolute inset-0 w-full h-full cursor-pointer opacity-0"
678
- }
679
- ),
680
- /* @__PURE__ */ jsxRuntime.jsx(
681
- "div",
682
- {
683
- className: "w-full h-full rounded-md",
684
- style: { backgroundColor: value }
685
- }
611
+ "modal-content"
686
612
  )
687
- ] }),
688
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
613
+ },
614
+ "modal-backdrop"
615
+ ) }),
616
+ modalRoot
617
+ );
618
+ }
619
+ function ConfirmDialog({ isOpen, options, onConfirm, onCancel }) {
620
+ const { title, message, confirmText, cancelText = "Cancel", confirmButtonColor = "blue" } = options;
621
+ const getConfirmVariant = () => {
622
+ switch (confirmButtonColor) {
623
+ case "red":
624
+ return "danger";
625
+ case "green":
626
+ return "primary";
627
+ case "blue":
628
+ default:
629
+ return "primary";
630
+ }
631
+ };
632
+ return /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen, onClose: onCancel, title, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
633
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: message }),
634
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-end", children: [
635
+ /* @__PURE__ */ jsxRuntime.jsx(Button_default, { variant: "secondary", onClick: onCancel, children: cancelText }),
636
+ /* @__PURE__ */ jsxRuntime.jsx(Button_default, { variant: getConfirmVariant(), onClick: onConfirm, children: confirmText })
637
+ ] })
638
+ ] }) });
639
+ }
640
+ function useConfirmDialog() {
641
+ const [isOpen, setIsOpen] = React4.useState(false);
642
+ const [options, setOptions] = React4.useState({
643
+ title: "",
644
+ message: "",
645
+ confirmText: "Confirm"
646
+ });
647
+ const [resolver, setResolver] = React4.useState(null);
648
+ const confirm = (opts) => {
649
+ setOptions(opts);
650
+ setIsOpen(true);
651
+ return new Promise((resolve) => {
652
+ setResolver(() => resolve);
653
+ });
654
+ };
655
+ const handleConfirm = () => {
656
+ setIsOpen(false);
657
+ if (resolver) {
658
+ resolver(true);
659
+ setResolver(null);
660
+ }
661
+ };
662
+ const handleCancel = () => {
663
+ setIsOpen(false);
664
+ if (resolver) {
665
+ resolver(false);
666
+ setResolver(null);
667
+ }
668
+ };
669
+ const dialog = /* @__PURE__ */ jsxRuntime.jsx(
670
+ ConfirmDialog,
671
+ {
672
+ isOpen,
673
+ options,
674
+ onConfirm: handleConfirm,
675
+ onCancel: handleCancel
676
+ }
677
+ );
678
+ return { confirm, dialog };
679
+ }
680
+ var ConfirmDialog_default = ConfirmDialog;
681
+ var paddingClasses2 = {
682
+ none: "",
683
+ sm: "p-4",
684
+ md: "p-6",
685
+ lg: "p-8"
686
+ };
687
+ function Container({
688
+ children,
689
+ className = "",
690
+ padding = "md",
691
+ id
692
+ }) {
693
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className: `${paddingClasses2[padding]} ${className}`, children });
694
+ }
695
+ var EmptyState = ({
696
+ icon: Icon,
697
+ title,
698
+ subtitle,
699
+ action,
700
+ className = ""
701
+ }) => {
702
+ return /* @__PURE__ */ jsxRuntime.jsxs(
703
+ "div",
704
+ {
705
+ className: `text-center py-12 text-secondary-foreground p-6 lg:p-12 ${className}`,
706
+ role: "status",
707
+ "aria-live": "polite",
708
+ children: [
689
709
  /* @__PURE__ */ jsxRuntime.jsx(
690
- "input",
710
+ Icon,
691
711
  {
692
- id: `${name}-text`,
693
- name: `${name}-text`,
694
- type: "text",
695
- value,
696
- onChange,
697
- placeholder,
698
- required,
699
- disabled,
700
- maxLength,
701
- autoComplete,
702
- autoFocus,
703
- onKeyDown,
704
- onBlur,
705
- className: `form-input max-w-24 ${error ? "form-input-error" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`,
706
- "aria-label": `${label} text input`
712
+ className: "w-12 h-12 mx-auto mb-3 text-muted-foreground",
713
+ "aria-hidden": "true"
707
714
  }
708
715
  ),
709
- shouldShowIcons(type) && (() => {
710
- const iconConfig = getIconConfig(icon);
711
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
712
- renderIcon(iconConfig.left, "left"),
713
- renderIcon(iconConfig.right, "right")
714
- ] });
715
- })()
716
- ] })
717
- ] }) : showHidePassword && type === "password" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
716
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium mb-1", children: title }),
717
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mb-4", children: subtitle }),
718
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: action })
719
+ ]
720
+ }
721
+ );
722
+ };
723
+ var EmptyState_default = EmptyState;
724
+ function useKeyboardNavigation({
725
+ isOpen,
726
+ optionsLength,
727
+ onSelect,
728
+ onClose,
729
+ onOpen
730
+ }) {
731
+ const [focusedIndex, setFocusedIndex] = React4.useState(-1);
732
+ const resetFocus = React4.useCallback(() => {
733
+ setFocusedIndex(-1);
734
+ }, []);
735
+ const handleKeyDown = React4.useCallback(
736
+ (e) => {
737
+ if (!isOpen) {
738
+ if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
739
+ e.preventDefault();
740
+ onOpen?.();
741
+ }
742
+ return;
743
+ }
744
+ switch (e.key) {
745
+ case "ArrowDown":
746
+ e.preventDefault();
747
+ setFocusedIndex((prev) => prev < optionsLength - 1 ? prev + 1 : 0);
748
+ break;
749
+ case "ArrowUp":
750
+ e.preventDefault();
751
+ setFocusedIndex((prev) => prev > 0 ? prev - 1 : optionsLength - 1);
752
+ break;
753
+ case "Enter":
754
+ e.preventDefault();
755
+ if (focusedIndex >= 0 && focusedIndex < optionsLength) {
756
+ onSelect(focusedIndex);
757
+ }
758
+ break;
759
+ case "Escape":
760
+ e.preventDefault();
761
+ onClose();
762
+ resetFocus();
763
+ break;
764
+ case "Tab":
765
+ onClose();
766
+ resetFocus();
767
+ break;
768
+ }
769
+ },
770
+ [isOpen, optionsLength, focusedIndex, onSelect, onClose, onOpen, resetFocus]
771
+ );
772
+ return {
773
+ focusedIndex,
774
+ handleKeyDown,
775
+ resetFocus,
776
+ setFocusedIndex
777
+ };
778
+ }
779
+ function SmartDropdown({
780
+ isOpen,
781
+ onClose,
782
+ trigger,
783
+ children,
784
+ className = "",
785
+ width = 384,
786
+ maxHeight = 450,
787
+ offset = 8,
788
+ margin = 16,
789
+ id = "dropdown-listbox",
790
+ position = "auto"
791
+ }) {
792
+ const [dropdownPosition, setDropdownPosition] = React4.useState({
793
+ top: 0,
794
+ left: 0,
795
+ right: void 0,
796
+ width: 0,
797
+ maxHeight: 0,
798
+ isAbove: false
799
+ });
800
+ const dropdownRef = React4.useRef(null);
801
+ const triggerRef = React4.useRef(null);
802
+ const calculateDropdownPosition = React4.useCallback(() => {
803
+ if (!triggerRef.current) return;
804
+ const triggerRect = triggerRef.current.getBoundingClientRect();
805
+ const viewportWidth = window.innerWidth;
806
+ const viewportHeight = window.innerHeight;
807
+ const spaceAbove = triggerRect.top - margin;
808
+ const spaceBelow = viewportHeight - triggerRect.bottom - margin;
809
+ let calculatedWidth;
810
+ if (width === "fit-content") {
811
+ calculatedWidth = triggerRect.width;
812
+ } else if (width === "auto") {
813
+ calculatedWidth = triggerRect.width;
814
+ } else if (typeof width === "number") {
815
+ calculatedWidth = Math.min(width, viewportWidth - margin * 2);
816
+ } else {
817
+ calculatedWidth = triggerRect.width;
818
+ }
819
+ const calculatedMaxHeight = Math.min(
820
+ maxHeight,
821
+ Math.max(spaceAbove, spaceBelow)
822
+ );
823
+ let left = triggerRect.left;
824
+ let right = void 0;
825
+ if (position === "top-right" || position === "bottom-right") {
826
+ left = triggerRect.right - calculatedWidth;
827
+ } else if (position === "top-left" || position === "bottom-left") {
828
+ left = triggerRect.left;
829
+ } else if (position === "top-left-aligned" || position === "bottom-left-aligned") {
830
+ const availableLeftSpace = triggerRect.left - margin;
831
+ const dynamicOffset = Math.max(20, availableLeftSpace * 0.2);
832
+ right = viewportWidth - triggerRect.left + dynamicOffset;
833
+ left = 0;
834
+ calculatedWidth = Math.min(
835
+ calculatedWidth,
836
+ triggerRect.left - dynamicOffset - margin
837
+ );
838
+ } else {
839
+ if (left + calculatedWidth > viewportWidth - margin) {
840
+ left = triggerRect.right - calculatedWidth;
841
+ }
842
+ }
843
+ if (left !== void 0 && left < margin) {
844
+ left = margin;
845
+ }
846
+ let top = triggerRect.bottom + offset;
847
+ let finalMaxHeight = calculatedMaxHeight;
848
+ let isAbove = false;
849
+ if (spaceAbove > spaceBelow && top + calculatedMaxHeight > viewportHeight - margin) {
850
+ isAbove = true;
851
+ top = triggerRect.top - calculatedMaxHeight - offset;
852
+ finalMaxHeight = Math.min(calculatedMaxHeight, spaceAbove);
853
+ if (top < margin) {
854
+ top = margin;
855
+ finalMaxHeight = triggerRect.top - margin - offset;
856
+ }
857
+ } else {
858
+ finalMaxHeight = Math.min(calculatedMaxHeight, spaceBelow);
859
+ if (top + finalMaxHeight > viewportHeight - margin) {
860
+ top = viewportHeight - margin - finalMaxHeight;
861
+ }
862
+ }
863
+ if (position === "top-right") {
864
+ left = triggerRect.right - calculatedWidth;
865
+ top = triggerRect.top - offset;
866
+ isAbove = true;
867
+ finalMaxHeight = Math.min(maxHeight, spaceAbove);
868
+ } else if (position === "top-left") {
869
+ left = triggerRect.left;
870
+ top = triggerRect.top - offset;
871
+ isAbove = true;
872
+ finalMaxHeight = Math.min(maxHeight, spaceAbove);
873
+ } else if (position === "bottom-right") {
874
+ left = triggerRect.right - calculatedWidth;
875
+ top = triggerRect.bottom + offset;
876
+ isAbove = false;
877
+ finalMaxHeight = Math.min(maxHeight, spaceBelow);
878
+ } else if (position === "bottom-left") {
879
+ left = triggerRect.left;
880
+ top = triggerRect.bottom + offset;
881
+ isAbove = false;
882
+ finalMaxHeight = Math.min(maxHeight, spaceBelow);
883
+ } else if (position === "top-left-aligned") {
884
+ right = viewportWidth - triggerRect.right;
885
+ left = 0;
886
+ top = triggerRect.top - offset;
887
+ isAbove = true;
888
+ finalMaxHeight = Math.min(maxHeight, spaceAbove);
889
+ } else if (position === "bottom-left-aligned") {
890
+ right = viewportWidth - triggerRect.right;
891
+ left = 0;
892
+ top = triggerRect.bottom + offset;
893
+ isAbove = false;
894
+ finalMaxHeight = Math.min(maxHeight, spaceBelow);
895
+ }
896
+ setDropdownPosition({
897
+ top,
898
+ left,
899
+ right,
900
+ width: calculatedWidth,
901
+ maxHeight: finalMaxHeight,
902
+ isAbove
903
+ });
904
+ }, [width, maxHeight, margin, offset, position]);
905
+ React4.useEffect(() => {
906
+ const handleClickOutside = (event) => {
907
+ const target = event.target;
908
+ const isInsideDropdown = dropdownRef.current?.contains(target);
909
+ const isInsideTrigger = triggerRef.current?.contains(target);
910
+ if (!isInsideDropdown && !isInsideTrigger) {
911
+ onClose();
912
+ }
913
+ };
914
+ document.addEventListener("mousedown", handleClickOutside);
915
+ return () => document.removeEventListener("mousedown", handleClickOutside);
916
+ }, [onClose]);
917
+ React4.useEffect(() => {
918
+ if (isOpen) {
919
+ calculateDropdownPosition();
920
+ }
921
+ }, [isOpen, calculateDropdownPosition]);
922
+ React4.useEffect(() => {
923
+ if (!isOpen) return;
924
+ const handleResize = () => {
925
+ calculateDropdownPosition();
926
+ };
927
+ const handleScroll = () => {
928
+ calculateDropdownPosition();
929
+ };
930
+ window.addEventListener("resize", handleResize);
931
+ window.addEventListener("scroll", handleScroll, true);
932
+ return () => {
933
+ window.removeEventListener("resize", handleResize);
934
+ window.removeEventListener("scroll", handleScroll, true);
935
+ };
936
+ }, [isOpen, calculateDropdownPosition]);
937
+ React4.useEffect(() => {
938
+ if (!isOpen || !dropdownRef.current || !triggerRef.current) return;
939
+ if (dropdownPosition.isAbove) {
940
+ const adjustPosition = () => {
941
+ const dropdownRect = dropdownRef.current?.getBoundingClientRect();
942
+ const triggerRect = triggerRef.current?.getBoundingClientRect();
943
+ if (!dropdownRect || !triggerRect) return;
944
+ const actualHeight = dropdownRect.height;
945
+ const newTop = triggerRect.top - actualHeight - offset;
946
+ if (newTop !== dropdownPosition.top && newTop >= margin) {
947
+ setDropdownPosition((prev) => ({
948
+ ...prev,
949
+ top: newTop
950
+ }));
951
+ }
952
+ };
953
+ const resizeObserver = new ResizeObserver(() => {
954
+ setTimeout(adjustPosition, 0);
955
+ });
956
+ resizeObserver.observe(dropdownRef.current);
957
+ adjustPosition();
958
+ return () => {
959
+ resizeObserver.disconnect();
960
+ };
961
+ }
962
+ }, [isOpen, dropdownPosition.isAbove, dropdownPosition.top, offset, margin]);
963
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
964
+ /* @__PURE__ */ jsxRuntime.jsx(
965
+ "div",
966
+ {
967
+ ref: triggerRef,
968
+ className: "w-full",
969
+ role: "combobox",
970
+ "aria-expanded": isOpen,
971
+ "aria-haspopup": "listbox",
972
+ "aria-controls": "dropdown-listbox",
973
+ children: trigger
974
+ }
975
+ ),
976
+ isOpen && typeof window !== "undefined" && reactDom.createPortal(
718
977
  /* @__PURE__ */ jsxRuntime.jsx(
719
- "input",
978
+ "div",
720
979
  {
721
- id: name,
722
- name,
723
- type: showPassword ? "text" : "password",
724
- value,
725
- onChange,
726
- placeholder,
727
- required,
728
- disabled: disabled || readOnly,
729
- readOnly,
730
- maxLength,
731
- autoComplete,
732
- autoFocus,
733
- onKeyDown,
734
- onBlur,
735
- "aria-invalid": error ? "true" : "false",
736
- "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
737
- className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-20" : "pr-10"} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
738
- }
739
- ),
740
- shouldShowIcons(type) && (() => {
741
- const iconConfig = getIconConfig(icon);
742
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
743
- renderIcon(iconConfig.left, "left"),
744
- renderIcon(iconConfig.right, "right")
745
- ] });
746
- })(),
747
- copyable && /* @__PURE__ */ jsxRuntime.jsx(
748
- "button",
749
- {
750
- type: "button",
751
- onClick: handleCopy,
752
- className: "absolute inset-y-0 right-8 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10",
753
- "aria-label": `Copy ${label}`,
754
- title: copied ? "Copied!" : `Copy ${label}`,
755
- children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-green-500", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiFileCopyLine, { className: "w-4 h-4", "aria-hidden": "true" })
756
- }
757
- ),
758
- /* @__PURE__ */ jsxRuntime.jsx(
759
- "button",
760
- {
761
- type: "button",
762
- onClick: () => setShowPassword(!showPassword),
763
- className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10",
764
- "aria-label": showPassword ? "Hide password" : "Show password",
765
- title: showPassword ? "Hide password" : "Show password",
766
- children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiEyeOffLine, { className: "w-4 h-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiEyeLine, { className: "w-4 h-4", "aria-hidden": "true" })
767
- }
768
- ),
769
- onGeneratePassword && !readOnly && /* @__PURE__ */ jsxRuntime.jsx(
770
- "button",
771
- {
772
- type: "button",
773
- onClick: onGeneratePassword,
774
- className: `absolute inset-y-0 ${copyable ? "right-16" : "right-8"} flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10`,
775
- "aria-label": "Generate new password",
776
- title: "Generate new password",
777
- children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiRefreshLine, { className: "w-4 h-4", "aria-hidden": "true" })
778
- }
779
- )
780
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
781
- /* @__PURE__ */ jsxRuntime.jsx(
782
- "input",
783
- {
784
- id: name,
785
- name,
786
- type,
787
- value,
788
- onChange,
789
- placeholder,
790
- required,
791
- disabled: disabled || readOnly,
792
- readOnly,
793
- min,
794
- max,
795
- step,
796
- maxLength,
797
- autoComplete,
798
- autoFocus,
799
- onKeyDown,
800
- onBlur,
801
- "aria-invalid": error ? "true" : "false",
802
- "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
803
- className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-10" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
804
- }
805
- ),
806
- shouldShowIcons(type) && (() => {
807
- const iconConfig = getIconConfig(icon);
808
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
809
- renderIcon(iconConfig.left, "left"),
810
- renderIcon(iconConfig.right, "right")
811
- ] });
812
- })(),
813
- copyable && /* @__PURE__ */ jsxRuntime.jsx(
814
- "button",
815
- {
816
- type: "button",
817
- onClick: handleCopy,
818
- className: `absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-all duration-200 z-10`,
819
- "aria-label": `Copy ${label}`,
820
- title: copied ? "Copied!" : `Copy ${label}`,
821
- children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-green-500", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiFileCopyLine, { className: "w-4 h-4", "aria-hidden": "true" })
822
- }
823
- ),
824
- clearable && !copyable && value !== "" && value !== null && value !== void 0 && !disabled && !readOnly && /* @__PURE__ */ jsxRuntime.jsx(
825
- "button",
826
- {
827
- type: "button",
828
- onClick: () => {
829
- const syntheticEvent = {
830
- target: { name, value: "" }
831
- };
832
- onChange(syntheticEvent);
980
+ ref: dropdownRef,
981
+ id,
982
+ "data-smart-dropdown": true,
983
+ role: "listbox",
984
+ "aria-label": "Dropdown options",
985
+ className: `fixed z-[1000001] card overflow-hidden`,
986
+ style: {
987
+ top: dropdownPosition.top,
988
+ ...dropdownPosition.left !== void 0 ? { left: dropdownPosition.left } : {},
989
+ ...dropdownPosition.right !== void 0 ? { right: dropdownPosition.right } : {},
990
+ width: width === "fit-content" ? "auto" : dropdownPosition.width,
991
+ maxHeight: dropdownPosition.maxHeight
833
992
  },
834
- className: `absolute inset-y-0 ${type === "number" ? "right-4" : "right-0"} flex items-center pr-3 text-muted-foreground hover:text-muted-foreground transition-all duration-200 z-10 opacity-0 group-hover:opacity-100`,
835
- "aria-label": `Clear ${label}`,
836
- title: `Clear ${label}`,
837
- children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: "w-4 h-4", "aria-hidden": "true" })
993
+ onClick: (e) => {
994
+ e.stopPropagation();
995
+ },
996
+ children: /* @__PURE__ */ jsxRuntime.jsx(
997
+ "div",
998
+ {
999
+ className: className ? className : "overflow-y-auto",
1000
+ style: { maxHeight: dropdownPosition.maxHeight },
1001
+ children: typeof children === "function" ? children({ isAbove: dropdownPosition.isAbove }) : children
1002
+ }
1003
+ )
838
1004
  }
839
- )
840
- ] }),
841
- footerDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs mt-1", children: footerDescription }),
842
- error && /* @__PURE__ */ jsxRuntime.jsx("div", { id: `${name}-error`, className: "form-error", role: "alert", children: typeof error === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: error }) : error })
843
- ] }) });
1005
+ ),
1006
+ document.body
1007
+ )
1008
+ ] });
844
1009
  }
845
- function Switch({
846
- checked,
1010
+ function SmartSelect({
1011
+ options,
1012
+ value,
847
1013
  onChange,
848
- disabled = false,
849
- label,
850
- description,
1014
+ placeholder = "Select option...",
851
1015
  className = "",
852
- size = "md"
1016
+ description,
1017
+ disabled = false,
1018
+ multiple = false,
1019
+ width,
1020
+ searchable = false,
1021
+ keepOpen = false,
1022
+ clearable = true,
1023
+ // API integration props
1024
+ onOpen,
1025
+ onClose,
1026
+ onSearch,
1027
+ isLoading = false
853
1028
  }) {
854
- const toggle = () => {
855
- if (!disabled) {
856
- onChange(!checked);
1029
+ const [isOpen, setIsOpen] = React4.useState(false);
1030
+ const [triggerWidth, setTriggerWidth] = React4.useState(
1031
+ void 0
1032
+ );
1033
+ const [searchTerm, setSearchTerm] = React4.useState("");
1034
+ const [displayValue, setDisplayValue] = React4.useState("");
1035
+ const inputRef = React4.useRef(null);
1036
+ const buttonRef = React4.useRef(null);
1037
+ const selectedValues = multiple ? value || [] : [value];
1038
+ const selectedOptions = options.filter(
1039
+ (opt) => selectedValues.includes(opt.value)
1040
+ );
1041
+ const hasSelection = multiple ? selectedValues.length > 0 : value && value !== "";
1042
+ const filteredOptions = searchable && searchTerm.trim() ? options.filter(
1043
+ (option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()) || option.value.toLowerCase().includes(searchTerm.toLowerCase()) || option.description?.toLowerCase().includes(searchTerm.toLowerCase())
1044
+ ) : options;
1045
+ const { focusedIndex, handleKeyDown, resetFocus } = useKeyboardNavigation({
1046
+ isOpen,
1047
+ optionsLength: filteredOptions.length,
1048
+ onSelect: (index) => handleSelect(filteredOptions[index].value),
1049
+ onClose: () => setIsOpen(false),
1050
+ onOpen: () => setIsOpen(true)
1051
+ });
1052
+ React4.useEffect(() => {
1053
+ if (selectedOptions.length > 0) {
1054
+ if (multiple) {
1055
+ setDisplayValue(selectedOptions.map((opt) => opt.label).join(", "));
1056
+ } else {
1057
+ setDisplayValue(selectedOptions[0].label);
1058
+ }
1059
+ } else {
1060
+ setDisplayValue("");
1061
+ }
1062
+ }, [selectedOptions, multiple]);
1063
+ const handleSelect = (optionValue) => {
1064
+ if (multiple) {
1065
+ const currentValues = value || [];
1066
+ const newValues = currentValues.includes(optionValue) ? currentValues.filter((v) => v !== optionValue) : [...currentValues, optionValue];
1067
+ onChange(newValues);
1068
+ } else {
1069
+ onChange(optionValue);
1070
+ setSearchTerm("");
1071
+ setIsOpen(false);
857
1072
  }
858
1073
  };
859
- const sizes = {
860
- sm: { track: "w-8 h-4", thumb: "w-3 h-3", translate: "translate-x-4" },
861
- md: { track: "w-11 h-6", thumb: "w-5 h-5", translate: "translate-x-5" },
862
- lg: { track: "w-14 h-8", thumb: "w-7 h-7", translate: "translate-x-6" }
1074
+ const currentTriggerRef = searchable ? inputRef : buttonRef;
1075
+ React4.useEffect(() => {
1076
+ if (currentTriggerRef.current) {
1077
+ const rect = currentTriggerRef.current.getBoundingClientRect();
1078
+ setTriggerWidth(rect.width);
1079
+ }
1080
+ }, [isOpen, currentTriggerRef]);
1081
+ React4.useEffect(() => {
1082
+ if (!currentTriggerRef.current) return;
1083
+ const resizeObserver = new ResizeObserver(() => {
1084
+ if (currentTriggerRef.current) {
1085
+ const rect = currentTriggerRef.current.getBoundingClientRect();
1086
+ setTriggerWidth(rect.width);
1087
+ }
1088
+ });
1089
+ resizeObserver.observe(currentTriggerRef.current);
1090
+ return () => {
1091
+ resizeObserver.disconnect();
1092
+ };
1093
+ }, [currentTriggerRef]);
1094
+ React4.useEffect(() => {
1095
+ if (isOpen && searchable && inputRef.current) {
1096
+ setTimeout(() => {
1097
+ inputRef.current?.focus();
1098
+ }, 0);
1099
+ } else if (!isOpen) {
1100
+ setSearchTerm("");
1101
+ resetFocus();
1102
+ }
1103
+ }, [isOpen, searchable, resetFocus]);
1104
+ const handleOpen = () => {
1105
+ setIsOpen(true);
1106
+ onOpen?.();
863
1107
  };
864
- const currentSize = sizes[size];
865
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-start ${className}`, children: [
1108
+ const handleClose = () => {
1109
+ setIsOpen(false);
1110
+ onClose?.();
1111
+ };
1112
+ const handleSearchChange = (search) => {
1113
+ setSearchTerm(search);
1114
+ onSearch?.(search);
1115
+ };
1116
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", "data-smart-select": true, children: [
1117
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "form-description", children: description }),
866
1118
  /* @__PURE__ */ jsxRuntime.jsx(
867
- "button",
1119
+ SmartDropdown,
868
1120
  {
869
- type: "button",
870
- role: "switch",
871
- "aria-checked": checked,
872
- disabled,
873
- onClick: toggle,
874
- className: `
875
- relative inline-flex flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent
876
- transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
877
- ${checked ? "bg-primary" : "bg-muted"}
878
- ${disabled ? "opacity-50 cursor-not-allowed" : ""}
879
- ${currentSize.track}
880
- `,
881
- children: /* @__PURE__ */ jsxRuntime.jsx(
882
- "span",
1121
+ isOpen,
1122
+ onClose: handleClose,
1123
+ width: width !== void 0 ? width : triggerWidth,
1124
+ maxHeight: 200,
1125
+ trigger: searchable ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
1126
+ /* @__PURE__ */ jsxRuntime.jsx(
1127
+ "input",
1128
+ {
1129
+ ref: inputRef,
1130
+ type: "text",
1131
+ value: isOpen ? searchTerm : displayValue,
1132
+ onChange: (e) => {
1133
+ if (isOpen) {
1134
+ handleSearchChange(e.target.value);
1135
+ resetFocus();
1136
+ }
1137
+ },
1138
+ onFocus: () => !disabled && handleOpen(),
1139
+ onClick: (e) => {
1140
+ e.stopPropagation();
1141
+ !disabled && handleOpen();
1142
+ },
1143
+ onKeyDown: handleKeyDown,
1144
+ placeholder,
1145
+ disabled,
1146
+ role: "combobox",
1147
+ "aria-expanded": isOpen,
1148
+ "aria-haspopup": "listbox",
1149
+ "aria-controls": "dropdown-listbox",
1150
+ "aria-autocomplete": "list",
1151
+ "aria-activedescendant": focusedIndex >= 0 ? `option-${focusedIndex}` : void 0,
1152
+ className: `form-input truncate ${hasSelection ? "pr-12" : "pr-8"} ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${className}`
1153
+ }
1154
+ ),
1155
+ hasSelection && clearable && /* @__PURE__ */ jsxRuntime.jsx(
1156
+ "button",
1157
+ {
1158
+ type: "button",
1159
+ onClick: (e) => {
1160
+ e.stopPropagation();
1161
+ onChange(multiple ? [] : "");
1162
+ },
1163
+ className: "absolute right-6 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground hover:text-muted-foreground transition-colors",
1164
+ "aria-label": "Clear selection",
1165
+ title: "Clear selection",
1166
+ children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: "w-4 h-4", "aria-hidden": true })
1167
+ }
1168
+ ),
1169
+ /* @__PURE__ */ jsxRuntime.jsx(
1170
+ "button",
1171
+ {
1172
+ type: "button",
1173
+ onClick: (e) => {
1174
+ e.stopPropagation();
1175
+ !disabled && setIsOpen(!isOpen);
1176
+ },
1177
+ className: `absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground hover:text-muted-foreground transition-colors ${disabled ? "opacity-50 cursor-not-allowed" : ""}`,
1178
+ disabled,
1179
+ "aria-label": isOpen ? "Close dropdown" : "Open dropdown",
1180
+ "aria-expanded": isOpen,
1181
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1182
+ DropDownArrow,
1183
+ {
1184
+ isOpen,
1185
+ disabled,
1186
+ size: "sm",
1187
+ color: "gray",
1188
+ "aria-hidden": true
1189
+ }
1190
+ )
1191
+ }
1192
+ )
1193
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
1194
+ /* @__PURE__ */ jsxRuntime.jsx(
1195
+ "button",
1196
+ {
1197
+ ref: buttonRef,
1198
+ type: "button",
1199
+ onClick: (e) => {
1200
+ e.stopPropagation();
1201
+ !disabled && (isOpen ? handleClose() : handleOpen());
1202
+ },
1203
+ onKeyDown: handleKeyDown,
1204
+ disabled,
1205
+ role: "combobox",
1206
+ "aria-expanded": isOpen,
1207
+ "aria-haspopup": "listbox",
1208
+ "aria-controls": "dropdown-listbox",
1209
+ "aria-label": placeholder,
1210
+ "aria-activedescendant": focusedIndex >= 0 ? `option-${focusedIndex}` : void 0,
1211
+ className: `form-input flex items-center justify-between text-left ${hasSelection ? "pr-12" : "pr-8"} ${disabled ? "opacity-60 cursor-not-allowed" : ""} ${className}`,
1212
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1213
+ "span",
1214
+ {
1215
+ className: `flex items-center gap-2 min-w-0 flex-1 ${selectedOptions.length > 0 ? "" : "text-muted-foreground opacity-60"}`,
1216
+ children: multiple ? selectedOptions.length > 0 ? (() => {
1217
+ const displayText = selectedOptions.map((opt) => opt.label).join(", ");
1218
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 min-w-0 flex-1", children: [
1219
+ selectedOptions[0].icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: selectedOptions[0].icon }),
1220
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: displayText })
1221
+ ] });
1222
+ })() : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: placeholder }) : selectedOptions[0] ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 min-w-0 flex-1", children: [
1223
+ selectedOptions[0].icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: selectedOptions[0].icon }),
1224
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: selectedOptions[0].label })
1225
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: placeholder })
1226
+ }
1227
+ )
1228
+ }
1229
+ ),
1230
+ hasSelection && clearable && /* @__PURE__ */ jsxRuntime.jsx(
1231
+ "button",
1232
+ {
1233
+ type: "button",
1234
+ onClick: (e) => {
1235
+ e.stopPropagation();
1236
+ onChange(multiple ? [] : "");
1237
+ },
1238
+ className: "absolute right-6 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground hover:text-muted-foreground transition-all duration-200 opacity-0 group-hover:opacity-100",
1239
+ "aria-label": "Clear selection",
1240
+ title: "Clear selection",
1241
+ children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: "w-4 h-4", "aria-hidden": true })
1242
+ }
1243
+ ),
1244
+ /* @__PURE__ */ jsxRuntime.jsx(
1245
+ "button",
1246
+ {
1247
+ type: "button",
1248
+ onClick: (e) => {
1249
+ e.stopPropagation();
1250
+ !disabled && setIsOpen(!isOpen);
1251
+ },
1252
+ className: `absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground hover:text-muted-foreground transition-colors ${disabled ? "opacity-50 cursor-not-allowed" : ""}`,
1253
+ disabled,
1254
+ "aria-label": isOpen ? "Close dropdown" : "Open dropdown",
1255
+ "aria-expanded": isOpen,
1256
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1257
+ DropDownArrow,
1258
+ {
1259
+ isOpen,
1260
+ disabled,
1261
+ size: "sm",
1262
+ color: "gray",
1263
+ "aria-hidden": true
1264
+ }
1265
+ )
1266
+ }
1267
+ )
1268
+ ] }),
1269
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-2", children: filteredOptions.length > 0 ? filteredOptions.map((option, index) => /* @__PURE__ */ jsxRuntime.jsxs(
1270
+ "button",
883
1271
  {
884
- "aria-hidden": "true",
885
- className: `
886
- pointer-events-none inline-block transform rounded-full bg-white shadow ring-0
887
- transition duration-200 ease-in-out
888
- ${checked ? currentSize.translate : "translate-x-0"}
889
- ${currentSize.thumb}
890
- `
891
- }
892
- )
1272
+ id: `option-${index}`,
1273
+ type: "button",
1274
+ role: "option",
1275
+ "aria-selected": selectedValues.includes(option.value),
1276
+ onMouseDown: (e) => {
1277
+ e.preventDefault();
1278
+ e.stopPropagation();
1279
+ handleSelect(option.value);
1280
+ },
1281
+ className: `w-full px-3 py-2 text-left text-sm hover:bg-accent flex items-center justify-between min-h-[40px] transition-colors ${selectedValues.includes(option.value) ? "bg-accent border-l-2 border-l-ring" : index === focusedIndex ? "bg-muted ring-2 ring-ring" : ""}`,
1282
+ children: [
1283
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
1284
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: option.icon }),
1285
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1286
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1287
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-foreground truncate", children: option.label }),
1288
+ option.metadata?.isDefault && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium success-badge flex-shrink-0", children: "Default" })
1289
+ ] }),
1290
+ option.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground truncate", children: option.description }),
1291
+ option.metadata?.args && option.metadata.args.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1", children: [
1292
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-secondary-foreground mb-1", children: "Arguments:" }),
1293
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-1", children: [
1294
+ option.metadata.args.slice(0, 3).map((arg, argIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1295
+ "span",
1296
+ {
1297
+ className: "inline-flex items-center px-1.5 py-0.5 rounded text-xs font-mono bg-muted text-muted-foreground",
1298
+ children: arg
1299
+ },
1300
+ argIndex
1301
+ )),
1302
+ option.metadata.args.length > 3 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-secondary-foreground", children: [
1303
+ "+",
1304
+ option.metadata.args.length - 3,
1305
+ " more"
1306
+ ] })
1307
+ ] })
1308
+ ] })
1309
+ ] })
1310
+ ] }),
1311
+ multiple ? /* @__PURE__ */ jsxRuntime.jsx(
1312
+ "input",
1313
+ {
1314
+ type: "checkbox",
1315
+ checked: selectedValues.includes(option.value),
1316
+ onChange: () => {
1317
+ },
1318
+ className: "w-4 h-4 text-primary bg-muted border-border rounded focus:ring-primary focus:ring-2"
1319
+ }
1320
+ ) : selectedValues.includes(option.value) && /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-primary flex-shrink-0" })
1321
+ ]
1322
+ },
1323
+ option.value
1324
+ )) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 text-sm text-secondary-foreground flex items-center gap-2", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1325
+ /* @__PURE__ */ jsxRuntime.jsx(ri.RiLoader4Line, { className: "w-4 h-4 animate-spin" }),
1326
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Loading..." })
1327
+ ] }) : searchTerm.trim() ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: "No results found" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "No options available" }) }) })
893
1328
  }
894
- ),
895
- (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-3 text-sm leading-6", children: [
896
- label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "font-medium text-foreground cursor-pointer", onClick: toggle, children: label }),
897
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: description })
898
- ] })
1329
+ )
899
1330
  ] });
900
1331
  }
901
- var sizeClasses3 = {
902
- sm: "max-w-md",
903
- md: "max-w-2xl",
904
- lg: "max-w-4xl",
905
- xl: "max-w-6xl",
906
- full: "max-w-full mx-4"
907
- };
908
- function Modal({
909
- isOpen,
910
- onClose,
911
- children,
912
- title,
913
- header,
914
- blocking = false,
915
- size = "md",
1332
+ function Skeleton({ className = "", children }) {
1333
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `animate-pulse ${className}`, children });
1334
+ }
1335
+ function SkeletonItem({
916
1336
  className = "",
917
- footer,
918
- fullScreen = false,
919
- noPadding = false,
920
- footerBg = "gray",
921
- variant = "default",
922
- scrollable = true,
923
- "aria-describedby": ariaDescribedBy,
924
- customStyles = {}
1337
+ width = "w-full",
1338
+ height = "h-4",
1339
+ rounded = true,
1340
+ animate = true
925
1341
  }) {
926
- const modalContentRef = React4.useRef(null);
927
- const previousActiveElementRef = React4.useRef(null);
928
- const hasPerformedInitialFocusRef = React4.useRef(false);
929
- const getFocusableElements = () => {
930
- if (!modalContentRef.current) return [];
931
- const focusableSelectors = [
932
- "button:not([disabled])",
933
- "a[href]",
934
- "input:not([disabled])",
935
- "select:not([disabled])",
936
- "textarea:not([disabled])",
937
- '[tabindex]:not([tabindex="-1"])'
938
- ].join(", ");
939
- return Array.from(
940
- modalContentRef.current.querySelectorAll(focusableSelectors)
941
- );
942
- };
943
- React4.useEffect(() => {
944
- if (!isOpen) {
945
- hasPerformedInitialFocusRef.current = false;
946
- return;
1342
+ const isArbitraryHeight = height.includes("[") && height.includes("]");
1343
+ const baseClasses = isArbitraryHeight ? `bg-muted ${width}` : `${height} bg-muted ${width}`;
1344
+ const roundedClasses = rounded ? "rounded" : "";
1345
+ const animateClasses = animate ? "animate-pulse" : "";
1346
+ const style = isArbitraryHeight ? { height: height.replace("h-[", "").replace("]", "") } : {};
1347
+ return /* @__PURE__ */ jsxRuntime.jsx(
1348
+ "div",
1349
+ {
1350
+ className: `${baseClasses} ${roundedClasses} ${animateClasses} ${className}`,
1351
+ style
947
1352
  }
948
- if (!hasPerformedInitialFocusRef.current) {
949
- previousActiveElementRef.current = document.activeElement;
1353
+ );
1354
+ }
1355
+ function SkeletonCard({ className = "", children }) {
1356
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `card card-padding ${className}`, children });
1357
+ }
1358
+ function SkeletonTable({
1359
+ rows = 5,
1360
+ columns = 4,
1361
+ className = "",
1362
+ showHeader = true
1363
+ }) {
1364
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `card overflow-hidden ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full divide-y divide-border", children: [
1365
+ showHeader && /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" }) }, i)) }) }),
1366
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "table-body-card", children: Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: columns }).map((_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1367
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-full", height: "h-4" }),
1368
+ colIndex === 0 && /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-3/4", height: "h-3" })
1369
+ ] }) }, colIndex)) }, rowIndex)) })
1370
+ ] }) }) });
1371
+ }
1372
+ function SkeletonList({
1373
+ items = 5,
1374
+ className = "",
1375
+ itemHeight = "h-20"
1376
+ }) {
1377
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "card card-padding-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
1378
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1379
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
1380
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-1/3", height: "h-4" }),
1381
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-1/2", height: "h-3" })
1382
+ ] }),
1383
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex space-x-2", children: [
1384
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-8" }),
1385
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-8" })
1386
+ ] })
1387
+ ] }) }, i)) });
1388
+ }
1389
+ function SkeletonSearchCard({ className = "" }) {
1390
+ return /* @__PURE__ */ jsxRuntime.jsx(SkeletonCard, { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1391
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4", children: [
1392
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1393
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-48", height: "h-6" }),
1394
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-4" })
1395
+ ] }),
1396
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-10" }) })
1397
+ ] }),
1398
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row gap-3", children: [
1399
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-full", height: "h-10" }),
1400
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-10" }),
1401
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-10" }),
1402
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-10", height: "h-10" })
1403
+ ] })
1404
+ ] }) });
1405
+ }
1406
+ function SkeletonGameServerCard({
1407
+ className = ""
1408
+ }) {
1409
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1410
+ "div",
1411
+ {
1412
+ className: `card overflow-hidden h-[380px] flex flex-col ${className}`,
1413
+ children: [
1414
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative px-5 py-4 border-b border-border bg-muted overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-3 relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1415
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-6", className: "mb-2" }),
1416
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-1", children: [
1417
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-4", height: "h-4", rounded: true }),
1418
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" })
1419
+ ] })
1420
+ ] }) }) }),
1421
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative px-4 py-3 pt-0 flex-grow", children: [
1422
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative p-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3 grid-cols-3", children: [
1423
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1424
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1425
+ /* @__PURE__ */ jsxRuntime.jsx(
1426
+ SkeletonItem,
1427
+ {
1428
+ width: "w-12",
1429
+ height: "h-3",
1430
+ className: "mx-auto mb-1"
1431
+ }
1432
+ ),
1433
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto" })
1434
+ ] }),
1435
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1436
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1437
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto mb-1" }),
1438
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-6", height: "h-3", className: "mx-auto" })
1439
+ ] }),
1440
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1441
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1442
+ /* @__PURE__ */ jsxRuntime.jsx(
1443
+ SkeletonItem,
1444
+ {
1445
+ width: "w-12",
1446
+ height: "h-3",
1447
+ className: "mx-auto mb-1"
1448
+ }
1449
+ ),
1450
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto" })
1451
+ ] })
1452
+ ] }) }),
1453
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border pt-4 space-y-1", children: [
1454
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1455
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1456
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1457
+ ] }),
1458
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1459
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1460
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1461
+ ] }),
1462
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1463
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1464
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1465
+ ] }),
1466
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1467
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1468
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1469
+ ] }),
1470
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1471
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1472
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1473
+ ] })
1474
+ ] })
1475
+ ] }),
1476
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 bg-card border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1477
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
1478
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1479
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1480
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1481
+ ] }) }),
1482
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
1483
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1484
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1485
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1486
+ ] })
1487
+ ] }) })
1488
+ ]
950
1489
  }
951
- let timeoutId = null;
952
- if (!hasPerformedInitialFocusRef.current) {
953
- const focusableElements = getFocusableElements();
954
- const firstFocusable = focusableElements[0];
955
- timeoutId = setTimeout(() => {
956
- const activeElement = document.activeElement;
957
- const isHTMLElement = activeElement instanceof HTMLElement;
958
- const isUserTyping = activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || isHTMLElement && activeElement.isContentEditable);
959
- const isFocusInModal = modalContentRef.current?.contains(activeElement);
960
- if (!isUserTyping && !isFocusInModal) {
961
- if (firstFocusable) {
962
- firstFocusable.focus();
963
- hasPerformedInitialFocusRef.current = true;
964
- } else if (modalContentRef.current) {
965
- modalContentRef.current.focus();
966
- hasPerformedInitialFocusRef.current = true;
1490
+ );
1491
+ }
1492
+ function SkeletonGameCard({ className = "" }) {
1493
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `card card-padding-sm ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
1494
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1495
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
1496
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-40", height: "h-4" }),
1497
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-64", height: "h-3" })
1498
+ ] }),
1499
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
1500
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-6", rounded: true }),
1501
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1502
+ ] })
1503
+ ] }) });
1504
+ }
1505
+ function SkeletonUserCard({ className = "" }) {
1506
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `card card-padding-sm ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
1507
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1508
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
1509
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-4" }),
1510
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-40", height: "h-3" })
1511
+ ] }),
1512
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
1513
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true }),
1514
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-6", rounded: true })
1515
+ ] })
1516
+ ] }) });
1517
+ }
1518
+ function SkeletonNodeCard({ className = "" }) {
1519
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `card overflow-hidden min-h-[320px] ${className}`, children: [
1520
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 border-b border-border bg-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1521
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
1522
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8" }),
1523
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1524
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-5", className: "mb-1" }),
1525
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4", className: "mb-1" }),
1526
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1527
+ ] })
1528
+ ] }),
1529
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1530
+ ] }) }),
1531
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-3", children: [
1532
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-4 mb-4", children: [
1533
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1534
+ /* @__PURE__ */ jsxRuntime.jsx(
1535
+ SkeletonItem,
1536
+ {
1537
+ width: "w-16",
1538
+ height: "h-16",
1539
+ rounded: true,
1540
+ className: "mx-auto mb-1"
1541
+ }
1542
+ ),
1543
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto mb-1" }),
1544
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-6", height: "h-3", className: "mx-auto" })
1545
+ ] }),
1546
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1547
+ /* @__PURE__ */ jsxRuntime.jsx(
1548
+ SkeletonItem,
1549
+ {
1550
+ width: "w-16",
1551
+ height: "h-16",
1552
+ rounded: true,
1553
+ className: "mx-auto mb-1"
1554
+ }
1555
+ ),
1556
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto mb-1" }),
1557
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-6", height: "h-3", className: "mx-auto" })
1558
+ ] }),
1559
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1560
+ /* @__PURE__ */ jsxRuntime.jsx(
1561
+ SkeletonItem,
1562
+ {
1563
+ width: "w-16",
1564
+ height: "h-16",
1565
+ rounded: true,
1566
+ className: "mx-auto mb-1"
1567
+ }
1568
+ ),
1569
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-3", className: "mx-auto mb-1" }),
1570
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto" })
1571
+ ] })
1572
+ ] }),
1573
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted rounded-lg p-3 mb-4", children: [
1574
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
1575
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" }),
1576
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-4" })
1577
+ ] }),
1578
+ /* @__PURE__ */ jsxRuntime.jsx(
1579
+ SkeletonItem,
1580
+ {
1581
+ width: "w-full",
1582
+ height: "h-2",
1583
+ rounded: true,
1584
+ className: "mb-1"
967
1585
  }
968
- } else if (isFocusInModal) {
969
- hasPerformedInitialFocusRef.current = true;
970
- }
971
- }, 100);
1586
+ ),
1587
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-3" })
1588
+ ] }),
1589
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground mb-3", children: [
1590
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between mb-1", children: [
1591
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1592
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1593
+ ] }),
1594
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1595
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1596
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1597
+ ] })
1598
+ ] }),
1599
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end items-center pt-3 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex space-x-2", children: [
1600
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-8", rounded: true }),
1601
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1602
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1603
+ ] }) })
1604
+ ] })
1605
+ ] });
1606
+ }
1607
+ function SkeletonTenantCard({ className = "" }) {
1608
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `card card-padding-sm ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
1609
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1610
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
1611
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-40", height: "h-4" }),
1612
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-56", height: "h-3" })
1613
+ ] }),
1614
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
1615
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-28", height: "h-6", rounded: true }),
1616
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1617
+ ] })
1618
+ ] }) });
1619
+ }
1620
+ function SkeletonStats({ className = "" }) {
1621
+ return /* @__PURE__ */ jsxRuntime.jsx(
1622
+ "div",
1623
+ {
1624
+ className: `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 ${className}`,
1625
+ children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "card card-padding", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
1626
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" }),
1627
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-8" }),
1628
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-3" })
1629
+ ] }) }, i))
972
1630
  }
973
- const handleTab = (event) => {
974
- if (event.key !== "Tab") return;
975
- const focusableElements = getFocusableElements();
976
- if (focusableElements.length === 0) return;
977
- const firstElement = focusableElements[0];
978
- const lastElement = focusableElements[focusableElements.length - 1];
979
- if (event.shiftKey) {
980
- if (document.activeElement === firstElement) {
981
- event.preventDefault();
982
- lastElement.focus();
983
- }
984
- } else {
985
- if (document.activeElement === lastElement) {
986
- event.preventDefault();
987
- firstElement.focus();
988
- }
989
- }
990
- };
991
- const handleEsc = (event) => {
992
- if (event.key === "Escape" && !blocking) {
993
- onClose();
994
- }
995
- };
996
- document.addEventListener("keydown", handleTab);
997
- document.addEventListener("keydown", handleEsc);
998
- document.body.style.overflow = "hidden";
999
- return () => {
1000
- if (timeoutId) {
1001
- clearTimeout(timeoutId);
1002
- }
1003
- document.removeEventListener("keydown", handleTab);
1004
- document.removeEventListener("keydown", handleEsc);
1005
- document.body.style.overflow = "unset";
1006
- if (!isOpen && previousActiveElementRef.current) {
1007
- previousActiveElementRef.current.focus();
1008
- }
1009
- };
1010
- }, [isOpen, onClose, blocking]);
1011
- const modalRoot = (() => {
1012
- if (typeof document === "undefined") return null;
1013
- let root = document.getElementById("modal-root");
1014
- if (!root) {
1015
- root = document.createElement("div");
1016
- root.id = "modal-root";
1017
- document.body.appendChild(root);
1631
+ );
1632
+ }
1633
+ function SkeletonRecentActivity({
1634
+ items = 5,
1635
+ className = ""
1636
+ }) {
1637
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
1638
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1639
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
1640
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-full", height: "h-4" }),
1641
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-1/2", height: "h-3" })
1642
+ ] }),
1643
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-4" })
1644
+ ] }, i)) });
1645
+ }
1646
+ function SkeletonForm({
1647
+ fields = 4,
1648
+ className = ""
1649
+ }) {
1650
+ return /* @__PURE__ */ jsxRuntime.jsx(SkeletonCard, { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1651
+ Array.from({ length: fields }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1652
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" }),
1653
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-full", height: "h-10" })
1654
+ ] }, i)),
1655
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end space-x-3 pt-4", children: [
1656
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-10" }),
1657
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-10" })
1658
+ ] })
1659
+ ] }) });
1660
+ }
1661
+ function SkeletonGameServerCards({
1662
+ items = 4,
1663
+ className = ""
1664
+ }) {
1665
+ return /* @__PURE__ */ jsxRuntime.jsx(
1666
+ "div",
1667
+ {
1668
+ className: `grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-6 ${className}`,
1669
+ children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonGameServerCard, {}, i))
1018
1670
  }
1019
- return root;
1020
- })();
1021
- if (!modalRoot) {
1022
- return null;
1023
- }
1024
- const backdropVariants = {
1025
- hidden: { opacity: 0 },
1026
- visible: { opacity: 1 }
1027
- };
1028
- const modalVariants = {
1029
- hidden: {
1030
- opacity: 0,
1031
- scale: 0.95,
1032
- y: 20
1033
- },
1034
- visible: {
1035
- opacity: 1,
1036
- scale: 1,
1037
- y: 0,
1038
- transition: {
1039
- duration: 0.2,
1040
- ease: "easeOut"
1041
- }
1042
- },
1043
- exit: {
1044
- opacity: 0,
1045
- scale: 0.9,
1046
- y: 100,
1047
- // Slide down much further for reverse effect
1048
- transition: {
1049
- duration: 0.3,
1050
- ease: "easeIn"
1051
- }
1671
+ );
1672
+ }
1673
+ function SkeletonNodeCards({
1674
+ items = 3,
1675
+ className = ""
1676
+ }) {
1677
+ return /* @__PURE__ */ jsxRuntime.jsx(
1678
+ "div",
1679
+ {
1680
+ className: `grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-6 ${className}`,
1681
+ children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonNodeCard, {}, i))
1052
1682
  }
1053
- };
1054
- if (!isOpen) return null;
1055
- if (variant === "plain") {
1056
- return reactDom.createPortal(
1057
- /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
1058
- framerMotion.motion.div,
1059
- {
1060
- className: `modal-backdrop fixed inset-0 w-screen h-screen flex items-center ${customStyles.backdrop?.includes("justify-") ? customStyles.backdrop : customStyles.backdrop ? `${customStyles.backdrop} justify-center` : "justify-center bg-black/10"} z-[999999] m-0 ${fullScreen ? "p-0" : "p-4"}`,
1061
- variants: backdropVariants,
1062
- initial: "hidden",
1063
- animate: isOpen ? "visible" : "hidden",
1064
- exit: "hidden",
1065
- onClick: blocking ? void 0 : onClose,
1066
- children: /* @__PURE__ */ jsxRuntime.jsx(
1067
- framerMotion.motion.div,
1068
- {
1069
- ref: modalContentRef,
1070
- role: "dialog",
1071
- "aria-modal": "true",
1072
- "aria-labelledby": title ? "modal-title-plain" : void 0,
1073
- "aria-describedby": ariaDescribedBy || "modal-content-plain",
1074
- tabIndex: -1,
1075
- className: `w-full flex flex-col overflow-hidden relative z-[1000000] ${customStyles.container || "bg-card shadow-xl"} ${fullScreen ? "h-full rounded-none" : `rounded-lg ${className} ${sizeClasses3[size]} max-h-[90vh]`}`,
1076
- variants: modalVariants,
1077
- initial: "hidden",
1078
- animate: isOpen ? "visible" : "exit",
1079
- exit: "exit",
1080
- onClick: (e) => e.stopPropagation(),
1081
- children: /* @__PURE__ */ jsxRuntime.jsx(
1082
- "div",
1083
- {
1084
- id: "modal-content-plain",
1085
- className: `flex-1 ${customStyles.content || ""}`,
1086
- children
1683
+ );
1684
+ }
1685
+ function SkeletonNodeTable({
1686
+ items = 3,
1687
+ className = ""
1688
+ }) {
1689
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "card overflow-hidden", children: [
1690
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4 border-b border-border bg-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1691
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
1692
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8" }),
1693
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1694
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-5", className: "mb-1" }),
1695
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-28", height: "h-4", className: "mb-1" }),
1696
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1697
+ ] })
1698
+ ] }),
1699
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
1700
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
1701
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-6", height: "h-6", className: "mr-2" }),
1702
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-4" })
1703
+ ] }),
1704
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1705
+ ] })
1706
+ ] }) }),
1707
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 py-4", children: [
1708
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: [
1709
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-2", children: [
1710
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-4", className: "mb-3" }),
1711
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start space-x-6", children: Array.from({ length: 3 }).map((_2, chartIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1712
+ /* @__PURE__ */ jsxRuntime.jsx(
1713
+ SkeletonItem,
1714
+ {
1715
+ width: "w-14",
1716
+ height: "h-14",
1717
+ rounded: true,
1718
+ className: "mx-auto mb-1"
1719
+ }
1720
+ ),
1721
+ /* @__PURE__ */ jsxRuntime.jsx(
1722
+ SkeletonItem,
1723
+ {
1724
+ width: "w-8",
1725
+ height: "h-3",
1726
+ className: "mx-auto mb-1"
1727
+ }
1728
+ ),
1729
+ /* @__PURE__ */ jsxRuntime.jsx(
1730
+ SkeletonItem,
1731
+ {
1732
+ width: "w-10",
1733
+ height: "h-3",
1734
+ className: "mx-auto"
1735
+ }
1736
+ )
1737
+ ] }, chartIndex)) })
1738
+ ] }),
1739
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1740
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4", className: "mb-3" }),
1741
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1742
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-5" }),
1743
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1744
+ ] })
1745
+ ] }),
1746
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1747
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-4", className: "mb-3" }),
1748
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1749
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1750
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1751
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1752
+ ] }),
1753
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1754
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1755
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1756
+ ] })
1757
+ ] })
1758
+ ] })
1759
+ ] }),
1760
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end items-center pt-4 border-t border-border mt-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex space-x-2", children: [
1761
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-8", rounded: true }),
1762
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1763
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1764
+ ] }) })
1765
+ ] })
1766
+ ] }, i)) });
1767
+ }
1768
+ function SkeletonGameServerTable({
1769
+ items = 3,
1770
+ className = ""
1771
+ }) {
1772
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(
1773
+ "div",
1774
+ {
1775
+ className: "card overflow-hidden min-h-[200px] flex flex-col",
1776
+ children: [
1777
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative px-5 py-4 border-b border-border bg-muted overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-3 relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1778
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-6", className: "mb-2" }),
1779
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-1", children: [
1780
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-4", height: "h-4", rounded: true }),
1781
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" })
1782
+ ] })
1783
+ ] }) }) }),
1784
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative px-4 py-3 pt-0 flex-grow", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row items-start md:items-center gap-4 md:gap-8", children: [
1785
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 w-full md:w-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-2 grid-cols-3", children: [
1786
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1787
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1788
+ /* @__PURE__ */ jsxRuntime.jsx(
1789
+ SkeletonItem,
1790
+ {
1791
+ width: "w-12",
1792
+ height: "h-3",
1793
+ className: "mx-auto mb-1"
1794
+ }
1795
+ ),
1796
+ /* @__PURE__ */ jsxRuntime.jsx(
1797
+ SkeletonItem,
1798
+ {
1799
+ width: "w-8",
1800
+ height: "h-3",
1801
+ className: "mx-auto"
1087
1802
  }
1088
1803
  )
1089
- },
1090
- "modal-content"
1091
- )
1092
- },
1093
- "modal-backdrop"
1094
- ) }),
1095
- modalRoot
1096
- );
1097
- }
1098
- return reactDom.createPortal(
1099
- /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
1100
- framerMotion.motion.div,
1101
- {
1102
- className: `modal-backdrop fixed inset-0 w-screen h-screen bg-black/10 flex items-center ${customStyles.backdrop || "justify-center"} z-[999999] m-0 ${fullScreen ? "p-0" : "p-4"}`,
1103
- variants: backdropVariants,
1104
- initial: "hidden",
1105
- animate: isOpen ? "visible" : "hidden",
1106
- exit: "hidden",
1107
- onClick: blocking ? void 0 : onClose,
1108
- children: /* @__PURE__ */ jsxRuntime.jsxs(
1109
- framerMotion.motion.div,
1110
- {
1111
- ref: modalContentRef,
1112
- role: "dialog",
1113
- "aria-modal": "true",
1114
- "aria-labelledby": title ? "modal-title" : void 0,
1115
- "aria-describedby": ariaDescribedBy || "modal-content",
1116
- tabIndex: -1,
1117
- className: `bg-card border border-border shadow-xl w-full flex flex-col overflow-hidden relative z-[1000000] ${fullScreen ? "h-full rounded-none" : `rounded-lg ${customStyles.container || className || sizeClasses3[size]} max-h-[90vh]`}`,
1118
- variants: modalVariants,
1119
- initial: "hidden",
1120
- animate: isOpen ? "visible" : "exit",
1121
- exit: "exit",
1122
- onClick: (e) => e.stopPropagation(),
1123
- children: [
1124
- header ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: header }) : title ? /* @__PURE__ */ jsxRuntime.jsxs(
1125
- "div",
1804
+ ] }),
1805
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1806
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1807
+ /* @__PURE__ */ jsxRuntime.jsx(
1808
+ SkeletonItem,
1126
1809
  {
1127
- className: `px-6 py-4 border-b border-border flex justify-between items-center flex-shrink-0 ${customStyles.header || ""}`,
1128
- children: [
1129
- /* @__PURE__ */ jsxRuntime.jsx(
1130
- "h2",
1131
- {
1132
- id: "modal-title",
1133
- className: "text-xl font-semibold text-foreground",
1134
- children: title
1135
- }
1136
- ),
1137
- /* @__PURE__ */ jsxRuntime.jsx(
1138
- "button",
1139
- {
1140
- onClick: onClose,
1141
- className: "p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-full transition-colors",
1142
- title: "Close",
1143
- "aria-label": "Close modal",
1144
- disabled: blocking,
1145
- children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: "w-5 h-5", "aria-hidden": "true" })
1146
- }
1147
- )
1148
- ]
1810
+ width: "w-8",
1811
+ height: "h-3",
1812
+ className: "mx-auto mb-1"
1149
1813
  }
1150
- ) : null,
1814
+ ),
1151
1815
  /* @__PURE__ */ jsxRuntime.jsx(
1152
- "div",
1816
+ SkeletonItem,
1153
1817
  {
1154
- id: "modal-content",
1155
- className: `bg-background text-foreground flex-1 ${scrollable ? "overflow-y-auto" : ""} ${fullScreen || noPadding ? "p-0" : "px-6 py-4"}`,
1156
- children
1818
+ width: "w-6",
1819
+ height: "h-3",
1820
+ className: "mx-auto"
1821
+ }
1822
+ )
1823
+ ] }),
1824
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1825
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1826
+ /* @__PURE__ */ jsxRuntime.jsx(
1827
+ SkeletonItem,
1828
+ {
1829
+ width: "w-12",
1830
+ height: "h-3",
1831
+ className: "mx-auto mb-1"
1157
1832
  }
1158
1833
  ),
1159
- footer && /* @__PURE__ */ jsxRuntime.jsx(
1160
- "div",
1834
+ /* @__PURE__ */ jsxRuntime.jsx(
1835
+ SkeletonItem,
1161
1836
  {
1162
- className: `flex-shrink-0 px-6 py-4 border-t border-border ${footerBg === "white" ? "bg-card" : "bg-muted"} ${customStyles.footer || ""}`,
1163
- children: footer
1837
+ width: "w-8",
1838
+ height: "h-3",
1839
+ className: "mx-auto"
1164
1840
  }
1165
1841
  )
1166
- ]
1167
- },
1168
- "modal-content"
1169
- )
1170
- },
1171
- "modal-backdrop"
1172
- ) }),
1173
- modalRoot
1842
+ ] })
1843
+ ] }) }),
1844
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-muted-foreground flex-1 w-full grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-1", children: [
1845
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1846
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1847
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1848
+ ] }),
1849
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1850
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1851
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1852
+ ] }),
1853
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1854
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1855
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1856
+ ] }),
1857
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1858
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1859
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1860
+ ] }),
1861
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1862
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1863
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1864
+ ] }),
1865
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1866
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1867
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1868
+ ] })
1869
+ ] })
1870
+ ] }) }),
1871
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 bg-card border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1872
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
1873
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1874
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1875
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1876
+ ] }) }),
1877
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
1878
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1879
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1880
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1881
+ ] })
1882
+ ] }) })
1883
+ ]
1884
+ },
1885
+ i
1886
+ )) });
1887
+ }
1888
+ function SkeletonGamesTable({
1889
+ items = 3,
1890
+ className = ""
1891
+ }) {
1892
+ return /* @__PURE__ */ jsxRuntime.jsx(
1893
+ "div",
1894
+ {
1895
+ className: `overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg ${className}`,
1896
+ children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-gray-300", children: [
1897
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1898
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Game" }),
1899
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Type" }),
1900
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Port" }),
1901
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Mode" }),
1902
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Status" }),
1903
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Created" }),
1904
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-2 py-1 rounded-md bg-muted backdrop-blur-sm text-center text-xs font-medium text-muted-foreground uppercase tracking-wider sticky right-0", children: "Actions" })
1905
+ ] }) }),
1906
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "table-body-card", children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "hover:bg-muted", children: [
1907
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
1908
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 h-10 w-10", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-10", height: "h-10", rounded: true }) }),
1909
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 min-w-0 flex-1", children: [
1910
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-4", className: "mb-1" }),
1911
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-48", height: "h-3" })
1912
+ ] })
1913
+ ] }) }),
1914
+ /* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-6 py-4 whitespace-nowrap", children: [
1915
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-4", className: "mb-1" }),
1916
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1917
+ ] }),
1918
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
1919
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-6", rounded: true }),
1920
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-3" })
1921
+ ] }) }),
1922
+ /* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-6 py-4 whitespace-nowrap", children: [
1923
+ /* @__PURE__ */ jsxRuntime.jsx(
1924
+ SkeletonItem,
1925
+ {
1926
+ width: "w-16",
1927
+ height: "h-6",
1928
+ rounded: true,
1929
+ className: "mb-1"
1930
+ }
1931
+ ),
1932
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-3" })
1933
+ ] }),
1934
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-6", rounded: true }) }),
1935
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-4" }) }),
1936
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium sticky right-0 bg-card", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end space-x-1", children: [
1937
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1938
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1939
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1940
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1941
+ ] }) })
1942
+ ] }, i)) })
1943
+ ] })
1944
+ }
1174
1945
  );
1175
1946
  }
1176
- var LoadingSpinner = ({
1177
- message = "Initializing...",
1178
- className,
1179
- showMessage = false
1180
- }) => {
1181
- const containerClasses = className !== void 0 ? className : "flex items-center justify-center h-screen min-h-screen";
1947
+ function SkeletonEnvironmentsList({
1948
+ items = 3,
1949
+ className = ""
1950
+ }) {
1951
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "card p-3", children: [
1952
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1953
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 w-full", children: [
1954
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-5", height: "h-5" }),
1955
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full pr-6 md:pr-12", children: [
1956
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
1957
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
1958
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-5" }),
1959
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-16", height: "h-5", rounded: true })
1960
+ ] }),
1961
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-48", height: "h-3" })
1962
+ ] }),
1963
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-20", height: "h-3" }) })
1964
+ ] })
1965
+ ] }),
1966
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }) })
1967
+ ] }) }),
1968
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: Array.from({ length: 2 + i % 3 }).map((_2, varIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 last:mb-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 items-center", children: [
1969
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-5", children: [
1970
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-32", height: "h-4", className: "mb-1" }),
1971
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-48", height: "h-3" })
1972
+ ] }),
1973
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-5 flex items-center space-x-2", children: [
1974
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1975
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-4" })
1976
+ ] }),
1977
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }) })
1978
+ ] }) }, varIndex)) })
1979
+ ] }, i)) });
1980
+ }
1981
+ function FormInput({
1982
+ label,
1983
+ name,
1984
+ type = "text",
1985
+ value,
1986
+ onChange,
1987
+ placeholder,
1988
+ required = false,
1989
+ disabled = false,
1990
+ error,
1991
+ className = "",
1992
+ inputClassName = "",
1993
+ min,
1994
+ max,
1995
+ step,
1996
+ maxLength,
1997
+ autoComplete,
1998
+ description,
1999
+ footerDescription,
2000
+ autoFocus = false,
2001
+ onKeyDown,
2002
+ onBlur,
2003
+ icon,
2004
+ options = [],
2005
+ multiSelect = false,
2006
+ selectWidth,
2007
+ searchable = false,
2008
+ clearable = true,
2009
+ rows = 3,
2010
+ showHidePassword = false,
2011
+ onGeneratePassword,
2012
+ isLoading = false,
2013
+ copyable = false,
2014
+ readOnly = false
2015
+ }) {
2016
+ const [showPassword, setShowPassword] = React4.useState(false);
2017
+ const [copied, setCopied] = React4.useState(false);
2018
+ const handleCopy = async () => {
2019
+ try {
2020
+ await navigator.clipboard.writeText(String(value));
2021
+ setCopied(true);
2022
+ setTimeout(() => setCopied(false), 2e3);
2023
+ } catch (err) {
2024
+ console.error("Failed to copy:", err);
2025
+ }
2026
+ };
2027
+ const shouldShowIcons = (inputType) => {
2028
+ return inputType !== "checkbox" && inputType !== "textarea";
2029
+ };
2030
+ const getIconConfig = (iconProp) => {
2031
+ if (!iconProp) return { left: null, right: null };
2032
+ if (React4__default.default.isValidElement(iconProp)) {
2033
+ return { left: iconProp, right: null };
2034
+ }
2035
+ if (typeof iconProp === "object" && iconProp !== null && ("left" in iconProp || "right" in iconProp)) {
2036
+ return { left: iconProp.left || null, right: iconProp.right || null };
2037
+ }
2038
+ return {
2039
+ left: React4__default.default.isValidElement(iconProp) ? iconProp : null,
2040
+ right: null
2041
+ };
2042
+ };
2043
+ const renderIcon = (iconNode, position) => {
2044
+ if (!iconNode) return null;
2045
+ const rightPositionClass = position === "right" && type === "number" ? "right-4 pr-3" : position === "right" ? "right-0 pr-3" : "left-0 pl-3";
2046
+ return /* @__PURE__ */ jsxRuntime.jsx(
2047
+ "div",
2048
+ {
2049
+ className: `absolute inset-y-0 ${rightPositionClass} flex items-center pointer-events-none`,
2050
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: iconNode })
2051
+ }
2052
+ );
2053
+ };
2054
+ const getInputPaddingClasses = (inputType, iconConfig) => {
2055
+ if (!shouldShowIcons(inputType)) return "";
2056
+ const paddingClasses3 = [];
2057
+ if (iconConfig.left) paddingClasses3.push("pl-10");
2058
+ if (iconConfig.right) {
2059
+ paddingClasses3.push(inputType === "number" ? "pr-12" : "pr-10");
2060
+ }
2061
+ return paddingClasses3.join(" ");
2062
+ };
2063
+ const SkeletonInput = () => {
2064
+ const iconConfig = getIconConfig(icon);
2065
+ const hasLeftIcon = iconConfig.left;
2066
+ const hasRightIcon = iconConfig.right;
2067
+ if (type === "checkbox") {
2068
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center p-2 space-x-3 h-full", children: [
2069
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative inline-flex h-6 w-11 items-center rounded-full bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block h-4 w-4 transform rounded-full bg-white border border-border translate-x-1" }) }),
2070
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
2071
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
2072
+ label,
2073
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
2074
+ ] }),
2075
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
2076
+ ] })
2077
+ ] });
2078
+ }
2079
+ if (type === "textarea") {
2080
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2081
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
2082
+ label,
2083
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2084
+ ] }),
2085
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: description }),
2086
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
2087
+ SkeletonItem,
2088
+ {
2089
+ width: "w-full",
2090
+ height: "h-24",
2091
+ className: `rounded-md`
2092
+ }
2093
+ ) }),
2094
+ footerDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: footerDescription })
2095
+ ] });
2096
+ }
2097
+ if (type === "color") {
2098
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2099
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
2100
+ label,
2101
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2102
+ ] }),
2103
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: description }),
2104
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
2105
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-10", height: "h-10", className: "rounded-md" }),
2106
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-24", height: "h-10", className: "rounded-md" }) })
2107
+ ] })
2108
+ ] });
2109
+ }
2110
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2111
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
2112
+ label,
2113
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2114
+ ] }),
2115
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: description }),
2116
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
2117
+ /* @__PURE__ */ jsxRuntime.jsx(
2118
+ SkeletonItem,
2119
+ {
2120
+ width: "w-full",
2121
+ height: "h-10",
2122
+ className: `rounded-md ${hasLeftIcon ? "pl-10" : ""} ${hasRightIcon ? "pr-10" : ""}`
2123
+ }
2124
+ ),
2125
+ hasLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-5", height: "h-5", className: "rounded-full" }) }),
2126
+ hasRightIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonItem, { width: "w-5", height: "h-5", className: "rounded-full" }) })
2127
+ ] }),
2128
+ footerDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: footerDescription })
2129
+ ] });
2130
+ };
2131
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `form-group ${className}`, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(SkeletonInput, {}) : type === "checkbox" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center p-2 space-x-3 h-full", children: [
2132
+ /* @__PURE__ */ jsxRuntime.jsx(
2133
+ "input",
2134
+ {
2135
+ id: name,
2136
+ name,
2137
+ type: "checkbox",
2138
+ checked: Boolean(value),
2139
+ onChange: (e) => {
2140
+ const newValue = e.target.checked;
2141
+ const syntheticEvent = {
2142
+ target: {
2143
+ name: e.target.name,
2144
+ value: newValue,
2145
+ checked: newValue
2146
+ },
2147
+ currentTarget: {
2148
+ name: e.target.name,
2149
+ value: newValue,
2150
+ checked: newValue
2151
+ }
2152
+ };
2153
+ onChange(syntheticEvent);
2154
+ },
2155
+ required,
2156
+ disabled,
2157
+ onKeyDown,
2158
+ className: "sr-only",
2159
+ "aria-label": label,
2160
+ "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
2161
+ "aria-invalid": error ? "true" : "false"
2162
+ }
2163
+ ),
2164
+ /* @__PURE__ */ jsxRuntime.jsx(
2165
+ "button",
2166
+ {
2167
+ type: "button",
2168
+ onClick: () => {
2169
+ if (!disabled) {
2170
+ const checkbox = document.getElementById(
2171
+ name
2172
+ );
2173
+ if (checkbox) {
2174
+ checkbox.click();
2175
+ }
2176
+ }
2177
+ },
2178
+ disabled,
2179
+ className: `
2180
+ relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
2181
+ ${Boolean(value) ? "bg-primary" : "bg-muted"}
2182
+ ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
2183
+ ${error ? "ring-2 ring-destructive" : ""}
2184
+ `,
2185
+ "aria-label": `${label}${required ? " (required)" : ""}`,
2186
+ "aria-describedby": name,
2187
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2188
+ "span",
2189
+ {
2190
+ className: `
2191
+ inline-block h-4 w-4 transform rounded-full bg-background border border-border transition duration-200 ease-in-out
2192
+ ${Boolean(value) ? "translate-x-6" : "translate-x-1"}
2193
+ `
2194
+ }
2195
+ )
2196
+ }
2197
+ ),
2198
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
2199
+ /* @__PURE__ */ jsxRuntime.jsxs(
2200
+ "label",
2201
+ {
2202
+ htmlFor: name,
2203
+ className: "text-sm font-medium text-foreground cursor-pointer",
2204
+ onClick: () => {
2205
+ if (!disabled) {
2206
+ const checkbox = document.getElementById(
2207
+ name
2208
+ );
2209
+ if (checkbox) {
2210
+ checkbox.click();
2211
+ }
2212
+ }
2213
+ },
2214
+ children: [
2215
+ label,
2216
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", "aria-label": "required", children: "*" })
2217
+ ]
2218
+ }
2219
+ ),
2220
+ description && /* @__PURE__ */ jsxRuntime.jsx(
2221
+ "span",
2222
+ {
2223
+ id: `${name}-description`,
2224
+ className: "text-xs text-muted-foreground",
2225
+ children: description
2226
+ }
2227
+ )
2228
+ ] }),
2229
+ error && /* @__PURE__ */ jsxRuntime.jsx("div", { id: `${name}-error`, className: "form-error", role: "alert", children: typeof error === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: error }) : error })
2230
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2231
+ label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: name, className: "form-label", children: [
2232
+ label,
2233
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "form-label-required", children: "*" })
2234
+ ] }),
2235
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${name}-description`, className: "form-description", children: description }),
2236
+ type === "select" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
2237
+ /* @__PURE__ */ jsxRuntime.jsx(
2238
+ SmartSelect,
2239
+ {
2240
+ value: multiSelect ? Array.isArray(value) ? value : value ? String(value).split(",") : [] : String(value),
2241
+ onChange: multiSelect ? (selectedValue) => {
2242
+ const syntheticEvent = {
2243
+ target: {
2244
+ name,
2245
+ value: Array.isArray(selectedValue) ? selectedValue.join(",") : selectedValue
2246
+ }
2247
+ };
2248
+ onChange(syntheticEvent);
2249
+ } : (selectedValue) => {
2250
+ const syntheticEvent = {
2251
+ target: {
2252
+ name,
2253
+ value: selectedValue
2254
+ }
2255
+ };
2256
+ onChange(syntheticEvent);
2257
+ },
2258
+ options,
2259
+ placeholder: placeholder || "Select an option...",
2260
+ className: `form-input ${error ? "form-input-error" : ""} ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`,
2261
+ multiple: multiSelect,
2262
+ width: selectWidth,
2263
+ searchable,
2264
+ clearable
2265
+ }
2266
+ ),
2267
+ shouldShowIcons(type) && (() => {
2268
+ const iconConfig = getIconConfig(icon);
2269
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2270
+ renderIcon(iconConfig.left, "left"),
2271
+ renderIcon(iconConfig.right, "right")
2272
+ ] });
2273
+ })()
2274
+ ] }) : type === "textarea" ? /* @__PURE__ */ jsxRuntime.jsx(
2275
+ "textarea",
2276
+ {
2277
+ id: name,
2278
+ name,
2279
+ value,
2280
+ onChange,
2281
+ placeholder,
2282
+ required,
2283
+ disabled,
2284
+ autoFocus,
2285
+ onKeyDown,
2286
+ onBlur,
2287
+ rows,
2288
+ maxLength,
2289
+ "aria-invalid": error ? "true" : "false",
2290
+ "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
2291
+ className: `form-input ${error ? "form-input-error" : ""} ${inputClassName}`
2292
+ }
2293
+ ) : type === "color" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
2294
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-10 h-10 border border-input rounded-md overflow-hidden bg-card", children: [
2295
+ /* @__PURE__ */ jsxRuntime.jsx(
2296
+ "input",
2297
+ {
2298
+ id: name,
2299
+ name,
2300
+ type: "color",
2301
+ value,
2302
+ onChange,
2303
+ required,
2304
+ disabled,
2305
+ className: "absolute inset-0 w-full h-full cursor-pointer opacity-0"
2306
+ }
2307
+ ),
2308
+ /* @__PURE__ */ jsxRuntime.jsx(
2309
+ "div",
2310
+ {
2311
+ className: "w-full h-full rounded-md",
2312
+ style: { backgroundColor: value }
2313
+ }
2314
+ )
2315
+ ] }),
2316
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
2317
+ /* @__PURE__ */ jsxRuntime.jsx(
2318
+ "input",
2319
+ {
2320
+ id: `${name}-text`,
2321
+ name: `${name}-text`,
2322
+ type: "text",
2323
+ value,
2324
+ onChange,
2325
+ placeholder,
2326
+ required,
2327
+ disabled,
2328
+ maxLength,
2329
+ autoComplete,
2330
+ autoFocus,
2331
+ onKeyDown,
2332
+ onBlur,
2333
+ className: `form-input max-w-24 ${error ? "form-input-error" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`,
2334
+ "aria-label": `${label} text input`
2335
+ }
2336
+ ),
2337
+ shouldShowIcons(type) && (() => {
2338
+ const iconConfig = getIconConfig(icon);
2339
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2340
+ renderIcon(iconConfig.left, "left"),
2341
+ renderIcon(iconConfig.right, "right")
2342
+ ] });
2343
+ })()
2344
+ ] })
2345
+ ] }) : showHidePassword && type === "password" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
2346
+ /* @__PURE__ */ jsxRuntime.jsx(
2347
+ "input",
2348
+ {
2349
+ id: name,
2350
+ name,
2351
+ type: showPassword ? "text" : "password",
2352
+ value,
2353
+ onChange,
2354
+ placeholder,
2355
+ required,
2356
+ disabled: disabled || readOnly,
2357
+ readOnly,
2358
+ maxLength,
2359
+ autoComplete,
2360
+ autoFocus,
2361
+ onKeyDown,
2362
+ onBlur,
2363
+ "aria-invalid": error ? "true" : "false",
2364
+ "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
2365
+ className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-20" : "pr-10"} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
2366
+ }
2367
+ ),
2368
+ shouldShowIcons(type) && (() => {
2369
+ const iconConfig = getIconConfig(icon);
2370
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2371
+ renderIcon(iconConfig.left, "left"),
2372
+ renderIcon(iconConfig.right, "right")
2373
+ ] });
2374
+ })(),
2375
+ copyable && /* @__PURE__ */ jsxRuntime.jsx(
2376
+ "button",
2377
+ {
2378
+ type: "button",
2379
+ onClick: handleCopy,
2380
+ className: "absolute inset-y-0 right-8 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10",
2381
+ "aria-label": `Copy ${label}`,
2382
+ title: copied ? "Copied!" : `Copy ${label}`,
2383
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-green-500", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiFileCopyLine, { className: "w-4 h-4", "aria-hidden": "true" })
2384
+ }
2385
+ ),
2386
+ /* @__PURE__ */ jsxRuntime.jsx(
2387
+ "button",
2388
+ {
2389
+ type: "button",
2390
+ onClick: () => setShowPassword(!showPassword),
2391
+ className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10",
2392
+ "aria-label": showPassword ? "Hide password" : "Show password",
2393
+ title: showPassword ? "Hide password" : "Show password",
2394
+ children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiEyeOffLine, { className: "w-4 h-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiEyeLine, { className: "w-4 h-4", "aria-hidden": "true" })
2395
+ }
2396
+ ),
2397
+ onGeneratePassword && !readOnly && /* @__PURE__ */ jsxRuntime.jsx(
2398
+ "button",
2399
+ {
2400
+ type: "button",
2401
+ onClick: onGeneratePassword,
2402
+ className: `absolute inset-y-0 ${copyable ? "right-16" : "right-8"} flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10`,
2403
+ "aria-label": "Generate new password",
2404
+ title: "Generate new password",
2405
+ children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiRefreshLine, { className: "w-4 h-4", "aria-hidden": "true" })
2406
+ }
2407
+ )
2408
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
2409
+ /* @__PURE__ */ jsxRuntime.jsx(
2410
+ "input",
2411
+ {
2412
+ id: name,
2413
+ name,
2414
+ type,
2415
+ value,
2416
+ onChange,
2417
+ placeholder,
2418
+ required,
2419
+ disabled: disabled || readOnly,
2420
+ readOnly,
2421
+ min,
2422
+ max,
2423
+ step,
2424
+ maxLength,
2425
+ autoComplete,
2426
+ autoFocus,
2427
+ onKeyDown,
2428
+ onBlur,
2429
+ "aria-invalid": error ? "true" : "false",
2430
+ "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
2431
+ className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-10" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
2432
+ }
2433
+ ),
2434
+ shouldShowIcons(type) && (() => {
2435
+ const iconConfig = getIconConfig(icon);
2436
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2437
+ renderIcon(iconConfig.left, "left"),
2438
+ renderIcon(iconConfig.right, "right")
2439
+ ] });
2440
+ })(),
2441
+ copyable && /* @__PURE__ */ jsxRuntime.jsx(
2442
+ "button",
2443
+ {
2444
+ type: "button",
2445
+ onClick: handleCopy,
2446
+ className: `absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-all duration-200 z-10`,
2447
+ "aria-label": `Copy ${label}`,
2448
+ title: copied ? "Copied!" : `Copy ${label}`,
2449
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-green-500", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiFileCopyLine, { className: "w-4 h-4", "aria-hidden": "true" })
2450
+ }
2451
+ ),
2452
+ clearable && !copyable && value !== "" && value !== null && value !== void 0 && !disabled && !readOnly && /* @__PURE__ */ jsxRuntime.jsx(
2453
+ "button",
2454
+ {
2455
+ type: "button",
2456
+ onClick: () => {
2457
+ const syntheticEvent = {
2458
+ target: { name, value: "" }
2459
+ };
2460
+ onChange(syntheticEvent);
2461
+ },
2462
+ className: `absolute inset-y-0 ${type === "number" ? "right-4" : "right-0"} flex items-center pr-3 text-muted-foreground hover:text-muted-foreground transition-all duration-200 z-10 opacity-0 group-hover:opacity-100`,
2463
+ "aria-label": `Clear ${label}`,
2464
+ title: `Clear ${label}`,
2465
+ children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: "w-4 h-4", "aria-hidden": "true" })
2466
+ }
2467
+ )
2468
+ ] }),
2469
+ footerDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs mt-1", children: footerDescription }),
2470
+ error && /* @__PURE__ */ jsxRuntime.jsx("div", { id: `${name}-error`, className: "form-error", role: "alert", children: typeof error === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: error }) : error })
2471
+ ] }) });
2472
+ }
2473
+ function FormSection({
2474
+ title,
2475
+ description,
2476
+ children,
2477
+ className = ""
2478
+ }) {
2479
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `space-y-4 ${className}`, children: [
2480
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2481
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-medium ", children: title }),
2482
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
2483
+ ] }),
2484
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children })
2485
+ ] });
2486
+ }
2487
+ function Grid({
2488
+ children,
2489
+ cols = 1,
2490
+ gap = 4,
2491
+ className = ""
2492
+ }) {
2493
+ const colClasses = {
2494
+ 1: "grid-cols-1",
2495
+ 2: "grid-cols-1 md:grid-cols-2",
2496
+ 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
2497
+ 4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
2498
+ 5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5",
2499
+ 6: "grid-cols-2 md:grid-cols-3 lg:grid-cols-6",
2500
+ 12: "grid-cols-12"
2501
+ };
2502
+ const gapClasses = {
2503
+ 1: "gap-1",
2504
+ 2: "gap-2",
2505
+ 3: "gap-3",
2506
+ 4: "gap-4",
2507
+ 6: "gap-6",
2508
+ 8: "gap-8"
2509
+ };
2510
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `grid ${colClasses[cols]} ${gapClasses[gap]} ${className}`, children });
2511
+ }
2512
+ var variantStyles = {
2513
+ default: "bg-accent border-border text-muted-foreground",
2514
+ warning: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-700 dark:text-yellow-300",
2515
+ info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-700 dark:text-blue-300",
2516
+ success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-700 dark:text-green-300"
2517
+ };
2518
+ var titleStyles = {
2519
+ default: "text-foreground",
2520
+ warning: "text-yellow-800 dark:text-yellow-200",
2521
+ info: "text-blue-800 dark:text-blue-200",
2522
+ success: "text-green-800 dark:text-green-200"
2523
+ };
2524
+ function InfoBox({
2525
+ title,
2526
+ children,
2527
+ variant = "default",
2528
+ className = ""
2529
+ }) {
2530
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `border rounded-md p-4 ${variantStyles[variant]} ${className}`, children: [
2531
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: `font-medium mb-2 ${titleStyles[variant]}`, children: title }),
2532
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm space-y-1 [&>ul]:list-disc [&>ul]:list-outside [&>ul]:pl-3 [&>ol]:list-decimal [&>ol]:list-outside [&>ol]:pl-4", children })
2533
+ ] });
2534
+ }
2535
+ var variantClasses3 = {
2536
+ default: "text-foreground hover:text-primary",
2537
+ primary: "text-primary hover:text-primary/80",
2538
+ muted: "text-muted-foreground hover:text-foreground"
2539
+ };
2540
+ var Link = React4.forwardRef(
2541
+ ({
2542
+ href,
2543
+ variant = "default",
2544
+ underline = false,
2545
+ external = false,
2546
+ className = "",
2547
+ children,
2548
+ ...props
2549
+ }, ref) => {
2550
+ const classes = [
2551
+ "transition-colors",
2552
+ variantClasses3[variant],
2553
+ underline ? "underline underline-offset-4" : "hover:underline hover:underline-offset-4",
2554
+ className
2555
+ ].filter(Boolean).join(" ");
2556
+ if (external || href.startsWith("http")) {
2557
+ return /* @__PURE__ */ jsxRuntime.jsx(
2558
+ "a",
2559
+ {
2560
+ ref,
2561
+ href,
2562
+ className: classes,
2563
+ target: "_blank",
2564
+ rel: "noopener noreferrer",
2565
+ ...props,
2566
+ children
2567
+ }
2568
+ );
2569
+ }
2570
+ return /* @__PURE__ */ jsxRuntime.jsx(NextLink__default.default, { ref, href, className: classes, ...props, children });
2571
+ }
2572
+ );
2573
+ Link.displayName = "Link";
2574
+ var Link_default = Link;
2575
+ var LoadingSpinner = ({
2576
+ message = "Initializing...",
2577
+ className,
2578
+ showMessage = false
2579
+ }) => {
2580
+ const containerClasses = className !== void 0 ? className : "flex items-center justify-center h-screen min-h-screen";
2581
+ return /* @__PURE__ */ jsxRuntime.jsx(
2582
+ "div",
2583
+ {
2584
+ className: containerClasses,
2585
+ role: "status",
2586
+ "aria-live": "polite",
2587
+ "aria-label": message,
2588
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
2589
+ /* @__PURE__ */ jsxRuntime.jsxs(
2590
+ "div",
2591
+ {
2592
+ className: "flex items-center justify-center space-x-2 mb-6",
2593
+ "aria-hidden": "true",
2594
+ children: [
2595
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-12 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0s]" }),
2596
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-8 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0.2s]" }),
2597
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-8 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0.4s]" }),
2598
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-12 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0.6s]" })
2599
+ ]
2600
+ }
2601
+ ),
2602
+ showMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ jsxRuntime.jsx(
2603
+ "p",
2604
+ {
2605
+ className: "text-sm text-secondary-foreground animate-pulse",
2606
+ "aria-live": "polite",
2607
+ children: message
2608
+ }
2609
+ ) })
2610
+ ] })
2611
+ }
2612
+ );
2613
+ };
2614
+ var LoadingSpinner_default = LoadingSpinner;
2615
+ function PageHeader({
2616
+ icon: Icon,
2617
+ title,
2618
+ subtitle,
2619
+ rightContent,
2620
+ className = ""
2621
+ }) {
2622
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mb-6 lg:mb-8 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "header-layout", children: [
2623
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
2624
+ Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-6 h-6 lg:w-8 lg:h-8 flex-shrink-0" }),
2625
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2626
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl lg:text-3xl font-bold text-foreground truncate", children: title }),
2627
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm lg:text-base text-muted-foreground", children: subtitle })
2628
+ ] })
2629
+ ] }),
2630
+ rightContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2 lg:space-x-3 flex-shrink-0", children: rightContent })
2631
+ ] }) });
2632
+ }
2633
+ function Switch({
2634
+ checked,
2635
+ onChange,
2636
+ disabled = false,
2637
+ label,
2638
+ description,
2639
+ className = "",
2640
+ size = "md"
2641
+ }) {
2642
+ const toggle = () => {
2643
+ if (!disabled) {
2644
+ onChange(!checked);
2645
+ }
2646
+ };
2647
+ const sizes = {
2648
+ sm: { track: "w-8 h-4", thumb: "w-3 h-3", translate: "translate-x-4" },
2649
+ md: { track: "w-11 h-6", thumb: "w-5 h-5", translate: "translate-x-5" },
2650
+ lg: { track: "w-14 h-8", thumb: "w-7 h-7", translate: "translate-x-6" }
2651
+ };
2652
+ const currentSize = sizes[size];
2653
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-start ${className}`, children: [
2654
+ /* @__PURE__ */ jsxRuntime.jsx(
2655
+ "button",
2656
+ {
2657
+ type: "button",
2658
+ role: "switch",
2659
+ "aria-checked": checked,
2660
+ disabled,
2661
+ onClick: toggle,
2662
+ className: `
2663
+ relative inline-flex flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent
2664
+ transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
2665
+ ${checked ? "bg-primary" : "bg-muted"}
2666
+ ${disabled ? "opacity-50 cursor-not-allowed" : ""}
2667
+ ${currentSize.track}
2668
+ `,
2669
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2670
+ "span",
2671
+ {
2672
+ "aria-hidden": "true",
2673
+ className: `
2674
+ pointer-events-none inline-block transform rounded-full bg-white shadow ring-0
2675
+ transition duration-200 ease-in-out
2676
+ ${checked ? currentSize.translate : "translate-x-0"}
2677
+ ${currentSize.thumb}
2678
+ `
2679
+ }
2680
+ )
2681
+ }
2682
+ ),
2683
+ (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-3 text-sm leading-6", children: [
2684
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "font-medium text-foreground cursor-pointer", onClick: toggle, children: label }),
2685
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: description })
2686
+ ] })
2687
+ ] });
2688
+ }
2689
+ var variantClasses4 = {
2690
+ default: "text-foreground",
2691
+ muted: "text-muted-foreground",
2692
+ bold: "font-semibold"
2693
+ };
2694
+ var sizeClasses4 = {
2695
+ xs: "text-xs",
2696
+ sm: "text-sm",
2697
+ base: "text-base",
2698
+ lg: "text-lg",
2699
+ xl: "text-xl",
2700
+ "2xl": "text-2xl",
2701
+ "3xl": "text-3xl"
2702
+ };
2703
+ function Typography({
2704
+ as: Element = "p",
2705
+ variant = "default",
2706
+ size = "base",
2707
+ children,
2708
+ className = ""
2709
+ }) {
2710
+ const classes = `${variantClasses4[variant]} ${sizeClasses4[size]} ${className}`;
2711
+ return /* @__PURE__ */ jsxRuntime.jsx(Element, { className: classes, children });
2712
+ }
2713
+ var Spinner = ({
2714
+ size = "md",
2715
+ color = "primary",
2716
+ className = ""
2717
+ }) => {
2718
+ const sizeClasses5 = {
2719
+ sm: "h-4 w-4",
2720
+ md: "h-8 w-8",
2721
+ lg: "h-12 w-12",
2722
+ xl: "h-16 w-16"
2723
+ };
2724
+ const colorClasses2 = {
2725
+ primary: "border-primary-600",
2726
+ blue: "border-ring",
2727
+ white: "border-white",
2728
+ current: "border-current"
2729
+ };
2730
+ const baseClasses = "animate-spin rounded-full border-2 border-t-transparent";
2731
+ const sizeClass = sizeClasses5[size];
2732
+ const colorClass = colorClasses2[color];
2733
+ const finalClasses = `${baseClasses} ${sizeClass} ${colorClass} ${className}`.trim();
2734
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: finalClasses });
2735
+ };
2736
+ var Spinner_default = Spinner;
2737
+ function DataTable({
2738
+ children,
2739
+ className = "",
2740
+ containerClassName = "",
2741
+ stickyActions = false
2742
+ }) {
2743
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `card overflow-hidden ${containerClassName}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
2744
+ "table",
2745
+ {
2746
+ role: "table",
2747
+ "aria-label": "Data table",
2748
+ className: `w-full divide-y divide-border ${className} ${stickyActions ? "relative" : ""}`,
2749
+ children
2750
+ }
2751
+ ) }) });
2752
+ }
2753
+ function DataTableHeader({
2754
+ children,
2755
+ className = ""
2756
+ }) {
2757
+ return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: `bg-muted ${className}`, children });
2758
+ }
2759
+ function DataTableBody({
2760
+ children,
2761
+ className = ""
2762
+ }) {
2763
+ return /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: `table-body-card ${className}`, children });
2764
+ }
2765
+ function DataTableRow({
2766
+ children,
2767
+ className = "",
2768
+ onClick,
2769
+ hover = true
2770
+ }) {
2771
+ const baseClasses = "hover:bg-muted transition-colors duration-150";
2772
+ const clickableClasses = onClick ? "cursor-pointer" : "";
2773
+ const hoverClasses = hover ? baseClasses : "";
2774
+ return /* @__PURE__ */ jsxRuntime.jsx(
2775
+ "tr",
2776
+ {
2777
+ className: `${hoverClasses} ${clickableClasses} ${className}`,
2778
+ onClick,
2779
+ children
2780
+ }
2781
+ );
2782
+ }
2783
+ function DataTableHeaderCell({
2784
+ children,
2785
+ className = "",
2786
+ align = "left",
2787
+ padding = "md",
2788
+ sticky,
2789
+ stickyOffset = 0
2790
+ }) {
2791
+ const alignClasses = {
2792
+ left: "text-left",
2793
+ center: "text-center",
2794
+ right: "text-right"
2795
+ };
2796
+ const paddingClasses3 = {
2797
+ sm: "px-3 py-2",
2798
+ md: "px-6 py-3",
2799
+ lg: "px-8 py-4"
2800
+ };
2801
+ const stickyClasses = sticky ? `sticky ${sticky === "left" ? "left-0" : "right-0"} z-10` : "";
2802
+ const stickyOffsetClasses = sticky && stickyOffset > 0 ? sticky === "left" ? `left-${stickyOffset}` : `right-${stickyOffset}` : "";
2803
+ const stickyStyling = "";
2804
+ return /* @__PURE__ */ jsxRuntime.jsx(
2805
+ "th",
2806
+ {
2807
+ scope: "col",
2808
+ className: `${paddingClasses3[padding]} ${alignClasses[align]} text-xs font-medium text-muted-foreground uppercase tracking-wider ${stickyClasses} ${stickyOffsetClasses} ${stickyStyling} ${className}`,
2809
+ children
2810
+ }
2811
+ );
2812
+ }
2813
+ function DataTableCell({
2814
+ children,
2815
+ className = "",
2816
+ align = "left",
2817
+ padding = "md",
2818
+ sticky,
2819
+ stickyOffset = 0
2820
+ }) {
2821
+ const alignClasses = {
2822
+ left: "text-left",
2823
+ center: "text-center",
2824
+ right: "text-right"
2825
+ };
2826
+ const paddingClasses3 = {
2827
+ sm: "px-3 py-2",
2828
+ md: "px-6 py-4",
2829
+ lg: "px-8 py-6"
2830
+ };
2831
+ const stickyClasses = sticky ? `sticky ${sticky === "left" ? "left-0" : "right-0"} z-10` : "";
2832
+ const stickyOffsetClasses = sticky && stickyOffset > 0 ? sticky === "left" ? `left-${stickyOffset}` : `right-${stickyOffset}` : "";
2833
+ const stickyStyling = "";
2834
+ return /* @__PURE__ */ jsxRuntime.jsx(
2835
+ "td",
2836
+ {
2837
+ className: `${paddingClasses3[padding]} whitespace-nowrap ${alignClasses[align]} text-sm ${stickyClasses} ${stickyOffsetClasses} ${stickyStyling} ${className}`,
2838
+ children
2839
+ }
2840
+ );
2841
+ }
2842
+ function DataTableEmptyState({
2843
+ icon: Icon,
2844
+ title,
2845
+ description,
2846
+ action,
2847
+ variant = "table"
2848
+ }) {
2849
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2850
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-20 h-20 text-primary-500 mx-auto mb-4" }),
2851
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-medium text-foreground mb-2", children: title }),
2852
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-6", children: description }),
2853
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: action })
2854
+ ] });
2855
+ if (variant === "div") {
2856
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "card card-padding text-center lg:p-24", children: content });
2857
+ }
2858
+ return /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 100, className: "px-6 py-12 text-center", children: content }) });
2859
+ }
2860
+ function DataTableLoadingState({
2861
+ message = "Loading...",
2862
+ rows = 5,
2863
+ columns = 4
2864
+ }) {
2865
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "card card-padding", children: [
2866
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-4", children: [
2867
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner_default, { size: "md", color: "primary", className: "mx-auto mb-2" }),
2868
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: message })
2869
+ ] }),
2870
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonTable, { rows, columns, showHeader: false })
2871
+ ] });
2872
+ }
2873
+ function StatusBadge({
2874
+ status,
2875
+ variant = "default"
2876
+ }) {
2877
+ const variantClasses5 = {
2878
+ default: "bg-muted text-muted-foreground",
2879
+ success: "bg-success text-success-dark",
2880
+ warning: "bg-yellow-100 text-yellow-800",
2881
+ error: "bg-red-100 text-red-800",
2882
+ info: "bg-primary-100 text-primary-800"
2883
+ };
2884
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `badge ${variantClasses5[variant]}`, children: status });
2885
+ }
2886
+ function DataTableActions({
2887
+ children,
2888
+ className = "",
2889
+ enhanced = false
2890
+ }) {
2891
+ const baseClasses = "flex items-center justify-end space-x-2 dt-actions";
2892
+ const enhancedClasses = enhanced ? "px-2 py-1 rounded-md bg-card backdrop-blur-sm" : "";
2893
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${baseClasses} ${enhancedClasses} ${className}`, children });
2894
+ }
2895
+ function StickyActionsColumn({
2896
+ children,
2897
+ className = ""
2898
+ }) {
1182
2899
  return /* @__PURE__ */ jsxRuntime.jsx(
1183
2900
  "div",
1184
2901
  {
1185
- className: containerClasses,
1186
- role: "status",
1187
- "aria-live": "polite",
1188
- "aria-label": message,
1189
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1190
- /* @__PURE__ */ jsxRuntime.jsxs(
2902
+ className: `border-l border-border shadow-[-1px_0_3px_-1px_rgba(0,0,0,0.02)] ${className}`,
2903
+ children
2904
+ }
2905
+ );
2906
+ }
2907
+ function SharedTooltip({
2908
+ id,
2909
+ place = "top",
2910
+ offset = 8,
2911
+ delayShow = 200,
2912
+ delayHide = 100,
2913
+ className = "",
2914
+ style = {},
2915
+ children
2916
+ }) {
2917
+ return /* @__PURE__ */ jsxRuntime.jsx(
2918
+ reactTooltip.Tooltip,
2919
+ {
2920
+ id,
2921
+ place,
2922
+ offset,
2923
+ delayShow,
2924
+ delayHide,
2925
+ className: `!bg-popover !text-popover-foreground !border !border-border !shadow-md !text-xs !px-2 !py-1 !rounded-md z-50 ${className}`,
2926
+ style,
2927
+ positionStrategy: "fixed",
2928
+ render: children ? () => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }) : void 0
2929
+ }
2930
+ );
2931
+ }
2932
+ function CountBadge({
2933
+ count,
2934
+ className = "",
2935
+ size = "sm",
2936
+ variant = "primary"
2937
+ }) {
2938
+ const sizeClasses5 = {
2939
+ sm: "text-xs px-1.5 py-0.5 min-w-[18px]",
2940
+ md: "text-sm px-2 py-1 min-w-[20px]",
2941
+ lg: "text-base px-2.5 py-1.5 min-w-[24px]"
2942
+ };
2943
+ const variantClasses5 = {
2944
+ primary: "bg-ring ",
2945
+ secondary: "bg-muted0 ",
2946
+ success: "bg-green-500 ",
2947
+ warning: "bg-yellow-500 ",
2948
+ error: "bg-red-500 "
2949
+ };
2950
+ if (count <= 0) return null;
2951
+ return /* @__PURE__ */ jsxRuntime.jsx(
2952
+ "span",
2953
+ {
2954
+ "aria-label": `Count: ${count}`,
2955
+ className: `${sizeClasses5[size]} ${variantClasses5[variant]} rounded-full text-center font-medium ${className}`,
2956
+ children: count
2957
+ }
2958
+ );
2959
+ }
2960
+ function ClearButton({
2961
+ onClick,
2962
+ className = "",
2963
+ size = "sm",
2964
+ variant = "overlay",
2965
+ tooltipId,
2966
+ tooltipContent = "Clear"
2967
+ }) {
2968
+ const sizeClasses5 = {
2969
+ sm: "w-4 h-4",
2970
+ md: "w-5 h-5",
2971
+ lg: "w-6 h-6"
2972
+ };
2973
+ const iconSizeClasses2 = {
2974
+ sm: "w-3 h-3",
2975
+ md: "w-4 h-4",
2976
+ lg: "w-5 h-5"
2977
+ };
2978
+ const variantClasses5 = {
2979
+ overlay: "absolute -top-1 -right-1 bg-red-500 rounded-full flex items-center justify-center hover:bg-red-600 transition-colors cursor-pointer",
2980
+ inline: "bg-red-500 rounded-full flex items-center justify-center hover:bg-red-600 transition-colors",
2981
+ ghost: "text-muted-foreground hover:text-muted-foreground transition-colors"
2982
+ };
2983
+ const baseProps = {
2984
+ onClick: (e) => {
2985
+ e.stopPropagation();
2986
+ onClick(e);
2987
+ },
2988
+ className: `${sizeClasses5[size]} ${variantClasses5[variant]} ${className}`,
2989
+ title: tooltipContent
2990
+ };
2991
+ const tooltipProps = tooltipId ? {
2992
+ "data-tooltip-id": tooltipId,
2993
+ "data-tooltip-content": tooltipContent
2994
+ } : {};
2995
+ const Element = variant === "overlay" ? "span" : "button";
2996
+ return /* @__PURE__ */ jsxRuntime.jsx(Element, { ...baseProps, ...tooltipProps, children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiCloseLine, { className: iconSizeClasses2[size] }) });
2997
+ }
2998
+ function IconButtonWithCount({
2999
+ icon,
3000
+ label,
3001
+ count = 0,
3002
+ onClick,
3003
+ onClear,
3004
+ showLabel = true,
3005
+ className = "",
3006
+ buttonClassName = "",
3007
+ countVariant = "primary",
3008
+ clearVariant = "overlay",
3009
+ tooltipId,
3010
+ tooltipContent,
3011
+ clearTooltipId,
3012
+ clearTooltipContent = "Clear"
3013
+ }) {
3014
+ const hasActiveCount = count > 0;
3015
+ const shouldShowLabel = showLabel && !hasActiveCount;
3016
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3017
+ "button",
3018
+ {
3019
+ onClick,
3020
+ className: `btn-alt btn-md flex items-center space-x-1 relative ${buttonClassName} ${className}`,
3021
+ "data-tooltip-id": tooltipId,
3022
+ "data-tooltip-content": tooltipContent,
3023
+ children: [
3024
+ icon,
3025
+ shouldShowLabel && label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: label }),
3026
+ hasActiveCount && /* @__PURE__ */ jsxRuntime.jsx(CountBadge, { count, variant: countVariant }),
3027
+ hasActiveCount && onClear && /* @__PURE__ */ jsxRuntime.jsx(
3028
+ ClearButton,
3029
+ {
3030
+ onClick: onClear,
3031
+ variant: clearVariant,
3032
+ tooltipId: clearTooltipId,
3033
+ tooltipContent: clearTooltipContent
3034
+ }
3035
+ )
3036
+ ]
3037
+ }
3038
+ );
3039
+ }
3040
+ function ActionButton({
3041
+ icon: IconComponent,
3042
+ label,
3043
+ onClick,
3044
+ href,
3045
+ disabled = false,
3046
+ size = "md",
3047
+ iconOnly = false,
3048
+ className = "",
3049
+ title,
3050
+ tooltipId,
3051
+ tooltipPlace = "bottom",
3052
+ tooltipOffset = 12,
3053
+ tooltipDelayShow = 200,
3054
+ tooltipDelayHide = 100,
3055
+ type = "button",
3056
+ variant,
3057
+ terminalMode = false,
3058
+ fill = false,
3059
+ loading: externalLoading,
3060
+ // Extract loading prop to prevent it from being passed to DOM
3061
+ loadingIcon: LoadingIconComponent,
3062
+ // Custom loading icon
3063
+ disableLoadingSpin = false,
3064
+ // Disable spin animation for custom loading icons
3065
+ ...restProps
3066
+ }) {
3067
+ const [loading, setLoading] = React4.useState(false);
3068
+ const handleClick = React4.useCallback(async () => {
3069
+ if (onClick && !disabled && !loading) {
3070
+ setLoading(true);
3071
+ try {
3072
+ await onClick();
3073
+ } catch (error) {
3074
+ console.error("ActionButton onClick error:", error);
3075
+ } finally {
3076
+ setLoading(false);
3077
+ }
3078
+ }
3079
+ }, [onClick, disabled, loading]);
3080
+ const iconSizes = {
3081
+ sm: terminalMode ? "w-4 h-4" : "w-4 h-4",
3082
+ md: terminalMode ? "w-4 h-4" : "w-4 h-4",
3083
+ lg: terminalMode ? "w-5 h-5" : "w-5 h-5"
3084
+ };
3085
+ const heightClasses = {
3086
+ sm: terminalMode ? "" : "btn-sm",
3087
+ md: terminalMode ? "" : "btn-md",
3088
+ lg: terminalMode ? "" : "btn-lg"
3089
+ };
3090
+ const paddingClasses3 = iconOnly ? terminalMode ? "" : "p-2" : "px-3 py-1.5";
3091
+ const t = nextIntlayer.useIntlayer("action-button");
3092
+ const getVariantConfig = () => {
3093
+ switch (variant) {
3094
+ case "edit":
3095
+ return {
3096
+ icon: fill ? ri.RiEditFill : ri.RiEditLine,
3097
+ label: t.edit,
3098
+ className: "btn-secondary"
3099
+ };
3100
+ case "delete":
3101
+ return {
3102
+ icon: fill ? ri.RiDeleteBinFill : ri.RiDeleteBinLine,
3103
+ label: t.delete,
3104
+ className: "btn-danger"
3105
+ };
3106
+ case "deactivate":
3107
+ return {
3108
+ icon: fill ? ri.RiStopCircleFill : ri.RiStopCircleLine,
3109
+ label: t.deactivate,
3110
+ className: "bg-slate-50 text-slate-600 hover:bg-slate-100 hover:text-slate-700 border border-slate-200 transition-all duration-300 ease-in-out"
3111
+ };
3112
+ case "activate":
3113
+ return {
3114
+ icon: fill ? ri.RiPlayCircleFill : ri.RiPlayCircleLine,
3115
+ label: t.activate,
3116
+ className: "bg-emerald-50 text-emerald-600 hover:bg-emerald-100 hover:text-emerald-700 border border-emerald-200 transition-all duration-300 ease-in-out"
3117
+ };
3118
+ case "view":
3119
+ return {
3120
+ icon: fill ? ri.RiEyeFill : ri.RiEyeLine,
3121
+ label: t.view,
3122
+ className: "bg-muted text-muted-foreground hover:bg-gray-100 hover:text-foreground border border-border transition-all duration-300 ease-in-out"
3123
+ };
3124
+ case "metrics":
3125
+ return {
3126
+ icon: fill ? ri.RiBarChartFill : ri.RiBarChartLine,
3127
+ label: t.metrics,
3128
+ className: "bg-purple-50 text-purple-600 hover:bg-purple-100 hover:text-purple-700 border border-purple-200 transition-all duration-300 ease-in-out"
3129
+ };
3130
+ case "start":
3131
+ return {
3132
+ icon: fill ? ri.RiPlayFill : ri.RiPlayLine,
3133
+ label: t.start,
3134
+ className: "bg-green-50 text-green-600 hover:bg-green-100 hover:text-green-700 border border-green-200 transition-all duration-300 ease-in-out"
3135
+ };
3136
+ case "stop":
3137
+ return {
3138
+ icon: fill ? ri.RiStopFill : ri.RiStopLine,
3139
+ label: t.stop,
3140
+ className: "bg-red-50 text-red-600 hover:bg-red-100 hover:text-red-700 border border-red-200 transition-all duration-300 ease-in-out"
3141
+ };
3142
+ case "restart":
3143
+ return {
3144
+ icon: fill ? ri.RiRestartFill : ri.RiRestartLine,
3145
+ label: t.restart,
3146
+ className: "bg-orange-50 text-orange-600 hover:bg-orange-100 hover:text-orange-700 border border-orange-200 transition-all duration-300 ease-in-out"
3147
+ };
3148
+ case "pause":
3149
+ return {
3150
+ icon: fill ? ri.RiPauseFill : ri.RiPauseLine,
3151
+ label: t.pause,
3152
+ className: "bg-yellow-50 text-yellow-600 hover:bg-yellow-100 hover:text-yellow-700 border border-yellow-200 transition-all duration-300 ease-in-out"
3153
+ };
3154
+ case "clone":
3155
+ return {
3156
+ icon: fill ? ri.RiFileCopyFill : ri.RiFileCopyLine,
3157
+ label: t.clone,
3158
+ className: "bg-indigo-50 text-indigo-600 hover:bg-indigo-100 hover:text-indigo-700 border border-indigo-200 transition-all duration-300 ease-in-out"
3159
+ };
3160
+ default:
3161
+ return null;
3162
+ }
3163
+ };
3164
+ const variantConfig = getVariantConfig();
3165
+ const variantClasses5 = {
3166
+ primary: "btn-primary",
3167
+ secondary: "btn-secondary",
3168
+ danger: "btn-danger",
3169
+ success: "bg-green-50 text-green-600 hover:bg-green-100 hover:text-green-700 border border-green-200 transition-all duration-300 ease-in-out",
3170
+ warning: "bg-yellow-50 text-yellow-600 hover:bg-yellow-100 hover:text-yellow-700 border border-yellow-200 transition-all duration-300 ease-in-out",
3171
+ info: "bg-muted text-muted-foreground hover:bg-primary hover:text-primary-foreground border border-ring transition-all duration-300 ease-in-out",
3172
+ metrics: "bg-purple-50 text-purple-600 hover:bg-purple-100 hover:text-purple-700 border border-purple-200 transition-all duration-300 ease-in-out"
3173
+ };
3174
+ let variantClass = variantConfig ? variantConfig.className : variant ? variantClasses5[variant] : "";
3175
+ if (terminalMode && variantClass) {
3176
+ const hoverMatch = variantClass.match(/hover:text-(\w+)-(\d+)/);
3177
+ const hoverColor = hoverMatch ? `hover:text-${hoverMatch[1]}-${hoverMatch[2]}` : "hover:text-muted-foreground";
3178
+ variantClass = `text-muted-foreground ${hoverColor} transition-colors duration-200`;
3179
+ }
3180
+ const isDisabled = disabled || loading || externalLoading;
3181
+ const buttonContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3182
+ loading || externalLoading ? /* @__PURE__ */ jsxRuntime.jsx(
3183
+ "div",
3184
+ {
3185
+ className: `${iconSizes[size]} flex items-center justify-center flex-shrink-0 ${terminalMode ? "text-muted-foreground p-0.5" : ""}`,
3186
+ "aria-hidden": "true",
3187
+ children: LoadingIconComponent ? /* @__PURE__ */ jsxRuntime.jsx(
3188
+ LoadingIconComponent,
3189
+ {
3190
+ className: `w-full h-full ${disableLoadingSpin ? "" : "animate-spin-slow"}`,
3191
+ "aria-hidden": "true"
3192
+ }
3193
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1191
3194
  "div",
1192
3195
  {
1193
- className: "flex items-center justify-center space-x-2 mb-6",
1194
- "aria-hidden": "true",
1195
- children: [
1196
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-12 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0s]" }),
1197
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-8 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0.2s]" }),
1198
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-8 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0.4s]" }),
1199
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-12 bg-gradient-to-t from-primary-600 to-primary-400 rounded-full shadow-sm [animation:wave_1.2s_ease-in-out_infinite] [animation-delay:0.6s]" })
1200
- ]
3196
+ className: "w-full h-full border-2 border-current border-t-transparent rounded-full animate-spin",
3197
+ "aria-hidden": "true"
1201
3198
  }
1202
- ),
1203
- showMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ jsxRuntime.jsx(
1204
- "p",
3199
+ )
3200
+ }
3201
+ ) : (variantConfig?.icon || IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(
3202
+ "div",
3203
+ {
3204
+ className: `${iconSizes[size]} flex items-center justify-center flex-shrink-0`,
3205
+ "aria-hidden": "true",
3206
+ children: variantConfig?.icon ? /* @__PURE__ */ jsxRuntime.jsx(
3207
+ variantConfig.icon,
1205
3208
  {
1206
- className: "text-sm text-secondary-foreground animate-pulse",
1207
- "aria-live": "polite",
1208
- children: message
3209
+ className: "w-full h-full",
3210
+ "aria-hidden": "true"
1209
3211
  }
1210
- ) })
1211
- ] })
1212
- }
1213
- );
1214
- };
1215
- var LoadingSpinner_default = LoadingSpinner;
1216
- function PageHeader({
3212
+ ) : IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "w-full h-full", "aria-hidden": "true" }) : null
3213
+ }
3214
+ ),
3215
+ !iconOnly && (restProps.children ? restProps.children : (variantConfig?.label || label) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center", children: variantConfig?.label || label }))
3216
+ ] });
3217
+ const accessibleLabel = title || (iconOnly ? variantConfig?.label || label : void 0);
3218
+ const buttonAriaLabel = iconOnly && !accessibleLabel ? variantConfig?.label || label || "Action button" : accessibleLabel;
3219
+ const tooltipContent = title || (iconOnly ? variantConfig?.label || label : void 0);
3220
+ const buttonClassName = `
3221
+
3222
+ ${terminalMode ? "btn-terminal" : `btn ${variantClass} ${paddingClasses3} ${heightClasses[size]} ${className} ${isDisabled ? "opacity-50 cursor-not-allowed" : ""}`}`;
3223
+ if (href) {
3224
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3225
+ /* @__PURE__ */ jsxRuntime.jsx(
3226
+ NextLink__default.default,
3227
+ {
3228
+ href,
3229
+ title: typeof title === "string" ? title : void 0,
3230
+ "aria-label": iconOnly ? typeof buttonAriaLabel === "string" ? buttonAriaLabel : void 0 : void 0,
3231
+ onClick: handleClick,
3232
+ className: buttonClassName,
3233
+ "data-tooltip-id": tooltipId,
3234
+ "aria-busy": loading || externalLoading ? "true" : void 0,
3235
+ ...restProps,
3236
+ children: buttonContent
3237
+ }
3238
+ ),
3239
+ tooltipId && /* @__PURE__ */ jsxRuntime.jsx(
3240
+ SharedTooltip,
3241
+ {
3242
+ id: tooltipId,
3243
+ place: tooltipPlace,
3244
+ offset: tooltipOffset,
3245
+ delayShow: tooltipDelayShow,
3246
+ delayHide: tooltipDelayHide,
3247
+ children: tooltipContent
3248
+ }
3249
+ )
3250
+ ] });
3251
+ }
3252
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3253
+ /* @__PURE__ */ jsxRuntime.jsx(
3254
+ "button",
3255
+ {
3256
+ type,
3257
+ onClick: handleClick,
3258
+ title: typeof title === "string" ? title : void 0,
3259
+ "aria-label": iconOnly ? typeof buttonAriaLabel === "string" ? buttonAriaLabel : void 0 : void 0,
3260
+ className: buttonClassName,
3261
+ "data-tooltip-id": tooltipId,
3262
+ "aria-busy": loading || externalLoading ? "true" : void 0,
3263
+ ...restProps,
3264
+ disabled: isDisabled,
3265
+ children: buttonContent
3266
+ }
3267
+ ),
3268
+ tooltipId && /* @__PURE__ */ jsxRuntime.jsx(
3269
+ SharedTooltip,
3270
+ {
3271
+ id: tooltipId,
3272
+ place: tooltipPlace,
3273
+ offset: tooltipOffset,
3274
+ delayShow: tooltipDelayShow,
3275
+ delayHide: tooltipDelayHide,
3276
+ children: tooltipContent
3277
+ }
3278
+ )
3279
+ ] });
3280
+ }
3281
+ function SearchCard({
3282
+ title,
3283
+ count,
3284
+ total,
3285
+ actionButton,
3286
+ children,
3287
+ className = "",
1217
3288
  icon: Icon,
3289
+ description
3290
+ }) {
3291
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `card p-4 lg:p-6 ${className}`, children: [
3292
+ /* @__PURE__ */ jsxRuntime.jsx(
3293
+ SearchCardHeader,
3294
+ {
3295
+ title,
3296
+ count,
3297
+ total,
3298
+ actionButton,
3299
+ icon: Icon,
3300
+ description
3301
+ }
3302
+ ),
3303
+ /* @__PURE__ */ jsxRuntime.jsx(SearchCardContent, { children })
3304
+ ] });
3305
+ }
3306
+ function SearchCardHeader({
1218
3307
  title,
1219
- subtitle,
1220
- rightContent,
1221
- className = ""
3308
+ count,
3309
+ total,
3310
+ actionButton,
3311
+ icon: Icon,
3312
+ description
1222
3313
  }) {
1223
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mb-6 lg:mb-8 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "header-layout", children: [
1224
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
1225
- Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-6 h-6 lg:w-8 lg:h-8 flex-shrink-0" }),
3314
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 mb-6", children: [
3315
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 min-w-0 flex-1", children: [
3316
+ Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-6 h-6 lg:w-8 lg:h-8 text-foreground flex-shrink-0" }),
1226
3317
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
1227
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl lg:text-3xl font-bold text-foreground truncate", children: title }),
1228
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm lg:text-base text-muted-foreground", children: subtitle })
3318
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg lg:text-2xl font-bold truncate", children: title }),
3319
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground hidden md:block", children: description }),
3320
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 lg:mt-2 text-xs text-secondary-foreground", children: [
3321
+ count,
3322
+ " of ",
3323
+ total,
3324
+ " ",
3325
+ title.toLowerCase()
3326
+ ] })
1229
3327
  ] })
1230
3328
  ] }),
1231
- rightContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2 lg:space-x-3 flex-shrink-0", children: rightContent })
1232
- ] }) });
3329
+ actionButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2 lg:gap-3 flex-shrink-0", children: actionButton })
3330
+ ] });
1233
3331
  }
1234
- function FormSection({
1235
- title,
1236
- description,
3332
+ function SearchCardContent({
1237
3333
  children,
1238
3334
  className = ""
1239
3335
  }) {
3336
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children });
3337
+ }
3338
+ function SearchInput({
3339
+ placeholder,
3340
+ value,
3341
+ onChange,
3342
+ className = ""
3343
+ }) {
3344
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-1 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx(
3345
+ FormInput,
3346
+ {
3347
+ label: "",
3348
+ name: "search",
3349
+ type: "text",
3350
+ value,
3351
+ onChange: (e) => onChange(e.target.value),
3352
+ placeholder,
3353
+ icon: {
3354
+ left: /* @__PURE__ */ jsxRuntime.jsx(ri.RiSearchLine, { className: "w-4 h-4 text-muted-foreground" })
3355
+ },
3356
+ className: "mb-0"
3357
+ }
3358
+ ) });
3359
+ }
3360
+ function FilterSelect({
3361
+ value,
3362
+ onChange,
3363
+ options,
3364
+ placeholder,
3365
+ className = "",
3366
+ multiple = false,
3367
+ searchable = true
3368
+ }) {
3369
+ return /* @__PURE__ */ jsxRuntime.jsx(
3370
+ SmartSelect,
3371
+ {
3372
+ value,
3373
+ onChange,
3374
+ options,
3375
+ placeholder,
3376
+ className: `form-input form-input-md ${className}`,
3377
+ keepOpen: multiple,
3378
+ multiple,
3379
+ searchable
3380
+ }
3381
+ );
3382
+ }
3383
+ function RefreshButton({
3384
+ onClick,
3385
+ isLoading = false,
3386
+ className = ""
3387
+ }) {
3388
+ return /* @__PURE__ */ jsxRuntime.jsx(
3389
+ ActionButton,
3390
+ {
3391
+ icon: ri.RiRefreshLine,
3392
+ onClick,
3393
+ disabled: isLoading,
3394
+ loading: isLoading,
3395
+ iconOnly: true,
3396
+ size: "md",
3397
+ variant: "secondary",
3398
+ tooltipId: "refresh-button-tooltip",
3399
+ title: "Refresh",
3400
+ tooltipPlace: "top",
3401
+ className: `btn-alt ${className}`
3402
+ }
3403
+ );
3404
+ }
3405
+ function FilterToggleButton({
3406
+ isOpen,
3407
+ onClick,
3408
+ onClear,
3409
+ activeCount = 0,
3410
+ className = ""
3411
+ }) {
3412
+ const tooltipText = activeCount > 0 ? `${activeCount} filter${activeCount === 1 ? "" : "s"} active` : "Filters";
3413
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3414
+ /* @__PURE__ */ jsxRuntime.jsx(
3415
+ IconButtonWithCount,
3416
+ {
3417
+ icon: /* @__PURE__ */ jsxRuntime.jsx(ri.RiFilterLine, { className: "w-4 h-4" }),
3418
+ label: "Filters",
3419
+ count: activeCount,
3420
+ onClick,
3421
+ onClear,
3422
+ className,
3423
+ tooltipId: "filter-button-tooltip",
3424
+ tooltipContent: tooltipText,
3425
+ clearTooltipId: "clear-filters-tooltip",
3426
+ clearTooltipContent: "Clear all filters"
3427
+ }
3428
+ ),
3429
+ /* @__PURE__ */ jsxRuntime.jsx(SharedTooltip, { id: "filter-button-tooltip" })
3430
+ ] });
3431
+ }
3432
+ function MobileSearchLayout({
3433
+ searchInput,
3434
+ filters,
3435
+ viewControls,
3436
+ activeFilterCount = 0,
3437
+ onClearFilters,
3438
+ className = "",
3439
+ filterInline = false,
3440
+ searchButton
3441
+ }) {
3442
+ const [showFilters, setShowFilters] = React4.useState(false);
3443
+ if (filterInline) {
3444
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `space-y-4 ${className}`, children: [
3445
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 items-center", children: [
3446
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: searchInput }),
3447
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 items-center", children: [
3448
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
3449
+ SmartDropdown,
3450
+ {
3451
+ isOpen: showFilters,
3452
+ onClose: () => setShowFilters(false),
3453
+ width: 600,
3454
+ maxHeight: 320,
3455
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
3456
+ FilterToggleButton,
3457
+ {
3458
+ isOpen: showFilters,
3459
+ onClick: () => setShowFilters(!showFilters),
3460
+ activeCount: activeFilterCount,
3461
+ onClear: onClearFilters
3462
+ }
3463
+ ),
3464
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: filters }) }) })
3465
+ }
3466
+ ) }),
3467
+ viewControls && viewControls
3468
+ ] })
3469
+ ] }),
3470
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:flex lg:flex-col lg:gap-3", children: [
3471
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col lg:flex-row gap-3", children: filters }),
3472
+ searchButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: searchButton })
3473
+ ] }),
3474
+ /* @__PURE__ */ jsxRuntime.jsx(SharedTooltip, { id: "clear-filters-tooltip" })
3475
+ ] });
3476
+ }
1240
3477
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `space-y-4 ${className}`, children: [
1241
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1242
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-medium ", children: title }),
1243
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
3478
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 items-center", children: [
3479
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: searchInput }),
3480
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 items-center", children: [
3481
+ /* @__PURE__ */ jsxRuntime.jsx(
3482
+ SmartDropdown,
3483
+ {
3484
+ isOpen: showFilters,
3485
+ onClose: () => setShowFilters(false),
3486
+ width: 600,
3487
+ maxHeight: 320,
3488
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
3489
+ FilterToggleButton,
3490
+ {
3491
+ isOpen: showFilters,
3492
+ onClick: () => setShowFilters(!showFilters),
3493
+ activeCount: activeFilterCount,
3494
+ onClear: onClearFilters
3495
+ }
3496
+ ),
3497
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: filters }) }) })
3498
+ }
3499
+ ),
3500
+ viewControls && viewControls
3501
+ ] })
1244
3502
  ] }),
1245
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children })
3503
+ /* @__PURE__ */ jsxRuntime.jsx(SharedTooltip, { id: "clear-filters-tooltip" })
1246
3504
  ] });
1247
3505
  }
1248
- function Grid({
1249
- children,
1250
- cols = 1,
1251
- gap = 4,
3506
+ function ViewToggle({
3507
+ currentView,
3508
+ onViewChange,
1252
3509
  className = ""
1253
3510
  }) {
1254
- const colClasses = {
1255
- 1: "grid-cols-1",
1256
- 2: "grid-cols-1 md:grid-cols-2",
1257
- 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1258
- 4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
1259
- 5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5",
1260
- 6: "grid-cols-2 md:grid-cols-3 lg:grid-cols-6",
1261
- 12: "grid-cols-12"
1262
- };
1263
- const gapClasses = {
1264
- 1: "gap-1",
1265
- 2: "gap-2",
1266
- 3: "gap-3",
1267
- 4: "gap-4",
1268
- 6: "gap-6",
1269
- 8: "gap-8"
3511
+ const toggleView = () => {
3512
+ onViewChange(currentView === "cards" ? "list" : "cards");
1270
3513
  };
1271
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `grid ${colClasses[cols]} ${gapClasses[gap]} ${className}`, children });
1272
- }
1273
- function GridItem({
1274
- children,
1275
- span = 1,
1276
- className = ""
1277
- }) {
1278
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `col-span-${span} ${className}`, children });
3514
+ return /* @__PURE__ */ jsxRuntime.jsx(
3515
+ ActionButton,
3516
+ {
3517
+ icon: currentView === "cards" ? ri.RiGridFill : ri.RiListUnordered,
3518
+ onClick: toggleView,
3519
+ iconOnly: true,
3520
+ size: "md",
3521
+ variant: "secondary",
3522
+ tooltipId: "view-toggle-tooltip",
3523
+ title: currentView === "cards" ? "Switch to List View" : "Switch to Card View",
3524
+ tooltipPlace: "top",
3525
+ className: `btn-alt ${className}`
3526
+ }
3527
+ );
1279
3528
  }
1280
3529
 
1281
- exports.AccordionCard = AccordionCard;
3530
+ // src/index.ts
3531
+ var VERSION = "0.1.3";
3532
+
3533
+ exports.ActionButton = ActionButton;
1282
3534
  exports.Badge = Badge;
1283
3535
  exports.Button = Button_default;
1284
3536
  exports.Card = Card;
1285
- exports.ClickableCard = ClickableCard;
1286
- exports.ErrorBadge = ErrorBadge;
3537
+ exports.ConfirmDialog = ConfirmDialog_default;
3538
+ exports.Container = Container;
3539
+ exports.DataTable = DataTable;
3540
+ exports.DataTableActions = DataTableActions;
3541
+ exports.DataTableBody = DataTableBody;
3542
+ exports.DataTableCell = DataTableCell;
3543
+ exports.DataTableEmptyState = DataTableEmptyState;
3544
+ exports.DataTableHeader = DataTableHeader;
3545
+ exports.DataTableHeaderCell = DataTableHeaderCell;
3546
+ exports.DataTableLoadingState = DataTableLoadingState;
3547
+ exports.DataTableRow = DataTableRow;
3548
+ exports.EmptyState = EmptyState_default;
3549
+ exports.FilterSelect = FilterSelect;
3550
+ exports.FilterToggleButton = FilterToggleButton;
1287
3551
  exports.FormInput = FormInput;
1288
3552
  exports.FormSection = FormSection;
1289
- exports.GrayBadge = GrayBadge;
1290
3553
  exports.Grid = Grid;
1291
- exports.GridItem = GridItem;
1292
- exports.HeaderCard = HeaderCard;
1293
- exports.InfoBadge = InfoBadge;
3554
+ exports.IconButtonWithCount = IconButtonWithCount;
3555
+ exports.InfoBox = InfoBox;
1294
3556
  exports.Link = Link_default;
1295
3557
  exports.LoadingSpinner = LoadingSpinner_default;
3558
+ exports.MobileSearchLayout = MobileSearchLayout;
1296
3559
  exports.Modal = Modal;
1297
3560
  exports.PageHeader = PageHeader;
1298
- exports.PrimaryBadge = PrimaryBadge;
1299
- exports.SimpleCard = SimpleCard;
3561
+ exports.RefreshButton = RefreshButton;
3562
+ exports.SearchCard = SearchCard;
3563
+ exports.SearchCardContent = SearchCardContent;
3564
+ exports.SearchCardHeader = SearchCardHeader;
3565
+ exports.SearchInput = SearchInput;
3566
+ exports.SharedTooltip = SharedTooltip;
3567
+ exports.Skeleton = Skeleton;
3568
+ exports.SkeletonCard = SkeletonCard;
3569
+ exports.SkeletonEnvironmentsList = SkeletonEnvironmentsList;
3570
+ exports.SkeletonForm = SkeletonForm;
3571
+ exports.SkeletonGameCard = SkeletonGameCard;
3572
+ exports.SkeletonGameServerCard = SkeletonGameServerCard;
3573
+ exports.SkeletonGameServerCards = SkeletonGameServerCards;
3574
+ exports.SkeletonGameServerTable = SkeletonGameServerTable;
3575
+ exports.SkeletonGamesTable = SkeletonGamesTable;
3576
+ exports.SkeletonItem = SkeletonItem;
3577
+ exports.SkeletonList = SkeletonList;
3578
+ exports.SkeletonNodeCard = SkeletonNodeCard;
3579
+ exports.SkeletonNodeCards = SkeletonNodeCards;
3580
+ exports.SkeletonNodeTable = SkeletonNodeTable;
3581
+ exports.SkeletonRecentActivity = SkeletonRecentActivity;
3582
+ exports.SkeletonSearchCard = SkeletonSearchCard;
3583
+ exports.SkeletonStats = SkeletonStats;
3584
+ exports.SkeletonTable = SkeletonTable;
3585
+ exports.SkeletonTenantCard = SkeletonTenantCard;
3586
+ exports.SkeletonUserCard = SkeletonUserCard;
3587
+ exports.SmartDropdown = SmartDropdown;
3588
+ exports.SmartSelect = SmartSelect;
3589
+ exports.Spinner = Spinner_default;
1300
3590
  exports.StatusBadge = StatusBadge;
1301
- exports.StatusCard = StatusCard;
1302
- exports.SuccessBadge = SuccessBadge;
3591
+ exports.StickyActionsColumn = StickyActionsColumn;
1303
3592
  exports.Switch = Switch;
1304
- exports.WarningBadge = WarningBadge;
3593
+ exports.Typography = Typography;
3594
+ exports.VERSION = VERSION;
3595
+ exports.ViewToggle = ViewToggle;
3596
+ exports.useConfirmDialog = useConfirmDialog;
1305
3597
  //# sourceMappingURL=index.js.map
1306
3598
  //# sourceMappingURL=index.js.map