@lobehub/ui 1.10.0 → 1.11.1
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/style.js +1 -1
- package/es/Highlighter/style.js +1 -2
- package/es/Input/index.js +7 -5
- package/es/Input/style.js +2 -3
- package/es/Markdown/style.js +1 -1
- package/es/SearchBar/index.js +2 -1
- package/es/Snippet/style.js +1 -2
- package/es/StroyBook/style.js +1 -1
- package/es/ThemeProvider/index.d.ts +2 -6
- package/es/ThemeProvider/index.js +8 -18
- package/es/styles/algorithms/generateColorPalette.d.ts +11 -0
- package/es/styles/algorithms/generateColorPalette.js +31 -0
- package/es/styles/{customStylish.d.ts → algorithms/generateCustomStylish.d.ts} +1 -1
- package/es/styles/{customStylish.js → algorithms/generateCustomStylish.js} +1 -1
- package/es/styles/algorithms/generateCustomToken.d.ts +3 -0
- package/es/styles/algorithms/generateCustomToken.js +57 -0
- package/es/styles/algorithms/generateTheme.d.ts +5 -0
- package/es/styles/algorithms/generateTheme.js +18 -0
- package/es/styles/colors.d.ts +38 -0
- package/es/styles/colors.js +176 -0
- package/es/styles/index.d.ts +3 -3
- package/es/styles/index.js +3 -3
- package/es/styles/theme/base.d.ts +2 -2
- package/es/styles/theme/base.js +8 -14
- package/es/styles/theme/dark.d.ts +3 -4
- package/es/styles/theme/dark.js +40 -71
- package/es/styles/theme/light.d.ts +3 -4
- package/es/styles/theme/light.js +41 -32
- package/es/types/customToken.d.ts +1027 -0
- package/es/types/global.d.ts +12 -0
- package/es/types/index.d.ts +5 -28
- package/es/types/index.js +1 -0
- package/lib/ActionIcon/index.js +77 -79
- package/lib/ActionIcon/style.js +17 -61
- package/lib/Avatar/index.js +62 -67
- package/lib/Chat/const.js +6 -27
- package/lib/Chat/index.js +24 -28
- package/lib/Chat/store/index.js +46 -40
- package/lib/Chat/store/initialState.js +6 -27
- package/lib/Chat/store/messageReducer.js +51 -58
- package/lib/Chat/store/selectors.js +44 -46
- package/lib/Chat/store/store.js +242 -115
- package/lib/Chat/types.js +4 -16
- package/lib/Chat/utils/fetch.js +104 -68
- package/lib/ContextMenu/MenuItem/icons.js +48 -66
- package/lib/ContextMenu/MenuItem/index.js +73 -66
- package/lib/ContextMenu/MenuItem/style.js +19 -89
- package/lib/ContextMenu/index.js +194 -178
- package/lib/ContextMenu/style.js +17 -85
- package/lib/ContextMenu/types/index.js +15 -18
- package/lib/ContextMenu/types/menuItem.js +4 -16
- package/lib/Conversation/App.js +47 -50
- package/lib/Conversation/ChatList/MessageItem/Content.js +98 -93
- package/lib/Conversation/ChatList/MessageItem/Toolbar.js +94 -104
- package/lib/Conversation/ChatList/MessageItem/index.js +125 -157
- package/lib/Conversation/ChatList/index.js +64 -58
- package/lib/Conversation/InputArea/ActionBar.js +74 -92
- package/lib/Conversation/InputArea/index.js +103 -142
- package/lib/Conversation/StoreUpdater.js +28 -48
- package/lib/Conversation/index.js +30 -42
- package/lib/CopyButton/index.js +37 -62
- package/lib/DraggablePanel/index.js +192 -207
- package/lib/DraggablePanel/style.js +30 -278
- package/lib/DraggablePanel/utils.js +14 -35
- package/lib/EditableMessage/index.js +66 -89
- package/lib/EditableMessageList/index.js +97 -112
- package/lib/EditableText/index.js +36 -49
- package/lib/Highlighter/SyntaxHighlighter/Prism.js +43 -38
- package/lib/Highlighter/SyntaxHighlighter/index.js +62 -53
- package/lib/Highlighter/SyntaxHighlighter/style.js +18 -56
- package/lib/Highlighter/index.js +52 -58
- package/lib/Highlighter/style.js +22 -102
- package/lib/Icon/index.js +29 -36
- package/lib/Input/index.js +45 -39
- package/lib/Input/style.js +17 -68
- package/lib/List/ListItem/index.js +108 -150
- package/lib/List/ListItem/time.js +15 -47
- package/lib/List/index.js +9 -37
- package/lib/Logo/Divider.js +21 -34
- package/lib/Logo/Logo3D.js +17 -33
- package/lib/Logo/LogoFlat.js +108 -118
- package/lib/Logo/LogoHighContrast.js +30 -33
- package/lib/Logo/LogoText.js +21 -34
- package/lib/Logo/index.js +97 -59
- package/lib/Logo/style.js +13 -36
- package/lib/Markdown/Code.js +16 -30
- package/lib/Markdown/CodeBlock.js +33 -65
- package/lib/Markdown/index.js +35 -54
- package/lib/Markdown/style.js +15 -125
- package/lib/MessageInput/index.js +60 -56
- package/lib/MessageModal/index.js +80 -91
- package/lib/SearchBar/index.js +86 -72
- package/lib/SearchBar/style.js +18 -46
- package/lib/SideNav/index.js +43 -31
- package/lib/SideNav/style.js +13 -43
- package/lib/Snippet/index.js +42 -45
- package/lib/Snippet/style.js +13 -72
- package/lib/StroyBook/index.js +60 -61
- package/lib/StroyBook/style.js +19 -87
- package/lib/Swatches/index.js +35 -53
- package/lib/TabsNav/index.js +23 -31
- package/lib/TabsNav/style.js +17 -60
- package/lib/ThemeProvider/GlobalStyle.js +29 -92
- package/lib/ThemeProvider/index.d.ts +2 -6
- package/lib/ThemeProvider/index.js +44 -69
- package/lib/ThemeSwitch/index.js +62 -46
- package/lib/Tooltip/index.js +26 -31
- package/lib/Tooltip/style.js +13 -49
- package/lib/components/ControlInput.js +86 -87
- package/lib/hooks/useCopied.js +27 -37
- package/lib/hooks/useHighlight.js +65 -70
- package/lib/index.js +211 -120
- package/lib/styles/algorithms/generateColorPalette.d.ts +11 -0
- package/lib/styles/algorithms/generateColorPalette.js +40 -0
- package/lib/styles/{customStylish.d.ts → algorithms/generateCustomStylish.d.ts} +1 -1
- package/lib/styles/algorithms/generateCustomStylish.js +27 -0
- package/lib/styles/algorithms/generateCustomToken.d.ts +3 -0
- package/lib/styles/algorithms/generateCustomToken.js +65 -0
- package/lib/styles/algorithms/generateTheme.d.ts +5 -0
- package/lib/styles/algorithms/generateTheme.js +28 -0
- package/lib/styles/colors.d.ts +38 -0
- package/lib/styles/colors.js +183 -0
- package/lib/styles/index.d.ts +3 -3
- package/lib/styles/index.js +25 -20
- package/lib/styles/theme/base.d.ts +2 -2
- package/lib/styles/theme/base.js +17 -44
- package/lib/styles/theme/dark.d.ts +3 -4
- package/lib/styles/theme/dark.js +45 -119
- package/lib/styles/theme/light.d.ts +3 -4
- package/lib/styles/theme/light.js +47 -61
- package/lib/types/customToken.d.ts +1027 -0
- package/lib/types/global.d.ts +12 -0
- package/lib/types/index.d.ts +5 -28
- package/lib/types/index.js +5 -0
- package/lib/utils/colorUtils.js +14 -48
- package/package.json +1 -1
- package/es/styles/algorithms/colorRelationship.d.ts +0 -6
- package/es/styles/algorithms/colorRelationship.js +0 -88
- package/es/styles/algorithms/index.d.ts +0 -15
- package/es/styles/algorithms/index.js +0 -66
- package/es/styles/algorithms/paletteGenerator.d.ts +0 -51
- package/es/styles/algorithms/paletteGenerator.js +0 -74
- package/es/styles/antdTheme.d.ts +0 -2
- package/es/styles/antdTheme.js +0 -4
- package/es/styles/customToken.d.ts +0 -65
- package/es/styles/customToken.js +0 -24
- package/es/styles/theme/index.d.ts +0 -2
- package/es/styles/theme/index.js +0 -2
- package/lib/styles/algorithms/colorRelationship.d.ts +0 -6
- package/lib/styles/algorithms/colorRelationship.js +0 -87
- package/lib/styles/algorithms/index.d.ts +0 -15
- package/lib/styles/algorithms/index.js +0 -81
- package/lib/styles/algorithms/paletteGenerator.d.ts +0 -51
- package/lib/styles/algorithms/paletteGenerator.js +0 -91
- package/lib/styles/antdTheme.d.ts +0 -2
- package/lib/styles/antdTheme.js +0 -30
- package/lib/styles/customStylish.js +0 -118
- package/lib/styles/customToken.d.ts +0 -65
- package/lib/styles/customToken.js +0 -54
- package/lib/styles/theme/index.d.ts +0 -2
- package/lib/styles/theme/index.js +0 -32
|
@@ -1,157 +1,115 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
"use strict";
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
default: () => ListItem_default
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
23
6
|
});
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
height: 44px;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`;
|
|
45
|
-
const overlayColor = (0, import_colorUtils.convertAlphaToSolid)(token.colorFillContent, token.colorBgLayout);
|
|
46
|
-
const hoverOverlay = css`
|
|
47
|
-
.${cx(textOverlay)} {
|
|
48
|
-
--overlay-background: ${overlayColor};
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
var _icons = require("@ant-design/icons");
|
|
12
|
+
var _antdStyle = require("antd-style");
|
|
13
|
+
var _react = require("react");
|
|
14
|
+
var _reactLayoutKit = require("react-layout-kit");
|
|
15
|
+
var _colorUtils = require("../../utils/colorUtils");
|
|
16
|
+
var _time = require("./time");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
var _excluded = ["active", "avatar", "loading", "description", "date", "title", "onHoverChange", "renderActions", "className", "style", "showAction", "classNames"];
|
|
19
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
20
|
+
var useStyles = (0, _antdStyle.createStyles)(function (_ref) {
|
|
21
|
+
var css = _ref.css,
|
|
22
|
+
cx = _ref.cx,
|
|
23
|
+
token = _ref.token;
|
|
24
|
+
var textOverlay = css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n --overlay-background: ", ";\n\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n width: 32px;\n height: 44px;\n\n background: linear-gradient(to right, transparent, var(--overlay-background));\n "])), token.colorBgLayout);
|
|
25
|
+
var overlayColor = (0, _colorUtils.convertAlphaToSolid)(token.colorFillContent, token.colorBgLayout);
|
|
26
|
+
var hoverOverlay = css(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n --overlay-background: ", ";\n }\n "])), cx(textOverlay), overlayColor);
|
|
51
27
|
return {
|
|
52
|
-
container: css
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
${hoverOverlay}
|
|
60
|
-
}
|
|
61
|
-
`,
|
|
62
|
-
active: css`
|
|
63
|
-
color: ${token.colorText};
|
|
64
|
-
background: ${token.colorFillContent};
|
|
65
|
-
|
|
66
|
-
${hoverOverlay}
|
|
67
|
-
`,
|
|
68
|
-
content: css`
|
|
69
|
-
position: relative;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
flex: 1;
|
|
72
|
-
`,
|
|
73
|
-
title: css`
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
|
|
76
|
-
width: 100%;
|
|
77
|
-
|
|
78
|
-
font-size: 0.9em;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
white-space: nowrap;
|
|
81
|
-
`,
|
|
82
|
-
time: css`
|
|
83
|
-
font-size: 12px;
|
|
84
|
-
color: ${token.colorTextPlaceholder};
|
|
85
|
-
`,
|
|
86
|
-
desc: css`
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
|
|
89
|
-
width: 100%;
|
|
90
|
-
margin-top: 2px;
|
|
91
|
-
|
|
92
|
-
font-size: 0.75em;
|
|
93
|
-
text-overflow: ellipsis;
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
|
|
96
|
-
opacity: 0.5;
|
|
97
|
-
`,
|
|
98
|
-
textOverlay
|
|
28
|
+
container: css(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n color: ", ";\n border-radius: 8px;\n\n &:hover {\n background: ", ";\n ", "\n }\n "])), token.colorTextTertiary, token.colorFillContent, hoverOverlay),
|
|
29
|
+
active: css(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n background: ", ";\n\n ", "\n "])), token.colorText, token.colorFillContent, hoverOverlay),
|
|
30
|
+
content: css(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
|
|
31
|
+
title: css(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 0.9em;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
|
|
32
|
+
time: css(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
|
|
33
|
+
desc: css(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n\n width: 100%;\n margin-top: 2px;\n\n font-size: 0.75em;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n opacity: 0.5;\n "]))),
|
|
34
|
+
textOverlay: textOverlay
|
|
99
35
|
};
|
|
100
36
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 卡片列表项的属性
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
var ListItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
43
|
+
var active = _ref2.active,
|
|
44
|
+
avatar = _ref2.avatar,
|
|
45
|
+
loading = _ref2.loading,
|
|
46
|
+
description = _ref2.description,
|
|
47
|
+
date = _ref2.date,
|
|
48
|
+
title = _ref2.title,
|
|
49
|
+
onHoverChange = _ref2.onHoverChange,
|
|
50
|
+
renderActions = _ref2.renderActions,
|
|
51
|
+
className = _ref2.className,
|
|
52
|
+
style = _ref2.style,
|
|
53
|
+
showAction = _ref2.showAction,
|
|
54
|
+
_ref2$classNames = _ref2.classNames,
|
|
55
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
|
|
56
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
57
|
+
var _useStyles = useStyles(),
|
|
58
|
+
styles = _useStyles.styles,
|
|
59
|
+
cx = _useStyles.cx;
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactLayoutKit.Flexbox, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
61
|
+
ref: ref,
|
|
62
|
+
horizontal: true,
|
|
63
|
+
paddingBlock: 8,
|
|
64
|
+
gap: 8,
|
|
65
|
+
paddingInline: '12px 8px',
|
|
66
|
+
align: 'flex-start',
|
|
67
|
+
distribution: 'space-between',
|
|
68
|
+
className: cx(styles.container, active && styles.active, className),
|
|
69
|
+
style: style
|
|
70
|
+
}, props), {}, {
|
|
71
|
+
onMouseEnter: function onMouseEnter() {
|
|
72
|
+
onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(true);
|
|
73
|
+
},
|
|
74
|
+
onMouseLeave: function onMouseLeave() {
|
|
75
|
+
onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(false);
|
|
76
|
+
},
|
|
77
|
+
children: [avatar !== null && avatar !== void 0 ? avatar : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.MessageOutlined, {
|
|
78
|
+
style: {
|
|
79
|
+
marginTop: 4
|
|
80
|
+
}
|
|
81
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactLayoutKit.Flexbox, {
|
|
82
|
+
className: styles.content,
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactLayoutKit.Flexbox, {
|
|
122
84
|
horizontal: true,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
85
|
+
distribution: 'space-between',
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
+
className: styles.title,
|
|
88
|
+
children: title
|
|
89
|
+
})
|
|
90
|
+
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
91
|
+
className: styles.desc,
|
|
92
|
+
children: description
|
|
93
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
94
|
+
className: styles.textOverlay
|
|
95
|
+
})]
|
|
96
|
+
}), loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LoadingOutlined, {
|
|
97
|
+
spin: true
|
|
98
|
+
}) : showAction ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactLayoutKit.Flexbox, {
|
|
99
|
+
horizontal: true,
|
|
100
|
+
gap: 4,
|
|
101
|
+
style: {
|
|
102
|
+
display: showAction ? undefined : 'none'
|
|
137
103
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
renderActions
|
|
151
|
-
) : date && /* @__PURE__ */ React.createElement("div", { className: cx(styles.time, classNames.time) }, (0, import_time.getChatItemTime)(date))
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
var ListItem_default = ListItem;
|
|
156
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
157
|
-
0 && (module.exports = {});
|
|
104
|
+
onClick: function onClick(e) {
|
|
105
|
+
e.stopPropagation();
|
|
106
|
+
},
|
|
107
|
+
children: renderActions
|
|
108
|
+
}) : date && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
109
|
+
className: cx(styles.time, classNames.time),
|
|
110
|
+
children: (0, _time.getChatItemTime)(date)
|
|
111
|
+
})]
|
|
112
|
+
}));
|
|
113
|
+
});
|
|
114
|
+
var _default = ListItem;
|
|
115
|
+
exports.default = _default;
|
|
@@ -1,50 +1,18 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
"use strict";
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
getChatItemTime: () => getChatItemTime
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
33
6
|
});
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var getChatItemTime = (updateAt)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (time.isSame((0,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return "昨天";
|
|
45
|
-
return time.format("MM-DD");
|
|
7
|
+
exports.getChatItemTime = void 0;
|
|
8
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
9
|
+
require("dayjs/locale/zh-cn");
|
|
10
|
+
_dayjs.default.locale('zh-cn');
|
|
11
|
+
var getChatItemTime = function getChatItemTime(updateAt) {
|
|
12
|
+
var time = (0, _dayjs.default)(updateAt);
|
|
13
|
+
var diff = (0, _dayjs.default)().day() - time.day();
|
|
14
|
+
if (time.isSame((0, _dayjs.default)(), 'day')) return time.format('HH:mm');
|
|
15
|
+
if (diff === 1) return '昨天';
|
|
16
|
+
return time.format('MM-DD');
|
|
46
17
|
};
|
|
47
|
-
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
getChatItemTime
|
|
50
|
-
});
|
|
18
|
+
exports.getChatItemTime = getChatItemTime;
|
package/lib/List/index.js
CHANGED
|
@@ -1,41 +1,13 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
"use strict";
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
default: () => List_default
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
33
6
|
});
|
|
34
|
-
|
|
35
|
-
var
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _ListItem = _interopRequireDefault(require("./ListItem"));
|
|
36
9
|
var List = {
|
|
37
|
-
Item:
|
|
10
|
+
Item: _ListItem.default
|
|
38
11
|
};
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
0 && (module.exports = {});
|
|
12
|
+
var _default = List;
|
|
13
|
+
exports.default = _default;
|
package/lib/Logo/Divider.js
CHANGED
|
@@ -1,41 +1,28 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
"use strict";
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
default: () => Divider_default
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
23
6
|
});
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var Divider = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
13
|
+
var props = Object.assign({}, ((0, _objectDestructuringEmpty2.default)(_ref), _ref));
|
|
14
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
29
15
|
fill: "none",
|
|
30
16
|
stroke: "currentColor",
|
|
31
17
|
strokeLinecap: "round",
|
|
32
18
|
strokeLinejoin: "round",
|
|
33
19
|
shapeRendering: "geometricPrecision",
|
|
34
|
-
viewBox: "0 0 24 24"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
viewBox: "0 0 24 24"
|
|
21
|
+
}, props), {}, {
|
|
22
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
23
|
+
d: "M16.88 3.549L7.12 20.451"
|
|
24
|
+
})
|
|
25
|
+
}));
|
|
26
|
+
});
|
|
27
|
+
var _default = Divider;
|
|
28
|
+
exports.default = _default;
|