@lobehub/ui 1.157.1 → 1.158.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 +41 -45
|
@@ -12,8 +12,6 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
12
12
|
import ActionIcon from "../../ActionIcon";
|
|
13
13
|
import ChatInputAreaInner from "../../chat/ChatInputArea/ChatInputAreaInner";
|
|
14
14
|
import MobileSafeArea from "../MobileSafeArea";
|
|
15
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
15
|
var useStyles = createStyles(function (_ref) {
|
|
18
16
|
var css = _ref.css,
|
|
19
17
|
token = _ref.token;
|
|
@@ -60,91 +58,83 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
60
58
|
var InnerContainer = useCallback(function (_ref3) {
|
|
61
59
|
var children = _ref3.children,
|
|
62
60
|
r = _objectWithoutProperties(_ref3, _excluded);
|
|
63
|
-
return expand ? /*#__PURE__*/
|
|
61
|
+
return expand ? /*#__PURE__*/React.createElement(Flexbox, {
|
|
64
62
|
className: styles.inner,
|
|
63
|
+
gap: 8
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
65
65
|
gap: 8,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
justify: 'flex-end',
|
|
70
|
-
children: [r.textAreaLeftAddons, r.textAreaRightAddons]
|
|
71
|
-
}), children, r.topAddons, r.bottomAddons]
|
|
72
|
-
}) : /*#__PURE__*/_jsxs(Flexbox, {
|
|
66
|
+
horizontal: true,
|
|
67
|
+
justify: 'flex-end'
|
|
68
|
+
}, r.textAreaLeftAddons, r.textAreaRightAddons), children, r.topAddons, r.bottomAddons) : /*#__PURE__*/React.createElement(Flexbox, {
|
|
73
69
|
align: 'flex-end',
|
|
74
70
|
className: styles.inner,
|
|
75
71
|
gap: 8,
|
|
76
|
-
horizontal: true
|
|
77
|
-
|
|
78
|
-
});
|
|
72
|
+
horizontal: true
|
|
73
|
+
}, r.textAreaLeftAddons, children, r.textAreaRightAddons);
|
|
79
74
|
}, [expand, loading]);
|
|
80
75
|
var showAddons = !expand && !isFocused;
|
|
81
|
-
return /*#__PURE__*/
|
|
76
|
+
return /*#__PURE__*/React.createElement(Flexbox, {
|
|
82
77
|
className: cx(styles.container, expand && styles.expand, className),
|
|
83
78
|
gap: 12,
|
|
84
|
-
style: style
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
children: bottomAddons
|
|
145
|
-
}), safeArea && !isFocused && /*#__PURE__*/_jsx(MobileSafeArea, {
|
|
146
|
-
position: 'bottom'
|
|
147
|
-
})]
|
|
148
|
-
});
|
|
79
|
+
style: style
|
|
80
|
+
}, topAddons && /*#__PURE__*/React.createElement(Flexbox, {
|
|
81
|
+
style: showAddons ? {} : {
|
|
82
|
+
display: 'none'
|
|
83
|
+
}
|
|
84
|
+
}, topAddons), /*#__PURE__*/React.createElement(Flexbox, {
|
|
85
|
+
className: cx(expand && styles.expand),
|
|
86
|
+
ref: containerRef,
|
|
87
|
+
style: {
|
|
88
|
+
position: 'relative'
|
|
89
|
+
}
|
|
90
|
+
}, showFullscreen && /*#__PURE__*/React.createElement(ActionIcon, {
|
|
91
|
+
active: true,
|
|
92
|
+
className: styles.expandButton,
|
|
93
|
+
icon: expand ? ChevronDown : ChevronUp,
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
return setExpand === null || setExpand === void 0 ? void 0 : setExpand(!expand);
|
|
96
|
+
},
|
|
97
|
+
size: {
|
|
98
|
+
blockSize: 24,
|
|
99
|
+
borderRadius: '50%',
|
|
100
|
+
fontSize: 14
|
|
101
|
+
},
|
|
102
|
+
style: expand ? {
|
|
103
|
+
top: 6
|
|
104
|
+
} : {}
|
|
105
|
+
}), /*#__PURE__*/React.createElement(InnerContainer, {
|
|
106
|
+
bottomAddons: bottomAddons,
|
|
107
|
+
textAreaLeftAddons: textAreaLeftAddons,
|
|
108
|
+
textAreaRightAddons: textAreaRightAddons,
|
|
109
|
+
topAddons: topAddons
|
|
110
|
+
}, /*#__PURE__*/React.createElement(ChatInputAreaInner, {
|
|
111
|
+
autoSize: expand ? false : {
|
|
112
|
+
maxRows: 6,
|
|
113
|
+
minRows: 0
|
|
114
|
+
},
|
|
115
|
+
className: cx(expand && styles.expandTextArea),
|
|
116
|
+
loading: loading,
|
|
117
|
+
onBlur: function onBlur() {
|
|
118
|
+
return setIsFocused(false);
|
|
119
|
+
},
|
|
120
|
+
onFocus: function onFocus() {
|
|
121
|
+
return setIsFocused(true);
|
|
122
|
+
},
|
|
123
|
+
onInput: onInput,
|
|
124
|
+
onSend: onSend,
|
|
125
|
+
ref: ref,
|
|
126
|
+
style: {
|
|
127
|
+
height: 36,
|
|
128
|
+
paddingBlock: 6
|
|
129
|
+
},
|
|
130
|
+
type: expand ? 'pure' : 'block',
|
|
131
|
+
value: value
|
|
132
|
+
}))), bottomAddons && /*#__PURE__*/React.createElement(Flexbox, {
|
|
133
|
+
style: showAddons ? {} : {
|
|
134
|
+
display: 'none'
|
|
135
|
+
}
|
|
136
|
+
}, bottomAddons), safeArea && !isFocused && /*#__PURE__*/React.createElement(MobileSafeArea, {
|
|
137
|
+
position: 'bottom'
|
|
138
|
+
}));
|
|
149
139
|
});
|
|
150
140
|
export default MobileChatInputArea;
|
|
@@ -3,8 +3,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
6
|
var useStyles = createStyles(function (_ref) {
|
|
9
7
|
var css = _ref.css,
|
|
10
8
|
token = _ref.token;
|
|
@@ -22,47 +20,38 @@ var MobileNavBarTitle = /*#__PURE__*/memo(function (_ref2) {
|
|
|
22
20
|
tag = _ref2.tag;
|
|
23
21
|
var _useStyles = useStyles(),
|
|
24
22
|
styles = _useStyles.styles;
|
|
25
|
-
if (desc) return /*#__PURE__*/
|
|
23
|
+
if (desc) return /*#__PURE__*/React.createElement(Flexbox, {
|
|
26
24
|
align: 'center',
|
|
27
25
|
flex: 1,
|
|
28
26
|
gap: 4,
|
|
29
|
-
justify: 'center'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
className: styles.desc,
|
|
48
|
-
children: desc
|
|
49
|
-
})
|
|
50
|
-
})]
|
|
51
|
-
});
|
|
52
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
27
|
+
justify: 'center'
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
29
|
+
align: 'center',
|
|
30
|
+
className: styles.titleContainer,
|
|
31
|
+
gap: 4,
|
|
32
|
+
horizontal: true
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: styles.titleWithDesc
|
|
35
|
+
}, title), tag && /*#__PURE__*/React.createElement(Flexbox, {
|
|
36
|
+
className: styles.tag,
|
|
37
|
+
horizontal: true
|
|
38
|
+
}, tag)), /*#__PURE__*/React.createElement(Flexbox, {
|
|
39
|
+
align: 'center',
|
|
40
|
+
horizontal: true
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: styles.desc
|
|
43
|
+
}, desc)));
|
|
44
|
+
return /*#__PURE__*/React.createElement(Flexbox, {
|
|
53
45
|
align: 'center',
|
|
54
46
|
flex: 1,
|
|
55
47
|
gap: 4,
|
|
56
48
|
horizontal: true,
|
|
57
|
-
justify: 'center'
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
children: tag
|
|
65
|
-
})]
|
|
66
|
-
});
|
|
49
|
+
justify: 'center'
|
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: styles.title
|
|
52
|
+
}, title), /*#__PURE__*/React.createElement(Flexbox, {
|
|
53
|
+
className: styles.tag,
|
|
54
|
+
horizontal: true
|
|
55
|
+
}, tag));
|
|
67
56
|
});
|
|
68
57
|
export default MobileNavBarTitle;
|
|
@@ -6,8 +6,6 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
6
6
|
import ActionIcon from "../../ActionIcon";
|
|
7
7
|
import MobileSafeArea from "../MobileSafeArea";
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
9
|
var MobileNavBar = /*#__PURE__*/memo(function (_ref) {
|
|
12
10
|
var className = _ref.className,
|
|
13
11
|
_ref$safeArea = _ref.safeArea,
|
|
@@ -24,52 +22,47 @@ var MobileNavBar = /*#__PURE__*/memo(function (_ref) {
|
|
|
24
22
|
var _useStyles = useStyles(),
|
|
25
23
|
styles = _useStyles.styles,
|
|
26
24
|
cx = _useStyles.cx;
|
|
27
|
-
return /*#__PURE__*/
|
|
25
|
+
return /*#__PURE__*/React.createElement(Flexbox, {
|
|
28
26
|
className: cx(styles.container, className),
|
|
29
|
-
style: style
|
|
30
|
-
|
|
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
|
-
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right,
|
|
70
|
-
children: right
|
|
71
|
-
})]
|
|
72
|
-
})]
|
|
73
|
-
});
|
|
27
|
+
style: style
|
|
28
|
+
}, safeArea && /*#__PURE__*/React.createElement(MobileSafeArea, {
|
|
29
|
+
position: 'top'
|
|
30
|
+
}), /*#__PURE__*/React.createElement(Flexbox, {
|
|
31
|
+
align: 'center',
|
|
32
|
+
className: styles.inner,
|
|
33
|
+
flex: 1,
|
|
34
|
+
horizontal: true,
|
|
35
|
+
justify: 'space-between'
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
37
|
+
align: 'center',
|
|
38
|
+
className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
|
|
39
|
+
flex: 1,
|
|
40
|
+
gap: gap === null || gap === void 0 ? void 0 : gap.left,
|
|
41
|
+
horizontal: true,
|
|
42
|
+
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left
|
|
43
|
+
}, showBackButton && /*#__PURE__*/React.createElement(ActionIcon, {
|
|
44
|
+
icon: ChevronLeft,
|
|
45
|
+
onClick: function onClick() {
|
|
46
|
+
return onBackClick === null || onBackClick === void 0 ? void 0 : onBackClick();
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
fontSize: 24
|
|
50
|
+
}
|
|
51
|
+
}), left), /*#__PURE__*/React.createElement(Flexbox, {
|
|
52
|
+
align: 'center',
|
|
53
|
+
className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
|
|
54
|
+
flex: 1,
|
|
55
|
+
gap: gap === null || gap === void 0 ? void 0 : gap.center,
|
|
56
|
+
horizontal: true,
|
|
57
|
+
justify: 'center',
|
|
58
|
+
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center
|
|
59
|
+
}, center), /*#__PURE__*/React.createElement(Flexbox, {
|
|
60
|
+
align: 'center',
|
|
61
|
+
className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
|
|
62
|
+
flex: 1,
|
|
63
|
+
gap: gap === null || gap === void 0 ? void 0 : gap.right,
|
|
64
|
+
horizontal: true,
|
|
65
|
+
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right
|
|
66
|
+
}, right)));
|
|
74
67
|
});
|
|
75
68
|
export default MobileNavBar;
|
|
@@ -1,11 +1,10 @@
|
|
|
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 = ["position", "className"];
|
|
6
6
|
import React, { memo } from 'react';
|
|
7
7
|
import { useStyles } from "./style";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
var MobileSafeArea = /*#__PURE__*/memo(function (_ref) {
|
|
10
9
|
var position = _ref.position,
|
|
11
10
|
className = _ref.className,
|
|
@@ -13,7 +12,7 @@ var MobileSafeArea = /*#__PURE__*/memo(function (_ref) {
|
|
|
13
12
|
var _useStyles = useStyles(),
|
|
14
13
|
styles = _useStyles.styles,
|
|
15
14
|
cx = _useStyles.cx;
|
|
16
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
17
16
|
className: cx(styles.container, styles[position], className)
|
|
18
17
|
}, rest));
|
|
19
18
|
});
|
|
@@ -6,8 +6,6 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
6
6
|
import useControlledState from 'use-merge-value';
|
|
7
7
|
import MobileSafeArea from "../MobileSafeArea";
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
9
|
var MobileTabBar = /*#__PURE__*/memo(function (_ref) {
|
|
12
10
|
var className = _ref.className,
|
|
13
11
|
safeArea = _ref.safeArea,
|
|
@@ -27,40 +25,36 @@ var MobileTabBar = /*#__PURE__*/memo(function (_ref) {
|
|
|
27
25
|
var _useStyles = useStyles(),
|
|
28
26
|
styles = _useStyles.styles,
|
|
29
27
|
cx = _useStyles.cx;
|
|
30
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement(Flexbox, {
|
|
31
29
|
className: cx(styles.container, className),
|
|
32
|
-
style: style
|
|
33
|
-
|
|
30
|
+
style: style
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
32
|
+
align: 'center',
|
|
33
|
+
className: styles.inner,
|
|
34
|
+
horizontal: true,
|
|
35
|
+
justify: 'space-around'
|
|
36
|
+
}, items.map(function (item) {
|
|
37
|
+
var active = item.key === currentActive;
|
|
38
|
+
return /*#__PURE__*/React.createElement(Flexbox, {
|
|
34
39
|
align: 'center',
|
|
35
|
-
className: styles.
|
|
36
|
-
|
|
37
|
-
justify: '
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
children: typeof item.icon === 'function' ? item.icon(active) : item.icon
|
|
55
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
56
|
-
className: styles.title,
|
|
57
|
-
children: typeof item.title === 'function' ? item.title(active) : item.title
|
|
58
|
-
})]
|
|
59
|
-
}, item.key);
|
|
60
|
-
})
|
|
61
|
-
}), safeArea && /*#__PURE__*/_jsx(MobileSafeArea, {
|
|
62
|
-
position: 'bottom'
|
|
63
|
-
})]
|
|
64
|
-
});
|
|
40
|
+
className: cx(styles.tab, active && styles.active),
|
|
41
|
+
gap: 4,
|
|
42
|
+
justify: 'center',
|
|
43
|
+
key: item.key,
|
|
44
|
+
onClick: function onClick() {
|
|
45
|
+
var _item$onClick;
|
|
46
|
+
setCurrentActive(item.key);
|
|
47
|
+
item === null || item === void 0 || (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item);
|
|
48
|
+
}
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
50
|
+
align: 'center',
|
|
51
|
+
className: styles.icon,
|
|
52
|
+
justify: 'center'
|
|
53
|
+
}, typeof item.icon === 'function' ? item.icon(active) : item.icon), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: styles.title
|
|
55
|
+
}, typeof item.title === 'function' ? item.title(active) : item.title));
|
|
56
|
+
})), safeArea && /*#__PURE__*/React.createElement(MobileSafeArea, {
|
|
57
|
+
position: 'bottom'
|
|
58
|
+
}));
|
|
65
59
|
});
|
|
66
60
|
export default MobileTabBar;
|
|
@@ -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 = ["levaStore", "noPadding", "className", "children"];
|
|
6
6
|
import { useResponsive } from 'antd-style';
|
|
@@ -9,8 +9,6 @@ import { memo } from 'react';
|
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
10
|
import DraggablePanel from "../../DraggablePanel";
|
|
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
|
export var StoryBook = /*#__PURE__*/memo(function (_ref) {
|
|
15
13
|
var levaStore = _ref.levaStore,
|
|
16
14
|
noPadding = _ref.noPadding,
|
|
@@ -22,33 +20,28 @@ export var StoryBook = /*#__PURE__*/memo(function (_ref) {
|
|
|
22
20
|
var _useStyles = useStyles(Boolean(noPadding)),
|
|
23
21
|
styles = _useStyles.styles,
|
|
24
22
|
cx = _useStyles.cx;
|
|
25
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/React.createElement(Flexbox, _extends({
|
|
26
24
|
align: 'stretch',
|
|
27
25
|
className: cx(styles.editor, className),
|
|
28
26
|
horizontal: !mobile,
|
|
29
27
|
justify: 'stretch'
|
|
30
|
-
}, rest),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
titleBar: false
|
|
48
|
-
}), ' ']
|
|
49
|
-
})
|
|
50
|
-
})]
|
|
51
|
-
}));
|
|
28
|
+
}, rest), /*#__PURE__*/React.createElement(Flexbox, {
|
|
29
|
+
align: 'center',
|
|
30
|
+
className: styles.left,
|
|
31
|
+
flex: 1,
|
|
32
|
+
justify: 'center'
|
|
33
|
+
}, children), /*#__PURE__*/React.createElement(DraggablePanel, {
|
|
34
|
+
className: styles.right,
|
|
35
|
+
minWidth: 280,
|
|
36
|
+
placement: mobile ? 'bottom' : 'right'
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: styles.leva
|
|
39
|
+
}, /*#__PURE__*/React.createElement(LevaPanel, {
|
|
40
|
+
fill: true,
|
|
41
|
+
flat: true,
|
|
42
|
+
store: levaStore,
|
|
43
|
+
titleBar: false
|
|
44
|
+
}), ' ')));
|
|
52
45
|
});
|
|
53
46
|
export default StoryBook;
|
|
54
47
|
export { useControls, useCreateStore } from 'leva';
|