@lobehub/ui 1.157.1 → 1.158.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/A/index.js +2 -2
- package/es/ActionIcon/index.js +11 -15
- package/es/ActionIconGroup/index.js +45 -47
- package/es/Alert/index.js +43 -50
- package/es/Avatar/index.js +10 -12
- package/es/Burger/index.js +30 -35
- package/es/CodeEditor/index.js +38 -41
- package/es/Collapse/index.js +3 -3
- package/es/ColorScales/ScaleRow.js +39 -43
- package/es/ColorScales/index.js +57 -59
- package/es/ConfigProvider/index.js +3 -5
- package/es/ContextMenu/index.js +2 -3
- package/es/CopyButton/index.js +3 -4
- package/es/DraggablePanel/components/DraggablePanelBody.js +2 -3
- package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -3
- package/es/DraggablePanel/components/DraggablePanelFooter.js +2 -3
- package/es/DraggablePanel/components/DraggablePanelHeader.js +5 -9
- package/es/DraggablePanel/index.js +28 -35
- package/es/EditableText/index.js +13 -16
- package/es/EmojiPicker/AvatarUploader.js +60 -71
- package/es/EmojiPicker/index.js +101 -110
- package/es/EmptyCard/index.js +23 -31
- package/es/FileTypeIcon/index.js +44 -55
- package/es/FluentEmoji/index.js +4 -6
- package/es/Footer/index.js +8 -10
- package/es/Form/components/FormDivider.js +2 -2
- package/es/Form/components/FormFlatGroup.js +4 -9
- package/es/Form/components/FormFooter.js +3 -6
- package/es/Form/components/FormGroup.js +15 -21
- package/es/Form/components/FormItem.js +10 -17
- package/es/Form/components/FormTitle.js +15 -23
- package/es/Form/index.js +26 -30
- package/es/FormModal/index.js +30 -34
- package/es/Grid/index.js +3 -6
- package/es/Header/index.js +49 -65
- package/es/Highlighter/FullFeatured.js +41 -51
- package/es/Highlighter/SyntaxHighlighter/index.js +19 -30
- package/es/Highlighter/index.js +19 -29
- package/es/Icon/icons/DiscordIcon.js +2 -3
- package/es/Icon/index.js +13 -16
- package/es/Image/ImageGallery.js +3 -5
- package/es/Image/Preview.js +5 -6
- package/es/Image/index.js +34 -38
- package/es/Image/usePreview.js +33 -37
- package/es/Img/index.js +2 -2
- package/es/Input/index.js +3 -3
- package/es/Layout/index.js +35 -63
- package/es/List/ListItem/index.js +53 -67
- package/es/Markdown/CodeBlock.js +10 -16
- package/es/Markdown/Typography.js +3 -6
- package/es/Markdown/index.js +18 -22
- package/es/MaterialFileTypeIcon/index.js +17 -20
- package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
- package/es/Mermaid/FullFeatured.js +35 -45
- package/es/Mermaid/index.js +17 -26
- package/es/Mermaid/useMermaid.d.ts +2 -1
- package/es/Mermaid/useMermaid.js +3 -5
- package/es/Modal/index.js +48 -60
- package/es/SearchBar/index.js +48 -52
- package/es/SelectWithImg/index.js +34 -40
- package/es/SideNav/index.js +15 -22
- package/es/SliderWithInput/index.js +35 -38
- package/es/Snippet/index.js +10 -15
- package/es/SortableList/DragHandle.js +3 -3
- package/es/SortableList/SortableItem.js +16 -19
- package/es/SortableList/SortableOverlay.js +3 -5
- package/es/SortableList/index.js +15 -23
- package/es/Swatches/index.js +18 -20
- package/es/TabsNav/index.js +2 -3
- package/es/Tag/index.js +7 -12
- package/es/ThemeProvider/Meta.js +53 -58
- package/es/ThemeProvider/index.js +17 -23
- package/es/ThemeSwitch/index.js +15 -19
- package/es/Toc/TocMobile.js +47 -52
- package/es/Toc/index.js +8 -13
- package/es/Tooltip/index.js +2 -3
- package/es/Video/index.js +41 -47
- package/es/awesome/AuroraBackground/index.js +11 -18
- package/es/awesome/Features/Item.js +37 -45
- package/es/awesome/Features/index.js +5 -4
- package/es/awesome/GaussianBackground/index.js +8 -13
- package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +1 -1
- package/es/awesome/GaussianBackground/useGaussianBackground.js +1 -1
- package/es/awesome/Giscus/index.js +13 -15
- package/es/awesome/GradientButton/index.js +5 -9
- package/es/awesome/GridBackground/Grid.js +49 -61
- package/es/awesome/GridBackground/GridShowcase.js +24 -28
- package/es/awesome/GridBackground/index.js +27 -33
- package/es/awesome/Hero/index.js +63 -74
- package/es/awesome/Spline/ParentSize.js +7 -8
- package/es/awesome/Spline/index.js +10 -13
- package/es/awesome/Spotlight/index.js +3 -4
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +5 -8
- package/es/awesome/SpotlightCard/index.js +9 -12
- package/es/brand/BrandLoading/index.js +2 -3
- package/es/brand/LobeChat/index.js +29 -38
- package/es/brand/LobeChatText/index.js +8 -13
- package/es/brand/LobeHub/index.js +29 -38
- package/es/brand/LobeHubText/index.js +4 -9
- package/es/brand/Logo3d/index.js +2 -3
- package/es/brand/LogoFlat/index.js +44 -49
- package/es/brand/LogoMono/index.js +48 -53
- package/es/brand/LogoThree/Loading.js +9 -11
- package/es/brand/LogoThree/LogoSpline.js +10 -12
- package/es/brand/LogoThree/index.js +23 -25
- package/es/brand/components/Divider.js +4 -6
- package/es/chat/BackBottom/index.js +4 -6
- package/es/chat/ChatHeader/ChatHeaderTitle.js +22 -31
- package/es/chat/ChatHeader/index.js +35 -42
- package/es/chat/ChatInputArea/ChatInputActionBar.js +16 -21
- package/es/chat/ChatInputArea/ChatInputArea.d.ts +1 -1
- package/es/chat/ChatInputArea/ChatInputArea.js +19 -23
- package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +1 -1
- package/es/chat/ChatInputArea/ChatInputAreaInner.js +2 -3
- package/es/chat/ChatInputArea/SendButton.js +36 -51
- package/es/chat/ChatItem/components/Actions.js +3 -5
- package/es/chat/ChatItem/components/Avatar.js +17 -21
- package/es/chat/ChatItem/components/BorderSpacing.js +1 -2
- package/es/chat/ChatItem/components/ErrorContent.js +9 -11
- package/es/chat/ChatItem/components/Loading.js +10 -12
- package/es/chat/ChatItem/components/MessageContent.js +6 -10
- package/es/chat/ChatItem/components/Title.js +3 -8
- package/es/chat/ChatItem/index.js +47 -53
- package/es/chat/ChatList/ActionsBar.js +2 -3
- package/es/chat/ChatList/HistoryDivider.js +6 -11
- package/es/chat/ChatList/Item.js +14 -12
- package/es/chat/ChatList/index.js +25 -29
- package/es/chat/EditableMessage/index.js +26 -32
- package/es/chat/EditableMessageList/index.js +72 -76
- package/es/chat/MessageInput/index.js +35 -43
- package/es/chat/MessageModal/index.js +41 -51
- package/es/chat/TokenTag/index.js +7 -11
- package/es/components/ControlInput.js +18 -22
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/hooks/useHighlight.js +1 -1
- package/es/mdx/Callout/index.js +13 -19
- package/es/mdx/Cards/Card.js +46 -59
- package/es/mdx/Cards/index.js +3 -6
- package/es/mdx/FileTree/File.js +5 -11
- package/es/mdx/FileTree/Folder.js +13 -22
- package/es/mdx/FileTree/index.js +3 -6
- package/es/mdx/Mdx/index.js +7 -9
- package/es/mdx/Steps/index.js +3 -6
- package/es/mdx/Tabs/Tab.js +3 -8
- package/es/mdx/Tabs/index.js +17 -21
- package/es/mdx/mdxComponents/CodeBlock.js +9 -14
- package/es/mdx/mdxComponents/Image.js +2 -2
- package/es/mdx/mdxComponents/Link.js +2 -3
- package/es/mdx/mdxComponents/Pre.js +7 -14
- package/es/mdx/mdxComponents/Video.js +2 -2
- package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
- package/es/mobile/MobileChatInputArea/index.js +69 -79
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
- package/es/mobile/MobileNavBar/index.js +41 -48
- package/es/mobile/MobileSafeArea/index.js +2 -3
- package/es/mobile/MobileTabBar/index.js +29 -35
- package/es/storybook/StoryBook/index.js +19 -26
- package/package.json +43 -46
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";
|
|
3
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
5
|
import { createElement, forwardRef, useContext, useMemo } from 'react';
|
|
5
6
|
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__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement(AContainer, _extends({
|
|
21
21
|
ref: ref
|
|
22
22
|
}, props));
|
|
23
23
|
});
|
package/es/ActionIcon/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
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"];
|
|
7
8
|
import { Loader2 } from 'lucide-react';
|
|
@@ -12,8 +13,6 @@ import Tooltip from "../Tooltip";
|
|
|
12
13
|
import Spotlight from "../awesome/Spotlight";
|
|
13
14
|
import { calcSize } from "./calcSize";
|
|
14
15
|
import { useStyles } from "./style";
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
18
17
|
var color = _ref.color,
|
|
19
18
|
fill = _ref.fill,
|
|
@@ -60,15 +59,15 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
60
59
|
focusable: focusable,
|
|
61
60
|
size: size === 'site' ? 'normal' : size
|
|
62
61
|
};
|
|
63
|
-
var content = icon && /*#__PURE__*/
|
|
62
|
+
var content = icon && /*#__PURE__*/React.createElement(Icon, _extends({
|
|
64
63
|
className: styles.icon,
|
|
65
64
|
icon: icon
|
|
66
|
-
}, iconProps
|
|
65
|
+
}, iconProps, {
|
|
67
66
|
spin: iconSpinning
|
|
68
67
|
}));
|
|
69
|
-
var spin = /*#__PURE__*/
|
|
68
|
+
var spin = /*#__PURE__*/React.createElement(Icon, _extends({
|
|
70
69
|
icon: Loader2
|
|
71
|
-
}, iconProps
|
|
70
|
+
}, iconProps, {
|
|
72
71
|
spin: true
|
|
73
72
|
}));
|
|
74
73
|
var _useState = useState(false),
|
|
@@ -80,7 +79,7 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
80
79
|
setTooltipOpen(false);
|
|
81
80
|
onClick === null || onClick === void 0 || onClick(event);
|
|
82
81
|
}, [loading, disable, setTooltipOpen, onClick]);
|
|
83
|
-
var actionIconBlock = /*#__PURE__*/
|
|
82
|
+
var actionIconBlock = /*#__PURE__*/React.createElement(Flexbox, _extends({
|
|
84
83
|
align: 'center',
|
|
85
84
|
className: cx(styles.block, disable ? styles.disabled : styles.normal, className),
|
|
86
85
|
horizontal: true,
|
|
@@ -92,11 +91,9 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
91
|
height: blockSize,
|
|
93
92
|
width: blockSize
|
|
94
93
|
}, style)
|
|
95
|
-
}, rest),
|
|
96
|
-
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), loading ? spin : content, children]
|
|
97
|
-
}));
|
|
94
|
+
}, rest), spotlight && /*#__PURE__*/React.createElement(Spotlight, null), loading ? spin : content, children);
|
|
98
95
|
if (!title) return actionIconBlock;
|
|
99
|
-
return /*#__PURE__*/
|
|
96
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
100
97
|
arrow: arrow,
|
|
101
98
|
mouseEnterDelay: tooltipDelay,
|
|
102
99
|
onOpenChange: setTooltipOpen,
|
|
@@ -105,8 +102,7 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
105
102
|
pointerEvents: 'none'
|
|
106
103
|
}, overlayStyle),
|
|
107
104
|
placement: placement,
|
|
108
|
-
title: title
|
|
109
|
-
|
|
110
|
-
});
|
|
105
|
+
title: title
|
|
106
|
+
}, actionIconBlock);
|
|
111
107
|
});
|
|
112
108
|
export default ActionIcon;
|
|
@@ -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 = ["type", "items", "placement", "direction", "dropdownMenu", "onActionClick", "size"];
|
|
@@ -10,8 +11,6 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
10
11
|
import ActionIcon from "../ActionIcon";
|
|
11
12
|
import Icon from "../Icon";
|
|
12
13
|
import { useStyles } from "./style";
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
16
15
|
var _ref$type = _ref.type,
|
|
17
16
|
type = _ref$type === void 0 ? 'block' : _ref$type,
|
|
@@ -31,52 +30,51 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
31
30
|
}),
|
|
32
31
|
styles = _useStyles.styles;
|
|
33
32
|
var tooltipsPlacement = placement || (direction === 'column' ? 'right' : 'top');
|
|
34
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement(Flexbox, _extends({
|
|
35
34
|
className: styles.container,
|
|
36
35
|
horizontal: direction === 'row'
|
|
37
|
-
}, rest),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}));
|
|
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
|
+
})));
|
|
81
79
|
});
|
|
82
80
|
export default ActionIconGroup;
|
package/es/Alert/index.js
CHANGED
|
@@ -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 _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -12,8 +13,6 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
12
13
|
import ActionIcon from "../ActionIcon";
|
|
13
14
|
import Icon from "../Icon";
|
|
14
15
|
import { useStyles } from "./style";
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
var typeIcons = {
|
|
18
17
|
error: XCircle,
|
|
19
18
|
info: Info,
|
|
@@ -62,17 +61,17 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
62
61
|
styles = _useStyles.styles,
|
|
63
62
|
cx = _useStyles.cx;
|
|
64
63
|
var isInsideExtra = !extraIsolate && !!extra;
|
|
65
|
-
var alert = /*#__PURE__*/
|
|
64
|
+
var alert = /*#__PURE__*/React.createElement(AntdAlert, _extends({
|
|
66
65
|
banner: banner,
|
|
67
66
|
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),
|
|
68
67
|
closable: closable,
|
|
69
|
-
closeIcon: closeIcon || /*#__PURE__*/
|
|
68
|
+
closeIcon: closeIcon || /*#__PURE__*/React.createElement(ActionIcon, {
|
|
70
69
|
color: colors(theme, type),
|
|
71
70
|
icon: X,
|
|
72
71
|
size: 'small'
|
|
73
72
|
}),
|
|
74
73
|
description: description,
|
|
75
|
-
icon: /*#__PURE__*/
|
|
74
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
76
75
|
icon: typeIcons[type] || icon,
|
|
77
76
|
size: {
|
|
78
77
|
fontSize: description ? 24 : 18
|
|
@@ -85,51 +84,45 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
85
84
|
type: type
|
|
86
85
|
}, rest));
|
|
87
86
|
if (!extra) return alert;
|
|
88
|
-
if (extraIsolate) return /*#__PURE__*/
|
|
87
|
+
if (extraIsolate) return /*#__PURE__*/React.createElement(Flexbox, {
|
|
89
88
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
|
|
90
|
-
gap: 8
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}), expand && /*#__PURE__*/_jsx("div", {
|
|
129
|
-
className: cx(styles.extraBody, variant === 'pure' && styles.variantPure),
|
|
130
|
-
children: extra
|
|
131
|
-
})]
|
|
132
|
-
})]
|
|
133
|
-
});
|
|
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)));
|
|
134
127
|
});
|
|
135
128
|
export default Alert;
|
package/es/Avatar/index.js
CHANGED
|
@@ -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 = ["className", "avatar", "title", "animation", "size", "shape", "background", "style", "unoptimized"];
|
|
@@ -9,7 +10,6 @@ import { forwardRef, isValidElement, useMemo } from 'react';
|
|
|
9
10
|
import FluentEmoji from "../FluentEmoji";
|
|
10
11
|
import Img from "../Img";
|
|
11
12
|
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,24 +47,22 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
47
47
|
cursor: 'default'
|
|
48
48
|
}, style)
|
|
49
49
|
}, rest);
|
|
50
|
-
return isDefaultAntAvatar ? /*#__PURE__*/
|
|
50
|
+
return isDefaultAntAvatar ? /*#__PURE__*/React.createElement(AntAvatar, _extends({
|
|
51
51
|
ref: ref,
|
|
52
|
-
src: typeof avatar === 'string' ? /*#__PURE__*/
|
|
52
|
+
src: typeof avatar === 'string' ? /*#__PURE__*/React.createElement(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__*/
|
|
59
|
+
}, avatarProps)) : /*#__PURE__*/React.createElement(AntAvatar, _extends({
|
|
60
60
|
ref: ref
|
|
61
|
-
}, avatarProps),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}) : text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2)
|
|
68
|
-
}));
|
|
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));
|
|
69
67
|
});
|
|
70
68
|
export default Avatar;
|
package/es/Burger/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
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,8 +9,6 @@ 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";
|
|
14
12
|
var Burger = /*#__PURE__*/memo(function (_ref) {
|
|
15
13
|
var items = _ref.items,
|
|
16
14
|
openKeys = _ref.openKeys,
|
|
@@ -32,42 +30,39 @@ var Burger = /*#__PURE__*/memo(function (_ref) {
|
|
|
32
30
|
}),
|
|
33
31
|
cx = _useStyles.cx,
|
|
34
32
|
styles = _useStyles.styles;
|
|
35
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement(Center, _extends({
|
|
36
34
|
className: cx(styles.container, className),
|
|
37
35
|
onClick: function onClick() {
|
|
38
36
|
setOpened(!opened);
|
|
39
37
|
}
|
|
40
|
-
}, rest),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
padding: 0
|
|
55
|
-
},
|
|
56
|
-
header: {
|
|
57
|
-
display: 'none'
|
|
58
|
-
}
|
|
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
|
|
59
52
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
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
|
+
})));
|
|
72
67
|
});
|
|
73
68
|
export default Burger;
|
package/es/CodeEditor/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -6,8 +7,6 @@ import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useSta
|
|
|
6
7
|
import { Flexbox } from 'react-layout-kit';
|
|
7
8
|
import { useStyles } from "./style";
|
|
8
9
|
import SyntaxHighlighter from "../Highlighter/SyntaxHighlighter";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
var KEYCODE_Y = 89;
|
|
12
11
|
var KEYCODE_Z = 90;
|
|
13
12
|
var KEYCODE_M = 77;
|
|
@@ -369,46 +368,44 @@ var Editor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
369
368
|
}
|
|
370
369
|
};
|
|
371
370
|
}, []);
|
|
372
|
-
return /*#__PURE__*/
|
|
371
|
+
return /*#__PURE__*/React.createElement(Flexbox, _extends({
|
|
373
372
|
className: cx(styles.container, className),
|
|
374
373
|
style: style
|
|
375
|
-
}, rest),
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
})
|
|
412
|
-
}));
|
|
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
|
+
})));
|
|
413
410
|
});
|
|
414
411
|
export default Editor;
|
package/es/Collapse/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -7,7 +8,6 @@ import { ChevronDown } from 'lucide-react';
|
|
|
7
8
|
import { memo } from 'react';
|
|
8
9
|
import Icon from "../Icon";
|
|
9
10
|
import { useStyles } from "./style";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
var Collapse = /*#__PURE__*/memo(function (_ref) {
|
|
12
12
|
var style = _ref.style,
|
|
13
13
|
_ref$variant = _ref.variant,
|
|
@@ -29,13 +29,13 @@ var Collapse = /*#__PURE__*/memo(function (_ref) {
|
|
|
29
29
|
cx = _useStyles.cx,
|
|
30
30
|
styles = _useStyles.styles;
|
|
31
31
|
var variantStyle = cx(variant === 'default' && styles.defaultStyle, variant === 'block' && styles.blockStyle, variant === 'ghost' && styles.ghostStyle, variant === 'pure' && styles.pureStyle);
|
|
32
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/React.createElement(AntdCollapse, _extends({
|
|
33
33
|
bordered: !gap && (variant === 'default' || variant === 'ghost'),
|
|
34
34
|
className: cx(styles.group, !collapsible && styles.hideCollapsibleIcon, variantStyle, className),
|
|
35
35
|
collapsible: collapsible ? 'header' : 'icon',
|
|
36
36
|
expandIcon: function expandIcon(_ref2) {
|
|
37
37
|
var isActive = _ref2.isActive;
|
|
38
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
39
39
|
className: styles.icon,
|
|
40
40
|
icon: ChevronDown,
|
|
41
41
|
size: {
|