@lobehub/ui 1.157.1 → 1.158.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.
Files changed (158) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.js +11 -15
  3. package/es/ActionIconGroup/index.js +45 -47
  4. package/es/Alert/index.js +43 -50
  5. package/es/Avatar/index.js +10 -12
  6. package/es/Burger/index.js +30 -35
  7. package/es/CodeEditor/index.js +38 -41
  8. package/es/Collapse/index.js +3 -3
  9. package/es/ColorScales/ScaleRow.js +39 -43
  10. package/es/ColorScales/index.js +57 -59
  11. package/es/ConfigProvider/index.js +3 -5
  12. package/es/ContextMenu/index.js +2 -3
  13. package/es/CopyButton/index.js +3 -4
  14. package/es/DraggablePanel/components/DraggablePanelBody.js +2 -3
  15. package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -3
  16. package/es/DraggablePanel/components/DraggablePanelFooter.js +2 -3
  17. package/es/DraggablePanel/components/DraggablePanelHeader.js +5 -9
  18. package/es/DraggablePanel/index.js +28 -35
  19. package/es/EditableText/index.js +13 -16
  20. package/es/EmojiPicker/AvatarUploader.js +60 -71
  21. package/es/EmojiPicker/index.js +101 -110
  22. package/es/EmptyCard/index.js +23 -31
  23. package/es/FileTypeIcon/index.js +44 -55
  24. package/es/FluentEmoji/index.js +4 -6
  25. package/es/Footer/index.js +8 -10
  26. package/es/Form/components/FormDivider.js +2 -2
  27. package/es/Form/components/FormFlatGroup.js +4 -9
  28. package/es/Form/components/FormFooter.js +3 -6
  29. package/es/Form/components/FormGroup.js +15 -21
  30. package/es/Form/components/FormItem.js +10 -17
  31. package/es/Form/components/FormTitle.js +15 -23
  32. package/es/Form/index.js +26 -30
  33. package/es/FormModal/index.js +30 -34
  34. package/es/Grid/index.js +3 -6
  35. package/es/Header/index.js +49 -65
  36. package/es/Highlighter/FullFeatured.js +41 -51
  37. package/es/Highlighter/SyntaxHighlighter/index.js +19 -30
  38. package/es/Highlighter/index.js +19 -29
  39. package/es/Icon/icons/DiscordIcon.js +2 -3
  40. package/es/Icon/index.js +13 -16
  41. package/es/Image/ImageGallery.js +3 -5
  42. package/es/Image/Preview.js +5 -6
  43. package/es/Image/index.js +34 -38
  44. package/es/Image/usePreview.js +33 -37
  45. package/es/Img/index.js +2 -2
  46. package/es/Input/index.js +3 -3
  47. package/es/Layout/index.js +35 -63
  48. package/es/List/ListItem/index.js +53 -67
  49. package/es/Markdown/CodeBlock.js +10 -16
  50. package/es/Markdown/Typography.js +3 -6
  51. package/es/Markdown/index.js +18 -22
  52. package/es/MaterialFileTypeIcon/index.js +17 -20
  53. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  54. package/es/Mermaid/FullFeatured.js +35 -45
  55. package/es/Mermaid/index.js +17 -26
  56. package/es/Mermaid/useMermaid.d.ts +2 -1
  57. package/es/Mermaid/useMermaid.js +3 -5
  58. package/es/Modal/index.js +48 -60
  59. package/es/SearchBar/index.js +48 -52
  60. package/es/SelectWithImg/index.js +34 -40
  61. package/es/SideNav/index.js +15 -22
  62. package/es/SliderWithInput/index.js +35 -38
  63. package/es/Snippet/index.js +10 -15
  64. package/es/SortableList/DragHandle.js +3 -3
  65. package/es/SortableList/SortableItem.js +16 -19
  66. package/es/SortableList/SortableOverlay.js +3 -5
  67. package/es/SortableList/index.js +15 -23
  68. package/es/Swatches/index.js +18 -20
  69. package/es/TabsNav/index.js +2 -3
  70. package/es/Tag/index.js +7 -12
  71. package/es/ThemeProvider/Meta.js +53 -58
  72. package/es/ThemeProvider/index.js +17 -23
  73. package/es/ThemeSwitch/index.js +15 -19
  74. package/es/Toc/TocMobile.js +47 -52
  75. package/es/Toc/index.js +8 -13
  76. package/es/Tooltip/index.js +2 -3
  77. package/es/Video/index.js +41 -47
  78. package/es/awesome/AuroraBackground/index.js +11 -18
  79. package/es/awesome/Features/Item.js +37 -45
  80. package/es/awesome/Features/index.js +5 -4
  81. package/es/awesome/GaussianBackground/index.js +8 -13
  82. package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +1 -1
  83. package/es/awesome/GaussianBackground/useGaussianBackground.js +1 -1
  84. package/es/awesome/Giscus/index.js +13 -15
  85. package/es/awesome/GradientButton/index.js +5 -9
  86. package/es/awesome/GridBackground/Grid.js +49 -61
  87. package/es/awesome/GridBackground/GridShowcase.js +24 -28
  88. package/es/awesome/GridBackground/index.js +27 -33
  89. package/es/awesome/Hero/index.js +63 -74
  90. package/es/awesome/Spline/ParentSize.js +7 -8
  91. package/es/awesome/Spline/index.js +10 -13
  92. package/es/awesome/Spotlight/index.js +3 -4
  93. package/es/awesome/SpotlightCard/SpotlightCardItem.js +5 -8
  94. package/es/awesome/SpotlightCard/index.js +9 -12
  95. package/es/brand/BrandLoading/index.js +2 -3
  96. package/es/brand/LobeChat/index.js +29 -38
  97. package/es/brand/LobeChatText/index.js +8 -13
  98. package/es/brand/LobeHub/index.js +29 -38
  99. package/es/brand/LobeHubText/index.js +4 -9
  100. package/es/brand/Logo3d/index.js +2 -3
  101. package/es/brand/LogoFlat/index.js +44 -49
  102. package/es/brand/LogoMono/index.js +48 -53
  103. package/es/brand/LogoThree/Loading.js +9 -11
  104. package/es/brand/LogoThree/LogoSpline.js +10 -12
  105. package/es/brand/LogoThree/index.js +23 -25
  106. package/es/brand/components/Divider.js +4 -6
  107. package/es/chat/BackBottom/index.js +4 -6
  108. package/es/chat/ChatHeader/ChatHeaderTitle.js +22 -31
  109. package/es/chat/ChatHeader/index.js +35 -42
  110. package/es/chat/ChatInputArea/ChatInputActionBar.js +16 -21
  111. package/es/chat/ChatInputArea/ChatInputArea.d.ts +1 -1
  112. package/es/chat/ChatInputArea/ChatInputArea.js +19 -23
  113. package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +1 -1
  114. package/es/chat/ChatInputArea/ChatInputAreaInner.js +2 -3
  115. package/es/chat/ChatInputArea/SendButton.js +36 -51
  116. package/es/chat/ChatItem/components/Actions.js +3 -5
  117. package/es/chat/ChatItem/components/Avatar.js +17 -21
  118. package/es/chat/ChatItem/components/BorderSpacing.js +1 -2
  119. package/es/chat/ChatItem/components/ErrorContent.js +9 -11
  120. package/es/chat/ChatItem/components/Loading.js +10 -12
  121. package/es/chat/ChatItem/components/MessageContent.js +6 -10
  122. package/es/chat/ChatItem/components/Title.js +3 -8
  123. package/es/chat/ChatItem/index.js +47 -53
  124. package/es/chat/ChatList/ActionsBar.js +2 -3
  125. package/es/chat/ChatList/HistoryDivider.js +6 -11
  126. package/es/chat/ChatList/Item.js +14 -12
  127. package/es/chat/ChatList/index.js +25 -29
  128. package/es/chat/EditableMessage/index.js +26 -32
  129. package/es/chat/EditableMessageList/index.js +72 -76
  130. package/es/chat/MessageInput/index.js +35 -43
  131. package/es/chat/MessageModal/index.js +41 -51
  132. package/es/chat/TokenTag/index.js +7 -11
  133. package/es/components/ControlInput.js +18 -22
  134. package/es/hooks/useHighlight.d.ts +1 -1
  135. package/es/hooks/useHighlight.js +1 -1
  136. package/es/mdx/Callout/index.js +13 -19
  137. package/es/mdx/Cards/Card.js +46 -59
  138. package/es/mdx/Cards/index.js +3 -6
  139. package/es/mdx/FileTree/File.js +5 -11
  140. package/es/mdx/FileTree/Folder.js +13 -22
  141. package/es/mdx/FileTree/index.js +3 -6
  142. package/es/mdx/Mdx/index.js +7 -9
  143. package/es/mdx/Steps/index.js +3 -6
  144. package/es/mdx/Tabs/Tab.js +3 -8
  145. package/es/mdx/Tabs/index.js +17 -21
  146. package/es/mdx/mdxComponents/CodeBlock.js +9 -14
  147. package/es/mdx/mdxComponents/Image.js +2 -2
  148. package/es/mdx/mdxComponents/Link.js +2 -3
  149. package/es/mdx/mdxComponents/Pre.js +7 -14
  150. package/es/mdx/mdxComponents/Video.js +2 -2
  151. package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
  152. package/es/mobile/MobileChatInputArea/index.js +69 -79
  153. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
  154. package/es/mobile/MobileNavBar/index.js +41 -48
  155. package/es/mobile/MobileSafeArea/index.js +2 -3
  156. package/es/mobile/MobileTabBar/index.js +29 -35
  157. package/es/storybook/StoryBook/index.js +19 -26
  158. package/package.json +43 -46
@@ -6,8 +6,6 @@ import AvatarEditor from 'react-avatar-editor';
6
6
  import { Center, Flexbox } from 'react-layout-kit';
7
7
  import Icon from "../Icon";
8
8
  import { useStyles } from "./style";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
9
  var Dragger = Upload.Dragger;
12
10
  var createUploadImageHandler = function createUploadImageHandler(onUploadImage) {
13
11
  return function (file) {
@@ -52,78 +50,69 @@ var AvatarUploader = /*#__PURE__*/memo(function (_ref) {
52
50
  });
53
51
  onUpload === null || onUpload === void 0 || onUpload(file);
54
52
  };
55
- return /*#__PURE__*/_jsxs(Flexbox, {
53
+ return /*#__PURE__*/React.createElement(Flexbox, {
56
54
  padding: 10,
57
55
  style: {
58
56
  position: 'relative'
59
57
  },
60
- width: '100%',
61
- children: [!previewImage && /*#__PURE__*/_jsx(Dragger, {
62
- accept: 'image',
63
- beforeUpload: beforeUpload,
64
- itemRender: function itemRender() {
65
- return void 0;
66
- },
67
- maxCount: 1,
68
- multiple: false,
69
- children: /*#__PURE__*/_jsxs(Center, {
70
- gap: 16,
71
- height: compressSize,
72
- width: compressSize,
73
- children: [/*#__PURE__*/_jsx(Icon, {
74
- icon: ImageUpIcon,
75
- size: {
76
- fontSize: 48,
77
- strokeWidth: 1.5
78
- }
79
- }), /*#__PURE__*/_jsx("div", {
80
- children: (texts === null || texts === void 0 ? void 0 : texts.draggerDesc) || 'Click or Drag image to this area to upload'
81
- })]
82
- })
83
- }), previewImage && /*#__PURE__*/_jsxs(Center, {
84
- gap: 8,
85
- style: {
86
- position: 'relative'
87
- },
88
- width: '100%',
89
- children: [/*#__PURE__*/_jsx(Flexbox, {
90
- className: styles.editor,
91
- children: /*#__PURE__*/_jsx(AvatarEditor, {
92
- border: 0,
93
- borderRadius: compressSize / 2,
94
- height: compressSize,
95
- image: previewImage,
96
- ref: editor,
97
- width: compressSize
98
- })
99
- }), /*#__PURE__*/_jsxs(Flexbox, {
100
- gap: 8,
101
- horizontal: true,
102
- style: {
103
- position: 'relative'
104
- },
105
- width: '100%',
106
- children: [/*#__PURE__*/_jsx(Button, {
107
- icon: /*#__PURE__*/_jsx(Icon, {
108
- icon: ChevronLeftIcon
109
- }),
110
- onClick: function onClick() {
111
- return setPreviewImage('');
112
- },
113
- style: {
114
- flex: 'none'
115
- }
116
- }), /*#__PURE__*/_jsx(Button, {
117
- onClick: handleUpload,
118
- style: {
119
- flex: 1,
120
- fontWeight: 500
121
- },
122
- type: 'primary',
123
- children: (texts === null || texts === void 0 ? void 0 : texts.uploadBtn) || 'Crop and Upload'
124
- })]
125
- })]
126
- })]
127
- });
58
+ width: '100%'
59
+ }, !previewImage && /*#__PURE__*/React.createElement(Dragger, {
60
+ accept: 'image',
61
+ beforeUpload: beforeUpload,
62
+ itemRender: function itemRender() {
63
+ return void 0;
64
+ },
65
+ maxCount: 1,
66
+ multiple: false
67
+ }, /*#__PURE__*/React.createElement(Center, {
68
+ gap: 16,
69
+ height: compressSize,
70
+ width: compressSize
71
+ }, /*#__PURE__*/React.createElement(Icon, {
72
+ icon: ImageUpIcon,
73
+ size: {
74
+ fontSize: 48,
75
+ strokeWidth: 1.5
76
+ }
77
+ }), /*#__PURE__*/React.createElement("div", null, (texts === null || texts === void 0 ? void 0 : texts.draggerDesc) || 'Click or Drag image to this area to upload'))), previewImage && /*#__PURE__*/React.createElement(Center, {
78
+ gap: 8,
79
+ style: {
80
+ position: 'relative'
81
+ },
82
+ width: '100%'
83
+ }, /*#__PURE__*/React.createElement(Flexbox, {
84
+ className: styles.editor
85
+ }, /*#__PURE__*/React.createElement(AvatarEditor, {
86
+ border: 0,
87
+ borderRadius: compressSize / 2,
88
+ height: compressSize,
89
+ image: previewImage,
90
+ ref: editor,
91
+ width: compressSize
92
+ })), /*#__PURE__*/React.createElement(Flexbox, {
93
+ gap: 8,
94
+ horizontal: true,
95
+ style: {
96
+ position: 'relative'
97
+ },
98
+ width: '100%'
99
+ }, /*#__PURE__*/React.createElement(Button, {
100
+ icon: /*#__PURE__*/React.createElement(Icon, {
101
+ icon: ChevronLeftIcon
102
+ }),
103
+ onClick: function onClick() {
104
+ return setPreviewImage('');
105
+ },
106
+ style: {
107
+ flex: 'none'
108
+ }
109
+ }), /*#__PURE__*/React.createElement(Button, {
110
+ onClick: handleUpload,
111
+ style: {
112
+ flex: 1,
113
+ fontWeight: 500
114
+ },
115
+ type: 'primary'
116
+ }, (texts === null || texts === void 0 ? void 0 : texts.uploadBtn) || 'Crop and Upload'))));
128
117
  });
129
118
  export default AvatarUploader;
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
 
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
5
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
6
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
@@ -22,8 +23,6 @@ import TabsNav from "../TabsNav";
22
23
  import Tooltip from "../Tooltip";
23
24
  import AvatarUploader from "./AvatarUploader";
24
25
  import { useStyles } from "./style";
25
- import { jsx as _jsx } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
27
26
  var DEFAULT_AVATAR = '🤖';
28
27
  var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
29
28
  var value = _ref.value,
@@ -112,28 +111,26 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
112
111
  }, [active, open]);
113
112
  var items = [{
114
113
  key: 'emoji',
115
- label: /*#__PURE__*/_jsx(Tooltip, {
116
- title: (texts === null || texts === void 0 ? void 0 : texts.emoji) || 'Emoji',
117
- children: /*#__PURE__*/_jsx(Icon, {
118
- icon: SmileIcon,
119
- size: {
120
- fontSize: 20,
121
- strokeWidth: 2.5
122
- }
123
- })
124
- })
114
+ label: /*#__PURE__*/React.createElement(Tooltip, {
115
+ title: (texts === null || texts === void 0 ? void 0 : texts.emoji) || 'Emoji'
116
+ }, /*#__PURE__*/React.createElement(Icon, {
117
+ icon: SmileIcon,
118
+ size: {
119
+ fontSize: 20,
120
+ strokeWidth: 2.5
121
+ }
122
+ }))
125
123
  }, allowUpload && {
126
124
  key: 'upload',
127
- label: /*#__PURE__*/_jsx(Tooltip, {
128
- title: (texts === null || texts === void 0 ? void 0 : texts.upload) || 'Upload',
129
- children: /*#__PURE__*/_jsx(Icon, {
130
- icon: UploadIcon,
131
- size: {
132
- fontSize: 20,
133
- strokeWidth: 2.5
134
- }
135
- })
136
- })
125
+ label: /*#__PURE__*/React.createElement(Tooltip, {
126
+ title: (texts === null || texts === void 0 ? void 0 : texts.upload) || 'Upload'
127
+ }, /*#__PURE__*/React.createElement(Icon, {
128
+ icon: UploadIcon,
129
+ size: {
130
+ fontSize: 20,
131
+ strokeWidth: 2.5
132
+ }
133
+ }))
137
134
  }].concat(_toConsumableArray(customTabs.map(function (tab) {
138
135
  return {
139
136
  key: tab.value,
@@ -141,9 +138,9 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
141
138
  };
142
139
  }))).filter(Boolean);
143
140
  var showTabs = items && items.length > 1;
144
- return /*#__PURE__*/_jsx(Popover, {
141
+ return /*#__PURE__*/React.createElement(Popover, {
145
142
  arrow: false,
146
- content: /*#__PURE__*/_jsxs(Flexbox, {
143
+ content: /*#__PURE__*/React.createElement(Flexbox, {
147
144
  className: cx(styles.picker, popupClassName),
148
145
  onMouseEnter: function onMouseEnter() {
149
146
  return setActive(true);
@@ -155,95 +152,89 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
155
152
  style: _objectSpread({
156
153
  minWidth: 310,
157
154
  paddingTop: showTabs ? 4 : 0
158
- }, popupStyle),
159
- children: [showTabs && /*#__PURE__*/_jsxs(Flexbox, {
160
- align: 'center',
161
- horizontal: true,
162
- justify: 'space-between',
163
- paddingInline: 10,
164
- children: [/*#__PURE__*/_jsx(TabsNav, {
165
- activeKey: tab,
166
- items: items,
167
- onChange: function onChange(key) {
168
- return setTab(key);
169
- },
170
- variant: 'compact'
171
- }), allowDelete && /*#__PURE__*/_jsx(ActionIcon, {
172
- icon: TrashIcon,
173
- onClick: function onClick() {
174
- handleAvatarChange(defaultAvatar);
175
- onDelete === null || onDelete === void 0 || onDelete();
176
- },
177
- size: {
178
- fontSize: 20,
179
- strokeWidth: 2.5
180
- },
181
- title: (texts === null || texts === void 0 ? void 0 : texts.delete) || 'Delete'
182
- })]
183
- }), tab === 'emoji' && /*#__PURE__*/_jsx(Picker, {
184
- custom: customEmojis,
185
- data: data,
186
- i18n: i18n,
187
- icons: 'outline',
188
- locale: locale.split('-')[0],
189
- navPosition: showTabs ? 'bottom' : 'top',
190
- onEmojiSelect: function onEmojiSelect(e) {
191
- return handleAvatarChange(e.src || e.native);
192
- },
193
- previewPosition: 'none',
194
- skinTonePosition: 'none',
195
- theme: theme.isDarkMode ? 'dark' : 'light'
196
- }), tab === 'upload' && /*#__PURE__*/_jsx(AvatarUploader, {
197
- compressSize: compressSize,
198
- onChange: handleAvatarChange,
199
- onUpload: onUpload,
200
- texts: texts
201
- }), customTabs.map(function (item) {
202
- return tab === item.value && /*#__PURE__*/_jsx(Flexbox, {
203
- padding: 10,
204
- children: item.render(handleAvatarChange)
205
- }, item.value);
206
- })]
207
- }),
155
+ }, popupStyle)
156
+ }, showTabs && /*#__PURE__*/React.createElement(Flexbox, {
157
+ align: 'center',
158
+ horizontal: true,
159
+ justify: 'space-between',
160
+ paddingInline: 10
161
+ }, /*#__PURE__*/React.createElement(TabsNav, {
162
+ activeKey: tab,
163
+ items: items,
164
+ onChange: function onChange(key) {
165
+ return setTab(key);
166
+ },
167
+ variant: 'compact'
168
+ }), allowDelete && /*#__PURE__*/React.createElement(ActionIcon, {
169
+ icon: TrashIcon,
170
+ onClick: function onClick() {
171
+ handleAvatarChange(defaultAvatar);
172
+ onDelete === null || onDelete === void 0 || onDelete();
173
+ },
174
+ size: {
175
+ fontSize: 20,
176
+ strokeWidth: 2.5
177
+ },
178
+ title: (texts === null || texts === void 0 ? void 0 : texts.delete) || 'Delete'
179
+ })), tab === 'emoji' && /*#__PURE__*/React.createElement(Picker, {
180
+ custom: customEmojis,
181
+ data: data,
182
+ i18n: i18n,
183
+ icons: 'outline',
184
+ locale: locale.split('-')[0],
185
+ navPosition: showTabs ? 'bottom' : 'top',
186
+ onEmojiSelect: function onEmojiSelect(e) {
187
+ return handleAvatarChange(e.src || e.native);
188
+ },
189
+ previewPosition: 'none',
190
+ skinTonePosition: 'none',
191
+ theme: theme.isDarkMode ? 'dark' : 'light'
192
+ }), tab === 'upload' && /*#__PURE__*/React.createElement(AvatarUploader, {
193
+ compressSize: compressSize,
194
+ onChange: handleAvatarChange,
195
+ onUpload: onUpload,
196
+ texts: texts
197
+ }), customTabs.map(function (item) {
198
+ return tab === item.value && /*#__PURE__*/React.createElement(Flexbox, {
199
+ key: item.value,
200
+ padding: 10
201
+ }, item.render(handleAvatarChange));
202
+ })),
208
203
  destroyTooltipOnHide: true,
209
204
  open: open,
210
205
  placement: 'bottomLeft',
211
206
  rootClassName: styles.popover,
212
- trigger: ['click'],
213
- children: /*#__PURE__*/_jsxs(Center, _objectSpread(_objectSpread({
214
- className: cx(styles.avatar, className),
215
- flex: 'none',
216
- height: size,
217
- onClick: function onClick(e) {
218
- if (loading) return;
219
- setOpen(!open);
220
- _onClick === null || _onClick === void 0 || _onClick(e);
221
- },
222
- onMouseEnter: function onMouseEnter() {
223
- return setActive(true);
224
- },
225
- onMouseLeave: function onMouseLeave() {
226
- return setActive(false);
227
- },
228
- width: size
229
- }, rest), {}, {
230
- children: [loading && /*#__PURE__*/_jsx(Center, {
231
- className: styles.loading,
232
- height: '100%',
233
- width: '100%',
234
- children: /*#__PURE__*/_jsx(Icon, {
235
- icon: Loader2Icon,
236
- size: {
237
- fontSize: size / 2
238
- },
239
- spin: true
240
- })
241
- }), /*#__PURE__*/_jsx(Avatar, {
242
- avatar: ava,
243
- background: backgroundColor,
244
- size: size
245
- })]
246
- }))
247
- });
207
+ trigger: ['click']
208
+ }, /*#__PURE__*/React.createElement(Center, _extends({
209
+ className: cx(styles.avatar, className),
210
+ flex: 'none',
211
+ height: size,
212
+ onClick: function onClick(e) {
213
+ if (loading) return;
214
+ setOpen(!open);
215
+ _onClick === null || _onClick === void 0 || _onClick(e);
216
+ },
217
+ onMouseEnter: function onMouseEnter() {
218
+ return setActive(true);
219
+ },
220
+ onMouseLeave: function onMouseLeave() {
221
+ return setActive(false);
222
+ },
223
+ width: size
224
+ }, rest), loading && /*#__PURE__*/React.createElement(Center, {
225
+ className: styles.loading,
226
+ height: '100%',
227
+ width: '100%'
228
+ }, /*#__PURE__*/React.createElement(Icon, {
229
+ icon: Loader2Icon,
230
+ size: {
231
+ fontSize: size / 2
232
+ },
233
+ spin: true
234
+ })), /*#__PURE__*/React.createElement(Avatar, {
235
+ avatar: ava,
236
+ background: backgroundColor,
237
+ size: size
238
+ })));
248
239
  });
249
240
  export default EmojiPicker;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  var _excluded = ["cover", "visible", "defaultVisible", "onVisibleChange", "alt", "title", "desc", "width", "height", "imageProps"];
@@ -11,8 +11,6 @@ import useMergeState from 'use-merge-value';
11
11
  import ActionIcon from "../ActionIcon";
12
12
  import Img from "../Img";
13
13
  import { useStyles } from "./style";
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
14
  var EmptyCard = /*#__PURE__*/memo(function (_ref) {
17
15
  var cover = _ref.cover,
18
16
  visible = _ref.visible,
@@ -36,34 +34,28 @@ var EmptyCard = /*#__PURE__*/memo(function (_ref) {
36
34
  var _useStyles = useStyles(),
37
35
  styles = _useStyles.styles;
38
36
  if (!value) return null;
39
- return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
37
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
40
38
  className: styles.container
41
- }, rest), {}, {
42
- children: [/*#__PURE__*/_jsx(ActionIcon, {
43
- className: styles.close,
44
- icon: X,
45
- onClick: function onClick() {
46
- return setValue(false);
47
- },
48
- size: {
49
- blockSize: 24,
50
- fontSize: 16
51
- }
52
- }), cover && /*#__PURE__*/_jsx(Img, _objectSpread({
53
- alt: alt,
54
- className: styles.image,
55
- height: height,
56
- src: cover,
57
- width: width
58
- }, imageProps)), /*#__PURE__*/_jsxs("div", {
59
- className: styles.content,
60
- children: [title && /*#__PURE__*/_jsx("h3", {
61
- children: title
62
- }), desc && /*#__PURE__*/_jsx("p", {
63
- className: styles.desc,
64
- children: desc
65
- })]
66
- })]
67
- }));
39
+ }, rest), /*#__PURE__*/React.createElement(ActionIcon, {
40
+ className: styles.close,
41
+ icon: X,
42
+ onClick: function onClick() {
43
+ return setValue(false);
44
+ },
45
+ size: {
46
+ blockSize: 24,
47
+ fontSize: 16
48
+ }
49
+ }), cover && /*#__PURE__*/React.createElement(Img, _extends({
50
+ alt: alt,
51
+ className: styles.image,
52
+ height: height,
53
+ src: cover,
54
+ width: width
55
+ }, imageProps)), /*#__PURE__*/React.createElement("div", {
56
+ className: styles.content
57
+ }, title && /*#__PURE__*/React.createElement("h3", null, title), desc && /*#__PURE__*/React.createElement("p", {
58
+ className: styles.desc
59
+ }, desc)));
68
60
  });
69
61
  export default EmptyCard;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
6
  var _excluded = ["icon", "color", "filetype", "type", "size", "style", "variant", "className"];
@@ -8,8 +8,6 @@ var _templateObject, _templateObject2;
8
8
  import { createStyles } from 'antd-style';
9
9
  import { memo, useMemo } from 'react';
10
10
  import { Center } from 'react-layout-kit';
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
11
  var useStyles = createStyles(function (_ref) {
14
12
  var css = _ref.css;
15
13
  return {
@@ -43,75 +41,66 @@ var FileTypeIcon = /*#__PURE__*/memo(function (_ref2) {
43
41
  var isMono = variant === 'mono';
44
42
  var iconColor = isMono ? theme.isDarkMode ? theme.colorFill : theme.colorBgContainer : color || theme.geekblue;
45
43
  var content;
46
- content = type === 'file' ? /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({
44
+ content = type === 'file' ? /*#__PURE__*/React.createElement("svg", _extends({
47
45
  className: cx(styles.icon, !icon && className),
48
46
  height: size,
49
47
  style: icon ? undefined : style,
50
48
  viewBox: "0 0 24 24",
51
49
  width: size,
52
50
  xmlns: "http://www.w3.org/2000/svg"
53
- }, rest), {}, {
54
- children: [/*#__PURE__*/_jsx("path", {
55
- d: "M6 2a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6H6z",
56
- fill: iconColor
57
- }), /*#__PURE__*/_jsx("path", {
58
- d: "M14 2l6 6h-4a2 2 0 01-2-2V2z",
59
- fill: isMono ? theme.colorFill : '#fff',
60
- fillOpacity: ".5"
61
- }), filetypeShort && /*#__PURE__*/_jsx("text", {
62
- fill: isMono ? theme.colorTextSecondary : '#fff',
63
- fontSize: fontSize,
64
- fontWeight: "bold",
65
- textAnchor: "middle",
66
- x: "50%",
67
- y: "70%",
68
- children: filetypeShort.toUpperCase()
69
- }), /*#__PURE__*/_jsx("path", {
70
- d: "M6 2a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6H6z",
71
- fill: 'transparent',
72
- stroke: theme.colorFillSecondary,
73
- strokeWidth: 0.5
74
- })]
75
- })) : /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({
51
+ }, rest), /*#__PURE__*/React.createElement("path", {
52
+ d: "M6 2a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6H6z",
53
+ fill: iconColor
54
+ }), /*#__PURE__*/React.createElement("path", {
55
+ d: "M14 2l6 6h-4a2 2 0 01-2-2V2z",
56
+ fill: isMono ? theme.colorFill : '#fff',
57
+ fillOpacity: ".5"
58
+ }), filetypeShort && /*#__PURE__*/React.createElement("text", {
59
+ fill: isMono ? theme.colorTextSecondary : '#fff',
60
+ fontSize: fontSize,
61
+ fontWeight: "bold",
62
+ textAnchor: "middle",
63
+ x: "50%",
64
+ y: "70%"
65
+ }, filetypeShort.toUpperCase()), /*#__PURE__*/React.createElement("path", {
66
+ d: "M6 2a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6H6z",
67
+ fill: 'transparent',
68
+ stroke: theme.colorFillSecondary,
69
+ strokeWidth: 0.5
70
+ })) : /*#__PURE__*/React.createElement("svg", _extends({
76
71
  className: cx(styles.icon, !icon && className),
77
72
  height: size,
78
73
  style: icon ? undefined : style,
79
74
  viewBox: "0 0 24 24",
80
75
  width: size,
81
76
  xmlns: "http://www.w3.org/2000/svg"
82
- }, rest), {}, {
83
- children: [/*#__PURE__*/_jsx("path", {
84
- d: "M10.46 5.076l-.92-.752A1.446 1.446 0 008.626 4H3.429c-.38 0-.743.147-1.01.41A1.386 1.386 0 002 5.4v13.2c0 .371.15.727.418.99.268.262.632.41 1.01.41h17.143c.38 0 .743-.148 1.01-.41.268-.263.419-.619.419-.99V6.8c0-.371-.15-.727-.418-.99a1.444 1.444 0 00-1.01-.41h-9.198c-.334 0-.657-.115-.914-.324z",
85
- fill: iconColor,
86
- stroke: theme.colorFillSecondary,
87
- strokeWidth: 0.5
88
- }), !icon && filetype && /*#__PURE__*/_jsx("text", {
89
- fill: isMono ? theme.colorTextSecondary : '#fff',
90
- fontSize: fontSize,
91
- fontWeight: "bold",
92
- textAnchor: "middle",
93
- x: '50%',
94
- y: "70%",
95
- children: filetype.toUpperCase()
96
- })]
97
- }));
77
+ }, rest), /*#__PURE__*/React.createElement("path", {
78
+ d: "M10.46 5.076l-.92-.752A1.446 1.446 0 008.626 4H3.429c-.38 0-.743.147-1.01.41A1.386 1.386 0 002 5.4v13.2c0 .371.15.727.418.99.268.262.632.41 1.01.41h17.143c.38 0 .743-.148 1.01-.41.268-.263.419-.619.419-.99V6.8c0-.371-.15-.727-.418-.99a1.444 1.444 0 00-1.01-.41h-9.198c-.334 0-.657-.115-.914-.324z",
79
+ fill: iconColor,
80
+ stroke: theme.colorFillSecondary,
81
+ strokeWidth: 0.5
82
+ }), !icon && filetype && /*#__PURE__*/React.createElement("text", {
83
+ fill: isMono ? theme.colorTextSecondary : '#fff',
84
+ fontSize: fontSize,
85
+ fontWeight: "bold",
86
+ textAnchor: "middle",
87
+ x: '50%',
88
+ y: "70%"
89
+ }, filetype.toUpperCase()));
98
90
  if (!icon) return content;
99
- return /*#__PURE__*/_jsxs(Center, _objectSpread(_objectSpread({
91
+ return /*#__PURE__*/React.createElement(Center, _extends({
100
92
  className: cx(styles.container, className),
101
93
  flex: 'none',
102
94
  height: size,
103
95
  style: style,
104
96
  width: size
105
- }, rest), {}, {
106
- children: [/*#__PURE__*/_jsx("div", {
107
- style: {
108
- fontSize: size / 2.4,
109
- position: 'absolute',
110
- top: type === 'file' ? '20%' : '16%',
111
- zIndex: 1
112
- },
113
- children: icon
114
- }), content]
115
- }));
97
+ }, rest), /*#__PURE__*/React.createElement("div", {
98
+ style: {
99
+ fontSize: size / 2.4,
100
+ position: 'absolute',
101
+ top: type === 'file' ? '20%' : '16%',
102
+ zIndex: 1
103
+ }
104
+ }, icon), content);
116
105
  });
117
106
  export default FileTypeIcon;
@@ -8,7 +8,6 @@ import { useCdnFn } from "../ConfigProvider";
8
8
  import Img from "../Img";
9
9
  import { useStyles } from "./style";
10
10
  import { genEmojiUrl } from "./utils";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
11
  var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
13
12
  var emoji = _ref.emoji,
14
13
  className = _ref.className,
@@ -29,17 +28,16 @@ var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
29
28
  var emojiUrl = useMemo(function () {
30
29
  return genEmojiUrl(emoji, type);
31
30
  }, [type, emoji]);
32
- if (type === 'pure' || !emojiUrl || loadingFail) return /*#__PURE__*/_jsx(Center, {
31
+ if (type === 'pure' || !emojiUrl || loadingFail) return /*#__PURE__*/React.createElement(Center, {
33
32
  className: cx(styles.container, className),
34
33
  flex: 'none',
35
34
  height: size,
36
35
  style: _objectSpread({
37
36
  fontSize: size * 0.9
38
37
  }, style),
39
- width: size,
40
- children: emoji
41
- });
42
- return /*#__PURE__*/_jsx(Img, {
38
+ width: size
39
+ }, emoji);
40
+ return /*#__PURE__*/React.createElement(Img, {
43
41
  alt: emoji,
44
42
  className: className,
45
43
  height: size,