@x-plat/design-system 0.5.37 → 0.5.39
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/components/Chart/index.cjs +35 -46
- package/dist/components/Chart/index.css +26 -6
- package/dist/components/Chart/index.d.cts +1 -0
- package/dist/components/Chart/index.d.ts +1 -0
- package/dist/components/Chart/index.js +35 -46
- package/dist/components/Tooltip/index.cjs +98 -8
- package/dist/components/Tooltip/index.css +38 -38
- package/dist/components/Tooltip/index.d.cts +6 -8
- package/dist/components/Tooltip/index.d.ts +6 -8
- package/dist/components/Tooltip/index.js +98 -8
- package/dist/components/index.cjs +118 -53
- package/dist/components/index.css +61 -41
- package/dist/components/index.js +119 -54
- package/dist/index.cjs +118 -53
- package/dist/index.css +61 -41
- package/dist/index.js +121 -56
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6380,28 +6380,11 @@ var useChartTooltip = (enabled) => {
|
|
|
6380
6380
|
if (!rect) return;
|
|
6381
6381
|
setTooltip({ visible: true, x: e.clientX - rect.left, y: e.clientY - rect.top, content });
|
|
6382
6382
|
}, [enabled]);
|
|
6383
|
-
const showAt = React6.useCallback((svgX, svgY, content, svgEl) => {
|
|
6384
|
-
if (!enabled) return;
|
|
6385
|
-
const container = containerRef.current;
|
|
6386
|
-
if (!container) return;
|
|
6387
|
-
let x = svgX;
|
|
6388
|
-
let y = svgY;
|
|
6389
|
-
if (svgEl) {
|
|
6390
|
-
const svgRect = svgEl.getBoundingClientRect();
|
|
6391
|
-
const containerRect = container.getBoundingClientRect();
|
|
6392
|
-
const vb = svgEl.viewBox.baseVal;
|
|
6393
|
-
const scaleX = svgRect.width / (vb.width || 1);
|
|
6394
|
-
const scaleY = svgRect.height / (vb.height || 1);
|
|
6395
|
-
x = svgX * scaleX + (svgRect.left - containerRect.left);
|
|
6396
|
-
y = svgY * scaleY + (svgRect.top - containerRect.top);
|
|
6397
|
-
}
|
|
6398
|
-
setTooltip({ visible: true, x, y, content });
|
|
6399
|
-
}, [enabled]);
|
|
6400
6383
|
const hide = React6.useCallback(() => {
|
|
6401
6384
|
cancelAnimationFrame(rafRef.current);
|
|
6402
6385
|
setTooltip((prev) => ({ ...prev, visible: false }));
|
|
6403
6386
|
}, []);
|
|
6404
|
-
return { tooltip, show,
|
|
6387
|
+
return { tooltip, show, hide, move, containerRef };
|
|
6405
6388
|
};
|
|
6406
6389
|
var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx307(Fragment2, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
6407
6390
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
@@ -6466,7 +6449,7 @@ var useCrosshair = (seriesPoints, entries, labels, chartH) => {
|
|
|
6466
6449
|
}, [entries, seriesPoints]);
|
|
6467
6450
|
return { activeIndex, handleMouseMove, handleMouseLeave, tooltipContent, getTooltipAt };
|
|
6468
6451
|
};
|
|
6469
|
-
var LineChart = React6.memo(({ data, labels, width, height, animate, onHover,
|
|
6452
|
+
var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, onMove, onLeave }) => {
|
|
6470
6453
|
const entries = React6.useMemo(() => Object.entries(data), [data]);
|
|
6471
6454
|
const maxVal = React6.useMemo(() => {
|
|
6472
6455
|
const allValues = entries.flatMap(([, v]) => v);
|
|
@@ -6486,7 +6469,6 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
6486
6469
|
[entries, count, chartW, chartH, maxVal]
|
|
6487
6470
|
);
|
|
6488
6471
|
const clipRef = React6.useRef(null);
|
|
6489
|
-
const svgRef = React6.useRef(null);
|
|
6490
6472
|
const { activeIndex, handleMouseMove, handleMouseLeave, getTooltipAt } = useCrosshair(seriesPoints, entries, labels, chartH);
|
|
6491
6473
|
React6.useEffect(() => {
|
|
6492
6474
|
if (!animate || !clipRef.current) return;
|
|
@@ -6503,14 +6485,12 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
6503
6485
|
return /* @__PURE__ */ jsxs197(
|
|
6504
6486
|
"svg",
|
|
6505
6487
|
{
|
|
6506
|
-
ref: svgRef,
|
|
6507
6488
|
viewBox: `0 0 ${width} ${height}`,
|
|
6508
6489
|
className: "chart-svg",
|
|
6509
6490
|
onMouseMove: (e) => {
|
|
6510
6491
|
handleMouseMove(e);
|
|
6511
|
-
if (activeIndex !== null
|
|
6512
|
-
|
|
6513
|
-
onShowAt(p.x, p.y, `${labels[activeIndex]} \u2014 ${getTooltipAt(activeIndex)}`, svgRef.current);
|
|
6492
|
+
if (activeIndex !== null) {
|
|
6493
|
+
onHover(e, `${labels[activeIndex]} \u2014 ${getTooltipAt(activeIndex)}`);
|
|
6514
6494
|
} else {
|
|
6515
6495
|
onLeave();
|
|
6516
6496
|
}
|
|
@@ -6578,7 +6558,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
6578
6558
|
);
|
|
6579
6559
|
});
|
|
6580
6560
|
LineChart.displayName = "LineChart";
|
|
6581
|
-
var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover,
|
|
6561
|
+
var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, onMove, onLeave }) => {
|
|
6582
6562
|
const entries = React6.useMemo(() => Object.entries(data), [data]);
|
|
6583
6563
|
const maxVal = React6.useMemo(() => {
|
|
6584
6564
|
const allValues = entries.flatMap(([, v]) => v);
|
|
@@ -6598,7 +6578,6 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
6598
6578
|
[entries, count, chartW, chartH, maxVal]
|
|
6599
6579
|
);
|
|
6600
6580
|
const curveClipRef = React6.useRef(null);
|
|
6601
|
-
const curveSvgRef = React6.useRef(null);
|
|
6602
6581
|
const { activeIndex, handleMouseMove, handleMouseLeave, getTooltipAt } = useCrosshair(seriesPoints, entries, labels, chartH);
|
|
6603
6582
|
React6.useEffect(() => {
|
|
6604
6583
|
if (!animate || !curveClipRef.current) return;
|
|
@@ -6615,14 +6594,13 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
6615
6594
|
return /* @__PURE__ */ jsxs197(
|
|
6616
6595
|
"svg",
|
|
6617
6596
|
{
|
|
6618
|
-
ref: curveSvgRef,
|
|
6619
6597
|
viewBox: `0 0 ${width} ${height}`,
|
|
6620
6598
|
className: "chart-svg",
|
|
6621
6599
|
onMouseMove: (e) => {
|
|
6622
6600
|
handleMouseMove(e);
|
|
6623
6601
|
if (activeIndex !== null && seriesPoints[0]?.[activeIndex]) {
|
|
6624
6602
|
const p = seriesPoints[0][activeIndex];
|
|
6625
|
-
|
|
6603
|
+
onHover(e, `${labels[activeIndex]} \u2014 ${getTooltipAt(activeIndex)}`);
|
|
6626
6604
|
} else {
|
|
6627
6605
|
onLeave();
|
|
6628
6606
|
}
|
|
@@ -6690,8 +6668,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
6690
6668
|
);
|
|
6691
6669
|
});
|
|
6692
6670
|
CurveChart.displayName = "CurveChart";
|
|
6693
|
-
var BarChart = React6.memo(({ data, labels, width, height, animate, onHover,
|
|
6694
|
-
const barSvgRef = React6.useRef(null);
|
|
6671
|
+
var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onMove, onLeave }) => {
|
|
6695
6672
|
const entries = React6.useMemo(() => Object.entries(data), [data]);
|
|
6696
6673
|
const maxVal = React6.useMemo(() => {
|
|
6697
6674
|
const allValues = entries.flatMap(([, v]) => v);
|
|
@@ -6718,7 +6695,7 @@ var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onS
|
|
|
6718
6695
|
[entries, maxVal, chartH, groupW, barW, barGap, groupCount]
|
|
6719
6696
|
);
|
|
6720
6697
|
const barLabelStep = getLabelStep(count, chartW);
|
|
6721
|
-
return /* @__PURE__ */ jsxs197("svg", {
|
|
6698
|
+
return /* @__PURE__ */ jsxs197("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
6722
6699
|
/* @__PURE__ */ jsx307(GridLines, { width, height, chartH, maxVal }),
|
|
6723
6700
|
labels.map((label, i) => {
|
|
6724
6701
|
if (i % barLabelStep !== 0) return null;
|
|
@@ -6741,7 +6718,8 @@ var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onS
|
|
|
6741
6718
|
transformOrigin: `${b.x + b.w / 2}px ${baseline}px`,
|
|
6742
6719
|
animationDelay: `${delay}ms`
|
|
6743
6720
|
} : void 0,
|
|
6744
|
-
onMouseEnter: () =>
|
|
6721
|
+
onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${b.v}`),
|
|
6722
|
+
onMouseMove: onMove,
|
|
6745
6723
|
onMouseLeave: onLeave
|
|
6746
6724
|
},
|
|
6747
6725
|
`${di}-${i}`
|
|
@@ -6829,14 +6807,17 @@ var PieDonutChart = React6.memo(
|
|
|
6829
6807
|
{
|
|
6830
6808
|
d: s.d,
|
|
6831
6809
|
fill: PIE_COLORS[(i + colorOffset) % PIE_COLORS.length],
|
|
6832
|
-
className: "chart-slice"
|
|
6810
|
+
className: "chart-slice",
|
|
6811
|
+
onMouseEnter: (e) => onHover(e, `${s.label} \u2014 ${s.v.toLocaleString()} (${s.pct}%)`),
|
|
6812
|
+
onMouseMove: onMove,
|
|
6813
|
+
onMouseLeave: onLeave
|
|
6833
6814
|
}
|
|
6834
6815
|
) }, i)) })
|
|
6835
6816
|
] });
|
|
6836
6817
|
}
|
|
6837
6818
|
);
|
|
6838
6819
|
PieDonutChart.displayName = "PieDonutChart";
|
|
6839
|
-
var ChartTooltip = ({ x, y, containerWidth, containerHeight, children }) => {
|
|
6820
|
+
var ChartTooltip = ({ x, y, containerWidth, containerHeight, tooltipType, children }) => {
|
|
6840
6821
|
const ref = React6.useRef(null);
|
|
6841
6822
|
const [pos, setPos] = React6.useState({ left: 0, top: 0 });
|
|
6842
6823
|
React6.useLayoutEffect(() => {
|
|
@@ -6847,17 +6828,25 @@ var ChartTooltip = ({ x, y, containerWidth, containerHeight, children }) => {
|
|
|
6847
6828
|
let left = x + TOOLTIP_OFFSET;
|
|
6848
6829
|
let top = y - h - TOOLTIP_OFFSET;
|
|
6849
6830
|
if (left + w > containerWidth) left = x - w - TOOLTIP_OFFSET;
|
|
6850
|
-
if (top < 0) top = y + TOOLTIP_OFFSET;
|
|
6851
6831
|
if (left < 0) left = 0;
|
|
6832
|
+
if (top < 0) top = y + TOOLTIP_OFFSET;
|
|
6833
|
+
if (top + h > containerHeight) top = containerHeight - h;
|
|
6852
6834
|
setPos({ left, top });
|
|
6853
6835
|
}, [x, y, containerWidth, containerHeight]);
|
|
6854
|
-
|
|
6836
|
+
const content = typeof children === "string" ? children : "";
|
|
6837
|
+
const sepIdx = content.indexOf(" \u2014 ");
|
|
6838
|
+
const title = sepIdx >= 0 ? content.slice(0, sepIdx) : content;
|
|
6839
|
+
const desc = sepIdx >= 0 ? content.slice(sepIdx + 3) : "";
|
|
6840
|
+
return /* @__PURE__ */ jsxs197(
|
|
6855
6841
|
"div",
|
|
6856
6842
|
{
|
|
6857
6843
|
ref,
|
|
6858
|
-
className:
|
|
6844
|
+
className: `chart-tooltip chart-tooltip-show chart-tooltip-${tooltipType}`,
|
|
6859
6845
|
style: { left: pos.left, top: pos.top },
|
|
6860
|
-
children
|
|
6846
|
+
children: [
|
|
6847
|
+
title && /* @__PURE__ */ jsx307("div", { className: "chart-tooltip-title", children: title }),
|
|
6848
|
+
desc && /* @__PURE__ */ jsx307("div", { className: "chart-tooltip-desc", children: desc })
|
|
6849
|
+
]
|
|
6861
6850
|
}
|
|
6862
6851
|
);
|
|
6863
6852
|
};
|
|
@@ -6900,8 +6889,8 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
6900
6889
|
}) });
|
|
6901
6890
|
};
|
|
6902
6891
|
var Chart = React6.memo((props) => {
|
|
6903
|
-
const { type, data, labels, tooltip: showTooltip = true } = props;
|
|
6904
|
-
const { tooltip, show,
|
|
6892
|
+
const { type, data, labels, tooltip: showTooltip = true, tooltipType = "dark" } = props;
|
|
6893
|
+
const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
|
|
6905
6894
|
const { width, height } = useChartSize(containerRef);
|
|
6906
6895
|
const stableData = React6.useMemo(() => data, [JSON.stringify(data)]);
|
|
6907
6896
|
const stableLabels = React6.useMemo(() => labels, [JSON.stringify(labels)]);
|
|
@@ -6909,13 +6898,13 @@ var Chart = React6.memo((props) => {
|
|
|
6909
6898
|
const animate = useChartAnimation(containerRef, dataKey);
|
|
6910
6899
|
const ready = width > 0 && height > 0;
|
|
6911
6900
|
return /* @__PURE__ */ jsxs197("div", { className: "lib-xplat-chart", ref: containerRef, children: [
|
|
6912
|
-
ready && type === "line" && /* @__PURE__ */ jsx307(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show,
|
|
6913
|
-
ready && type === "curve" && /* @__PURE__ */ jsx307(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show,
|
|
6914
|
-
ready && type === "bar" && /* @__PURE__ */ jsx307(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show,
|
|
6915
|
-
ready && type === "pie" && /* @__PURE__ */ jsx307(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show,
|
|
6916
|
-
ready && type === "doughnut" && /* @__PURE__ */ jsx307(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show,
|
|
6901
|
+
ready && type === "line" && /* @__PURE__ */ jsx307(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
6902
|
+
ready && type === "curve" && /* @__PURE__ */ jsx307(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
6903
|
+
ready && type === "bar" && /* @__PURE__ */ jsx307(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
6904
|
+
ready && type === "pie" && /* @__PURE__ */ jsx307(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
6905
|
+
ready && type === "doughnut" && /* @__PURE__ */ jsx307(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
|
|
6917
6906
|
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ jsx307(ChartLegend, { data: stableData, labels: stableLabels, type }),
|
|
6918
|
-
tooltip.visible && tooltip.content && /* @__PURE__ */ jsx307(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, children: tooltip.content })
|
|
6907
|
+
tooltip.visible && tooltip.content && /* @__PURE__ */ jsx307(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
|
|
6919
6908
|
] });
|
|
6920
6909
|
});
|
|
6921
6910
|
Chart.displayName = "Chart";
|
|
@@ -9435,18 +9424,94 @@ ToastProvider.displayName = "ToastProvider";
|
|
|
9435
9424
|
|
|
9436
9425
|
// src/components/Tooltip/Tooltip.tsx
|
|
9437
9426
|
import React39 from "react";
|
|
9438
|
-
import { jsx as jsx348, jsxs as jsxs221 } from "react/jsx-runtime";
|
|
9427
|
+
import { Fragment as Fragment5, jsx as jsx348, jsxs as jsxs221 } from "react/jsx-runtime";
|
|
9428
|
+
var OFFSET = 12;
|
|
9429
|
+
var SHOW_DELAY = 300;
|
|
9439
9430
|
var Tooltip = (props) => {
|
|
9440
9431
|
const {
|
|
9441
|
-
type = "
|
|
9432
|
+
type = "dark",
|
|
9433
|
+
title,
|
|
9442
9434
|
description,
|
|
9443
|
-
children
|
|
9435
|
+
children,
|
|
9436
|
+
disabled = false
|
|
9444
9437
|
} = props;
|
|
9445
|
-
const
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9438
|
+
const triggerRef = React39.useRef(null);
|
|
9439
|
+
const tooltipRef = React39.useRef(null);
|
|
9440
|
+
const [visible, setVisible] = React39.useState(false);
|
|
9441
|
+
const [pos, setPos] = React39.useState({ left: 0, top: 0 });
|
|
9442
|
+
const delayTimer = React39.useRef(0);
|
|
9443
|
+
const calculatePos = React39.useCallback((clientX, clientY) => {
|
|
9444
|
+
const el = tooltipRef.current;
|
|
9445
|
+
if (!el) return;
|
|
9446
|
+
const w = el.offsetWidth;
|
|
9447
|
+
const h = el.offsetHeight;
|
|
9448
|
+
const vw = window.innerWidth;
|
|
9449
|
+
let left = clientX + OFFSET;
|
|
9450
|
+
let top = clientY - h - OFFSET;
|
|
9451
|
+
if (left + w > vw - 8) left = clientX - w - OFFSET;
|
|
9452
|
+
if (top < 8) top = clientY + OFFSET;
|
|
9453
|
+
if (left < 8) left = 8;
|
|
9454
|
+
setPos({ left, top });
|
|
9455
|
+
}, []);
|
|
9456
|
+
const handleMouseEnter = React39.useCallback(() => {
|
|
9457
|
+
if (disabled) return;
|
|
9458
|
+
delayTimer.current = window.setTimeout(() => {
|
|
9459
|
+
setVisible(true);
|
|
9460
|
+
}, SHOW_DELAY);
|
|
9461
|
+
}, [disabled]);
|
|
9462
|
+
const handleMouseMove = React39.useCallback((e) => {
|
|
9463
|
+
if (!visible) return;
|
|
9464
|
+
calculatePos(e.clientX, e.clientY);
|
|
9465
|
+
}, [visible, calculatePos]);
|
|
9466
|
+
const handleMouseLeave = React39.useCallback(() => {
|
|
9467
|
+
window.clearTimeout(delayTimer.current);
|
|
9468
|
+
setVisible(false);
|
|
9469
|
+
}, []);
|
|
9470
|
+
const handleClick = React39.useCallback(() => {
|
|
9471
|
+
window.clearTimeout(delayTimer.current);
|
|
9472
|
+
setVisible(false);
|
|
9473
|
+
}, []);
|
|
9474
|
+
const handleFocus = React39.useCallback(() => {
|
|
9475
|
+
if (disabled) return;
|
|
9476
|
+
setVisible(true);
|
|
9477
|
+
}, [disabled]);
|
|
9478
|
+
const handleBlur = React39.useCallback(() => {
|
|
9479
|
+
setVisible(false);
|
|
9480
|
+
}, []);
|
|
9481
|
+
React39.useLayoutEffect(() => {
|
|
9482
|
+
if (!visible || !triggerRef.current) return;
|
|
9483
|
+
const rect = triggerRef.current.getBoundingClientRect();
|
|
9484
|
+
calculatePos(rect.right, rect.top);
|
|
9485
|
+
}, [visible, calculatePos]);
|
|
9486
|
+
if (!title && !description) return /* @__PURE__ */ jsx348(Fragment5, { children });
|
|
9487
|
+
return /* @__PURE__ */ jsxs221(
|
|
9488
|
+
"div",
|
|
9489
|
+
{
|
|
9490
|
+
ref: triggerRef,
|
|
9491
|
+
className: "lib-xplat-tooltip-trigger",
|
|
9492
|
+
onMouseEnter: handleMouseEnter,
|
|
9493
|
+
onMouseMove: handleMouseMove,
|
|
9494
|
+
onMouseLeave: handleMouseLeave,
|
|
9495
|
+
onClick: handleClick,
|
|
9496
|
+
onFocus: handleFocus,
|
|
9497
|
+
onBlur: handleBlur,
|
|
9498
|
+
children: [
|
|
9499
|
+
children,
|
|
9500
|
+
visible && /* @__PURE__ */ jsx348(Portal_default, { children: /* @__PURE__ */ jsxs221(
|
|
9501
|
+
"div",
|
|
9502
|
+
{
|
|
9503
|
+
ref: tooltipRef,
|
|
9504
|
+
className: clsx_default("lib-xplat-tooltip", type),
|
|
9505
|
+
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
9506
|
+
children: [
|
|
9507
|
+
title && /* @__PURE__ */ jsx348("div", { className: "tooltip-title", children: title }),
|
|
9508
|
+
description && /* @__PURE__ */ jsx348("div", { className: "tooltip-desc", children: description })
|
|
9509
|
+
]
|
|
9510
|
+
}
|
|
9511
|
+
) })
|
|
9512
|
+
]
|
|
9513
|
+
}
|
|
9514
|
+
);
|
|
9450
9515
|
};
|
|
9451
9516
|
Tooltip.displayName = "Tooltip";
|
|
9452
9517
|
var Tooltip_default = Tooltip;
|
|
@@ -9891,11 +9956,11 @@ Header.displayName = "Header";
|
|
|
9891
9956
|
var Header_default = Header;
|
|
9892
9957
|
|
|
9893
9958
|
// src/layout/Layout/Layout.tsx
|
|
9894
|
-
import { Fragment as
|
|
9959
|
+
import { Fragment as Fragment6, jsx as jsx354, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
9895
9960
|
var Layout = (props) => {
|
|
9896
9961
|
const { header, sideBar, children } = props;
|
|
9897
9962
|
return /* @__PURE__ */ jsx354("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs224("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
9898
|
-
sideBar && /* @__PURE__ */ jsx354(
|
|
9963
|
+
sideBar && /* @__PURE__ */ jsx354(Fragment6, { children: sideBar }),
|
|
9899
9964
|
/* @__PURE__ */ jsxs224("div", { className: "lib-xplat-layout-content", children: [
|
|
9900
9965
|
header && /* @__PURE__ */ jsx354("div", { className: "lib-xplat-layout-conent-header", children: header }),
|
|
9901
9966
|
children
|