@lobehub/ui 1.158.1 → 1.160.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.
Files changed (153) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.js +15 -11
  3. package/es/ActionIconGroup/index.js +47 -45
  4. package/es/Alert/index.js +50 -43
  5. package/es/Avatar/index.js +12 -10
  6. package/es/Burger/index.js +35 -30
  7. package/es/CodeEditor/index.js +43 -38
  8. package/es/Collapse/index.js +3 -3
  9. package/es/ColorScales/ScaleRow.js +43 -39
  10. package/es/ColorScales/index.js +59 -57
  11. package/es/ConfigProvider/index.js +5 -3
  12. package/es/ContextMenu/index.js +3 -2
  13. package/es/CopyButton/index.js +4 -3
  14. package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
  15. package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
  16. package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
  17. package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
  18. package/es/DraggablePanel/index.js +32 -25
  19. package/es/EditableText/index.js +16 -13
  20. package/es/EmojiPicker/AvatarUploader.js +71 -60
  21. package/es/EmojiPicker/index.js +110 -101
  22. package/es/EmptyCard/index.js +31 -23
  23. package/es/FileTypeIcon/index.js +55 -44
  24. package/es/FluentEmoji/index.js +6 -4
  25. package/es/Footer/index.js +10 -8
  26. package/es/Form/components/FormDivider.js +2 -2
  27. package/es/Form/components/FormFlatGroup.js +9 -4
  28. package/es/Form/components/FormFooter.js +6 -3
  29. package/es/Form/components/FormGroup.js +21 -15
  30. package/es/Form/components/FormItem.js +17 -10
  31. package/es/Form/components/FormTitle.js +23 -15
  32. package/es/Form/index.js +30 -26
  33. package/es/FormModal/index.js +34 -30
  34. package/es/Grid/index.js +6 -3
  35. package/es/Header/index.js +65 -49
  36. package/es/Highlighter/FullFeatured.js +51 -41
  37. package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
  38. package/es/Highlighter/index.js +29 -19
  39. package/es/Icon/icons/DiscordIcon.js +3 -2
  40. package/es/Icon/index.js +16 -13
  41. package/es/Image/ImageGallery.js +5 -3
  42. package/es/Image/Preview.js +5 -3
  43. package/es/Image/index.js +38 -34
  44. package/es/Image/usePreview.js +37 -33
  45. package/es/Img/index.js +2 -2
  46. package/es/Input/index.js +3 -3
  47. package/es/Layout/index.js +63 -35
  48. package/es/List/ListItem/index.js +67 -53
  49. package/es/Markdown/CodeBlock.js +16 -10
  50. package/es/Markdown/Typography.js +6 -3
  51. package/es/Markdown/index.js +22 -18
  52. package/es/MaterialFileTypeIcon/index.js +20 -17
  53. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  54. package/es/Mermaid/FullFeatured.js +45 -35
  55. package/es/Mermaid/index.js +26 -17
  56. package/es/Mermaid/useMermaid.d.ts +1 -2
  57. package/es/Mermaid/useMermaid.js +5 -3
  58. package/es/Modal/index.js +60 -48
  59. package/es/SearchBar/index.js +51 -47
  60. package/es/SelectWithImg/index.js +40 -34
  61. package/es/SideNav/index.js +22 -15
  62. package/es/SliderWithInput/index.js +38 -35
  63. package/es/Snippet/index.js +15 -10
  64. package/es/SortableList/DragHandle.js +3 -3
  65. package/es/SortableList/SortableItem.js +19 -16
  66. package/es/SortableList/SortableOverlay.js +5 -3
  67. package/es/SortableList/index.js +23 -15
  68. package/es/Swatches/index.js +20 -18
  69. package/es/TabsNav/index.js +3 -2
  70. package/es/Tag/index.js +12 -7
  71. package/es/ThemeProvider/Meta.js +58 -53
  72. package/es/ThemeProvider/index.js +23 -17
  73. package/es/ThemeSwitch/index.js +19 -15
  74. package/es/Toc/TocMobile.js +52 -47
  75. package/es/Toc/index.js +13 -8
  76. package/es/Tooltip/index.js +3 -2
  77. package/es/Video/index.js +47 -41
  78. package/es/awesome/AuroraBackground/index.js +18 -11
  79. package/es/awesome/Features/Item.js +45 -37
  80. package/es/awesome/Features/index.js +4 -5
  81. package/es/awesome/GaussianBackground/index.js +13 -8
  82. package/es/awesome/Giscus/index.js +15 -13
  83. package/es/awesome/GradientButton/index.js +9 -5
  84. package/es/awesome/GridBackground/Grid.js +61 -49
  85. package/es/awesome/GridBackground/GridShowcase.js +28 -24
  86. package/es/awesome/GridBackground/index.js +33 -27
  87. package/es/awesome/Hero/index.js +74 -63
  88. package/es/awesome/Spline/ParentSize.js +8 -7
  89. package/es/awesome/Spline/index.js +13 -10
  90. package/es/awesome/Spotlight/index.js +3 -2
  91. package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
  92. package/es/awesome/SpotlightCard/index.js +12 -9
  93. package/es/brand/BrandLoading/index.js +3 -2
  94. package/es/brand/LobeChat/index.js +38 -29
  95. package/es/brand/LobeChatText/index.js +13 -8
  96. package/es/brand/LobeHub/index.js +38 -29
  97. package/es/brand/LobeHubText/index.js +9 -4
  98. package/es/brand/Logo3d/index.js +3 -2
  99. package/es/brand/LogoFlat/index.js +49 -44
  100. package/es/brand/LogoMono/index.js +53 -48
  101. package/es/brand/LogoThree/Loading.js +11 -9
  102. package/es/brand/LogoThree/LogoSpline.js +12 -10
  103. package/es/brand/LogoThree/index.js +25 -23
  104. package/es/brand/components/Divider.js +6 -4
  105. package/es/chat/BackBottom/index.js +6 -4
  106. package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
  107. package/es/chat/ChatHeader/index.js +42 -35
  108. package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
  109. package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
  110. package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
  111. package/es/chat/ChatInputArea/SendButton.js +51 -36
  112. package/es/chat/ChatItem/components/Actions.js +5 -3
  113. package/es/chat/ChatItem/components/Avatar.js +21 -17
  114. package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
  115. package/es/chat/ChatItem/components/ErrorContent.js +11 -9
  116. package/es/chat/ChatItem/components/Loading.js +12 -10
  117. package/es/chat/ChatItem/components/MessageContent.js +10 -6
  118. package/es/chat/ChatItem/components/Title.js +8 -3
  119. package/es/chat/ChatItem/index.js +53 -47
  120. package/es/chat/ChatList/ActionsBar.js +3 -2
  121. package/es/chat/ChatList/HistoryDivider.js +11 -6
  122. package/es/chat/ChatList/Item.js +12 -14
  123. package/es/chat/ChatList/index.js +29 -25
  124. package/es/chat/EditableMessage/index.js +32 -26
  125. package/es/chat/EditableMessageList/index.js +76 -72
  126. package/es/chat/MessageInput/index.js +43 -35
  127. package/es/chat/MessageModal/index.js +51 -41
  128. package/es/chat/TokenTag/index.js +11 -7
  129. package/es/components/ControlInput.js +22 -18
  130. package/es/hooks/useHighlight.d.ts +1 -1
  131. package/es/mdx/Callout/index.js +19 -13
  132. package/es/mdx/Cards/Card.js +59 -46
  133. package/es/mdx/Cards/index.js +6 -3
  134. package/es/mdx/FileTree/File.js +11 -5
  135. package/es/mdx/FileTree/Folder.js +22 -13
  136. package/es/mdx/FileTree/index.js +6 -3
  137. package/es/mdx/Mdx/index.js +9 -7
  138. package/es/mdx/Steps/index.js +6 -3
  139. package/es/mdx/Tabs/Tab.js +8 -3
  140. package/es/mdx/Tabs/index.js +21 -17
  141. package/es/mdx/mdxComponents/CodeBlock.js +14 -9
  142. package/es/mdx/mdxComponents/Image.js +2 -2
  143. package/es/mdx/mdxComponents/Link.js +3 -2
  144. package/es/mdx/mdxComponents/Pre.js +14 -7
  145. package/es/mdx/mdxComponents/Video.js +2 -2
  146. package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
  147. package/es/mobile/MobileChatInputArea/index.js +79 -69
  148. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
  149. package/es/mobile/MobileNavBar/index.js +48 -41
  150. package/es/mobile/MobileSafeArea/index.js +3 -2
  151. package/es/mobile/MobileTabBar/index.js +35 -29
  152. package/es/storybook/StoryBook/index.js +26 -19
  153. package/package.json +1 -90
@@ -6,6 +6,8 @@ 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";
9
11
  var Dragger = Upload.Dragger;
10
12
  var createUploadImageHandler = function createUploadImageHandler(onUploadImage) {
11
13
  return function (file) {
@@ -50,69 +52,78 @@ var AvatarUploader = /*#__PURE__*/memo(function (_ref) {
50
52
  });
51
53
  onUpload === null || onUpload === void 0 || onUpload(file);
52
54
  };
53
- return /*#__PURE__*/React.createElement(Flexbox, {
55
+ return /*#__PURE__*/_jsxs(Flexbox, {
54
56
  padding: 10,
55
57
  style: {
56
58
  position: 'relative'
57
59
  },
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'))));
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
+ });
117
128
  });
118
129
  export default AvatarUploader;
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
4
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
6
5
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
@@ -23,6 +22,8 @@ import TabsNav from "../TabsNav";
23
22
  import Tooltip from "../Tooltip";
24
23
  import AvatarUploader from "./AvatarUploader";
25
24
  import { useStyles } from "./style";
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
26
27
  var DEFAULT_AVATAR = '🤖';
27
28
  var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
28
29
  var value = _ref.value,
@@ -111,26 +112,28 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
111
112
  }, [active, open]);
112
113
  var items = [{
113
114
  key: 'emoji',
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
- }))
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
+ })
123
125
  }, allowUpload && {
124
126
  key: 'upload',
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
- }))
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
+ })
134
137
  }].concat(_toConsumableArray(customTabs.map(function (tab) {
135
138
  return {
136
139
  key: tab.value,
@@ -138,9 +141,9 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
138
141
  };
139
142
  }))).filter(Boolean);
140
143
  var showTabs = items && items.length > 1;
141
- return /*#__PURE__*/React.createElement(Popover, {
144
+ return /*#__PURE__*/_jsx(Popover, {
142
145
  arrow: false,
143
- content: /*#__PURE__*/React.createElement(Flexbox, {
146
+ content: /*#__PURE__*/_jsxs(Flexbox, {
144
147
  className: cx(styles.picker, popupClassName),
145
148
  onMouseEnter: function onMouseEnter() {
146
149
  return setActive(true);
@@ -152,89 +155,95 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
152
155
  style: _objectSpread({
153
156
  minWidth: 310,
154
157
  paddingTop: showTabs ? 4 : 0
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
- })),
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
+ }),
203
208
  destroyTooltipOnHide: true,
204
209
  open: open,
205
210
  placement: 'bottomLeft',
206
211
  rootClassName: styles.popover,
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
- })));
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
+ });
239
248
  });
240
249
  export default EmojiPicker;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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,6 +11,8 @@ 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";
14
16
  var EmptyCard = /*#__PURE__*/memo(function (_ref) {
15
17
  var cover = _ref.cover,
16
18
  visible = _ref.visible,
@@ -34,28 +36,34 @@ var EmptyCard = /*#__PURE__*/memo(function (_ref) {
34
36
  var _useStyles = useStyles(),
35
37
  styles = _useStyles.styles;
36
38
  if (!value) return null;
37
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
39
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
38
40
  className: styles.container
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)));
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
+ }));
60
68
  });
61
69
  export default EmptyCard;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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,6 +8,8 @@ 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";
11
13
  var useStyles = createStyles(function (_ref) {
12
14
  var css = _ref.css;
13
15
  return {
@@ -41,66 +43,75 @@ var FileTypeIcon = /*#__PURE__*/memo(function (_ref2) {
41
43
  var isMono = variant === 'mono';
42
44
  var iconColor = isMono ? theme.isDarkMode ? theme.colorFill : theme.colorBgContainer : color || theme.geekblue;
43
45
  var content;
44
- content = type === 'file' ? /*#__PURE__*/React.createElement("svg", _extends({
46
+ content = type === 'file' ? /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({
45
47
  className: cx(styles.icon, !icon && className),
46
48
  height: size,
47
49
  style: icon ? undefined : style,
48
50
  viewBox: "0 0 24 24",
49
51
  width: size,
50
52
  xmlns: "http://www.w3.org/2000/svg"
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({
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({
71
76
  className: cx(styles.icon, !icon && className),
72
77
  height: size,
73
78
  style: icon ? undefined : style,
74
79
  viewBox: "0 0 24 24",
75
80
  width: size,
76
81
  xmlns: "http://www.w3.org/2000/svg"
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()));
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
+ }));
90
98
  if (!icon) return content;
91
- return /*#__PURE__*/React.createElement(Center, _extends({
99
+ return /*#__PURE__*/_jsxs(Center, _objectSpread(_objectSpread({
92
100
  className: cx(styles.container, className),
93
101
  flex: 'none',
94
102
  height: size,
95
103
  style: style,
96
104
  width: size
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);
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
+ }));
105
116
  });
106
117
  export default FileTypeIcon;
@@ -8,6 +8,7 @@ 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";
11
12
  var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
12
13
  var emoji = _ref.emoji,
13
14
  className = _ref.className,
@@ -28,16 +29,17 @@ var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
28
29
  var emojiUrl = useMemo(function () {
29
30
  return genEmojiUrl(emoji, type);
30
31
  }, [type, emoji]);
31
- if (type === 'pure' || !emojiUrl || loadingFail) return /*#__PURE__*/React.createElement(Center, {
32
+ if (type === 'pure' || !emojiUrl || loadingFail) return /*#__PURE__*/_jsx(Center, {
32
33
  className: cx(styles.container, className),
33
34
  flex: 'none',
34
35
  height: size,
35
36
  style: _objectSpread({
36
37
  fontSize: size * 0.9
37
38
  }, style),
38
- width: size
39
- }, emoji);
40
- return /*#__PURE__*/React.createElement(Img, {
39
+ width: size,
40
+ children: emoji
41
+ });
42
+ return /*#__PURE__*/_jsx(Img, {
41
43
  alt: emoji,
42
44
  className: className,
43
45
  height: size,