@lobehub/ui 1.2.0 → 1.4.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/es/ActionIcon/index.d.ts +10 -5
- package/es/ActionIcon/index.js +15 -7
- package/es/ActionIcon/style.d.ts +4 -1
- package/es/ActionIcon/style.js +5 -3
- package/es/Avatar/index.d.ts +10 -0
- package/es/Avatar/index.js +61 -0
- package/es/ContextMenu/MenuItem/icons.d.ts +4 -0
- package/es/ContextMenu/MenuItem/icons.js +73 -0
- package/es/ContextMenu/MenuItem/index.d.ts +12 -0
- package/es/ContextMenu/MenuItem/index.js +73 -0
- package/es/ContextMenu/MenuItem/style.d.ts +7 -0
- package/es/ContextMenu/MenuItem/style.js +16 -0
- package/es/ContextMenu/index.d.ts +9 -0
- package/es/ContextMenu/index.js +265 -0
- package/es/ContextMenu/style.d.ts +4 -0
- package/es/ContextMenu/style.js +12 -0
- package/es/ContextMenu/types/index.d.ts +5 -0
- package/es/ContextMenu/types/index.js +2 -0
- package/es/ContextMenu/types/menuItem.d.ts +21 -0
- package/es/CopyButton/index.d.ts +34 -0
- package/es/CopyButton/index.js +49 -0
- package/es/DraggablePanel/index.d.ts +10 -4
- package/es/DraggablePanel/index.js +10 -11
- package/es/DraggablePanel/style.js +2 -2
- package/es/EditableText/ControlInput.d.ts +9 -0
- package/es/EditableText/ControlInput.js +88 -0
- package/es/EditableText/index.d.ts +5 -0
- package/es/EditableText/index.js +35 -0
- package/es/Highlighter/SyntaxHighlighter/Prism.d.ts +7 -0
- package/es/Highlighter/SyntaxHighlighter/Prism.js +40 -0
- package/es/Highlighter/SyntaxHighlighter/index.d.ts +5 -0
- package/es/Highlighter/SyntaxHighlighter/index.js +58 -0
- package/es/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
- package/es/Highlighter/SyntaxHighlighter/style.js +15 -0
- package/es/Highlighter/index.d.ts +36 -0
- package/es/Highlighter/index.js +42 -0
- package/es/Highlighter/style.d.ts +5 -0
- package/es/Highlighter/style.js +18 -0
- package/es/Icon/index.d.ts +2 -3
- package/es/Icon/index.js +2 -2
- package/es/List/ListItem/index.d.ts +64 -0
- package/es/List/ListItem/index.js +110 -0
- package/es/List/ListItem/time.d.ts +2 -0
- package/es/List/ListItem/time.js +10 -0
- package/es/List/index.d.ts +5 -0
- package/es/List/index.js +5 -0
- package/es/Logo/Divider.d.ts +3 -3
- package/es/Logo/Divider.js +6 -4
- package/es/Logo/Logo3D.d.ts +3 -3
- package/es/Logo/Logo3D.js +6 -4
- package/es/Logo/LogoFlat.d.ts +3 -3
- package/es/Logo/LogoFlat.js +6 -4
- package/es/Logo/LogoHighContrast.d.ts +3 -3
- package/es/Logo/LogoHighContrast.js +6 -4
- package/es/Logo/LogoText.d.ts +3 -3
- package/es/Logo/LogoText.js +6 -4
- package/es/Logo/index.d.ts +3 -3
- package/es/Logo/index.js +5 -5
- package/es/Logo/style.js +1 -1
- package/es/Markdown/Code.d.ts +3 -0
- package/es/Markdown/Code.js +12 -0
- package/es/Markdown/CodeBlock.d.ts +3 -0
- package/es/Markdown/CodeBlock.js +27 -0
- package/es/Markdown/index.d.ts +13 -0
- package/es/Markdown/index.js +28 -0
- package/es/Markdown/style.d.ts +4 -0
- package/es/Markdown/style.js +12 -0
- package/es/MessageInput/index.d.ts +35 -0
- package/es/MessageInput/index.js +63 -0
- package/es/SearchBar/index.d.ts +5 -0
- package/es/SearchBar/index.js +27 -0
- package/es/SideNav/index.d.ts +6 -6
- package/es/SideNav/index.js +17 -20
- package/es/SideNav/style.d.ts +1 -0
- package/es/SideNav/style.js +8 -0
- package/es/Snippet/index.d.ts +29 -0
- package/es/Snippet/index.js +39 -0
- package/es/Snippet/style.d.ts +1 -0
- package/es/Snippet/style.js +9 -0
- package/es/StroyBook/index.d.ts +3 -4
- package/es/StroyBook/index.js +14 -7
- package/es/StroyBook/style.d.ts +4 -1
- package/es/StroyBook/style.js +7 -5
- package/es/Swatches/index.d.ts +8 -0
- package/es/Swatches/index.js +44 -0
- package/es/TabsNav/index.d.ts +3 -3
- package/es/TabsNav/index.js +4 -4
- package/es/ThemeProvider/GlobalStyle.js +1 -1
- package/es/ThemeProvider/index.d.ts +15 -0
- package/es/ThemeSwitch/index.d.ts +5 -5
- package/es/ThemeSwitch/index.js +5 -9
- package/es/Tooltip/index.d.ts +5 -0
- package/es/Tooltip/index.js +20 -0
- package/es/Tooltip/style.d.ts +3 -0
- package/es/Tooltip/style.js +10 -0
- package/es/hooks/useCopied.d.ts +4 -0
- package/es/hooks/useCopied.js +26 -0
- package/es/hooks/useHighlight.d.ts +36 -0
- package/es/hooks/useHighlight.js +63 -0
- package/es/index.d.ts +12 -0
- package/es/index.js +13 -1
- package/es/styles/theme/base.d.ts +2 -0
- package/es/styles/theme/base.js +15 -0
- package/es/styles/theme/dark.js +6 -14
- package/es/styles/theme/light.js +11 -12
- package/es/types/index.d.ts +14 -5
- package/lib/ActionIcon/index.d.ts +10 -5
- package/lib/ActionIcon/index.js +39 -50
- package/lib/ActionIcon/style.d.ts +4 -1
- package/lib/ActionIcon/style.js +29 -22
- package/lib/Avatar/index.d.ts +10 -0
- package/lib/Avatar/index.js +74 -0
- package/lib/ContextMenu/MenuItem/icons.d.ts +4 -0
- package/lib/ContextMenu/MenuItem/icons.js +100 -0
- package/lib/ContextMenu/MenuItem/index.d.ts +12 -0
- package/lib/ContextMenu/MenuItem/index.js +72 -0
- package/lib/ContextMenu/MenuItem/style.d.ts +7 -0
- package/lib/ContextMenu/MenuItem/style.js +94 -0
- package/lib/ContextMenu/index.d.ts +9 -0
- package/lib/ContextMenu/index.js +254 -0
- package/lib/ContextMenu/style.d.ts +4 -0
- package/lib/ContextMenu/style.js +88 -0
- package/lib/ContextMenu/types/index.d.ts +5 -0
- package/lib/ContextMenu/types/index.js +19 -0
- package/lib/ContextMenu/types/menuItem.d.ts +21 -0
- package/lib/{types/index.js → ContextMenu/types/menuItem.js} +3 -3
- package/lib/CopyButton/index.d.ts +34 -0
- package/lib/CopyButton/index.js +70 -0
- package/lib/DraggablePanel/index.d.ts +10 -4
- package/lib/DraggablePanel/index.js +147 -147
- package/lib/DraggablePanel/style.js +1 -2
- package/lib/EditableText/ControlInput.d.ts +9 -0
- package/lib/EditableText/ControlInput.js +101 -0
- package/lib/EditableText/index.d.ts +5 -0
- package/lib/EditableText/index.js +52 -0
- package/lib/Highlighter/SyntaxHighlighter/Prism.d.ts +7 -0
- package/lib/Highlighter/SyntaxHighlighter/Prism.js +41 -0
- package/lib/Highlighter/SyntaxHighlighter/index.d.ts +5 -0
- package/lib/Highlighter/SyntaxHighlighter/index.js +55 -0
- package/lib/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
- package/lib/Highlighter/SyntaxHighlighter/style.js +58 -0
- package/lib/Highlighter/index.d.ts +36 -0
- package/lib/Highlighter/index.js +62 -0
- package/lib/Highlighter/style.d.ts +5 -0
- package/lib/Highlighter/style.js +107 -0
- package/lib/Icon/index.d.ts +2 -3
- package/lib/Icon/index.js +3 -13
- package/lib/List/ListItem/index.d.ts +64 -0
- package/lib/List/ListItem/index.js +157 -0
- package/lib/List/ListItem/time.d.ts +2 -0
- package/lib/List/ListItem/time.js +50 -0
- package/lib/List/index.d.ts +5 -0
- package/lib/List/index.js +41 -0
- package/lib/Logo/Divider.d.ts +3 -3
- package/lib/Logo/Divider.js +5 -15
- package/lib/Logo/Logo3D.d.ts +3 -3
- package/lib/Logo/Logo3D.js +4 -14
- package/lib/Logo/LogoFlat.d.ts +3 -3
- package/lib/Logo/LogoFlat.js +18 -28
- package/lib/Logo/LogoHighContrast.d.ts +3 -3
- package/lib/Logo/LogoHighContrast.js +4 -14
- package/lib/Logo/LogoText.d.ts +3 -3
- package/lib/Logo/LogoText.js +5 -15
- package/lib/Logo/index.d.ts +3 -3
- package/lib/Logo/index.js +11 -18
- package/lib/Logo/style.js +1 -1
- package/lib/Markdown/Code.d.ts +3 -0
- package/lib/Markdown/Code.js +33 -0
- package/lib/Markdown/CodeBlock.d.ts +3 -0
- package/lib/Markdown/CodeBlock.js +64 -0
- package/lib/Markdown/index.d.ts +13 -0
- package/lib/Markdown/index.js +48 -0
- package/lib/Markdown/style.d.ts +4 -0
- package/lib/Markdown/style.js +64 -0
- package/lib/MessageInput/index.d.ts +35 -0
- package/lib/MessageInput/index.js +58 -0
- package/lib/SearchBar/index.d.ts +5 -0
- package/lib/SearchBar/index.js +42 -0
- package/lib/SideNav/index.d.ts +6 -6
- package/lib/SideNav/index.js +7 -31
- package/lib/SideNav/style.d.ts +1 -0
- package/lib/SideNav/style.js +46 -0
- package/lib/Snippet/index.d.ts +29 -0
- package/lib/Snippet/index.js +47 -0
- package/lib/Snippet/style.d.ts +1 -0
- package/lib/Snippet/style.js +71 -0
- package/lib/StroyBook/index.d.ts +3 -4
- package/lib/StroyBook/index.js +20 -13
- package/lib/StroyBook/style.d.ts +4 -1
- package/lib/StroyBook/style.js +49 -43
- package/lib/Swatches/index.d.ts +8 -0
- package/lib/Swatches/index.js +68 -0
- package/lib/TabsNav/index.d.ts +3 -3
- package/lib/TabsNav/index.js +5 -15
- package/lib/ThemeProvider/GlobalStyle.js +7 -5
- package/lib/ThemeProvider/index.d.ts +15 -0
- package/lib/ThemeSwitch/index.d.ts +5 -5
- package/lib/ThemeSwitch/index.js +15 -32
- package/lib/Tooltip/index.d.ts +5 -0
- package/lib/Tooltip/index.js +34 -0
- package/lib/Tooltip/style.d.ts +3 -0
- package/lib/Tooltip/style.js +51 -0
- package/lib/hooks/useCopied.d.ts +4 -0
- package/lib/hooks/useCopied.js +44 -0
- package/lib/hooks/useHighlight.d.ts +36 -0
- package/lib/hooks/useHighlight.js +76 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +38 -0
- package/lib/styles/theme/base.d.ts +2 -0
- package/lib/styles/theme/base.js +43 -0
- package/lib/styles/theme/dark.js +5 -12
- package/lib/styles/theme/light.js +10 -10
- package/lib/types/index.d.ts +14 -5
- package/package.json +14 -4
- package/es/ThemeProvider/token.d.ts +0 -3
- package/es/ThemeProvider/token.js +0 -45
- package/lib/ThemeProvider/token.d.ts +0 -3
- package/lib/ThemeProvider/token.js +0 -73
- /package/es/{types/index.js → ContextMenu/types/menuItem.js} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/EditableText/ControlInput.tsx
|
|
20
|
+
var ControlInput_exports = {};
|
|
21
|
+
__export(ControlInput_exports, {
|
|
22
|
+
ControlInput: () => ControlInput
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ControlInput_exports);
|
|
25
|
+
var import_antd = require("antd");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var ControlInput = (0, import_react.memo)(
|
|
28
|
+
({ value, onChange, onValueChanging, onChangeEnd, ...props }) => {
|
|
29
|
+
const [input, setInput] = (0, import_react.useState)(value || "");
|
|
30
|
+
const inputRef = (0, import_react.useRef)(null);
|
|
31
|
+
const isChineseInput = (0, import_react.useRef)(false);
|
|
32
|
+
const isFocusing = (0, import_react.useRef)(false);
|
|
33
|
+
const updateValue = (0, import_react.useCallback)(() => {
|
|
34
|
+
onChange == null ? void 0 : onChange(input);
|
|
35
|
+
}, [input]);
|
|
36
|
+
(0, import_react.useEffect)(() => {
|
|
37
|
+
if (typeof value !== "undefined")
|
|
38
|
+
setInput(value);
|
|
39
|
+
}, [value]);
|
|
40
|
+
return /* @__PURE__ */ React.createElement(
|
|
41
|
+
import_antd.Input,
|
|
42
|
+
{
|
|
43
|
+
ref: inputRef,
|
|
44
|
+
...props,
|
|
45
|
+
value: input,
|
|
46
|
+
onCompositionStart: () => {
|
|
47
|
+
isChineseInput.current = true;
|
|
48
|
+
},
|
|
49
|
+
onCompositionEnd: () => {
|
|
50
|
+
isChineseInput.current = false;
|
|
51
|
+
},
|
|
52
|
+
onFocus: () => {
|
|
53
|
+
isFocusing.current = true;
|
|
54
|
+
},
|
|
55
|
+
onBlur: () => {
|
|
56
|
+
isFocusing.current = false;
|
|
57
|
+
onChangeEnd == null ? void 0 : onChangeEnd(input);
|
|
58
|
+
},
|
|
59
|
+
onChange: (e) => {
|
|
60
|
+
setInput(e.target.value);
|
|
61
|
+
onValueChanging == null ? void 0 : onValueChanging(e.target.value);
|
|
62
|
+
},
|
|
63
|
+
onPressEnter: (e) => {
|
|
64
|
+
if (!e.shiftKey && !isChineseInput.current) {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
updateValue();
|
|
67
|
+
isFocusing.current = false;
|
|
68
|
+
onChangeEnd == null ? void 0 : onChangeEnd(input);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
suffix: value === input ? /* @__PURE__ */ React.createElement("span", null) : /* @__PURE__ */ React.createElement(import_antd.ConfigProvider, { theme: { token: { fontSize: 14 } } }, /* @__PURE__ */ React.createElement(
|
|
72
|
+
import_antd.Button,
|
|
73
|
+
{
|
|
74
|
+
type: "link",
|
|
75
|
+
size: "small",
|
|
76
|
+
onClick: () => {
|
|
77
|
+
setInput(value);
|
|
78
|
+
},
|
|
79
|
+
style: { padding: 0 }
|
|
80
|
+
},
|
|
81
|
+
"重置"
|
|
82
|
+
), /* @__PURE__ */ React.createElement(
|
|
83
|
+
import_antd.Button,
|
|
84
|
+
{
|
|
85
|
+
type: "link",
|
|
86
|
+
size: "small",
|
|
87
|
+
style: { padding: 0 },
|
|
88
|
+
onClick: () => {
|
|
89
|
+
updateValue();
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"保存 ↵"
|
|
93
|
+
))
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
ControlInput
|
|
101
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/EditableText/index.tsx
|
|
20
|
+
var EditableText_exports = {};
|
|
21
|
+
__export(EditableText_exports, {
|
|
22
|
+
default: () => EditableText_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(EditableText_exports);
|
|
25
|
+
var import_icons = require("@ant-design/icons");
|
|
26
|
+
var import_antd = require("antd");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_react_layout_kit = require("react-layout-kit");
|
|
29
|
+
var import_ControlInput = require("./ControlInput");
|
|
30
|
+
var EditableText = (0, import_react.memo)(({ value, onChange }) => {
|
|
31
|
+
const [edited, setEdited] = (0, import_react.useState)(false);
|
|
32
|
+
return edited ? /* @__PURE__ */ React.createElement(
|
|
33
|
+
import_ControlInput.ControlInput,
|
|
34
|
+
{
|
|
35
|
+
value,
|
|
36
|
+
onChangeEnd: () => {
|
|
37
|
+
setEdited(false);
|
|
38
|
+
},
|
|
39
|
+
onChange
|
|
40
|
+
}
|
|
41
|
+
) : /* @__PURE__ */ React.createElement(import_react_layout_kit.Flexbox, { horizontal: true, gap: 8 }, value, /* @__PURE__ */ React.createElement(import_antd.Tooltip, { title: "编辑" }, /* @__PURE__ */ React.createElement(
|
|
42
|
+
import_icons.EditOutlined,
|
|
43
|
+
{
|
|
44
|
+
onClick: () => {
|
|
45
|
+
setEdited(!edited);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
)));
|
|
49
|
+
});
|
|
50
|
+
var EditableText_default = EditableText;
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Highlighter/SyntaxHighlighter/Prism.tsx
|
|
20
|
+
var Prism_exports = {};
|
|
21
|
+
__export(Prism_exports, {
|
|
22
|
+
Prism: () => Prism
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Prism_exports);
|
|
25
|
+
var import_prism_react_renderer = require("prism-react-renderer");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var Prism = (0, import_react.memo)(({ children, language, isDarkMode }) => {
|
|
28
|
+
return /* @__PURE__ */ React.createElement(
|
|
29
|
+
import_prism_react_renderer.Highlight,
|
|
30
|
+
{
|
|
31
|
+
theme: isDarkMode ? import_prism_react_renderer.themes.jettwaveDark : import_prism_react_renderer.themes.jettwaveLight,
|
|
32
|
+
code: children,
|
|
33
|
+
language
|
|
34
|
+
},
|
|
35
|
+
({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React.createElement("pre", { className, style }, tokens.map((line, i) => /* @__PURE__ */ React.createElement("div", { key: i, ...getLineProps({ line, key: i }) }, line.map((token, key) => /* @__PURE__ */ React.createElement("span", { key: i, ...getTokenProps({ token, key }) })))))
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
Prism
|
|
41
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { HighlighterProps } from '../index';
|
|
3
|
+
export declare type SyntaxHighlighterProps = Pick<HighlighterProps, 'language' | 'children' | 'theme'>;
|
|
4
|
+
declare const SyntaxHighlighter: import("react").NamedExoticComponent<SyntaxHighlighterProps>;
|
|
5
|
+
export default SyntaxHighlighter;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Highlighter/SyntaxHighlighter/index.tsx
|
|
20
|
+
var SyntaxHighlighter_exports = {};
|
|
21
|
+
__export(SyntaxHighlighter_exports, {
|
|
22
|
+
default: () => SyntaxHighlighter_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(SyntaxHighlighter_exports);
|
|
25
|
+
var import_useHighlight = require("../../hooks/useHighlight");
|
|
26
|
+
var import_icons = require("@ant-design/icons");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_react_layout_kit = require("react-layout-kit");
|
|
29
|
+
var import_shallow = require("zustand/shallow");
|
|
30
|
+
var import_Prism = require("./Prism");
|
|
31
|
+
var import_antd_style = require("antd-style");
|
|
32
|
+
var import_style = require("./style");
|
|
33
|
+
var SyntaxHighlighter = (0, import_react.memo)(
|
|
34
|
+
({ children, language, theme: appearance }) => {
|
|
35
|
+
const { styles, theme } = (0, import_style.useStyles)();
|
|
36
|
+
const { isDarkMode } = (0, import_antd_style.useThemeMode)();
|
|
37
|
+
const isDarkTheme = appearance ? appearance === "dark" : isDarkMode;
|
|
38
|
+
const [codeToHtml, isLoading] = (0, import_useHighlight.useHighlight)((s) => [s.codeToHtml, !s.highlighter], import_shallow.shallow);
|
|
39
|
+
(0, import_react.useEffect)(() => {
|
|
40
|
+
import_useHighlight.useHighlight.getState().initHighlighter();
|
|
41
|
+
}, []);
|
|
42
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, isLoading ? /* @__PURE__ */ React.createElement("div", { className: styles.prism }, /* @__PURE__ */ React.createElement(import_Prism.Prism, { language, isDarkMode: isDarkTheme }, children)) : /* @__PURE__ */ React.createElement(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
dangerouslySetInnerHTML: {
|
|
46
|
+
__html: codeToHtml(children, language, isDarkTheme) || ""
|
|
47
|
+
},
|
|
48
|
+
className: styles.shiki
|
|
49
|
+
}
|
|
50
|
+
), isLoading && /* @__PURE__ */ React.createElement(import_react_layout_kit.Center, { horizontal: true, gap: 8, className: styles.loading }, /* @__PURE__ */ React.createElement(import_icons.Loading3QuartersOutlined, { spin: true, style: { color: theme.colorTextTertiary } }), "shiki rendering..."));
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
var SyntaxHighlighter_default = SyntaxHighlighter;
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Highlighter/SyntaxHighlighter/style.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
useStyles: () => useStyles
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(style_exports);
|
|
25
|
+
var import_antd_style = require("antd-style");
|
|
26
|
+
var useStyles = (0, import_antd_style.createStyles)(({ css, token, cx, prefixCls }) => {
|
|
27
|
+
const prefix = `${prefixCls}-highlighter`;
|
|
28
|
+
return {
|
|
29
|
+
shiki: cx(
|
|
30
|
+
`${prefix}-shiki`,
|
|
31
|
+
css`
|
|
32
|
+
.shiki {
|
|
33
|
+
overflow-x: scroll;
|
|
34
|
+
background: none !important;
|
|
35
|
+
}
|
|
36
|
+
`
|
|
37
|
+
),
|
|
38
|
+
prism: css`
|
|
39
|
+
pre {
|
|
40
|
+
overflow-x: scroll;
|
|
41
|
+
font-family: ${token.fontFamilyCode} !important;
|
|
42
|
+
}
|
|
43
|
+
`,
|
|
44
|
+
loading: css`
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
right: 0;
|
|
48
|
+
color: ${token.colorTextTertiary};
|
|
49
|
+
padding: 4px 8px;
|
|
50
|
+
backdrop-filter: saturate(180%) blur(10px);
|
|
51
|
+
border-radius: ${token.borderRadiusSM};
|
|
52
|
+
`
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
useStyles
|
|
58
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DivProps } from "../types";
|
|
3
|
+
import SyntaxHighlighter, { type SyntaxHighlighterProps } from './SyntaxHighlighter';
|
|
4
|
+
export { SyntaxHighlighter, SyntaxHighlighterProps };
|
|
5
|
+
export interface HighlighterProps extends DivProps {
|
|
6
|
+
/**
|
|
7
|
+
* @description The code content to be highlighted
|
|
8
|
+
*/
|
|
9
|
+
children: string;
|
|
10
|
+
/**
|
|
11
|
+
* @description The language of the code content
|
|
12
|
+
*/
|
|
13
|
+
language: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description Whether to show language tag
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
showLanguage?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description Whether to show the copy button
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
copyable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @description The theme of the code block
|
|
26
|
+
* @default 'light'
|
|
27
|
+
*/
|
|
28
|
+
theme?: 'dark' | 'light';
|
|
29
|
+
/**
|
|
30
|
+
* @description The type of the code block
|
|
31
|
+
* @default 'block'
|
|
32
|
+
*/
|
|
33
|
+
type?: 'ghost' | 'block' | 'prue';
|
|
34
|
+
}
|
|
35
|
+
export declare const Highlighter: import("react").NamedExoticComponent<HighlighterProps>;
|
|
36
|
+
export default Highlighter;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Highlighter/index.tsx
|
|
30
|
+
var Highlighter_exports = {};
|
|
31
|
+
__export(Highlighter_exports, {
|
|
32
|
+
Highlighter: () => Highlighter,
|
|
33
|
+
SyntaxHighlighter: () => import_SyntaxHighlighter.default,
|
|
34
|
+
default: () => Highlighter_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Highlighter_exports);
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_CopyButton = __toESM(require("../CopyButton"));
|
|
39
|
+
var import_SyntaxHighlighter = __toESM(require("./SyntaxHighlighter"));
|
|
40
|
+
var import_style = require("./style");
|
|
41
|
+
var Highlighter = (0, import_react.memo)(
|
|
42
|
+
({
|
|
43
|
+
children,
|
|
44
|
+
language,
|
|
45
|
+
className,
|
|
46
|
+
style,
|
|
47
|
+
theme,
|
|
48
|
+
copyable = true,
|
|
49
|
+
showLanguage = true,
|
|
50
|
+
type = "block"
|
|
51
|
+
}) => {
|
|
52
|
+
const { styles, cx } = (0, import_style.useStyles)(type);
|
|
53
|
+
const container = cx(styles.container, className);
|
|
54
|
+
return /* @__PURE__ */ React.createElement("div", { "data-code-type": "highlighter", className: container, style }, copyable && /* @__PURE__ */ React.createElement(import_CopyButton.default, { placement: "left", content: children, className: styles.button }), showLanguage && language && /* @__PURE__ */ React.createElement("div", { className: styles.lang }, language.toLowerCase()), /* @__PURE__ */ React.createElement(import_SyntaxHighlighter.default, { theme, language: language == null ? void 0 : language.toLowerCase() }, children.trim()));
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
var Highlighter_default = Highlighter;
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
Highlighter,
|
|
61
|
+
SyntaxHighlighter
|
|
62
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Highlighter/style.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
useStyles: () => useStyles
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(style_exports);
|
|
25
|
+
var import_antd_style = require("antd-style");
|
|
26
|
+
var import_polished = require("polished");
|
|
27
|
+
var useStyles = (0, import_antd_style.createStyles)(
|
|
28
|
+
({ token, css, cx, prefixCls }, type) => {
|
|
29
|
+
const prefix = `${prefixCls}-highlighter`;
|
|
30
|
+
const buttonHoverCls = `${prefix}-hover-btn`;
|
|
31
|
+
const langHoverCls = `${prefix}-hover-lang`;
|
|
32
|
+
return {
|
|
33
|
+
container: cx(
|
|
34
|
+
prefix,
|
|
35
|
+
css`
|
|
36
|
+
overflow: auto;
|
|
37
|
+
position: relative;
|
|
38
|
+
transition: background-color 100ms ${token.motionEaseOut};
|
|
39
|
+
background-color: ${type === "block" ? (0, import_polished.rgba)(token.colorBgElevated, 0.6) : "transparent"};
|
|
40
|
+
border-radius: ${token.borderRadius}px;
|
|
41
|
+
|
|
42
|
+
${type === "ghost" && css`
|
|
43
|
+
border: 1px solid ${token.colorBorder};
|
|
44
|
+
`}
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
background-color: ${type === "prue" ? "transparent" : token.colorFillTertiary};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.prism-code {
|
|
51
|
+
background: none !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
pre {
|
|
55
|
+
margin: 0 !important;
|
|
56
|
+
padding: ${type === "prue" ? 0 : `16px 24px`} !important;
|
|
57
|
+
background: none !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
code {
|
|
61
|
+
background: transparent !important;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
.${buttonHoverCls} {
|
|
66
|
+
opacity: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.${langHoverCls} {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`
|
|
74
|
+
),
|
|
75
|
+
button: cx(
|
|
76
|
+
buttonHoverCls,
|
|
77
|
+
css`
|
|
78
|
+
position: absolute;
|
|
79
|
+
z-index: 51;
|
|
80
|
+
top: 8px;
|
|
81
|
+
right: 8px;
|
|
82
|
+
|
|
83
|
+
opacity: 0;
|
|
84
|
+
`
|
|
85
|
+
),
|
|
86
|
+
lang: cx(
|
|
87
|
+
langHoverCls,
|
|
88
|
+
css`
|
|
89
|
+
position: absolute;
|
|
90
|
+
z-index: 50;
|
|
91
|
+
right: 8px;
|
|
92
|
+
bottom: 8px;
|
|
93
|
+
|
|
94
|
+
color: ${token.colorTextPlaceholder};
|
|
95
|
+
|
|
96
|
+
opacity: 0;
|
|
97
|
+
|
|
98
|
+
transition: opacity 0.1s;
|
|
99
|
+
`
|
|
100
|
+
)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
105
|
+
0 && (module.exports = {
|
|
106
|
+
useStyles
|
|
107
|
+
});
|
package/lib/Icon/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
export declare type IconSize = 'large' | 'normal' | 'small' | {
|
|
5
4
|
fontSize?: number;
|
|
6
5
|
strokeWidth?: number;
|
|
@@ -17,5 +16,5 @@ export interface IconProps extends SvgProps {
|
|
|
17
16
|
*/
|
|
18
17
|
icon: LucideIcon;
|
|
19
18
|
}
|
|
20
|
-
declare const _default:
|
|
19
|
+
declare const _default: import("react").NamedExoticComponent<IconProps>;
|
|
21
20
|
export default _default;
|
package/lib/Icon/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
|
|
29
19
|
// src/Icon/index.tsx
|
|
@@ -32,7 +22,7 @@ __export(Icon_exports, {
|
|
|
32
22
|
default: () => Icon_default
|
|
33
23
|
});
|
|
34
24
|
module.exports = __toCommonJS(Icon_exports);
|
|
35
|
-
var import_react =
|
|
25
|
+
var import_react = require("react");
|
|
36
26
|
var Icon = ({ icon, size = "normal", ...props }) => {
|
|
37
27
|
let fontSize;
|
|
38
28
|
let strokeWidth;
|
|
@@ -52,8 +42,8 @@ var Icon = ({ icon, size = "normal", ...props }) => {
|
|
|
52
42
|
strokeWidth = (size == null ? void 0 : size.strokeWidth) || 2;
|
|
53
43
|
break;
|
|
54
44
|
}
|
|
55
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ React.createElement(SvgIcon, { size: fontSize, strokeWidth, ...props });
|
|
56
46
|
};
|
|
57
|
-
var Icon_default = import_react.
|
|
47
|
+
var Icon_default = (0, import_react.memo)(Icon);
|
|
58
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
59
49
|
0 && (module.exports = {});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 卡片列表项的属性
|
|
4
|
+
*/
|
|
5
|
+
export interface ListItemProps {
|
|
6
|
+
/**
|
|
7
|
+
* 是否处于激活状态
|
|
8
|
+
*/
|
|
9
|
+
active: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 是否处于加载状态
|
|
12
|
+
*/
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 标题
|
|
16
|
+
*/
|
|
17
|
+
title: string;
|
|
18
|
+
/**
|
|
19
|
+
* 描述信息
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 日期时间戳
|
|
24
|
+
*/
|
|
25
|
+
date?: number;
|
|
26
|
+
/**
|
|
27
|
+
* 点击事件回调函数
|
|
28
|
+
*/
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* 鼠标悬停状态变化事件回调函数
|
|
32
|
+
* @param hover - 是否悬停
|
|
33
|
+
*/
|
|
34
|
+
onHoverChange?: (hover: boolean) => void;
|
|
35
|
+
/**
|
|
36
|
+
* 渲染操作区域的 React 节点
|
|
37
|
+
*/
|
|
38
|
+
renderActions?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* 头像的 React 节点
|
|
41
|
+
*/
|
|
42
|
+
avatar?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* 自定义样式类名
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 自定义样式对象
|
|
49
|
+
*/
|
|
50
|
+
style?: CSSProperties;
|
|
51
|
+
/**
|
|
52
|
+
* 是否显示操作区域
|
|
53
|
+
*/
|
|
54
|
+
showAction?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 自定义样式类名对象
|
|
57
|
+
* @property time - 时间的样式类名
|
|
58
|
+
*/
|
|
59
|
+
classNames?: {
|
|
60
|
+
time?: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>;
|
|
64
|
+
export default ListItem;
|