@gamecp/ui 0.1.13 → 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.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import React4, { forwardRef, useState, useRef, useEffect, useCallback } from 'react';
3
- import { RiCloseLine, RiCheckLine, RiLoader4Line, RiFileCopyLine, RiEyeOffLine, RiEyeLine, RiRefreshLine, RiArrowDownSLine } from 'react-icons/ri';
3
+ import { RiCloseLine, RiCheckLine, RiLoader4Line, RiFileCopyLine, RiEyeOffLine, RiEyeLine, RiRefreshLine, RiSearchLine, RiFilterLine, RiGridFill, RiListUnordered, RiFileCopyFill, RiPauseFill, RiPauseLine, RiRestartFill, RiRestartLine, RiStopFill, RiStopLine, RiPlayFill, RiPlayLine, RiBarChartFill, RiBarChartLine, RiEyeFill, RiPlayCircleFill, RiPlayCircleLine, RiStopCircleFill, RiStopCircleLine, RiDeleteBinFill, RiDeleteBinLine, RiEditFill, RiEditLine, RiArrowDownSLine } from 'react-icons/ri';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { AnimatePresence, motion } from 'framer-motion';
6
6
  import NextLink from 'next/link';
7
+ import { Tooltip } from 'react-tooltip';
8
+ import { useIntlayer } from 'next-intlayer';
7
9
 
8
10
  // src/Badge.tsx
9
11
  var badgeVariants = {
@@ -1343,6 +1345,632 @@ function SkeletonItem({
1343
1345
  }
1344
1346
  );
1345
1347
  }
1348
+ function SkeletonCard({ className = "", children }) {
1349
+ return /* @__PURE__ */ jsx("div", { className: `card card-padding ${className}`, children });
1350
+ }
1351
+ function SkeletonTable({
1352
+ rows = 5,
1353
+ columns = 4,
1354
+ className = "",
1355
+ showHeader = true
1356
+ }) {
1357
+ return /* @__PURE__ */ jsx("div", { className: `card overflow-hidden ${className}`, children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full divide-y divide-border", children: [
1358
+ showHeader && /* @__PURE__ */ jsx("thead", { className: "bg-muted", children: /* @__PURE__ */ jsx("tr", { children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" }) }, i)) }) }),
1359
+ /* @__PURE__ */ jsx("tbody", { className: "table-body-card", children: Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsx("tr", { children: Array.from({ length: columns }).map((_2, colIndex) => /* @__PURE__ */ jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1360
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-full", height: "h-4" }),
1361
+ colIndex === 0 && /* @__PURE__ */ jsx(SkeletonItem, { width: "w-3/4", height: "h-3" })
1362
+ ] }) }, colIndex)) }, rowIndex)) })
1363
+ ] }) }) });
1364
+ }
1365
+ function SkeletonList({
1366
+ items = 5,
1367
+ className = "",
1368
+ itemHeight = "h-20"
1369
+ }) {
1370
+ return /* @__PURE__ */ jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "card card-padding-sm", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
1371
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1372
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
1373
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-1/3", height: "h-4" }),
1374
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-1/2", height: "h-3" })
1375
+ ] }),
1376
+ /* @__PURE__ */ jsxs("div", { className: "flex space-x-2", children: [
1377
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-8" }),
1378
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-8" })
1379
+ ] })
1380
+ ] }) }, i)) });
1381
+ }
1382
+ function SkeletonSearchCard({ className = "" }) {
1383
+ return /* @__PURE__ */ jsx(SkeletonCard, { className, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1384
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4", children: [
1385
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1386
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-48", height: "h-6" }),
1387
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-4" })
1388
+ ] }),
1389
+ /* @__PURE__ */ jsx("div", { className: "flex gap-3", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-10" }) })
1390
+ ] }),
1391
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row gap-3", children: [
1392
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-full", height: "h-10" }),
1393
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-10" }),
1394
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-10" }),
1395
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-10", height: "h-10" })
1396
+ ] })
1397
+ ] }) });
1398
+ }
1399
+ function SkeletonGameServerCard({
1400
+ className = ""
1401
+ }) {
1402
+ return /* @__PURE__ */ jsxs(
1403
+ "div",
1404
+ {
1405
+ className: `card overflow-hidden h-[380px] flex flex-col ${className}`,
1406
+ children: [
1407
+ /* @__PURE__ */ jsx("div", { className: "relative px-5 py-4 border-b border-border bg-muted overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-3 relative z-10", children: /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1408
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-6", className: "mb-2" }),
1409
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-1", children: [
1410
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-4", height: "h-4", rounded: true }),
1411
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" })
1412
+ ] })
1413
+ ] }) }) }),
1414
+ /* @__PURE__ */ jsxs("div", { className: "relative px-4 py-3 pt-0 flex-grow", children: [
1415
+ /* @__PURE__ */ jsx("div", { className: "relative p-2", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-3 grid-cols-3", children: [
1416
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1417
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1418
+ /* @__PURE__ */ jsx(
1419
+ SkeletonItem,
1420
+ {
1421
+ width: "w-12",
1422
+ height: "h-3",
1423
+ className: "mx-auto mb-1"
1424
+ }
1425
+ ),
1426
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto" })
1427
+ ] }),
1428
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1429
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1430
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto mb-1" }),
1431
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-6", height: "h-3", className: "mx-auto" })
1432
+ ] }),
1433
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1434
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1435
+ /* @__PURE__ */ jsx(
1436
+ SkeletonItem,
1437
+ {
1438
+ width: "w-12",
1439
+ height: "h-3",
1440
+ className: "mx-auto mb-1"
1441
+ }
1442
+ ),
1443
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto" })
1444
+ ] })
1445
+ ] }) }),
1446
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-4 space-y-1", children: [
1447
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1448
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1449
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1450
+ ] }),
1451
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1452
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1453
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1454
+ ] }),
1455
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1456
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1457
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1458
+ ] }),
1459
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1460
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1461
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1462
+ ] }),
1463
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1464
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1465
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1466
+ ] })
1467
+ ] })
1468
+ ] }),
1469
+ /* @__PURE__ */ jsx("div", { className: "px-4 py-3 bg-card border-t border-border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1470
+ /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
1471
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1472
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1473
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1474
+ ] }) }),
1475
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
1476
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1477
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1478
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1479
+ ] })
1480
+ ] }) })
1481
+ ]
1482
+ }
1483
+ );
1484
+ }
1485
+ function SkeletonGameCard({ className = "" }) {
1486
+ return /* @__PURE__ */ jsx("div", { className: `card card-padding-sm ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
1487
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1488
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
1489
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-40", height: "h-4" }),
1490
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-64", height: "h-3" })
1491
+ ] }),
1492
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1493
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-6", rounded: true }),
1494
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1495
+ ] })
1496
+ ] }) });
1497
+ }
1498
+ function SkeletonUserCard({ className = "" }) {
1499
+ return /* @__PURE__ */ jsx("div", { className: `card card-padding-sm ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
1500
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1501
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
1502
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-4" }),
1503
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-40", height: "h-3" })
1504
+ ] }),
1505
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1506
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true }),
1507
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-6", rounded: true })
1508
+ ] })
1509
+ ] }) });
1510
+ }
1511
+ function SkeletonNodeCard({ className = "" }) {
1512
+ return /* @__PURE__ */ jsxs("div", { className: `card overflow-hidden min-h-[320px] ${className}`, children: [
1513
+ /* @__PURE__ */ jsx("div", { className: "px-4 py-3 border-b border-border bg-muted", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1514
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3", children: [
1515
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8" }),
1516
+ /* @__PURE__ */ jsxs("div", { children: [
1517
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-5", className: "mb-1" }),
1518
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4", className: "mb-1" }),
1519
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1520
+ ] })
1521
+ ] }),
1522
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1523
+ ] }) }),
1524
+ /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
1525
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-4 mb-4", children: [
1526
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1527
+ /* @__PURE__ */ jsx(
1528
+ SkeletonItem,
1529
+ {
1530
+ width: "w-16",
1531
+ height: "h-16",
1532
+ rounded: true,
1533
+ className: "mx-auto mb-1"
1534
+ }
1535
+ ),
1536
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto mb-1" }),
1537
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-6", height: "h-3", className: "mx-auto" })
1538
+ ] }),
1539
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1540
+ /* @__PURE__ */ jsx(
1541
+ SkeletonItem,
1542
+ {
1543
+ width: "w-16",
1544
+ height: "h-16",
1545
+ rounded: true,
1546
+ className: "mx-auto mb-1"
1547
+ }
1548
+ ),
1549
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto mb-1" }),
1550
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-6", height: "h-3", className: "mx-auto" })
1551
+ ] }),
1552
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1553
+ /* @__PURE__ */ jsx(
1554
+ SkeletonItem,
1555
+ {
1556
+ width: "w-16",
1557
+ height: "h-16",
1558
+ rounded: true,
1559
+ className: "mx-auto mb-1"
1560
+ }
1561
+ ),
1562
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-3", className: "mx-auto mb-1" }),
1563
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3", className: "mx-auto" })
1564
+ ] })
1565
+ ] }),
1566
+ /* @__PURE__ */ jsxs("div", { className: "bg-muted rounded-lg p-3 mb-4", children: [
1567
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
1568
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" }),
1569
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-4" })
1570
+ ] }),
1571
+ /* @__PURE__ */ jsx(
1572
+ SkeletonItem,
1573
+ {
1574
+ width: "w-full",
1575
+ height: "h-2",
1576
+ rounded: true,
1577
+ className: "mb-1"
1578
+ }
1579
+ ),
1580
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-3" })
1581
+ ] }),
1582
+ /* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground mb-3", children: [
1583
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between mb-1", children: [
1584
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1585
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1586
+ ] }),
1587
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1588
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1589
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1590
+ ] })
1591
+ ] }),
1592
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end items-center pt-3 border-t border-border", children: /* @__PURE__ */ jsxs("div", { className: "flex space-x-2", children: [
1593
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-8", rounded: true }),
1594
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1595
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1596
+ ] }) })
1597
+ ] })
1598
+ ] });
1599
+ }
1600
+ function SkeletonTenantCard({ className = "" }) {
1601
+ return /* @__PURE__ */ jsx("div", { className: `card card-padding-sm ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
1602
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-12", rounded: true }),
1603
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
1604
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-40", height: "h-4" }),
1605
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-56", height: "h-3" })
1606
+ ] }),
1607
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1608
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-28", height: "h-6", rounded: true }),
1609
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1610
+ ] })
1611
+ ] }) });
1612
+ }
1613
+ function SkeletonStats({ className = "" }) {
1614
+ return /* @__PURE__ */ jsx(
1615
+ "div",
1616
+ {
1617
+ className: `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 ${className}`,
1618
+ children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "card card-padding", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1619
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" }),
1620
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-8" }),
1621
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-3" })
1622
+ ] }) }, i))
1623
+ }
1624
+ );
1625
+ }
1626
+ function SkeletonRecentActivity({
1627
+ items = 5,
1628
+ className = ""
1629
+ }) {
1630
+ return /* @__PURE__ */ jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3", children: [
1631
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1632
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
1633
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-full", height: "h-4" }),
1634
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-1/2", height: "h-3" })
1635
+ ] }),
1636
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-4" })
1637
+ ] }, i)) });
1638
+ }
1639
+ function SkeletonForm({
1640
+ fields = 4,
1641
+ className = ""
1642
+ }) {
1643
+ return /* @__PURE__ */ jsx(SkeletonCard, { className, children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
1644
+ Array.from({ length: fields }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1645
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" }),
1646
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-full", height: "h-10" })
1647
+ ] }, i)),
1648
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end space-x-3 pt-4", children: [
1649
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-10" }),
1650
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-10" })
1651
+ ] })
1652
+ ] }) });
1653
+ }
1654
+ function SkeletonGameServerCards({
1655
+ items = 4,
1656
+ className = ""
1657
+ }) {
1658
+ return /* @__PURE__ */ jsx(
1659
+ "div",
1660
+ {
1661
+ className: `grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-6 ${className}`,
1662
+ children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsx(SkeletonGameServerCard, {}, i))
1663
+ }
1664
+ );
1665
+ }
1666
+ function SkeletonNodeCards({
1667
+ items = 3,
1668
+ className = ""
1669
+ }) {
1670
+ return /* @__PURE__ */ jsx(
1671
+ "div",
1672
+ {
1673
+ className: `grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-6 ${className}`,
1674
+ children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsx(SkeletonNodeCard, {}, i))
1675
+ }
1676
+ );
1677
+ }
1678
+ function SkeletonNodeTable({
1679
+ items = 3,
1680
+ className = ""
1681
+ }) {
1682
+ return /* @__PURE__ */ jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "card overflow-hidden", children: [
1683
+ /* @__PURE__ */ jsx("div", { className: "px-6 py-4 border-b border-border bg-muted", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1684
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
1685
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8" }),
1686
+ /* @__PURE__ */ jsxs("div", { children: [
1687
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-5", className: "mb-1" }),
1688
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-28", height: "h-4", className: "mb-1" }),
1689
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1690
+ ] })
1691
+ ] }),
1692
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
1693
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
1694
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-6", height: "h-6", className: "mr-2" }),
1695
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-4" })
1696
+ ] }),
1697
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-6", rounded: true })
1698
+ ] })
1699
+ ] }) }),
1700
+ /* @__PURE__ */ jsxs("div", { className: "px-6 py-4", children: [
1701
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: [
1702
+ /* @__PURE__ */ jsxs("div", { className: "lg:col-span-2", children: [
1703
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-4", className: "mb-3" }),
1704
+ /* @__PURE__ */ jsx("div", { className: "flex items-start space-x-6", children: Array.from({ length: 3 }).map((_2, chartIndex) => /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1705
+ /* @__PURE__ */ jsx(
1706
+ SkeletonItem,
1707
+ {
1708
+ width: "w-14",
1709
+ height: "h-14",
1710
+ rounded: true,
1711
+ className: "mx-auto mb-1"
1712
+ }
1713
+ ),
1714
+ /* @__PURE__ */ jsx(
1715
+ SkeletonItem,
1716
+ {
1717
+ width: "w-8",
1718
+ height: "h-3",
1719
+ className: "mx-auto mb-1"
1720
+ }
1721
+ ),
1722
+ /* @__PURE__ */ jsx(
1723
+ SkeletonItem,
1724
+ {
1725
+ width: "w-10",
1726
+ height: "h-3",
1727
+ className: "mx-auto"
1728
+ }
1729
+ )
1730
+ ] }, chartIndex)) })
1731
+ ] }),
1732
+ /* @__PURE__ */ jsxs("div", { children: [
1733
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4", className: "mb-3" }),
1734
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1735
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-5" }),
1736
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1737
+ ] })
1738
+ ] }),
1739
+ /* @__PURE__ */ jsxs("div", { children: [
1740
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-4", className: "mb-3" }),
1741
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1742
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1743
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1744
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1745
+ ] }),
1746
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1747
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1748
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1749
+ ] })
1750
+ ] })
1751
+ ] })
1752
+ ] }),
1753
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end items-center pt-4 border-t border-border mt-4", children: /* @__PURE__ */ jsxs("div", { className: "flex space-x-2", children: [
1754
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-8", rounded: true }),
1755
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1756
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1757
+ ] }) })
1758
+ ] })
1759
+ ] }, i)) });
1760
+ }
1761
+ function SkeletonGameServerTable({
1762
+ items = 3,
1763
+ className = ""
1764
+ }) {
1765
+ return /* @__PURE__ */ jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs(
1766
+ "div",
1767
+ {
1768
+ className: "card overflow-hidden min-h-[200px] flex flex-col",
1769
+ children: [
1770
+ /* @__PURE__ */ jsx("div", { className: "relative px-5 py-4 border-b border-border bg-muted overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-3 relative z-10", children: /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1771
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-6", className: "mb-2" }),
1772
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-1", children: [
1773
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-4", height: "h-4", rounded: true }),
1774
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" })
1775
+ ] })
1776
+ ] }) }) }),
1777
+ /* @__PURE__ */ jsx("div", { className: "relative px-4 py-3 pt-0 flex-grow", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row items-start md:items-center gap-4 md:gap-8", children: [
1778
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-full md:w-auto", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-2 grid-cols-3", children: [
1779
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1780
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1781
+ /* @__PURE__ */ jsx(
1782
+ SkeletonItem,
1783
+ {
1784
+ width: "w-12",
1785
+ height: "h-3",
1786
+ className: "mx-auto mb-1"
1787
+ }
1788
+ ),
1789
+ /* @__PURE__ */ jsx(
1790
+ SkeletonItem,
1791
+ {
1792
+ width: "w-8",
1793
+ height: "h-3",
1794
+ className: "mx-auto"
1795
+ }
1796
+ )
1797
+ ] }),
1798
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1799
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1800
+ /* @__PURE__ */ jsx(
1801
+ SkeletonItem,
1802
+ {
1803
+ width: "w-8",
1804
+ height: "h-3",
1805
+ className: "mx-auto mb-1"
1806
+ }
1807
+ ),
1808
+ /* @__PURE__ */ jsx(
1809
+ SkeletonItem,
1810
+ {
1811
+ width: "w-6",
1812
+ height: "h-3",
1813
+ className: "mx-auto"
1814
+ }
1815
+ )
1816
+ ] }),
1817
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
1818
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-1 w-16 h-16 rounded-full border-4 border-border animate-pulse" }),
1819
+ /* @__PURE__ */ jsx(
1820
+ SkeletonItem,
1821
+ {
1822
+ width: "w-12",
1823
+ height: "h-3",
1824
+ className: "mx-auto mb-1"
1825
+ }
1826
+ ),
1827
+ /* @__PURE__ */ jsx(
1828
+ SkeletonItem,
1829
+ {
1830
+ width: "w-8",
1831
+ height: "h-3",
1832
+ className: "mx-auto"
1833
+ }
1834
+ )
1835
+ ] })
1836
+ ] }) }),
1837
+ /* @__PURE__ */ 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: [
1838
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1839
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" }),
1840
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1841
+ ] }),
1842
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1843
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-12", height: "h-3" }),
1844
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1845
+ ] }),
1846
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1847
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1848
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1849
+ ] }),
1850
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1851
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1852
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1853
+ ] }),
1854
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1855
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1856
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" })
1857
+ ] }),
1858
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
1859
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" }),
1860
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1861
+ ] })
1862
+ ] })
1863
+ ] }) }),
1864
+ /* @__PURE__ */ jsx("div", { className: "px-4 py-3 bg-card border-t border-border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1865
+ /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
1866
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1867
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1868
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1869
+ ] }) }),
1870
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
1871
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1872
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1873
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1874
+ ] })
1875
+ ] }) })
1876
+ ]
1877
+ },
1878
+ i
1879
+ )) });
1880
+ }
1881
+ function SkeletonGamesTable({
1882
+ items = 3,
1883
+ className = ""
1884
+ }) {
1885
+ return /* @__PURE__ */ jsx(
1886
+ "div",
1887
+ {
1888
+ className: `overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg ${className}`,
1889
+ children: /* @__PURE__ */ jsxs("table", { className: "min-w-full divide-y divide-gray-300", children: [
1890
+ /* @__PURE__ */ jsx("thead", { className: "bg-muted", children: /* @__PURE__ */ jsxs("tr", { children: [
1891
+ /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Game" }),
1892
+ /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Type" }),
1893
+ /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Port" }),
1894
+ /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Mode" }),
1895
+ /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Status" }),
1896
+ /* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Created" }),
1897
+ /* @__PURE__ */ 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" })
1898
+ ] }) }),
1899
+ /* @__PURE__ */ jsx("tbody", { className: "table-body-card", children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs("tr", { className: "hover:bg-muted", children: [
1900
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
1901
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 h-10 w-10", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-10", height: "h-10", rounded: true }) }),
1902
+ /* @__PURE__ */ jsxs("div", { className: "ml-4 min-w-0 flex-1", children: [
1903
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-4", className: "mb-1" }),
1904
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-48", height: "h-3" })
1905
+ ] })
1906
+ ] }) }),
1907
+ /* @__PURE__ */ jsxs("td", { className: "px-6 py-4 whitespace-nowrap", children: [
1908
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-4", className: "mb-1" }),
1909
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-3" })
1910
+ ] }),
1911
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1912
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-6", rounded: true }),
1913
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-3" })
1914
+ ] }) }),
1915
+ /* @__PURE__ */ jsxs("td", { className: "px-6 py-4 whitespace-nowrap", children: [
1916
+ /* @__PURE__ */ jsx(
1917
+ SkeletonItem,
1918
+ {
1919
+ width: "w-16",
1920
+ height: "h-6",
1921
+ rounded: true,
1922
+ className: "mb-1"
1923
+ }
1924
+ ),
1925
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-3" })
1926
+ ] }),
1927
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-6", rounded: true }) }),
1928
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-muted-foreground", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-4" }) }),
1929
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium sticky right-0 bg-card", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end space-x-1", children: [
1930
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1931
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1932
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1933
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true })
1934
+ ] }) })
1935
+ ] }, i)) })
1936
+ ] })
1937
+ }
1938
+ );
1939
+ }
1940
+ function SkeletonEnvironmentsList({
1941
+ items = 3,
1942
+ className = ""
1943
+ }) {
1944
+ return /* @__PURE__ */ jsx("div", { className: `space-y-4 ${className}`, children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "card p-3", children: [
1945
+ /* @__PURE__ */ jsx("div", { className: "p-4 border-b border-border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1946
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3 w-full", children: [
1947
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-5", height: "h-5" }),
1948
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full pr-6 md:pr-12", children: [
1949
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
1950
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1951
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-5" }),
1952
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-16", height: "h-5", rounded: true })
1953
+ ] }),
1954
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-48", height: "h-3" })
1955
+ ] }),
1956
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-20", height: "h-3" }) })
1957
+ ] })
1958
+ ] }),
1959
+ /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }) })
1960
+ ] }) }),
1961
+ /* @__PURE__ */ jsx("div", { className: "p-6", children: Array.from({ length: 2 + i % 3 }).map((_2, varIndex) => /* @__PURE__ */ jsx("div", { className: "mb-4 last:mb-0", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 items-center", children: [
1962
+ /* @__PURE__ */ jsxs("div", { className: "col-span-5", children: [
1963
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-32", height: "h-4", className: "mb-1" }),
1964
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-48", height: "h-3" })
1965
+ ] }),
1966
+ /* @__PURE__ */ jsxs("div", { className: "col-span-5 flex items-center space-x-2", children: [
1967
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }),
1968
+ /* @__PURE__ */ jsx(SkeletonItem, { width: "w-24", height: "h-4" })
1969
+ ] }),
1970
+ /* @__PURE__ */ jsx("div", { className: "col-span-2 flex justify-end", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-8", height: "h-8", rounded: true }) })
1971
+ ] }) }, varIndex)) })
1972
+ ] }, i)) });
1973
+ }
1346
1974
  function FormInput({
1347
1975
  label,
1348
1976
  name,
@@ -1874,6 +2502,29 @@ function Grid({
1874
2502
  };
1875
2503
  return /* @__PURE__ */ jsx("div", { className: `grid ${colClasses[cols]} ${gapClasses[gap]} ${className}`, children });
1876
2504
  }
2505
+ var variantStyles = {
2506
+ default: "bg-accent border-border text-muted-foreground",
2507
+ warning: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-700 dark:text-yellow-300",
2508
+ info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-700 dark:text-blue-300",
2509
+ success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-700 dark:text-green-300"
2510
+ };
2511
+ var titleStyles = {
2512
+ default: "text-foreground",
2513
+ warning: "text-yellow-800 dark:text-yellow-200",
2514
+ info: "text-blue-800 dark:text-blue-200",
2515
+ success: "text-green-800 dark:text-green-200"
2516
+ };
2517
+ function InfoBox({
2518
+ title,
2519
+ children,
2520
+ variant = "default",
2521
+ className = ""
2522
+ }) {
2523
+ return /* @__PURE__ */ jsxs("div", { className: `border rounded-md p-4 ${variantStyles[variant]} ${className}`, children: [
2524
+ /* @__PURE__ */ jsx("h4", { className: `font-medium mb-2 ${titleStyles[variant]}`, children: title }),
2525
+ /* @__PURE__ */ 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 })
2526
+ ] });
2527
+ }
1877
2528
  var variantClasses3 = {
1878
2529
  default: "text-foreground hover:text-primary",
1879
2530
  primary: "text-primary hover:text-primary/80",
@@ -2052,10 +2703,826 @@ function Typography({
2052
2703
  const classes = `${variantClasses4[variant]} ${sizeClasses4[size]} ${className}`;
2053
2704
  return /* @__PURE__ */ jsx(Element, { className: classes, children });
2054
2705
  }
2706
+ var Spinner = ({
2707
+ size = "md",
2708
+ color = "primary",
2709
+ className = ""
2710
+ }) => {
2711
+ const sizeClasses5 = {
2712
+ sm: "h-4 w-4",
2713
+ md: "h-8 w-8",
2714
+ lg: "h-12 w-12",
2715
+ xl: "h-16 w-16"
2716
+ };
2717
+ const colorClasses2 = {
2718
+ primary: "border-primary-600",
2719
+ blue: "border-ring",
2720
+ white: "border-white",
2721
+ current: "border-current"
2722
+ };
2723
+ const baseClasses = "animate-spin rounded-full border-2 border-t-transparent";
2724
+ const sizeClass = sizeClasses5[size];
2725
+ const colorClass = colorClasses2[color];
2726
+ const finalClasses = `${baseClasses} ${sizeClass} ${colorClass} ${className}`.trim();
2727
+ return /* @__PURE__ */ jsx("div", { className: finalClasses });
2728
+ };
2729
+ var Spinner_default = Spinner;
2730
+ function DataTable({
2731
+ children,
2732
+ className = "",
2733
+ containerClassName = "",
2734
+ stickyActions = false
2735
+ }) {
2736
+ return /* @__PURE__ */ jsx("div", { className: `card overflow-hidden ${containerClassName}`, children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx(
2737
+ "table",
2738
+ {
2739
+ role: "table",
2740
+ "aria-label": "Data table",
2741
+ className: `w-full divide-y divide-border ${className} ${stickyActions ? "relative" : ""}`,
2742
+ children
2743
+ }
2744
+ ) }) });
2745
+ }
2746
+ function DataTableHeader({
2747
+ children,
2748
+ className = ""
2749
+ }) {
2750
+ return /* @__PURE__ */ jsx("thead", { className: `bg-muted ${className}`, children });
2751
+ }
2752
+ function DataTableBody({
2753
+ children,
2754
+ className = ""
2755
+ }) {
2756
+ return /* @__PURE__ */ jsx("tbody", { className: `table-body-card ${className}`, children });
2757
+ }
2758
+ function DataTableRow({
2759
+ children,
2760
+ className = "",
2761
+ onClick,
2762
+ hover = true
2763
+ }) {
2764
+ const baseClasses = "hover:bg-muted transition-colors duration-150";
2765
+ const clickableClasses = onClick ? "cursor-pointer" : "";
2766
+ const hoverClasses = hover ? baseClasses : "";
2767
+ return /* @__PURE__ */ jsx(
2768
+ "tr",
2769
+ {
2770
+ className: `${hoverClasses} ${clickableClasses} ${className}`,
2771
+ onClick,
2772
+ children
2773
+ }
2774
+ );
2775
+ }
2776
+ function DataTableHeaderCell({
2777
+ children,
2778
+ className = "",
2779
+ align = "left",
2780
+ padding = "md",
2781
+ sticky,
2782
+ stickyOffset = 0
2783
+ }) {
2784
+ const alignClasses = {
2785
+ left: "text-left",
2786
+ center: "text-center",
2787
+ right: "text-right"
2788
+ };
2789
+ const paddingClasses3 = {
2790
+ sm: "px-3 py-2",
2791
+ md: "px-6 py-3",
2792
+ lg: "px-8 py-4"
2793
+ };
2794
+ const stickyClasses = sticky ? `sticky ${sticky === "left" ? "left-0" : "right-0"} z-10` : "";
2795
+ const stickyOffsetClasses = sticky && stickyOffset > 0 ? sticky === "left" ? `left-${stickyOffset}` : `right-${stickyOffset}` : "";
2796
+ const stickyStyling = "";
2797
+ return /* @__PURE__ */ jsx(
2798
+ "th",
2799
+ {
2800
+ scope: "col",
2801
+ className: `${paddingClasses3[padding]} ${alignClasses[align]} text-xs font-medium text-muted-foreground uppercase tracking-wider ${stickyClasses} ${stickyOffsetClasses} ${stickyStyling} ${className}`,
2802
+ children
2803
+ }
2804
+ );
2805
+ }
2806
+ function DataTableCell({
2807
+ children,
2808
+ className = "",
2809
+ align = "left",
2810
+ padding = "md",
2811
+ sticky,
2812
+ stickyOffset = 0
2813
+ }) {
2814
+ const alignClasses = {
2815
+ left: "text-left",
2816
+ center: "text-center",
2817
+ right: "text-right"
2818
+ };
2819
+ const paddingClasses3 = {
2820
+ sm: "px-3 py-2",
2821
+ md: "px-6 py-4",
2822
+ lg: "px-8 py-6"
2823
+ };
2824
+ const stickyClasses = sticky ? `sticky ${sticky === "left" ? "left-0" : "right-0"} z-10` : "";
2825
+ const stickyOffsetClasses = sticky && stickyOffset > 0 ? sticky === "left" ? `left-${stickyOffset}` : `right-${stickyOffset}` : "";
2826
+ const stickyStyling = "";
2827
+ return /* @__PURE__ */ jsx(
2828
+ "td",
2829
+ {
2830
+ className: `${paddingClasses3[padding]} whitespace-nowrap ${alignClasses[align]} text-sm ${stickyClasses} ${stickyOffsetClasses} ${stickyStyling} ${className}`,
2831
+ children
2832
+ }
2833
+ );
2834
+ }
2835
+ function DataTableEmptyState({
2836
+ icon: Icon,
2837
+ title,
2838
+ description,
2839
+ action,
2840
+ variant = "table"
2841
+ }) {
2842
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2843
+ /* @__PURE__ */ jsx(Icon, { className: "w-20 h-20 text-primary-500 mx-auto mb-4" }),
2844
+ /* @__PURE__ */ jsx("h3", { className: "text-lg font-medium text-foreground mb-2", children: title }),
2845
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-6", children: description }),
2846
+ action && /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: action })
2847
+ ] });
2848
+ if (variant === "div") {
2849
+ return /* @__PURE__ */ jsx("div", { className: "card card-padding text-center lg:p-24", children: content });
2850
+ }
2851
+ return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, className: "px-6 py-12 text-center", children: content }) });
2852
+ }
2853
+ function DataTableLoadingState({
2854
+ message = "Loading...",
2855
+ rows = 5,
2856
+ columns = 4
2857
+ }) {
2858
+ return /* @__PURE__ */ jsxs("div", { className: "card card-padding", children: [
2859
+ /* @__PURE__ */ jsxs("div", { className: "text-center mb-4", children: [
2860
+ /* @__PURE__ */ jsx(Spinner_default, { size: "md", color: "primary", className: "mx-auto mb-2" }),
2861
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: message })
2862
+ ] }),
2863
+ /* @__PURE__ */ jsx(SkeletonTable, { rows, columns, showHeader: false })
2864
+ ] });
2865
+ }
2866
+ function StatusBadge({
2867
+ status,
2868
+ variant = "default"
2869
+ }) {
2870
+ const variantClasses5 = {
2871
+ default: "bg-muted text-muted-foreground",
2872
+ success: "bg-success text-success-dark",
2873
+ warning: "bg-yellow-100 text-yellow-800",
2874
+ error: "bg-red-100 text-red-800",
2875
+ info: "bg-primary-100 text-primary-800"
2876
+ };
2877
+ return /* @__PURE__ */ jsx("span", { className: `badge ${variantClasses5[variant]}`, children: status });
2878
+ }
2879
+ function DataTableActions({
2880
+ children,
2881
+ className = "",
2882
+ enhanced = false
2883
+ }) {
2884
+ const baseClasses = "flex items-center justify-end space-x-2 dt-actions";
2885
+ const enhancedClasses = enhanced ? "px-2 py-1 rounded-md bg-card backdrop-blur-sm" : "";
2886
+ return /* @__PURE__ */ jsx("div", { className: `${baseClasses} ${enhancedClasses} ${className}`, children });
2887
+ }
2888
+ function StickyActionsColumn({
2889
+ children,
2890
+ className = ""
2891
+ }) {
2892
+ return /* @__PURE__ */ jsx(
2893
+ "div",
2894
+ {
2895
+ className: `border-l border-border shadow-[-1px_0_3px_-1px_rgba(0,0,0,0.02)] ${className}`,
2896
+ children
2897
+ }
2898
+ );
2899
+ }
2900
+ function SharedTooltip({
2901
+ id,
2902
+ place = "top",
2903
+ offset = 8,
2904
+ delayShow = 200,
2905
+ delayHide = 100,
2906
+ className = "",
2907
+ style = {},
2908
+ children
2909
+ }) {
2910
+ return /* @__PURE__ */ jsx(
2911
+ Tooltip,
2912
+ {
2913
+ id,
2914
+ place,
2915
+ offset,
2916
+ delayShow,
2917
+ delayHide,
2918
+ className: `!bg-popover !text-popover-foreground !border !border-border !shadow-md !text-xs !px-2 !py-1 !rounded-md z-50 ${className}`,
2919
+ style,
2920
+ positionStrategy: "fixed",
2921
+ render: children ? () => /* @__PURE__ */ jsx(Fragment, { children }) : void 0
2922
+ }
2923
+ );
2924
+ }
2925
+ function CountBadge({
2926
+ count,
2927
+ className = "",
2928
+ size = "sm",
2929
+ variant = "primary"
2930
+ }) {
2931
+ const sizeClasses5 = {
2932
+ sm: "text-xs px-1.5 py-0.5 min-w-[18px]",
2933
+ md: "text-sm px-2 py-1 min-w-[20px]",
2934
+ lg: "text-base px-2.5 py-1.5 min-w-[24px]"
2935
+ };
2936
+ const variantClasses5 = {
2937
+ primary: "bg-ring ",
2938
+ secondary: "bg-muted0 ",
2939
+ success: "bg-green-500 ",
2940
+ warning: "bg-yellow-500 ",
2941
+ error: "bg-red-500 "
2942
+ };
2943
+ if (count <= 0) return null;
2944
+ return /* @__PURE__ */ jsx(
2945
+ "span",
2946
+ {
2947
+ "aria-label": `Count: ${count}`,
2948
+ className: `${sizeClasses5[size]} ${variantClasses5[variant]} rounded-full text-center font-medium ${className}`,
2949
+ children: count
2950
+ }
2951
+ );
2952
+ }
2953
+ function ClearButton({
2954
+ onClick,
2955
+ className = "",
2956
+ size = "sm",
2957
+ variant = "overlay",
2958
+ tooltipId,
2959
+ tooltipContent = "Clear"
2960
+ }) {
2961
+ const sizeClasses5 = {
2962
+ sm: "w-4 h-4",
2963
+ md: "w-5 h-5",
2964
+ lg: "w-6 h-6"
2965
+ };
2966
+ const iconSizeClasses2 = {
2967
+ sm: "w-3 h-3",
2968
+ md: "w-4 h-4",
2969
+ lg: "w-5 h-5"
2970
+ };
2971
+ const variantClasses5 = {
2972
+ overlay: "absolute -top-1 -right-1 bg-red-500 rounded-full flex items-center justify-center hover:bg-red-600 transition-colors cursor-pointer",
2973
+ inline: "bg-red-500 rounded-full flex items-center justify-center hover:bg-red-600 transition-colors",
2974
+ ghost: "text-muted-foreground hover:text-muted-foreground transition-colors"
2975
+ };
2976
+ const baseProps = {
2977
+ onClick: (e) => {
2978
+ e.stopPropagation();
2979
+ onClick(e);
2980
+ },
2981
+ className: `${sizeClasses5[size]} ${variantClasses5[variant]} ${className}`,
2982
+ title: tooltipContent
2983
+ };
2984
+ const tooltipProps = tooltipId ? {
2985
+ "data-tooltip-id": tooltipId,
2986
+ "data-tooltip-content": tooltipContent
2987
+ } : {};
2988
+ const Element = variant === "overlay" ? "span" : "button";
2989
+ return /* @__PURE__ */ jsx(Element, { ...baseProps, ...tooltipProps, children: /* @__PURE__ */ jsx(RiCloseLine, { className: iconSizeClasses2[size] }) });
2990
+ }
2991
+ function IconButtonWithCount({
2992
+ icon,
2993
+ label,
2994
+ count = 0,
2995
+ onClick,
2996
+ onClear,
2997
+ showLabel = true,
2998
+ className = "",
2999
+ buttonClassName = "",
3000
+ countVariant = "primary",
3001
+ clearVariant = "overlay",
3002
+ tooltipId,
3003
+ tooltipContent,
3004
+ clearTooltipId,
3005
+ clearTooltipContent = "Clear"
3006
+ }) {
3007
+ const hasActiveCount = count > 0;
3008
+ const shouldShowLabel = showLabel && !hasActiveCount;
3009
+ return /* @__PURE__ */ jsxs(
3010
+ "button",
3011
+ {
3012
+ onClick,
3013
+ className: `btn-alt btn-md flex items-center space-x-1 relative ${buttonClassName} ${className}`,
3014
+ "data-tooltip-id": tooltipId,
3015
+ "data-tooltip-content": tooltipContent,
3016
+ children: [
3017
+ icon,
3018
+ shouldShowLabel && label && /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: label }),
3019
+ hasActiveCount && /* @__PURE__ */ jsx(CountBadge, { count, variant: countVariant }),
3020
+ hasActiveCount && onClear && /* @__PURE__ */ jsx(
3021
+ ClearButton,
3022
+ {
3023
+ onClick: onClear,
3024
+ variant: clearVariant,
3025
+ tooltipId: clearTooltipId,
3026
+ tooltipContent: clearTooltipContent
3027
+ }
3028
+ )
3029
+ ]
3030
+ }
3031
+ );
3032
+ }
3033
+ function ActionButton({
3034
+ icon: IconComponent,
3035
+ label,
3036
+ onClick,
3037
+ href,
3038
+ disabled = false,
3039
+ size = "md",
3040
+ iconOnly = false,
3041
+ className = "",
3042
+ title,
3043
+ tooltipId,
3044
+ tooltipPlace = "bottom",
3045
+ tooltipOffset = 12,
3046
+ tooltipDelayShow = 200,
3047
+ tooltipDelayHide = 100,
3048
+ type = "button",
3049
+ variant,
3050
+ terminalMode = false,
3051
+ fill = false,
3052
+ loading: externalLoading,
3053
+ // Extract loading prop to prevent it from being passed to DOM
3054
+ loadingIcon: LoadingIconComponent,
3055
+ // Custom loading icon
3056
+ disableLoadingSpin = false,
3057
+ // Disable spin animation for custom loading icons
3058
+ ...restProps
3059
+ }) {
3060
+ const [loading, setLoading] = useState(false);
3061
+ const handleClick = useCallback(async () => {
3062
+ if (onClick && !disabled && !loading) {
3063
+ setLoading(true);
3064
+ try {
3065
+ await onClick();
3066
+ } catch (error) {
3067
+ console.error("ActionButton onClick error:", error);
3068
+ } finally {
3069
+ setLoading(false);
3070
+ }
3071
+ }
3072
+ }, [onClick, disabled, loading]);
3073
+ const iconSizes = {
3074
+ sm: terminalMode ? "w-4 h-4" : "w-4 h-4",
3075
+ md: terminalMode ? "w-4 h-4" : "w-4 h-4",
3076
+ lg: terminalMode ? "w-5 h-5" : "w-5 h-5"
3077
+ };
3078
+ const heightClasses = {
3079
+ sm: terminalMode ? "" : "btn-sm",
3080
+ md: terminalMode ? "" : "btn-md",
3081
+ lg: terminalMode ? "" : "btn-lg"
3082
+ };
3083
+ const paddingClasses3 = iconOnly ? terminalMode ? "" : "p-2" : "px-3 py-1.5";
3084
+ const t = useIntlayer("action-button");
3085
+ const getVariantConfig = () => {
3086
+ switch (variant) {
3087
+ case "edit":
3088
+ return {
3089
+ icon: fill ? RiEditFill : RiEditLine,
3090
+ label: t.edit,
3091
+ className: "btn-secondary"
3092
+ };
3093
+ case "delete":
3094
+ return {
3095
+ icon: fill ? RiDeleteBinFill : RiDeleteBinLine,
3096
+ label: t.delete,
3097
+ className: "btn-danger"
3098
+ };
3099
+ case "deactivate":
3100
+ return {
3101
+ icon: fill ? RiStopCircleFill : RiStopCircleLine,
3102
+ label: t.deactivate,
3103
+ 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"
3104
+ };
3105
+ case "activate":
3106
+ return {
3107
+ icon: fill ? RiPlayCircleFill : RiPlayCircleLine,
3108
+ label: t.activate,
3109
+ 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"
3110
+ };
3111
+ case "view":
3112
+ return {
3113
+ icon: fill ? RiEyeFill : RiEyeLine,
3114
+ label: t.view,
3115
+ className: "bg-muted text-muted-foreground hover:bg-gray-100 hover:text-foreground border border-border transition-all duration-300 ease-in-out"
3116
+ };
3117
+ case "metrics":
3118
+ return {
3119
+ icon: fill ? RiBarChartFill : RiBarChartLine,
3120
+ label: t.metrics,
3121
+ 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"
3122
+ };
3123
+ case "start":
3124
+ return {
3125
+ icon: fill ? RiPlayFill : RiPlayLine,
3126
+ label: t.start,
3127
+ 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"
3128
+ };
3129
+ case "stop":
3130
+ return {
3131
+ icon: fill ? RiStopFill : RiStopLine,
3132
+ label: t.stop,
3133
+ 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"
3134
+ };
3135
+ case "restart":
3136
+ return {
3137
+ icon: fill ? RiRestartFill : RiRestartLine,
3138
+ label: t.restart,
3139
+ 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"
3140
+ };
3141
+ case "pause":
3142
+ return {
3143
+ icon: fill ? RiPauseFill : RiPauseLine,
3144
+ label: t.pause,
3145
+ 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"
3146
+ };
3147
+ case "clone":
3148
+ return {
3149
+ icon: fill ? RiFileCopyFill : RiFileCopyLine,
3150
+ label: t.clone,
3151
+ 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"
3152
+ };
3153
+ default:
3154
+ return null;
3155
+ }
3156
+ };
3157
+ const variantConfig = getVariantConfig();
3158
+ const variantClasses5 = {
3159
+ primary: "btn-primary",
3160
+ secondary: "btn-secondary",
3161
+ danger: "btn-danger",
3162
+ 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",
3163
+ 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",
3164
+ info: "bg-muted text-muted-foreground hover:bg-primary hover:text-primary-foreground border border-ring transition-all duration-300 ease-in-out",
3165
+ 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"
3166
+ };
3167
+ let variantClass = variantConfig ? variantConfig.className : variant ? variantClasses5[variant] : "";
3168
+ if (terminalMode && variantClass) {
3169
+ const hoverMatch = variantClass.match(/hover:text-(\w+)-(\d+)/);
3170
+ const hoverColor = hoverMatch ? `hover:text-${hoverMatch[1]}-${hoverMatch[2]}` : "hover:text-muted-foreground";
3171
+ variantClass = `text-muted-foreground ${hoverColor} transition-colors duration-200`;
3172
+ }
3173
+ const isDisabled = disabled || loading || externalLoading;
3174
+ const buttonContent = /* @__PURE__ */ jsxs(Fragment, { children: [
3175
+ loading || externalLoading ? /* @__PURE__ */ jsx(
3176
+ "div",
3177
+ {
3178
+ className: `${iconSizes[size]} flex items-center justify-center flex-shrink-0 ${terminalMode ? "text-muted-foreground p-0.5" : ""}`,
3179
+ "aria-hidden": "true",
3180
+ children: LoadingIconComponent ? /* @__PURE__ */ jsx(
3181
+ LoadingIconComponent,
3182
+ {
3183
+ className: `w-full h-full ${disableLoadingSpin ? "" : "animate-spin-slow"}`,
3184
+ "aria-hidden": "true"
3185
+ }
3186
+ ) : /* @__PURE__ */ jsx(
3187
+ "div",
3188
+ {
3189
+ className: "w-full h-full border-2 border-current border-t-transparent rounded-full animate-spin",
3190
+ "aria-hidden": "true"
3191
+ }
3192
+ )
3193
+ }
3194
+ ) : (variantConfig?.icon || IconComponent) && /* @__PURE__ */ jsx(
3195
+ "div",
3196
+ {
3197
+ className: `${iconSizes[size]} flex items-center justify-center flex-shrink-0`,
3198
+ "aria-hidden": "true",
3199
+ children: variantConfig?.icon ? /* @__PURE__ */ jsx(
3200
+ variantConfig.icon,
3201
+ {
3202
+ className: "w-full h-full",
3203
+ "aria-hidden": "true"
3204
+ }
3205
+ ) : IconComponent ? /* @__PURE__ */ jsx(IconComponent, { className: "w-full h-full", "aria-hidden": "true" }) : null
3206
+ }
3207
+ ),
3208
+ !iconOnly && (restProps.children ? restProps.children : (variantConfig?.label || label) && /* @__PURE__ */ jsx("span", { className: "flex items-center", children: variantConfig?.label || label }))
3209
+ ] });
3210
+ const accessibleLabel = title || (iconOnly ? variantConfig?.label || label : void 0);
3211
+ const buttonAriaLabel = iconOnly && !accessibleLabel ? variantConfig?.label || label || "Action button" : accessibleLabel;
3212
+ const tooltipContent = title || (iconOnly ? variantConfig?.label || label : void 0);
3213
+ const buttonClassName = `
3214
+
3215
+ ${terminalMode ? "btn-terminal" : `btn ${variantClass} ${paddingClasses3} ${heightClasses[size]} ${className} ${isDisabled ? "opacity-50 cursor-not-allowed" : ""}`}`;
3216
+ if (href) {
3217
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3218
+ /* @__PURE__ */ jsx(
3219
+ NextLink,
3220
+ {
3221
+ href,
3222
+ title: typeof title === "string" ? title : void 0,
3223
+ "aria-label": iconOnly ? typeof buttonAriaLabel === "string" ? buttonAriaLabel : void 0 : void 0,
3224
+ onClick: handleClick,
3225
+ className: buttonClassName,
3226
+ "data-tooltip-id": tooltipId,
3227
+ "aria-busy": loading || externalLoading ? "true" : void 0,
3228
+ ...restProps,
3229
+ children: buttonContent
3230
+ }
3231
+ ),
3232
+ tooltipId && /* @__PURE__ */ jsx(
3233
+ SharedTooltip,
3234
+ {
3235
+ id: tooltipId,
3236
+ place: tooltipPlace,
3237
+ offset: tooltipOffset,
3238
+ delayShow: tooltipDelayShow,
3239
+ delayHide: tooltipDelayHide,
3240
+ children: tooltipContent
3241
+ }
3242
+ )
3243
+ ] });
3244
+ }
3245
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3246
+ /* @__PURE__ */ jsx(
3247
+ "button",
3248
+ {
3249
+ type,
3250
+ onClick: handleClick,
3251
+ title: typeof title === "string" ? title : void 0,
3252
+ "aria-label": iconOnly ? typeof buttonAriaLabel === "string" ? buttonAriaLabel : void 0 : void 0,
3253
+ className: buttonClassName,
3254
+ "data-tooltip-id": tooltipId,
3255
+ "aria-busy": loading || externalLoading ? "true" : void 0,
3256
+ ...restProps,
3257
+ disabled: isDisabled,
3258
+ children: buttonContent
3259
+ }
3260
+ ),
3261
+ tooltipId && /* @__PURE__ */ jsx(
3262
+ SharedTooltip,
3263
+ {
3264
+ id: tooltipId,
3265
+ place: tooltipPlace,
3266
+ offset: tooltipOffset,
3267
+ delayShow: tooltipDelayShow,
3268
+ delayHide: tooltipDelayHide,
3269
+ children: tooltipContent
3270
+ }
3271
+ )
3272
+ ] });
3273
+ }
3274
+ function SearchCard({
3275
+ title,
3276
+ count,
3277
+ total,
3278
+ actionButton,
3279
+ children,
3280
+ className = "",
3281
+ icon: Icon,
3282
+ description
3283
+ }) {
3284
+ return /* @__PURE__ */ jsxs("div", { className: `card p-4 lg:p-6 ${className}`, children: [
3285
+ /* @__PURE__ */ jsx(
3286
+ SearchCardHeader,
3287
+ {
3288
+ title,
3289
+ count,
3290
+ total,
3291
+ actionButton,
3292
+ icon: Icon,
3293
+ description
3294
+ }
3295
+ ),
3296
+ /* @__PURE__ */ jsx(SearchCardContent, { children })
3297
+ ] });
3298
+ }
3299
+ function SearchCardHeader({
3300
+ title,
3301
+ count,
3302
+ total,
3303
+ actionButton,
3304
+ icon: Icon,
3305
+ description
3306
+ }) {
3307
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 mb-6", children: [
3308
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3 min-w-0 flex-1", children: [
3309
+ Icon && /* @__PURE__ */ jsx(Icon, { className: "w-6 h-6 lg:w-8 lg:h-8 text-foreground flex-shrink-0" }),
3310
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
3311
+ /* @__PURE__ */ jsx("h2", { className: "text-lg lg:text-2xl font-bold truncate", children: title }),
3312
+ description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground hidden md:block", children: description }),
3313
+ /* @__PURE__ */ jsxs("p", { className: "mt-1 lg:mt-2 text-xs text-secondary-foreground", children: [
3314
+ count,
3315
+ " of ",
3316
+ total,
3317
+ " ",
3318
+ title.toLowerCase()
3319
+ ] })
3320
+ ] })
3321
+ ] }),
3322
+ actionButton && /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-2 lg:gap-3 flex-shrink-0", children: actionButton })
3323
+ ] });
3324
+ }
3325
+ function SearchCardContent({
3326
+ children,
3327
+ className = ""
3328
+ }) {
3329
+ return /* @__PURE__ */ jsx("div", { className, children });
3330
+ }
3331
+ function SearchInput({
3332
+ placeholder,
3333
+ value,
3334
+ onChange,
3335
+ className = ""
3336
+ }) {
3337
+ return /* @__PURE__ */ jsx("div", { className: `flex-1 ${className}`, children: /* @__PURE__ */ jsx(
3338
+ FormInput,
3339
+ {
3340
+ label: "",
3341
+ name: "search",
3342
+ type: "text",
3343
+ value,
3344
+ onChange: (e) => onChange(e.target.value),
3345
+ placeholder,
3346
+ icon: {
3347
+ left: /* @__PURE__ */ jsx(RiSearchLine, { className: "w-4 h-4 text-muted-foreground" })
3348
+ },
3349
+ className: "mb-0"
3350
+ }
3351
+ ) });
3352
+ }
3353
+ function FilterSelect({
3354
+ value,
3355
+ onChange,
3356
+ options,
3357
+ placeholder,
3358
+ className = "",
3359
+ multiple = false,
3360
+ searchable = true
3361
+ }) {
3362
+ return /* @__PURE__ */ jsx(
3363
+ SmartSelect,
3364
+ {
3365
+ value,
3366
+ onChange,
3367
+ options,
3368
+ placeholder,
3369
+ className: `form-input form-input-md ${className}`,
3370
+ keepOpen: multiple,
3371
+ multiple,
3372
+ searchable
3373
+ }
3374
+ );
3375
+ }
3376
+ function RefreshButton({
3377
+ onClick,
3378
+ isLoading = false,
3379
+ className = ""
3380
+ }) {
3381
+ return /* @__PURE__ */ jsx(
3382
+ ActionButton,
3383
+ {
3384
+ icon: RiRefreshLine,
3385
+ onClick,
3386
+ disabled: isLoading,
3387
+ loading: isLoading,
3388
+ iconOnly: true,
3389
+ size: "md",
3390
+ variant: "secondary",
3391
+ tooltipId: "refresh-button-tooltip",
3392
+ title: "Refresh",
3393
+ tooltipPlace: "top",
3394
+ className: `btn-alt ${className}`
3395
+ }
3396
+ );
3397
+ }
3398
+ function FilterToggleButton({
3399
+ isOpen,
3400
+ onClick,
3401
+ onClear,
3402
+ activeCount = 0,
3403
+ className = ""
3404
+ }) {
3405
+ const tooltipText = activeCount > 0 ? `${activeCount} filter${activeCount === 1 ? "" : "s"} active` : "Filters";
3406
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3407
+ /* @__PURE__ */ jsx(
3408
+ IconButtonWithCount,
3409
+ {
3410
+ icon: /* @__PURE__ */ jsx(RiFilterLine, { className: "w-4 h-4" }),
3411
+ label: "Filters",
3412
+ count: activeCount,
3413
+ onClick,
3414
+ onClear,
3415
+ className,
3416
+ tooltipId: "filter-button-tooltip",
3417
+ tooltipContent: tooltipText,
3418
+ clearTooltipId: "clear-filters-tooltip",
3419
+ clearTooltipContent: "Clear all filters"
3420
+ }
3421
+ ),
3422
+ /* @__PURE__ */ jsx(SharedTooltip, { id: "filter-button-tooltip" })
3423
+ ] });
3424
+ }
3425
+ function MobileSearchLayout({
3426
+ searchInput,
3427
+ filters,
3428
+ viewControls,
3429
+ activeFilterCount = 0,
3430
+ onClearFilters,
3431
+ className = "",
3432
+ filterInline = false,
3433
+ searchButton
3434
+ }) {
3435
+ const [showFilters, setShowFilters] = useState(false);
3436
+ if (filterInline) {
3437
+ return /* @__PURE__ */ jsxs("div", { className: `space-y-4 ${className}`, children: [
3438
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
3439
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: searchInput }),
3440
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
3441
+ /* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsx(
3442
+ SmartDropdown,
3443
+ {
3444
+ isOpen: showFilters,
3445
+ onClose: () => setShowFilters(false),
3446
+ width: 600,
3447
+ maxHeight: 320,
3448
+ trigger: /* @__PURE__ */ jsx(
3449
+ FilterToggleButton,
3450
+ {
3451
+ isOpen: showFilters,
3452
+ onClick: () => setShowFilters(!showFilters),
3453
+ activeCount: activeFilterCount,
3454
+ onClear: onClearFilters
3455
+ }
3456
+ ),
3457
+ children: /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx("div", { className: "p-6", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: filters }) }) })
3458
+ }
3459
+ ) }),
3460
+ viewControls && viewControls
3461
+ ] })
3462
+ ] }),
3463
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-col lg:gap-3", children: [
3464
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col lg:flex-row gap-3", children: filters }),
3465
+ searchButton && /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: searchButton })
3466
+ ] }),
3467
+ /* @__PURE__ */ jsx(SharedTooltip, { id: "clear-filters-tooltip" })
3468
+ ] });
3469
+ }
3470
+ return /* @__PURE__ */ jsxs("div", { className: `space-y-4 ${className}`, children: [
3471
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
3472
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: searchInput }),
3473
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
3474
+ /* @__PURE__ */ jsx(
3475
+ SmartDropdown,
3476
+ {
3477
+ isOpen: showFilters,
3478
+ onClose: () => setShowFilters(false),
3479
+ width: 600,
3480
+ maxHeight: 320,
3481
+ trigger: /* @__PURE__ */ jsx(
3482
+ FilterToggleButton,
3483
+ {
3484
+ isOpen: showFilters,
3485
+ onClick: () => setShowFilters(!showFilters),
3486
+ activeCount: activeFilterCount,
3487
+ onClear: onClearFilters
3488
+ }
3489
+ ),
3490
+ children: /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx("div", { className: "p-6", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: filters }) }) })
3491
+ }
3492
+ ),
3493
+ viewControls && viewControls
3494
+ ] })
3495
+ ] }),
3496
+ /* @__PURE__ */ jsx(SharedTooltip, { id: "clear-filters-tooltip" })
3497
+ ] });
3498
+ }
3499
+ function ViewToggle({
3500
+ currentView,
3501
+ onViewChange,
3502
+ className = ""
3503
+ }) {
3504
+ const toggleView = () => {
3505
+ onViewChange(currentView === "cards" ? "list" : "cards");
3506
+ };
3507
+ return /* @__PURE__ */ jsx(
3508
+ ActionButton,
3509
+ {
3510
+ icon: currentView === "cards" ? RiGridFill : RiListUnordered,
3511
+ onClick: toggleView,
3512
+ iconOnly: true,
3513
+ size: "md",
3514
+ variant: "secondary",
3515
+ tooltipId: "view-toggle-tooltip",
3516
+ title: currentView === "cards" ? "Switch to List View" : "Switch to Card View",
3517
+ tooltipPlace: "top",
3518
+ className: `btn-alt ${className}`
3519
+ }
3520
+ );
3521
+ }
2055
3522
 
2056
3523
  // src/index.ts
2057
3524
  var VERSION = "0.1.3";
2058
3525
 
2059
- export { Badge, Button_default as Button, Card, ConfirmDialog_default as ConfirmDialog, Container, EmptyState_default as EmptyState, FormInput, FormSection, Grid, Link_default as Link, LoadingSpinner_default as LoadingSpinner, Modal, PageHeader, Skeleton, SkeletonItem, SmartDropdown, SmartSelect, Switch, Typography, VERSION, useConfirmDialog };
3526
+ export { ActionButton, Badge, Button_default as Button, Card, ConfirmDialog_default as ConfirmDialog, Container, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, EmptyState_default as EmptyState, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoBox, Link_default as Link, LoadingSpinner_default as LoadingSpinner, MobileSearchLayout, Modal, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, SharedTooltip, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner_default as Spinner, StatusBadge, StickyActionsColumn, Switch, Typography, VERSION, ViewToggle, useConfirmDialog };
2060
3527
  //# sourceMappingURL=index.mjs.map
2061
3528
  //# sourceMappingURL=index.mjs.map