@onesaz/ui 0.3.15 → 0.3.17
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.d.ts +38 -1
- package/dist/index.js +282 -78
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4859,6 +4859,29 @@ var PinnedRowsRenderer = ({
|
|
|
4859
4859
|
if (pinnedRows.length === 0) return null;
|
|
4860
4860
|
return /* @__PURE__ */ jsx35("tbody", { children: pinnedRows.map((row, rowIndex) => {
|
|
4861
4861
|
const customClassName = getRowClassName?.({ row: row.original, rowIndex });
|
|
4862
|
+
const visibleCells = row.getVisibleCells();
|
|
4863
|
+
const colSpanSkipSet = /* @__PURE__ */ new Set();
|
|
4864
|
+
const colSpanValues = /* @__PURE__ */ new Map();
|
|
4865
|
+
visibleCells.forEach((cell, cellIndex) => {
|
|
4866
|
+
if (colSpanSkipSet.has(cellIndex)) return;
|
|
4867
|
+
const meta = cell.column.columnDef.meta;
|
|
4868
|
+
const colSpanDef = meta?.colSpan;
|
|
4869
|
+
if (colSpanDef) {
|
|
4870
|
+
const value = cell.getValue();
|
|
4871
|
+
let span;
|
|
4872
|
+
if (typeof colSpanDef === "function") {
|
|
4873
|
+
span = colSpanDef({ row: row.original, value, field: cell.column.id, rowIndex });
|
|
4874
|
+
} else if (typeof colSpanDef === "number") {
|
|
4875
|
+
span = colSpanDef;
|
|
4876
|
+
}
|
|
4877
|
+
if (span && span > 1) {
|
|
4878
|
+
colSpanValues.set(cellIndex, span);
|
|
4879
|
+
for (let j = 1; j < span && cellIndex + j < visibleCells.length; j++) {
|
|
4880
|
+
colSpanSkipSet.add(cellIndex + j);
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
});
|
|
4862
4885
|
return /* @__PURE__ */ jsx35(
|
|
4863
4886
|
"tr",
|
|
4864
4887
|
{
|
|
@@ -4868,7 +4891,8 @@ var PinnedRowsRenderer = ({
|
|
|
4868
4891
|
position === "bottom" && "bottom-0 border-t-2 border-t-border",
|
|
4869
4892
|
customClassName
|
|
4870
4893
|
),
|
|
4871
|
-
children:
|
|
4894
|
+
children: visibleCells.map((cell, cellIndex) => {
|
|
4895
|
+
if (colSpanSkipSet.has(cellIndex)) return null;
|
|
4872
4896
|
const meta = cell.column.columnDef.meta;
|
|
4873
4897
|
const align = meta?.align || "left";
|
|
4874
4898
|
const wrapText = meta?.wrapText !== void 0 ? meta.wrapText : globalWrapText;
|
|
@@ -4878,9 +4902,19 @@ var PinnedRowsRenderer = ({
|
|
|
4878
4902
|
const colWidth = columnWidths.get(cell.column.id);
|
|
4879
4903
|
const width = colWidth?.width || cell.column.getSize();
|
|
4880
4904
|
const pinnedInfo = pinnedColumnOffsets?.get(cell.column.id);
|
|
4905
|
+
const htmlColSpan = colSpanValues.get(cellIndex);
|
|
4906
|
+
let totalWidth = width;
|
|
4907
|
+
if (htmlColSpan && htmlColSpan > 1) {
|
|
4908
|
+
for (let j = 1; j < htmlColSpan && cellIndex + j < visibleCells.length; j++) {
|
|
4909
|
+
const spannedCell = visibleCells[cellIndex + j];
|
|
4910
|
+
const spannedColWidth = columnWidths.get(spannedCell.column.id);
|
|
4911
|
+
totalWidth += spannedColWidth?.width || spannedCell.column.getSize();
|
|
4912
|
+
}
|
|
4913
|
+
}
|
|
4881
4914
|
return /* @__PURE__ */ jsx35(
|
|
4882
4915
|
"td",
|
|
4883
4916
|
{
|
|
4917
|
+
colSpan: htmlColSpan,
|
|
4884
4918
|
className: cn(
|
|
4885
4919
|
"px-4 overflow-hidden bg-muted border-b border-border",
|
|
4886
4920
|
showCellVerticalBorder && "border-r border-border",
|
|
@@ -4892,8 +4926,8 @@ var PinnedRowsRenderer = ({
|
|
|
4892
4926
|
height: wrapText || scrollable ? "auto" : rowHeight,
|
|
4893
4927
|
minHeight: rowHeight,
|
|
4894
4928
|
textAlign: align,
|
|
4895
|
-
width,
|
|
4896
|
-
maxWidth: colWidth?.maxWidth || width,
|
|
4929
|
+
width: htmlColSpan && htmlColSpan > 1 ? totalWidth : width,
|
|
4930
|
+
maxWidth: htmlColSpan && htmlColSpan > 1 ? void 0 : colWidth?.maxWidth || width,
|
|
4897
4931
|
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize,
|
|
4898
4932
|
...pinnedInfo ? {
|
|
4899
4933
|
position: "sticky",
|
|
@@ -5025,7 +5059,7 @@ function DataGrid({
|
|
|
5025
5059
|
height = 400,
|
|
5026
5060
|
minHeight,
|
|
5027
5061
|
maxHeight,
|
|
5028
|
-
density = "
|
|
5062
|
+
density = "compact",
|
|
5029
5063
|
showCellVerticalBorder = false,
|
|
5030
5064
|
showColumnVerticalBorder = false,
|
|
5031
5065
|
hideFooter = false,
|
|
@@ -5559,6 +5593,7 @@ var ListDivider = React36.forwardRef(
|
|
|
5559
5593
|
ListDivider.displayName = "ListDivider";
|
|
5560
5594
|
|
|
5561
5595
|
// src/components/charts.tsx
|
|
5596
|
+
import * as React37 from "react";
|
|
5562
5597
|
import {
|
|
5563
5598
|
BarChart as RechartsBarChart,
|
|
5564
5599
|
Bar,
|
|
@@ -5626,7 +5661,7 @@ var BarChart = ({
|
|
|
5626
5661
|
name: keyConfig.name || keyConfig.dataKey,
|
|
5627
5662
|
radius: barProps.radius,
|
|
5628
5663
|
maxBarSize: barProps.maxBarSize,
|
|
5629
|
-
minPointSize: barProps.minPointSize,
|
|
5664
|
+
...barProps.minPointSize !== void 0 && { minPointSize: barProps.minPointSize },
|
|
5630
5665
|
children: labelList && /* @__PURE__ */ jsx37(
|
|
5631
5666
|
LabelList,
|
|
5632
5667
|
{
|
|
@@ -5646,7 +5681,7 @@ var BarChart = ({
|
|
|
5646
5681
|
name: name || dataKey,
|
|
5647
5682
|
radius: barProps.radius,
|
|
5648
5683
|
maxBarSize: barProps.maxBarSize,
|
|
5649
|
-
minPointSize: barProps.minPointSize,
|
|
5684
|
+
...barProps.minPointSize !== void 0 && { minPointSize: barProps.minPointSize },
|
|
5650
5685
|
children: [
|
|
5651
5686
|
labelList && /* @__PURE__ */ jsx37(
|
|
5652
5687
|
LabelList,
|
|
@@ -6520,11 +6555,179 @@ var MultiProgressDonut = ({
|
|
|
6520
6555
|
] }, index);
|
|
6521
6556
|
}) });
|
|
6522
6557
|
};
|
|
6558
|
+
var simulatePacking = (data, width, height, minRadius, maxRadius) => {
|
|
6559
|
+
if (data.length === 0) return [];
|
|
6560
|
+
const values = data.map((d) => d.value);
|
|
6561
|
+
const minValue = Math.min(...values);
|
|
6562
|
+
const maxValue = Math.max(...values);
|
|
6563
|
+
const valueRange = maxValue - minValue || 1;
|
|
6564
|
+
const nodes = data.map((item) => {
|
|
6565
|
+
const normalizedValue = (item.value - minValue) / valueRange;
|
|
6566
|
+
const radius = minRadius + normalizedValue * (maxRadius - minRadius);
|
|
6567
|
+
return {
|
|
6568
|
+
x: width / 2 + (Math.random() - 0.5) * width * 0.3,
|
|
6569
|
+
y: height / 2 + (Math.random() - 0.5) * height * 0.3,
|
|
6570
|
+
radius,
|
|
6571
|
+
data: item,
|
|
6572
|
+
vx: 0,
|
|
6573
|
+
vy: 0
|
|
6574
|
+
};
|
|
6575
|
+
});
|
|
6576
|
+
const centerX = width / 2;
|
|
6577
|
+
const centerY = height / 2;
|
|
6578
|
+
const iterations = 100;
|
|
6579
|
+
for (let i = 0; i < iterations; i++) {
|
|
6580
|
+
for (const node of nodes) {
|
|
6581
|
+
node.vx += (centerX - node.x) * 0.01;
|
|
6582
|
+
node.vy += (centerY - node.y) * 0.01;
|
|
6583
|
+
for (const other of nodes) {
|
|
6584
|
+
if (node === other) continue;
|
|
6585
|
+
const dx = node.x - other.x;
|
|
6586
|
+
const dy = node.y - other.y;
|
|
6587
|
+
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
6588
|
+
const minDist = node.radius + other.radius + 2;
|
|
6589
|
+
if (distance < minDist && distance > 0) {
|
|
6590
|
+
const force = (minDist - distance) / distance * 0.5;
|
|
6591
|
+
node.vx += dx * force;
|
|
6592
|
+
node.vy += dy * force;
|
|
6593
|
+
}
|
|
6594
|
+
}
|
|
6595
|
+
}
|
|
6596
|
+
for (const node of nodes) {
|
|
6597
|
+
node.x += node.vx;
|
|
6598
|
+
node.y += node.vy;
|
|
6599
|
+
node.vx *= 0.8;
|
|
6600
|
+
node.vy *= 0.8;
|
|
6601
|
+
node.x = Math.max(node.radius, Math.min(width - node.radius, node.x));
|
|
6602
|
+
node.y = Math.max(node.radius, Math.min(height - node.radius, node.y));
|
|
6603
|
+
}
|
|
6604
|
+
}
|
|
6605
|
+
return nodes.map(({ x, y, radius, data: data2 }) => ({ x, y, radius, data: data2 }));
|
|
6606
|
+
};
|
|
6607
|
+
var PackedBubbleChart = ({
|
|
6608
|
+
data,
|
|
6609
|
+
title,
|
|
6610
|
+
height = 300,
|
|
6611
|
+
minSize = 30,
|
|
6612
|
+
maxSize = 70,
|
|
6613
|
+
defaultColor = "#3BBDED",
|
|
6614
|
+
colorByValue,
|
|
6615
|
+
showLabels = true,
|
|
6616
|
+
showValues = false,
|
|
6617
|
+
onBubbleClick,
|
|
6618
|
+
titleStyle,
|
|
6619
|
+
className
|
|
6620
|
+
}) => {
|
|
6621
|
+
const containerRef = React37.useRef(null);
|
|
6622
|
+
const [dimensions, setDimensions] = React37.useState({ width: 400, height: 300 });
|
|
6623
|
+
const [bubbles, setBubbles] = React37.useState([]);
|
|
6624
|
+
React37.useEffect(() => {
|
|
6625
|
+
const updateDimensions = () => {
|
|
6626
|
+
if (containerRef.current) {
|
|
6627
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
6628
|
+
setDimensions({
|
|
6629
|
+
width: rect.width || 400,
|
|
6630
|
+
height: typeof height === "number" ? height : 300
|
|
6631
|
+
});
|
|
6632
|
+
}
|
|
6633
|
+
};
|
|
6634
|
+
updateDimensions();
|
|
6635
|
+
window.addEventListener("resize", updateDimensions);
|
|
6636
|
+
return () => window.removeEventListener("resize", updateDimensions);
|
|
6637
|
+
}, [height]);
|
|
6638
|
+
React37.useEffect(() => {
|
|
6639
|
+
if (data.length === 0) {
|
|
6640
|
+
setBubbles([]);
|
|
6641
|
+
return;
|
|
6642
|
+
}
|
|
6643
|
+
const minRadius = Math.min(dimensions.width, dimensions.height) * minSize / 200;
|
|
6644
|
+
const maxRadius = Math.min(dimensions.width, dimensions.height) * maxSize / 200;
|
|
6645
|
+
const result = simulatePacking(data, dimensions.width, dimensions.height, minRadius, maxRadius);
|
|
6646
|
+
setBubbles(result);
|
|
6647
|
+
}, [data, dimensions, minSize, maxSize]);
|
|
6648
|
+
const getBubbleColor = (item) => {
|
|
6649
|
+
if (item.color) return item.color;
|
|
6650
|
+
if (colorByValue) return colorByValue(item.value);
|
|
6651
|
+
return defaultColor;
|
|
6652
|
+
};
|
|
6653
|
+
return /* @__PURE__ */ jsxs22(
|
|
6654
|
+
"div",
|
|
6655
|
+
{
|
|
6656
|
+
ref: containerRef,
|
|
6657
|
+
className: cn("relative w-full", className),
|
|
6658
|
+
style: { height: typeof height === "number" ? `${height}px` : height },
|
|
6659
|
+
children: [
|
|
6660
|
+
title && /* @__PURE__ */ jsx37(
|
|
6661
|
+
"div",
|
|
6662
|
+
{
|
|
6663
|
+
className: "text-center text-sm font-bold text-[#31456A] dark:text-slate-200",
|
|
6664
|
+
style: titleStyle,
|
|
6665
|
+
children: title
|
|
6666
|
+
}
|
|
6667
|
+
),
|
|
6668
|
+
/* @__PURE__ */ jsx37("svg", { width: "100%", height: "100%", className: "overflow-visible", children: bubbles.map((bubble, index) => /* @__PURE__ */ jsxs22(
|
|
6669
|
+
"g",
|
|
6670
|
+
{
|
|
6671
|
+
onClick: () => onBubbleClick?.(bubble.data),
|
|
6672
|
+
style: { cursor: onBubbleClick ? "pointer" : "default" },
|
|
6673
|
+
children: [
|
|
6674
|
+
/* @__PURE__ */ jsx37(
|
|
6675
|
+
"circle",
|
|
6676
|
+
{
|
|
6677
|
+
cx: bubble.x,
|
|
6678
|
+
cy: bubble.y,
|
|
6679
|
+
r: bubble.radius,
|
|
6680
|
+
fill: getBubbleColor(bubble.data),
|
|
6681
|
+
opacity: 0.85,
|
|
6682
|
+
className: "transition-all duration-200 hover:opacity-100"
|
|
6683
|
+
}
|
|
6684
|
+
),
|
|
6685
|
+
showLabels && /* @__PURE__ */ jsx37(
|
|
6686
|
+
"text",
|
|
6687
|
+
{
|
|
6688
|
+
x: bubble.x,
|
|
6689
|
+
y: showValues ? bubble.y - 6 : bubble.y,
|
|
6690
|
+
textAnchor: "middle",
|
|
6691
|
+
dominantBaseline: "middle",
|
|
6692
|
+
className: "fill-current text-black dark:text-white",
|
|
6693
|
+
style: {
|
|
6694
|
+
fontSize: Math.max(10, bubble.radius / 3),
|
|
6695
|
+
fontWeight: "normal",
|
|
6696
|
+
pointerEvents: "none"
|
|
6697
|
+
},
|
|
6698
|
+
children: bubble.data.name
|
|
6699
|
+
}
|
|
6700
|
+
),
|
|
6701
|
+
showValues && /* @__PURE__ */ jsx37(
|
|
6702
|
+
"text",
|
|
6703
|
+
{
|
|
6704
|
+
x: bubble.x,
|
|
6705
|
+
y: bubble.y + 8,
|
|
6706
|
+
textAnchor: "middle",
|
|
6707
|
+
dominantBaseline: "middle",
|
|
6708
|
+
className: "fill-current text-black dark:text-white",
|
|
6709
|
+
style: {
|
|
6710
|
+
fontSize: Math.max(8, bubble.radius / 4),
|
|
6711
|
+
fontWeight: "bold",
|
|
6712
|
+
pointerEvents: "none"
|
|
6713
|
+
},
|
|
6714
|
+
children: bubble.data.value
|
|
6715
|
+
}
|
|
6716
|
+
),
|
|
6717
|
+
/* @__PURE__ */ jsx37("title", { children: `${bubble.data.name}: ${bubble.data.value}` })
|
|
6718
|
+
]
|
|
6719
|
+
},
|
|
6720
|
+
`bubble-${index}-${bubble.data.name}`
|
|
6721
|
+
)) })
|
|
6722
|
+
]
|
|
6723
|
+
}
|
|
6724
|
+
);
|
|
6725
|
+
};
|
|
6523
6726
|
|
|
6524
6727
|
// src/components/breadcrumbs.tsx
|
|
6525
|
-
import * as
|
|
6728
|
+
import * as React38 from "react";
|
|
6526
6729
|
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6527
|
-
var Breadcrumbs =
|
|
6730
|
+
var Breadcrumbs = React38.forwardRef(
|
|
6528
6731
|
({
|
|
6529
6732
|
separator,
|
|
6530
6733
|
maxItems,
|
|
@@ -6534,7 +6737,7 @@ var Breadcrumbs = React37.forwardRef(
|
|
|
6534
6737
|
children,
|
|
6535
6738
|
...props
|
|
6536
6739
|
}, ref) => {
|
|
6537
|
-
const childArray =
|
|
6740
|
+
const childArray = React38.Children.toArray(children);
|
|
6538
6741
|
const totalItems = childArray.length;
|
|
6539
6742
|
const separatorElement = separator ?? /* @__PURE__ */ jsx38(
|
|
6540
6743
|
"svg",
|
|
@@ -6572,7 +6775,7 @@ var Breadcrumbs = React37.forwardRef(
|
|
|
6572
6775
|
}
|
|
6573
6776
|
);
|
|
6574
6777
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
6575
|
-
var BreadcrumbItem =
|
|
6778
|
+
var BreadcrumbItem = React38.forwardRef(
|
|
6576
6779
|
({ current = false, href, onClick, className, children, ...props }, ref) => {
|
|
6577
6780
|
const baseClasses = cn(
|
|
6578
6781
|
"text-sm transition-colors",
|
|
@@ -6624,7 +6827,7 @@ var BreadcrumbItem = React37.forwardRef(
|
|
|
6624
6827
|
}
|
|
6625
6828
|
);
|
|
6626
6829
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
6627
|
-
var BreadcrumbLink =
|
|
6830
|
+
var BreadcrumbLink = React38.forwardRef(
|
|
6628
6831
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6629
6832
|
"a",
|
|
6630
6833
|
{
|
|
@@ -6638,7 +6841,7 @@ var BreadcrumbLink = React37.forwardRef(
|
|
|
6638
6841
|
)
|
|
6639
6842
|
);
|
|
6640
6843
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
6641
|
-
var BreadcrumbSeparator =
|
|
6844
|
+
var BreadcrumbSeparator = React38.forwardRef(
|
|
6642
6845
|
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6643
6846
|
"span",
|
|
6644
6847
|
{
|
|
@@ -6666,7 +6869,7 @@ var BreadcrumbSeparator = React37.forwardRef(
|
|
|
6666
6869
|
)
|
|
6667
6870
|
);
|
|
6668
6871
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
6669
|
-
var BreadcrumbEllipsis =
|
|
6872
|
+
var BreadcrumbEllipsis = React38.forwardRef(
|
|
6670
6873
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6671
6874
|
"span",
|
|
6672
6875
|
{
|
|
@@ -6698,7 +6901,7 @@ var BreadcrumbEllipsis = React37.forwardRef(
|
|
|
6698
6901
|
)
|
|
6699
6902
|
);
|
|
6700
6903
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
6701
|
-
var BreadcrumbPage =
|
|
6904
|
+
var BreadcrumbPage = React38.forwardRef(
|
|
6702
6905
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6703
6906
|
"span",
|
|
6704
6907
|
{
|
|
@@ -6712,7 +6915,7 @@ var BreadcrumbPage = React37.forwardRef(
|
|
|
6712
6915
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
6713
6916
|
|
|
6714
6917
|
// src/components/dropdown-menu.tsx
|
|
6715
|
-
import * as
|
|
6918
|
+
import * as React39 from "react";
|
|
6716
6919
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6717
6920
|
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6718
6921
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
@@ -6721,7 +6924,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
6721
6924
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
6722
6925
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
6723
6926
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
6724
|
-
var DropdownMenuSubTrigger =
|
|
6927
|
+
var DropdownMenuSubTrigger = React39.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs24(
|
|
6725
6928
|
DropdownMenuPrimitive.SubTrigger,
|
|
6726
6929
|
{
|
|
6727
6930
|
ref,
|
|
@@ -6753,7 +6956,7 @@ var DropdownMenuSubTrigger = React38.forwardRef(({ className, inset, children, .
|
|
|
6753
6956
|
}
|
|
6754
6957
|
));
|
|
6755
6958
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
6756
|
-
var DropdownMenuSubContent =
|
|
6959
|
+
var DropdownMenuSubContent = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6757
6960
|
DropdownMenuPrimitive.SubContent,
|
|
6758
6961
|
{
|
|
6759
6962
|
ref,
|
|
@@ -6770,7 +6973,7 @@ var DropdownMenuSubContent = React38.forwardRef(({ className, ...props }, ref) =
|
|
|
6770
6973
|
}
|
|
6771
6974
|
));
|
|
6772
6975
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
6773
|
-
var DropdownMenuContent =
|
|
6976
|
+
var DropdownMenuContent = React39.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx39(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx39(
|
|
6774
6977
|
DropdownMenuPrimitive.Content,
|
|
6775
6978
|
{
|
|
6776
6979
|
ref,
|
|
@@ -6788,7 +6991,7 @@ var DropdownMenuContent = React38.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
6788
6991
|
}
|
|
6789
6992
|
) }));
|
|
6790
6993
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
6791
|
-
var DropdownMenuItem =
|
|
6994
|
+
var DropdownMenuItem = React39.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6792
6995
|
DropdownMenuPrimitive.Item,
|
|
6793
6996
|
{
|
|
6794
6997
|
ref,
|
|
@@ -6804,7 +7007,7 @@ var DropdownMenuItem = React38.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6804
7007
|
}
|
|
6805
7008
|
));
|
|
6806
7009
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
6807
|
-
var DropdownMenuCheckboxItem =
|
|
7010
|
+
var DropdownMenuCheckboxItem = React39.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs24(
|
|
6808
7011
|
DropdownMenuPrimitive.CheckboxItem,
|
|
6809
7012
|
{
|
|
6810
7013
|
ref,
|
|
@@ -6836,7 +7039,7 @@ var DropdownMenuCheckboxItem = React38.forwardRef(({ className, children, checke
|
|
|
6836
7039
|
}
|
|
6837
7040
|
));
|
|
6838
7041
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
6839
|
-
var DropdownMenuRadioItem =
|
|
7042
|
+
var DropdownMenuRadioItem = React39.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs24(
|
|
6840
7043
|
DropdownMenuPrimitive.RadioItem,
|
|
6841
7044
|
{
|
|
6842
7045
|
ref,
|
|
@@ -6862,7 +7065,7 @@ var DropdownMenuRadioItem = React38.forwardRef(({ className, children, ...props
|
|
|
6862
7065
|
}
|
|
6863
7066
|
));
|
|
6864
7067
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
6865
|
-
var DropdownMenuLabel =
|
|
7068
|
+
var DropdownMenuLabel = React39.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6866
7069
|
DropdownMenuPrimitive.Label,
|
|
6867
7070
|
{
|
|
6868
7071
|
ref,
|
|
@@ -6875,7 +7078,7 @@ var DropdownMenuLabel = React38.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6875
7078
|
}
|
|
6876
7079
|
));
|
|
6877
7080
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
6878
|
-
var DropdownMenuSeparator =
|
|
7081
|
+
var DropdownMenuSeparator = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6879
7082
|
DropdownMenuPrimitive.Separator,
|
|
6880
7083
|
{
|
|
6881
7084
|
ref,
|
|
@@ -6899,14 +7102,14 @@ var DropdownMenuShortcut = ({
|
|
|
6899
7102
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
6900
7103
|
|
|
6901
7104
|
// src/components/drawer.tsx
|
|
6902
|
-
import * as
|
|
7105
|
+
import * as React40 from "react";
|
|
6903
7106
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
6904
7107
|
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6905
7108
|
var Drawer = DialogPrimitive2.Root;
|
|
6906
7109
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
6907
7110
|
var DrawerClose = DialogPrimitive2.Close;
|
|
6908
7111
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
6909
|
-
var DrawerOverlay =
|
|
7112
|
+
var DrawerOverlay = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
6910
7113
|
DialogPrimitive2.Overlay,
|
|
6911
7114
|
{
|
|
6912
7115
|
ref,
|
|
@@ -6926,7 +7129,7 @@ var slideVariants = {
|
|
|
6926
7129
|
top: "inset-x-0 top-0 w-full data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
6927
7130
|
bottom: "inset-x-0 bottom-0 w-full data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom"
|
|
6928
7131
|
};
|
|
6929
|
-
var DrawerContent =
|
|
7132
|
+
var DrawerContent = React40.forwardRef(({ side = "right", showClose = true, className, children, ...props }, ref) => /* @__PURE__ */ jsxs25(DrawerPortal, { children: [
|
|
6930
7133
|
/* @__PURE__ */ jsx40(DrawerOverlay, {}),
|
|
6931
7134
|
/* @__PURE__ */ jsxs25(
|
|
6932
7135
|
DialogPrimitive2.Content,
|
|
@@ -6977,7 +7180,7 @@ var DrawerContent = React39.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6977
7180
|
)
|
|
6978
7181
|
] }));
|
|
6979
7182
|
DrawerContent.displayName = "DrawerContent";
|
|
6980
|
-
var DrawerHeader =
|
|
7183
|
+
var DrawerHeader = React40.forwardRef(
|
|
6981
7184
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
6982
7185
|
"div",
|
|
6983
7186
|
{
|
|
@@ -6988,7 +7191,7 @@ var DrawerHeader = React39.forwardRef(
|
|
|
6988
7191
|
)
|
|
6989
7192
|
);
|
|
6990
7193
|
DrawerHeader.displayName = "DrawerHeader";
|
|
6991
|
-
var DrawerTitle =
|
|
7194
|
+
var DrawerTitle = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
6992
7195
|
DialogPrimitive2.Title,
|
|
6993
7196
|
{
|
|
6994
7197
|
ref,
|
|
@@ -6997,7 +7200,7 @@ var DrawerTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6997
7200
|
}
|
|
6998
7201
|
));
|
|
6999
7202
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
7000
|
-
var DrawerDescription =
|
|
7203
|
+
var DrawerDescription = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
7001
7204
|
DialogPrimitive2.Description,
|
|
7002
7205
|
{
|
|
7003
7206
|
ref,
|
|
@@ -7006,7 +7209,7 @@ var DrawerDescription = React39.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7006
7209
|
}
|
|
7007
7210
|
));
|
|
7008
7211
|
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
7009
|
-
var DrawerBody =
|
|
7212
|
+
var DrawerBody = React40.forwardRef(
|
|
7010
7213
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
7011
7214
|
"div",
|
|
7012
7215
|
{
|
|
@@ -7017,7 +7220,7 @@ var DrawerBody = React39.forwardRef(
|
|
|
7017
7220
|
)
|
|
7018
7221
|
);
|
|
7019
7222
|
DrawerBody.displayName = "DrawerBody";
|
|
7020
|
-
var DrawerFooter =
|
|
7223
|
+
var DrawerFooter = React40.forwardRef(
|
|
7021
7224
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
7022
7225
|
"div",
|
|
7023
7226
|
{
|
|
@@ -7044,14 +7247,14 @@ var SheetBody = DrawerBody;
|
|
|
7044
7247
|
var SheetFooter = DrawerFooter;
|
|
7045
7248
|
|
|
7046
7249
|
// src/components/topbar.tsx
|
|
7047
|
-
import * as
|
|
7250
|
+
import * as React41 from "react";
|
|
7048
7251
|
import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7049
7252
|
var sizeClasses5 = {
|
|
7050
7253
|
sm: "h-12",
|
|
7051
7254
|
md: "h-14",
|
|
7052
7255
|
lg: "h-16"
|
|
7053
7256
|
};
|
|
7054
|
-
var TopBar =
|
|
7257
|
+
var TopBar = React41.forwardRef(
|
|
7055
7258
|
({ className, bordered = true, sticky = false, size = "md", children, ...props }, ref) => {
|
|
7056
7259
|
return /* @__PURE__ */ jsx41(
|
|
7057
7260
|
"header",
|
|
@@ -7071,7 +7274,7 @@ var TopBar = React40.forwardRef(
|
|
|
7071
7274
|
}
|
|
7072
7275
|
);
|
|
7073
7276
|
TopBar.displayName = "TopBar";
|
|
7074
|
-
var TopBarBrand =
|
|
7277
|
+
var TopBarBrand = React41.forwardRef(
|
|
7075
7278
|
({ className, logo, name, href, children, ...props }, ref) => {
|
|
7076
7279
|
const content = /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
7077
7280
|
logo && /* @__PURE__ */ jsx41("span", { className: "shrink-0", children: logo }),
|
|
@@ -7085,7 +7288,7 @@ var TopBarBrand = React40.forwardRef(
|
|
|
7085
7288
|
}
|
|
7086
7289
|
);
|
|
7087
7290
|
TopBarBrand.displayName = "TopBarBrand";
|
|
7088
|
-
var TopBarNav =
|
|
7291
|
+
var TopBarNav = React41.forwardRef(
|
|
7089
7292
|
({ className, children, ...props }, ref) => {
|
|
7090
7293
|
return /* @__PURE__ */ jsx41(
|
|
7091
7294
|
"nav",
|
|
@@ -7099,7 +7302,7 @@ var TopBarNav = React40.forwardRef(
|
|
|
7099
7302
|
}
|
|
7100
7303
|
);
|
|
7101
7304
|
TopBarNav.displayName = "TopBarNav";
|
|
7102
|
-
var TopBarNavItem =
|
|
7305
|
+
var TopBarNavItem = React41.forwardRef(
|
|
7103
7306
|
({ className, active, children, ...props }, ref) => {
|
|
7104
7307
|
return /* @__PURE__ */ jsx41(
|
|
7105
7308
|
"a",
|
|
@@ -7117,7 +7320,7 @@ var TopBarNavItem = React40.forwardRef(
|
|
|
7117
7320
|
}
|
|
7118
7321
|
);
|
|
7119
7322
|
TopBarNavItem.displayName = "TopBarNavItem";
|
|
7120
|
-
var TopBarSection =
|
|
7323
|
+
var TopBarSection = React41.forwardRef(
|
|
7121
7324
|
({ className, align = "left", children, ...props }, ref) => {
|
|
7122
7325
|
return /* @__PURE__ */ jsx41(
|
|
7123
7326
|
"div",
|
|
@@ -7139,7 +7342,7 @@ var TopBarSection = React40.forwardRef(
|
|
|
7139
7342
|
}
|
|
7140
7343
|
);
|
|
7141
7344
|
TopBarSection.displayName = "TopBarSection";
|
|
7142
|
-
var TopBarDivider =
|
|
7345
|
+
var TopBarDivider = React41.forwardRef(
|
|
7143
7346
|
({ className, ...props }, ref) => {
|
|
7144
7347
|
return /* @__PURE__ */ jsx41(
|
|
7145
7348
|
"div",
|
|
@@ -7154,17 +7357,17 @@ var TopBarDivider = React40.forwardRef(
|
|
|
7154
7357
|
TopBarDivider.displayName = "TopBarDivider";
|
|
7155
7358
|
|
|
7156
7359
|
// src/components/sidebar.tsx
|
|
7157
|
-
import * as
|
|
7360
|
+
import * as React42 from "react";
|
|
7158
7361
|
import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7159
|
-
var SidebarContext =
|
|
7362
|
+
var SidebarContext = React42.createContext(void 0);
|
|
7160
7363
|
var useSidebar = () => {
|
|
7161
|
-
const context =
|
|
7364
|
+
const context = React42.useContext(SidebarContext);
|
|
7162
7365
|
if (!context) {
|
|
7163
7366
|
throw new Error("useSidebar must be used within a Sidebar");
|
|
7164
7367
|
}
|
|
7165
7368
|
return context;
|
|
7166
7369
|
};
|
|
7167
|
-
var Sidebar =
|
|
7370
|
+
var Sidebar = React42.forwardRef(
|
|
7168
7371
|
({
|
|
7169
7372
|
className,
|
|
7170
7373
|
collapsed: controlledCollapsed,
|
|
@@ -7176,10 +7379,10 @@ var Sidebar = React41.forwardRef(
|
|
|
7176
7379
|
children,
|
|
7177
7380
|
...props
|
|
7178
7381
|
}, ref) => {
|
|
7179
|
-
const [uncontrolledCollapsed, setUncontrolledCollapsed] =
|
|
7382
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = React42.useState(defaultCollapsed);
|
|
7180
7383
|
const isControlled = controlledCollapsed !== void 0;
|
|
7181
7384
|
const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
|
|
7182
|
-
const setCollapsed =
|
|
7385
|
+
const setCollapsed = React42.useCallback(
|
|
7183
7386
|
(value) => {
|
|
7184
7387
|
if (!isControlled) {
|
|
7185
7388
|
setUncontrolledCollapsed(value);
|
|
@@ -7208,7 +7411,7 @@ var Sidebar = React41.forwardRef(
|
|
|
7208
7411
|
}
|
|
7209
7412
|
);
|
|
7210
7413
|
Sidebar.displayName = "Sidebar";
|
|
7211
|
-
var SidebarHeader =
|
|
7414
|
+
var SidebarHeader = React42.forwardRef(
|
|
7212
7415
|
({ className, children, ...props }, ref) => {
|
|
7213
7416
|
return /* @__PURE__ */ jsx42(
|
|
7214
7417
|
"div",
|
|
@@ -7222,7 +7425,7 @@ var SidebarHeader = React41.forwardRef(
|
|
|
7222
7425
|
}
|
|
7223
7426
|
);
|
|
7224
7427
|
SidebarHeader.displayName = "SidebarHeader";
|
|
7225
|
-
var SidebarContent =
|
|
7428
|
+
var SidebarContent = React42.forwardRef(
|
|
7226
7429
|
({ className, children, ...props }, ref) => {
|
|
7227
7430
|
return /* @__PURE__ */ jsx42(
|
|
7228
7431
|
"div",
|
|
@@ -7236,7 +7439,7 @@ var SidebarContent = React41.forwardRef(
|
|
|
7236
7439
|
}
|
|
7237
7440
|
);
|
|
7238
7441
|
SidebarContent.displayName = "SidebarContent";
|
|
7239
|
-
var SidebarFooter =
|
|
7442
|
+
var SidebarFooter = React42.forwardRef(
|
|
7240
7443
|
({ className, children, ...props }, ref) => {
|
|
7241
7444
|
return /* @__PURE__ */ jsx42(
|
|
7242
7445
|
"div",
|
|
@@ -7250,7 +7453,7 @@ var SidebarFooter = React41.forwardRef(
|
|
|
7250
7453
|
}
|
|
7251
7454
|
);
|
|
7252
7455
|
SidebarFooter.displayName = "SidebarFooter";
|
|
7253
|
-
var SidebarGroup =
|
|
7456
|
+
var SidebarGroup = React42.forwardRef(
|
|
7254
7457
|
({ className, label, children, ...props }, ref) => {
|
|
7255
7458
|
const { collapsed } = useSidebar();
|
|
7256
7459
|
return /* @__PURE__ */ jsxs27("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
@@ -7261,7 +7464,7 @@ var SidebarGroup = React41.forwardRef(
|
|
|
7261
7464
|
}
|
|
7262
7465
|
);
|
|
7263
7466
|
SidebarGroup.displayName = "SidebarGroup";
|
|
7264
|
-
var SidebarItem =
|
|
7467
|
+
var SidebarItem = React42.forwardRef(
|
|
7265
7468
|
({ className, icon, active, disabled, badge, onClick, href, children, ...props }, ref) => {
|
|
7266
7469
|
const { collapsed } = useSidebar();
|
|
7267
7470
|
const content = /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
@@ -7296,11 +7499,11 @@ var SidebarItem = React41.forwardRef(
|
|
|
7296
7499
|
}
|
|
7297
7500
|
);
|
|
7298
7501
|
SidebarItem.displayName = "SidebarItem";
|
|
7299
|
-
var SidebarSubMenu =
|
|
7502
|
+
var SidebarSubMenu = React42.forwardRef(
|
|
7300
7503
|
({ className, icon, label, defaultOpen = false, children, ...props }, ref) => {
|
|
7301
|
-
const [open, setOpen] =
|
|
7504
|
+
const [open, setOpen] = React42.useState(defaultOpen);
|
|
7302
7505
|
const { collapsed } = useSidebar();
|
|
7303
|
-
|
|
7506
|
+
React42.useEffect(() => {
|
|
7304
7507
|
if (collapsed) {
|
|
7305
7508
|
setOpen(false);
|
|
7306
7509
|
}
|
|
@@ -7344,7 +7547,7 @@ var SidebarSubMenu = React41.forwardRef(
|
|
|
7344
7547
|
}
|
|
7345
7548
|
);
|
|
7346
7549
|
SidebarSubMenu.displayName = "SidebarSubMenu";
|
|
7347
|
-
var SidebarToggle =
|
|
7550
|
+
var SidebarToggle = React42.forwardRef(
|
|
7348
7551
|
({ className, children, ...props }, ref) => {
|
|
7349
7552
|
const { collapsed, setCollapsed } = useSidebar();
|
|
7350
7553
|
return /* @__PURE__ */ jsx42(
|
|
@@ -7386,17 +7589,17 @@ var SidebarToggle = React41.forwardRef(
|
|
|
7386
7589
|
SidebarToggle.displayName = "SidebarToggle";
|
|
7387
7590
|
|
|
7388
7591
|
// src/components/sidebar-rail.tsx
|
|
7389
|
-
import * as
|
|
7592
|
+
import * as React43 from "react";
|
|
7390
7593
|
import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7391
|
-
var SidebarRailContext =
|
|
7594
|
+
var SidebarRailContext = React43.createContext(void 0);
|
|
7392
7595
|
var useSidebarRail = () => {
|
|
7393
|
-
const context =
|
|
7596
|
+
const context = React43.useContext(SidebarRailContext);
|
|
7394
7597
|
if (!context) {
|
|
7395
7598
|
throw new Error("useSidebarRail must be used within a SidebarRail");
|
|
7396
7599
|
}
|
|
7397
7600
|
return context;
|
|
7398
7601
|
};
|
|
7399
|
-
var SidebarRail =
|
|
7602
|
+
var SidebarRail = React43.forwardRef(
|
|
7400
7603
|
({
|
|
7401
7604
|
className,
|
|
7402
7605
|
defaultActiveRail = null,
|
|
@@ -7414,14 +7617,14 @@ var SidebarRail = React42.forwardRef(
|
|
|
7414
7617
|
children,
|
|
7415
7618
|
...props
|
|
7416
7619
|
}, ref) => {
|
|
7417
|
-
const [uncontrolledActiveRail, setUncontrolledActiveRail] =
|
|
7418
|
-
const [expanded, setExpanded] =
|
|
7419
|
-
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] =
|
|
7620
|
+
const [uncontrolledActiveRail, setUncontrolledActiveRail] = React43.useState(defaultActiveRail);
|
|
7621
|
+
const [expanded, setExpanded] = React43.useState(!!defaultActiveRail);
|
|
7622
|
+
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] = React43.useState(defaultRailExpanded);
|
|
7420
7623
|
const isControlled = controlledActiveRail !== void 0;
|
|
7421
7624
|
const activeRail = isControlled ? controlledActiveRail : uncontrolledActiveRail;
|
|
7422
7625
|
const isRailControlled = controlledRailExpanded !== void 0;
|
|
7423
7626
|
const railExpanded = isRailControlled ? controlledRailExpanded : uncontrolledRailExpanded;
|
|
7424
|
-
const setActiveRail =
|
|
7627
|
+
const setActiveRail = React43.useCallback(
|
|
7425
7628
|
(rail) => {
|
|
7426
7629
|
if (!isControlled) {
|
|
7427
7630
|
setUncontrolledActiveRail(rail);
|
|
@@ -7431,7 +7634,7 @@ var SidebarRail = React42.forwardRef(
|
|
|
7431
7634
|
},
|
|
7432
7635
|
[isControlled, onActiveRailChange]
|
|
7433
7636
|
);
|
|
7434
|
-
const setRailExpanded =
|
|
7637
|
+
const setRailExpanded = React43.useCallback(
|
|
7435
7638
|
(value) => {
|
|
7436
7639
|
if (!isRailControlled) {
|
|
7437
7640
|
setUncontrolledRailExpanded(value);
|
|
@@ -7477,7 +7680,7 @@ var SidebarRail = React42.forwardRef(
|
|
|
7477
7680
|
}
|
|
7478
7681
|
);
|
|
7479
7682
|
SidebarRail.displayName = "SidebarRail";
|
|
7480
|
-
var IconRail =
|
|
7683
|
+
var IconRail = React43.forwardRef(
|
|
7481
7684
|
({ className, children, ...props }, ref) => {
|
|
7482
7685
|
const { railExpanded, overlayRail, expandableRail } = useSidebarRail();
|
|
7483
7686
|
const isExpanded = expandableRail && railExpanded;
|
|
@@ -7507,7 +7710,7 @@ var IconRail = React42.forwardRef(
|
|
|
7507
7710
|
}
|
|
7508
7711
|
);
|
|
7509
7712
|
IconRail.displayName = "IconRail";
|
|
7510
|
-
var IconRailHeader =
|
|
7713
|
+
var IconRailHeader = React43.forwardRef(
|
|
7511
7714
|
({ className, children, ...props }, ref) => {
|
|
7512
7715
|
return /* @__PURE__ */ jsx43(
|
|
7513
7716
|
"div",
|
|
@@ -7524,7 +7727,7 @@ var IconRailHeader = React42.forwardRef(
|
|
|
7524
7727
|
}
|
|
7525
7728
|
);
|
|
7526
7729
|
IconRailHeader.displayName = "IconRailHeader";
|
|
7527
|
-
var IconRailContent =
|
|
7730
|
+
var IconRailContent = React43.forwardRef(
|
|
7528
7731
|
({ className, children, ...props }, ref) => {
|
|
7529
7732
|
return /* @__PURE__ */ jsx43(
|
|
7530
7733
|
"div",
|
|
@@ -7538,7 +7741,7 @@ var IconRailContent = React42.forwardRef(
|
|
|
7538
7741
|
}
|
|
7539
7742
|
);
|
|
7540
7743
|
IconRailContent.displayName = "IconRailContent";
|
|
7541
|
-
var IconRailFooter =
|
|
7744
|
+
var IconRailFooter = React43.forwardRef(
|
|
7542
7745
|
({ className, children, ...props }, ref) => {
|
|
7543
7746
|
return /* @__PURE__ */ jsx43(
|
|
7544
7747
|
"div",
|
|
@@ -7555,7 +7758,7 @@ var IconRailFooter = React42.forwardRef(
|
|
|
7555
7758
|
}
|
|
7556
7759
|
);
|
|
7557
7760
|
IconRailFooter.displayName = "IconRailFooter";
|
|
7558
|
-
var IconRailItem =
|
|
7761
|
+
var IconRailItem = React43.forwardRef(
|
|
7559
7762
|
({ className, railId, icon, label, asButton = false, toggleRail = false, onClick, ...props }, ref) => {
|
|
7560
7763
|
const {
|
|
7561
7764
|
activeRail,
|
|
@@ -7607,7 +7810,7 @@ var IconRailItem = React42.forwardRef(
|
|
|
7607
7810
|
}
|
|
7608
7811
|
);
|
|
7609
7812
|
IconRailItem.displayName = "IconRailItem";
|
|
7610
|
-
var RailPanel =
|
|
7813
|
+
var RailPanel = React43.forwardRef(
|
|
7611
7814
|
({ className, railId, title, children, ...props }, ref) => {
|
|
7612
7815
|
const { activeRail, setActiveRail, hoverExpand } = useSidebarRail();
|
|
7613
7816
|
const isVisible = activeRail === railId;
|
|
@@ -7666,7 +7869,7 @@ var RailPanel = React42.forwardRef(
|
|
|
7666
7869
|
}
|
|
7667
7870
|
);
|
|
7668
7871
|
RailPanel.displayName = "RailPanel";
|
|
7669
|
-
var RailPanelGroup =
|
|
7872
|
+
var RailPanelGroup = React43.forwardRef(
|
|
7670
7873
|
({ className, label, children, ...props }, ref) => {
|
|
7671
7874
|
return /* @__PURE__ */ jsxs28("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
7672
7875
|
label && /* @__PURE__ */ jsx43("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
@@ -7675,7 +7878,7 @@ var RailPanelGroup = React42.forwardRef(
|
|
|
7675
7878
|
}
|
|
7676
7879
|
);
|
|
7677
7880
|
RailPanelGroup.displayName = "RailPanelGroup";
|
|
7678
|
-
var RailPanelItem =
|
|
7881
|
+
var RailPanelItem = React43.forwardRef(
|
|
7679
7882
|
({ className, icon, active, disabled, badge, href, children, onClick, ...props }, ref) => {
|
|
7680
7883
|
const content = /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
7681
7884
|
icon && /* @__PURE__ */ jsx43("span", { className: "shrink-0", children: icon }),
|
|
@@ -7708,7 +7911,7 @@ var RailPanelItem = React42.forwardRef(
|
|
|
7708
7911
|
RailPanelItem.displayName = "RailPanelItem";
|
|
7709
7912
|
|
|
7710
7913
|
// src/playground.tsx
|
|
7711
|
-
import * as
|
|
7914
|
+
import * as React44 from "react";
|
|
7712
7915
|
import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7713
7916
|
var Section = ({ title, children }) => /* @__PURE__ */ jsxs29("div", { className: "mb-8", children: [
|
|
7714
7917
|
/* @__PURE__ */ jsx44("h2", { className: "text-xl font-semibold mb-4 text-foreground", children: title }),
|
|
@@ -7729,13 +7932,13 @@ var ThemeToggle = () => {
|
|
|
7729
7932
|
] });
|
|
7730
7933
|
};
|
|
7731
7934
|
var PlaygroundContent = () => {
|
|
7732
|
-
const [dialogOpen, setDialogOpen] =
|
|
7733
|
-
const [checkboxChecked, setCheckboxChecked] =
|
|
7734
|
-
const [switchChecked, setSwitchChecked] =
|
|
7735
|
-
const [inputValue, setInputValue] =
|
|
7736
|
-
const [textareaValue, setTextareaValue] =
|
|
7737
|
-
const [selectValue, setSelectValue] =
|
|
7738
|
-
const [comboboxValue, setComboboxValue] =
|
|
7935
|
+
const [dialogOpen, setDialogOpen] = React44.useState(false);
|
|
7936
|
+
const [checkboxChecked, setCheckboxChecked] = React44.useState(false);
|
|
7937
|
+
const [switchChecked, setSwitchChecked] = React44.useState(false);
|
|
7938
|
+
const [inputValue, setInputValue] = React44.useState("");
|
|
7939
|
+
const [textareaValue, setTextareaValue] = React44.useState("");
|
|
7940
|
+
const [selectValue, setSelectValue] = React44.useState("");
|
|
7941
|
+
const [comboboxValue, setComboboxValue] = React44.useState(null);
|
|
7739
7942
|
const comboboxOptions = [
|
|
7740
7943
|
{ value: "react", label: "React" },
|
|
7741
7944
|
{ value: "vue", label: "Vue" },
|
|
@@ -8155,6 +8358,7 @@ export {
|
|
|
8155
8358
|
MultiProgressDonut,
|
|
8156
8359
|
NativeSelect,
|
|
8157
8360
|
NativeSelectOption,
|
|
8361
|
+
PackedBubbleChart,
|
|
8158
8362
|
PaginationNamespace as Pagination,
|
|
8159
8363
|
PaginationContent,
|
|
8160
8364
|
PaginationEllipsis,
|