@lobehub/ui 3.3.1 → 3.3.3
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.d.ts +3 -3
- package/es/A/index.js +2 -2
- package/es/Accordion/AccordionItem.js +1 -1
- package/es/ActionIcon/ActionIcon.js +1 -1
- package/es/ActionIcon/type.d.ts +1 -1
- package/es/ActionIconGroup/ActionIconGroup.d.ts +2 -2
- package/es/ActionIconGroup/ActionIconGroup.js +4 -4
- package/es/ActionIconGroup/type.d.ts +1 -1
- package/es/Alert/Alert.js +1 -1
- package/es/Avatar/Avatar.js +3 -4
- package/es/Avatar/AvatarGroup/index.js +1 -1
- package/es/Avatar/type.d.ts +1 -1
- package/es/Block/Block.d.ts +2 -2
- package/es/Block/Block.js +4 -4
- package/es/Block/type.d.ts +1 -1
- package/es/Burger/Burger.js +1 -1
- package/es/Button/Button.d.ts +2 -2
- package/es/Button/Button.js +3 -3
- package/es/CodeEditor/CodeEditor.js +1 -1
- package/es/CodeEditor/type.d.ts +1 -1
- package/es/Collapse/Collapse.js +1 -1
- package/es/ColorSwatches/ColorSwatches.d.ts +2 -2
- package/es/ColorSwatches/ColorSwatches.js +4 -4
- package/es/ColorSwatches/type.d.ts +1 -1
- package/es/DraggablePanel/DraggablePanel.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelBody.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelContainer.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelFooter.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelHeader.js +1 -1
- package/es/DraggableSideNav/DraggableSideNav.js +1 -1
- package/es/Drawer/Drawer.js +1 -1
- package/es/EditableText/ControlInput.js +1 -1
- package/es/EditableText/EditableText.js +1 -1
- package/es/EditableText/type.d.ts +1 -1
- package/es/EmojiPicker/AvatarUploader.js +1 -1
- package/es/EmojiPicker/EmojiPicker.js +1 -1
- package/es/Empty/Empty.d.ts +2 -2
- package/es/Empty/Empty.js +3 -4
- package/es/Empty/type.d.ts +1 -1
- package/es/FileTypeIcon/FileTypeIcon.d.ts +2 -2
- package/es/FileTypeIcon/FileTypeIcon.js +4 -4
- package/es/FileTypeIcon/components/FileIcon.d.ts +2 -2
- package/es/FileTypeIcon/components/FileIcon.js +2 -3
- package/es/FileTypeIcon/components/FolderIcon.d.ts +2 -2
- package/es/FileTypeIcon/components/FolderIcon.js +2 -3
- package/es/Flex/style.css +29 -13
- package/es/FluentEmoji/FluentEmoji.d.ts +2 -2
- package/es/FluentEmoji/FluentEmoji.js +4 -4
- package/es/Footer/Footer.js +1 -1
- package/es/Footer/type.d.ts +1 -1
- package/es/Form/components/FormDivider.d.ts +2 -2
- package/es/Form/components/FormDivider.js +2 -3
- package/es/Form/components/FormFlatGroup.js +1 -1
- package/es/Form/components/FormFooter.d.ts +3 -2
- package/es/Form/components/FormFooter.js +3 -4
- package/es/Form/components/FormGroup.js +1 -1
- package/es/Form/components/FormSubmitFooter.js +1 -1
- package/es/Form/components/FormTitle.d.ts +2 -2
- package/es/Form/components/FormTitle.js +3 -4
- package/es/Form/type.d.ts +1 -1
- package/es/FormModal/FormModal.js +1 -1
- package/es/Grid/Grid.d.ts +2 -2
- package/es/Grid/Grid.js +3 -4
- package/es/Grid/type.d.ts +1 -1
- package/es/GroupAvatar/GroupAvatar.d.ts +2 -2
- package/es/GroupAvatar/GroupAvatar.js +5 -5
- package/es/GuideCard/GuideCard.js +1 -1
- package/es/GuideCard/type.d.ts +1 -1
- package/es/Header/Header.js +1 -1
- package/es/Header/type.d.ts +1 -1
- package/es/Highlighter/FullFeatured.js +37 -27
- package/es/Highlighter/Highlighter.js +5 -2
- package/es/Highlighter/LangSelect.js +9 -5
- package/es/Highlighter/style.d.ts +0 -1
- package/es/Highlighter/style.js +8 -9
- package/es/Highlighter/type.d.ts +1 -1
- package/es/Hotkey/Hotkey.js +1 -1
- package/es/Hotkey/type.d.ts +1 -1
- package/es/Hotkey/utils.d.ts +1 -1
- package/es/HotkeyInput/HotkeyInput.js +1 -1
- package/es/Image/Image.js +1 -1
- package/es/Image/components/Toolbar.js +1 -7
- package/es/Image/components/usePreview.js +1 -3
- package/es/Image/style.js +5 -4
- package/es/ImageSelect/ImageSelect.js +1 -1
- package/es/ImageSelect/type.d.ts +1 -1
- package/es/Img/index.d.ts +2 -2
- package/es/Img/index.js +2 -2
- package/es/List/List.js +1 -1
- package/es/List/ListItem/index.js +1 -1
- package/es/List/type.d.ts +1 -1
- package/es/Markdown/components/Footnotes.js +1 -1
- package/es/Markdown/components/SearchResultCards/SearchResultCard.js +1 -1
- package/es/Markdown/components/SearchResultCards/index.d.ts +1 -1
- package/es/MaskShadow/MaskShadow.js +1 -1
- package/es/MaskShadow/type.d.ts +1 -1
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.d.ts +2 -2
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.js +4 -4
- package/es/Mermaid/FullFeatured.js +21 -9
- package/es/Mermaid/Mermaid.js +5 -2
- package/es/Mermaid/SyntaxMermaid/index.js +0 -4
- package/es/ScrollShadow/ScrollShadow.d.ts +2 -2
- package/es/ScrollShadow/ScrollShadow.js +4 -4
- package/es/ScrollShadow/type.d.ts +1 -1
- package/es/SideNav/SideNav.js +1 -1
- package/es/SideNav/type.d.ts +1 -1
- package/es/Skeleton/Skeleton.d.ts +2 -2
- package/es/Skeleton/Skeleton.js +3 -4
- package/es/Skeleton/SkeletonAvatar.d.ts +2 -2
- package/es/Skeleton/SkeletonAvatar.js +2 -3
- package/es/Skeleton/SkeletonBlock.d.ts +2 -2
- package/es/Skeleton/SkeletonBlock.js +2 -3
- package/es/Skeleton/SkeletonButton.d.ts +2 -2
- package/es/Skeleton/SkeletonButton.js +2 -3
- package/es/Skeleton/SkeletonParagraph.d.ts +2 -2
- package/es/Skeleton/SkeletonParagraph.js +3 -4
- package/es/Skeleton/SkeletonTags.d.ts +2 -2
- package/es/Skeleton/SkeletonTags.js +3 -4
- package/es/Skeleton/SkeletonTitle.d.ts +2 -2
- package/es/Skeleton/SkeletonTitle.js +2 -3
- package/es/SliderWithInput/SliderWithInput.js +1 -1
- package/es/SliderWithInput/type.d.ts +1 -1
- package/es/Snippet/Snippet.d.ts +2 -2
- package/es/Snippet/Snippet.js +4 -4
- package/es/Snippet/type.d.ts +1 -1
- package/es/SortableList/SortableList.js +1 -1
- package/es/SortableList/components/SortableItem.d.ts +1 -1
- package/es/SortableList/components/SortableItem.js +1 -1
- package/es/SortableList/type.d.ts +1 -1
- package/es/Tabs/Tabs.d.ts +2 -2
- package/es/Tabs/Tabs.js +3 -3
- package/es/Tag/Tag.d.ts +2 -2
- package/es/Tag/Tag.js +3 -3
- package/es/Text/Text.d.ts +2 -2
- package/es/Text/Text.js +3 -3
- package/es/ThemeProvider/Meta.d.ts +2 -2
- package/es/ThemeProvider/Meta.js +3 -3
- package/es/ThemeSwitch/ThemeSwitch.d.ts +2 -2
- package/es/ThemeSwitch/ThemeSwitch.js +4 -4
- package/es/Tooltip/TooltipFloating.js +1 -1
- package/es/Video/index.d.ts +1 -1
- package/es/Video/index.js +1 -1
- package/es/awesome/AuroraBackground/AuroraBackground.js +1 -1
- package/es/awesome/AuroraBackground/type.d.ts +1 -1
- package/es/awesome/Features/FeatureItem.js +1 -1
- package/es/awesome/GridBackground/GridShowcase.js +1 -1
- package/es/awesome/GridBackground/type.d.ts +1 -1
- package/es/awesome/Hero/Hero.js +1 -1
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +1 -1
- package/es/brand/LobeChat/index.js +1 -1
- package/es/brand/LobeHub/index.js +1 -1
- package/es/brand/Logo3d/index.d.ts +2 -2
- package/es/brand/Logo3d/index.js +2 -3
- package/es/brand/LogoThree/Loading.d.ts +3 -3
- package/es/brand/LogoThree/Loading.js +3 -4
- package/es/brand/LogoThree/index.js +1 -1
- package/es/brand/components/Divider.d.ts +3 -3
- package/es/brand/components/Divider.js +3 -4
- package/es/chat/Bubble/Bubble.js +1 -1
- package/es/chat/Bubble/type.d.ts +1 -1
- package/es/chat/ChatHeader/ChatHeader.js +1 -1
- package/es/chat/ChatHeader/ChatHeaderTitle.d.ts +2 -2
- package/es/chat/ChatHeader/ChatHeaderTitle.js +3 -4
- package/es/chat/ChatHeader/type.d.ts +1 -1
- package/es/chat/ChatInputArea/components/ChatInputActionBar.d.ts +2 -2
- package/es/chat/ChatInputArea/components/ChatInputActionBar.js +3 -4
- package/es/chat/ChatInputArea/components/ChatSendButton.d.ts +2 -2
- package/es/chat/ChatInputArea/components/ChatSendButton.js +3 -4
- package/es/chat/ChatInputArea/type.d.ts +1 -1
- package/es/chat/ChatItem/ChatItem.js +1 -1
- package/es/chat/ChatItem/components/Actions.d.ts +2 -2
- package/es/chat/ChatItem/components/Actions.js +3 -4
- package/es/chat/ChatItem/components/Avatar.d.ts +2 -2
- package/es/chat/ChatItem/components/Avatar.js +3 -4
- package/es/chat/ChatItem/components/BorderSpacing.d.ts +2 -2
- package/es/chat/ChatItem/components/BorderSpacing.js +2 -3
- package/es/chat/ChatItem/components/ErrorContent.d.ts +2 -2
- package/es/chat/ChatItem/components/ErrorContent.js +3 -4
- package/es/chat/ChatItem/components/Loading.d.ts +2 -2
- package/es/chat/ChatItem/components/Loading.js +3 -4
- package/es/chat/ChatItem/components/MessageContent.js +1 -1
- package/es/chat/ChatItem/components/Title.d.ts +2 -2
- package/es/chat/ChatItem/components/Title.js +3 -4
- package/es/chat/ChatItem/type.d.ts +1 -1
- package/es/chat/ChatList/components/ChatActionsBar.d.ts +2 -2
- package/es/chat/ChatList/components/ChatActionsBar.js +2 -3
- package/es/chat/ChatList/components/HistoryDivider.d.ts +2 -2
- package/es/chat/ChatList/components/HistoryDivider.js +2 -3
- package/es/chat/EditableMessageList/EditableMessageList.js +1 -1
- package/es/chat/LoadingDots/LoadingDots.d.ts +2 -2
- package/es/chat/LoadingDots/LoadingDots.js +2 -3
- package/es/chat/MessageInput/MessageInput.js +1 -1
- package/es/chat/MessageInput/type.d.ts +1 -1
- package/es/chat/MessageModal/MessageModal.js +1 -1
- package/es/chat/TokenTag/TokenTag.d.ts +2 -2
- package/es/chat/TokenTag/TokenTag.js +3 -3
- package/es/color/ColorScales/ScaleRow.js +1 -1
- package/es/color/ColorScales/index.js +1 -1
- package/es/icons/Auth0/components/Avatar.d.ts +2 -2
- package/es/icons/Auth0/components/Avatar.js +2 -3
- package/es/icons/Authelia/components/Avatar.d.ts +2 -2
- package/es/icons/Authelia/components/Avatar.js +2 -3
- package/es/icons/Authentik/components/Avatar.d.ts +2 -2
- package/es/icons/Authentik/components/Avatar.js +2 -3
- package/es/icons/Casdoor/components/Avatar.d.ts +2 -2
- package/es/icons/Casdoor/components/Avatar.js +2 -3
- package/es/icons/Clerk/components/Avatar.d.ts +2 -2
- package/es/icons/Clerk/components/Avatar.js +2 -3
- package/es/icons/Logto/components/Avatar.d.ts +2 -2
- package/es/icons/Logto/components/Avatar.js +2 -3
- package/es/icons/MicrosoftEntra/components/Avatar.d.ts +2 -2
- package/es/icons/MicrosoftEntra/components/Avatar.js +2 -3
- package/es/icons/NextAuth/components/Avatar.d.ts +2 -2
- package/es/icons/NextAuth/components/Avatar.js +2 -3
- package/es/icons/Zitadel/components/Avatar.d.ts +2 -2
- package/es/icons/Zitadel/components/Avatar.js +2 -3
- package/es/mdx/Callout/index.d.ts +1 -1
- package/es/mdx/Callout/index.js +1 -1
- package/es/mdx/Cards/Card.js +1 -1
- package/es/mdx/FileTree/File.d.ts +1 -1
- package/es/mdx/FileTree/File.js +1 -1
- package/es/mdx/FileTree/Folder.d.ts +1 -1
- package/es/mdx/FileTree/Folder.js +1 -1
- package/es/mdx/Tabs/index.d.ts +1 -1
- package/es/mdx/Tabs/index.js +1 -1
- package/es/mdx/mdxComponents/Citation/PopoverPanel.js +1 -1
- package/es/mobile/ChatHeader/ChatHeader.js +1 -1
- package/es/mobile/ChatHeader/ChatHeaderTitle.js +1 -1
- package/es/mobile/ChatHeader/type.d.ts +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.js +1 -1
- package/es/mobile/SafeArea/SafeArea.d.ts +2 -2
- package/es/mobile/SafeArea/SafeArea.js +2 -3
- package/es/mobile/TabBar/TabBar.js +1 -1
- package/es/mobile/TabBar/type.d.ts +1 -1
- package/es/storybook/StoryBook/index.d.ts +1 -1
- package/es/storybook/StoryBook/index.js +1 -1
- package/package.json +1 -2
package/es/Flex/style.css
CHANGED
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
.lobe-flex {
|
|
2
|
+
/* Define defaults on the element itself to avoid CSS variable inheritance leaking to nested Flex */
|
|
3
|
+
--lobe-flex: 0 1 auto;
|
|
4
|
+
--lobe-flex-direction: column;
|
|
5
|
+
--lobe-flex-wrap: nowrap;
|
|
6
|
+
--lobe-flex-justify: flex-start;
|
|
7
|
+
--lobe-flex-align: stretch;
|
|
8
|
+
--lobe-flex-width: auto;
|
|
9
|
+
--lobe-flex-height: auto;
|
|
10
|
+
--lobe-flex-padding: 0;
|
|
11
|
+
/* Keep padding-inline/block aligned with padding by default, and prevent inheriting from parent */
|
|
12
|
+
--lobe-flex-padding-inline: var(--lobe-flex-padding);
|
|
13
|
+
--lobe-flex-padding-block: var(--lobe-flex-padding);
|
|
14
|
+
--lobe-flex-gap: 0;
|
|
15
|
+
|
|
2
16
|
display: flex;
|
|
3
|
-
|
|
4
|
-
flex
|
|
5
|
-
flex-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
|
|
18
|
+
flex: var(--lobe-flex);
|
|
19
|
+
flex-direction: var(--lobe-flex-direction);
|
|
20
|
+
flex-wrap: var(--lobe-flex-wrap);
|
|
21
|
+
justify-content: var(--lobe-flex-justify);
|
|
22
|
+
align-items: var(--lobe-flex-align);
|
|
23
|
+
|
|
24
|
+
width: var(--lobe-flex-width);
|
|
25
|
+
height: var(--lobe-flex-height);
|
|
26
|
+
|
|
27
|
+
padding: var(--lobe-flex-padding);
|
|
28
|
+
padding-inline: var(--lobe-flex-padding-inline);
|
|
29
|
+
padding-block: var(--lobe-flex-padding-block);
|
|
30
|
+
|
|
31
|
+
gap: var(--lobe-flex-gap);
|
|
14
32
|
}
|
|
15
33
|
|
|
16
34
|
.lobe-flex--hidden {
|
|
17
35
|
display: none;
|
|
18
36
|
}
|
|
19
|
-
|
|
20
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
import type { FluentEmojiProps } from './type';
|
|
3
|
-
declare const FluentEmoji:
|
|
3
|
+
declare const FluentEmoji: FC<FluentEmojiProps>;
|
|
4
4
|
export default FluentEmoji;
|
|
@@ -15,14 +15,14 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
import {
|
|
19
|
-
import { Center } from 'react-layout-kit';
|
|
18
|
+
import { useMemo, useState } from 'react';
|
|
20
19
|
import { useCdnFn } from "../ConfigProvider";
|
|
20
|
+
import { Center } from "../Flex";
|
|
21
21
|
import Img from "../Img";
|
|
22
22
|
import { useStyles } from "./style";
|
|
23
23
|
import { genEmojiUrl } from "./utils";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
var FluentEmoji =
|
|
25
|
+
var FluentEmoji = function FluentEmoji(_ref) {
|
|
26
26
|
var emoji = _ref.emoji,
|
|
27
27
|
className = _ref.className,
|
|
28
28
|
style = _ref.style,
|
|
@@ -73,6 +73,6 @@ var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
|
|
|
73
73
|
unoptimized: unoptimized,
|
|
74
74
|
width: size
|
|
75
75
|
}, rest));
|
|
76
|
-
}
|
|
76
|
+
};
|
|
77
77
|
FluentEmoji.displayName = 'FluentEmoji';
|
|
78
78
|
export default FluentEmoji;
|
package/es/Footer/Footer.js
CHANGED
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import RcFooter from 'rc-footer';
|
|
13
13
|
import { memo } from 'react';
|
|
14
|
-
import { Flexbox } from
|
|
14
|
+
import { Flexbox } from "../Flex";
|
|
15
15
|
import { useStyles } from "./style";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/es/Footer/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FooterProps as RcProps } from 'rc-footer';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import type { FlexboxProps } from
|
|
3
|
+
import type { FlexboxProps } from "../Flex";
|
|
4
4
|
export interface FooterProps extends FlexboxProps {
|
|
5
5
|
bottom?: ReactNode;
|
|
6
6
|
columns: RcProps['columns'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
import type { FormDividerProps } from '../type';
|
|
3
|
-
declare const FormDivider:
|
|
3
|
+
declare const FormDivider: FC<FormDividerProps>;
|
|
4
4
|
export default FormDivider;
|
|
@@ -13,7 +13,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
14
|
import { Divider as AntDivider } from 'antd';
|
|
15
15
|
import { createStyles } from 'antd-style';
|
|
16
|
-
import { memo } from 'react';
|
|
17
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
17
|
var useStyles = createStyles(function (_ref) {
|
|
19
18
|
var css = _ref.css;
|
|
@@ -21,7 +20,7 @@ var useStyles = createStyles(function (_ref) {
|
|
|
21
20
|
root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n opacity: 0.66;\n "])))
|
|
22
21
|
};
|
|
23
22
|
});
|
|
24
|
-
var FormDivider =
|
|
23
|
+
var FormDivider = function FormDivider(_ref2) {
|
|
25
24
|
var _ref2$visible = _ref2.visible,
|
|
26
25
|
visible = _ref2$visible === void 0 ? true : _ref2$visible,
|
|
27
26
|
style = _ref2.style,
|
|
@@ -36,6 +35,6 @@ var FormDivider = /*#__PURE__*/memo(function (_ref2) {
|
|
|
36
35
|
opacity: visible ? 1 : 0
|
|
37
36
|
}, style)
|
|
38
37
|
}, rest));
|
|
39
|
-
}
|
|
38
|
+
};
|
|
40
39
|
FormDivider.displayName = 'FormDivider';
|
|
41
40
|
export default FormDivider;
|
|
@@ -12,7 +12,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
12
12
|
import { useResponsive } from 'antd-style';
|
|
13
13
|
import { cva } from 'class-variance-authority';
|
|
14
14
|
import { memo, useMemo } from 'react';
|
|
15
|
-
import { Flexbox } from
|
|
15
|
+
import { Flexbox } from "../../Flex";
|
|
16
16
|
import { useFlatGroupStyles as useStyles } from "../style";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
var FormFlatGroup = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { FormFooterProps } from '../type';
|
|
3
|
+
declare const FormFooter: FC<FormFooterProps>;
|
|
3
4
|
export default FormFooter;
|
|
@@ -9,11 +9,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import {
|
|
13
|
-
import { Flexbox } from 'react-layout-kit';
|
|
12
|
+
import { Flexbox } from "../../Flex";
|
|
14
13
|
import { useFooterStyles as useStyles } from "../style";
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
var FormFooter =
|
|
15
|
+
var FormFooter = function FormFooter(_ref) {
|
|
17
16
|
var className = _ref.className,
|
|
18
17
|
children = _ref.children,
|
|
19
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -29,6 +28,6 @@ var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
29
28
|
}, rest), {}, {
|
|
30
29
|
children: children
|
|
31
30
|
}));
|
|
32
|
-
}
|
|
31
|
+
};
|
|
33
32
|
FormFooter.displayName = 'FormFooter';
|
|
34
33
|
export default FormFooter;
|
|
@@ -13,8 +13,8 @@ import { useResponsive } from 'antd-style';
|
|
|
13
13
|
import { cva } from 'class-variance-authority';
|
|
14
14
|
import { isUndefined } from 'lodash-es';
|
|
15
15
|
import { memo, useMemo } from 'react';
|
|
16
|
-
import { Flexbox } from 'react-layout-kit';
|
|
17
16
|
import Collapse from "../../Collapse";
|
|
17
|
+
import { Flexbox } from "../../Flex";
|
|
18
18
|
import Icon from "../../Icon";
|
|
19
19
|
import { useGroupStyles as useStyles } from "../style";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -20,8 +20,8 @@ import isEqual from 'fast-deep-equal';
|
|
|
20
20
|
import { InfoIcon } from 'lucide-react';
|
|
21
21
|
import { motion } from 'motion/react';
|
|
22
22
|
import { memo, useEffect, useMemo, useState } from 'react';
|
|
23
|
-
import { Flexbox } from 'react-layout-kit';
|
|
24
23
|
import Button from "../../Button";
|
|
24
|
+
import { Flexbox } from "../../Flex";
|
|
25
25
|
import Icon from "../../Icon";
|
|
26
26
|
import { useSubmitFooterStyles as useStyles } from "../style";
|
|
27
27
|
import { useFormContext } from "./FormProvider";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
import type { FormTitleProps } from '../type';
|
|
3
|
-
declare const FormTitle:
|
|
3
|
+
declare const FormTitle: FC<FormTitleProps>;
|
|
4
4
|
export default FormTitle;
|
|
@@ -9,13 +9,12 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import {
|
|
13
|
-
import { Flexbox } from 'react-layout-kit';
|
|
12
|
+
import { Flexbox } from "../../Flex";
|
|
14
13
|
import Tag from "../../Tag";
|
|
15
14
|
import { useTitleStyles as useStyles } from "../style";
|
|
16
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
var FormTitle =
|
|
17
|
+
var FormTitle = function FormTitle(_ref) {
|
|
19
18
|
var tag = _ref.tag,
|
|
20
19
|
title = _ref.title,
|
|
21
20
|
desc = _ref.desc,
|
|
@@ -53,6 +52,6 @@ var FormTitle = /*#__PURE__*/memo(function (_ref) {
|
|
|
53
52
|
})]
|
|
54
53
|
})]
|
|
55
54
|
}));
|
|
56
|
-
}
|
|
55
|
+
};
|
|
57
56
|
FormTitle.displayName = 'FormTitle';
|
|
58
57
|
export default FormTitle;
|
package/es/Form/type.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { FormProps as AntFormProps, DividerProps, FormInstance } from 'antd';
|
|
2
2
|
import { FormItemProps as AntdFormItemProps } from 'antd/es/form/FormItem';
|
|
3
3
|
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
4
|
-
import { FlexboxProps } from 'react-layout-kit';
|
|
5
4
|
import type { ButtonProps } from "../Button";
|
|
6
5
|
import type { CollapseProps } from "../Collapse";
|
|
6
|
+
import { FlexboxProps } from "../Flex";
|
|
7
7
|
import type { IconProps } from "../Icon";
|
|
8
8
|
import type { TagProps } from "../Tag";
|
|
9
9
|
import type { DivProps } from "../types";
|
|
@@ -13,8 +13,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
13
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
14
|
import { useResponsive } from 'antd-style';
|
|
15
15
|
import { memo } from 'react';
|
|
16
|
-
import { Flexbox } from 'react-layout-kit';
|
|
17
16
|
import Button from "../Button";
|
|
17
|
+
import { Flexbox } from "../Flex";
|
|
18
18
|
import Form from "../Form";
|
|
19
19
|
import Modal from "../Modal";
|
|
20
20
|
import { useStyles } from "./style";
|
package/es/Grid/Grid.d.ts
CHANGED
package/es/Grid/Grid.js
CHANGED
|
@@ -9,11 +9,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import {
|
|
13
|
-
import { Flexbox } from 'react-layout-kit';
|
|
12
|
+
import { Flexbox } from "../Flex";
|
|
14
13
|
import { useStyles } from "./style";
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
var Grid =
|
|
15
|
+
var Grid = function Grid(_ref) {
|
|
17
16
|
var className = _ref.className,
|
|
18
17
|
_ref$gap = _ref.gap,
|
|
19
18
|
gap = _ref$gap === void 0 ? '1em' : _ref$gap,
|
|
@@ -38,6 +37,6 @@ var Grid = /*#__PURE__*/memo(function (_ref) {
|
|
|
38
37
|
}, rest), {}, {
|
|
39
38
|
children: children
|
|
40
39
|
}));
|
|
41
|
-
}
|
|
40
|
+
};
|
|
42
41
|
Grid.displayName = 'Grid';
|
|
43
42
|
export default Grid;
|
package/es/Grid/type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
import type { GroupAvatarProps } from './type';
|
|
3
|
-
declare const GroupAvatar:
|
|
3
|
+
declare const GroupAvatar: FC<GroupAvatarProps>;
|
|
4
4
|
export default GroupAvatar;
|
|
@@ -10,13 +10,13 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
|
-
import {
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
14
|
import Avatar from "../Avatar";
|
|
15
15
|
import Block from "../Block";
|
|
16
16
|
import Grid from "../Grid";
|
|
17
17
|
import { useStyles } from "./style";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
var GroupAvatar =
|
|
19
|
+
var GroupAvatar = function GroupAvatar(_ref) {
|
|
20
20
|
var className = _ref.className,
|
|
21
21
|
style = _ref.style,
|
|
22
22
|
_ref$avatars = _ref.avatars,
|
|
@@ -26,9 +26,9 @@ var GroupAvatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
26
26
|
_ref$grid = _ref.grid,
|
|
27
27
|
grid = _ref$grid === void 0 ? 2 : _ref$grid,
|
|
28
28
|
_ref$cornerShape = _ref.cornerShape,
|
|
29
|
-
cornerShape = _ref$cornerShape === void 0 ? '
|
|
29
|
+
cornerShape = _ref$cornerShape === void 0 ? 'square' : _ref$cornerShape,
|
|
30
30
|
_ref$avatarShape = _ref.avatarShape,
|
|
31
|
-
avatarShape = _ref$avatarShape === void 0 ? '
|
|
31
|
+
avatarShape = _ref$avatarShape === void 0 ? 'square' : _ref$avatarShape,
|
|
32
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
33
|
var _useStyles = useStyles(),
|
|
34
34
|
cx = _useStyles.cx,
|
|
@@ -98,5 +98,5 @@ var GroupAvatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
98
98
|
})
|
|
99
99
|
})
|
|
100
100
|
}));
|
|
101
|
-
}
|
|
101
|
+
};
|
|
102
102
|
export default GroupAvatar;
|
|
@@ -18,8 +18,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { X } from 'lucide-react';
|
|
20
20
|
import { memo, useMemo, useState } from 'react';
|
|
21
|
-
import { Flexbox } from 'react-layout-kit';
|
|
22
21
|
import ActionIcon from "../ActionIcon";
|
|
22
|
+
import { Flexbox } from "../Flex";
|
|
23
23
|
import Img from "../Img";
|
|
24
24
|
import { useStyles } from "./style";
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/GuideCard/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ImageProps } from 'antd';
|
|
2
2
|
import type { CSSProperties, ReactNode, Ref } from 'react';
|
|
3
|
-
import type { FlexboxProps } from 'react-layout-kit';
|
|
4
3
|
import type { ActionIconProps } from "../ActionIcon";
|
|
4
|
+
import type { FlexboxProps } from "../Flex";
|
|
5
5
|
import type { ImgProps } from "../types";
|
|
6
6
|
export interface GuideCardProps extends Omit<FlexboxProps, 'title'> {
|
|
7
7
|
afterClose?: () => void;
|
package/es/Header/Header.js
CHANGED
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { useResponsive } from 'antd-style';
|
|
13
13
|
import { memo } from 'react';
|
|
14
|
-
import { Flexbox } from
|
|
14
|
+
import { Flexbox } from "../Flex";
|
|
15
15
|
import { useStyles } from "./style";
|
|
16
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/Header/type.d.ts
CHANGED
|
@@ -18,16 +18,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { ChevronDown, ChevronRight } from 'lucide-react';
|
|
20
20
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
21
|
-
import { Flexbox } from 'react-layout-kit';
|
|
22
21
|
import ActionIcon from "../ActionIcon";
|
|
23
22
|
import CopyButton from "../CopyButton";
|
|
23
|
+
import { Flexbox } from "../Flex";
|
|
24
24
|
import { getCodeLanguageDisplayName, getCodeLanguageFilename } from "./const";
|
|
25
25
|
import MaterialFileTypeIcon from "../MaterialFileTypeIcon";
|
|
26
26
|
import Text from "../Text";
|
|
27
27
|
import LangSelect from "./LangSelect";
|
|
28
28
|
import { useStyles } from "./style";
|
|
29
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
31
30
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
31
|
var HeaderLanguage = /*#__PURE__*/memo(function (_ref) {
|
|
33
32
|
var allowChangeLanguage = _ref.allowChangeLanguage,
|
|
@@ -39,29 +38,29 @@ var HeaderLanguage = /*#__PURE__*/memo(function (_ref) {
|
|
|
39
38
|
setLanguage = _ref.setLanguage,
|
|
40
39
|
showLanguage = _ref.showLanguage;
|
|
41
40
|
if (!showLanguage) return null;
|
|
42
|
-
return /*#__PURE__*/_jsx(
|
|
41
|
+
if (allowChangeLanguage && !fileName) return /*#__PURE__*/_jsx(LangSelect, {
|
|
42
|
+
onSelect: setLanguage,
|
|
43
|
+
value: language.toLowerCase()
|
|
44
|
+
});
|
|
45
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
43
46
|
align: 'center',
|
|
44
47
|
className: 'languageTitle',
|
|
45
48
|
flex: 1,
|
|
46
49
|
gap: 4,
|
|
47
50
|
horizontal: true,
|
|
48
|
-
justify: '
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fontSize: 13,
|
|
62
|
-
children: displayName
|
|
63
|
-
})]
|
|
64
|
-
})
|
|
51
|
+
justify: 'flex-start',
|
|
52
|
+
paddingInline: 8,
|
|
53
|
+
children: [icon || /*#__PURE__*/_jsx(MaterialFileTypeIcon, {
|
|
54
|
+
fallbackUnknownType: false,
|
|
55
|
+
filename: filetype,
|
|
56
|
+
size: 18,
|
|
57
|
+
type: 'file',
|
|
58
|
+
variant: 'raw'
|
|
59
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
60
|
+
ellipsis: true,
|
|
61
|
+
fontSize: 13,
|
|
62
|
+
children: displayName
|
|
63
|
+
})]
|
|
65
64
|
});
|
|
66
65
|
}, function (prev, next) {
|
|
67
66
|
return prev.allowChangeLanguage === next.allowChangeLanguage && prev.displayName === next.displayName && prev.fileName === next.fileName && prev.filetype === next.filetype && prev.icon === next.icon && prev.language === next.language && prev.setLanguage === next.setLanguage && prev.showLanguage === next.showLanguage;
|
|
@@ -203,12 +202,9 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref2) {
|
|
|
203
202
|
}), classNames === null || classNames === void 0 ? void 0 : classNames.header),
|
|
204
203
|
horizontal: true,
|
|
205
204
|
justify: 'space-between',
|
|
205
|
+
onClick: handleToggleExpand,
|
|
206
206
|
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.header,
|
|
207
|
-
children: [/*#__PURE__*/_jsx(
|
|
208
|
-
icon: expand ? ChevronDown : ChevronRight,
|
|
209
|
-
onClick: handleToggleExpand,
|
|
210
|
-
size: 'small'
|
|
211
|
-
}), /*#__PURE__*/_jsx(HeaderLanguage, {
|
|
207
|
+
children: [/*#__PURE__*/_jsx(HeaderLanguage, {
|
|
212
208
|
allowChangeLanguage: allowChangeLanguage,
|
|
213
209
|
displayName: displayName,
|
|
214
210
|
fileName: fileName,
|
|
@@ -217,12 +213,26 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref2) {
|
|
|
217
213
|
language: language,
|
|
218
214
|
setLanguage: setLanguage,
|
|
219
215
|
showLanguage: showLanguage
|
|
220
|
-
}), /*#__PURE__*/
|
|
216
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
221
217
|
align: 'center',
|
|
222
218
|
flex: 'none',
|
|
223
219
|
gap: 4,
|
|
224
220
|
horizontal: true,
|
|
225
|
-
|
|
221
|
+
onClick: function onClick(e) {
|
|
222
|
+
return e.stopPropagation();
|
|
223
|
+
},
|
|
224
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
225
|
+
align: 'center',
|
|
226
|
+
className: 'panel-actions',
|
|
227
|
+
flex: 'none',
|
|
228
|
+
gap: 4,
|
|
229
|
+
horizontal: true,
|
|
230
|
+
children: actions
|
|
231
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
232
|
+
icon: expand ? ChevronDown : ChevronRight,
|
|
233
|
+
onClick: handleToggleExpand,
|
|
234
|
+
size: 'small'
|
|
235
|
+
})]
|
|
226
236
|
})]
|
|
227
237
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
228
238
|
className: cx(bodyVariants({
|
|
@@ -17,8 +17,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
-
import { Flexbox } from 'react-layout-kit';
|
|
21
20
|
import CopyButton from "../CopyButton";
|
|
21
|
+
import { Flexbox } from "../Flex";
|
|
22
22
|
import { getCodeLanguageDisplayName } from "./const";
|
|
23
23
|
import Tag from "../Tag";
|
|
24
24
|
import FullFeatured from "./FullFeatured";
|
|
@@ -109,7 +109,10 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
109
109
|
return /*#__PURE__*/_jsx(CopyButton, {
|
|
110
110
|
content: getCopyContent,
|
|
111
111
|
glass: true,
|
|
112
|
-
size: actionIconSize
|
|
112
|
+
size: actionIconSize || {
|
|
113
|
+
blockSize: 28,
|
|
114
|
+
size: 16
|
|
115
|
+
}
|
|
113
116
|
});
|
|
114
117
|
}, [actionIconSize, copyable, getCopyContent]);
|
|
115
118
|
var actions = useMemo(function () {
|
|
@@ -15,17 +15,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
15
15
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
16
16
|
import { Select } from 'antd';
|
|
17
17
|
import { memo, useMemo } from 'react';
|
|
18
|
-
import { Flexbox } from 'react-layout-kit';
|
|
19
18
|
import { bundledLanguagesInfo } from 'shiki';
|
|
19
|
+
import { Flexbox } from "../Flex";
|
|
20
20
|
import MaterialFileTypeIcon from "../MaterialFileTypeIcon";
|
|
21
21
|
import Text from "../Text";
|
|
22
|
-
import { useStyles } from "./style";
|
|
23
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
export var LangSelect = /*#__PURE__*/memo(function (_ref) {
|
|
26
25
|
var rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
27
|
-
var _useStyles = useStyles(),
|
|
28
|
-
styles = _useStyles.styles;
|
|
29
26
|
var options = useMemo(function () {
|
|
30
27
|
return [{
|
|
31
28
|
aliases: ['text', 'txt'],
|
|
@@ -74,10 +71,17 @@ export var LangSelect = /*#__PURE__*/memo(function (_ref) {
|
|
|
74
71
|
})));
|
|
75
72
|
}, []);
|
|
76
73
|
return /*#__PURE__*/_jsx(Select, _objectSpread({
|
|
77
|
-
className:
|
|
74
|
+
className: 'languageTitle',
|
|
75
|
+
onClick: function onClick(e) {
|
|
76
|
+
return e.stopPropagation();
|
|
77
|
+
},
|
|
78
78
|
options: options,
|
|
79
79
|
showSearch: true,
|
|
80
80
|
size: 'small',
|
|
81
|
+
style: {
|
|
82
|
+
maxWidth: 240,
|
|
83
|
+
width: '100%'
|
|
84
|
+
},
|
|
81
85
|
suffixIcon: false,
|
|
82
86
|
variant: 'borderless'
|
|
83
87
|
}, rest));
|
|
@@ -13,7 +13,6 @@ export declare const useStyles: (props?: unknown) => import("antd-style").Return
|
|
|
13
13
|
nowrap: import("antd-style").SerializedStyles;
|
|
14
14
|
outlined: string;
|
|
15
15
|
root: string;
|
|
16
|
-
select: import("antd-style").SerializedStyles;
|
|
17
16
|
shadow: string;
|
|
18
17
|
wrap: import("antd-style").SerializedStyles;
|
|
19
18
|
}>;
|
package/es/Highlighter/style.js
CHANGED
|
@@ -17,16 +17,15 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
17
17
|
bodyExpand: cx(expandCls),
|
|
18
18
|
bodyRoot: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n transition: opacity 0.25s ", ";\n "])), token.motionEaseOut),
|
|
19
19
|
borderless: stylish.variantBorderlessWithoutHover,
|
|
20
|
-
filled: stylish.variantFilledWithoutHover,
|
|
21
|
-
headerBorderless: css(
|
|
22
|
-
headerFilled: css(
|
|
23
|
-
headerOutlined: css(
|
|
24
|
-
headerRoot: css(
|
|
25
|
-
lang: cx(langHoverCls, stylish.blur, css(
|
|
26
|
-
nowrap: css(
|
|
20
|
+
filled: cx(stylish.variantFilledWithoutHover, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: ", ";\n "])), token.colorFillQuaternary)),
|
|
21
|
+
headerBorderless: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-inline: 0;\n "]))),
|
|
22
|
+
headerFilled: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background: transparent;\n "]))),
|
|
23
|
+
headerOutlined: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n & + .", " {\n border-block-start: 1px solid ", ";\n }\n "])), expandCls, token.colorFillQuaternary),
|
|
24
|
+
headerRoot: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n padding: 4px;\n "]))),
|
|
25
|
+
lang: cx(langHoverCls, stylish.blur, css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 2;\n inset-block-end: 8px;\n inset-inline-end: 8px;\n\n font-family: ", ";\n color: ", ";\n\n opacity: 0;\n background: ", ";\n\n transition: opacity 0.1s;\n "])), token.fontFamilyCode, token.colorTextSecondary, token.colorFillQuaternary)),
|
|
26
|
+
nowrap: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n pre,\n code {\n text-wrap: nowrap;\n }\n "]))),
|
|
27
27
|
outlined: stylish.variantOutlinedWithoutHover,
|
|
28
|
-
root: cx(prefix, css(
|
|
29
|
-
select: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n user-select: none;\n\n position: absolute;\n inset-inline-start: 50%;\n transform: translateX(-50%);\n\n min-width: 100px;\n\n font-size: 14px;\n color: ", ";\n text-align: center;\n "])), token.colorTextDescription),
|
|
28
|
+
root: cx(prefix, css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n width: 100%;\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n\n .languageTitle {\n opacity: 0.5;\n filter: grayscale(100%);\n transition:\n opacity,\n grayscale 0.2s ", ";\n }\n\n .panel-actions {\n opacity: 0;\n transition: opacity 0.2s ", ";\n }\n\n &:hover {\n .languageTitle {\n opacity: 1;\n filter: grayscale(0%);\n }\n\n .panel-actions {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n pre {\n height: 100%;\n font-size: 12px;\n }\n\n code {\n background: transparent !important;\n }\n "])), token.borderRadius, token.motionEaseOut, token.motionEaseInOut, token.motionEaseInOut, actionsHoverCls, langHoverCls)),
|
|
30
29
|
shadow: stylish.shadow,
|
|
31
30
|
wrap: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n pre,\n code {\n text-wrap: wrap;\n }\n "])))
|
|
32
31
|
};
|
package/es/Highlighter/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode, type Ref } from 'react';
|
|
2
|
-
import { FlexboxProps } from 'react-layout-kit';
|
|
3
2
|
import type { BuiltinTheme } from 'shiki';
|
|
4
3
|
import type { ActionIconProps } from "../ActionIcon";
|
|
4
|
+
import { FlexboxProps } from "../Flex";
|
|
5
5
|
import { DivProps } from "../types";
|
|
6
6
|
export interface SyntaxHighlighterProps extends DivProps {
|
|
7
7
|
animated?: boolean;
|
package/es/Hotkey/Hotkey.js
CHANGED
|
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { ArrowBigUpIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightToLineIcon, ArrowUpIcon, ChevronUpIcon, Command, CornerDownLeftIcon, Delete, Grid2X2Icon, MouseIcon, Option, SpaceIcon } from 'lucide-react';
|
|
20
20
|
import { memo, useEffect, useMemo, useState } from 'react';
|
|
21
|
-
import { Center, Flexbox } from
|
|
21
|
+
import { Center, Flexbox } from "../Flex";
|
|
22
22
|
import Icon from "../Icon";
|
|
23
23
|
import LeftClickIcon from "../icons/lucideExtra/LeftClickIcon";
|
|
24
24
|
import LeftDoubleClickIcon from "../icons/lucideExtra/LeftDoubleClickIcon";
|
package/es/Hotkey/type.d.ts
CHANGED