@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
package/es/A/index.js CHANGED
@@ -1,9 +1,9 @@
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 { createElement, forwardRef, useContext, useMemo } from 'react';
6
5
  import { ConfigContext } from "../ConfigProvider";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  var createContainer = function createContainer(as) {
8
8
  return /*#__PURE__*/forwardRef(function (props, ref) {
9
9
  return /*#__PURE__*/createElement(as, _objectSpread(_objectSpread({}, props), {}, {
@@ -17,7 +17,7 @@ var A = /*#__PURE__*/forwardRef(function (props, ref) {
17
17
  var AContainer = useMemo(function () {
18
18
  return createContainer(render);
19
19
  }, [render]);
20
- return /*#__PURE__*/React.createElement(AContainer, _extends({
20
+ return /*#__PURE__*/_jsx(AContainer, _objectSpread({
21
21
  ref: ref
22
22
  }, props));
23
23
  });
@@ -1,4 +1,4 @@
1
- import { type CSSProperties } from 'react';
1
+ /// <reference types="react" />
2
2
  import { type FlexboxProps } from 'react-layout-kit';
3
3
  import { type IconProps, type IconSizeConfig, type IconSizeType, LucideIconProps } from "../Icon";
4
4
  import { type TooltipProps } from "../Tooltip";
@@ -19,6 +19,7 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
19
19
  * @default false
20
20
  */
21
21
  arrow?: boolean;
22
+ classNames?: TooltipProps['classNames'];
22
23
  disable?: boolean;
23
24
  /**
24
25
  * @description Glass blur style
@@ -30,7 +31,8 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
30
31
  * @description Set the loading status of ActionIcon
31
32
  */
32
33
  loading?: boolean;
33
- overlayStyle?: CSSProperties;
34
+ overlayClassName?: TooltipProps['overlayClassName'];
35
+ overlayStyle?: TooltipProps['overlayStyle'];
34
36
  /**
35
37
  * @description The position of the tooltip relative to the target
36
38
  * @enum ["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]
@@ -48,6 +50,7 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
48
50
  * @default false
49
51
  */
50
52
  spotlight?: boolean;
53
+ styles?: TooltipProps['styles'];
51
54
  /**
52
55
  * @description The text shown in the tooltip
53
56
  */
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
- import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
- var _excluded = ["color", "fill", "className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick", "children", "loading", "overlayStyle", "tooltipDelay", "fillOpacity", "fillRule", "focusable", "disable", "spin"];
6
+ var _excluded = ["color", "fill", "className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick", "children", "loading", "tooltipDelay", "fillOpacity", "fillRule", "focusable", "disable", "spin", "styles"];
8
7
  import { Loader2 } from 'lucide-react';
9
8
  import { forwardRef, useCallback, useMemo, useState } from 'react';
10
9
  import { Flexbox } from 'react-layout-kit';
@@ -13,6 +12,8 @@ import Tooltip from "../Tooltip";
13
12
  import Spotlight from "../awesome/Spotlight";
14
13
  import { calcSize } from "./calcSize";
15
14
  import { useStyles } from "./style";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
18
  var color = _ref.color,
18
19
  fill = _ref.fill,
@@ -31,7 +32,6 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
31
32
  onClick = _ref.onClick,
32
33
  children = _ref.children,
33
34
  loading = _ref.loading,
34
- overlayStyle = _ref.overlayStyle,
35
35
  _ref$tooltipDelay = _ref.tooltipDelay,
36
36
  tooltipDelay = _ref$tooltipDelay === void 0 ? 0.5 : _ref$tooltipDelay,
37
37
  fillOpacity = _ref.fillOpacity,
@@ -39,12 +39,13 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
39
  focusable = _ref.focusable,
40
40
  disable = _ref.disable,
41
41
  iconSpinning = _ref.spin,
42
+ styles = _ref.styles,
42
43
  rest = _objectWithoutProperties(_ref, _excluded);
43
44
  var _useStyles = useStyles({
44
45
  active: Boolean(active),
45
46
  glass: Boolean(glass)
46
47
  }),
47
- styles = _useStyles.styles,
48
+ s = _useStyles.styles,
48
49
  cx = _useStyles.cx;
49
50
  var _useMemo = useMemo(function () {
50
51
  return calcSize(size);
@@ -59,15 +60,15 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
59
60
  focusable: focusable,
60
61
  size: size === 'site' ? 'normal' : size
61
62
  };
62
- var content = icon && /*#__PURE__*/React.createElement(Icon, _extends({
63
- className: styles.icon,
63
+ var content = icon && /*#__PURE__*/_jsx(Icon, _objectSpread(_objectSpread({
64
+ className: s.icon,
64
65
  icon: icon
65
- }, iconProps, {
66
+ }, iconProps), {}, {
66
67
  spin: iconSpinning
67
68
  }));
68
- var spin = /*#__PURE__*/React.createElement(Icon, _extends({
69
+ var spin = /*#__PURE__*/_jsx(Icon, _objectSpread(_objectSpread({
69
70
  icon: Loader2
70
- }, iconProps, {
71
+ }, iconProps), {}, {
71
72
  spin: true
72
73
  }));
73
74
  var _useState = useState(false),
@@ -79,9 +80,9 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
79
80
  setTooltipOpen(false);
80
81
  onClick === null || onClick === void 0 || onClick(event);
81
82
  }, [loading, disable, setTooltipOpen, onClick]);
82
- var actionIconBlock = /*#__PURE__*/React.createElement(Flexbox, _extends({
83
+ var actionIconBlock = /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
83
84
  align: 'center',
84
- className: cx(styles.block, disable ? styles.disabled : styles.normal, className),
85
+ className: cx(s.block, disable ? s.disabled : s.normal, className),
85
86
  horizontal: true,
86
87
  justify: 'center',
87
88
  onClick: handleClick,
@@ -91,18 +92,23 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
91
92
  height: blockSize,
92
93
  width: blockSize
93
94
  }, style)
94
- }, rest), spotlight && /*#__PURE__*/React.createElement(Spotlight, null), loading ? spin : content, children);
95
+ }, rest), {}, {
96
+ children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), loading ? spin : content, children]
97
+ }));
95
98
  if (!title) return actionIconBlock;
96
- return /*#__PURE__*/React.createElement(Tooltip, {
99
+ return /*#__PURE__*/_jsx(Tooltip, {
97
100
  arrow: arrow,
98
101
  mouseEnterDelay: tooltipDelay,
99
102
  onOpenChange: setTooltipOpen,
100
103
  open: tooltipOpen,
101
- overlayStyle: _objectSpread({
102
- pointerEvents: 'none'
103
- }, overlayStyle),
104
104
  placement: placement,
105
- title: title
106
- }, actionIconBlock);
105
+ styles: _objectSpread(_objectSpread({}, styles), {}, {
106
+ root: _objectSpread({
107
+ pointerEvents: 'none'
108
+ }, styles === null || styles === void 0 ? void 0 : styles.root)
109
+ }),
110
+ title: title,
111
+ children: actionIconBlock
112
+ });
107
113
  });
108
114
  export default ActionIcon;
@@ -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 = ["type", "items", "placement", "direction", "dropdownMenu", "onActionClick", "size"];
@@ -11,6 +10,8 @@ import { Flexbox } from 'react-layout-kit';
11
10
  import ActionIcon from "../ActionIcon";
12
11
  import Icon from "../Icon";
13
12
  import { useStyles } from "./style";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
15
  var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
15
16
  var _ref$type = _ref.type,
16
17
  type = _ref$type === void 0 ? 'block' : _ref$type,
@@ -30,51 +31,52 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
30
31
  }),
31
32
  styles = _useStyles.styles;
32
33
  var tooltipsPlacement = placement || (direction === 'column' ? 'right' : 'top');
33
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
34
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
34
35
  className: styles.container,
35
36
  horizontal: direction === 'row'
36
- }, rest), (items === null || items === void 0 ? void 0 : items.length) > 0 && items.map(function (item) {
37
- return /*#__PURE__*/React.createElement(ActionIcon, {
38
- disable: item.disable,
39
- icon: item.icon,
40
- key: item.key,
41
- onClick: onActionClick ? function () {
42
- return onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick({
43
- item: item,
44
- key: item.key,
45
- keyPath: [item.key]
46
- });
47
- } : undefined,
48
- placement: tooltipsPlacement,
49
- size: size,
50
- title: item.label
51
- });
52
- }), (dropdownMenu === null || dropdownMenu === void 0 ? void 0 : dropdownMenu.length) > 0 && /*#__PURE__*/React.createElement(Dropdown, {
53
- menu: {
54
- items: dropdownMenu.map(function (item) {
55
- if (item.type) return item;
56
- return _objectSpread(_objectSpread({}, item), {}, {
57
- disabled: item.disable,
58
- icon: /*#__PURE__*/React.createElement(Icon, {
59
- icon: item.icon,
60
- size: size
61
- }),
62
- onClick: onActionClick ? function (info) {
63
- return onActionClick({
64
- item: item,
65
- key: info.key,
66
- keyPath: info.keyPath
67
- });
68
- } : undefined
69
- });
70
- })
71
- },
72
- trigger: ['click']
73
- }, /*#__PURE__*/React.createElement(ActionIcon, {
74
- icon: MoreHorizontal,
75
- key: "more",
76
- placement: tooltipsPlacement,
77
- size: size
78
- })));
37
+ }, rest), {}, {
38
+ children: [(items === null || items === void 0 ? void 0 : items.length) > 0 && items.map(function (item) {
39
+ return /*#__PURE__*/_jsx(ActionIcon, {
40
+ disable: item.disable,
41
+ icon: item.icon,
42
+ onClick: onActionClick ? function () {
43
+ return onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick({
44
+ item: item,
45
+ key: item.key,
46
+ keyPath: [item.key]
47
+ });
48
+ } : undefined,
49
+ placement: tooltipsPlacement,
50
+ size: size,
51
+ title: item.label
52
+ }, item.key);
53
+ }), (dropdownMenu === null || dropdownMenu === void 0 ? void 0 : dropdownMenu.length) > 0 && /*#__PURE__*/_jsx(Dropdown, {
54
+ menu: {
55
+ items: dropdownMenu.map(function (item) {
56
+ if (item.type) return item;
57
+ return _objectSpread(_objectSpread({}, item), {}, {
58
+ disabled: item.disable,
59
+ icon: /*#__PURE__*/_jsx(Icon, {
60
+ icon: item.icon,
61
+ size: size
62
+ }),
63
+ onClick: onActionClick ? function (info) {
64
+ return onActionClick({
65
+ item: item,
66
+ key: info.key,
67
+ keyPath: info.keyPath
68
+ });
69
+ } : undefined
70
+ });
71
+ })
72
+ },
73
+ trigger: ['click'],
74
+ children: /*#__PURE__*/_jsx(ActionIcon, {
75
+ icon: MoreHorizontal,
76
+ placement: tooltipsPlacement,
77
+ size: size
78
+ }, "more")
79
+ })]
80
+ }));
79
81
  });
80
82
  export default ActionIconGroup;
package/es/Alert/index.js CHANGED
@@ -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 _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
@@ -13,6 +12,8 @@ import { Flexbox } from 'react-layout-kit';
13
12
  import ActionIcon from "../ActionIcon";
14
13
  import Icon from "../Icon";
15
14
  import { useStyles } from "./style";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  var typeIcons = {
17
18
  error: XCircle,
18
19
  info: Info,
@@ -61,17 +62,17 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
61
62
  styles = _useStyles.styles,
62
63
  cx = _useStyles.cx;
63
64
  var isInsideExtra = !extraIsolate && !!extra;
64
- var alert = /*#__PURE__*/React.createElement(AntdAlert, _extends({
65
+ var alert = /*#__PURE__*/_jsx(AntdAlert, _objectSpread({
65
66
  banner: banner,
66
67
  className: cx(styles.container, colorfulText && styles.colorfulText, !!isInsideExtra && styles.hasExtra, variant === 'block' && styles.variantBlock, variant === 'ghost' && styles.variantGhost, variant === 'pure' && styles.variantPure, classNames === null || classNames === void 0 ? void 0 : classNames.alert, !isInsideExtra && styles.container),
67
68
  closable: closable,
68
- closeIcon: closeIcon || /*#__PURE__*/React.createElement(ActionIcon, {
69
+ closeIcon: closeIcon || /*#__PURE__*/_jsx(ActionIcon, {
69
70
  color: colors(theme, type),
70
71
  icon: X,
71
72
  size: 'small'
72
73
  }),
73
74
  description: description,
74
- icon: /*#__PURE__*/React.createElement(Icon, {
75
+ icon: /*#__PURE__*/_jsx(Icon, {
75
76
  icon: typeIcons[type] || icon,
76
77
  size: {
77
78
  fontSize: description ? 24 : 18
@@ -84,45 +85,51 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
84
85
  type: type
85
86
  }, rest));
86
87
  if (!extra) return alert;
87
- if (extraIsolate) return /*#__PURE__*/React.createElement(Flexbox, {
88
+ if (extraIsolate) return /*#__PURE__*/_jsxs(Flexbox, {
88
89
  className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
89
- gap: 8
90
- }, alert, extra);
91
- return /*#__PURE__*/React.createElement(Flexbox, {
92
- className: classNames === null || classNames === void 0 ? void 0 : classNames.container
93
- }, alert, /*#__PURE__*/React.createElement(Flexbox, {
94
- className: cx(styles.extra, banner && styles.banner, variant === 'block' && styles.variantBlock, variant === 'ghost' && styles.variantGhost, variant === 'pure' && styles.variantPure),
95
- style: {
96
- background: colors(theme, type, 'bg'),
97
- borderColor: colors(theme, type, 'border'),
98
- color: colors(theme, type),
99
- fontSize: description ? 14 : 12
100
- }
101
- }, /*#__PURE__*/React.createElement(Flexbox, {
102
- align: 'center',
103
- className: cx(styles.extraHeader, variant === 'pure' && styles.variantPureExtraHeader),
104
- gap: message ? 6 : 10,
105
- horizontal: true,
106
- style: {
107
- borderColor: colors(theme, type, 'border')
108
- }
109
- }, /*#__PURE__*/React.createElement(ActionIcon, {
110
- color: colorfulText ? colors(theme, type) : undefined,
111
- icon: expand ? ChevronDown : ChevronRight,
112
- onClick: function onClick() {
113
- return setExpand(!expand);
114
- },
115
- size: {
116
- blockSize: 24,
117
- fontSize: 18
118
- }
119
- }), /*#__PURE__*/React.createElement("div", {
120
- className: cx(styles.expandText),
121
- onClick: function onClick() {
122
- return setExpand(!expand);
123
- }
124
- }, (text === null || text === void 0 ? void 0 : text.detail) || 'Show Details')), expand && /*#__PURE__*/React.createElement("div", {
125
- className: cx(styles.extraBody, variant === 'pure' && styles.variantPure)
126
- }, extra)));
90
+ gap: 8,
91
+ children: [alert, extra]
92
+ });
93
+ return /*#__PURE__*/_jsxs(Flexbox, {
94
+ className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
95
+ children: [alert, /*#__PURE__*/_jsxs(Flexbox, {
96
+ className: cx(styles.extra, banner && styles.banner, variant === 'block' && styles.variantBlock, variant === 'ghost' && styles.variantGhost, variant === 'pure' && styles.variantPure),
97
+ style: {
98
+ background: colors(theme, type, 'bg'),
99
+ borderColor: colors(theme, type, 'border'),
100
+ color: colors(theme, type),
101
+ fontSize: description ? 14 : 12
102
+ },
103
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
104
+ align: 'center',
105
+ className: cx(styles.extraHeader, variant === 'pure' && styles.variantPureExtraHeader),
106
+ gap: message ? 6 : 10,
107
+ horizontal: true,
108
+ style: {
109
+ borderColor: colors(theme, type, 'border')
110
+ },
111
+ children: [/*#__PURE__*/_jsx(ActionIcon, {
112
+ color: colorfulText ? colors(theme, type) : undefined,
113
+ icon: expand ? ChevronDown : ChevronRight,
114
+ onClick: function onClick() {
115
+ return setExpand(!expand);
116
+ },
117
+ size: {
118
+ blockSize: 24,
119
+ fontSize: 18
120
+ }
121
+ }), /*#__PURE__*/_jsx("div", {
122
+ className: cx(styles.expandText),
123
+ onClick: function onClick() {
124
+ return setExpand(!expand);
125
+ },
126
+ children: (text === null || text === void 0 ? void 0 : text.detail) || 'Show Details'
127
+ })]
128
+ }), expand && /*#__PURE__*/_jsx("div", {
129
+ className: cx(styles.extraBody, variant === 'pure' && styles.variantPure),
130
+ children: extra
131
+ })]
132
+ })]
133
+ });
127
134
  });
128
135
  export default Alert;
@@ -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 = ["className", "avatar", "title", "animation", "size", "shape", "background", "style", "unoptimized"];
@@ -10,6 +9,7 @@ import { forwardRef, isValidElement, useMemo } from 'react';
10
9
  import FluentEmoji from "../FluentEmoji";
11
10
  import Img from "../Img";
12
11
  import { useStyles } from "./style";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
14
14
  var className = _ref.className,
15
15
  avatar = _ref.avatar,
@@ -47,22 +47,24 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
47
47
  cursor: 'default'
48
48
  }, style)
49
49
  }, rest);
50
- return isDefaultAntAvatar ? /*#__PURE__*/React.createElement(AntAvatar, _extends({
50
+ return isDefaultAntAvatar ? /*#__PURE__*/_jsx(AntAvatar, _objectSpread({
51
51
  ref: ref,
52
- src: typeof avatar === 'string' ? /*#__PURE__*/React.createElement(Img, {
52
+ src: typeof avatar === 'string' ? /*#__PURE__*/_jsx(Img, {
53
53
  alt: avatarProps.alt || title,
54
54
  height: size,
55
55
  loading: 'lazy',
56
56
  src: avatar,
57
57
  width: size
58
58
  }) : avatar
59
- }, avatarProps)) : /*#__PURE__*/React.createElement(AntAvatar, _extends({
59
+ }, avatarProps)) : /*#__PURE__*/_jsx(AntAvatar, _objectSpread(_objectSpread({
60
60
  ref: ref
61
- }, avatarProps), emoji ? /*#__PURE__*/React.createElement(FluentEmoji, {
62
- emoji: emoji,
63
- size: size * 0.8,
64
- type: animation ? 'anim' : '3d',
65
- unoptimized: unoptimized
66
- }) : text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2));
61
+ }, avatarProps), {}, {
62
+ children: emoji ? /*#__PURE__*/_jsx(FluentEmoji, {
63
+ emoji: emoji,
64
+ size: size * 0.8,
65
+ type: animation ? 'anim' : '3d',
66
+ unoptimized: unoptimized
67
+ }) : text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2)
68
+ }));
67
69
  });
68
70
  export default Avatar;
@@ -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
  var _excluded = ["items", "openKeys", "selectedKeys", "opened", "setOpened", "className", "headerHeight", "onClick", "iconProps", "rootClassName", "fullscreen", "drawerProps"];
6
6
  import { Drawer, Menu } from 'antd';
@@ -9,6 +9,8 @@ import { memo } from 'react';
9
9
  import { Center } from 'react-layout-kit';
10
10
  import ActionIcon from "../ActionIcon";
11
11
  import { useStyles } from "./style";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
14
  var Burger = /*#__PURE__*/memo(function (_ref) {
13
15
  var items = _ref.items,
14
16
  openKeys = _ref.openKeys,
@@ -30,39 +32,42 @@ var Burger = /*#__PURE__*/memo(function (_ref) {
30
32
  }),
31
33
  cx = _useStyles.cx,
32
34
  styles = _useStyles.styles;
33
- return /*#__PURE__*/React.createElement(Center, _extends({
35
+ return /*#__PURE__*/_jsxs(Center, _objectSpread(_objectSpread({
34
36
  className: cx(styles.container, className),
35
37
  onClick: function onClick() {
36
38
  setOpened(!opened);
37
39
  }
38
- }, rest), /*#__PURE__*/React.createElement(ActionIcon, _extends({
39
- icon: opened ? X : MenuIcon,
40
- size: "site"
41
- }, iconProps)), /*#__PURE__*/React.createElement(Drawer, _extends({
42
- closeIcon: undefined,
43
- open: opened,
44
- placement: 'left',
45
- width: '100vw'
46
- }, drawerProps, {
47
- className: styles.drawer,
48
- rootClassName: cx(styles.drawerRoot, rootClassName),
49
- styles: {
50
- body: {
51
- padding: 0
40
+ }, rest), {}, {
41
+ children: [/*#__PURE__*/_jsx(ActionIcon, _objectSpread({
42
+ icon: opened ? X : MenuIcon,
43
+ size: "site"
44
+ }, iconProps)), /*#__PURE__*/_jsxs(Drawer, _objectSpread(_objectSpread({
45
+ closeIcon: undefined,
46
+ open: opened,
47
+ placement: 'left',
48
+ width: '100vw'
49
+ }, drawerProps), {}, {
50
+ className: styles.drawer,
51
+ rootClassName: cx(styles.drawerRoot, rootClassName),
52
+ styles: {
53
+ body: {
54
+ padding: 0
55
+ },
56
+ header: {
57
+ display: 'none'
58
+ }
52
59
  },
53
- header: {
54
- display: 'none'
55
- }
56
- }
57
- }), /*#__PURE__*/React.createElement(Menu, {
58
- className: styles.menu,
59
- items: items,
60
- mode: 'inline',
61
- onClick: onClick,
62
- openKeys: openKeys,
63
- selectedKeys: selectedKeys
64
- }), /*#__PURE__*/React.createElement("div", {
65
- className: styles.fillRect
66
- })));
60
+ children: [/*#__PURE__*/_jsx(Menu, {
61
+ className: styles.menu,
62
+ items: items,
63
+ mode: 'inline',
64
+ onClick: onClick,
65
+ openKeys: openKeys,
66
+ selectedKeys: selectedKeys
67
+ }), /*#__PURE__*/_jsx("div", {
68
+ className: styles.fillRect
69
+ })]
70
+ }))]
71
+ }));
67
72
  });
68
73
  export default Burger;
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
@@ -7,6 +6,8 @@ import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useSta
7
6
  import { Flexbox } from 'react-layout-kit';
8
7
  import { useStyles } from "./style";
9
8
  import SyntaxHighlighter from "../Highlighter/SyntaxHighlighter";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  var KEYCODE_Y = 89;
11
12
  var KEYCODE_Z = 90;
12
13
  var KEYCODE_M = 77;
@@ -368,44 +369,48 @@ var Editor = /*#__PURE__*/forwardRef(function (_ref, ref) {
368
369
  }
369
370
  };
370
371
  }, []);
371
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
372
+ return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
372
373
  className: cx(styles.container, className),
373
374
  style: style
374
- }, rest), /*#__PURE__*/React.createElement("div", {
375
- className: styles.editor
376
- }, /*#__PURE__*/React.createElement(SyntaxHighlighter, {
377
- className: cx(styles.highlight, classNames === null || classNames === void 0 ? void 0 : classNames.highlight),
378
- language: language,
379
- style: s.highlight
380
- }, value), /*#__PURE__*/React.createElement("textarea", {
381
- autoCapitalize: "off",
382
- autoComplete: "off",
383
- autoCorrect: "off",
384
- autoFocus: autoFocus,
385
- className: cx(styles.textarea, classNames === null || classNames === void 0 ? void 0 : classNames.textarea),
386
- "data-gramm": false,
387
- disabled: disabled,
388
- form: form,
389
- id: textareaId,
390
- maxLength: maxLength,
391
- minLength: minLength,
392
- onBlur: onBlur,
393
- onChange: handleChange,
394
- onClick: onClick,
395
- onFocus: onFocus,
396
- onKeyDown: handleKeyDown,
397
- onKeyUp: onKeyUp,
398
- placeholder: placeholder,
399
- readOnly: readOnly
400
- // @ts-ignore
401
- ,
402
- ref: function ref(c) {
403
- return inputRef.current = c;
404
- },
405
- required: required,
406
- spellCheck: false,
407
- style: _objectSpread({}, s === null || s === void 0 ? void 0 : s.textarea),
408
- value: value
409
- })));
375
+ }, rest), {}, {
376
+ children: /*#__PURE__*/_jsxs("div", {
377
+ className: styles.editor,
378
+ children: [/*#__PURE__*/_jsx(SyntaxHighlighter, {
379
+ className: cx(styles.highlight, classNames === null || classNames === void 0 ? void 0 : classNames.highlight),
380
+ language: language,
381
+ style: s.highlight,
382
+ children: value
383
+ }), /*#__PURE__*/_jsx("textarea", {
384
+ autoCapitalize: "off",
385
+ autoComplete: "off",
386
+ autoCorrect: "off",
387
+ autoFocus: autoFocus,
388
+ className: cx(styles.textarea, classNames === null || classNames === void 0 ? void 0 : classNames.textarea),
389
+ "data-gramm": false,
390
+ disabled: disabled,
391
+ form: form,
392
+ id: textareaId,
393
+ maxLength: maxLength,
394
+ minLength: minLength,
395
+ onBlur: onBlur,
396
+ onChange: handleChange,
397
+ onClick: onClick,
398
+ onFocus: onFocus,
399
+ onKeyDown: handleKeyDown,
400
+ onKeyUp: onKeyUp,
401
+ placeholder: placeholder,
402
+ readOnly: readOnly
403
+ // @ts-ignore
404
+ ,
405
+ ref: function ref(c) {
406
+ return inputRef.current = c;
407
+ },
408
+ required: required,
409
+ spellCheck: false,
410
+ style: _objectSpread({}, s === null || s === void 0 ? void 0 : s.textarea),
411
+ value: value
412
+ })]
413
+ })
414
+ }));
410
415
  });
411
416
  export default Editor;