@kilnonedre/foundation 0.0.20 → 0.0.21
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 +225 -224
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1346,53 +1346,42 @@ var TableHeaderText = (props) => {
|
|
|
1346
1346
|
// src/components/data-table/component/table-image/index.tsx
|
|
1347
1347
|
import { useState } from "react";
|
|
1348
1348
|
import { Eye } from "lucide-react";
|
|
1349
|
-
|
|
1350
|
-
// src/shadcn/components/card.tsx
|
|
1351
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1352
|
-
function Card({ className, ...props }) {
|
|
1353
|
-
return /* @__PURE__ */ jsx19(
|
|
1354
|
-
"div",
|
|
1355
|
-
{
|
|
1356
|
-
"data-slot": "card",
|
|
1357
|
-
className: cn(
|
|
1358
|
-
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
|
|
1359
|
-
className
|
|
1360
|
-
),
|
|
1361
|
-
...props
|
|
1362
|
-
}
|
|
1363
|
-
);
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
// src/components/data-table/component/table-image/index.tsx
|
|
1367
|
-
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1349
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1368
1350
|
var TableImage = (props) => {
|
|
1369
1351
|
const [preview, setPreview] = useState(null);
|
|
1370
1352
|
return /* @__PURE__ */ jsxs9("div", { className: "space-y-3", children: [
|
|
1371
|
-
/* @__PURE__ */
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1353
|
+
/* @__PURE__ */ jsx19("div", { className: "flex gap-3 overflow-x-auto", children: props.value.map((img, index) => /* @__PURE__ */ jsx19(
|
|
1354
|
+
"div",
|
|
1355
|
+
{
|
|
1356
|
+
className: "rounded-xl border bg-card text-card-foreground shadow group overflow-hidden w-25 aspect-square",
|
|
1357
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "relative bg-muted", children: [
|
|
1358
|
+
/* @__PURE__ */ jsx19(
|
|
1359
|
+
"img",
|
|
1360
|
+
{
|
|
1361
|
+
src: img.url,
|
|
1362
|
+
alt: "",
|
|
1363
|
+
className: "h-full w-full object-cover",
|
|
1364
|
+
loading: "lazy"
|
|
1365
|
+
}
|
|
1366
|
+
),
|
|
1367
|
+
/* @__PURE__ */ jsx19("div", { className: "absolute inset-0 flex items-start justify-end p-2 opacity-0 transition group-hover:opacity-100", children: /* @__PURE__ */ jsx19(
|
|
1368
|
+
Button,
|
|
1369
|
+
{
|
|
1370
|
+
size: "icon",
|
|
1371
|
+
variant: "secondary",
|
|
1372
|
+
className: "h-8 w-8",
|
|
1373
|
+
type: "button",
|
|
1374
|
+
onClick: () => setPreview(img),
|
|
1375
|
+
children: /* @__PURE__ */ jsx19(Eye, { className: "h-4 w-4" })
|
|
1376
|
+
}
|
|
1377
|
+
) })
|
|
1378
|
+
] })
|
|
1379
|
+
},
|
|
1380
|
+
img.id + index
|
|
1381
|
+
)) }),
|
|
1382
|
+
/* @__PURE__ */ jsx19(Dialog, { open: !!preview, onOpenChange: () => setPreview(null), children: /* @__PURE__ */ jsxs9(DialogContent, { className: "max-w-3xl", children: [
|
|
1383
|
+
/* @__PURE__ */ jsx19(DialogHeader, { children: /* @__PURE__ */ jsx19(DialogTitle, { children: "\u9884\u89C8" }) }),
|
|
1384
|
+
preview && /* @__PURE__ */ jsx19("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx19(
|
|
1396
1385
|
"img",
|
|
1397
1386
|
{
|
|
1398
1387
|
src: preview.url,
|
|
@@ -1413,9 +1402,9 @@ import {
|
|
|
1413
1402
|
ChevronRightIcon,
|
|
1414
1403
|
MoreHorizontalIcon
|
|
1415
1404
|
} from "lucide-react";
|
|
1416
|
-
import { jsx as
|
|
1405
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1417
1406
|
function Pagination({ className, ...props }) {
|
|
1418
|
-
return /* @__PURE__ */
|
|
1407
|
+
return /* @__PURE__ */ jsx20(
|
|
1419
1408
|
"nav",
|
|
1420
1409
|
{
|
|
1421
1410
|
role: "navigation",
|
|
@@ -1430,7 +1419,7 @@ function PaginationContent({
|
|
|
1430
1419
|
className,
|
|
1431
1420
|
...props
|
|
1432
1421
|
}) {
|
|
1433
|
-
return /* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ jsx20(
|
|
1434
1423
|
"ul",
|
|
1435
1424
|
{
|
|
1436
1425
|
"data-slot": "pagination-content",
|
|
@@ -1440,7 +1429,7 @@ function PaginationContent({
|
|
|
1440
1429
|
);
|
|
1441
1430
|
}
|
|
1442
1431
|
function PaginationItem({ ...props }) {
|
|
1443
|
-
return /* @__PURE__ */
|
|
1432
|
+
return /* @__PURE__ */ jsx20("li", { "data-slot": "pagination-item", ...props });
|
|
1444
1433
|
}
|
|
1445
1434
|
function PaginationLink({
|
|
1446
1435
|
className,
|
|
@@ -1448,7 +1437,7 @@ function PaginationLink({
|
|
|
1448
1437
|
size = "icon",
|
|
1449
1438
|
...props
|
|
1450
1439
|
}) {
|
|
1451
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ jsx20(
|
|
1452
1441
|
"a",
|
|
1453
1442
|
{
|
|
1454
1443
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -1469,17 +1458,14 @@ function PaginationPrevious({
|
|
|
1469
1458
|
className,
|
|
1470
1459
|
...props
|
|
1471
1460
|
}) {
|
|
1472
|
-
return /* @__PURE__ */
|
|
1461
|
+
return /* @__PURE__ */ jsx20(
|
|
1473
1462
|
PaginationLink,
|
|
1474
1463
|
{
|
|
1475
1464
|
"aria-label": "Go to previous page",
|
|
1476
1465
|
size: "default",
|
|
1477
1466
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
1478
1467
|
...props,
|
|
1479
|
-
children:
|
|
1480
|
-
/* @__PURE__ */ jsx21(ChevronLeftIcon, {}),
|
|
1481
|
-
/* @__PURE__ */ jsx21("span", { className: "hidden sm:block", children: "Previous" })
|
|
1482
|
-
]
|
|
1468
|
+
children: /* @__PURE__ */ jsx20(ChevronLeftIcon, {})
|
|
1483
1469
|
}
|
|
1484
1470
|
);
|
|
1485
1471
|
}
|
|
@@ -1487,17 +1473,14 @@ function PaginationNext({
|
|
|
1487
1473
|
className,
|
|
1488
1474
|
...props
|
|
1489
1475
|
}) {
|
|
1490
|
-
return /* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ jsx20(
|
|
1491
1477
|
PaginationLink,
|
|
1492
1478
|
{
|
|
1493
1479
|
"aria-label": "Go to next page",
|
|
1494
1480
|
size: "default",
|
|
1495
1481
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
1496
1482
|
...props,
|
|
1497
|
-
children:
|
|
1498
|
-
/* @__PURE__ */ jsx21("span", { className: "hidden sm:block", children: "Next" }),
|
|
1499
|
-
/* @__PURE__ */ jsx21(ChevronRightIcon, {})
|
|
1500
|
-
]
|
|
1483
|
+
children: /* @__PURE__ */ jsx20(ChevronRightIcon, {})
|
|
1501
1484
|
}
|
|
1502
1485
|
);
|
|
1503
1486
|
}
|
|
@@ -1513,8 +1496,8 @@ function PaginationEllipsis({
|
|
|
1513
1496
|
className: cn("flex size-9 items-center justify-center", className),
|
|
1514
1497
|
...props,
|
|
1515
1498
|
children: [
|
|
1516
|
-
/* @__PURE__ */
|
|
1517
|
-
/* @__PURE__ */
|
|
1499
|
+
/* @__PURE__ */ jsx20(MoreHorizontalIcon, { className: "size-4" }),
|
|
1500
|
+
/* @__PURE__ */ jsx20("span", { className: "sr-only", children: "More pages" })
|
|
1518
1501
|
]
|
|
1519
1502
|
}
|
|
1520
1503
|
);
|
|
@@ -1523,21 +1506,21 @@ function PaginationEllipsis({
|
|
|
1523
1506
|
// src/shadcn/components/select.tsx
|
|
1524
1507
|
import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
1525
1508
|
import { Select as SelectPrimitive } from "radix-ui";
|
|
1526
|
-
import { jsx as
|
|
1509
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1527
1510
|
function Select({
|
|
1528
1511
|
...props
|
|
1529
1512
|
}) {
|
|
1530
|
-
return /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ jsx21(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1531
1514
|
}
|
|
1532
1515
|
function SelectGroup({
|
|
1533
1516
|
...props
|
|
1534
1517
|
}) {
|
|
1535
|
-
return /* @__PURE__ */
|
|
1518
|
+
return /* @__PURE__ */ jsx21(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
1536
1519
|
}
|
|
1537
1520
|
function SelectValue({
|
|
1538
1521
|
...props
|
|
1539
1522
|
}) {
|
|
1540
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx21(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1541
1524
|
}
|
|
1542
1525
|
function SelectTrigger({
|
|
1543
1526
|
className,
|
|
@@ -1557,7 +1540,7 @@ function SelectTrigger({
|
|
|
1557
1540
|
...props,
|
|
1558
1541
|
children: [
|
|
1559
1542
|
children,
|
|
1560
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ jsx21(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx21(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1561
1544
|
]
|
|
1562
1545
|
}
|
|
1563
1546
|
);
|
|
@@ -1569,7 +1552,7 @@ function SelectContent({
|
|
|
1569
1552
|
align = "center",
|
|
1570
1553
|
...props
|
|
1571
1554
|
}) {
|
|
1572
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ jsx21(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs11(
|
|
1573
1556
|
SelectPrimitive.Content,
|
|
1574
1557
|
{
|
|
1575
1558
|
"data-slot": "select-content",
|
|
@@ -1582,8 +1565,8 @@ function SelectContent({
|
|
|
1582
1565
|
align,
|
|
1583
1566
|
...props,
|
|
1584
1567
|
children: [
|
|
1585
|
-
/* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1568
|
+
/* @__PURE__ */ jsx21(SelectScrollUpButton, {}),
|
|
1569
|
+
/* @__PURE__ */ jsx21(
|
|
1587
1570
|
SelectPrimitive.Viewport,
|
|
1588
1571
|
{
|
|
1589
1572
|
className: cn(
|
|
@@ -1593,7 +1576,7 @@ function SelectContent({
|
|
|
1593
1576
|
children
|
|
1594
1577
|
}
|
|
1595
1578
|
),
|
|
1596
|
-
/* @__PURE__ */
|
|
1579
|
+
/* @__PURE__ */ jsx21(SelectScrollDownButton, {})
|
|
1597
1580
|
]
|
|
1598
1581
|
}
|
|
1599
1582
|
) });
|
|
@@ -1613,15 +1596,15 @@ function SelectItem({
|
|
|
1613
1596
|
),
|
|
1614
1597
|
...props,
|
|
1615
1598
|
children: [
|
|
1616
|
-
/* @__PURE__ */
|
|
1599
|
+
/* @__PURE__ */ jsx21(
|
|
1617
1600
|
"span",
|
|
1618
1601
|
{
|
|
1619
1602
|
"data-slot": "select-item-indicator",
|
|
1620
1603
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1621
|
-
children: /* @__PURE__ */
|
|
1604
|
+
children: /* @__PURE__ */ jsx21(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx21(CheckIcon2, { className: "size-4" }) })
|
|
1622
1605
|
}
|
|
1623
1606
|
),
|
|
1624
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsx21(SelectPrimitive.ItemText, { children })
|
|
1625
1608
|
]
|
|
1626
1609
|
}
|
|
1627
1610
|
);
|
|
@@ -1630,7 +1613,7 @@ function SelectScrollUpButton({
|
|
|
1630
1613
|
className,
|
|
1631
1614
|
...props
|
|
1632
1615
|
}) {
|
|
1633
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ jsx21(
|
|
1634
1617
|
SelectPrimitive.ScrollUpButton,
|
|
1635
1618
|
{
|
|
1636
1619
|
"data-slot": "select-scroll-up-button",
|
|
@@ -1639,7 +1622,7 @@ function SelectScrollUpButton({
|
|
|
1639
1622
|
className
|
|
1640
1623
|
),
|
|
1641
1624
|
...props,
|
|
1642
|
-
children: /* @__PURE__ */
|
|
1625
|
+
children: /* @__PURE__ */ jsx21(ChevronUpIcon, { className: "size-4" })
|
|
1643
1626
|
}
|
|
1644
1627
|
);
|
|
1645
1628
|
}
|
|
@@ -1647,7 +1630,7 @@ function SelectScrollDownButton({
|
|
|
1647
1630
|
className,
|
|
1648
1631
|
...props
|
|
1649
1632
|
}) {
|
|
1650
|
-
return /* @__PURE__ */
|
|
1633
|
+
return /* @__PURE__ */ jsx21(
|
|
1651
1634
|
SelectPrimitive.ScrollDownButton,
|
|
1652
1635
|
{
|
|
1653
1636
|
"data-slot": "select-scroll-down-button",
|
|
@@ -1656,13 +1639,13 @@ function SelectScrollDownButton({
|
|
|
1656
1639
|
className
|
|
1657
1640
|
),
|
|
1658
1641
|
...props,
|
|
1659
|
-
children: /* @__PURE__ */
|
|
1642
|
+
children: /* @__PURE__ */ jsx21(ChevronDownIcon, { className: "size-4" })
|
|
1660
1643
|
}
|
|
1661
1644
|
);
|
|
1662
1645
|
}
|
|
1663
1646
|
|
|
1664
1647
|
// src/components/data-table/component/table-pagination/index.tsx
|
|
1665
|
-
import { jsx as
|
|
1648
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1666
1649
|
var buildPages = (current, total) => {
|
|
1667
1650
|
if (total <= 0) return [];
|
|
1668
1651
|
if (total <= 7) {
|
|
@@ -1705,8 +1688,8 @@ var TablePagination = (props) => {
|
|
|
1705
1688
|
[props]
|
|
1706
1689
|
);
|
|
1707
1690
|
return /* @__PURE__ */ jsxs12("div", { className: "flex w-full items-center gap-8 lg:w-fit", children: [
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ jsx22("div", { className: "ml-auto flex items-center gap-2 lg:ml-0", children: /* @__PURE__ */ jsx22(Pagination, { children: /* @__PURE__ */ jsxs12(PaginationContent, { children: [
|
|
1692
|
+
/* @__PURE__ */ jsx22(PaginationItem, { children: /* @__PURE__ */ jsx22(
|
|
1710
1693
|
PaginationPrevious,
|
|
1711
1694
|
{
|
|
1712
1695
|
onClick: () => updateCurrentPage(props.currentPage - 1),
|
|
@@ -1716,9 +1699,9 @@ var TablePagination = (props) => {
|
|
|
1716
1699
|
) }),
|
|
1717
1700
|
pageItems.map((item) => {
|
|
1718
1701
|
if (item.type === "ellipsis") {
|
|
1719
|
-
return /* @__PURE__ */
|
|
1702
|
+
return /* @__PURE__ */ jsx22(PaginationItem, { children: /* @__PURE__ */ jsx22(PaginationEllipsis, {}) }, item.key);
|
|
1720
1703
|
}
|
|
1721
|
-
return /* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ jsx22(PaginationItem, { children: /* @__PURE__ */ jsx22(
|
|
1722
1705
|
PaginationLink,
|
|
1723
1706
|
{
|
|
1724
1707
|
isActive: props.currentPage === item.page,
|
|
@@ -1727,7 +1710,7 @@ var TablePagination = (props) => {
|
|
|
1727
1710
|
}
|
|
1728
1711
|
) }, item.page);
|
|
1729
1712
|
}),
|
|
1730
|
-
/* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ jsx22(PaginationItem, { children: /* @__PURE__ */ jsx22(
|
|
1731
1714
|
PaginationNext,
|
|
1732
1715
|
{
|
|
1733
1716
|
onClick: () => updateCurrentPage(props.currentPage + 1),
|
|
@@ -1736,7 +1719,7 @@ var TablePagination = (props) => {
|
|
|
1736
1719
|
}
|
|
1737
1720
|
) })
|
|
1738
1721
|
] }) }) }),
|
|
1739
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ jsx22("div", { className: "hidden items-center gap-2 lg:flex", children: /* @__PURE__ */ jsxs12(
|
|
1740
1723
|
Select,
|
|
1741
1724
|
{
|
|
1742
1725
|
value: String(props.size),
|
|
@@ -1744,8 +1727,8 @@ var TablePagination = (props) => {
|
|
|
1744
1727
|
props.onUpdateSize(Number(value));
|
|
1745
1728
|
},
|
|
1746
1729
|
children: [
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ jsx22(SelectTrigger, { className: "w-20", id: "rows-per-page", children: /* @__PURE__ */ jsx22(SelectValue, {}) }),
|
|
1731
|
+
/* @__PURE__ */ jsx22(SelectContent, { side: "top", children: props.sizeList.map((pageSize) => /* @__PURE__ */ jsxs12(SelectItem, { value: `${pageSize}`, children: [
|
|
1749
1732
|
pageSize,
|
|
1750
1733
|
"/\u9875"
|
|
1751
1734
|
] }, pageSize)) })
|
|
@@ -1756,9 +1739,9 @@ var TablePagination = (props) => {
|
|
|
1756
1739
|
};
|
|
1757
1740
|
|
|
1758
1741
|
// src/components/data-table/component/table-text/index.tsx
|
|
1759
|
-
import { jsx as
|
|
1742
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1760
1743
|
var TableText = (props) => {
|
|
1761
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ jsx23(
|
|
1762
1745
|
"div",
|
|
1763
1746
|
{
|
|
1764
1747
|
className: cn2(
|
|
@@ -1773,21 +1756,21 @@ var TableText = (props) => {
|
|
|
1773
1756
|
// src/shadcn/components/dropdown-menu.tsx
|
|
1774
1757
|
import { CheckIcon as CheckIcon3, ChevronRightIcon as ChevronRightIcon2, CircleIcon } from "lucide-react";
|
|
1775
1758
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
1776
|
-
import { jsx as
|
|
1759
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1777
1760
|
function DropdownMenu({
|
|
1778
1761
|
...props
|
|
1779
1762
|
}) {
|
|
1780
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ jsx24(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1781
1764
|
}
|
|
1782
1765
|
function DropdownMenuPortal({
|
|
1783
1766
|
...props
|
|
1784
1767
|
}) {
|
|
1785
|
-
return /* @__PURE__ */
|
|
1768
|
+
return /* @__PURE__ */ jsx24(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1786
1769
|
}
|
|
1787
1770
|
function DropdownMenuTrigger({
|
|
1788
1771
|
...props
|
|
1789
1772
|
}) {
|
|
1790
|
-
return /* @__PURE__ */
|
|
1773
|
+
return /* @__PURE__ */ jsx24(
|
|
1791
1774
|
DropdownMenuPrimitive.Trigger,
|
|
1792
1775
|
{
|
|
1793
1776
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1800,7 +1783,7 @@ function DropdownMenuContent({
|
|
|
1800
1783
|
sideOffset = 4,
|
|
1801
1784
|
...props
|
|
1802
1785
|
}) {
|
|
1803
|
-
return /* @__PURE__ */
|
|
1786
|
+
return /* @__PURE__ */ jsx24(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx24(
|
|
1804
1787
|
DropdownMenuPrimitive.Content,
|
|
1805
1788
|
{
|
|
1806
1789
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1819,7 +1802,7 @@ function DropdownMenuItem({
|
|
|
1819
1802
|
variant = "default",
|
|
1820
1803
|
...props
|
|
1821
1804
|
}) {
|
|
1822
|
-
return /* @__PURE__ */
|
|
1805
|
+
return /* @__PURE__ */ jsx24(
|
|
1823
1806
|
DropdownMenuPrimitive.Item,
|
|
1824
1807
|
{
|
|
1825
1808
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1850,7 +1833,7 @@ function DropdownMenuCheckboxItem({
|
|
|
1850
1833
|
checked,
|
|
1851
1834
|
...props,
|
|
1852
1835
|
children: [
|
|
1853
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ jsx24("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CheckIcon3, { className: "size-4" }) }) }),
|
|
1854
1837
|
children
|
|
1855
1838
|
]
|
|
1856
1839
|
}
|
|
@@ -1859,7 +1842,7 @@ function DropdownMenuCheckboxItem({
|
|
|
1859
1842
|
function DropdownMenuSub({
|
|
1860
1843
|
...props
|
|
1861
1844
|
}) {
|
|
1862
|
-
return /* @__PURE__ */
|
|
1845
|
+
return /* @__PURE__ */ jsx24(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1863
1846
|
}
|
|
1864
1847
|
function DropdownMenuSubTrigger({
|
|
1865
1848
|
className,
|
|
@@ -1879,7 +1862,7 @@ function DropdownMenuSubTrigger({
|
|
|
1879
1862
|
...props,
|
|
1880
1863
|
children: [
|
|
1881
1864
|
children,
|
|
1882
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ jsx24(ChevronRightIcon2, { className: "ml-auto size-4" })
|
|
1883
1866
|
]
|
|
1884
1867
|
}
|
|
1885
1868
|
);
|
|
@@ -1888,7 +1871,7 @@ function DropdownMenuSubContent({
|
|
|
1888
1871
|
className,
|
|
1889
1872
|
...props
|
|
1890
1873
|
}) {
|
|
1891
|
-
return /* @__PURE__ */
|
|
1874
|
+
return /* @__PURE__ */ jsx24(
|
|
1892
1875
|
DropdownMenuPrimitive.SubContent,
|
|
1893
1876
|
{
|
|
1894
1877
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1904,20 +1887,20 @@ function DropdownMenuSubContent({
|
|
|
1904
1887
|
// src/shadcn/components/sheet.tsx
|
|
1905
1888
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
1906
1889
|
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
1907
|
-
import { jsx as
|
|
1890
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1908
1891
|
function Sheet({ ...props }) {
|
|
1909
|
-
return /* @__PURE__ */
|
|
1892
|
+
return /* @__PURE__ */ jsx25(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
1910
1893
|
}
|
|
1911
1894
|
function SheetPortal({
|
|
1912
1895
|
...props
|
|
1913
1896
|
}) {
|
|
1914
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ jsx25(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1915
1898
|
}
|
|
1916
1899
|
function SheetOverlay({
|
|
1917
1900
|
className,
|
|
1918
1901
|
...props
|
|
1919
1902
|
}) {
|
|
1920
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ jsx25(
|
|
1921
1904
|
SheetPrimitive.Overlay,
|
|
1922
1905
|
{
|
|
1923
1906
|
"data-slot": "sheet-overlay",
|
|
@@ -1937,7 +1920,7 @@ function SheetContent({
|
|
|
1937
1920
|
...props
|
|
1938
1921
|
}) {
|
|
1939
1922
|
return /* @__PURE__ */ jsxs14(SheetPortal, { children: [
|
|
1940
|
-
/* @__PURE__ */
|
|
1923
|
+
/* @__PURE__ */ jsx25(SheetOverlay, {}),
|
|
1941
1924
|
/* @__PURE__ */ jsxs14(
|
|
1942
1925
|
SheetPrimitive.Content,
|
|
1943
1926
|
{
|
|
@@ -1954,8 +1937,8 @@ function SheetContent({
|
|
|
1954
1937
|
children: [
|
|
1955
1938
|
children,
|
|
1956
1939
|
showCloseButton && /* @__PURE__ */ jsxs14(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1940
|
+
/* @__PURE__ */ jsx25(XIcon2, { className: "size-4" }),
|
|
1941
|
+
/* @__PURE__ */ jsx25("span", { className: "sr-only", children: "Close" })
|
|
1959
1942
|
] })
|
|
1960
1943
|
]
|
|
1961
1944
|
}
|
|
@@ -1963,7 +1946,7 @@ function SheetContent({
|
|
|
1963
1946
|
] });
|
|
1964
1947
|
}
|
|
1965
1948
|
function SheetHeader({ className, ...props }) {
|
|
1966
|
-
return /* @__PURE__ */
|
|
1949
|
+
return /* @__PURE__ */ jsx25(
|
|
1967
1950
|
"div",
|
|
1968
1951
|
{
|
|
1969
1952
|
"data-slot": "sheet-header",
|
|
@@ -1973,7 +1956,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
1973
1956
|
);
|
|
1974
1957
|
}
|
|
1975
1958
|
function SheetFooter({ className, ...props }) {
|
|
1976
|
-
return /* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ jsx25(
|
|
1977
1960
|
"div",
|
|
1978
1961
|
{
|
|
1979
1962
|
"data-slot": "sheet-footer",
|
|
@@ -1986,7 +1969,7 @@ function SheetTitle({
|
|
|
1986
1969
|
className,
|
|
1987
1970
|
...props
|
|
1988
1971
|
}) {
|
|
1989
|
-
return /* @__PURE__ */
|
|
1972
|
+
return /* @__PURE__ */ jsx25(
|
|
1990
1973
|
SheetPrimitive.Title,
|
|
1991
1974
|
{
|
|
1992
1975
|
"data-slot": "sheet-title",
|
|
@@ -1997,14 +1980,14 @@ function SheetTitle({
|
|
|
1997
1980
|
}
|
|
1998
1981
|
|
|
1999
1982
|
// src/shadcn/components/table.tsx
|
|
2000
|
-
import { jsx as
|
|
1983
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2001
1984
|
function Table({ className, ...props }) {
|
|
2002
|
-
return /* @__PURE__ */
|
|
1985
|
+
return /* @__PURE__ */ jsx26(
|
|
2003
1986
|
"div",
|
|
2004
1987
|
{
|
|
2005
1988
|
"data-slot": "table-container",
|
|
2006
1989
|
className: "relative w-full overflow-x-auto",
|
|
2007
|
-
children: /* @__PURE__ */
|
|
1990
|
+
children: /* @__PURE__ */ jsx26(
|
|
2008
1991
|
"table",
|
|
2009
1992
|
{
|
|
2010
1993
|
"data-slot": "table",
|
|
@@ -2016,7 +1999,7 @@ function Table({ className, ...props }) {
|
|
|
2016
1999
|
);
|
|
2017
2000
|
}
|
|
2018
2001
|
function TableHeader({ className, ...props }) {
|
|
2019
|
-
return /* @__PURE__ */
|
|
2002
|
+
return /* @__PURE__ */ jsx26(
|
|
2020
2003
|
"thead",
|
|
2021
2004
|
{
|
|
2022
2005
|
"data-slot": "table-header",
|
|
@@ -2026,7 +2009,7 @@ function TableHeader({ className, ...props }) {
|
|
|
2026
2009
|
);
|
|
2027
2010
|
}
|
|
2028
2011
|
function TableBody({ className, ...props }) {
|
|
2029
|
-
return /* @__PURE__ */
|
|
2012
|
+
return /* @__PURE__ */ jsx26(
|
|
2030
2013
|
"tbody",
|
|
2031
2014
|
{
|
|
2032
2015
|
"data-slot": "table-body",
|
|
@@ -2036,7 +2019,7 @@ function TableBody({ className, ...props }) {
|
|
|
2036
2019
|
);
|
|
2037
2020
|
}
|
|
2038
2021
|
function TableRow({ className, ...props }) {
|
|
2039
|
-
return /* @__PURE__ */
|
|
2022
|
+
return /* @__PURE__ */ jsx26(
|
|
2040
2023
|
"tr",
|
|
2041
2024
|
{
|
|
2042
2025
|
"data-slot": "table-row",
|
|
@@ -2049,7 +2032,7 @@ function TableRow({ className, ...props }) {
|
|
|
2049
2032
|
);
|
|
2050
2033
|
}
|
|
2051
2034
|
function TableHead({ className, ...props }) {
|
|
2052
|
-
return /* @__PURE__ */
|
|
2035
|
+
return /* @__PURE__ */ jsx26(
|
|
2053
2036
|
"th",
|
|
2054
2037
|
{
|
|
2055
2038
|
"data-slot": "table-head",
|
|
@@ -2062,7 +2045,7 @@ function TableHead({ className, ...props }) {
|
|
|
2062
2045
|
);
|
|
2063
2046
|
}
|
|
2064
2047
|
function TableCell({ className, ...props }) {
|
|
2065
|
-
return /* @__PURE__ */
|
|
2048
|
+
return /* @__PURE__ */ jsx26(
|
|
2066
2049
|
"td",
|
|
2067
2050
|
{
|
|
2068
2051
|
"data-slot": "table-cell",
|
|
@@ -2076,7 +2059,7 @@ function TableCell({ className, ...props }) {
|
|
|
2076
2059
|
}
|
|
2077
2060
|
|
|
2078
2061
|
// src/components/data-table/index.tsx
|
|
2079
|
-
import { jsx as
|
|
2062
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2080
2063
|
var buildParams = (page, size, keyword, filters, sorting) => {
|
|
2081
2064
|
const result = { page, size };
|
|
2082
2065
|
if (!isEmpty(keyword)) {
|
|
@@ -2233,25 +2216,25 @@ var DataTable = (props) => {
|
|
|
2233
2216
|
setAdvancedOpen(true);
|
|
2234
2217
|
},
|
|
2235
2218
|
children: [
|
|
2236
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx27(FilterIcon, {}),
|
|
2237
2220
|
"\u66F4\u591A\u7B5B\u9009"
|
|
2238
2221
|
]
|
|
2239
2222
|
}
|
|
2240
2223
|
),
|
|
2241
2224
|
(props.searchbar || props.advancedFilter) && /* @__PURE__ */ jsxs15(Button, { variant: "ghost", size: "sm", onClick: resetFilters, children: [
|
|
2242
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ jsx27(RotateCcwIcon, {}),
|
|
2243
2226
|
"\u91CD\u7F6E"
|
|
2244
2227
|
] })
|
|
2245
2228
|
] }),
|
|
2246
2229
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
2247
2230
|
/* @__PURE__ */ jsxs15(DropdownMenu, { children: [
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2231
|
+
/* @__PURE__ */ jsx27(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs15(Button, { variant: "outline", size: "sm", children: [
|
|
2232
|
+
/* @__PURE__ */ jsx27(ColumnsIcon, {}),
|
|
2233
|
+
/* @__PURE__ */ jsx27(ChevronDownIcon2, {})
|
|
2251
2234
|
] }) }),
|
|
2252
|
-
/* @__PURE__ */
|
|
2235
|
+
/* @__PURE__ */ jsx27(DropdownMenuContent, { align: "end", className: "w-56", children: table.getAllColumns().filter(
|
|
2253
2236
|
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
2254
|
-
).map((column) => /* @__PURE__ */
|
|
2237
|
+
).map((column) => /* @__PURE__ */ jsx27(
|
|
2255
2238
|
DropdownMenuCheckboxItem,
|
|
2256
2239
|
{
|
|
2257
2240
|
checked: column.getIsVisible(),
|
|
@@ -2265,24 +2248,24 @@ var DataTable = (props) => {
|
|
|
2265
2248
|
] })
|
|
2266
2249
|
] }),
|
|
2267
2250
|
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-4 overflow-auto px-4 pb-0.5 lg:px-6", children: [
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2251
|
+
/* @__PURE__ */ jsx27("div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ jsxs15(Table, { children: [
|
|
2252
|
+
/* @__PURE__ */ jsx27(TableHeader, { className: "sticky top-0 z-10 bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx27(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx27(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : flexRender(
|
|
2270
2253
|
header.column.columnDef.header,
|
|
2271
2254
|
header.getContext()
|
|
2272
2255
|
) }, header.id)) }, headerGroup.id)) }),
|
|
2273
|
-
/* @__PURE__ */
|
|
2256
|
+
/* @__PURE__ */ jsx27(TableBody, { children: table.getRowModel().rows.length > 0 ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx27(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx27(TableCell, { children: flexRender(
|
|
2274
2257
|
cell.column.columnDef.cell,
|
|
2275
2258
|
cell.getContext()
|
|
2276
|
-
) }, cell.id)) }, row.id)) : /* @__PURE__ */
|
|
2259
|
+
) }, cell.id)) }, row.id)) : /* @__PURE__ */ jsx27(TableRow, { children: /* @__PURE__ */ jsx27(
|
|
2277
2260
|
TableCell,
|
|
2278
2261
|
{
|
|
2279
2262
|
colSpan: props.columns.length,
|
|
2280
2263
|
className: "h-24 text-center",
|
|
2281
|
-
children: /* @__PURE__ */
|
|
2264
|
+
children: /* @__PURE__ */ jsx27(TableEmpty, {})
|
|
2282
2265
|
}
|
|
2283
2266
|
) }) })
|
|
2284
2267
|
] }) }),
|
|
2285
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx27("div", { className: "flex items-center justify-end px-4", children: /* @__PURE__ */ jsx27(
|
|
2286
2269
|
TablePagination,
|
|
2287
2270
|
{
|
|
2288
2271
|
currentPage,
|
|
@@ -2297,14 +2280,14 @@ var DataTable = (props) => {
|
|
|
2297
2280
|
}
|
|
2298
2281
|
) })
|
|
2299
2282
|
] }),
|
|
2300
|
-
props.advancedFilter && /* @__PURE__ */
|
|
2301
|
-
/* @__PURE__ */
|
|
2302
|
-
/* @__PURE__ */
|
|
2283
|
+
props.advancedFilter && /* @__PURE__ */ jsx27(Sheet, { open: advancedOpen, onOpenChange: setAdvancedOpen, children: /* @__PURE__ */ jsxs15(SheetContent, { className: "flex w-[420px] flex-col p-0", children: [
|
|
2284
|
+
/* @__PURE__ */ jsx27(SheetHeader, { className: "border-b px-6 py-4", children: /* @__PURE__ */ jsx27(SheetTitle, { children: "\u66F4\u591A\u7B5B\u9009" }) }),
|
|
2285
|
+
/* @__PURE__ */ jsx27("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: props.advancedFilter({
|
|
2303
2286
|
draftFilters,
|
|
2304
2287
|
setDraftFilters: (updater) => setDraftFilters((prev) => updater(prev))
|
|
2305
2288
|
}) }),
|
|
2306
2289
|
/* @__PURE__ */ jsxs15(SheetFooter, { className: "border-t px-6 py-4", children: [
|
|
2307
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ jsx27(
|
|
2308
2291
|
Button,
|
|
2309
2292
|
{
|
|
2310
2293
|
className: "flex-1",
|
|
@@ -2313,7 +2296,7 @@ var DataTable = (props) => {
|
|
|
2313
2296
|
children: "\u91CD\u7F6E"
|
|
2314
2297
|
}
|
|
2315
2298
|
),
|
|
2316
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ jsx27(Button, { className: "flex-1", onClick: confirmAdvanced, children: "\u786E\u8BA4\u7B5B\u9009" })
|
|
2317
2300
|
] })
|
|
2318
2301
|
] }) })
|
|
2319
2302
|
] });
|
|
@@ -2321,7 +2304,7 @@ var DataTable = (props) => {
|
|
|
2321
2304
|
|
|
2322
2305
|
// src/components/dialog/index.tsx
|
|
2323
2306
|
import { useState as useState3 } from "react";
|
|
2324
|
-
import { jsx as
|
|
2307
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2325
2308
|
var Dialog2 = (props) => {
|
|
2326
2309
|
const [open, setOpen] = useState3(false);
|
|
2327
2310
|
const [confirmLoading, setConfirmLoading] = useState3(false);
|
|
@@ -2339,13 +2322,13 @@ var Dialog2 = (props) => {
|
|
|
2339
2322
|
}
|
|
2340
2323
|
};
|
|
2341
2324
|
return /* @__PURE__ */ jsxs16(Dialog, { open, onOpenChange: setOpen, children: [
|
|
2342
|
-
/* @__PURE__ */
|
|
2325
|
+
/* @__PURE__ */ jsx28(DialogTrigger, { asChild: true, children: props.children }),
|
|
2343
2326
|
/* @__PURE__ */ jsxs16(DialogContent, { className: "sm:max-w-106.25", children: [
|
|
2344
|
-
/* @__PURE__ */
|
|
2345
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ jsx28(DialogHeader, { children: /* @__PURE__ */ jsx28(DialogTitle, { children: props.title ?? "\u63D0\u793A" }) }),
|
|
2328
|
+
/* @__PURE__ */ jsx28("div", { className: "py-4", children: typeof props.content === "string" ? /* @__PURE__ */ jsx28("div", { children: props.content }) : props.content }),
|
|
2346
2329
|
/* @__PURE__ */ jsxs16(DialogFooter, { children: [
|
|
2347
|
-
/* @__PURE__ */
|
|
2348
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ jsx28(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx28(Button2, { variant: EnumVariant.OUTLINE, disabled: confirmLoading, children: props.cancelText ?? "\u53D6\u6D88" }) }),
|
|
2331
|
+
/* @__PURE__ */ jsx28(
|
|
2349
2332
|
Button2,
|
|
2350
2333
|
{
|
|
2351
2334
|
type: "button",
|
|
@@ -2371,7 +2354,7 @@ import {
|
|
|
2371
2354
|
getSortedRowModel as getSortedRowModel2,
|
|
2372
2355
|
useReactTable as useReactTable2
|
|
2373
2356
|
} from "@tanstack/react-table";
|
|
2374
|
-
import { jsx as
|
|
2357
|
+
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2375
2358
|
var DisplayTable = (props) => {
|
|
2376
2359
|
const [rowSelection, setRowSelection] = useState4({});
|
|
2377
2360
|
const [columnVisibility, setColumnVisibility] = useState4({});
|
|
@@ -2402,24 +2385,24 @@ var DisplayTable = (props) => {
|
|
|
2402
2385
|
getFacetedRowModel: getFacetedRowModel2(),
|
|
2403
2386
|
getFacetedUniqueValues: getFacetedUniqueValues2()
|
|
2404
2387
|
});
|
|
2405
|
-
return /* @__PURE__ */
|
|
2406
|
-
/* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ jsx29("div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ jsxs17(Table, { children: [
|
|
2389
|
+
/* @__PURE__ */ jsx29(TableHeader, { className: "sticky top-0 z-10 bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx29(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx29(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : flexRender2(
|
|
2407
2390
|
header.column.columnDef.header,
|
|
2408
2391
|
header.getContext()
|
|
2409
2392
|
) }, header.id)) }, headerGroup.id)) }),
|
|
2410
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ jsx29(TableBody, { className: "**:data-[slot=table-cell]:first:w-8", children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx29(
|
|
2411
2394
|
TableRow,
|
|
2412
2395
|
{
|
|
2413
2396
|
"data-state": row.getIsSelected() && "selected",
|
|
2414
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
2397
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx29(TableCell, { children: flexRender2(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
2415
2398
|
},
|
|
2416
2399
|
row.id
|
|
2417
|
-
)) : /* @__PURE__ */
|
|
2400
|
+
)) : /* @__PURE__ */ jsx29(TableRow, { children: /* @__PURE__ */ jsx29(
|
|
2418
2401
|
TableCell,
|
|
2419
2402
|
{
|
|
2420
2403
|
colSpan: props.columns.length,
|
|
2421
2404
|
className: "h-24 text-center",
|
|
2422
|
-
children: /* @__PURE__ */
|
|
2405
|
+
children: /* @__PURE__ */ jsx29(TableEmpty, {})
|
|
2423
2406
|
}
|
|
2424
2407
|
) }) })
|
|
2425
2408
|
] }) });
|
|
@@ -2427,7 +2410,7 @@ var DisplayTable = (props) => {
|
|
|
2427
2410
|
|
|
2428
2411
|
// src/components/dropdown-cascader/dropdown-cascader-base.tsx
|
|
2429
2412
|
import { Check } from "lucide-react";
|
|
2430
|
-
import { jsx as
|
|
2413
|
+
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2431
2414
|
var getOptionMap = (options) => {
|
|
2432
2415
|
const map = /* @__PURE__ */ new Map();
|
|
2433
2416
|
const walk = (nodes, parent) => {
|
|
@@ -2452,8 +2435,8 @@ var renderCascaderNodes = (nodes, parentPath, selectedValues, onSelect) => {
|
|
|
2452
2435
|
const isSelected = selectedValues.includes(node.value);
|
|
2453
2436
|
if (isBranch) {
|
|
2454
2437
|
return /* @__PURE__ */ jsxs18(DropdownMenuSub, { children: [
|
|
2455
|
-
/* @__PURE__ */
|
|
2456
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ jsx30(DropdownMenuSubTrigger, { disabled: node.disabled, children: node.label }),
|
|
2439
|
+
/* @__PURE__ */ jsx30(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs18(DropdownMenuSubContent, { className: "min-w-56", children: [
|
|
2457
2440
|
/* @__PURE__ */ jsxs18(
|
|
2458
2441
|
DropdownMenuItem,
|
|
2459
2442
|
{
|
|
@@ -2464,8 +2447,8 @@ var renderCascaderNodes = (nodes, parentPath, selectedValues, onSelect) => {
|
|
|
2464
2447
|
},
|
|
2465
2448
|
className: "flex items-center justify-between",
|
|
2466
2449
|
children: [
|
|
2467
|
-
/* @__PURE__ */
|
|
2468
|
-
isSelected && /* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx30("span", { children: node.label }),
|
|
2451
|
+
isSelected && /* @__PURE__ */ jsx30(Check, { className: "size-4" })
|
|
2469
2452
|
]
|
|
2470
2453
|
}
|
|
2471
2454
|
),
|
|
@@ -2488,8 +2471,8 @@ var renderCascaderNodes = (nodes, parentPath, selectedValues, onSelect) => {
|
|
|
2488
2471
|
},
|
|
2489
2472
|
className: "flex items-center justify-between",
|
|
2490
2473
|
children: [
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
isSelected && /* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ jsx30("span", { children: node.label }),
|
|
2475
|
+
isSelected && /* @__PURE__ */ jsx30(Check, { className: "size-4" })
|
|
2493
2476
|
]
|
|
2494
2477
|
},
|
|
2495
2478
|
node.value
|
|
@@ -2500,7 +2483,7 @@ var renderCascaderNodes = (nodes, parentPath, selectedValues, onSelect) => {
|
|
|
2500
2483
|
// src/components/dropdown-cascader/dropdown-cascader-multi.tsx
|
|
2501
2484
|
import * as React from "react";
|
|
2502
2485
|
import { ChevronDown, X } from "lucide-react";
|
|
2503
|
-
import { jsx as
|
|
2486
|
+
import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2504
2487
|
var toggle = (list, value) => {
|
|
2505
2488
|
if (list.includes(value)) {
|
|
2506
2489
|
return list.filter((v) => v !== value);
|
|
@@ -2540,7 +2523,7 @@ var DropdownCascaderMulti = ({
|
|
|
2540
2523
|
label: i.path.map((p) => p.label).join(" / ")
|
|
2541
2524
|
}));
|
|
2542
2525
|
return /* @__PURE__ */ jsxs19(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
2543
|
-
/* @__PURE__ */
|
|
2526
|
+
/* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, className: "self-start", children: /* @__PURE__ */ jsxs19(
|
|
2544
2527
|
Button,
|
|
2545
2528
|
{
|
|
2546
2529
|
variant: "outline",
|
|
@@ -2554,7 +2537,7 @@ var DropdownCascaderMulti = ({
|
|
|
2554
2537
|
className: "inline-flex items-center gap-1 rounded border px-2 py-0.5 text-xs",
|
|
2555
2538
|
children: [
|
|
2556
2539
|
item.label,
|
|
2557
|
-
/* @__PURE__ */
|
|
2540
|
+
/* @__PURE__ */ jsx31(
|
|
2558
2541
|
"span",
|
|
2559
2542
|
{
|
|
2560
2543
|
role: "button",
|
|
@@ -2576,7 +2559,7 @@ var DropdownCascaderMulti = ({
|
|
|
2576
2559
|
remove(item.value);
|
|
2577
2560
|
}
|
|
2578
2561
|
},
|
|
2579
|
-
children: /* @__PURE__ */
|
|
2562
|
+
children: /* @__PURE__ */ jsx31(X, { className: "size-3" })
|
|
2580
2563
|
}
|
|
2581
2564
|
)
|
|
2582
2565
|
]
|
|
@@ -2584,11 +2567,11 @@ var DropdownCascaderMulti = ({
|
|
|
2584
2567
|
item.value
|
|
2585
2568
|
))
|
|
2586
2569
|
] }),
|
|
2587
|
-
/* @__PURE__ */
|
|
2570
|
+
/* @__PURE__ */ jsx31(ChevronDown, { className: "size-4 opacity-50" })
|
|
2588
2571
|
]
|
|
2589
2572
|
}
|
|
2590
2573
|
) }),
|
|
2591
|
-
/* @__PURE__ */
|
|
2574
|
+
/* @__PURE__ */ jsx31(
|
|
2592
2575
|
DropdownMenuContent,
|
|
2593
2576
|
{
|
|
2594
2577
|
align: "start",
|
|
@@ -2602,7 +2585,7 @@ var DropdownCascaderMulti = ({
|
|
|
2602
2585
|
// src/components/dropdown-cascader/dropdown-cascader-single.tsx
|
|
2603
2586
|
import * as React2 from "react";
|
|
2604
2587
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
2605
|
-
import { jsx as
|
|
2588
|
+
import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2606
2589
|
var DropdownCascaderSingle = (props) => {
|
|
2607
2590
|
const optionMap = React2.useMemo(
|
|
2608
2591
|
() => getOptionMap(props.options),
|
|
@@ -2617,18 +2600,18 @@ var DropdownCascaderSingle = (props) => {
|
|
|
2617
2600
|
};
|
|
2618
2601
|
const selectedPath = props.value ? optionMap.get(props.value)?.path.map((i) => i.label).join(" / ") : "";
|
|
2619
2602
|
return /* @__PURE__ */ jsxs20(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
2620
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ jsx32(DropdownMenuTrigger, { asChild: true, className: "self-start", children: /* @__PURE__ */ jsxs20(
|
|
2621
2604
|
Button,
|
|
2622
2605
|
{
|
|
2623
2606
|
variant: "outline",
|
|
2624
2607
|
className: "h-auto! min-h-9 w-full justify-between px-3 leading-none",
|
|
2625
2608
|
children: [
|
|
2626
2609
|
selectedPath || props.placeholder,
|
|
2627
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ jsx32(ChevronDown2, { className: "size-4 ml-auto opacity-50" })
|
|
2628
2611
|
]
|
|
2629
2612
|
}
|
|
2630
2613
|
) }),
|
|
2631
|
-
/* @__PURE__ */
|
|
2614
|
+
/* @__PURE__ */ jsx32(
|
|
2632
2615
|
DropdownMenuContent,
|
|
2633
2616
|
{
|
|
2634
2617
|
align: "start",
|
|
@@ -2654,12 +2637,12 @@ import { cva as cva5 } from "class-variance-authority";
|
|
|
2654
2637
|
|
|
2655
2638
|
// src/shadcn/components/label.tsx
|
|
2656
2639
|
import { Label as LabelPrimitive } from "radix-ui";
|
|
2657
|
-
import { jsx as
|
|
2640
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2658
2641
|
function Label({
|
|
2659
2642
|
className,
|
|
2660
2643
|
...props
|
|
2661
2644
|
}) {
|
|
2662
|
-
return /* @__PURE__ */
|
|
2645
|
+
return /* @__PURE__ */ jsx33(
|
|
2663
2646
|
LabelPrimitive.Root,
|
|
2664
2647
|
{
|
|
2665
2648
|
"data-slot": "label",
|
|
@@ -2674,12 +2657,12 @@ function Label({
|
|
|
2674
2657
|
|
|
2675
2658
|
// src/shadcn/components/separator.tsx
|
|
2676
2659
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
2677
|
-
import { jsx as
|
|
2660
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2678
2661
|
|
|
2679
2662
|
// src/shadcn/components/field.tsx
|
|
2680
|
-
import { jsx as
|
|
2663
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2681
2664
|
function FieldGroup2({ className, ...props }) {
|
|
2682
|
-
return /* @__PURE__ */
|
|
2665
|
+
return /* @__PURE__ */ jsx35(
|
|
2683
2666
|
"div",
|
|
2684
2667
|
{
|
|
2685
2668
|
"data-slot": "field-group",
|
|
@@ -2719,7 +2702,7 @@ function Field({
|
|
|
2719
2702
|
orientation = "vertical",
|
|
2720
2703
|
...props
|
|
2721
2704
|
}) {
|
|
2722
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsx35(
|
|
2723
2706
|
"div",
|
|
2724
2707
|
{
|
|
2725
2708
|
role: "group",
|
|
@@ -2736,7 +2719,7 @@ function FieldLabel({
|
|
|
2736
2719
|
children,
|
|
2737
2720
|
...props
|
|
2738
2721
|
}) {
|
|
2739
|
-
return /* @__PURE__ */
|
|
2722
|
+
return /* @__PURE__ */ jsx35(
|
|
2740
2723
|
Label,
|
|
2741
2724
|
{
|
|
2742
2725
|
"data-slot": "field-label",
|
|
@@ -2749,7 +2732,7 @@ function FieldLabel({
|
|
|
2749
2732
|
...props,
|
|
2750
2733
|
children: /* @__PURE__ */ jsxs21("span", { className: "flex items-center gap-1", children: [
|
|
2751
2734
|
children,
|
|
2752
|
-
required && /* @__PURE__ */
|
|
2735
|
+
required && /* @__PURE__ */ jsx35("span", { className: "text-destructive", children: "*" })
|
|
2753
2736
|
] })
|
|
2754
2737
|
}
|
|
2755
2738
|
);
|
|
@@ -2773,14 +2756,14 @@ function FieldError({
|
|
|
2773
2756
|
if (uniqueErrors?.length == 1) {
|
|
2774
2757
|
return uniqueErrors[0]?.message;
|
|
2775
2758
|
}
|
|
2776
|
-
return /* @__PURE__ */
|
|
2777
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ jsx35("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
2760
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx35("li", { children: error.message }, index)
|
|
2778
2761
|
) });
|
|
2779
2762
|
}, [children, errors]);
|
|
2780
2763
|
if (!content) {
|
|
2781
2764
|
return null;
|
|
2782
2765
|
}
|
|
2783
|
-
return /* @__PURE__ */
|
|
2766
|
+
return /* @__PURE__ */ jsx35(
|
|
2784
2767
|
"div",
|
|
2785
2768
|
{
|
|
2786
2769
|
role: "alert",
|
|
@@ -2794,12 +2777,12 @@ function FieldError({
|
|
|
2794
2777
|
|
|
2795
2778
|
// src/shadcn/components/tooltip.tsx
|
|
2796
2779
|
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
2797
|
-
import { jsx as
|
|
2780
|
+
import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2798
2781
|
function TooltipProvider({
|
|
2799
2782
|
delayDuration = 0,
|
|
2800
2783
|
...props
|
|
2801
2784
|
}) {
|
|
2802
|
-
return /* @__PURE__ */
|
|
2785
|
+
return /* @__PURE__ */ jsx36(
|
|
2803
2786
|
TooltipPrimitive.Provider,
|
|
2804
2787
|
{
|
|
2805
2788
|
"data-slot": "tooltip-provider",
|
|
@@ -2811,12 +2794,12 @@ function TooltipProvider({
|
|
|
2811
2794
|
function Tooltip({
|
|
2812
2795
|
...props
|
|
2813
2796
|
}) {
|
|
2814
|
-
return /* @__PURE__ */
|
|
2797
|
+
return /* @__PURE__ */ jsx36(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
2815
2798
|
}
|
|
2816
2799
|
function TooltipTrigger({
|
|
2817
2800
|
...props
|
|
2818
2801
|
}) {
|
|
2819
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ jsx36(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
2820
2803
|
}
|
|
2821
2804
|
function TooltipContent({
|
|
2822
2805
|
className,
|
|
@@ -2824,7 +2807,7 @@ function TooltipContent({
|
|
|
2824
2807
|
children,
|
|
2825
2808
|
...props
|
|
2826
2809
|
}) {
|
|
2827
|
-
return /* @__PURE__ */
|
|
2810
|
+
return /* @__PURE__ */ jsx36(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs22(
|
|
2828
2811
|
TooltipPrimitive.Content,
|
|
2829
2812
|
{
|
|
2830
2813
|
"data-slot": "tooltip-content",
|
|
@@ -2836,35 +2819,35 @@ function TooltipContent({
|
|
|
2836
2819
|
...props,
|
|
2837
2820
|
children: [
|
|
2838
2821
|
children,
|
|
2839
|
-
/* @__PURE__ */
|
|
2822
|
+
/* @__PURE__ */ jsx36(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
|
|
2840
2823
|
]
|
|
2841
2824
|
}
|
|
2842
2825
|
) });
|
|
2843
2826
|
}
|
|
2844
2827
|
|
|
2845
2828
|
// src/components/field-controller/index.tsx
|
|
2846
|
-
import { jsx as
|
|
2829
|
+
import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2847
2830
|
var FieldController = ({
|
|
2848
2831
|
required = false,
|
|
2849
2832
|
...props
|
|
2850
2833
|
}) => {
|
|
2851
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ jsx37(
|
|
2852
2835
|
Controller,
|
|
2853
2836
|
{
|
|
2854
2837
|
name: props.name,
|
|
2855
2838
|
control: props.control,
|
|
2856
2839
|
render: ({ field, fieldState }) => /* @__PURE__ */ jsxs23(Field, { "data-invalid": fieldState.invalid, children: [
|
|
2857
2840
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-spacing-xs", children: [
|
|
2858
|
-
/* @__PURE__ */
|
|
2841
|
+
/* @__PURE__ */ jsx37(FieldLabel, { htmlFor: props.id, required, children: props.label }),
|
|
2859
2842
|
props.tip && /* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
2860
|
-
/* @__PURE__ */
|
|
2843
|
+
/* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(
|
|
2861
2844
|
CircleQuestionMark,
|
|
2862
2845
|
{
|
|
2863
2846
|
size: "1rem",
|
|
2864
2847
|
className: "text-muted-foreground"
|
|
2865
2848
|
}
|
|
2866
2849
|
) }),
|
|
2867
|
-
/* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ jsx37(
|
|
2868
2851
|
TooltipContent,
|
|
2869
2852
|
{
|
|
2870
2853
|
side: "right",
|
|
@@ -2879,16 +2862,16 @@ var FieldController = ({
|
|
|
2879
2862
|
fieldState,
|
|
2880
2863
|
id: props.id
|
|
2881
2864
|
}),
|
|
2882
|
-
fieldState.error && /* @__PURE__ */
|
|
2865
|
+
fieldState.error && /* @__PURE__ */ jsx37(FieldError, { errors: [fieldState.error] })
|
|
2883
2866
|
] })
|
|
2884
2867
|
}
|
|
2885
2868
|
);
|
|
2886
2869
|
};
|
|
2887
2870
|
|
|
2888
2871
|
// src/components/field-group/index.tsx
|
|
2889
|
-
import { jsx as
|
|
2872
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2890
2873
|
var FieldGroup = (props) => {
|
|
2891
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ jsx38(
|
|
2892
2875
|
"div",
|
|
2893
2876
|
{
|
|
2894
2877
|
className: cn2(
|
|
@@ -2901,28 +2884,28 @@ var FieldGroup = (props) => {
|
|
|
2901
2884
|
};
|
|
2902
2885
|
|
|
2903
2886
|
// src/components/text/index.tsx
|
|
2904
|
-
import { jsx as
|
|
2887
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2905
2888
|
var Text = (props) => {
|
|
2906
|
-
return /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ jsx39("div", { className: cn2("", props.className), children: props.children });
|
|
2907
2890
|
};
|
|
2908
2891
|
|
|
2909
2892
|
// src/components/field-plain/index.tsx
|
|
2910
|
-
import { Fragment as Fragment2, jsx as
|
|
2893
|
+
import { Fragment as Fragment2, jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2911
2894
|
var FieldPlain = ({
|
|
2912
2895
|
required = false,
|
|
2913
2896
|
mode = EnumFormMode.VIEW,
|
|
2914
2897
|
...props
|
|
2915
2898
|
}) => {
|
|
2916
2899
|
const label = props.label ?? "-";
|
|
2917
|
-
return /* @__PURE__ */
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
mode === EnumFormMode.VIEW ? /* @__PURE__ */
|
|
2920
|
-
props.error && /* @__PURE__ */
|
|
2900
|
+
return /* @__PURE__ */ jsx40(Fragment2, { children: /* @__PURE__ */ jsxs24(Field, { "data-invalid": props.invalid, children: [
|
|
2901
|
+
/* @__PURE__ */ jsx40(FieldLabel, { htmlFor: props.id, required, children: props.name }),
|
|
2902
|
+
mode === EnumFormMode.VIEW ? /* @__PURE__ */ jsx40(Text, { children: label }) : props.children,
|
|
2903
|
+
props.error && /* @__PURE__ */ jsx40(FieldError, { errors: [{ message: props.error }] })
|
|
2921
2904
|
] }) });
|
|
2922
2905
|
};
|
|
2923
2906
|
|
|
2924
2907
|
// src/components/field-text/index.tsx
|
|
2925
|
-
import { jsx as
|
|
2908
|
+
import { jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2926
2909
|
var FieldText = ({
|
|
2927
2910
|
id,
|
|
2928
2911
|
name,
|
|
@@ -2933,13 +2916,13 @@ var FieldText = ({
|
|
|
2933
2916
|
}) => {
|
|
2934
2917
|
const isEmpty2 = value === "" || value == null;
|
|
2935
2918
|
return /* @__PURE__ */ jsxs25(Field, { children: [
|
|
2936
|
-
/* @__PURE__ */
|
|
2937
|
-
/* @__PURE__ */
|
|
2919
|
+
/* @__PURE__ */ jsx41(FieldLabel, { htmlFor: id, required, children: name }),
|
|
2920
|
+
/* @__PURE__ */ jsx41("div", { id, className: "text-sm leading-6", children: render ?? (isEmpty2 ? placeholder : value) })
|
|
2938
2921
|
] });
|
|
2939
2922
|
};
|
|
2940
2923
|
|
|
2941
2924
|
// src/components/form-select/index.tsx
|
|
2942
|
-
import { jsx as
|
|
2925
|
+
import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2943
2926
|
var FormSelect = (props) => {
|
|
2944
2927
|
return /* @__PURE__ */ jsxs26(
|
|
2945
2928
|
Select,
|
|
@@ -2954,9 +2937,9 @@ var FormSelect = (props) => {
|
|
|
2954
2937
|
},
|
|
2955
2938
|
"aria-invalid": props.invalid,
|
|
2956
2939
|
children: [
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
return /* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ jsx42(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx42(SelectValue, {}) }),
|
|
2941
|
+
/* @__PURE__ */ jsx42(SelectContent, { children: /* @__PURE__ */ jsx42(SelectGroup, { children: props.optionList.map((option) => {
|
|
2942
|
+
return /* @__PURE__ */ jsx42(SelectItem, { value: option.value, children: option.label }, option.value);
|
|
2960
2943
|
}) }) })
|
|
2961
2944
|
]
|
|
2962
2945
|
}
|
|
@@ -2979,7 +2962,7 @@ import {
|
|
|
2979
2962
|
ChevronLeftIcon as ChevronLeftIcon2,
|
|
2980
2963
|
ChevronRightIcon as ChevronRightIcon3
|
|
2981
2964
|
} from "lucide-react";
|
|
2982
|
-
import { jsx as
|
|
2965
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2983
2966
|
function Calendar({
|
|
2984
2967
|
className,
|
|
2985
2968
|
classNames,
|
|
@@ -2991,7 +2974,7 @@ function Calendar({
|
|
|
2991
2974
|
...props
|
|
2992
2975
|
}) {
|
|
2993
2976
|
const defaultClassNames = getDefaultClassNames();
|
|
2994
|
-
return /* @__PURE__ */
|
|
2977
|
+
return /* @__PURE__ */ jsx43(
|
|
2995
2978
|
DayPicker,
|
|
2996
2979
|
{
|
|
2997
2980
|
showOutsideDays,
|
|
@@ -3091,7 +3074,7 @@ function Calendar({
|
|
|
3091
3074
|
},
|
|
3092
3075
|
components: {
|
|
3093
3076
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
3094
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ jsx43(
|
|
3095
3078
|
"div",
|
|
3096
3079
|
{
|
|
3097
3080
|
"data-slot": "calendar",
|
|
@@ -3103,10 +3086,10 @@ function Calendar({
|
|
|
3103
3086
|
},
|
|
3104
3087
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
3105
3088
|
if (orientation === "left") {
|
|
3106
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsx43(ChevronLeftIcon2, { className: cn("size-4", className2), ...props2 });
|
|
3107
3090
|
}
|
|
3108
3091
|
if (orientation === "right") {
|
|
3109
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ jsx43(
|
|
3110
3093
|
ChevronRightIcon3,
|
|
3111
3094
|
{
|
|
3112
3095
|
className: cn("size-4", className2),
|
|
@@ -3114,11 +3097,11 @@ function Calendar({
|
|
|
3114
3097
|
}
|
|
3115
3098
|
);
|
|
3116
3099
|
}
|
|
3117
|
-
return /* @__PURE__ */
|
|
3100
|
+
return /* @__PURE__ */ jsx43(ChevronDownIcon3, { className: cn("size-4", className2), ...props2 });
|
|
3118
3101
|
},
|
|
3119
3102
|
DayButton: CalendarDayButton,
|
|
3120
3103
|
WeekNumber: ({ children, ...props2 }) => {
|
|
3121
|
-
return /* @__PURE__ */
|
|
3104
|
+
return /* @__PURE__ */ jsx43("td", { ...props2, children: /* @__PURE__ */ jsx43("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
3122
3105
|
},
|
|
3123
3106
|
...components
|
|
3124
3107
|
},
|
|
@@ -3137,7 +3120,7 @@ function CalendarDayButton({
|
|
|
3137
3120
|
React3.useEffect(() => {
|
|
3138
3121
|
if (modifiers.focused) ref.current?.focus();
|
|
3139
3122
|
}, [modifiers.focused]);
|
|
3140
|
-
return /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ jsx43(
|
|
3141
3124
|
Button,
|
|
3142
3125
|
{
|
|
3143
3126
|
ref,
|
|
@@ -3160,16 +3143,16 @@ function CalendarDayButton({
|
|
|
3160
3143
|
|
|
3161
3144
|
// src/shadcn/components/popover.tsx
|
|
3162
3145
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
3163
|
-
import { jsx as
|
|
3146
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3164
3147
|
function Popover({
|
|
3165
3148
|
...props
|
|
3166
3149
|
}) {
|
|
3167
|
-
return /* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ jsx44(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
3168
3151
|
}
|
|
3169
3152
|
function PopoverTrigger({
|
|
3170
3153
|
...props
|
|
3171
3154
|
}) {
|
|
3172
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ jsx44(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
3173
3156
|
}
|
|
3174
3157
|
function PopoverContent({
|
|
3175
3158
|
className,
|
|
@@ -3177,7 +3160,7 @@ function PopoverContent({
|
|
|
3177
3160
|
sideOffset = 4,
|
|
3178
3161
|
...props
|
|
3179
3162
|
}) {
|
|
3180
|
-
return /* @__PURE__ */
|
|
3163
|
+
return /* @__PURE__ */ jsx44(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx44(
|
|
3181
3164
|
PopoverPrimitive.Content,
|
|
3182
3165
|
{
|
|
3183
3166
|
"data-slot": "popover-content",
|
|
@@ -3193,7 +3176,7 @@ function PopoverContent({
|
|
|
3193
3176
|
}
|
|
3194
3177
|
|
|
3195
3178
|
// src/components/form-time-picker/index.tsx
|
|
3196
|
-
import { jsx as
|
|
3179
|
+
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3197
3180
|
function pad2(n) {
|
|
3198
3181
|
return String(n).padStart(2, "0");
|
|
3199
3182
|
}
|
|
@@ -3214,8 +3197,8 @@ var FormTimePicker = (props) => {
|
|
|
3214
3197
|
const dateBtnText = props.value ? formatDateTime(props.value, "YYYY-MM-DD") : props.datePlaceholder;
|
|
3215
3198
|
const timeValue = formatTimeHHmmss(props.value);
|
|
3216
3199
|
return /* @__PURE__ */ jsxs27(FieldGroup2, { className: "flex-row gap-2.5", children: [
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
3200
|
+
/* @__PURE__ */ jsx45(Field, { children: /* @__PURE__ */ jsxs27(Popover, { open, onOpenChange: setOpen, children: [
|
|
3201
|
+
/* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
|
|
3219
3202
|
Button,
|
|
3220
3203
|
{
|
|
3221
3204
|
variant: "outline",
|
|
@@ -3224,17 +3207,17 @@ var FormTimePicker = (props) => {
|
|
|
3224
3207
|
disabled: props.disabled,
|
|
3225
3208
|
className: "w-32 justify-between font-normal",
|
|
3226
3209
|
children: [
|
|
3227
|
-
/* @__PURE__ */
|
|
3228
|
-
/* @__PURE__ */
|
|
3210
|
+
/* @__PURE__ */ jsx45("div", { className: "w-full text-left", children: dateBtnText }),
|
|
3211
|
+
/* @__PURE__ */ jsx45(ChevronDownIcon4, {})
|
|
3229
3212
|
]
|
|
3230
3213
|
}
|
|
3231
3214
|
) }),
|
|
3232
|
-
/* @__PURE__ */
|
|
3215
|
+
/* @__PURE__ */ jsx45(
|
|
3233
3216
|
PopoverContent,
|
|
3234
3217
|
{
|
|
3235
3218
|
className: "w-(--radix-popover-trigger-width) p-0",
|
|
3236
3219
|
align: "start",
|
|
3237
|
-
children: /* @__PURE__ */
|
|
3220
|
+
children: /* @__PURE__ */ jsx45(
|
|
3238
3221
|
Calendar,
|
|
3239
3222
|
{
|
|
3240
3223
|
mode: "single",
|
|
@@ -3258,7 +3241,7 @@ var FormTimePicker = (props) => {
|
|
|
3258
3241
|
}
|
|
3259
3242
|
)
|
|
3260
3243
|
] }) }),
|
|
3261
|
-
/* @__PURE__ */
|
|
3244
|
+
/* @__PURE__ */ jsx45(Field, { className: "w-32", children: /* @__PURE__ */ jsx45(
|
|
3262
3245
|
Input,
|
|
3263
3246
|
{
|
|
3264
3247
|
type: "time",
|
|
@@ -3282,6 +3265,24 @@ var FormTimePicker = (props) => {
|
|
|
3282
3265
|
// src/components/media-uploader/index.tsx
|
|
3283
3266
|
import { useCallback as useCallback2, useEffect as useEffect3, useRef as useRef2, useState as useState8 } from "react";
|
|
3284
3267
|
import { Eye as Eye2, Loader2, Plus, Trash2 } from "lucide-react";
|
|
3268
|
+
|
|
3269
|
+
// src/shadcn/components/card.tsx
|
|
3270
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3271
|
+
function Card({ className, ...props }) {
|
|
3272
|
+
return /* @__PURE__ */ jsx46(
|
|
3273
|
+
"div",
|
|
3274
|
+
{
|
|
3275
|
+
"data-slot": "card",
|
|
3276
|
+
className: cn(
|
|
3277
|
+
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
|
|
3278
|
+
className
|
|
3279
|
+
),
|
|
3280
|
+
...props
|
|
3281
|
+
}
|
|
3282
|
+
);
|
|
3283
|
+
}
|
|
3284
|
+
|
|
3285
|
+
// src/components/media-uploader/index.tsx
|
|
3285
3286
|
import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3286
3287
|
var MediaUploader = ({ value = [], ...props }) => {
|
|
3287
3288
|
const inputRef = useRef2(null);
|