@lobehub/ui 2.4.2 → 2.5.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/List/ListItem/index.js +6 -12
- package/es/List/ListItem/style.js +4 -5
- package/es/SearchBar/components/SearchResultCard/index.js +3 -2
- package/es/Text/Text.d.ts +4 -0
- package/es/Text/Text.js +113 -0
- package/es/Text/index.d.ts +2 -0
- package/es/Text/index.js +1 -0
- package/es/Text/styles.d.ts +17 -0
- package/es/Text/styles.js +24 -0
- package/es/Text/type.d.ts +21 -0
- package/es/Text/type.js +1 -0
- package/es/awesome/Features/FeatureItem.js +2 -2
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/package.json +1 -1
|
@@ -9,18 +9,16 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Typography } from 'antd';
|
|
13
12
|
import { Loader2, MessageSquare } from 'lucide-react';
|
|
14
13
|
import { memo } from 'react';
|
|
15
14
|
import { Flexbox } from 'react-layout-kit';
|
|
16
15
|
import Icon from "../../Icon";
|
|
16
|
+
import Text from "../../Text";
|
|
17
17
|
import { useStyles } from "./style";
|
|
18
18
|
import { getChatItemTime } from "./time";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
21
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
-
var Title = Typography.Title,
|
|
23
|
-
Paragraph = Typography.Paragraph;
|
|
24
22
|
var ListItem = /*#__PURE__*/memo(function (_ref) {
|
|
25
23
|
var ref = _ref.ref,
|
|
26
24
|
active = _ref.active,
|
|
@@ -108,19 +106,15 @@ var ListItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
108
106
|
className: cx(styles.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
109
107
|
gap: 4,
|
|
110
108
|
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.content,
|
|
111
|
-
children: [/*#__PURE__*/_jsx(
|
|
109
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
110
|
+
as: 'h3',
|
|
112
111
|
className: cx(styles.title, classNames === null || classNames === void 0 ? void 0 : classNames.title),
|
|
113
|
-
ellipsis:
|
|
114
|
-
rows: 1
|
|
115
|
-
},
|
|
116
|
-
level: 3,
|
|
112
|
+
ellipsis: true,
|
|
117
113
|
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.title,
|
|
118
114
|
children: title
|
|
119
|
-
}), description && /*#__PURE__*/_jsx(
|
|
115
|
+
}), description && /*#__PURE__*/_jsx(Text, {
|
|
120
116
|
className: cx(styles.desc, classNames === null || classNames === void 0 ? void 0 : classNames.desc),
|
|
121
|
-
ellipsis:
|
|
122
|
-
rows: 1
|
|
123
|
-
},
|
|
117
|
+
ellipsis: true,
|
|
124
118
|
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.desc,
|
|
125
119
|
children: description
|
|
126
120
|
}), addon]
|
|
@@ -5,17 +5,16 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
5
5
|
var cx = _ref.cx,
|
|
6
6
|
css = _ref.css,
|
|
7
7
|
token = _ref.token,
|
|
8
|
-
prefixCls = _ref.prefixCls,
|
|
9
8
|
stylish = _ref.stylish;
|
|
10
9
|
return {
|
|
11
10
|
actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n inset-block-start: 50%;\n inset-inline-end: 16px;\n transform: translateY(-50%);\n "]))),
|
|
12
11
|
active: stylish.active,
|
|
13
12
|
content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n align-self: center;\n "]))),
|
|
14
13
|
date: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
|
|
15
|
-
desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n
|
|
14
|
+
desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0;\n\n font-size: 12px;\n line-height: 1.2;\n color: ", ";\n "])), token.colorTextDescription),
|
|
16
15
|
pin: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n inset-block-start: 6px;\n inset-inline-end: 6px;\n "]))),
|
|
17
|
-
root: cx(stylish.variantBorderless, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n
|
|
18
|
-
title: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n
|
|
19
|
-
triangle: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 10px;\n height: 10px;\n\n opacity: 0.5;\n background: ", ";\n clip-path: polygon(0% 0%, 100% 0%, 100% 100%);\n
|
|
16
|
+
root: cx(stylish.variantBorderless, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n border-radius: ", "px;\n color: ", ";\n "])), token.borderRadius, token.colorTextTertiary)),
|
|
17
|
+
title: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0;\n\n font-size: 14px;\n font-weight: 500;\n line-height: 1.2;\n color: ", ";\n "])), token.colorText),
|
|
18
|
+
triangle: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 10px;\n height: 10px;\n border-radius: 2px;\n\n opacity: 0.5;\n background: ", ";\n clip-path: polygon(0% 0%, 100% 0%, 100% 100%);\n "])), token.colorPrimaryBorder)
|
|
20
19
|
};
|
|
21
20
|
});
|
|
@@ -15,9 +15,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
import { Typography } from 'antd';
|
|
19
18
|
import { memo, useMemo } from 'react';
|
|
20
19
|
import { Flexbox } from 'react-layout-kit';
|
|
20
|
+
import Text from "../../../Text";
|
|
21
21
|
import { useStyles } from "./style";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -69,8 +69,9 @@ var SearchResultCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
69
69
|
height: 14,
|
|
70
70
|
src: "https://icons.duckduckgo.com/ip3/".concat(host, ".ico"),
|
|
71
71
|
width: 14
|
|
72
|
-
}), /*#__PURE__*/_jsx(
|
|
72
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
73
73
|
className: styles.url,
|
|
74
|
+
ellipsis: true,
|
|
74
75
|
type: 'secondary',
|
|
75
76
|
children: domain
|
|
76
77
|
})]
|
package/es/Text/Text.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
var _excluded = ["as", "className", "children", "style", "type", "disabled", "strong", "italic", "underline", "delete", "mark", "code", "color", "weight", "ellipsis"];
|
|
4
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
import { Tooltip } from 'antd';
|
|
13
|
+
import { cva } from 'class-variance-authority';
|
|
14
|
+
import { memo, useMemo } from 'react';
|
|
15
|
+
import { useStyles } from "./styles";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
var Text = /*#__PURE__*/memo(function (_ref) {
|
|
18
|
+
var _ref$as = _ref.as,
|
|
19
|
+
Container = _ref$as === void 0 ? 'div' : _ref$as,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
children = _ref.children,
|
|
22
|
+
style = _ref.style,
|
|
23
|
+
type = _ref.type,
|
|
24
|
+
disabled = _ref.disabled,
|
|
25
|
+
strong = _ref.strong,
|
|
26
|
+
italic = _ref.italic,
|
|
27
|
+
underline = _ref.underline,
|
|
28
|
+
deleteStyle = _ref.delete,
|
|
29
|
+
mark = _ref.mark,
|
|
30
|
+
code = _ref.code,
|
|
31
|
+
color = _ref.color,
|
|
32
|
+
weight = _ref.weight,
|
|
33
|
+
ellipsis = _ref.ellipsis,
|
|
34
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
+
var _useStyles = useStyles(),
|
|
36
|
+
styles = _useStyles.styles,
|
|
37
|
+
cx = _useStyles.cx;
|
|
38
|
+
var variants = useMemo(function () {
|
|
39
|
+
return cva(styles.text, {
|
|
40
|
+
defaultVariants: {},
|
|
41
|
+
variants: {
|
|
42
|
+
code: {
|
|
43
|
+
true: styles.code
|
|
44
|
+
},
|
|
45
|
+
delete: {
|
|
46
|
+
true: styles.delete
|
|
47
|
+
},
|
|
48
|
+
disabled: {
|
|
49
|
+
true: styles.disabled
|
|
50
|
+
},
|
|
51
|
+
ellipsis: {
|
|
52
|
+
multi: styles.ellipsisMulti,
|
|
53
|
+
true: styles.ellipsis
|
|
54
|
+
},
|
|
55
|
+
italic: {
|
|
56
|
+
true: styles.italic
|
|
57
|
+
},
|
|
58
|
+
mark: {
|
|
59
|
+
true: styles.mark
|
|
60
|
+
},
|
|
61
|
+
strong: {
|
|
62
|
+
true: styles.strong
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
danger: styles.danger,
|
|
66
|
+
info: styles.info,
|
|
67
|
+
secondary: styles.secondary,
|
|
68
|
+
success: styles.success,
|
|
69
|
+
warning: styles.warning
|
|
70
|
+
},
|
|
71
|
+
underline: {
|
|
72
|
+
true: styles.underline
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}, [styles]);
|
|
77
|
+
var textStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), color && {
|
|
78
|
+
color: color
|
|
79
|
+
}), weight && {
|
|
80
|
+
fontWeight: weight
|
|
81
|
+
}), _typeof(ellipsis) === 'object' && ellipsis.rows && {
|
|
82
|
+
WebkitLineClamp: ellipsis.rows
|
|
83
|
+
});
|
|
84
|
+
var content = /*#__PURE__*/_jsx(Container, _objectSpread(_objectSpread({
|
|
85
|
+
className: cx(variants({
|
|
86
|
+
code: code,
|
|
87
|
+
delete: deleteStyle,
|
|
88
|
+
disabled: disabled,
|
|
89
|
+
ellipsis: ellipsis ? _typeof(ellipsis) === 'object' && ellipsis.rows ? 'multi' : true : undefined,
|
|
90
|
+
italic: italic,
|
|
91
|
+
mark: mark,
|
|
92
|
+
strong: strong,
|
|
93
|
+
type: type,
|
|
94
|
+
underline: underline
|
|
95
|
+
}), className),
|
|
96
|
+
style: textStyle
|
|
97
|
+
}, rest), {}, {
|
|
98
|
+
children: children
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
// 处理带有 tooltip 的省略
|
|
102
|
+
if (ellipsis && _typeof(ellipsis) === 'object' && ellipsis.tooltip) {
|
|
103
|
+
var tooltipProps = _typeof(ellipsis.tooltip) === 'object' ? ellipsis.tooltip : {
|
|
104
|
+
title: ellipsis.tooltip
|
|
105
|
+
};
|
|
106
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
|
|
107
|
+
children: content
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
return content;
|
|
111
|
+
});
|
|
112
|
+
Text.displayName = 'Text';
|
|
113
|
+
export default Text;
|
package/es/Text/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Text";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
+
code: import("antd-style").SerializedStyles;
|
|
3
|
+
danger: import("antd-style").SerializedStyles;
|
|
4
|
+
delete: import("antd-style").SerializedStyles;
|
|
5
|
+
disabled: import("antd-style").SerializedStyles;
|
|
6
|
+
ellipsis: import("antd-style").SerializedStyles;
|
|
7
|
+
ellipsisMulti: import("antd-style").SerializedStyles;
|
|
8
|
+
info: import("antd-style").SerializedStyles;
|
|
9
|
+
italic: import("antd-style").SerializedStyles;
|
|
10
|
+
mark: import("antd-style").SerializedStyles;
|
|
11
|
+
secondary: import("antd-style").SerializedStyles;
|
|
12
|
+
strong: import("antd-style").SerializedStyles;
|
|
13
|
+
success: import("antd-style").SerializedStyles;
|
|
14
|
+
text: import("antd-style").SerializedStyles;
|
|
15
|
+
underline: import("antd-style").SerializedStyles;
|
|
16
|
+
warning: import("antd-style").SerializedStyles;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var css = _ref.css,
|
|
6
|
+
token = _ref.token;
|
|
7
|
+
return {
|
|
8
|
+
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-family: ", ";\n "])), token.fontFamilyCode),
|
|
9
|
+
danger: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorError),
|
|
10
|
+
delete: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-decoration: line-through;\n "]))),
|
|
11
|
+
disabled: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n color: ", ";\n "])), token.colorTextDisabled),
|
|
12
|
+
ellipsis: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
|
|
13
|
+
ellipsisMulti: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n "]))),
|
|
14
|
+
info: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorInfo),
|
|
15
|
+
italic: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-style: italic;\n "]))),
|
|
16
|
+
mark: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: #000;\n background-color: ", ";\n "])), token.yellow),
|
|
17
|
+
secondary: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextSecondary),
|
|
18
|
+
strong: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-weight: bold;\n "]))),
|
|
19
|
+
success: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorSuccess),
|
|
20
|
+
text: css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n color: ", ";\n "])), token.fontSize, token.lineHeight, token.colorText),
|
|
21
|
+
underline: css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n text-decoration: underline;\n "]))),
|
|
22
|
+
warning: css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorWarning)
|
|
23
|
+
};
|
|
24
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ElementType, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { TooltipProps } from "../Tooltip";
|
|
3
|
+
import { DivProps } from "../types";
|
|
4
|
+
export interface TextProps extends DivProps {
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
code?: boolean;
|
|
7
|
+
color?: string;
|
|
8
|
+
delete?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
ellipsis?: boolean | {
|
|
11
|
+
rows?: number;
|
|
12
|
+
tooltip?: ReactNode | TooltipProps;
|
|
13
|
+
};
|
|
14
|
+
italic?: boolean;
|
|
15
|
+
mark?: boolean;
|
|
16
|
+
ref?: Ref<HTMLDivElement>;
|
|
17
|
+
strong?: boolean;
|
|
18
|
+
type?: 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
19
|
+
underline?: boolean;
|
|
20
|
+
weight?: 'bold' | 'bolder' | number;
|
|
21
|
+
}
|
package/es/Text/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,12 +9,12 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Typography } from 'antd';
|
|
13
12
|
import { memo } from 'react';
|
|
14
13
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
15
14
|
import A from "../../A";
|
|
16
15
|
import Icon from "../../Icon";
|
|
17
16
|
import Img from "../../Img";
|
|
17
|
+
import Text from "../../Text";
|
|
18
18
|
import { useStyles } from "./style";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -81,7 +81,7 @@ var Item = /*#__PURE__*/memo(function (_ref2) {
|
|
|
81
81
|
gap: 8,
|
|
82
82
|
horizontal: true,
|
|
83
83
|
children: title
|
|
84
|
-
}), description && /*#__PURE__*/_jsx(
|
|
84
|
+
}), description && /*#__PURE__*/_jsx(Text, {
|
|
85
85
|
className: styles.desc,
|
|
86
86
|
ellipsis: {
|
|
87
87
|
rows: 4
|
package/es/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { default as SortableList, type SortableListProps } from './SortableList'
|
|
|
53
53
|
export * from './styles';
|
|
54
54
|
export { default as Tabs, type TabsProps } from './Tabs';
|
|
55
55
|
export { default as Tag, type TagProps } from './Tag';
|
|
56
|
+
export { default as Text, type TextProps } from './Text';
|
|
56
57
|
export { Meta, type MetaProps, default as ThemeProvider, type ThemeProviderProps, } from './ThemeProvider';
|
|
57
58
|
export { default as ThemeSwitch, type ThemeSwitchProps } from './ThemeSwitch';
|
|
58
59
|
export { default as Toc, type TocProps } from './Toc';
|
package/es/index.js
CHANGED
|
@@ -53,6 +53,7 @@ export { default as SortableList } from "./SortableList";
|
|
|
53
53
|
export * from "./styles";
|
|
54
54
|
export { default as Tabs } from "./Tabs";
|
|
55
55
|
export { default as Tag } from "./Tag";
|
|
56
|
+
export { default as Text } from "./Text";
|
|
56
57
|
export { Meta, default as ThemeProvider } from "./ThemeProvider";
|
|
57
58
|
export { default as ThemeSwitch } from "./ThemeSwitch";
|
|
58
59
|
export { default as Toc } from "./Toc";
|