@yuntijs/ui 1.0.0-beta.9 → 1.0.0-beta.90

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.
Files changed (241) hide show
  1. package/es/App/index.d.ts +7 -0
  2. package/es/App/index.js +19 -0
  3. package/es/ButtonGroup/index.d.ts +24 -0
  4. package/es/ButtonGroup/index.js +66 -0
  5. package/es/Card/index.d.ts +1 -0
  6. package/es/Card/index.js +1 -0
  7. package/es/CardList/Item/index.d.ts +4 -0
  8. package/es/CardList/Item/index.js +43 -0
  9. package/es/CardList/Item/style.d.ts +0 -0
  10. package/es/CardList/Item/style.js +0 -0
  11. package/es/CardList/index.d.ts +2 -0
  12. package/es/CardList/index.js +39 -0
  13. package/es/ChatInputArea/desktop/ChatInputArea.d.ts +19 -0
  14. package/es/ChatInputArea/desktop/ChatInputArea.js +72 -0
  15. package/es/ChatInputArea/index.d.ts +6 -0
  16. package/es/ChatInputArea/index.js +6 -0
  17. package/es/ChatItem/components/Actions.d.ts +10 -0
  18. package/es/ChatItem/components/Actions.js +23 -0
  19. package/es/ChatItem/components/MessageContent.d.ts +21 -0
  20. package/es/ChatItem/components/MessageContent.js +59 -0
  21. package/es/ChatItem/index.d.ts +4 -0
  22. package/es/ChatItem/index.js +120 -0
  23. package/es/ChatItem/style.d.ts +25 -0
  24. package/es/ChatItem/style.js +39 -0
  25. package/es/ChatItem/type.d.ts +86 -0
  26. package/es/ChatItem/type.js +1 -0
  27. package/es/CollapseGroup/index.d.ts +4 -0
  28. package/es/CollapseGroup/index.js +23 -0
  29. package/es/CollapseGroup/style.d.ts +3 -0
  30. package/es/CollapseGroup/style.js +11 -0
  31. package/es/ConfigProvider/index.d.ts +3 -0
  32. package/es/ConfigProvider/index.js +17 -11
  33. package/es/Descriptions/index.d.ts +14 -0
  34. package/es/Descriptions/index.js +31 -0
  35. package/es/Descriptions/style.d.ts +4 -0
  36. package/es/Descriptions/style.js +24 -0
  37. package/es/Divider/index.d.ts +38 -0
  38. package/es/Divider/index.js +66 -0
  39. package/es/Divider/style.d.ts +3 -0
  40. package/es/Divider/style.js +12 -0
  41. package/es/DragPanel/index.d.ts +10 -0
  42. package/es/DragPanel/index.js +97 -0
  43. package/es/DragPanel/style.d.ts +7 -0
  44. package/es/DragPanel/style.js +15 -0
  45. package/es/Drawer/index.d.ts +13 -0
  46. package/es/Drawer/index.js +20 -0
  47. package/es/Drawer/style.d.ts +4 -0
  48. package/es/Drawer/style.js +16 -0
  49. package/es/Dropdown/index.d.ts +14 -0
  50. package/es/Dropdown/index.js +59 -0
  51. package/es/Dropdown/style.d.ts +7 -0
  52. package/es/Dropdown/style.js +13 -0
  53. package/es/EditableMessage/index.d.ts +75 -0
  54. package/es/EditableMessage/index.js +99 -0
  55. package/es/Form/collapse-list/index.d.ts +40 -0
  56. package/es/Form/collapse-list/index.js +209 -0
  57. package/es/Form/collapse-list/style.d.ts +5 -0
  58. package/es/Form/collapse-list/style.js +13 -0
  59. package/es/Form/index.d.ts +8 -0
  60. package/es/Form/index.js +5 -0
  61. package/es/FormHelper/autoFocus.d.ts +10 -0
  62. package/es/FormHelper/autoFocus.js +38 -0
  63. package/es/FormHelper/index.d.ts +13 -0
  64. package/es/FormHelper/index.js +41 -0
  65. package/es/Highlighter/FullFeatured.d.ts +18 -0
  66. package/es/Highlighter/FullFeatured.js +102 -0
  67. package/es/Highlighter/SyntaxHighlighter/index.d.ts +7 -0
  68. package/es/Highlighter/SyntaxHighlighter/index.js +51 -0
  69. package/es/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
  70. package/es/Highlighter/SyntaxHighlighter/style.js +16 -0
  71. package/es/Highlighter/index.d.ts +50 -0
  72. package/es/Highlighter/index.js +77 -0
  73. package/es/Highlighter/style.d.ts +9 -0
  74. package/es/Highlighter/style.js +23 -0
  75. package/es/Highlighter/theme.d.ts +1 -0
  76. package/es/Highlighter/theme.js +1661 -0
  77. package/es/JsonViewer/index.d.ts +21 -0
  78. package/es/JsonViewer/index.js +120 -0
  79. package/es/JsonViewer/style.d.ts +7 -0
  80. package/es/JsonViewer/style.js +19 -0
  81. package/es/LogViewer/index.d.ts +10 -0
  82. package/es/LogViewer/index.js +141 -0
  83. package/es/LogViewer/style.d.ts +6 -0
  84. package/es/LogViewer/style.js +16 -0
  85. package/es/LogViewer/types.d.ts +235 -0
  86. package/es/LogViewer/types.js +1 -0
  87. package/es/Mentions/constants.d.ts +6 -0
  88. package/es/Mentions/constants.js +28 -0
  89. package/es/Mentions/hooks.d.ts +20 -0
  90. package/es/Mentions/hooks.js +133 -0
  91. package/es/Mentions/index.d.ts +23 -0
  92. package/es/Mentions/index.js +157 -0
  93. package/es/Mentions/plugins/OnBlurBlockPlugin.d.ts +7 -0
  94. package/es/Mentions/plugins/OnBlurBlockPlugin.js +35 -0
  95. package/es/Mentions/plugins/custom-text/node.d.ts +11 -0
  96. package/es/Mentions/plugins/custom-text/node.js +72 -0
  97. package/es/Mentions/plugins/editable.d.ts +4 -0
  98. package/es/Mentions/plugins/editable.js +13 -0
  99. package/es/Mentions/plugins/mention-node/component.d.ts +6 -0
  100. package/es/Mentions/plugins/mention-node/component.js +64 -0
  101. package/es/Mentions/plugins/mention-node/index.d.ts +9 -0
  102. package/es/Mentions/plugins/mention-node/index.js +32 -0
  103. package/es/Mentions/plugins/mention-node/node.d.ts +22 -0
  104. package/es/Mentions/plugins/mention-node/node.js +100 -0
  105. package/es/Mentions/plugins/mention-node/replacement.d.ts +5 -0
  106. package/es/Mentions/plugins/mention-node/replacement.js +43 -0
  107. package/es/Mentions/plugins/mention-node/style.d.ts +8 -0
  108. package/es/Mentions/plugins/mention-node/style.js +47 -0
  109. package/es/Mentions/plugins/mention-node/utils.d.ts +4 -0
  110. package/es/Mentions/plugins/mention-node/utils.js +10 -0
  111. package/es/Mentions/plugins/mention-picker/hooks.d.ts +5 -0
  112. package/es/Mentions/plugins/mention-picker/hooks.js +65 -0
  113. package/es/Mentions/plugins/mention-picker/index.d.ts +39 -0
  114. package/es/Mentions/plugins/mention-picker/index.js +137 -0
  115. package/es/Mentions/plugins/mention-picker/menu-item.d.ts +12 -0
  116. package/es/Mentions/plugins/mention-picker/menu-item.js +73 -0
  117. package/es/Mentions/plugins/mention-picker/menu.d.ts +10 -0
  118. package/es/Mentions/plugins/mention-picker/menu.js +31 -0
  119. package/es/Mentions/plugins/mention-picker/style.d.ts +11 -0
  120. package/es/Mentions/plugins/mention-picker/style.js +19 -0
  121. package/es/Mentions/plugins/mention-picker/utils.d.ts +31 -0
  122. package/es/Mentions/plugins/mention-picker/utils.js +66 -0
  123. package/es/Mentions/provider.d.ts +12 -0
  124. package/es/Mentions/provider.js +15 -0
  125. package/es/Mentions/style.d.ts +11 -0
  126. package/es/Mentions/style.js +22 -0
  127. package/es/Mentions/types.d.ts +12 -0
  128. package/es/Mentions/types.js +1 -0
  129. package/es/Mentions/utils.d.ts +9 -0
  130. package/es/Mentions/utils.js +95 -0
  131. package/es/Modal/index.d.ts +19 -0
  132. package/es/Modal/index.js +36 -0
  133. package/es/Modal/style.d.ts +4 -0
  134. package/es/Modal/style.js +17 -0
  135. package/es/MonacoEditor/base/controller.d.ts +17 -0
  136. package/es/MonacoEditor/base/controller.js +49 -0
  137. package/es/MonacoEditor/base/helper.d.ts +65 -0
  138. package/es/MonacoEditor/base/helper.js +324 -0
  139. package/es/MonacoEditor/base/index.d.ts +39 -0
  140. package/es/MonacoEditor/base/index.js +238 -0
  141. package/es/MonacoEditor/base/monaco.d.ts +6 -0
  142. package/es/MonacoEditor/base/monaco.js +64 -0
  143. package/es/MonacoEditor/{style.d.ts → base/style.d.ts} +4 -1
  144. package/es/MonacoEditor/base/style.js +43 -0
  145. package/es/MonacoEditor/index.d.ts +5 -4
  146. package/es/MonacoEditor/index.js +26 -62
  147. package/es/Page/Breadcrumb/index.d.ts +9 -0
  148. package/es/Page/Breadcrumb/index.js +56 -0
  149. package/es/Page/Content/index.d.ts +4 -0
  150. package/es/Page/Content/index.js +59 -0
  151. package/es/Page/Content/style.d.ts +3 -0
  152. package/es/Page/Content/style.js +12 -0
  153. package/es/Page/Footer/index.d.ts +2 -0
  154. package/es/Page/Footer/index.js +6 -0
  155. package/es/Page/Header/Icon.d.ts +17 -0
  156. package/es/Page/Header/Icon.js +42 -0
  157. package/es/Page/Header/index.d.ts +43 -0
  158. package/es/Page/Header/index.js +202 -0
  159. package/es/Page/Header/style.d.ts +12 -0
  160. package/es/Page/Header/style.js +21 -0
  161. package/es/Page/Page.d.ts +9 -0
  162. package/es/Page/Page.js +49 -0
  163. package/es/Page/PageContext.d.ts +15 -0
  164. package/es/Page/PageContext.js +21 -0
  165. package/es/Page/Title/index.d.ts +5 -0
  166. package/es/Page/Title/index.js +18 -0
  167. package/es/Page/Title/style.d.ts +3 -0
  168. package/es/Page/Title/style.js +10 -0
  169. package/es/Page/index.d.ts +18 -0
  170. package/es/Page/index.js +15 -0
  171. package/es/Page/style.d.ts +3 -0
  172. package/es/Page/style.js +10 -0
  173. package/es/ProCard/Card/index.d.ts +6 -0
  174. package/es/ProCard/Card/index.js +25 -0
  175. package/es/ProCard/Card/style.d.ts +7 -0
  176. package/es/ProCard/Card/style.js +15 -0
  177. package/es/ProCard/Content/index.d.ts +4 -0
  178. package/es/ProCard/Content/index.js +24 -0
  179. package/es/ProCard/Content/style.d.ts +3 -0
  180. package/es/ProCard/Content/style.js +10 -0
  181. package/es/ProCard/Descriptions/index.d.ts +4 -0
  182. package/es/ProCard/Descriptions/index.js +28 -0
  183. package/es/ProCard/Descriptions/style.d.ts +3 -0
  184. package/es/ProCard/Descriptions/style.js +12 -0
  185. package/es/ProCard/Header/index.d.ts +15 -0
  186. package/es/ProCard/Header/index.js +86 -0
  187. package/es/ProCard/Header/style.d.ts +12 -0
  188. package/es/ProCard/Header/style.js +21 -0
  189. package/es/ProCard/index.d.ts +13 -0
  190. package/es/ProCard/index.js +8 -0
  191. package/es/SelectCard/index.d.ts +33 -0
  192. package/es/SelectCard/index.js +132 -0
  193. package/es/SelectCard/style.d.ts +10 -0
  194. package/es/SelectCard/style.js +42 -0
  195. package/es/SliderInput/index.js +2 -2
  196. package/es/Status/index.d.ts +7 -0
  197. package/es/Status/index.js +39 -0
  198. package/es/Status/style.d.ts +4 -0
  199. package/es/Status/style.js +14 -0
  200. package/es/Table/collapse/index.d.ts +9 -0
  201. package/es/Table/collapse/index.js +39 -0
  202. package/es/Table/collapse/style.d.ts +3 -0
  203. package/es/Table/collapse/style.js +11 -0
  204. package/es/Table/index.d.ts +20 -0
  205. package/es/Table/index.js +56 -0
  206. package/es/Typography/index.d.ts +32 -0
  207. package/es/Typography/index.js +77 -0
  208. package/es/WaveformIcon/index.d.ts +9 -0
  209. package/es/WaveformIcon/index.js +51 -0
  210. package/es/hooks/languageMap.d.ts +1 -0
  211. package/es/hooks/languageMap.js +1 -0
  212. package/es/hooks/useHighlight.d.ts +5 -0
  213. package/es/hooks/useHighlight.js +78 -0
  214. package/es/index.d.ts +38 -3
  215. package/es/index.js +48 -3
  216. package/es/notification/index.d.ts +24 -0
  217. package/es/notification/index.js +237 -0
  218. package/es/notification/style.d.ts +2 -0
  219. package/es/notification/style.js +28 -0
  220. package/es/styles/colors/colors.d.ts +39 -0
  221. package/es/styles/colors/colors.js +86 -0
  222. package/es/styles/colors/generateColorPalette.d.ts +11 -0
  223. package/es/styles/colors/generateColorPalette.js +31 -0
  224. package/es/styles/colors/neutralColors.d.ts +9 -0
  225. package/es/styles/colors/neutralColors.js +32 -0
  226. package/es/styles/index.d.ts +4 -0
  227. package/es/styles/index.js +4 -0
  228. package/es/useSpeechSynthes/const/polyfill.d.ts +3 -0
  229. package/es/useSpeechSynthes/const/polyfill.js +21 -0
  230. package/es/useSpeechSynthes/index.d.ts +13 -0
  231. package/es/useSpeechSynthes/index.js +69 -0
  232. package/es/utils/constants.d.ts +1 -0
  233. package/es/utils/constants.js +1 -0
  234. package/es/utils/tools.d.ts +1 -0
  235. package/es/utils/tools.js +1 -0
  236. package/package.json +31 -9
  237. package/umd/index.min.css +2 -0
  238. package/umd/index.min.css.map +1 -0
  239. package/umd/index.min.js +1 -1
  240. package/umd/index.min.js.map +1 -1
  241. package/es/MonacoEditor/style.js +0 -24
@@ -0,0 +1,86 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["className", "icon", "title", "description", "extra", "divider"],
4
+ _excluded2 = ["className", "shape", "size"],
5
+ _excluded3 = ["children"];
6
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ import { Icon } from '@lobehub/ui';
9
+ import { Avatar, Button, Dropdown, Flex } from 'antd';
10
+ import { EllipsisVertical } from 'lucide-react';
11
+ import React from 'react';
12
+ import Typography from "../../Typography";
13
+ import { useStyles } from "./style";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ var Paragraph = Typography.Paragraph;
17
+ export var ProCardHeader = function ProCardHeader(props) {
18
+ var className = props.className,
19
+ icon = props.icon,
20
+ title = props.title,
21
+ description = props.description,
22
+ extra = props.extra,
23
+ divider = props.divider,
24
+ otherProps = _objectWithoutProperties(props, _excluded);
25
+ var _useStyles = useStyles({
26
+ divider: divider,
27
+ iconBg: !(icon !== null && icon !== void 0 && icon.src)
28
+ }),
29
+ styles = _useStyles.styles,
30
+ cx = _useStyles.cx;
31
+ var _ref = icon || {},
32
+ iconClassName = _ref.className,
33
+ _ref$shape = _ref.shape,
34
+ shape = _ref$shape === void 0 ? 'square' : _ref$shape,
35
+ _ref$size = _ref.size,
36
+ size = _ref$size === void 0 ? 72 : _ref$size,
37
+ otherIconProps = _objectWithoutProperties(_ref, _excluded2);
38
+ var _ref2 = extra || {},
39
+ extraChildren = _ref2.children,
40
+ otherExtraProps = _objectWithoutProperties(_ref2, _excluded3);
41
+ return /*#__PURE__*/_jsxs(Flex, _objectSpread(_objectSpread({
42
+ className: cx(styles.root, className),
43
+ gap: 20
44
+ }, otherProps), {}, {
45
+ children: [icon && /*#__PURE__*/_jsx(Flex, {
46
+ children: /*#__PURE__*/_jsx(Avatar, _objectSpread({
47
+ className: cx(styles.icon, iconClassName),
48
+ shape: shape,
49
+ size: size
50
+ }, otherIconProps))
51
+ }), /*#__PURE__*/_jsxs(Flex, {
52
+ flex: "1",
53
+ vertical: true,
54
+ children: [/*#__PURE__*/_jsxs(Flex, {
55
+ className: styles.titleBox,
56
+ gap: 4,
57
+ children: [/*#__PURE__*/_jsx("div", {
58
+ className: styles.title,
59
+ children: title
60
+ }), extra && /*#__PURE__*/_jsx(Flex, {
61
+ align: "flex-start",
62
+ className: styles.extra,
63
+ justify: "flex-end",
64
+ onClick: function onClick(e) {
65
+ return e.stopPropagation();
66
+ },
67
+ children: /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({}, otherExtraProps), {}, {
68
+ children: extraChildren || /*#__PURE__*/_jsx(Button, {
69
+ icon: /*#__PURE__*/_jsx(Icon, {
70
+ icon: EllipsisVertical
71
+ }),
72
+ size: "small",
73
+ type: "text"
74
+ })
75
+ }))
76
+ })]
77
+ }), description && /*#__PURE__*/_jsx(Paragraph, {
78
+ className: styles.description,
79
+ ellipsis: {
80
+ rows: 2
81
+ },
82
+ children: description
83
+ })]
84
+ })]
85
+ }));
86
+ };
@@ -0,0 +1,12 @@
1
+ export declare const useStyles: (props?: {
2
+ divider?: boolean | undefined;
3
+ iconBg?: boolean | undefined;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
5
+ root: import("antd-style").SerializedStyles;
6
+ icon: import("antd-style").SerializedStyles;
7
+ titleBox: import("antd-style").SerializedStyles;
8
+ title: import("antd-style").SerializedStyles;
9
+ description: import("antd-style").SerializedStyles;
10
+ extra: import("antd-style").SerializedStyles;
11
+ rightButtons: import("antd-style").SerializedStyles;
12
+ }>;
@@ -0,0 +1,21 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref, _ref2) {
5
+ var css = _ref.css,
6
+ token = _ref.token,
7
+ prefixCls = _ref.prefixCls;
8
+ var _ref2$divider = _ref2.divider,
9
+ divider = _ref2$divider === void 0 ? true : _ref2$divider,
10
+ _ref2$iconBg = _ref2.iconBg,
11
+ iconBg = _ref2$iconBg === void 0 ? true : _ref2$iconBg;
12
+ return {
13
+ root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 20px ", "px 24px;\n ", "\n "])), divider ? 20 : 0, divider && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n "])), token.colorSplit)),
14
+ icon: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.", "-avatar {\n color: ", ";\n ", "\n &.", "-avatar-square {\n border-radius: 10px;\n }\n .anticon {\n font-size: 40px;\n }\n }\n "])), prefixCls, token.colorPrimary, iconBg && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), token.colorBgLayout), prefixCls),
15
+ titleBox: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-right: 4px;\n margin-bottom: ", "px;\n "])), token.marginXXS),
16
+ title: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: inline-block;\n flex: 1;\n\n width: 100px;\n\n font-size: 16px;\n font-weight: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.fontWeightStrong),
17
+ description: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 4px;\n &.", "-typography {\n margin-bottom: 0 !important;\n font-size: 12px;\n color: ", ";\n }\n "])), prefixCls, token.colorTextSecondary),
18
+ extra: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-top: -4px;\n "]))),
19
+ rightButtons: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n justify-content: flex-end;\n "])))
20
+ };
21
+ });
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { ProCardContent } from './Content';
3
+ import { ProCardDescriptions } from './Descriptions';
4
+ import { ProCardHeader } from './Header';
5
+ export type { ProCardProps } from './Card';
6
+ export type { ProCardContentProps } from './Content';
7
+ export type { ProCardDescriptionsProps } from './Descriptions';
8
+ export type { ProCardHeaderProps } from './Header';
9
+ export declare const ProCard: import("react").FC<import("./Card").ProCardProps> & {
10
+ Header: typeof ProCardHeader;
11
+ Descriptions: typeof ProCardDescriptions;
12
+ Content: typeof ProCardContent;
13
+ };
@@ -0,0 +1,8 @@
1
+ import { ProCard as InternalProCard } from "./Card";
2
+ import { ProCardContent } from "./Content";
3
+ import { ProCardDescriptions } from "./Descriptions";
4
+ import { ProCardHeader } from "./Header";
5
+ export var ProCard = InternalProCard;
6
+ ProCard.Header = ProCardHeader;
7
+ ProCard.Content = ProCardContent;
8
+ ProCard.Descriptions = ProCardDescriptions;
@@ -0,0 +1,33 @@
1
+ import { SelectProps } from 'antd';
2
+ import React from 'react';
3
+ type RawValue = string | number;
4
+ type Value = RawValue | RawValue[];
5
+ export interface SelectCardOption {
6
+ value: RawValue;
7
+ img?: React.ReactNode;
8
+ icon?: React.ReactNode;
9
+ iconStyle?: React.CSSProperties;
10
+ label?: React.ReactNode;
11
+ description?: React.ReactNode;
12
+ style?: React.CSSProperties;
13
+ }
14
+ export interface SelectCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue' | 'onChange'> {
15
+ defaultValue?: Value;
16
+ value?: Value;
17
+ onChange?: (value: Value) => void;
18
+ multiple?: boolean;
19
+ disabled?: boolean;
20
+ options: SelectCardOption[];
21
+ size?: SelectProps['size'];
22
+ optionRender?: (Option: React.ReactNode, option: SelectCardOption, index: number) => React.ReactNode;
23
+ classNames?: {
24
+ card?: string;
25
+ icon?: string;
26
+ };
27
+ styles?: {
28
+ card?: React.CSSProperties;
29
+ icon?: React.CSSProperties;
30
+ };
31
+ }
32
+ export declare const SelectCard: React.ForwardRefExoticComponent<SelectCardProps & React.RefAttributes<HTMLDivElement>>;
33
+ export {};
@@ -0,0 +1,132 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
+ var _excluded = ["defaultValue", "value", "onChange", "multiple", "disabled", "options", "classNames", "styles", "size", "optionRender"];
6
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ import { Icon } from '@lobehub/ui';
9
+ import { Avatar, Flex, Typography } from 'antd';
10
+ import { Check } from 'lucide-react';
11
+ import { useMergedState } from 'rc-util';
12
+ import React, { useCallback, useMemo } from 'react';
13
+ import { getNumberBySize, useStyles } from "./style";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ var Text = Typography.Text,
17
+ Paragraph = Typography.Paragraph;
18
+ export var SelectCard = /*#__PURE__*/React.forwardRef(function (props, ref) {
19
+ var defaultValue = props.defaultValue,
20
+ value = props.value,
21
+ onChange = props.onChange,
22
+ _props$multiple = props.multiple,
23
+ multiple = _props$multiple === void 0 ? false : _props$multiple,
24
+ _props$disabled = props.disabled,
25
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
26
+ _props$options = props.options,
27
+ options = _props$options === void 0 ? [] : _props$options,
28
+ classNames = props.classNames,
29
+ stylesFromProps = props.styles,
30
+ _props$size = props.size,
31
+ size = _props$size === void 0 ? 'middle' : _props$size,
32
+ optionRender = props.optionRender,
33
+ otherProps = _objectWithoutProperties(props, _excluded);
34
+ var isImg = useMemo(function () {
35
+ return options.some(function (o) {
36
+ return !!o.img || !!o.icon;
37
+ });
38
+ }, [options]);
39
+ var _useStyles = useStyles({
40
+ disabled: disabled,
41
+ size: size
42
+ }),
43
+ cx = _useStyles.cx,
44
+ styles = _useStyles.styles;
45
+ var _useMemo = useMemo(function () {
46
+ return getNumberBySize(size);
47
+ }, [size]),
48
+ imgHeight = _useMemo.imgHeight;
49
+ var formatValue = useCallback(function (v) {
50
+ if (!multiple) {
51
+ return v;
52
+ }
53
+ if (Array.isArray(v)) {
54
+ return v;
55
+ }
56
+ return v === undefined ? [] : [v];
57
+ }, [multiple]);
58
+ var _useMergedState = useMergedState(formatValue(defaultValue), {
59
+ defaultValue: formatValue(defaultValue),
60
+ value: value,
61
+ onChange: onChange
62
+ }),
63
+ _useMergedState2 = _slicedToArray(_useMergedState, 2),
64
+ currentValue = _useMergedState2[0],
65
+ setCurrentValue = _useMergedState2[1];
66
+ var onSelect = useCallback(function (v) {
67
+ if (disabled) {
68
+ return;
69
+ }
70
+ if (!multiple) {
71
+ setCurrentValue(v);
72
+ return;
73
+ }
74
+ if (currentValue.includes(v)) {
75
+ setCurrentValue(currentValue.filter(function (cv) {
76
+ return cv !== v;
77
+ }));
78
+ return;
79
+ }
80
+ setCurrentValue([].concat(_toConsumableArray(currentValue), [v]));
81
+ }, [currentValue, disabled, multiple, setCurrentValue]);
82
+ var isSelected = useCallback(function (v) {
83
+ return multiple ? currentValue.includes(v) : currentValue === v;
84
+ }, [currentValue, multiple]);
85
+ var renderOption = useCallback(function (o, index) {
86
+ var selected = isSelected(o.value);
87
+ var Option = /*#__PURE__*/_jsxs(Flex, {
88
+ align: isImg ? 'center' : 'flex-start',
89
+ className: cx(styles.option, selected && styles.optionSelected, classNames === null || classNames === void 0 ? void 0 : classNames.card),
90
+ gap: "small",
91
+ onClick: function onClick() {
92
+ return onSelect(o.value);
93
+ },
94
+ style: _objectSpread(_objectSpread({}, stylesFromProps === null || stylesFromProps === void 0 ? void 0 : stylesFromProps.card), o.style),
95
+ vertical: true,
96
+ children: [isImg && /*#__PURE__*/_jsx(Avatar, {
97
+ className: classNames === null || classNames === void 0 ? void 0 : classNames.icon,
98
+ icon: o.icon,
99
+ shape: "square",
100
+ size: imgHeight,
101
+ src: o.img,
102
+ style: _objectSpread(_objectSpread({}, stylesFromProps === null || stylesFromProps === void 0 ? void 0 : stylesFromProps.icon), o.iconStyle)
103
+ }), o.label && selected && /*#__PURE__*/_jsx(Text, {
104
+ ellipsis: true,
105
+ strong: true,
106
+ children: o.label
107
+ }), o.label && !selected && /*#__PURE__*/_jsx(Text, {
108
+ ellipsis: true,
109
+ children: o.label
110
+ }), !isImg && o.description && /*#__PURE__*/_jsx(Paragraph, {
111
+ ellipsis: {
112
+ rows: 2
113
+ },
114
+ type: "secondary",
115
+ children: o.description
116
+ }), selected && /*#__PURE__*/_jsx(Icon, {
117
+ className: styles.check,
118
+ icon: Check
119
+ })]
120
+ }, o.value);
121
+ return optionRender ? optionRender(Option, o, index) : Option;
122
+ }, [classNames === null || classNames === void 0 ? void 0 : classNames.card, classNames === null || classNames === void 0 ? void 0 : classNames.icon, cx, imgHeight, isImg, isSelected, onSelect, optionRender, styles.check, styles.option, styles.optionSelected, stylesFromProps === null || stylesFromProps === void 0 ? void 0 : stylesFromProps.card, stylesFromProps === null || stylesFromProps === void 0 ? void 0 : stylesFromProps.icon]);
123
+ return /*#__PURE__*/_jsx(Flex, _objectSpread(_objectSpread({
124
+ gap: "large",
125
+ ref: ref,
126
+ wrap: true
127
+ }, otherProps), {}, {
128
+ children: options.map(function (o, index) {
129
+ return renderOption(o, index);
130
+ })
131
+ }));
132
+ });
@@ -0,0 +1,10 @@
1
+ import type { SelectCardProps } from '.';
2
+ export declare const getNumberBySize: (size: SelectCardProps['size']) => {
3
+ cardWidth: number;
4
+ imgHeight: number;
5
+ };
6
+ export declare const useStyles: (props?: Pick<SelectCardProps, "disabled" | "size"> | undefined) => import("antd-style").ReturnStyles<{
7
+ option: import("antd-style").SerializedStyles;
8
+ optionSelected: import("antd-style").SerializedStyles;
9
+ check: import("antd-style").SerializedStyles;
10
+ }>;
@@ -0,0 +1,42 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
+ import { createStyles } from 'antd-style';
4
+ export var getNumberBySize = function getNumberBySize(size) {
5
+ switch (size) {
6
+ case 'small':
7
+ {
8
+ return {
9
+ cardWidth: 144,
10
+ imgHeight: 32
11
+ };
12
+ }
13
+ case 'large':
14
+ {
15
+ return {
16
+ cardWidth: 200,
17
+ imgHeight: 64
18
+ };
19
+ }
20
+ default:
21
+ {
22
+ return {
23
+ cardWidth: 168,
24
+ imgHeight: 40
25
+ };
26
+ }
27
+ }
28
+ };
29
+ export var useStyles = createStyles(function (_ref, _ref2) {
30
+ var css = _ref.css,
31
+ token = _ref.token,
32
+ prefixCls = _ref.prefixCls;
33
+ var disabled = _ref2.disabled,
34
+ size = _ref2.size;
35
+ var _getNumberBySize = getNumberBySize(size),
36
+ cardWidth = _getNumberBySize.cardWidth;
37
+ return {
38
+ option: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n\n cursor: ", ";\n\n padding: ", "px;\n\n transition: all ", ";\n\n width: ", "px;\n min-height: 108px;\n\n ", "\n\n ", "\n\n div.", "-typography {\n margin-bottom: 0;\n }\n "])), token.colorBorder, token.borderRadius, disabled ? 'not-allowed' : 'pointer', token.padding, token.motionDurationFast, cardWidth, disabled && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n .", "-typography {\n color: ", ";\n &.", "-typography-secondary {\n color: ", ";\n }\n }\n "])), token.colorBgContainerDisabled, prefixCls, token.colorTextDisabled, prefixCls, token.colorTextDisabled), !disabled && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:hover {\n border-color: ", ";\n }\n "])), token.colorPrimaryBorderHover), prefixCls),
39
+ optionSelected: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-color: ", ";\n &:hover {\n border-color: ", ";\n }\n "])), token.colorPrimary, token.colorPrimaryActive),
40
+ check: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", "px;\n bottom: ", "px;\n color: ", ";\n "])), token.marginXS, token.marginXS, token.colorPrimary)
41
+ };
42
+ });
@@ -55,7 +55,7 @@ export var SliderInput = function SliderInput(_ref) {
55
55
  min: min,
56
56
  onChange: onNumberChange,
57
57
  step: step,
58
- value: value || number
58
+ value: value !== null && value !== void 0 ? value : number
59
59
  }))
60
60
  })), /*#__PURE__*/_jsx(Col, _objectSpread(_objectSpread({}, inputCol), {}, {
61
61
  children: /*#__PURE__*/_jsx(InputNumber, _objectSpread(_objectSpread({}, inputProps), {}, {
@@ -67,7 +67,7 @@ export var SliderInput = function SliderInput(_ref) {
67
67
  onChange: onNumberChange,
68
68
  placeholder: placeholder,
69
69
  step: step,
70
- value: value || number
70
+ value: value !== null && value !== void 0 ? value : number
71
71
  }))
72
72
  }))]
73
73
  });
@@ -0,0 +1,7 @@
1
+ import { BadgeProps } from 'antd';
2
+ import React from 'react';
3
+ export interface StatusProps extends Pick<BadgeProps, 'className' | 'color' | 'status' | 'style' | 'text'> {
4
+ tooltip?: React.ReactNode;
5
+ title?: string;
6
+ }
7
+ export declare const Status: React.FC<StatusProps>;
@@ -0,0 +1,39 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["tooltip", "className", "status", "text", "color"];
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ import { Icon } from '@lobehub/ui';
7
+ import { Badge, Space, Tooltip } from 'antd';
8
+ import { Info } from 'lucide-react';
9
+ import React from 'react';
10
+ import { useStyles } from "./style";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ export var Status = function Status(_ref) {
14
+ var tooltip = _ref.tooltip,
15
+ className = _ref.className,
16
+ status = _ref.status,
17
+ text = _ref.text,
18
+ color = _ref.color,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+ var _useStyles = useStyles(),
21
+ cx = _useStyles.cx,
22
+ styles = _useStyles.styles;
23
+ return /*#__PURE__*/_jsxs(Space, _objectSpread(_objectSpread({
24
+ className: cx(styles.root, className),
25
+ size: "small"
26
+ }, props), {}, {
27
+ children: [/*#__PURE__*/_jsx(Badge, {
28
+ status: status,
29
+ text: text,
30
+ color: color
31
+ }), tooltip && /*#__PURE__*/_jsx(Tooltip, {
32
+ className: styles.tooltip,
33
+ title: tooltip,
34
+ children: /*#__PURE__*/_jsx(Icon, {
35
+ icon: Info
36
+ })
37
+ })]
38
+ }));
39
+ };
@@ -0,0 +1,4 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ root: import("antd-style").SerializedStyles;
3
+ tooltip: import("antd-style").SerializedStyles;
4
+ }>;
@@ -0,0 +1,14 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ token = _ref.token,
7
+ prefixCls = _ref.prefixCls;
8
+ return {
9
+ root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-badge.", "-badge-status {\n .", "-badge-status-dot {\n width: 8px;\n height: 8px;\n }\n }\n "])), prefixCls, prefixCls, prefixCls),
10
+ tooltip: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.anticon {\n cursor: help;\n color: ", ";\n }\n "])), token.colorTextTertiary)
11
+ };
12
+ }, {
13
+ hashPriority: 'low'
14
+ });
@@ -0,0 +1,9 @@
1
+ import type { TableProps } from 'antd';
2
+ import type { AnyObject } from 'antd/es/_util/type';
3
+ import React from 'react';
4
+ import { CollapseGroupProps } from '../../CollapseGroup';
5
+ export interface CollapseTableProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'title'>, Pick<CollapseGroupProps, 'icon' | 'title' | 'variant' | 'defaultActive' | 'extra'> {
6
+ rootStyle?: React.CSSProperties;
7
+ rootClassName?: string;
8
+ }
9
+ export declare const CollapseTable: <RecordType extends AnyObject = AnyObject>({ rootStyle, rootClassName, icon, title, variant, defaultActive, extra, className, ...tableProps }: CollapseTableProps<RecordType>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["rootStyle", "rootClassName", "icon", "title", "variant", "defaultActive", "extra", "className"];
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ import { Table } from 'antd';
7
+ import React from 'react';
8
+ import { CollapseGroup } from "../../CollapseGroup";
9
+ import { useStyles } from "./style";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ export var CollapseTable = function CollapseTable(_ref) {
12
+ var rootStyle = _ref.rootStyle,
13
+ rootClassName = _ref.rootClassName,
14
+ icon = _ref.icon,
15
+ title = _ref.title,
16
+ variant = _ref.variant,
17
+ defaultActive = _ref.defaultActive,
18
+ extra = _ref.extra,
19
+ className = _ref.className,
20
+ tableProps = _objectWithoutProperties(_ref, _excluded);
21
+ var _useStyles = useStyles(),
22
+ cx = _useStyles.cx,
23
+ styles = _useStyles.styles;
24
+ return /*#__PURE__*/_jsx(CollapseGroup, {
25
+ className: rootClassName,
26
+ style: rootStyle,
27
+ icon: icon,
28
+ title: title,
29
+ variant: variant,
30
+ defaultActive: defaultActive,
31
+ extra: extra,
32
+ children: /*#__PURE__*/_jsx(Table, _objectSpread({
33
+ className: cx(styles.table, className),
34
+ pagination: false,
35
+ rowHoverable: false,
36
+ size: "small"
37
+ }, tableProps))
38
+ });
39
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ table: import("antd-style").SerializedStyles;
3
+ }>;
@@ -0,0 +1,11 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ token = _ref.token,
7
+ prefixCls = _ref.prefixCls;
8
+ return {
9
+ table: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-table {\n &-thead {\n & > tr > th {\n font-weight: normal;\n color: ", ";\n background-color: unset;\n &::before {\n display: none;\n }\n }\n }\n &-tbody {\n & > tr:last-child {\n & > td {\n border-bottom-color: transparent;\n }\n }\n }\n &-cell {\n vertical-align: top;\n }\n }\n "])), prefixCls, token.colorTextTertiary)
10
+ };
11
+ });
@@ -0,0 +1,20 @@
1
+ import { Table as AntdTable, TableProps } from 'antd';
2
+ import type { AnyObject } from 'antd/es/_util/type';
3
+ import React from 'react';
4
+ import { CollapseTable } from './collapse';
5
+ export * from './collapse';
6
+ export { type TableColumnGroupType, type TableColumnProps, type TableColumnsType, type TableColumnType, type TablePaginationConfig, type TableProps, } from 'antd';
7
+ type YuntiTable = <RecordType extends AnyObject = AnyObject>(props: TableProps<RecordType>) => React.ReactElement;
8
+ export declare const Table: YuntiTable & {
9
+ displayName?: typeof AntdTable.displayName;
10
+ SELECTION_COLUMN: typeof AntdTable.SELECTION_COLUMN;
11
+ EXPAND_COLUMN: typeof AntdTable.EXPAND_COLUMN;
12
+ SELECTION_ALL: typeof AntdTable.SELECTION_ALL;
13
+ SELECTION_INVERT: typeof AntdTable.SELECTION_INVERT;
14
+ SELECTION_NONE: typeof AntdTable.SELECTION_NONE;
15
+ Column: typeof AntdTable.Column;
16
+ ColumnGroup: typeof AntdTable.ColumnGroup;
17
+ Summary: typeof AntdTable.Summary;
18
+ Collapse: typeof CollapseTable;
19
+ };
20
+ export default Table;
@@ -0,0 +1,56 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["columns"];
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ import { Table as AntdTable, Tooltip } from 'antd';
7
+ import React, { useMemo } from 'react';
8
+ import { CollapseTable } from "./collapse";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ export * from "./collapse";
11
+ export var Table = function Table(props) {
12
+ var columns = props.columns,
13
+ otherProps = _objectWithoutProperties(props, _excluded);
14
+ var formatColumns = useMemo(function () {
15
+ return columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
16
+ if (item.render) {
17
+ return item;
18
+ }
19
+ if (item.ellipsis && item.ellipsis !== true && item.ellipsis.showTitle || item.ellipsis === true) {
20
+ var tooltipProps = item.ellipsis === true ? {} : item.ellipsis;
21
+ return _objectSpread(_objectSpread({}, item), {}, {
22
+ ellipsis: {
23
+ showTitle: false
24
+ },
25
+ render: function render(text) {
26
+ return text || text === 0 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
27
+ placement: "topLeft",
28
+ title: text,
29
+ children: text
30
+ })) : '-';
31
+ }
32
+ });
33
+ }
34
+ if (!item.render) {
35
+ item.render = function (text) {
36
+ return text !== null && text !== void 0 ? text : '-';
37
+ };
38
+ }
39
+ return item;
40
+ });
41
+ }, [columns]);
42
+ return /*#__PURE__*/_jsx(AntdTable, _objectSpread(_objectSpread({}, otherProps), {}, {
43
+ columns: formatColumns
44
+ }));
45
+ };
46
+ Table.displayName = 'Table';
47
+ Table.SELECTION_COLUMN = AntdTable.SELECTION_COLUMN;
48
+ Table.EXPAND_COLUMN = AntdTable.EXPAND_COLUMN;
49
+ Table.SELECTION_ALL = AntdTable.SELECTION_ALL;
50
+ Table.SELECTION_INVERT = AntdTable.SELECTION_INVERT;
51
+ Table.SELECTION_NONE = AntdTable.SELECTION_NONE;
52
+ Table.Column = AntdTable.Column;
53
+ Table.ColumnGroup = AntdTable.ColumnGroup;
54
+ Table.Summary = AntdTable.Summary;
55
+ Table.Collapse = CollapseTable;
56
+ export default Table;
@@ -0,0 +1,32 @@
1
+ import { Typography as AntdTypography } from 'antd';
2
+ import type { TooltipPropsWithTitle } from 'antd/es/tooltip';
3
+ import type { TextProps } from 'antd/es/typography/Text';
4
+ import React from 'react';
5
+ export declare const Typography: TypographyProps;
6
+ interface TimeProps extends TextProps {
7
+ /**
8
+ * @description Set display time
9
+ * @default '-'
10
+ */
11
+ time: string;
12
+ /**
13
+ * @description Formatted display time
14
+ * @default 'YYYY-MM-DD HH:mm:ss'
15
+ */
16
+ format?: string;
17
+ /**
18
+ * @description Display relative time
19
+ * @default 'true'
20
+ */
21
+ relativeTime?: boolean;
22
+ /**
23
+ * @description Mouse above to show time
24
+ * @default '{title: "YYYY-MM-DD HH:mm:ss"}'
25
+ */
26
+ tooltip?: TooltipPropsWithTitle;
27
+ }
28
+ declare const Time: React.FC<TimeProps>;
29
+ export type TypographyProps = typeof AntdTypography & {
30
+ Time: typeof Time;
31
+ };
32
+ export default Typography;