@lobehub/ui 1.1.0 → 1.2.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/README.md +6 -3
- package/es/ActionIcon/index.d.ts +19 -6
- package/es/ActionIcon/index.js +18 -47
- package/es/ActionIcon/style.d.ts +3 -0
- package/es/ActionIcon/style.js +10 -0
- package/es/DraggablePanel/index.d.ts +60 -0
- package/es/DraggablePanel/style.js +1 -1
- package/es/Icon/index.d.ts +21 -0
- package/es/Icon/index.js +36 -0
- package/es/Logo/Divider.d.ts +3 -0
- package/es/Logo/Divider.js +20 -0
- package/es/Logo/Logo3D.d.ts +1 -2
- package/es/Logo/LogoFlat.d.ts +1 -2
- package/es/Logo/LogoFlat.js +0 -1
- package/es/Logo/LogoHighContrast.d.ts +1 -2
- package/es/Logo/LogoHighContrast.js +0 -1
- package/es/Logo/LogoText.d.ts +1 -2
- package/es/Logo/index.d.ts +13 -1
- package/es/Logo/index.js +49 -5
- package/es/Logo/style.d.ts +4 -0
- package/es/Logo/style.js +10 -0
- package/es/SideNav/index.d.ts +9 -0
- package/es/StroyBook/index.d.ts +18 -0
- package/es/StroyBook/index.js +40 -0
- package/es/StroyBook/style.d.ts +5 -0
- package/es/StroyBook/style.js +12 -0
- package/es/TabsNav/index.d.ts +22 -0
- package/es/{Template → TabsNav}/index.js +12 -7
- package/es/TabsNav/style.d.ts +3 -0
- package/es/TabsNav/style.js +14 -0
- package/es/ThemeProvider/GlobalStyle.js +1 -1
- package/es/ThemeProvider/index.js +4 -0
- package/es/ThemeSwitch/index.d.ts +27 -0
- package/es/ThemeSwitch/index.js +64 -0
- package/es/index.d.ts +6 -3
- package/es/index.js +5 -2
- package/lib/ActionIcon/index.d.ts +19 -6
- package/lib/ActionIcon/index.js +7 -38
- package/lib/ActionIcon/style.d.ts +3 -0
- package/lib/ActionIcon/style.js +57 -0
- package/lib/DraggablePanel/index.d.ts +60 -0
- package/lib/DraggablePanel/style.js +1 -1
- package/lib/Icon/index.d.ts +21 -0
- package/lib/Icon/index.js +59 -0
- package/lib/Logo/Divider.d.ts +3 -0
- package/lib/Logo/Divider.js +51 -0
- package/lib/Logo/Logo3D.d.ts +1 -2
- package/lib/Logo/LogoFlat.d.ts +1 -2
- package/lib/Logo/LogoFlat.js +1 -1
- package/lib/Logo/LogoHighContrast.d.ts +1 -2
- package/lib/Logo/LogoHighContrast.js +6 -19
- package/lib/Logo/LogoText.d.ts +1 -2
- package/lib/Logo/index.d.ts +13 -1
- package/lib/Logo/index.js +18 -1
- package/lib/Logo/style.d.ts +4 -0
- package/lib/Logo/style.js +41 -0
- package/lib/SideNav/index.d.ts +9 -0
- package/lib/StroyBook/index.d.ts +18 -0
- package/lib/StroyBook/index.js +58 -0
- package/lib/StroyBook/style.d.ts +5 -0
- package/lib/StroyBook/style.js +75 -0
- package/lib/TabsNav/index.d.ts +22 -0
- package/lib/{Template → TabsNav}/index.js +11 -8
- package/lib/TabsNav/style.d.ts +3 -0
- package/lib/TabsNav/style.js +65 -0
- package/lib/ThemeProvider/GlobalStyle.js +7 -3
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/ThemeSwitch/index.d.ts +27 -0
- package/lib/ThemeSwitch/index.js +67 -0
- package/lib/index.d.ts +6 -3
- package/lib/index.js +18 -5
- package/package.json +7 -6
- package/es/Template/index.d.ts +0 -7
- package/lib/Template/index.d.ts +0 -7
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TabsProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface TabsNavProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description Additional className to apply to the component
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @description Callback function that is triggered when a tab is changed
|
|
10
|
+
*/
|
|
11
|
+
onChange?: (activeKey: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* @description An array of objects representing the tabs to be rendered
|
|
14
|
+
*/
|
|
15
|
+
items?: TabsProps['items'];
|
|
16
|
+
/**
|
|
17
|
+
* @description The key of the active tab
|
|
18
|
+
*/
|
|
19
|
+
activeKey?: TabsProps['activeKey'];
|
|
20
|
+
}
|
|
21
|
+
declare const _default: React.NamedExoticComponent<TabsNavProps>;
|
|
22
|
+
export default _default;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["className"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
import { Tabs } from 'antd';
|
|
6
7
|
import React from 'react';
|
|
8
|
+
import { useStyles } from "./style";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
+
var TabsNav = function TabsNav(_ref) {
|
|
11
|
+
var className = _ref.className,
|
|
10
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
var _useStyles = useStyles(),
|
|
14
|
+
styles = _useStyles.styles,
|
|
15
|
+
cx = _useStyles.cx;
|
|
16
|
+
return /*#__PURE__*/_jsx(Tabs, _objectSpread({
|
|
17
|
+
className: cx(styles.tabs, className)
|
|
18
|
+
}, props));
|
|
14
19
|
};
|
|
15
|
-
export default /*#__PURE__*/React.memo(
|
|
20
|
+
export default /*#__PURE__*/React.memo(TabsNav);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var css = _ref.css,
|
|
6
|
+
token = _ref.token,
|
|
7
|
+
prefixCls = _ref.prefixCls;
|
|
8
|
+
var prefix = ".".concat(prefixCls, "-tabs");
|
|
9
|
+
var marginHoriz = 16;
|
|
10
|
+
var paddingVertical = 6;
|
|
11
|
+
return {
|
|
12
|
+
tabs: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "-tab + ", "-tab {\n margin: ", "px 4px !important;\n padding: 0 12px !important;\n }\n\n ", "-tab {\n color: ", ";\n transition: background-color 100ms ease-out;\n\n &:first-child {\n margin: ", "px 4px ", "px 0;\n padding: ", "px 12px !important;\n }\n\n &:hover {\n color: ", " !important;\n background: ", ";\n border-radius: ", "px;\n }\n }\n\n ", "-nav {\n margin-bottom: 0;\n &::before {\n display: none;\n }\n }\n "])), prefix, prefix, marginHoriz, prefix, token.colorTextSecondary, marginHoriz, marginHoriz, paddingVertical, token.colorText, token.colorFillTertiary, token.borderRadius, prefix)
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { createGlobalStyle } from 'antd-style';
|
|
4
|
-
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n body {\n font-family:
|
|
4
|
+
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n body {\n font-family: 'Segoe UI', SegoeUI, AliPuHui, ", ";\n font-size: ", "px;\n line-height: 1;\n color: ", ";\n\n margin: 0;\n padding: 0;\n background-color: ", ";\n }\n\n * {\n box-sizing: border-box;\n }\n \n #root {\n\t min-height: 100vh;\n\t width: 100vw;\n }\n\n @font-face {\n font-family: AliPuHui;\n font-weight: normal;\n src: url('//at.alicdn.com/t/webfont_exesdog9toj.woff2') format('woff2'),\n url('//at.alicdn.com/t/webfont_exesdog9toj.woff') format('woff'),\n url('//at.alicdn.com/t/webfont_exesdog9toj.ttf') format('truetype');\n font-display: swap;\n }\n\n @font-face {\n font-family: AliPuHui;\n font-weight: bold;\n src: url('https://at.alicdn.com/wf/webfont/exMpJIukiCms/Gsw2PSKrftc1yNWMNlXgw.woff2') format('woff2'),\n url('https://at.alicdn.com/wf/webfont/exMpJIukiCms/vtu73by4O2gEBcvBuLgeu.woff') format('woff');\n font-display: swap;\n }\n\n /* \u5B9A\u4E49\u6EDA\u52A8\u69FD\u7684\u6837\u5F0F */\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n margin-right: 4px;\n background-color: transparent; // \u5B9A\u4E49\u6EDA\u52A8\u69FD\u7684\u80CC\u666F\u8272\n\n &-thumb {\n background-color: ", "; // \u5B9A\u4E49\u6EDA\u52A8\u5757\u7684\u80CC\u666F\u8272\n border-radius: 4px; // \u5B9A\u4E49\u6EDA\u52A8\u5757\u7684\u5706\u89D2\u534A\u5F84\n }\n\n &-corner {\n display: none;\n }\n }\n"])), function (_ref) {
|
|
5
5
|
var theme = _ref.theme;
|
|
6
6
|
return theme.fontFamily;
|
|
7
7
|
}, function (_ref2) {
|
|
@@ -32,6 +32,10 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
32
32
|
customStylish: getCustomStylish,
|
|
33
33
|
customToken: getCustomToken,
|
|
34
34
|
children: [/*#__PURE__*/_jsx(GlobalStyle, {}), /*#__PURE__*/_jsx(App, {
|
|
35
|
+
style: {
|
|
36
|
+
minHeight: 'inherit',
|
|
37
|
+
width: 'inherit'
|
|
38
|
+
},
|
|
35
39
|
children: children
|
|
36
40
|
})]
|
|
37
41
|
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ActionIconSize } from "../index";
|
|
2
|
+
import { DivProps } from "../types";
|
|
3
|
+
import { ThemeMode } from 'antd-style';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface ThemeSwitchProps extends DivProps {
|
|
6
|
+
/**
|
|
7
|
+
* @description Size of the action icon
|
|
8
|
+
* @default {
|
|
9
|
+
* blockSize: 34,
|
|
10
|
+
* fontSize: 20,
|
|
11
|
+
* strokeWidth: 1.5,
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
size?: ActionIconSize;
|
|
15
|
+
/**
|
|
16
|
+
* @description The theme mode of the component
|
|
17
|
+
* @type ThemeMode
|
|
18
|
+
*/
|
|
19
|
+
themeMode: ThemeMode;
|
|
20
|
+
/**
|
|
21
|
+
* @description Callback function when the theme mode is switched
|
|
22
|
+
* @type {(themeMode: ThemeMode) => void}
|
|
23
|
+
*/
|
|
24
|
+
onThemeSwitch: (themeMode: ThemeMode) => void;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: React.NamedExoticComponent<ThemeSwitchProps>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["size", "themeMode", "onThemeSwitch"];
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
import { ActionIcon, Icon } from "./..";
|
|
7
|
+
import { Dropdown } from 'antd';
|
|
8
|
+
import { Monitor, Moon, Sun } from 'lucide-react';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var icons = {
|
|
12
|
+
auto: Monitor,
|
|
13
|
+
light: Sun,
|
|
14
|
+
dark: Moon
|
|
15
|
+
};
|
|
16
|
+
var items = [{
|
|
17
|
+
label: 'System',
|
|
18
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
19
|
+
size: "small",
|
|
20
|
+
icon: icons.auto
|
|
21
|
+
}),
|
|
22
|
+
key: 'auto'
|
|
23
|
+
}, {
|
|
24
|
+
label: 'Light',
|
|
25
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
26
|
+
size: "small",
|
|
27
|
+
icon: icons.light
|
|
28
|
+
}),
|
|
29
|
+
key: 'light'
|
|
30
|
+
}, {
|
|
31
|
+
label: 'Dark',
|
|
32
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
33
|
+
size: "small",
|
|
34
|
+
icon: icons.dark
|
|
35
|
+
}),
|
|
36
|
+
key: 'dark'
|
|
37
|
+
}];
|
|
38
|
+
var ThemeSwitch = function ThemeSwitch(_ref) {
|
|
39
|
+
var _ref$size = _ref.size,
|
|
40
|
+
size = _ref$size === void 0 ? {
|
|
41
|
+
blockSize: 34,
|
|
42
|
+
fontSize: 20,
|
|
43
|
+
strokeWidth: 1.5
|
|
44
|
+
} : _ref$size,
|
|
45
|
+
themeMode = _ref.themeMode,
|
|
46
|
+
onThemeSwitch = _ref.onThemeSwitch,
|
|
47
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
48
|
+
var menuProps = {
|
|
49
|
+
items: items,
|
|
50
|
+
onClick: function onClick(e) {
|
|
51
|
+
return onThemeSwitch(e.key);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({
|
|
55
|
+
menu: menuProps,
|
|
56
|
+
trigger: ['click']
|
|
57
|
+
}, props), {}, {
|
|
58
|
+
children: /*#__PURE__*/_jsx(ActionIcon, {
|
|
59
|
+
size: size,
|
|
60
|
+
icon: icons[themeMode]
|
|
61
|
+
})
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
export default /*#__PURE__*/React.memo(ThemeSwitch);
|
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export { default as ActionIcon, type ActionIconProps } from './ActionIcon';
|
|
1
|
+
export { default as ActionIcon, type ActionIconProps, type ActionIconSize } from './ActionIcon';
|
|
2
2
|
export { default as DraggablePanel, type DraggablePanelProps } from './DraggablePanel';
|
|
3
|
-
export { default as
|
|
3
|
+
export { default as Icon, type IconProps, type IconSize } from './Icon';
|
|
4
|
+
export { default as Logo, type LogoProps } from './Logo';
|
|
4
5
|
export { default as SideNav, type SideNavProps } from './SideNav';
|
|
5
|
-
export { default as
|
|
6
|
+
export { default as StroyBook, useControls, useCreateStore, type StroyBookProps, } from './StroyBook';
|
|
7
|
+
export { default as TabsNav, type TabsNavProps } from './TabsNav';
|
|
6
8
|
export { default as ThemeProvider } from './ThemeProvider';
|
|
9
|
+
export { default as ThemeSwitch, type ThemeSwitchProps } from './ThemeSwitch';
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { default as ActionIcon } from "./ActionIcon";
|
|
2
2
|
export { default as DraggablePanel } from "./DraggablePanel";
|
|
3
|
+
export { default as Icon } from "./Icon";
|
|
3
4
|
export { default as Logo } from "./Logo";
|
|
4
5
|
export { default as SideNav } from "./SideNav";
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as StroyBook, useControls, useCreateStore } from "./StroyBook";
|
|
7
|
+
export { default as TabsNav } from "./TabsNav";
|
|
8
|
+
export { default as ThemeProvider } from "./ThemeProvider";
|
|
9
|
+
export { default as ThemeSwitch } from "./ThemeSwitch";
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { DivProps } from "../types";
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
export declare type ActionIconSize = 'large' | 'normal' | 'small' | {
|
|
5
|
+
blockSize?: number;
|
|
6
|
+
fontSize?: number;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
borderRadius?: number;
|
|
9
|
+
};
|
|
4
10
|
export interface ActionIconProps extends DivProps {
|
|
11
|
+
/**
|
|
12
|
+
* @description Whether the icon is active or not
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
5
15
|
active?: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @description Size of the icon
|
|
18
|
+
* @default 'normal'
|
|
19
|
+
*/
|
|
20
|
+
size?: ActionIconSize;
|
|
21
|
+
/**
|
|
22
|
+
* @description The icon element to be rendered
|
|
23
|
+
* @type LucideIcon
|
|
24
|
+
*/
|
|
12
25
|
icon: LucideIcon;
|
|
13
26
|
}
|
|
14
27
|
declare const _default: React.NamedExoticComponent<ActionIconProps>;
|
package/lib/ActionIcon/index.js
CHANGED
|
@@ -32,77 +32,46 @@ __export(ActionIcon_exports, {
|
|
|
32
32
|
default: () => ActionIcon_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(ActionIcon_exports);
|
|
35
|
+
var import__ = require("../index");
|
|
35
36
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
37
|
-
var Block = import_styled_components.default.div`
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
|
|
40
|
-
display: flex;
|
|
41
|
-
flex: none;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
|
|
45
|
-
color: ${({ active, theme }) => active ? theme.colorText : theme.colorTextQuaternary};
|
|
46
|
-
|
|
47
|
-
background: ${({ active, theme }) => active ? theme.colorFill : "transparent"};
|
|
48
|
-
|
|
49
|
-
transition: all 0.2s ${({ theme }) => theme.motionEaseOut};
|
|
50
|
-
|
|
51
|
-
&:hover {
|
|
52
|
-
background: ${({ theme }) => theme.colorFillTertiary};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:active {
|
|
56
|
-
color: ${({ theme }) => theme.colorText};
|
|
57
|
-
background: ${({ theme }) => theme.colorFill};
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
37
|
+
var import_style = require("./style");
|
|
60
38
|
var ActionIcon = ({
|
|
39
|
+
className,
|
|
61
40
|
active,
|
|
62
41
|
icon,
|
|
63
42
|
size = "normal",
|
|
64
43
|
style,
|
|
65
44
|
...props
|
|
66
45
|
}) => {
|
|
46
|
+
const { styles, cx } = (0, import_style.useStyles)(active);
|
|
67
47
|
let blockSize;
|
|
68
|
-
let fontSize;
|
|
69
|
-
let strokeWidth;
|
|
70
48
|
let borderRadius;
|
|
71
|
-
const Icon = icon;
|
|
72
49
|
switch (size) {
|
|
73
50
|
case "large":
|
|
74
51
|
blockSize = 44;
|
|
75
|
-
fontSize = 24;
|
|
76
|
-
strokeWidth = 2;
|
|
77
52
|
borderRadius = 8;
|
|
78
53
|
break;
|
|
79
54
|
case "normal":
|
|
80
55
|
blockSize = 36;
|
|
81
|
-
fontSize = 24;
|
|
82
|
-
strokeWidth = 2;
|
|
83
56
|
borderRadius = 5;
|
|
84
57
|
break;
|
|
85
58
|
case "small":
|
|
86
59
|
blockSize = 28;
|
|
87
|
-
fontSize = 20;
|
|
88
|
-
strokeWidth = 1.5;
|
|
89
60
|
borderRadius = 5;
|
|
90
61
|
break;
|
|
91
62
|
default:
|
|
92
63
|
blockSize = (size == null ? void 0 : size.blockSize) || 36;
|
|
93
|
-
fontSize = (size == null ? void 0 : size.fontSize) || 24;
|
|
94
|
-
strokeWidth = (size == null ? void 0 : size.strokeWidth) || 2;
|
|
95
64
|
borderRadius = (size == null ? void 0 : size.borderRadius) || 5;
|
|
96
65
|
break;
|
|
97
66
|
}
|
|
98
67
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
-
|
|
68
|
+
"div",
|
|
100
69
|
{
|
|
101
|
-
|
|
70
|
+
className: cx(styles.block, className),
|
|
102
71
|
style: { width: blockSize, height: blockSize, borderRadius, ...style },
|
|
103
72
|
...props
|
|
104
73
|
},
|
|
105
|
-
/* @__PURE__ */ import_react.default.createElement(Icon, { size
|
|
74
|
+
/* @__PURE__ */ import_react.default.createElement(import__.Icon, { size, icon })
|
|
106
75
|
);
|
|
107
76
|
};
|
|
108
77
|
var ActionIcon_default = import_react.default.memo(ActionIcon);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/ActionIcon/style.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
useStyles: () => useStyles
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(style_exports);
|
|
25
|
+
var import_antd_style = require("antd-style");
|
|
26
|
+
var useStyles = (0, import_antd_style.createStyles)(({ css, token }, active) => {
|
|
27
|
+
return {
|
|
28
|
+
block: css`
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: none;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
|
|
36
|
+
color: ${active ? token.colorText : token.colorTextQuaternary};
|
|
37
|
+
|
|
38
|
+
background: ${active ? token.colorFill : "transparent"};
|
|
39
|
+
|
|
40
|
+
transition: color 600ms ${token.motionEaseOut}, background-color 100ms ${token.motionEaseOut};
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
color: ${token.colorText};
|
|
44
|
+
background-color: ${token.colorFillTertiary};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:active {
|
|
48
|
+
color: ${token.colorText};
|
|
49
|
+
background-color: ${token.colorFill};
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
useStyles
|
|
57
|
+
});
|
|
@@ -4,22 +4,82 @@ import React from 'react';
|
|
|
4
4
|
import type { Props as RndProps } from 'react-rnd';
|
|
5
5
|
export declare type placementType = 'right' | 'left' | 'top' | 'bottom';
|
|
6
6
|
export interface DraggablePanelProps extends DivProps {
|
|
7
|
+
/**
|
|
8
|
+
* @description Whether the panel can be pinned or not
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
7
11
|
pin?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @description The mode of the panel, fixed or float
|
|
14
|
+
* @default 'fixed'
|
|
15
|
+
*/
|
|
8
16
|
mode?: 'fixed' | 'float';
|
|
17
|
+
/**
|
|
18
|
+
* @description The placement of the panel, right, left, top or bottom
|
|
19
|
+
* @default 'right'
|
|
20
|
+
*/
|
|
9
21
|
placement: placementType;
|
|
22
|
+
/**
|
|
23
|
+
* @description The minimum width of the panel
|
|
24
|
+
*/
|
|
10
25
|
minWidth?: number;
|
|
26
|
+
/**
|
|
27
|
+
* @description The minimum height of the panel
|
|
28
|
+
*/
|
|
11
29
|
minHeight?: number;
|
|
30
|
+
/**
|
|
31
|
+
* @description Whether the panel can be resized or not
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
12
34
|
resize?: RndProps['enableResizing'];
|
|
35
|
+
/**
|
|
36
|
+
* @description The size of the panel
|
|
37
|
+
*/
|
|
13
38
|
size?: Partial<Size>;
|
|
39
|
+
/**
|
|
40
|
+
* @description Callback function when the size of the panel changes
|
|
41
|
+
*/
|
|
14
42
|
onSizeChange?: (delta: NumberSize, size?: Size) => void;
|
|
43
|
+
/**
|
|
44
|
+
* @description Callback function when the panel is being resized
|
|
45
|
+
*/
|
|
15
46
|
onSizeDragging?: (delta: NumberSize, size?: Size) => void;
|
|
47
|
+
/**
|
|
48
|
+
* @description Whether the panel is expandable or not
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
16
51
|
expandable?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @description Whether the panel is expanded or not
|
|
54
|
+
*/
|
|
17
55
|
expand?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @description The default expand state of the panel
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
18
60
|
defaultExpand?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @description Callback function when the expand state of the panel changes
|
|
63
|
+
*/
|
|
19
64
|
onExpandChange?: (expand: boolean) => void;
|
|
65
|
+
/**
|
|
66
|
+
* @description The default size of the panel
|
|
67
|
+
*/
|
|
20
68
|
defaultSize?: Partial<Size>;
|
|
69
|
+
/**
|
|
70
|
+
* @description Whether the panel should be destroyed when closed or not
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
21
73
|
destroyOnClose?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @description Whether the panel handler should be shown when unexpanded or not
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
22
78
|
showHandlerWhenUnexpand?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @description The style of the panel handler
|
|
81
|
+
* @type CSSProperties
|
|
82
|
+
*/
|
|
23
83
|
hanlderStyle?: React.CSSProperties;
|
|
24
84
|
}
|
|
25
85
|
declare const _default: React.NamedExoticComponent<DraggablePanelProps>;
|
|
@@ -23,7 +23,7 @@ __export(style_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(style_exports);
|
|
25
25
|
var import_antd_style = require("antd-style");
|
|
26
|
-
var offset =
|
|
26
|
+
var offset = 17;
|
|
27
27
|
var toggleLength = 40;
|
|
28
28
|
var toggleShort = 16;
|
|
29
29
|
var useStyle = (0, import_antd_style.createStyles)(({ token }, prefix) => {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvgProps } from "../types";
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare type IconSize = 'large' | 'normal' | 'small' | {
|
|
5
|
+
fontSize?: number;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
};
|
|
8
|
+
export interface IconProps extends SvgProps {
|
|
9
|
+
/**
|
|
10
|
+
* @description Size of the icon
|
|
11
|
+
* @default 'normal'
|
|
12
|
+
*/
|
|
13
|
+
size?: IconSize;
|
|
14
|
+
/**
|
|
15
|
+
* @description The icon element to be rendered
|
|
16
|
+
* @type LucideIcon
|
|
17
|
+
*/
|
|
18
|
+
icon: LucideIcon;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.NamedExoticComponent<IconProps>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Icon/index.tsx
|
|
30
|
+
var Icon_exports = {};
|
|
31
|
+
__export(Icon_exports, {
|
|
32
|
+
default: () => Icon_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Icon_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Icon = ({ icon, size = "normal", ...props }) => {
|
|
37
|
+
let fontSize;
|
|
38
|
+
let strokeWidth;
|
|
39
|
+
const SvgIcon = icon;
|
|
40
|
+
switch (size) {
|
|
41
|
+
case "large":
|
|
42
|
+
case "normal":
|
|
43
|
+
fontSize = 24;
|
|
44
|
+
strokeWidth = 2;
|
|
45
|
+
break;
|
|
46
|
+
case "small":
|
|
47
|
+
fontSize = 20;
|
|
48
|
+
strokeWidth = 1.5;
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
fontSize = (size == null ? void 0 : size.fontSize) || 24;
|
|
52
|
+
strokeWidth = (size == null ? void 0 : size.strokeWidth) || 2;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(SvgIcon, { size: fontSize, strokeWidth, ...props });
|
|
56
|
+
};
|
|
57
|
+
var Icon_default = import_react.default.memo(Icon);
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Logo/Divider.tsx
|
|
30
|
+
var Divider_exports = {};
|
|
31
|
+
__export(Divider_exports, {
|
|
32
|
+
default: () => Divider_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Divider_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Divider = (props) => /* @__PURE__ */ import_react.default.createElement(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
fill: "none",
|
|
40
|
+
stroke: "currentColor",
|
|
41
|
+
strokeLinecap: "round",
|
|
42
|
+
strokeLinejoin: "round",
|
|
43
|
+
shapeRendering: "geometricPrecision",
|
|
44
|
+
viewBox: "0 0 24 24",
|
|
45
|
+
...props
|
|
46
|
+
},
|
|
47
|
+
/* @__PURE__ */ import_react.default.createElement("path", { d: "M16.88 3.549L7.12 20.451" })
|
|
48
|
+
);
|
|
49
|
+
var Divider_default = import_react.default.memo(Divider);
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {});
|
package/lib/Logo/Logo3D.d.ts
CHANGED
package/lib/Logo/LogoFlat.d.ts
CHANGED
package/lib/Logo/LogoFlat.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(LogoFlat_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(LogoFlat_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var LogoFlat = (props) => /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
36
|
+
var LogoFlat = (props) => /* @__PURE__ */ import_react.default.createElement("svg", { fill: "none", viewBox: "0 0 320 320", ...props }, /* @__PURE__ */ import_react.default.createElement(
|
|
37
37
|
"path",
|
|
38
38
|
{
|
|
39
39
|
fill: "#FFB02E",
|