@lobehub/ui 1.158.1 → 1.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/A/index.js +2 -2
- package/es/ActionIcon/index.js +15 -11
- package/es/ActionIconGroup/index.js +47 -45
- package/es/Alert/index.js +50 -43
- package/es/Avatar/index.js +12 -10
- package/es/Burger/index.js +35 -30
- package/es/CodeEditor/index.js +43 -38
- package/es/Collapse/index.js +3 -3
- package/es/ColorScales/ScaleRow.js +43 -39
- package/es/ColorScales/index.js +59 -57
- package/es/ConfigProvider/index.js +5 -3
- package/es/ContextMenu/index.js +3 -2
- package/es/CopyButton/index.js +4 -3
- package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
- package/es/DraggablePanel/index.js +32 -25
- package/es/EditableText/index.js +16 -13
- package/es/EmojiPicker/AvatarUploader.js +71 -60
- package/es/EmojiPicker/index.js +110 -101
- package/es/EmptyCard/index.js +31 -23
- package/es/FileTypeIcon/index.js +55 -44
- package/es/FluentEmoji/index.js +6 -4
- package/es/Footer/index.js +10 -8
- package/es/Form/components/FormDivider.js +2 -2
- package/es/Form/components/FormFlatGroup.js +9 -4
- package/es/Form/components/FormFooter.js +6 -3
- package/es/Form/components/FormGroup.js +21 -15
- package/es/Form/components/FormItem.js +17 -10
- package/es/Form/components/FormTitle.js +23 -15
- package/es/Form/index.js +30 -26
- package/es/FormModal/index.js +34 -30
- package/es/Grid/index.js +6 -3
- package/es/Header/index.js +65 -49
- package/es/Highlighter/FullFeatured.js +51 -41
- package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
- package/es/Highlighter/index.js +29 -19
- package/es/Icon/icons/DiscordIcon.js +3 -2
- package/es/Icon/index.js +16 -13
- package/es/Image/ImageGallery.js +5 -3
- package/es/Image/Preview.js +5 -3
- package/es/Image/index.js +38 -34
- package/es/Image/usePreview.js +37 -33
- package/es/Img/index.js +2 -2
- package/es/Input/index.js +3 -3
- package/es/Layout/index.js +63 -35
- package/es/List/ListItem/index.js +67 -53
- package/es/Markdown/CodeBlock.js +16 -10
- package/es/Markdown/Typography.js +6 -3
- package/es/Markdown/index.js +22 -18
- package/es/MaterialFileTypeIcon/index.js +20 -17
- package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
- package/es/Mermaid/FullFeatured.js +45 -35
- package/es/Mermaid/index.js +26 -17
- package/es/Mermaid/useMermaid.d.ts +1 -2
- package/es/Mermaid/useMermaid.js +5 -3
- package/es/Modal/index.js +60 -48
- package/es/SearchBar/index.js +51 -47
- package/es/SelectWithImg/index.js +40 -34
- package/es/SideNav/index.js +22 -15
- package/es/SliderWithInput/index.js +38 -35
- package/es/Snippet/index.js +15 -10
- package/es/SortableList/DragHandle.js +3 -3
- package/es/SortableList/SortableItem.js +19 -16
- package/es/SortableList/SortableOverlay.js +5 -3
- package/es/SortableList/index.js +23 -15
- package/es/Swatches/index.js +20 -18
- package/es/TabsNav/index.js +3 -2
- package/es/Tag/index.js +12 -7
- package/es/ThemeProvider/Meta.js +58 -53
- package/es/ThemeProvider/index.js +23 -17
- package/es/ThemeSwitch/index.js +19 -15
- package/es/Toc/TocMobile.js +52 -47
- package/es/Toc/index.js +13 -8
- package/es/Tooltip/index.js +3 -2
- package/es/Video/index.js +47 -41
- package/es/awesome/AuroraBackground/index.js +18 -11
- package/es/awesome/Features/Item.js +45 -37
- package/es/awesome/Features/index.js +4 -5
- package/es/awesome/GaussianBackground/index.js +13 -8
- package/es/awesome/Giscus/index.js +15 -13
- package/es/awesome/GradientButton/index.js +9 -5
- package/es/awesome/GridBackground/Grid.js +61 -49
- package/es/awesome/GridBackground/GridShowcase.js +28 -24
- package/es/awesome/GridBackground/index.js +33 -27
- package/es/awesome/Hero/index.js +74 -63
- package/es/awesome/Spline/ParentSize.js +8 -7
- package/es/awesome/Spline/index.js +13 -10
- package/es/awesome/Spotlight/index.js +3 -2
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
- package/es/awesome/SpotlightCard/index.js +12 -9
- package/es/brand/BrandLoading/index.js +3 -2
- package/es/brand/LobeChat/index.js +38 -29
- package/es/brand/LobeChatText/index.js +13 -8
- package/es/brand/LobeHub/index.js +38 -29
- package/es/brand/LobeHubText/index.js +9 -4
- package/es/brand/Logo3d/index.js +3 -2
- package/es/brand/LogoFlat/index.js +49 -44
- package/es/brand/LogoMono/index.js +53 -48
- package/es/brand/LogoThree/Loading.js +11 -9
- package/es/brand/LogoThree/LogoSpline.js +12 -10
- package/es/brand/LogoThree/index.js +25 -23
- package/es/brand/components/Divider.js +6 -4
- package/es/chat/BackBottom/index.js +6 -4
- package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
- package/es/chat/ChatHeader/index.js +42 -35
- package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
- package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
- package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
- package/es/chat/ChatInputArea/SendButton.js +51 -36
- package/es/chat/ChatItem/components/Actions.js +5 -3
- package/es/chat/ChatItem/components/Avatar.js +21 -17
- package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
- package/es/chat/ChatItem/components/ErrorContent.js +11 -9
- package/es/chat/ChatItem/components/Loading.js +12 -10
- package/es/chat/ChatItem/components/MessageContent.js +10 -6
- package/es/chat/ChatItem/components/Title.js +8 -3
- package/es/chat/ChatItem/index.js +53 -47
- package/es/chat/ChatList/ActionsBar.js +3 -2
- package/es/chat/ChatList/HistoryDivider.js +11 -6
- package/es/chat/ChatList/Item.js +12 -14
- package/es/chat/ChatList/index.js +29 -25
- package/es/chat/EditableMessage/index.js +32 -26
- package/es/chat/EditableMessageList/index.js +76 -72
- package/es/chat/MessageInput/index.js +43 -35
- package/es/chat/MessageModal/index.js +51 -41
- package/es/chat/TokenTag/index.js +11 -7
- package/es/components/ControlInput.js +22 -18
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/mdx/Callout/index.js +19 -13
- package/es/mdx/Cards/Card.js +59 -46
- package/es/mdx/Cards/index.js +6 -3
- package/es/mdx/FileTree/File.js +11 -5
- package/es/mdx/FileTree/Folder.js +22 -13
- package/es/mdx/FileTree/index.js +6 -3
- package/es/mdx/Mdx/index.js +9 -7
- package/es/mdx/Steps/index.js +6 -3
- package/es/mdx/Tabs/Tab.js +8 -3
- package/es/mdx/Tabs/index.js +21 -17
- package/es/mdx/mdxComponents/CodeBlock.js +14 -9
- package/es/mdx/mdxComponents/Image.js +2 -2
- package/es/mdx/mdxComponents/Link.js +3 -2
- package/es/mdx/mdxComponents/Pre.js +14 -7
- package/es/mdx/mdxComponents/Video.js +2 -2
- package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
- package/es/mobile/MobileChatInputArea/index.js +79 -69
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
- package/es/mobile/MobileNavBar/index.js +48 -41
- package/es/mobile/MobileSafeArea/index.js +3 -2
- package/es/mobile/MobileTabBar/index.js +35 -29
- package/es/storybook/StoryBook/index.js +26 -19
- package/package.json +1 -90
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__*/
|
|
20
|
+
return /*#__PURE__*/_jsx(AContainer, _objectSpread({
|
|
21
21
|
ref: ref
|
|
22
22
|
}, props));
|
|
23
23
|
});
|
package/es/ActionIcon/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
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
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
6
|
var _excluded = ["color", "fill", "className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick", "children", "loading", "overlayStyle", "tooltipDelay", "fillOpacity", "fillRule", "focusable", "disable", "spin"];
|
|
8
7
|
import { Loader2 } from 'lucide-react';
|
|
@@ -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,
|
|
@@ -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__*/
|
|
63
|
+
var content = icon && /*#__PURE__*/_jsx(Icon, _objectSpread(_objectSpread({
|
|
63
64
|
className: styles.icon,
|
|
64
65
|
icon: icon
|
|
65
|
-
}, iconProps, {
|
|
66
|
+
}, iconProps), {}, {
|
|
66
67
|
spin: iconSpinning
|
|
67
68
|
}));
|
|
68
|
-
var spin = /*#__PURE__*/
|
|
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,7 +80,7 @@ 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__*/
|
|
83
|
+
var actionIconBlock = /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
83
84
|
align: 'center',
|
|
84
85
|
className: cx(styles.block, disable ? styles.disabled : styles.normal, className),
|
|
85
86
|
horizontal: true,
|
|
@@ -91,9 +92,11 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
91
92
|
height: blockSize,
|
|
92
93
|
width: blockSize
|
|
93
94
|
}, style)
|
|
94
|
-
}, rest),
|
|
95
|
+
}, rest), {}, {
|
|
96
|
+
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), loading ? spin : content, children]
|
|
97
|
+
}));
|
|
95
98
|
if (!title) return actionIconBlock;
|
|
96
|
-
return /*#__PURE__*/
|
|
99
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
97
100
|
arrow: arrow,
|
|
98
101
|
mouseEnterDelay: tooltipDelay,
|
|
99
102
|
onOpenChange: setTooltipOpen,
|
|
@@ -102,7 +105,8 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
102
105
|
pointerEvents: 'none'
|
|
103
106
|
}, overlayStyle),
|
|
104
107
|
placement: placement,
|
|
105
|
-
title: title
|
|
106
|
-
|
|
108
|
+
title: title,
|
|
109
|
+
children: actionIconBlock
|
|
110
|
+
});
|
|
107
111
|
});
|
|
108
112
|
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__*/
|
|
34
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
34
35
|
className: styles.container,
|
|
35
36
|
horizontal: direction === 'row'
|
|
36
|
-
}, rest),
|
|
37
|
-
|
|
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
|
-
|
|
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__*/
|
|
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__*/
|
|
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__*/
|
|
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__*/
|
|
88
|
+
if (extraIsolate) return /*#__PURE__*/_jsxs(Flexbox, {
|
|
88
89
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
|
|
89
|
-
gap: 8
|
|
90
|
-
|
|
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
|
-
|
|
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;
|
package/es/Avatar/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 _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__*/
|
|
50
|
+
return isDefaultAntAvatar ? /*#__PURE__*/_jsx(AntAvatar, _objectSpread({
|
|
51
51
|
ref: ref,
|
|
52
|
-
src: typeof avatar === 'string' ? /*#__PURE__*/
|
|
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__*/
|
|
59
|
+
}, avatarProps)) : /*#__PURE__*/_jsx(AntAvatar, _objectSpread(_objectSpread({
|
|
60
60
|
ref: ref
|
|
61
|
-
}, avatarProps),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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;
|
package/es/Burger/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
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__*/
|
|
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),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
})
|
|
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;
|
package/es/CodeEditor/index.js
CHANGED
|
@@ -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__*/
|
|
372
|
+
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
372
373
|
className: cx(styles.container, className),
|
|
373
374
|
style: style
|
|
374
|
-
}, rest),
|
|
375
|
-
|
|
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
|
-
|
|
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;
|
package/es/Collapse/index.js
CHANGED
|
@@ -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 _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -8,6 +7,7 @@ import { ChevronDown } from 'lucide-react';
|
|
|
8
7
|
import { memo } from 'react';
|
|
9
8
|
import Icon from "../Icon";
|
|
10
9
|
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__*/_jsx(AntdCollapse, _objectSpread({
|
|
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__*/_jsx(Icon, {
|
|
39
39
|
className: styles.icon,
|
|
40
40
|
icon: ChevronDown,
|
|
41
41
|
size: {
|