@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/Footer/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import RcFooter from 'rc-footer';
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { useStyles } from "./style";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
var Footer = /*#__PURE__*/memo(function (_ref) {
|
|
7
8
|
var columns = _ref.columns,
|
|
8
9
|
bottom = _ref.bottom,
|
|
@@ -15,13 +16,14 @@ var Footer = /*#__PURE__*/memo(function (_ref) {
|
|
|
15
16
|
isEmpty: isEmpty
|
|
16
17
|
}),
|
|
17
18
|
styles = _useStyles.styles;
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
-
className: styles.container
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
return /*#__PURE__*/_jsx("section", {
|
|
20
|
+
className: styles.container,
|
|
21
|
+
children: /*#__PURE__*/_jsx(RcFooter, {
|
|
22
|
+
bottom: bottom,
|
|
23
|
+
className: styles.footer,
|
|
24
|
+
columns: columns,
|
|
25
|
+
theme: theme
|
|
26
|
+
})
|
|
27
|
+
});
|
|
26
28
|
});
|
|
27
29
|
export default Footer;
|
|
@@ -1,15 +1,15 @@
|
|
|
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 = ["style"];
|
|
7
6
|
import { Divider as AntDivider } from 'antd';
|
|
8
7
|
import { memo } from 'react';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
var Divider = /*#__PURE__*/memo(function (_ref) {
|
|
10
10
|
var style = _ref.style,
|
|
11
11
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/_jsx(AntDivider, _objectSpread({
|
|
13
13
|
style: _objectSpread({
|
|
14
14
|
margin: 0,
|
|
15
15
|
opacity: 0.66
|
|
@@ -1,12 +1,13 @@
|
|
|
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 = ["className", "children", "variant"];
|
|
6
6
|
import { useResponsive } from 'antd-style';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { Flexbox } from 'react-layout-kit';
|
|
9
9
|
import { useStyles } from "./FormGroup";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
var FormFlatGroup = /*#__PURE__*/memo(function (_ref) {
|
|
11
12
|
var className = _ref.className,
|
|
12
13
|
children = _ref.children,
|
|
@@ -21,10 +22,14 @@ var FormFlatGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
21
22
|
prefixCls = _useStyles.prefixCls;
|
|
22
23
|
var groupClassName = "".concat(prefixCls, "-form-group");
|
|
23
24
|
var variantStyle = cx(variant === 'default' && styles.defaultStyle, variant === 'block' && styles.blockStyle, variant === 'ghost' && styles.ghostStyle, variant === 'pure' && styles.pureStyle);
|
|
24
|
-
return mobile ? /*#__PURE__*/
|
|
25
|
+
return mobile ? /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
25
26
|
className: cx(groupClassName, styles.mobileFlatGroup, styles.mobileGroupBody, className)
|
|
26
|
-
}, rest),
|
|
27
|
+
}, rest), {}, {
|
|
28
|
+
children: children
|
|
29
|
+
})) : /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
27
30
|
className: cx(groupClassName, styles.flatGroup, variantStyle, className)
|
|
28
|
-
}, rest),
|
|
31
|
+
}, rest), {}, {
|
|
32
|
+
children: children
|
|
33
|
+
}));
|
|
29
34
|
});
|
|
30
35
|
export default FormFlatGroup;
|
|
@@ -1,17 +1,20 @@
|
|
|
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 = ["children"];
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
9
10
|
var children = _ref.children,
|
|
10
11
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
12
13
|
gap: 8,
|
|
13
14
|
horizontal: true,
|
|
14
15
|
justify: 'flex-end'
|
|
15
|
-
}, rest),
|
|
16
|
+
}, rest), {}, {
|
|
17
|
+
children: children
|
|
18
|
+
}));
|
|
16
19
|
});
|
|
17
20
|
export default FormFooter;
|
|
@@ -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
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
6
|
var _excluded = ["className", "icon", "title", "children", "extra", "variant", "defaultActive", "collapsible", "active", "keyValue", "onCollapse"];
|
|
@@ -11,6 +11,8 @@ import { memo } from 'react';
|
|
|
11
11
|
import { Flexbox } from 'react-layout-kit';
|
|
12
12
|
import Collapse from "../../Collapse";
|
|
13
13
|
import Icon from "../../Icon";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
export var useStyles = createStyles(function (_ref) {
|
|
15
17
|
var prefixCls = _ref.prefixCls,
|
|
16
18
|
css = _ref.css,
|
|
@@ -58,23 +60,27 @@ var FormGroup = /*#__PURE__*/memo(function (_ref2) {
|
|
|
58
60
|
var groupHeaderClassName = "".concat(prefixCls, "-form-group-header");
|
|
59
61
|
var groupContentClassName = "".concat(prefixCls, "-form-group-content");
|
|
60
62
|
var defaultCollapsible = isUndefined(collapsible) ? variant !== 'pure' : collapsible;
|
|
61
|
-
var titleContent = /*#__PURE__*/
|
|
63
|
+
var titleContent = /*#__PURE__*/_jsxs(Flexbox, {
|
|
62
64
|
className: cx(groupTitleClassName, styles.title, variant === 'pure' && styles.pureTitle),
|
|
63
65
|
gap: 8,
|
|
64
|
-
horizontal: true
|
|
65
|
-
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
66
|
-
icon: icon
|
|
67
|
-
}), title);
|
|
68
|
-
if (mobile) return /*#__PURE__*/React.createElement(Flexbox, {
|
|
69
|
-
className: cx(groupClassName, className)
|
|
70
|
-
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
71
|
-
className: cx(groupHeaderClassName, styles.mobileGroupHeader),
|
|
72
66
|
horizontal: true,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
return /*#__PURE__*/
|
|
67
|
+
children: [icon && /*#__PURE__*/_jsx(Icon, {
|
|
68
|
+
icon: icon
|
|
69
|
+
}), title]
|
|
70
|
+
});
|
|
71
|
+
if (mobile) return /*#__PURE__*/_jsxs(Flexbox, {
|
|
72
|
+
className: cx(groupClassName, className),
|
|
73
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
74
|
+
className: cx(groupHeaderClassName, styles.mobileGroupHeader),
|
|
75
|
+
horizontal: true,
|
|
76
|
+
justify: 'space-between',
|
|
77
|
+
children: [titleContent, extra]
|
|
78
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
79
|
+
className: cx(groupContentClassName, styles.mobileGroupBody),
|
|
80
|
+
children: children
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
return /*#__PURE__*/_jsx(Collapse, _objectSpread({
|
|
78
84
|
activeKey: isUndefined(active) ? undefined : active ? [keyValue] : [],
|
|
79
85
|
className: cx(groupClassName, variant === 'pure' && styles.pure, className),
|
|
80
86
|
collapsible: defaultCollapsible,
|
|
@@ -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
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
6
|
var _excluded = ["desc", "tag", "minWidth", "avatar", "className", "label", "children", "divider"];
|
|
@@ -11,6 +11,9 @@ import { isNumber } from 'lodash-es';
|
|
|
11
11
|
import { memo } from 'react';
|
|
12
12
|
import FormDivider from "./FormDivider";
|
|
13
13
|
import FormTitle from "./FormTitle";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
17
|
var Item = Form.Item;
|
|
15
18
|
export var useStyles = createStyles(function (_ref, itemMinWidth) {
|
|
16
19
|
var css = _ref.css,
|
|
@@ -35,14 +38,18 @@ var FormItem = /*#__PURE__*/memo(function (_ref2) {
|
|
|
35
38
|
var _useStyles = useStyles(minWidth),
|
|
36
39
|
cx = _useStyles.cx,
|
|
37
40
|
styles = _useStyles.styles;
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
42
|
+
children: [divider && /*#__PURE__*/_jsx(FormDivider, {}), /*#__PURE__*/_jsx(Item, _objectSpread(_objectSpread({
|
|
43
|
+
className: cx(styles.item, Boolean(minWidth) && styles.itemMinWidth, !divider && styles.itemNoDivider, className),
|
|
44
|
+
label: /*#__PURE__*/_jsx(FormTitle, {
|
|
45
|
+
avatar: avatar,
|
|
46
|
+
desc: desc,
|
|
47
|
+
tag: tag,
|
|
48
|
+
title: label
|
|
49
|
+
})
|
|
50
|
+
}, rest), {}, {
|
|
51
|
+
children: children
|
|
52
|
+
}))]
|
|
53
|
+
});
|
|
47
54
|
});
|
|
48
55
|
export default FormItem;
|
|
@@ -6,6 +6,8 @@ import { createStyles } from 'antd-style';
|
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
8
8
|
import Tag from "../../Tag";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
export var useStyles = createStyles(function (_ref) {
|
|
10
12
|
var css = _ref.css,
|
|
11
13
|
token = _ref.token,
|
|
@@ -23,24 +25,30 @@ var FormTitle = /*#__PURE__*/memo(function (_ref2) {
|
|
|
23
25
|
var _useStyles = useStyles(),
|
|
24
26
|
cx = _useStyles.cx,
|
|
25
27
|
styles = _useStyles.styles;
|
|
26
|
-
var titleNode = /*#__PURE__*/
|
|
27
|
-
className: cx(styles.formTitle, className)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
var titleNode = /*#__PURE__*/_jsxs(Flexbox, {
|
|
29
|
+
className: cx(styles.formTitle, className),
|
|
30
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
31
|
+
align: 'center',
|
|
32
|
+
direction: 'horizontal',
|
|
33
|
+
gap: 8,
|
|
34
|
+
children: [title, tag && /*#__PURE__*/_jsx(Tag, {
|
|
35
|
+
children: tag
|
|
36
|
+
})]
|
|
37
|
+
}), desc && /*#__PURE__*/_jsx("small", {
|
|
38
|
+
style: {
|
|
39
|
+
marginBottom: 2,
|
|
40
|
+
marginTop: 6
|
|
41
|
+
},
|
|
42
|
+
children: desc
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
38
45
|
if (avatar) {
|
|
39
|
-
return /*#__PURE__*/
|
|
46
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
40
47
|
align: "center",
|
|
41
48
|
gap: 8,
|
|
42
|
-
horizontal: true
|
|
43
|
-
|
|
49
|
+
horizontal: true,
|
|
50
|
+
children: [avatar, titleNode]
|
|
51
|
+
});
|
|
44
52
|
}
|
|
45
53
|
return titleNode;
|
|
46
54
|
});
|
package/es/Form/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 _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
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 = ["className", "itemMinWidth", "footer", "form", "items", "children", "itemsType", "variant", "gap", "style", "collapsible", "classNames", "styles", "defaultActiveKey", "activeKey", "onCollapse"];
|
|
8
7
|
import { Form as AntForm } from 'antd';
|
|
@@ -13,6 +12,8 @@ import FormFooter from "./components/FormFooter";
|
|
|
13
12
|
import FormGroup from "./components/FormGroup";
|
|
14
13
|
import FormItem from "./components/FormItem";
|
|
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 FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
17
18
|
var className = _ref.className,
|
|
18
19
|
itemMinWidth = _ref.itemMinWidth,
|
|
@@ -40,21 +41,19 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
40
41
|
cx = _useStyles.cx,
|
|
41
42
|
s = _useStyles.styles;
|
|
42
43
|
var mapFlat = function mapFlat(item, itemIndex) {
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/_jsx(FormItem, _objectSpread({
|
|
44
45
|
divider: itemIndex !== 0,
|
|
45
|
-
key: itemIndex,
|
|
46
46
|
minWidth: itemMinWidth
|
|
47
|
-
}, item));
|
|
47
|
+
}, item), itemIndex);
|
|
48
48
|
};
|
|
49
49
|
var mapTree = function mapTree(group, groupIndex) {
|
|
50
50
|
var key = (group === null || group === void 0 ? void 0 : group.key) || groupIndex;
|
|
51
|
-
return /*#__PURE__*/
|
|
51
|
+
return /*#__PURE__*/_jsx(FormGroup, {
|
|
52
52
|
active: activeKey && group !== null && group !== void 0 && group.key ? activeKey.includes(key) : undefined,
|
|
53
53
|
collapsible: isUndefined(group.collapsible) ? collapsible : group.collapsible,
|
|
54
54
|
defaultActive: defaultActiveKey && group !== null && group !== void 0 && group.key ? defaultActiveKey.includes(key) : group === null || group === void 0 ? void 0 : group.defaultActive,
|
|
55
55
|
extra: group === null || group === void 0 ? void 0 : group.extra,
|
|
56
56
|
icon: group === null || group === void 0 ? void 0 : group.icon,
|
|
57
|
-
key: key,
|
|
58
57
|
keyValue: key,
|
|
59
58
|
onCollapse: function onCollapse(active) {
|
|
60
59
|
var keys = activeKey || defaultActiveKey || [];
|
|
@@ -64,14 +63,15 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
64
63
|
_onCollapse === null || _onCollapse === void 0 || _onCollapse(active ? [].concat(_toConsumableArray(keys), [key]) : keys);
|
|
65
64
|
},
|
|
66
65
|
title: group.title,
|
|
67
|
-
variant: (group === null || group === void 0 ? void 0 : group.variant) || variant
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
variant: (group === null || group === void 0 ? void 0 : group.variant) || variant,
|
|
67
|
+
children: Array.isArray(group.children) ? group.children.filter(function (item) {
|
|
68
|
+
return !item.hidden;
|
|
69
|
+
}).map(function (item, i) {
|
|
70
|
+
return mapFlat(item, i);
|
|
71
|
+
}) : group.children
|
|
72
|
+
}, key);
|
|
73
73
|
};
|
|
74
|
-
return /*#__PURE__*/
|
|
74
|
+
return /*#__PURE__*/_jsxs(AntForm, _objectSpread(_objectSpread({
|
|
75
75
|
className: cx(s.form, variant === 'pure' && s.pure, s.mobile, className),
|
|
76
76
|
colon: false,
|
|
77
77
|
form: form,
|
|
@@ -80,18 +80,22 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
80
80
|
style: _objectSpread({
|
|
81
81
|
gap: gap
|
|
82
82
|
}, style)
|
|
83
|
-
}, rest),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
}, rest), {}, {
|
|
84
|
+
children: [items && (items === null || items === void 0 ? void 0 : items.length) > 0 ? itemsType === 'group' ? items === null || items === void 0 ? void 0 : items.map(function (item, i) {
|
|
85
|
+
return mapTree(item, i);
|
|
86
|
+
}) : /*#__PURE__*/_jsx(FormFlatGroup, {
|
|
87
|
+
variant: variant,
|
|
88
|
+
children: items === null || items === void 0 ? void 0 : items.filter(function (item) {
|
|
89
|
+
return !item.hidden;
|
|
90
|
+
}).map(function (item, i) {
|
|
91
|
+
return mapFlat(item, i);
|
|
92
|
+
})
|
|
93
|
+
}) : undefined, children, footer && /*#__PURE__*/_jsx(FormFooter, {
|
|
94
|
+
className: classNames === null || classNames === void 0 ? void 0 : classNames.footer,
|
|
95
|
+
style: styles === null || styles === void 0 ? void 0 : styles.footer,
|
|
96
|
+
children: footer
|
|
97
|
+
})]
|
|
98
|
+
}));
|
|
95
99
|
});
|
|
96
100
|
var Form = FormParent;
|
|
97
101
|
Form.Item = FormItem;
|
package/es/FormModal/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 _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["classNames", "className", "style", "closable", "styles", "allowFullscreen", "title", "wrapClassName", "afterOpenChange", "width", "onCancel", "centered", "open", "afterClose", "destroyOnClose", "closeIcon", "paddings", "maxHeight", "enableResponsive", "zIndex", "mask", "getContainer", "keyboard", "focusTriggerAfterClose", "forceRender", "loading", "footer", "submitButtonProps", "submitLoading", "onFinish", "submitText", "variant", "gap", "onSubmit", "children"],
|
|
@@ -10,6 +9,7 @@ import { forwardRef } from 'react';
|
|
|
10
9
|
import Form from "../Form";
|
|
11
10
|
import Modal from "../Modal";
|
|
12
11
|
import { useStyles } from "./style";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
var FormModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
14
|
var _ref$classNames = _ref.classNames,
|
|
15
15
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -61,7 +61,7 @@ var FormModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
61
61
|
var formStyle = styles.form,
|
|
62
62
|
footerStyle = styles.footer,
|
|
63
63
|
modalStyles = _objectWithoutProperties(styles, _excluded3);
|
|
64
|
-
return /*#__PURE__*/
|
|
64
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
65
65
|
afterClose: afterClose,
|
|
66
66
|
afterOpenChange: afterOpenChange,
|
|
67
67
|
allowFullscreen: allowFullscreen,
|
|
@@ -93,34 +93,38 @@ var FormModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
93
93
|
title: title,
|
|
94
94
|
width: width,
|
|
95
95
|
wrapClassName: wrapClassName,
|
|
96
|
-
zIndex: zIndex
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
96
|
+
zIndex: zIndex,
|
|
97
|
+
children: /*#__PURE__*/_jsx(Form, _objectSpread(_objectSpread({
|
|
98
|
+
className: cx(s.form, formClassName),
|
|
99
|
+
classNames: {
|
|
100
|
+
footer: cx(s.footer, footerClassName)
|
|
101
|
+
},
|
|
102
|
+
clearOnDestroy: destroyOnClose,
|
|
103
|
+
footer: footer || /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
104
|
+
block: true,
|
|
105
|
+
htmlType: "submit",
|
|
106
|
+
loading: submitLoading,
|
|
107
|
+
onClick: onSubmit,
|
|
108
|
+
type: 'primary'
|
|
109
|
+
}, submitButtonProps), {}, {
|
|
110
|
+
style: _objectSpread({
|
|
111
|
+
flex: 1
|
|
112
|
+
}, submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.style),
|
|
113
|
+
children: submitText || 'Submit'
|
|
114
|
+
})),
|
|
115
|
+
gap: gap || (variant === 'pure' ? 24 : gap),
|
|
116
|
+
onFinish: onFinish,
|
|
117
|
+
ref: ref,
|
|
110
118
|
style: _objectSpread({
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
footer: footerStyle
|
|
122
|
-
},
|
|
123
|
-
variant: variant
|
|
124
|
-
}, rest), children));
|
|
119
|
+
paddingBottom: 56
|
|
120
|
+
}, formStyle),
|
|
121
|
+
styles: {
|
|
122
|
+
footer: footerStyle
|
|
123
|
+
},
|
|
124
|
+
variant: variant
|
|
125
|
+
}, rest), {}, {
|
|
126
|
+
children: children
|
|
127
|
+
}))
|
|
128
|
+
});
|
|
125
129
|
});
|
|
126
130
|
export default FormModal;
|
package/es/Grid/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
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
6
|
var _excluded = ["className", "gap", "rows", "children", "maxItemWidth"];
|
|
@@ -9,6 +9,7 @@ import { createStyles } from 'antd-style';
|
|
|
9
9
|
import { isString } from 'lodash-es';
|
|
10
10
|
import { forwardRef } from 'react';
|
|
11
11
|
import { Flexbox } from 'react-layout-kit';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
13
14
|
var css = _ref.css;
|
|
14
15
|
var rows = _ref2.rows,
|
|
@@ -35,10 +36,12 @@ var Grid = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
35
36
|
}),
|
|
36
37
|
cx = _useStyles.cx,
|
|
37
38
|
styles = _useStyles.styles;
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
39
40
|
className: cx(styles.container, className),
|
|
40
41
|
gap: gap,
|
|
41
42
|
ref: ref
|
|
42
|
-
}, rest),
|
|
43
|
+
}, rest), {}, {
|
|
44
|
+
children: children
|
|
45
|
+
}));
|
|
43
46
|
});
|
|
44
47
|
export default Grid;
|
package/es/Header/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 = ["actionsClassName", "navClassName", "logoClassName", "nav", "logo", "actions", "actionsStyle", "logoStyle", "navStyle", "className"];
|
|
@@ -8,6 +7,9 @@ import { useResponsive } from 'antd-style';
|
|
|
8
7
|
import { memo } from 'react';
|
|
9
8
|
import { Flexbox } from 'react-layout-kit';
|
|
10
9
|
import { useStyles } from "./style";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
13
|
var Header = /*#__PURE__*/memo(function (_ref) {
|
|
12
14
|
var actionsClassName = _ref.actionsClassName,
|
|
13
15
|
navClassName = _ref.navClassName,
|
|
@@ -25,54 +27,68 @@ var Header = /*#__PURE__*/memo(function (_ref) {
|
|
|
25
27
|
var _useStyles = useStyles(),
|
|
26
28
|
cx = _useStyles.cx,
|
|
27
29
|
styles = _useStyles.styles;
|
|
28
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/_jsx("section", _objectSpread(_objectSpread({
|
|
29
31
|
className: cx(styles.header, className)
|
|
30
|
-
}, rest),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
32
|
+
}, rest), {}, {
|
|
33
|
+
children: /*#__PURE__*/_jsx(Flexbox, {
|
|
34
|
+
align: 'center',
|
|
35
|
+
className: styles.content,
|
|
36
|
+
distribution: 'space-between',
|
|
37
|
+
horizontal: true,
|
|
38
|
+
width: 'auto',
|
|
39
|
+
children: mobile ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
40
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
41
|
+
className: actionsClassName,
|
|
42
|
+
style: _objectSpread({
|
|
43
|
+
flex: 0
|
|
44
|
+
}, navStyle),
|
|
45
|
+
children: nav
|
|
46
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
47
|
+
className: cx(styles.left, logoClassName),
|
|
48
|
+
horizontal: true,
|
|
49
|
+
style: _objectSpread({
|
|
50
|
+
flex: 1,
|
|
51
|
+
overflow: 'hidden'
|
|
52
|
+
}, logoStyle),
|
|
53
|
+
children: logo
|
|
54
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
55
|
+
className: actionsClassName,
|
|
56
|
+
style: _objectSpread({
|
|
57
|
+
flex: 0
|
|
58
|
+
}, actionsStyle),
|
|
59
|
+
children: actions
|
|
60
|
+
})]
|
|
61
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
62
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
63
|
+
className: cx(styles.left, logoClassName),
|
|
64
|
+
horizontal: true,
|
|
65
|
+
style: _objectSpread({
|
|
66
|
+
flex: 0
|
|
67
|
+
}, logoStyle),
|
|
68
|
+
children: logo
|
|
69
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
70
|
+
className: navClassName,
|
|
71
|
+
style: _objectSpread({
|
|
72
|
+
flex: 1,
|
|
73
|
+
marginLeft: 48,
|
|
74
|
+
overflow: 'hidden'
|
|
75
|
+
}, navStyle),
|
|
76
|
+
children: nav
|
|
77
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
78
|
+
className: cx(styles.right, actionsClassName),
|
|
79
|
+
flex: 1,
|
|
80
|
+
horizontal: true,
|
|
81
|
+
justify: 'space-between',
|
|
82
|
+
style: actionsStyle,
|
|
83
|
+
children: [/*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsx(Flexbox, {
|
|
84
|
+
align: 'center',
|
|
85
|
+
gap: 8,
|
|
86
|
+
horizontal: true,
|
|
87
|
+
children: actions
|
|
88
|
+
})]
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}));
|
|
77
93
|
});
|
|
78
94
|
export default Header;
|