@lobehub/ui 1.159.0 → 1.161.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 (154) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.d.ts +5 -2
  3. package/es/ActionIcon/index.js +25 -19
  4. package/es/ActionIconGroup/index.js +47 -45
  5. package/es/Alert/index.js +50 -43
  6. package/es/Avatar/index.js +12 -10
  7. package/es/Burger/index.js +35 -30
  8. package/es/CodeEditor/index.js +43 -38
  9. package/es/Collapse/index.js +3 -3
  10. package/es/ColorScales/ScaleRow.js +43 -39
  11. package/es/ColorScales/index.js +59 -57
  12. package/es/ConfigProvider/index.js +5 -3
  13. package/es/ContextMenu/index.js +3 -2
  14. package/es/CopyButton/index.js +4 -3
  15. package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
  16. package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
  17. package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
  18. package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
  19. package/es/DraggablePanel/index.js +32 -25
  20. package/es/EditableText/index.js +16 -13
  21. package/es/EmojiPicker/AvatarUploader.js +71 -60
  22. package/es/EmojiPicker/index.js +110 -101
  23. package/es/EmptyCard/index.js +31 -23
  24. package/es/FileTypeIcon/index.js +55 -44
  25. package/es/FluentEmoji/index.js +6 -4
  26. package/es/Footer/index.js +10 -8
  27. package/es/Form/components/FormDivider.js +2 -2
  28. package/es/Form/components/FormFlatGroup.js +9 -4
  29. package/es/Form/components/FormFooter.js +6 -3
  30. package/es/Form/components/FormGroup.js +21 -15
  31. package/es/Form/components/FormItem.js +17 -10
  32. package/es/Form/components/FormTitle.js +23 -15
  33. package/es/Form/index.js +30 -26
  34. package/es/FormModal/index.js +34 -30
  35. package/es/Grid/index.js +6 -3
  36. package/es/Header/index.js +65 -49
  37. package/es/Highlighter/FullFeatured.js +51 -41
  38. package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
  39. package/es/Highlighter/index.js +29 -19
  40. package/es/Icon/icons/DiscordIcon.js +3 -2
  41. package/es/Icon/index.js +16 -13
  42. package/es/Image/ImageGallery.js +5 -3
  43. package/es/Image/Preview.js +5 -3
  44. package/es/Image/index.js +38 -34
  45. package/es/Image/usePreview.js +37 -33
  46. package/es/Img/index.js +2 -2
  47. package/es/Input/index.js +3 -3
  48. package/es/Layout/index.js +63 -35
  49. package/es/List/ListItem/index.js +67 -53
  50. package/es/Markdown/CodeBlock.js +16 -10
  51. package/es/Markdown/Typography.js +6 -3
  52. package/es/Markdown/index.js +22 -18
  53. package/es/MaterialFileTypeIcon/index.js +20 -17
  54. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  55. package/es/Mermaid/FullFeatured.js +45 -35
  56. package/es/Mermaid/index.js +26 -17
  57. package/es/Mermaid/useMermaid.d.ts +1 -2
  58. package/es/Mermaid/useMermaid.js +5 -3
  59. package/es/Modal/index.js +60 -48
  60. package/es/SearchBar/index.js +51 -47
  61. package/es/SelectWithImg/index.js +40 -34
  62. package/es/SideNav/index.js +22 -15
  63. package/es/SliderWithInput/index.js +38 -35
  64. package/es/Snippet/index.js +15 -10
  65. package/es/SortableList/DragHandle.js +3 -3
  66. package/es/SortableList/SortableItem.js +19 -16
  67. package/es/SortableList/SortableOverlay.js +5 -3
  68. package/es/SortableList/index.js +23 -15
  69. package/es/Swatches/index.js +20 -18
  70. package/es/TabsNav/index.js +3 -2
  71. package/es/Tag/index.js +12 -7
  72. package/es/ThemeProvider/Meta.js +58 -53
  73. package/es/ThemeProvider/index.js +23 -17
  74. package/es/ThemeSwitch/index.js +19 -15
  75. package/es/Toc/TocMobile.js +52 -47
  76. package/es/Toc/index.js +13 -8
  77. package/es/Tooltip/index.js +6 -3
  78. package/es/Video/index.js +47 -41
  79. package/es/awesome/AuroraBackground/index.js +18 -11
  80. package/es/awesome/Features/Item.js +45 -37
  81. package/es/awesome/Features/index.js +4 -5
  82. package/es/awesome/GaussianBackground/index.js +13 -8
  83. package/es/awesome/Giscus/index.js +15 -13
  84. package/es/awesome/GradientButton/index.js +9 -5
  85. package/es/awesome/GridBackground/Grid.js +61 -49
  86. package/es/awesome/GridBackground/GridShowcase.js +28 -24
  87. package/es/awesome/GridBackground/index.js +33 -27
  88. package/es/awesome/Hero/index.js +74 -63
  89. package/es/awesome/Spline/ParentSize.js +8 -7
  90. package/es/awesome/Spline/index.js +13 -10
  91. package/es/awesome/Spotlight/index.js +3 -2
  92. package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
  93. package/es/awesome/SpotlightCard/index.js +12 -9
  94. package/es/brand/BrandLoading/index.js +3 -2
  95. package/es/brand/LobeChat/index.js +38 -29
  96. package/es/brand/LobeChatText/index.js +13 -8
  97. package/es/brand/LobeHub/index.js +38 -29
  98. package/es/brand/LobeHubText/index.js +9 -4
  99. package/es/brand/Logo3d/index.js +3 -2
  100. package/es/brand/LogoFlat/index.js +49 -44
  101. package/es/brand/LogoMono/index.js +53 -48
  102. package/es/brand/LogoThree/Loading.js +11 -9
  103. package/es/brand/LogoThree/LogoSpline.js +12 -10
  104. package/es/brand/LogoThree/index.js +25 -23
  105. package/es/brand/components/Divider.js +6 -4
  106. package/es/chat/BackBottom/index.js +6 -4
  107. package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
  108. package/es/chat/ChatHeader/index.js +42 -35
  109. package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
  110. package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
  111. package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
  112. package/es/chat/ChatInputArea/SendButton.js +51 -36
  113. package/es/chat/ChatItem/components/Actions.js +5 -3
  114. package/es/chat/ChatItem/components/Avatar.js +21 -17
  115. package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
  116. package/es/chat/ChatItem/components/ErrorContent.js +11 -9
  117. package/es/chat/ChatItem/components/Loading.js +12 -10
  118. package/es/chat/ChatItem/components/MessageContent.js +10 -6
  119. package/es/chat/ChatItem/components/Title.js +8 -3
  120. package/es/chat/ChatItem/index.js +53 -47
  121. package/es/chat/ChatList/ActionsBar.js +3 -2
  122. package/es/chat/ChatList/HistoryDivider.js +11 -6
  123. package/es/chat/ChatList/Item.js +12 -14
  124. package/es/chat/ChatList/index.js +29 -25
  125. package/es/chat/EditableMessage/index.js +32 -26
  126. package/es/chat/EditableMessageList/index.js +76 -72
  127. package/es/chat/MessageInput/index.js +43 -35
  128. package/es/chat/MessageModal/index.js +51 -41
  129. package/es/chat/TokenTag/index.js +11 -7
  130. package/es/components/ControlInput.js +22 -18
  131. package/es/hooks/useHighlight.d.ts +1 -1
  132. package/es/mdx/Callout/index.js +19 -13
  133. package/es/mdx/Cards/Card.js +59 -46
  134. package/es/mdx/Cards/index.js +6 -3
  135. package/es/mdx/FileTree/File.js +11 -5
  136. package/es/mdx/FileTree/Folder.js +22 -13
  137. package/es/mdx/FileTree/index.js +6 -3
  138. package/es/mdx/Mdx/index.js +9 -7
  139. package/es/mdx/Steps/index.js +6 -3
  140. package/es/mdx/Tabs/Tab.js +8 -3
  141. package/es/mdx/Tabs/index.js +21 -17
  142. package/es/mdx/mdxComponents/CodeBlock.js +14 -9
  143. package/es/mdx/mdxComponents/Image.js +2 -2
  144. package/es/mdx/mdxComponents/Link.js +3 -2
  145. package/es/mdx/mdxComponents/Pre.js +14 -7
  146. package/es/mdx/mdxComponents/Video.js +2 -2
  147. package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
  148. package/es/mobile/MobileChatInputArea/index.js +79 -69
  149. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
  150. package/es/mobile/MobileNavBar/index.js +48 -41
  151. package/es/mobile/MobileSafeArea/index.js +3 -2
  152. package/es/mobile/MobileTabBar/index.js +35 -29
  153. package/es/storybook/StoryBook/index.js +26 -19
  154. package/package.json +21 -22
@@ -1,11 +1,12 @@
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
  var _excluded = ["className", "variant"];
6
6
  import { Tabs } from 'antd';
7
7
  import { memo } from 'react';
8
8
  import { useStyles } from "./style";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  var TabsNav = /*#__PURE__*/memo(function (_ref) {
10
11
  var className = _ref.className,
11
12
  variant = _ref.variant,
@@ -13,7 +14,7 @@ var TabsNav = /*#__PURE__*/memo(function (_ref) {
13
14
  var _useStyles = useStyles(),
14
15
  styles = _useStyles.styles,
15
16
  cx = _useStyles.cx;
16
- return /*#__PURE__*/React.createElement(Tabs, _extends({
17
+ return /*#__PURE__*/_jsx(Tabs, _objectSpread({
17
18
  className: cx(styles.tabs, variant === 'compact' && styles.compact, className)
18
19
  }, rest));
19
20
  });
package/es/Tag/index.js CHANGED
@@ -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", "children", "size"];
@@ -9,6 +9,8 @@ import { Tag as AntTag } from 'antd';
9
9
  import { createStyles } from 'antd-style';
10
10
  import { memo } from 'react';
11
11
  import { Flexbox } from 'react-layout-kit';
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
12
14
  var useStyles = createStyles(function (_ref) {
13
15
  var cx = _ref.cx,
14
16
  css = _ref.css,
@@ -27,13 +29,16 @@ var Tag = /*#__PURE__*/memo(function (_ref2) {
27
29
  var _useStyles = useStyles(),
28
30
  styles = _useStyles.styles,
29
31
  cx = _useStyles.cx;
30
- return /*#__PURE__*/React.createElement(AntTag, _extends({
32
+ return /*#__PURE__*/_jsx(AntTag, _objectSpread(_objectSpread({
31
33
  bordered: false,
32
34
  className: cx(styles.tag, size === 'small' && styles.small)
33
- }, rest), /*#__PURE__*/React.createElement(Flexbox, {
34
- align: 'center',
35
- gap: 4,
36
- horizontal: true
37
- }, icon, children));
35
+ }, rest), {}, {
36
+ children: /*#__PURE__*/_jsxs(Flexbox, {
37
+ align: 'center',
38
+ gap: 4,
39
+ horizontal: true,
40
+ children: [icon, children]
41
+ })
42
+ }));
38
43
  });
39
44
  export default Tag;
@@ -1,5 +1,8 @@
1
1
  import { memo, useCallback } from 'react';
2
2
  import { useCdnFn } from "../ConfigProvider";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { Fragment as _Fragment } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
6
  var Meta = /*#__PURE__*/memo(function (_ref) {
4
7
  var _ref$title = _ref.title,
5
8
  title = _ref$title === void 0 ? 'LobeHub' : _ref$title,
@@ -14,58 +17,60 @@ var Meta = /*#__PURE__*/memo(function (_ref) {
14
17
  version: 'latest'
15
18
  });
16
19
  }, []);
17
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("link", {
18
- href: genAssets('assets/favicon.ico'),
19
- rel: "shortcut icon"
20
- }), /*#__PURE__*/React.createElement("link", {
21
- href: genAssets('assets/apple-touch-icon.png'),
22
- rel: "apple-touch-icon",
23
- sizes: "180x180"
24
- }), /*#__PURE__*/React.createElement("link", {
25
- href: genAssets('assets/favicon-32x32.png'),
26
- rel: "icon",
27
- sizes: "32x32",
28
- type: "image/png"
29
- }), /*#__PURE__*/React.createElement("link", {
30
- href: genAssets('assets/favicon-16x16.png'),
31
- rel: "icon",
32
- sizes: "16x16",
33
- type: "image/png"
34
- }), /*#__PURE__*/React.createElement("meta", {
35
- content: "width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover, user-scalable=no",
36
- name: "viewport"
37
- }), /*#__PURE__*/React.createElement("meta", {
38
- content: title,
39
- name: "apple-mobile-web-app-title"
40
- }), /*#__PURE__*/React.createElement("meta", {
41
- content: title,
42
- name: "application-name"
43
- }), /*#__PURE__*/React.createElement("meta", {
44
- content: description,
45
- name: "description"
46
- }), /*#__PURE__*/React.createElement("meta", {
47
- content: "#000000",
48
- name: "msapplication-TileColor"
49
- }), /*#__PURE__*/React.createElement("meta", {
50
- content: "#fff",
51
- media: "(prefers-color-scheme: light)",
52
- name: "theme-color"
53
- }), /*#__PURE__*/React.createElement("meta", {
54
- content: "#000",
55
- media: "(prefers-color-scheme: dark)",
56
- name: "theme-color"
57
- }), /*#__PURE__*/React.createElement("meta", {
58
- content: "yes",
59
- name: "apple-mobile-web-app-capable"
60
- }), /*#__PURE__*/React.createElement("meta", {
61
- content: title,
62
- name: "apple-mobile-web-app-title"
63
- }), /*#__PURE__*/React.createElement("meta", {
64
- content: "black-translucent",
65
- name: "apple-mobile-web-app-status-bar-style"
66
- }), withManifest && /*#__PURE__*/React.createElement("link", {
67
- href: genAssets('assets/site.webmanifest'),
68
- rel: "manifest"
69
- }));
20
+ return /*#__PURE__*/_jsxs(_Fragment, {
21
+ children: [/*#__PURE__*/_jsx("link", {
22
+ href: genAssets('assets/favicon.ico'),
23
+ rel: "shortcut icon"
24
+ }), /*#__PURE__*/_jsx("link", {
25
+ href: genAssets('assets/apple-touch-icon.png'),
26
+ rel: "apple-touch-icon",
27
+ sizes: "180x180"
28
+ }), /*#__PURE__*/_jsx("link", {
29
+ href: genAssets('assets/favicon-32x32.png'),
30
+ rel: "icon",
31
+ sizes: "32x32",
32
+ type: "image/png"
33
+ }), /*#__PURE__*/_jsx("link", {
34
+ href: genAssets('assets/favicon-16x16.png'),
35
+ rel: "icon",
36
+ sizes: "16x16",
37
+ type: "image/png"
38
+ }), /*#__PURE__*/_jsx("meta", {
39
+ content: "width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover, user-scalable=no",
40
+ name: "viewport"
41
+ }), /*#__PURE__*/_jsx("meta", {
42
+ content: title,
43
+ name: "apple-mobile-web-app-title"
44
+ }), /*#__PURE__*/_jsx("meta", {
45
+ content: title,
46
+ name: "application-name"
47
+ }), /*#__PURE__*/_jsx("meta", {
48
+ content: description,
49
+ name: "description"
50
+ }), /*#__PURE__*/_jsx("meta", {
51
+ content: "#000000",
52
+ name: "msapplication-TileColor"
53
+ }), /*#__PURE__*/_jsx("meta", {
54
+ content: "#fff",
55
+ media: "(prefers-color-scheme: light)",
56
+ name: "theme-color"
57
+ }), /*#__PURE__*/_jsx("meta", {
58
+ content: "#000",
59
+ media: "(prefers-color-scheme: dark)",
60
+ name: "theme-color"
61
+ }), /*#__PURE__*/_jsx("meta", {
62
+ content: "yes",
63
+ name: "apple-mobile-web-app-capable"
64
+ }), /*#__PURE__*/_jsx("meta", {
65
+ content: title,
66
+ name: "apple-mobile-web-app-title"
67
+ }), /*#__PURE__*/_jsx("meta", {
68
+ content: "black-translucent",
69
+ name: "apple-mobile-web-app-status-bar-style"
70
+ }), withManifest && /*#__PURE__*/_jsx("link", {
71
+ href: genAssets('assets/site.webmanifest'),
72
+ rel: "manifest"
73
+ })]
74
+ });
70
75
  });
71
76
  export default Meta;
@@ -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 _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
5
  var _excluded = ["children", "customStylish", "customToken", "enableCustomFonts", "enableGlobalStyle", "customFonts", "customTheme", "className", "style", "theme"];
@@ -13,6 +12,9 @@ import FontLoader from "../FontLoader";
13
12
  import { lobeCustomStylish, lobeCustomToken } from "../styles";
14
13
  import { createLobeAntdTheme } from "../styles/theme/antdTheme";
15
14
  import GlobalStyle from "./GlobalStyle";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { Fragment as _Fragment } from "react/jsx-runtime";
16
18
  var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
17
19
  var children = _ref.children,
18
20
  customStylish = _ref.customStylish,
@@ -58,22 +60,26 @@ var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
58
60
  });
59
61
  return merge(lobeTheme, antdTheme);
60
62
  }, [customTheme.primaryColor, customTheme.neutralColor, antdTheme]);
61
- return /*#__PURE__*/React.createElement(React.Fragment, null, enableCustomFonts && (webfontUrls === null || webfontUrls === void 0 ? void 0 : webfontUrls.length) > 0 && webfontUrls.map(function (webfont) {
62
- return /*#__PURE__*/React.createElement(FontLoader, {
63
- key: webfont,
64
- url: webfont
65
- });
66
- }), /*#__PURE__*/React.createElement(AntdThemeProvider, _extends({
67
- customStylish: stylish,
68
- customToken: token,
69
- theme: theme
70
- }, rest), enableGlobalStyle && /*#__PURE__*/React.createElement(GlobalStyle, null), /*#__PURE__*/React.createElement(App, {
71
- className: className,
72
- style: _objectSpread({
73
- minHeight: 'inherit',
74
- width: 'inherit'
75
- }, style)
76
- }, children)));
63
+ return /*#__PURE__*/_jsxs(_Fragment, {
64
+ children: [enableCustomFonts && (webfontUrls === null || webfontUrls === void 0 ? void 0 : webfontUrls.length) > 0 && webfontUrls.map(function (webfont) {
65
+ return /*#__PURE__*/_jsx(FontLoader, {
66
+ url: webfont
67
+ }, webfont);
68
+ }), /*#__PURE__*/_jsxs(AntdThemeProvider, _objectSpread(_objectSpread({
69
+ customStylish: stylish,
70
+ customToken: token,
71
+ theme: theme
72
+ }, rest), {}, {
73
+ children: [enableGlobalStyle && /*#__PURE__*/_jsx(GlobalStyle, {}), /*#__PURE__*/_jsx(App, {
74
+ className: className,
75
+ style: _objectSpread({
76
+ minHeight: 'inherit',
77
+ width: 'inherit'
78
+ }, style),
79
+ children: children
80
+ })]
81
+ }))]
82
+ });
77
83
  });
78
84
  ThemeProvider.displayName = 'LobeThemeProvider';
79
85
  export default ThemeProvider;
@@ -6,6 +6,8 @@ import { memo, useMemo } from 'react';
6
6
  import { Flexbox } from 'react-layout-kit';
7
7
  import ActionIcon from "../ActionIcon";
8
8
  import Icon from "../Icon";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
11
  var icons = {
10
12
  auto: Monitor,
11
13
  dark: Moon,
@@ -28,21 +30,21 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
28
30
  style = _ref.style;
29
31
  var items = useMemo(function () {
30
32
  return [{
31
- icon: /*#__PURE__*/React.createElement(Icon, {
33
+ icon: /*#__PURE__*/_jsx(Icon, {
32
34
  icon: icons.auto,
33
35
  size: "small"
34
36
  }),
35
37
  key: 'auto',
36
38
  label: labels.auto
37
39
  }, {
38
- icon: /*#__PURE__*/React.createElement(Icon, {
40
+ icon: /*#__PURE__*/_jsx(Icon, {
39
41
  icon: icons.light,
40
42
  size: "small"
41
43
  }),
42
44
  key: 'light',
43
45
  label: labels.light
44
46
  }, {
45
- icon: /*#__PURE__*/React.createElement(Icon, {
47
+ icon: /*#__PURE__*/_jsx(Icon, {
46
48
  icon: icons.dark,
47
49
  size: "small"
48
50
  }),
@@ -51,16 +53,17 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
51
53
  }];
52
54
  }, [labels]);
53
55
  if (type === 'select') {
54
- return /*#__PURE__*/React.createElement(Select, {
56
+ return /*#__PURE__*/_jsx(Select, {
55
57
  className: className,
56
58
  defaultValue: themeMode,
57
59
  onChange: onThemeSwitch,
58
60
  options: items.map(function (item) {
59
61
  return {
60
- label: /*#__PURE__*/React.createElement(Flexbox, {
62
+ label: /*#__PURE__*/_jsxs(Flexbox, {
61
63
  direction: 'horizontal',
62
- gap: 8
63
- }, item.icon, item.label),
64
+ gap: 8,
65
+ children: [item.icon, item.label]
66
+ }),
64
67
  value: item.key
65
68
  };
66
69
  }),
@@ -73,15 +76,16 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
73
76
  return onThemeSwitch(e.key);
74
77
  }
75
78
  };
76
- return /*#__PURE__*/React.createElement(Dropdown, {
79
+ return /*#__PURE__*/_jsx(Dropdown, {
77
80
  menu: menuProps,
78
- trigger: ['click']
79
- }, /*#__PURE__*/React.createElement(ActionIcon, {
80
- className: className,
81
- icon: icons[themeMode],
82
- size: size,
83
- style: style
84
- }));
81
+ trigger: ['click'],
82
+ children: /*#__PURE__*/_jsx(ActionIcon, {
83
+ className: className,
84
+ icon: icons[themeMode],
85
+ size: size,
86
+ style: style
87
+ })
88
+ });
85
89
  }
86
90
  });
87
91
  export default ThemeSwitch;
@@ -5,6 +5,7 @@ import { memo } from 'react';
5
5
  import useControlledState from 'use-merge-value';
6
6
  import ActionIcon from "../ActionIcon";
7
7
  import { useStyles } from "./style";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
8
9
  export var mapItems = function mapItems(items) {
9
10
  return items.map(function (item) {
10
11
  var _item$children;
@@ -46,58 +47,62 @@ var TocMobile = /*#__PURE__*/memo(function (_ref) {
46
47
  var activeAnchor = items.find(function (item) {
47
48
  return item.id === activeLink;
48
49
  });
49
- return /*#__PURE__*/React.createElement(ConfigProvider, {
50
+ return /*#__PURE__*/_jsx(ConfigProvider, {
50
51
  theme: {
51
52
  token: {
52
53
  fontSize: 12,
53
54
  sizeStep: 3
54
55
  }
55
- }
56
- }, /*#__PURE__*/React.createElement("section", {
57
- className: styles.mobileCtn
58
- }, /*#__PURE__*/React.createElement(Collapse, {
59
- bordered: false,
60
- className: styles.expand,
61
- expandIcon: function expandIcon(_ref2) {
62
- var isActive = _ref2.isActive;
63
- return isActive ? /*#__PURE__*/React.createElement(ActionIcon, {
64
- icon: PanelTopClose,
65
- size: {
66
- blockSize: 24,
67
- borderRadius: 3,
68
- fontSize: 16,
69
- strokeWidth: 1
70
- }
71
- }) : /*#__PURE__*/React.createElement(ActionIcon, {
72
- icon: PanelTopOpen,
73
- size: {
74
- blockSize: 24,
75
- borderRadius: 3,
76
- fontSize: 16,
77
- strokeWidth: 1
78
- }
79
- });
80
56
  },
81
- expandIconPosition: 'end',
82
- ghost: true
83
- }, /*#__PURE__*/React.createElement(Collapse.Panel, {
84
- forceRender: true,
85
- header: activeAnchor ? activeAnchor.title : 'TOC',
86
- key: 'toc'
87
- }, /*#__PURE__*/React.createElement(ConfigProvider, {
88
- theme: {
89
- token: {
90
- fontSize: 14,
91
- sizeStep: 4
92
- }
93
- }
94
- }, /*#__PURE__*/React.createElement(Anchor, {
95
- getContainer: getContainer,
96
- items: mapItems(items),
97
- onChange: function onChange(currentLink) {
98
- setActiveLink(currentLink.replace('#', ''));
99
- },
100
- targetOffset: headerHeight + 48
101
- }))))));
57
+ children: /*#__PURE__*/_jsx("section", {
58
+ className: styles.mobileCtn,
59
+ children: /*#__PURE__*/_jsx(Collapse, {
60
+ bordered: false,
61
+ className: styles.expand,
62
+ expandIcon: function expandIcon(_ref2) {
63
+ var isActive = _ref2.isActive;
64
+ return isActive ? /*#__PURE__*/_jsx(ActionIcon, {
65
+ icon: PanelTopClose,
66
+ size: {
67
+ blockSize: 24,
68
+ borderRadius: 3,
69
+ fontSize: 16,
70
+ strokeWidth: 1
71
+ }
72
+ }) : /*#__PURE__*/_jsx(ActionIcon, {
73
+ icon: PanelTopOpen,
74
+ size: {
75
+ blockSize: 24,
76
+ borderRadius: 3,
77
+ fontSize: 16,
78
+ strokeWidth: 1
79
+ }
80
+ });
81
+ },
82
+ expandIconPosition: 'end',
83
+ ghost: true,
84
+ children: /*#__PURE__*/_jsx(Collapse.Panel, {
85
+ forceRender: true,
86
+ header: activeAnchor ? activeAnchor.title : 'TOC',
87
+ children: /*#__PURE__*/_jsx(ConfigProvider, {
88
+ theme: {
89
+ token: {
90
+ fontSize: 14,
91
+ sizeStep: 4
92
+ }
93
+ },
94
+ children: /*#__PURE__*/_jsx(Anchor, {
95
+ getContainer: getContainer,
96
+ items: mapItems(items),
97
+ onChange: function onChange(currentLink) {
98
+ setActiveLink(currentLink.replace('#', ''));
99
+ },
100
+ targetOffset: headerHeight + 48
101
+ })
102
+ })
103
+ }, 'toc')
104
+ })
105
+ })
106
+ });
102
107
  });
103
108
  export default TocMobile;
package/es/Toc/index.js CHANGED
@@ -4,6 +4,8 @@ import { Anchor } from 'antd';
4
4
  import { memo } from 'react';
5
5
  import { default as TocMobile, mapItems } from "./TocMobile";
6
6
  import { useStyles } from "./style";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
9
  var Toc = /*#__PURE__*/memo(function (_ref) {
8
10
  var activeKey = _ref.activeKey,
9
11
  items = _ref.items,
@@ -19,18 +21,21 @@ var Toc = /*#__PURE__*/memo(function (_ref) {
19
21
  }),
20
22
  styles = _useStyles.styles,
21
23
  cx = _useStyles.cx;
22
- if (isMobile) return /*#__PURE__*/React.createElement(TocMobile, {
24
+ if (isMobile) return /*#__PURE__*/_jsx(TocMobile, {
23
25
  activeKey: activeKey,
24
26
  getContainer: getContainer,
25
27
  headerHeight: headerHeight,
26
28
  items: items
27
29
  });
28
- return /*#__PURE__*/React.createElement("section", {
29
- className: cx(styles.container, styles.anchor)
30
- }, /*#__PURE__*/React.createElement("h4", null, "Table of Contents"), /*#__PURE__*/React.createElement(Anchor, {
31
- getContainer: getContainer,
32
- items: mapItems(items),
33
- targetOffset: headerHeight + 12
34
- }));
30
+ return /*#__PURE__*/_jsxs("section", {
31
+ className: cx(styles.container, styles.anchor),
32
+ children: [/*#__PURE__*/_jsx("h4", {
33
+ children: "Table of Contents"
34
+ }), /*#__PURE__*/_jsx(Anchor, {
35
+ getContainer: getContainer,
36
+ items: mapItems(items),
37
+ targetOffset: headerHeight + 12
38
+ })]
39
+ });
35
40
  });
36
41
  export default Toc;
@@ -1,11 +1,12 @@
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
  var _excluded = ["className", "arrow"];
6
6
  import { Tooltip as AntdTooltip } from 'antd';
7
7
  import { memo } from 'react';
8
8
  import { useStyles } from "./style";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  var Tooltip = /*#__PURE__*/memo(function (_ref) {
10
11
  var className = _ref.className,
11
12
  _ref$arrow = _ref.arrow,
@@ -14,9 +15,11 @@ var Tooltip = /*#__PURE__*/memo(function (_ref) {
14
15
  var _useStyles = useStyles(),
15
16
  styles = _useStyles.styles,
16
17
  cx = _useStyles.cx;
17
- return /*#__PURE__*/React.createElement(AntdTooltip, _extends({
18
+ return /*#__PURE__*/_jsx(AntdTooltip, _objectSpread({
18
19
  arrow: arrow,
19
- overlayClassName: cx(styles.tooltip, className)
20
+ classNames: {
21
+ root: cx(styles.tooltip, className)
22
+ }
20
23
  }, rest));
21
24
  });
22
25
  export default Tooltip;
package/es/Video/index.js CHANGED
@@ -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 = ["preload", "src", "style", "classNames", "className", "minSize", "size", "width", "height", "onMouseEnter", "onMouseLeave", "preview", "isLoading", "borderless"];
@@ -10,6 +10,8 @@ import { memo, useState } from 'react';
10
10
  import { Flexbox } from 'react-layout-kit';
11
11
  import Icon from "../Icon";
12
12
  import { useStyles } from "./style";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
15
  var Video = /*#__PURE__*/memo(function (_ref) {
14
16
  var _ref$preload = _ref.preload,
15
17
  preload = _ref$preload === void 0 ? 'auto' : _ref$preload,
@@ -53,7 +55,7 @@ var Video = /*#__PURE__*/memo(function (_ref) {
53
55
  setShowControls(false);
54
56
  onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(e);
55
57
  };
56
- if (isLoading) return /*#__PURE__*/React.createElement(Skeleton.Avatar, {
58
+ if (isLoading) return /*#__PURE__*/_jsx(Skeleton.Avatar, {
57
59
  active: true,
58
60
  style: {
59
61
  borderRadius: theme.borderRadius,
@@ -65,45 +67,49 @@ var Video = /*#__PURE__*/memo(function (_ref) {
65
67
  width: width
66
68
  }
67
69
  });
68
- return /*#__PURE__*/React.createElement(Flexbox, {
70
+ return /*#__PURE__*/_jsxs(Flexbox, {
69
71
  className: cx(styles.videoWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.wrapper),
70
- style: style
71
- }, preview && !isPlaying && /*#__PURE__*/React.createElement(Flexbox, {
72
- align: 'center',
73
- className: styles.preview,
74
- justify: 'center'
75
- }, /*#__PURE__*/React.createElement(Icon, {
76
- color: '#fff',
77
- icon: PlayIcon,
78
- size: 'normal'
79
- })), /*#__PURE__*/React.createElement("video", _extends({
80
- autoPlay: true,
81
- className: cx(styles.video, classNames === null || classNames === void 0 ? void 0 : classNames.video, className),
82
- controls: showControls,
83
- height: height,
84
- muted: true,
85
- onEnded: function onEnded() {
86
- return setIsPlaying(false);
87
- },
88
- onMouseEnter: onVideoMouseEnter,
89
- onMouseLeave: onVideoMouseLeave,
90
- onPause: function onPause() {
91
- return setIsPlaying(false);
92
- },
93
- onPlay: function onPlay() {
94
- return setIsPlaying(true);
95
- },
96
- onPlaying: function onPlaying() {
97
- return setIsPlaying(true);
98
- },
99
- preload: preload,
100
- style: {
101
- height: 'auto',
102
- width: '100%'
103
- },
104
- width: width
105
- }, rest), /*#__PURE__*/React.createElement("source", {
106
- src: src
107
- })));
72
+ style: style,
73
+ children: [preview && !isPlaying && /*#__PURE__*/_jsx(Flexbox, {
74
+ align: 'center',
75
+ className: styles.preview,
76
+ justify: 'center',
77
+ children: /*#__PURE__*/_jsx(Icon, {
78
+ color: '#fff',
79
+ icon: PlayIcon,
80
+ size: 'normal'
81
+ })
82
+ }), /*#__PURE__*/_jsx("video", _objectSpread(_objectSpread({
83
+ autoPlay: true,
84
+ className: cx(styles.video, classNames === null || classNames === void 0 ? void 0 : classNames.video, className),
85
+ controls: showControls,
86
+ height: height,
87
+ muted: true,
88
+ onEnded: function onEnded() {
89
+ return setIsPlaying(false);
90
+ },
91
+ onMouseEnter: onVideoMouseEnter,
92
+ onMouseLeave: onVideoMouseLeave,
93
+ onPause: function onPause() {
94
+ return setIsPlaying(false);
95
+ },
96
+ onPlay: function onPlay() {
97
+ return setIsPlaying(true);
98
+ },
99
+ onPlaying: function onPlaying() {
100
+ return setIsPlaying(true);
101
+ },
102
+ preload: preload,
103
+ style: {
104
+ height: 'auto',
105
+ width: '100%'
106
+ },
107
+ width: width
108
+ }, rest), {}, {
109
+ children: /*#__PURE__*/_jsx("source", {
110
+ src: src
111
+ })
112
+ }))]
113
+ });
108
114
  });
109
115
  export default Video;