@kb-labs/studio-ui-kit 2.94.0 → 2.96.0
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/README.md +5 -4
- package/dist/index.css +45 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +19 -47
- package/dist/index.js +155 -122
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { theme, Button, Typography, Form, Empty, Modal, message, notification, Space, Row, Col, Divider, Badge, Card, Tag, Avatar, Table, Statistic, Progress, Descriptions, Timeline, Tree, List, Input, Select, Checkbox, Switch, DatePicker, TimePicker, InputNumber, Radio, Upload, Slider, Breadcrumb, Collapse, Dropdown, Segmented, Steps, Menu, Alert, Skeleton, Spin, Result,
|
|
1
|
+
import { theme, Button, Typography, Form, Empty, Modal, message, notification, Space, Row, Col, Divider, Badge, Card, Tag, Avatar, Tooltip, Table, Statistic, Progress, Descriptions, Timeline, Tree, List, Input, Select, Checkbox, Switch, DatePicker, TimePicker, InputNumber, Radio, Upload, Slider, Breadcrumb, Collapse, Dropdown, Segmented, Steps, Menu, Alert, Skeleton, Spin, Result, Drawer, Popconfirm, Popover, Tabs } from 'antd';
|
|
2
2
|
import { typography, spacing } from '@kb-labs/studio-ui-core';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import * as
|
|
4
|
+
import * as React4 from 'react';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
import { Line, Column, Area, Pie, Bar } from '@ant-design/charts';
|
|
7
7
|
import dayjs from 'dayjs';
|
|
8
8
|
import { useSearchParams, useNavigate, useParams } from 'react-router-dom';
|
|
9
|
+
import { marked } from 'marked';
|
|
9
10
|
|
|
10
11
|
// src/primitives/UIText.tsx
|
|
11
12
|
var { useToken } = theme;
|
|
@@ -188,7 +189,7 @@ function UIBadge({ variant = "default", children, ...props }) {
|
|
|
188
189
|
|
|
189
190
|
// src/core/UIButton.module.css
|
|
190
191
|
var UIButton_default = {};
|
|
191
|
-
var UIButton =
|
|
192
|
+
var UIButton = React4.forwardRef(
|
|
192
193
|
function UIButton2({ variant = "default", className, ...rest }, ref) {
|
|
193
194
|
const combinedClassName = [UIButton_default.uiButton, className].filter(Boolean).join(" ");
|
|
194
195
|
return /* @__PURE__ */ jsx(
|
|
@@ -264,6 +265,8 @@ function UITag({
|
|
|
264
265
|
closable,
|
|
265
266
|
onClose,
|
|
266
267
|
icon,
|
|
268
|
+
className,
|
|
269
|
+
onClick,
|
|
267
270
|
...rest
|
|
268
271
|
}) {
|
|
269
272
|
const { token } = useToken4();
|
|
@@ -275,6 +278,7 @@ function UITag({
|
|
|
275
278
|
default: token.colorPrimary,
|
|
276
279
|
neutral: token.colorTextSecondary
|
|
277
280
|
};
|
|
281
|
+
const combinedClassName = ["kb-ui-tag", className].filter(Boolean).join(" ");
|
|
278
282
|
return /* @__PURE__ */ jsx(
|
|
279
283
|
Tag,
|
|
280
284
|
{
|
|
@@ -282,6 +286,9 @@ function UITag({
|
|
|
282
286
|
closable,
|
|
283
287
|
onClose,
|
|
284
288
|
icon,
|
|
289
|
+
className: combinedClassName,
|
|
290
|
+
onClick,
|
|
291
|
+
style: onClick ? { cursor: "pointer" } : void 0,
|
|
285
292
|
...rest,
|
|
286
293
|
children
|
|
287
294
|
}
|
|
@@ -349,7 +356,7 @@ function UIIcon({
|
|
|
349
356
|
console.warn(`Icon "${iconName}" could not be loaded. Call registerIconRenderer() at app startup.`);
|
|
350
357
|
iconElement = null;
|
|
351
358
|
}
|
|
352
|
-
} else if (
|
|
359
|
+
} else if (React4.isValidElement(icon)) {
|
|
353
360
|
iconElement = icon;
|
|
354
361
|
}
|
|
355
362
|
if (!iconElement) {
|
|
@@ -428,10 +435,40 @@ function UIShimmerText({
|
|
|
428
435
|
}
|
|
429
436
|
);
|
|
430
437
|
}
|
|
438
|
+
function UICopyButton({ value, size = "small", label, style, ...rest }) {
|
|
439
|
+
const [copied, setCopied] = React4.useState(false);
|
|
440
|
+
const handleCopy = (e) => {
|
|
441
|
+
e.stopPropagation();
|
|
442
|
+
navigator.clipboard.writeText(value).then(() => {
|
|
443
|
+
setCopied(true);
|
|
444
|
+
setTimeout(() => setCopied(false), 1500);
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
return /* @__PURE__ */ jsx(
|
|
448
|
+
UIButton,
|
|
449
|
+
{
|
|
450
|
+
variant: "text",
|
|
451
|
+
size,
|
|
452
|
+
icon: /* @__PURE__ */ jsx(
|
|
453
|
+
UIIcon,
|
|
454
|
+
{
|
|
455
|
+
name: copied ? "CheckOutlined" : "CopyOutlined",
|
|
456
|
+
style: { color: copied ? "#52c41a" : void 0, transition: "color 150ms ease" }
|
|
457
|
+
}
|
|
458
|
+
),
|
|
459
|
+
onClick: handleCopy,
|
|
460
|
+
style: { transition: "opacity 150ms ease", ...style },
|
|
461
|
+
...rest,
|
|
462
|
+
children: label
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
}
|
|
431
466
|
var { useToken: useToken6 } = theme;
|
|
432
467
|
function UIMetricCard({
|
|
433
468
|
label,
|
|
434
469
|
value,
|
|
470
|
+
icon,
|
|
471
|
+
status = "default",
|
|
435
472
|
trend = "neutral",
|
|
436
473
|
delta,
|
|
437
474
|
unit,
|
|
@@ -440,53 +477,56 @@ function UIMetricCard({
|
|
|
440
477
|
loading = false
|
|
441
478
|
}) {
|
|
442
479
|
const { token } = useToken6();
|
|
443
|
-
const
|
|
480
|
+
const iconBgMap = {
|
|
481
|
+
default: token.colorFillSecondary,
|
|
482
|
+
info: token.colorInfoBg,
|
|
483
|
+
success: token.colorSuccessBg,
|
|
484
|
+
warning: token.colorWarningBg,
|
|
485
|
+
error: token.colorErrorBg
|
|
486
|
+
};
|
|
487
|
+
const iconColorMap = {
|
|
488
|
+
default: token.colorTextSecondary,
|
|
489
|
+
info: token.colorInfo,
|
|
490
|
+
success: token.colorSuccess,
|
|
491
|
+
warning: token.colorWarning,
|
|
492
|
+
error: token.colorError
|
|
493
|
+
};
|
|
494
|
+
trend === "up" ? token.colorSuccess : trend === "down" ? token.colorError : token.colorTextSecondary;
|
|
444
495
|
const trendIcon = trend === "up" ? "\u2191" : trend === "down" ? "\u2193" : "";
|
|
445
|
-
return /* @__PURE__ */ jsx(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
" ",
|
|
480
|
-
Math.abs(delta),
|
|
481
|
-
"%"
|
|
482
|
-
]
|
|
483
|
-
}
|
|
484
|
-
)
|
|
485
|
-
}
|
|
486
|
-
)
|
|
487
|
-
] })
|
|
488
|
-
}
|
|
489
|
-
);
|
|
496
|
+
return /* @__PURE__ */ jsx(Card, { size, loading, style: { height: "100%" }, children: /* @__PURE__ */ jsxs(UIBox, { children: [
|
|
497
|
+
icon && /* @__PURE__ */ jsx("div", { style: {
|
|
498
|
+
width: 36,
|
|
499
|
+
height: 36,
|
|
500
|
+
borderRadius: token.borderRadiusSM,
|
|
501
|
+
backgroundColor: iconBgMap[status],
|
|
502
|
+
display: "flex",
|
|
503
|
+
alignItems: "center",
|
|
504
|
+
justifyContent: "center",
|
|
505
|
+
color: iconColorMap[status],
|
|
506
|
+
fontSize: 16,
|
|
507
|
+
marginBottom: token.marginSM
|
|
508
|
+
}, children: icon }),
|
|
509
|
+
/* @__PURE__ */ jsx(UIText, { size: "sm", color: "secondary", as: "div", children: label }),
|
|
510
|
+
/* @__PURE__ */ jsx(Tooltip, { title: String(value), mouseEnterDelay: 0.6, children: /* @__PURE__ */ jsxs(UIFlex, { align: "baseline", gap: 2, style: { marginTop: 4, overflow: "hidden" }, children: [
|
|
511
|
+
/* @__PURE__ */ jsx(
|
|
512
|
+
UIText,
|
|
513
|
+
{
|
|
514
|
+
size: "2xl",
|
|
515
|
+
weight: "bold",
|
|
516
|
+
as: "div",
|
|
517
|
+
style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", minWidth: 0 },
|
|
518
|
+
children: value
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
unit && /* @__PURE__ */ jsx(UIText, { size: "base", color: "secondary", style: { flexShrink: 0 }, children: unit })
|
|
522
|
+
] }) }),
|
|
523
|
+
showDelta && delta !== void 0 && /* @__PURE__ */ jsx(UIFlex, { align: "center", gap: 1, style: { marginTop: token.marginXS }, children: /* @__PURE__ */ jsxs(UIText, { size: "sm", style: { color: delta >= 0 ? token.colorSuccess : token.colorError }, children: [
|
|
524
|
+
trendIcon,
|
|
525
|
+
" ",
|
|
526
|
+
Math.abs(delta),
|
|
527
|
+
"%"
|
|
528
|
+
] }) })
|
|
529
|
+
] }) });
|
|
490
530
|
}
|
|
491
531
|
function UITable({
|
|
492
532
|
columns,
|
|
@@ -601,7 +641,7 @@ function createFillFunction(colorMap, colorField) {
|
|
|
601
641
|
var { useToken: useToken7 } = theme;
|
|
602
642
|
function useChartTheme() {
|
|
603
643
|
const { token } = useToken7();
|
|
604
|
-
return
|
|
644
|
+
return React4.useMemo(
|
|
605
645
|
() => ({
|
|
606
646
|
defaultColor: token.colorPrimary,
|
|
607
647
|
styleSheet: {
|
|
@@ -617,7 +657,7 @@ function useChartTheme() {
|
|
|
617
657
|
function UILineChart({ colors, disableAutoColors, ...props }) {
|
|
618
658
|
const chartTheme = useChartTheme();
|
|
619
659
|
const palette = useChartColors();
|
|
620
|
-
const enhancedProps =
|
|
660
|
+
const enhancedProps = React4.useMemo(() => {
|
|
621
661
|
const hasColorField = props.colorField || props.seriesField;
|
|
622
662
|
console.log("[UILineChart] Debug info:", {
|
|
623
663
|
hasColorField,
|
|
@@ -657,7 +697,7 @@ function UILineChart({ colors, disableAutoColors, ...props }) {
|
|
|
657
697
|
var { useToken: useToken8 } = theme;
|
|
658
698
|
function useChartTheme2() {
|
|
659
699
|
const { token } = useToken8();
|
|
660
|
-
return
|
|
700
|
+
return React4.useMemo(
|
|
661
701
|
() => ({
|
|
662
702
|
defaultColor: token.colorPrimary,
|
|
663
703
|
colors10: [
|
|
@@ -716,7 +756,7 @@ function UIColumnChart({ colors, ...props }) {
|
|
|
716
756
|
var { useToken: useToken9 } = theme;
|
|
717
757
|
function useChartTheme3() {
|
|
718
758
|
const { token } = useToken9();
|
|
719
|
-
return
|
|
759
|
+
return React4.useMemo(
|
|
720
760
|
() => ({
|
|
721
761
|
defaultColor: token.colorPrimary,
|
|
722
762
|
styleSheet: {
|
|
@@ -732,7 +772,7 @@ function useChartTheme3() {
|
|
|
732
772
|
function UIAreaChart({ colors, disableAutoColors, ...props }) {
|
|
733
773
|
const chartTheme = useChartTheme3();
|
|
734
774
|
const palette = useChartColors();
|
|
735
|
-
const enhancedProps =
|
|
775
|
+
const enhancedProps = React4.useMemo(() => {
|
|
736
776
|
if (disableAutoColors || !props.colorField || !props.data) {
|
|
737
777
|
return props;
|
|
738
778
|
}
|
|
@@ -752,7 +792,7 @@ function UIAreaChart({ colors, disableAutoColors, ...props }) {
|
|
|
752
792
|
var { useToken: useToken10 } = theme;
|
|
753
793
|
function useChartTheme4() {
|
|
754
794
|
const { token } = useToken10();
|
|
755
|
-
return
|
|
795
|
+
return React4.useMemo(
|
|
756
796
|
() => ({
|
|
757
797
|
defaultColor: token.colorPrimary,
|
|
758
798
|
styleSheet: {
|
|
@@ -768,7 +808,7 @@ function useChartTheme4() {
|
|
|
768
808
|
function UIPieChart({ colors, disableAutoColors, ...props }) {
|
|
769
809
|
const chartTheme = useChartTheme4();
|
|
770
810
|
const palette = useChartColors();
|
|
771
|
-
const enhancedProps =
|
|
811
|
+
const enhancedProps = React4.useMemo(() => {
|
|
772
812
|
if (disableAutoColors || !props.colorField || !props.data) {
|
|
773
813
|
return props;
|
|
774
814
|
}
|
|
@@ -788,7 +828,7 @@ function UIPieChart({ colors, disableAutoColors, ...props }) {
|
|
|
788
828
|
var { useToken: useToken11 } = theme;
|
|
789
829
|
function useChartTheme5() {
|
|
790
830
|
const { token } = useToken11();
|
|
791
|
-
return
|
|
831
|
+
return React4.useMemo(
|
|
792
832
|
() => ({
|
|
793
833
|
defaultColor: token.colorPrimary,
|
|
794
834
|
styleSheet: {
|
|
@@ -804,7 +844,7 @@ function useChartTheme5() {
|
|
|
804
844
|
function UIBarChart({ colors, disableAutoColors, ...props }) {
|
|
805
845
|
const chartTheme = useChartTheme5();
|
|
806
846
|
const palette = useChartColors();
|
|
807
|
-
const enhancedProps =
|
|
847
|
+
const enhancedProps = React4.useMemo(() => {
|
|
808
848
|
if (disableAutoColors || !props.seriesField || !props.data) {
|
|
809
849
|
return props;
|
|
810
850
|
}
|
|
@@ -835,11 +875,11 @@ function UIStatisticsChart({
|
|
|
835
875
|
chartProps
|
|
836
876
|
}) {
|
|
837
877
|
const palette = useChartColors();
|
|
838
|
-
const chartColors =
|
|
878
|
+
const chartColors = React4.useMemo(
|
|
839
879
|
() => palette.colors.slice(0, Math.max(metrics.length, 3)),
|
|
840
880
|
[palette.colors, metrics.length]
|
|
841
881
|
);
|
|
842
|
-
const chartData =
|
|
882
|
+
const chartData = React4.useMemo(() => {
|
|
843
883
|
if (!data) {
|
|
844
884
|
return [];
|
|
845
885
|
}
|
|
@@ -1670,6 +1710,9 @@ function UIErrorState({
|
|
|
1670
1710
|
(showRetry || action) && /* @__PURE__ */ jsx(UIBox, { mt: 2, children: action || /* @__PURE__ */ jsx(UIButton, { variant: "primary", onClick: onRetry, children: retryText }) })
|
|
1671
1711
|
] }) });
|
|
1672
1712
|
}
|
|
1713
|
+
|
|
1714
|
+
// src/feedback/UISkeleton.module.css
|
|
1715
|
+
var UISkeleton_default = {};
|
|
1673
1716
|
function UISkeleton({
|
|
1674
1717
|
loading = true,
|
|
1675
1718
|
children,
|
|
@@ -1714,36 +1757,28 @@ function UISkeletonText({
|
|
|
1714
1757
|
className,
|
|
1715
1758
|
style
|
|
1716
1759
|
}) {
|
|
1717
|
-
const
|
|
1760
|
+
const { token } = theme.useToken();
|
|
1761
|
+
const isArray = Array.isArray(width);
|
|
1762
|
+
const widths = isArray ? width : [width];
|
|
1763
|
+
const outerWidth = isArray ? "100%" : typeof width === "number" ? `${width}px` : width;
|
|
1718
1764
|
return /* @__PURE__ */ jsx(
|
|
1719
1765
|
"span",
|
|
1720
1766
|
{
|
|
1721
1767
|
className,
|
|
1722
|
-
style: { display: "inline-flex", flexDirection: "column", gap, ...style },
|
|
1768
|
+
style: { display: "inline-flex", flexDirection: "column", gap, width: outerWidth, ...style },
|
|
1723
1769
|
children: widths.map((w, i) => /* @__PURE__ */ jsx(
|
|
1724
1770
|
"span",
|
|
1725
1771
|
{
|
|
1772
|
+
className: UISkeleton_default.skeletonText,
|
|
1726
1773
|
style: {
|
|
1727
|
-
display: "
|
|
1728
|
-
width: w,
|
|
1729
|
-
height,
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
Skeleton.Input,
|
|
1736
|
-
{
|
|
1737
|
-
active: true,
|
|
1738
|
-
size: "small",
|
|
1739
|
-
style: {
|
|
1740
|
-
width: "100%",
|
|
1741
|
-
minWidth: "unset",
|
|
1742
|
-
height: "100%",
|
|
1743
|
-
display: "block"
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
)
|
|
1774
|
+
display: "block",
|
|
1775
|
+
width: isArray ? typeof w === "number" ? `${w}px` : w : "100%",
|
|
1776
|
+
height: typeof height === "number" ? `${height}px` : height,
|
|
1777
|
+
borderRadius: token.borderRadiusSM,
|
|
1778
|
+
flexShrink: 0,
|
|
1779
|
+
backgroundImage: `linear-gradient(90deg, ${token.colorBorder} 25%, ${token.colorBgLayout} 50%, ${token.colorBorder} 75%)`,
|
|
1780
|
+
backgroundSize: "400% 100%"
|
|
1781
|
+
}
|
|
1747
1782
|
},
|
|
1748
1783
|
i
|
|
1749
1784
|
))
|
|
@@ -1845,44 +1880,42 @@ function UIPopover(props) {
|
|
|
1845
1880
|
return /* @__PURE__ */ jsx(Popover, { ...props });
|
|
1846
1881
|
}
|
|
1847
1882
|
var { useToken: useToken17 } = theme;
|
|
1848
|
-
function UIMarkdownViewer({
|
|
1849
|
-
content,
|
|
1850
|
-
className,
|
|
1851
|
-
style: customStyle
|
|
1852
|
-
}) {
|
|
1883
|
+
function UIMarkdownViewer({ content, className, style: customStyle }) {
|
|
1853
1884
|
const { token } = useToken17();
|
|
1854
|
-
const
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
border:
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
{
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1885
|
+
const css = `
|
|
1886
|
+
.kb-md { font-size: ${token.fontSize}px; line-height: 1.75; color: ${token.colorText}; font-family: ${token.fontFamily}; }
|
|
1887
|
+
.kb-md h1,.kb-md h2,.kb-md h3,.kb-md h4,.kb-md h5,.kb-md h6 { font-weight:600; line-height:1.3; margin:1.5em 0 0.5em; color:${token.colorTextHeading}; }
|
|
1888
|
+
.kb-md h1 { font-size:${token.fontSizeHeading1}px; padding-bottom:0.3em; border-bottom:1px solid ${token.colorBorderSecondary}; }
|
|
1889
|
+
.kb-md h2 { font-size:${token.fontSizeHeading2}px; padding-bottom:0.2em; border-bottom:1px solid ${token.colorBorderSecondary}; }
|
|
1890
|
+
.kb-md h3 { font-size:${token.fontSizeHeading3}px; }
|
|
1891
|
+
.kb-md h4 { font-size:${token.fontSizeHeading4}px; }
|
|
1892
|
+
.kb-md p { margin:0.75em 0; }
|
|
1893
|
+
.kb-md a { color:${token.colorPrimary}; text-decoration:none; }
|
|
1894
|
+
.kb-md a:hover { text-decoration:underline; }
|
|
1895
|
+
.kb-md code { font-family:${token.fontFamilyCode}; font-size:0.875em; background:${token.colorFillTertiary}; color:${token.colorTextSecondary}; padding:0.15em 0.4em; border-radius:${token.borderRadiusSM}px; }
|
|
1896
|
+
.kb-md pre { background:${token.colorFillQuaternary}; border:1px solid ${token.colorBorderSecondary}; border-radius:${token.borderRadius}px; padding:16px; overflow-x:auto; margin:1em 0; }
|
|
1897
|
+
.kb-md pre code { background:none; padding:0; font-size:0.85em; color:${token.colorText}; }
|
|
1898
|
+
.kb-md ul,.kb-md ol { padding-left:1.75em; margin:0.75em 0; }
|
|
1899
|
+
.kb-md li { margin:0.25em 0; }
|
|
1900
|
+
.kb-md blockquote { margin:1em 0; padding:0.5em 1em; border-left:4px solid ${token.colorPrimaryBorder}; background:${token.colorFillQuaternary}; color:${token.colorTextSecondary}; border-radius:0 ${token.borderRadiusSM}px ${token.borderRadiusSM}px 0; }
|
|
1901
|
+
.kb-md blockquote p { margin:0; }
|
|
1902
|
+
.kb-md hr { border:none; border-top:1px solid ${token.colorBorderSecondary}; margin:1.5em 0; }
|
|
1903
|
+
.kb-md table { width:100%; border-collapse:collapse; margin:1em 0; font-size:0.9em; }
|
|
1904
|
+
.kb-md th,.kb-md td { border:1px solid ${token.colorBorderSecondary}; padding:8px 12px; text-align:left; }
|
|
1905
|
+
.kb-md th { background:${token.colorFillTertiary}; font-weight:600; }
|
|
1906
|
+
.kb-md tr:nth-child(even) td { background:${token.colorFillQuaternary}; }
|
|
1907
|
+
.kb-md img { max-width:100%; border-radius:${token.borderRadius}px; }
|
|
1908
|
+
`;
|
|
1909
|
+
return /* @__PURE__ */ jsxs(UIBox, { className, style: { padding: token.padding, ...customStyle }, children: [
|
|
1910
|
+
/* @__PURE__ */ jsx("style", { children: css }),
|
|
1911
|
+
/* @__PURE__ */ jsx(
|
|
1912
|
+
"div",
|
|
1913
|
+
{
|
|
1914
|
+
className: "kb-md",
|
|
1915
|
+
dangerouslySetInnerHTML: { __html: marked(content) }
|
|
1916
|
+
}
|
|
1917
|
+
)
|
|
1918
|
+
] });
|
|
1886
1919
|
}
|
|
1887
1920
|
var { useToken: useToken18 } = theme;
|
|
1888
1921
|
function UIJsonViewer({
|
|
@@ -1894,7 +1927,7 @@ function UIJsonViewer({
|
|
|
1894
1927
|
style: customStyle
|
|
1895
1928
|
}) {
|
|
1896
1929
|
const { token } = useToken18();
|
|
1897
|
-
const jsonString =
|
|
1930
|
+
const jsonString = React4.useMemo(() => {
|
|
1898
1931
|
try {
|
|
1899
1932
|
return JSON.stringify(data, null, indent);
|
|
1900
1933
|
} catch (error) {
|
|
@@ -2024,6 +2057,6 @@ function UIDiffViewer({
|
|
|
2024
2057
|
);
|
|
2025
2058
|
}
|
|
2026
2059
|
|
|
2027
|
-
export { UIAccordion, UIAlert, UIAreaChart, UIAvatar, UIAvatarGroup, UIBadge, UIBarChart, UIBox, UIBreadcrumb, UIButton, UICard, UICheckbox, UICheckboxGroup, UICol, UIColumnChart, UIDatePicker, UIDescriptions, UIDescriptionsItem, UIDiffViewer, UIDivider, UIDrawer, UIDropdown, UIDropdownButton, UIEmptyState, UIErrorState, UIFlex, UIForm, UIFormItem, UIFormList, UIHeader, UIIcon, UIIconButton, UIInput, UIInputNumber, UIInputPassword, UIInputSearch, UIInputTextArea, UIJsonViewer, UILineChart, UIList, UIListItem, UIListItemMeta, UIMarkdownViewer, UIMenu, UIMessage, UIMetricCard, UIModal, UIModalConfirm, UIModalError, UIModalInfo, UIModalSuccess, UIModalWarning, UINotification, UIPage, UIPageHeader, UIPageSection, UIPieChart, UIPopconfirm, UIPopover, UIProgress, UIRadio, UIRadioGroup, UIRangePicker, UIResult, UIRow, UISegmented, UISelect, UIShimmerText, UISkeleton, UISkeletonButton, UISkeletonImage, UISkeletonInput, UISkeletonNode, UISkeletonText, UISlider, UISpace, UISpaceCompact, UISpin, UIStack, UIStatistic, UIStatisticCountdown, UIStatisticsChart, UISteps, UISwitch, UITable, UITabs, UITag, UIText, UITimePicker, UITimeline, UITimelineItem, UITitle, UITooltip, UITree, UITreeDirectoryTree, UITreeNode, UITypographyLink, UITypographyParagraph, UITypographyText, UIUpload, UIUploadDragger, createFillFunction, registerIconRenderer, useChartColors, useUIForm, useUIMessage, useUINotification, useUITheme };
|
|
2060
|
+
export { UIAccordion, UIAlert, UIAreaChart, UIAvatar, UIAvatarGroup, UIBadge, UIBarChart, UIBox, UIBreadcrumb, UIButton, UICard, UICheckbox, UICheckboxGroup, UICol, UIColumnChart, UICopyButton, UIDatePicker, UIDescriptions, UIDescriptionsItem, UIDiffViewer, UIDivider, UIDrawer, UIDropdown, UIDropdownButton, UIEmptyState, UIErrorState, UIFlex, UIForm, UIFormItem, UIFormList, UIHeader, UIIcon, UIIconButton, UIInput, UIInputNumber, UIInputPassword, UIInputSearch, UIInputTextArea, UIJsonViewer, UILineChart, UIList, UIListItem, UIListItemMeta, UIMarkdownViewer, UIMenu, UIMessage, UIMetricCard, UIModal, UIModalConfirm, UIModalError, UIModalInfo, UIModalSuccess, UIModalWarning, UINotification, UIPage, UIPageHeader, UIPageSection, UIPieChart, UIPopconfirm, UIPopover, UIProgress, UIRadio, UIRadioGroup, UIRangePicker, UIResult, UIRow, UISegmented, UISelect, UIShimmerText, UISkeleton, UISkeletonButton, UISkeletonImage, UISkeletonInput, UISkeletonNode, UISkeletonText, UISlider, UISpace, UISpaceCompact, UISpin, UIStack, UIStatistic, UIStatisticCountdown, UIStatisticsChart, UISteps, UISwitch, UITable, UITabs, UITag, UIText, UITimePicker, UITimeline, UITimelineItem, UITitle, UITooltip, UITree, UITreeDirectoryTree, UITreeNode, UITypographyLink, UITypographyParagraph, UITypographyText, UIUpload, UIUploadDragger, createFillFunction, registerIconRenderer, useChartColors, useUIForm, useUIMessage, useUINotification, useUITheme };
|
|
2028
2061
|
//# sourceMappingURL=index.js.map
|
|
2029
2062
|
//# sourceMappingURL=index.js.map
|