@lobehub/ui 1.157.1 → 1.158.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 (157) 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/mdx/Callout/index.js +13 -19
  136. package/es/mdx/Cards/Card.js +46 -59
  137. package/es/mdx/Cards/index.js +3 -6
  138. package/es/mdx/FileTree/File.js +5 -11
  139. package/es/mdx/FileTree/Folder.js +13 -22
  140. package/es/mdx/FileTree/index.js +3 -6
  141. package/es/mdx/Mdx/index.js +7 -9
  142. package/es/mdx/Steps/index.js +3 -6
  143. package/es/mdx/Tabs/Tab.js +3 -8
  144. package/es/mdx/Tabs/index.js +17 -21
  145. package/es/mdx/mdxComponents/CodeBlock.js +9 -14
  146. package/es/mdx/mdxComponents/Image.js +2 -2
  147. package/es/mdx/mdxComponents/Link.js +2 -3
  148. package/es/mdx/mdxComponents/Pre.js +7 -14
  149. package/es/mdx/mdxComponents/Video.js +2 -2
  150. package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
  151. package/es/mobile/MobileChatInputArea/index.js +69 -79
  152. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
  153. package/es/mobile/MobileNavBar/index.js +41 -48
  154. package/es/mobile/MobileSafeArea/index.js +2 -3
  155. package/es/mobile/MobileTabBar/index.js +29 -35
  156. package/es/storybook/StoryBook/index.js +19 -26
  157. package/package.json +41 -45
@@ -1,12 +1,11 @@
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
  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";
10
9
  var TabsNav = /*#__PURE__*/memo(function (_ref) {
11
10
  var className = _ref.className,
12
11
  variant = _ref.variant,
@@ -14,7 +13,7 @@ var TabsNav = /*#__PURE__*/memo(function (_ref) {
14
13
  var _useStyles = useStyles(),
15
14
  styles = _useStyles.styles,
16
15
  cx = _useStyles.cx;
17
- return /*#__PURE__*/_jsx(Tabs, _objectSpread({
16
+ return /*#__PURE__*/React.createElement(Tabs, _extends({
18
17
  className: cx(styles.tabs, variant === 'compact' && styles.compact, className)
19
18
  }, rest));
20
19
  });
package/es/Tag/index.js CHANGED
@@ -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", "children", "size"];
@@ -9,8 +9,6 @@ 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";
14
12
  var useStyles = createStyles(function (_ref) {
15
13
  var cx = _ref.cx,
16
14
  css = _ref.css,
@@ -29,16 +27,13 @@ var Tag = /*#__PURE__*/memo(function (_ref2) {
29
27
  var _useStyles = useStyles(),
30
28
  styles = _useStyles.styles,
31
29
  cx = _useStyles.cx;
32
- return /*#__PURE__*/_jsx(AntTag, _objectSpread(_objectSpread({
30
+ return /*#__PURE__*/React.createElement(AntTag, _extends({
33
31
  bordered: false,
34
32
  className: cx(styles.tag, size === 'small' && styles.small)
35
- }, rest), {}, {
36
- children: /*#__PURE__*/_jsxs(Flexbox, {
37
- align: 'center',
38
- gap: 4,
39
- horizontal: true,
40
- children: [icon, children]
41
- })
42
- }));
33
+ }, rest), /*#__PURE__*/React.createElement(Flexbox, {
34
+ align: 'center',
35
+ gap: 4,
36
+ horizontal: true
37
+ }, icon, children));
43
38
  });
44
39
  export default Tag;
@@ -1,8 +1,5 @@
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";
6
3
  var Meta = /*#__PURE__*/memo(function (_ref) {
7
4
  var _ref$title = _ref.title,
8
5
  title = _ref$title === void 0 ? 'LobeHub' : _ref$title,
@@ -17,60 +14,58 @@ var Meta = /*#__PURE__*/memo(function (_ref) {
17
14
  version: 'latest'
18
15
  });
19
16
  }, []);
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
- });
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
+ }));
75
70
  });
76
71
  export default Meta;
@@ -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 _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
6
  var _excluded = ["children", "customStylish", "customToken", "enableCustomFonts", "enableGlobalStyle", "customFonts", "customTheme", "className", "style", "theme"];
@@ -12,9 +13,6 @@ import FontLoader from "../FontLoader";
12
13
  import { lobeCustomStylish, lobeCustomToken } from "../styles";
13
14
  import { createLobeAntdTheme } from "../styles/theme/antdTheme";
14
15
  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";
18
16
  var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
19
17
  var children = _ref.children,
20
18
  customStylish = _ref.customStylish,
@@ -60,26 +58,22 @@ var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
60
58
  });
61
59
  return merge(lobeTheme, antdTheme);
62
60
  }, [customTheme.primaryColor, customTheme.neutralColor, antdTheme]);
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
- });
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)));
83
77
  });
84
78
  ThemeProvider.displayName = 'LobeThemeProvider';
85
79
  export default ThemeProvider;
@@ -6,8 +6,6 @@ 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";
11
9
  var icons = {
12
10
  auto: Monitor,
13
11
  dark: Moon,
@@ -30,21 +28,21 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
30
28
  style = _ref.style;
31
29
  var items = useMemo(function () {
32
30
  return [{
33
- icon: /*#__PURE__*/_jsx(Icon, {
31
+ icon: /*#__PURE__*/React.createElement(Icon, {
34
32
  icon: icons.auto,
35
33
  size: "small"
36
34
  }),
37
35
  key: 'auto',
38
36
  label: labels.auto
39
37
  }, {
40
- icon: /*#__PURE__*/_jsx(Icon, {
38
+ icon: /*#__PURE__*/React.createElement(Icon, {
41
39
  icon: icons.light,
42
40
  size: "small"
43
41
  }),
44
42
  key: 'light',
45
43
  label: labels.light
46
44
  }, {
47
- icon: /*#__PURE__*/_jsx(Icon, {
45
+ icon: /*#__PURE__*/React.createElement(Icon, {
48
46
  icon: icons.dark,
49
47
  size: "small"
50
48
  }),
@@ -53,17 +51,16 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
53
51
  }];
54
52
  }, [labels]);
55
53
  if (type === 'select') {
56
- return /*#__PURE__*/_jsx(Select, {
54
+ return /*#__PURE__*/React.createElement(Select, {
57
55
  className: className,
58
56
  defaultValue: themeMode,
59
57
  onChange: onThemeSwitch,
60
58
  options: items.map(function (item) {
61
59
  return {
62
- label: /*#__PURE__*/_jsxs(Flexbox, {
60
+ label: /*#__PURE__*/React.createElement(Flexbox, {
63
61
  direction: 'horizontal',
64
- gap: 8,
65
- children: [item.icon, item.label]
66
- }),
62
+ gap: 8
63
+ }, item.icon, item.label),
67
64
  value: item.key
68
65
  };
69
66
  }),
@@ -76,16 +73,15 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
76
73
  return onThemeSwitch(e.key);
77
74
  }
78
75
  };
79
- return /*#__PURE__*/_jsx(Dropdown, {
76
+ return /*#__PURE__*/React.createElement(Dropdown, {
80
77
  menu: menuProps,
81
- trigger: ['click'],
82
- children: /*#__PURE__*/_jsx(ActionIcon, {
83
- className: className,
84
- icon: icons[themeMode],
85
- size: size,
86
- style: style
87
- })
88
- });
78
+ trigger: ['click']
79
+ }, /*#__PURE__*/React.createElement(ActionIcon, {
80
+ className: className,
81
+ icon: icons[themeMode],
82
+ size: size,
83
+ style: style
84
+ }));
89
85
  }
90
86
  });
91
87
  export default ThemeSwitch;
@@ -5,7 +5,6 @@ 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";
9
8
  export var mapItems = function mapItems(items) {
10
9
  return items.map(function (item) {
11
10
  var _item$children;
@@ -47,62 +46,58 @@ var TocMobile = /*#__PURE__*/memo(function (_ref) {
47
46
  var activeAnchor = items.find(function (item) {
48
47
  return item.id === activeLink;
49
48
  });
50
- return /*#__PURE__*/_jsx(ConfigProvider, {
49
+ return /*#__PURE__*/React.createElement(ConfigProvider, {
51
50
  theme: {
52
51
  token: {
53
52
  fontSize: 12,
54
53
  sizeStep: 3
55
54
  }
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
+ });
56
80
  },
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
- });
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
+ }))))));
107
102
  });
108
103
  export default TocMobile;
package/es/Toc/index.js CHANGED
@@ -4,8 +4,6 @@ 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";
9
7
  var Toc = /*#__PURE__*/memo(function (_ref) {
10
8
  var activeKey = _ref.activeKey,
11
9
  items = _ref.items,
@@ -21,21 +19,18 @@ var Toc = /*#__PURE__*/memo(function (_ref) {
21
19
  }),
22
20
  styles = _useStyles.styles,
23
21
  cx = _useStyles.cx;
24
- if (isMobile) return /*#__PURE__*/_jsx(TocMobile, {
22
+ if (isMobile) return /*#__PURE__*/React.createElement(TocMobile, {
25
23
  activeKey: activeKey,
26
24
  getContainer: getContainer,
27
25
  headerHeight: headerHeight,
28
26
  items: items
29
27
  });
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
- });
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
+ }));
40
35
  });
41
36
  export default Toc;
@@ -1,12 +1,11 @@
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
  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";
10
9
  var Tooltip = /*#__PURE__*/memo(function (_ref) {
11
10
  var className = _ref.className,
12
11
  _ref$arrow = _ref.arrow,
@@ -15,7 +14,7 @@ var Tooltip = /*#__PURE__*/memo(function (_ref) {
15
14
  var _useStyles = useStyles(),
16
15
  styles = _useStyles.styles,
17
16
  cx = _useStyles.cx;
18
- return /*#__PURE__*/_jsx(AntdTooltip, _objectSpread({
17
+ return /*#__PURE__*/React.createElement(AntdTooltip, _extends({
19
18
  arrow: arrow,
20
19
  overlayClassName: cx(styles.tooltip, className)
21
20
  }, rest));
package/es/Video/index.js CHANGED
@@ -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 = ["preload", "src", "style", "classNames", "className", "minSize", "size", "width", "height", "onMouseEnter", "onMouseLeave", "preview", "isLoading", "borderless"];
@@ -10,8 +10,6 @@ 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";
15
13
  var Video = /*#__PURE__*/memo(function (_ref) {
16
14
  var _ref$preload = _ref.preload,
17
15
  preload = _ref$preload === void 0 ? 'auto' : _ref$preload,
@@ -55,7 +53,7 @@ var Video = /*#__PURE__*/memo(function (_ref) {
55
53
  setShowControls(false);
56
54
  onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(e);
57
55
  };
58
- if (isLoading) return /*#__PURE__*/_jsx(Skeleton.Avatar, {
56
+ if (isLoading) return /*#__PURE__*/React.createElement(Skeleton.Avatar, {
59
57
  active: true,
60
58
  style: {
61
59
  borderRadius: theme.borderRadius,
@@ -67,49 +65,45 @@ var Video = /*#__PURE__*/memo(function (_ref) {
67
65
  width: width
68
66
  }
69
67
  });
70
- return /*#__PURE__*/_jsxs(Flexbox, {
68
+ return /*#__PURE__*/React.createElement(Flexbox, {
71
69
  className: cx(styles.videoWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.wrapper),
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
- });
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
+ })));
114
108
  });
115
109
  export default Video;