@tsingroc/tsingroc-components 3.2.0 → 3.4.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/dist/components/Header.d.ts +67 -0
- package/dist/components/Header.js +41 -0
- package/dist/components/Header.js.map +1 -0
- package/dist/components/IndicatorLight.d.ts +40 -0
- package/dist/components/IndicatorLight.js +53 -0
- package/dist/components/IndicatorLight.js.map +1 -0
- package/dist/components/Sidebar.d.ts +9 -3
- package/dist/components/Sidebar.js +3 -4
- package/dist/components/Sidebar.js.map +1 -1
- package/dist/components/UserButton.d.ts +5 -0
- package/dist/components/UserButton.js +20 -8
- package/dist/components/UserButton.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { type MenuProps } from "antd";
|
|
3
|
+
export type MenuItem = Required<MenuProps>["items"][number];
|
|
4
|
+
export interface HeaderProps extends MenuProps {
|
|
5
|
+
/**
|
|
6
|
+
* 网站 logo 的 URL。
|
|
7
|
+
*
|
|
8
|
+
* 建议导入图片,然后填入导入得到的地址,而不要硬编码地址。
|
|
9
|
+
*/
|
|
10
|
+
logo?: string;
|
|
11
|
+
/** 顶栏的标题。*/
|
|
12
|
+
title?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 顶栏左端部分(logo 和标题)的宽度。在与边栏搭配时,推荐设置成与边栏同宽。
|
|
15
|
+
* @default 260
|
|
16
|
+
*/
|
|
17
|
+
leftEndWidth?: number | string;
|
|
18
|
+
/**
|
|
19
|
+
* 顶栏左端的内容(logo 和标题)。设置了该属性时,
|
|
20
|
+
* {@linkcode HeaderProps.logo | logo}、
|
|
21
|
+
* {@linkcode HeaderProps.title | title} 和
|
|
22
|
+
* {@linkcode HeaderProps.leftEndWidth | leftEndWidth} 将失去作用。
|
|
23
|
+
* 填 `null` 可以隐藏掉默认值(与 `undefined` 不同!)。
|
|
24
|
+
*/
|
|
25
|
+
leftEnd?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* 菜单项配置,默认为空。
|
|
28
|
+
*
|
|
29
|
+
* 该属性以及其余属性的用法可参考 [`Menu` 组件的文档][1]。
|
|
30
|
+
*
|
|
31
|
+
* [1]: https://ant-design.antgroup.com/components/menu-cn
|
|
32
|
+
*/
|
|
33
|
+
items?: MenuItem[];
|
|
34
|
+
/** 当前选中的菜单项 key 数组。 */
|
|
35
|
+
selectedKeys?: string[];
|
|
36
|
+
/** 当前展开的子菜单 key 数组。 */
|
|
37
|
+
openKeys?: string[];
|
|
38
|
+
/** 菜单项被选中时的回调函数。 */
|
|
39
|
+
onSelect?: MenuProps["onSelect"];
|
|
40
|
+
/** 子菜单展开/收起时的回调函数。 */
|
|
41
|
+
onOpenChange?: MenuProps["onOpenChange"];
|
|
42
|
+
/**
|
|
43
|
+
* 顶栏右端的额外内容。默认使用 {@linkcode UserButton} 组件。
|
|
44
|
+
* @default <UserButton layout="header" />
|
|
45
|
+
* 填 `null` 可以隐藏掉默认值(与 `undefined` 不同!)。
|
|
46
|
+
*/
|
|
47
|
+
rightEnd?: ReactNode;
|
|
48
|
+
/** 额外的 `className`。*/
|
|
49
|
+
className?: string;
|
|
50
|
+
/** 额外的 CSS 样式。*/
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 顶栏组件。该组件需要放置在 [Ant Design 的 `Layout` 组件][1]内部才能正常工作。
|
|
55
|
+
* 如果没有指定 {@linkcode HeaderProps.rightEnd | rightEnd} 属性,
|
|
56
|
+
* 那么还需要包裹在 {@linkcode AuthProvider} 内,并且经过 {@linkcode AuthCheck} 验证后
|
|
57
|
+
* 才能正常显示顶栏右端的用户信息按钮。
|
|
58
|
+
*
|
|
59
|
+
* 一般来说,使用该组件时至少需要提供 `logo`、`items` 和 `onSelect` 三个属性,具体用法请参照范例。
|
|
60
|
+
*
|
|
61
|
+
* 除了文档中列出的属性之外,该组件会把额外的属性全部传递给内部的菜单 [`Menu` 组件][2]。
|
|
62
|
+
*
|
|
63
|
+
* [1]: https://ant-design.antgroup.com/components/layout-cn
|
|
64
|
+
* [2]: https://ant-design.antgroup.com/components/menu-cn
|
|
65
|
+
*/
|
|
66
|
+
declare function Header(props: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export default Header;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Flex, Layout, Menu, theme } from "antd";
|
|
3
|
+
import UserButton from "./UserButton";
|
|
4
|
+
/**
|
|
5
|
+
* 顶栏组件。该组件需要放置在 [Ant Design 的 `Layout` 组件][1]内部才能正常工作。
|
|
6
|
+
* 如果没有指定 {@linkcode HeaderProps.rightEnd | rightEnd} 属性,
|
|
7
|
+
* 那么还需要包裹在 {@linkcode AuthProvider} 内,并且经过 {@linkcode AuthCheck} 验证后
|
|
8
|
+
* 才能正常显示顶栏右端的用户信息按钮。
|
|
9
|
+
*
|
|
10
|
+
* 一般来说,使用该组件时至少需要提供 `logo`、`items` 和 `onSelect` 三个属性,具体用法请参照范例。
|
|
11
|
+
*
|
|
12
|
+
* 除了文档中列出的属性之外,该组件会把额外的属性全部传递给内部的菜单 [`Menu` 组件][2]。
|
|
13
|
+
*
|
|
14
|
+
* [1]: https://ant-design.antgroup.com/components/layout-cn
|
|
15
|
+
* [2]: https://ant-design.antgroup.com/components/menu-cn
|
|
16
|
+
*/
|
|
17
|
+
function Header(props) {
|
|
18
|
+
const { token } = theme.useToken();
|
|
19
|
+
const { logo, title, leftEndWidth = 260, leftEnd, rightEnd, className, style, ...rest } = props;
|
|
20
|
+
return (_jsxs(Layout.Header, { className: className, style: {
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
boxShadow: "rgba(0, 0, 0, 0.15) 0 0 8px",
|
|
24
|
+
zIndex: 1,
|
|
25
|
+
background: token.colorBgContainer,
|
|
26
|
+
padding: 0,
|
|
27
|
+
color: token.colorText,
|
|
28
|
+
...style,
|
|
29
|
+
}, children: [leftEnd !== undefined ? (leftEnd) : (_jsxs(Flex, { align: "center", gap: token.marginSM, style: {
|
|
30
|
+
minWidth: leftEndWidth,
|
|
31
|
+
height: "100%",
|
|
32
|
+
paddingInlineStart: token.paddingLG + token.paddingXXS,
|
|
33
|
+
paddingInlineEnd: token.paddingSM,
|
|
34
|
+
}, children: [_jsx("img", { alt: "logo", src: logo, style: { height: "50%" } }), _jsx("h1", { style: { flexBasis: "100%", textAlign: "center" }, children: title })] })), _jsx(Menu, { mode: "horizontal", ...rest, style: {
|
|
35
|
+
flexBasis: "100%",
|
|
36
|
+
height: "100%",
|
|
37
|
+
borderBlockEnd: "none",
|
|
38
|
+
} }), rightEnd !== undefined ? rightEnd : _jsx(UserButton, { layout: "header" })] }));
|
|
39
|
+
}
|
|
40
|
+
export default Header;
|
|
41
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../src/components/Header.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAkB,KAAK,EAAE,MAAM,MAAM,CAAC;AAEjE,OAAO,UAAU,MAAM,cAAc,CAAC;AAsDtC;;;;;;;;;;;;GAYG;AACH,SAAS,MAAM,CAAC,KAAkB;IAChC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnC,MAAM,EACJ,IAAI,EACJ,KAAK,EACL,YAAY,GAAG,GAAG,EAClB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IACV,OAAO,CACL,MAAC,MAAM,CAAC,MAAM,IACZ,SAAS,EAAE,SAAS,EACpB,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
+
* 指示灯的直径。
|
|
5
|
+
* @default token.sizeXL
|
|
6
|
+
*/
|
|
7
|
+
size?: number | string;
|
|
8
|
+
/**
|
|
9
|
+
* 指示的状态。设置了这一项时,{@linkcode onColor}、{@linkcode mode} 和 {@linkcode period} 会被忽略。
|
|
10
|
+
*
|
|
11
|
+
* `"healthy"` 表示常绿,`"attention"` 表示绿色闪烁,
|
|
12
|
+
* `"danger"` 表示常红,`"emergency"` 表示红色闪烁,
|
|
13
|
+
* `"off"` 表示关闭。
|
|
14
|
+
* 具体色值取自 design token。
|
|
15
|
+
*/
|
|
16
|
+
status?: "healthy" | "attention" | "danger" | "emergency" | "off";
|
|
17
|
+
/**
|
|
18
|
+
* 灯亮时的颜色。
|
|
19
|
+
* @default token.colorError
|
|
20
|
+
*/
|
|
21
|
+
onColor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 灯灭时的颜色。
|
|
24
|
+
* @default token.colorFill
|
|
25
|
+
*/
|
|
26
|
+
offColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 灯的状态。`"on"` 表示常亮,`"flash"` 表示闪烁,`"off"` 表示常暗。
|
|
29
|
+
* @default "on"
|
|
30
|
+
*/
|
|
31
|
+
mode?: "on" | "flash" | "off";
|
|
32
|
+
/**
|
|
33
|
+
* 闪烁周期(一亮一暗)的时长,以秒为单位。不可为 `0`、`NaN` 或 `Infinity`。
|
|
34
|
+
* @default 1
|
|
35
|
+
*/
|
|
36
|
+
period?: number;
|
|
37
|
+
}
|
|
38
|
+
/** 一个指示灯。*/
|
|
39
|
+
declare function IndicatorLight(props: IndicatorLightProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export default IndicatorLight;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createStyles, keyframes } from "antd-style";
|
|
3
|
+
const ANIMATION_MAP = {
|
|
4
|
+
on: "linear(0, 0) paused",
|
|
5
|
+
flash: "cubic-bezier(0.9, 0, 0.1, 1) infinite alternate",
|
|
6
|
+
off: "linear(1, 1) paused",
|
|
7
|
+
};
|
|
8
|
+
const useStyles = createStyles(({ token, css }, props) => {
|
|
9
|
+
const size = props.size ?? token.sizeXL;
|
|
10
|
+
const sizeCss = typeof size === "number" ? size + "px" : size;
|
|
11
|
+
const colorMap = {
|
|
12
|
+
healthy: { onColor: token.colorSuccess, mode: "on" },
|
|
13
|
+
attention: { onColor: token.colorSuccess, mode: "flash" },
|
|
14
|
+
danger: { onColor: token.colorError, mode: "on" },
|
|
15
|
+
emergency: { onColor: token.colorError, mode: "flash" },
|
|
16
|
+
off: { onColor: token.colorError, mode: "off" },
|
|
17
|
+
};
|
|
18
|
+
const { onColor = token.colorError, mode = "on" } = props.status
|
|
19
|
+
? colorMap[props.status]
|
|
20
|
+
: props;
|
|
21
|
+
const offColor = props.offColor ?? token.colorFillSecondary;
|
|
22
|
+
const halfPeriod = (props.period ?? 1) / 2;
|
|
23
|
+
const flash = keyframes `
|
|
24
|
+
from {
|
|
25
|
+
background-color: ${onColor};
|
|
26
|
+
box-shadow: 0 0 6px 2px ${onColor};
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
background-color: ${offColor};
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
return {
|
|
33
|
+
light: css `
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
animation: ${flash} ${halfPeriod}s ${ANIMATION_MAP[mode]};
|
|
38
|
+
`,
|
|
39
|
+
lightBorder: css `
|
|
40
|
+
height: ${sizeCss};
|
|
41
|
+
aspect-ratio: 1;
|
|
42
|
+
border: ${token.colorBorder} 2px solid;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
`,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
/** 一个指示灯。*/
|
|
48
|
+
function IndicatorLight(props) {
|
|
49
|
+
const { cx, styles } = useStyles(props);
|
|
50
|
+
return (_jsx("div", { className: cx(styles.lightBorder), children: _jsx("div", { className: cx(styles.light) }) }));
|
|
51
|
+
}
|
|
52
|
+
export default IndicatorLight;
|
|
53
|
+
//# sourceMappingURL=IndicatorLight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndicatorLight.js","sourceRoot":"","sources":["../../src/components/IndicatorLight.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAwCrD,MAAM,aAAa,GAAqD;IACtE,EAAE,EAAE,qBAAqB;IACzB,KAAK,EAAE,iDAAiD;IACxD,GAAG,EAAE,qBAAqB;CAC3B,CAAC;AAEF,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAA0B,EAAE,EAAE;IAC5E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC;IACxC,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,MAAM,QAAQ,GAGV;QACF,OAAO,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE;QACpD,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE;QACzD,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;QACjD,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;QACvD,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE;KAChD,CAAC;IACF,MAAM,EAAE,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM;QAC9D,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;QACxB,CAAC,CAAC,KAAK,CAAC;IACV,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,kBAAkB,CAAC;IAC5D,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,SAAS,CAAA;;0BAEC,OAAO;gCACD,OAAO;;;0BAGb,QAAQ;;GAE/B,CAAC;IACF,OAAO;QACL,KAAK,EAAE,GAAG,CAAA;;;;mBAIK,KAAK,IAAI,UAAU,KAAK,aAAa,CAAC,IAAI,CAAC;KACzD;QACD,WAAW,EAAE,GAAG,CAAA;gBACJ,OAAO;;gBAEP,KAAK,CAAC,WAAW;;KAE5B;KACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY;AACZ,SAAS,cAAc,CAAC,KAA0B;IAChD,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,YACpC,cAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAQ,GACpC,CACP,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MenuProps } from "antd";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
2
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
3
3
|
export type MenuItem = Required<MenuProps>["items"][number];
|
|
4
4
|
export interface SidebarProps extends MenuProps {
|
|
5
5
|
/**
|
|
@@ -31,8 +31,9 @@ export interface SidebarProps extends MenuProps {
|
|
|
31
31
|
* {@linkcode SidebarProps.title | title} 和
|
|
32
32
|
* {@linkcode SidebarProps.headerHeight | headerHeight} 将失去作用。
|
|
33
33
|
* 参数 `collapsed` 表示侧边栏是否收起。
|
|
34
|
+
* 填 `null` 可以隐藏掉默认值(与 `undefined` 不同!)。
|
|
34
35
|
*/
|
|
35
|
-
header?: (collapsed: boolean) => ReactNode;
|
|
36
|
+
header?: ((collapsed: boolean) => ReactNode) | null;
|
|
36
37
|
/**
|
|
37
38
|
* 菜单项配置,默认与 TMS 系统的菜单相同。
|
|
38
39
|
*
|
|
@@ -52,9 +53,14 @@ export interface SidebarProps extends MenuProps {
|
|
|
52
53
|
/**
|
|
53
54
|
* 侧边栏底部的额外内容。参数 `collapsed` 表示侧边栏是否收起。
|
|
54
55
|
* 默认情况下使用 {@linkcode UserButton} 组件。
|
|
56
|
+
* 填 `null` 可以隐藏掉默认值(与 `undefined` 不同!)。
|
|
55
57
|
* @default (collapsed) => <UserButton compact={collapsed} />
|
|
56
58
|
*/
|
|
57
|
-
footer?: (collapsed: boolean) => ReactNode;
|
|
59
|
+
footer?: ((collapsed: boolean) => ReactNode) | null;
|
|
60
|
+
/** 额外的 `className`。*/
|
|
61
|
+
className?: string;
|
|
62
|
+
/** 额外的 CSS 样式。*/
|
|
63
|
+
style?: CSSProperties;
|
|
58
64
|
}
|
|
59
65
|
/**
|
|
60
66
|
* 出自 TMS 系统的侧边栏组件。该组件需要放置在 [Ant Design 的 `Layout` 组件][1]内部才能正常工作。
|
|
@@ -6,7 +6,6 @@ import { createStyles } from "antd-style";
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
7
|
import { AuthCheck, AuthProvider } from "./Auth";
|
|
8
8
|
import UserButton from "./UserButton";
|
|
9
|
-
const { Sider } = Layout;
|
|
10
9
|
const menuItem = (label, key, icon, children) => ({ key, icon, children, label });
|
|
11
10
|
/** 默认菜单项配置,可以作为参考或默认值 */
|
|
12
11
|
const DEFAULT_MENU_ITEMS = [
|
|
@@ -62,7 +61,7 @@ const useStyles = createStyles(({ token, css, cx, prefixCls }, collapsed) => {
|
|
|
62
61
|
`;
|
|
63
62
|
const sidebar = css `
|
|
64
63
|
position: relative;
|
|
65
|
-
box-shadow: rgba(0, 0, 0, 0.15) 0
|
|
64
|
+
box-shadow: rgba(0, 0, 0, 0.15) 0 0 8px;
|
|
66
65
|
|
|
67
66
|
> .${prefixCls}-layout-sider-children {
|
|
68
67
|
display: flex;
|
|
@@ -102,10 +101,10 @@ const useStyles = createStyles(({ token, css, cx, prefixCls }, collapsed) => {
|
|
|
102
101
|
* [2]: https://ant-design.antgroup.com/components/menu-cn
|
|
103
102
|
*/
|
|
104
103
|
function Sidebar(props) {
|
|
105
|
-
const { width = 260, collapsible = false, logo, title, headerHeight = 116, header, items = DEFAULT_MENU_ITEMS,
|
|
104
|
+
const { width = 260, collapsible = false, logo, title, headerHeight = 116, header, items = DEFAULT_MENU_ITEMS, footer = (collapsed) => _jsx(UserButton, { compact: collapsed }), className, style, ...rest } = props;
|
|
106
105
|
const [collapsed, setCollapsed] = useState(false);
|
|
107
106
|
const { cx, styles } = useStyles(collapsed);
|
|
108
|
-
return (_jsxs(Sider, { theme: "light", width: width, collapsed: collapsible ? collapsed : false, collapsible: collapsible, trigger: null, className: cx(styles.sidebar), children: [header ? (header(collapsed)) : (_jsxs(Flex, { vertical: true, align: "center", justify: "center", className: cx(styles.sidebarHeader), style: { height: headerHeight }, children: [_jsx("img", { alt: "logo", src: logo }), _jsx("h1", { children: title })] })), _jsx(Menu, { mode: "inline",
|
|
107
|
+
return (_jsxs(Layout.Sider, { theme: "light", width: width, collapsed: collapsible ? collapsed : false, collapsible: collapsible, trigger: null, className: cx(styles.sidebar, className), style: style, children: [header === null ? null : header ? (header(collapsed)) : (_jsxs(Flex, { vertical: true, align: "center", justify: "center", className: cx(styles.sidebarHeader), style: { height: headerHeight }, children: [_jsx("img", { alt: "logo", src: logo }), _jsx("h1", { children: title })] })), _jsx(Menu, { mode: "inline", items: items, inlineCollapsed: collapsible ? collapsed : false, className: cx(styles.sidebarMenu), ...rest }), footer === null ? null : footer?.(collapsed), collapsible && (_jsx(Button, { className: cx(styles.sidebarBtn), icon: collapsed ? _jsx(RightOutlined, {}) : _jsx(LeftOutlined, {}), onClick: () => setCollapsed(!collapsed) }))] }));
|
|
109
108
|
}
|
|
110
109
|
export default Sidebar;
|
|
111
110
|
//# sourceMappingURL=Sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../src/components/Sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAkB,MAAM,MAAM,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../src/components/Sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAkB,MAAM,MAAM,CAAC;AAClE,OAAO,EAAgD,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,6DAA6D;AAC7D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,UAAU,MAAM,cAAc,CAAC;AAItC,MAAM,QAAQ,GAAG,CACf,KAAgB,EAChB,GAAQ,EACR,IAAgB,EAChB,QAAqB,EACX,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAEhD,yBAAyB;AACzB,MAAM,kBAAkB,GAAe;IACrC,Q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C,MAAM,CAAC,CAAC,CAAC,CACjC,MAAM,CAAC,SAAS,CAAC,CAClB,CAAC,CAAC,CAAC,CACF,MAAC,IAAI,IACH,QAAQ,QACR,KAAK,EAAC,QAAQ,EACd,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EACnC,KAAK,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,aAE/B,cAAK,GAAG,EAAC,MAAM,EAAC,GAAG,EAAE,IAAI,GAAI,EAC7B,uBAAK,KAAK,GAAM,IACX,CACR,EACD,KAAC,IAAI,IACH,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAChD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,KAC7B,IAAI,GACR,EACD,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,EAC5C,WAAW,IAAI,CACd,KAAC,MAAM,IACL,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAChC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,EACtD,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GACvC,CACH,IACY,CAChB,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -5,6 +5,11 @@ export interface UserButtonProps extends ButtonProps {
|
|
|
5
5
|
* @default false
|
|
6
6
|
*/
|
|
7
7
|
compact?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 使用边栏布局还是顶栏布局。
|
|
10
|
+
* @default "sidebar"
|
|
11
|
+
*/
|
|
12
|
+
layout?: "sidebar" | "header";
|
|
8
13
|
/** 点击“账户”时的操作。若省略,将不显示弹出菜单中的“账户”选项。*/
|
|
9
14
|
onOpenProfile?: () => void;
|
|
10
15
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Avatar, Button, Dropdown, theme, } from "antd";
|
|
3
|
-
import { LogoutOutlined, UpOutlined, UserOutlined } from "@ant-design/icons";
|
|
3
|
+
import { DownOutlined, LogoutOutlined, UpOutlined, UserOutlined, } from "@ant-design/icons";
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
5
|
import { AuthCheck, AuthProvider, useAuth } from "./Auth";
|
|
6
6
|
/**
|
|
@@ -16,11 +16,11 @@ function UserButton(props) {
|
|
|
16
16
|
const { token } = theme.useToken();
|
|
17
17
|
const auth = useAuth("UserButton");
|
|
18
18
|
const userInfo = auth.userInfo;
|
|
19
|
-
const { compact, onOpenProfile, onLogout = () => {
|
|
19
|
+
const { compact, layout = "sidebar", onOpenProfile, onLogout = () => {
|
|
20
20
|
auth.logout();
|
|
21
21
|
location.href = "/";
|
|
22
22
|
}, dropdownProps, ...rest } = props;
|
|
23
|
-
return (_jsx(Dropdown, { trigger: ["click"], placement: "topLeft", ...dropdownProps, menu: {
|
|
23
|
+
return (_jsx(Dropdown, { trigger: ["click"], placement: layout === "sidebar" ? "topLeft" : "bottomRight", ...dropdownProps, menu: {
|
|
24
24
|
items: [
|
|
25
25
|
onOpenProfile
|
|
26
26
|
? {
|
|
@@ -44,12 +44,24 @@ function UserButton(props) {
|
|
|
44
44
|
minWidth: "100%",
|
|
45
45
|
...dropdownProps?.menu?.style,
|
|
46
46
|
},
|
|
47
|
-
}, children: _jsx(Button, { type: "text", icon: _jsx(Avatar, { src: userInfo?.picture, icon: _jsx(UserOutlined, {}) }), ...rest,
|
|
48
|
-
|
|
47
|
+
}, children: _jsx(Button, { type: "text", icon: _jsx(Avatar, { alt: "\u5934\u50CF", src: userInfo?.picture, icon: _jsx(UserOutlined, {}) }), ...rest, styles: {
|
|
48
|
+
icon: {
|
|
49
|
+
display: "inline-flex",
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
...rest.styles?.icon,
|
|
52
|
+
},
|
|
53
|
+
}, style: {
|
|
49
54
|
margin: token.marginXXS,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
...(layout === "sidebar"
|
|
56
|
+
? {
|
|
57
|
+
width: "auto",
|
|
58
|
+
padding: token.paddingXXS,
|
|
59
|
+
}
|
|
60
|
+
: {
|
|
61
|
+
paddingBlock: token.padding + token.paddingXS,
|
|
62
|
+
}),
|
|
63
|
+
...rest.style,
|
|
64
|
+
}, children: !compact && (_jsxs(_Fragment, { children: [_jsx("span", { style: { marginRight: token.marginXXS }, children: userInfo?.name ?? userInfo?.prefered_username ?? "平台用户" }), layout === "sidebar" ? _jsx(UpOutlined, {}) : _jsx(DownOutlined, {})] })) }) }));
|
|
53
65
|
}
|
|
54
66
|
export default UserButton;
|
|
55
67
|
//# sourceMappingURL=UserButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserButton.js","sourceRoot":"","sources":["../../src/components/UserButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,MAAM,EAEN,QAAQ,EAER,KAAK,GACN,MAAM,MAAM,CAAC;AACd,OAAO,
|
|
1
|
+
{"version":3,"file":"UserButton.js","sourceRoot":"","sources":["../../src/components/UserButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,MAAM,EAEN,QAAQ,EAER,KAAK,GACN,MAAM,MAAM,CAAC;AACd,OAAO,EACL,YAAY,EACZ,cAAc,EACd,UAAU,EACV,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B,6DAA6D;AAC7D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAiC1D;;;;;;;;GAQG;AACH,SAAS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,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,KAAC,YAAY,KAAG,GAAI,KAEjE,IAAI,EACR,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,OAAO,EAAE,aAAa;oBACtB,UAAU,EAAE,QAAQ;oBACpB,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI;iBACrB;aACF,EACD,KAAK,EAAE;gBACL,MAAM,EAAE,KAAK,CAAC,SAAS;gBACvB,GAAG,CAAC,MAAM,KAAK,SAAS;oBACtB,CAAC,CAAC;wBACE,KAAK,EAAE,MAAM;wBACb,OAAO,EAAE,KAAK,CAAC,UAAU;qBAC1B;oBACH,CAAC,CAAC;wBACE,YAAY,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS;qBAC9C,CAAC;gBACN,GAAG,IAAI,CAAC,KAAK;aACd,YAEA,CAAC,OAAO,IAAI,CACX,8BACE,eAAM,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,SAAS,EAAE,YAC1C,QAAQ,EAAE,IAAI,IAAI,QAAQ,EAAE,iBAAiB,IAAI,MAAM,GACnD,EACN,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,KAAC,UAAU,KAAG,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,IACxD,CACJ,GACM,GACA,CACZ,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { AuthProvider, type AuthProviderProps, AuthCheck, type AuthCheckProps, AuthCallback, type AuthCallbackProps, useAuth, } from "./components/Auth";
|
|
2
2
|
export { default as Calendar, type CalendarProps } from "./components/Calendar";
|
|
3
3
|
export { default as CircularProgress, type CircularProgressProps, } from "./components/CircularProgress";
|
|
4
|
+
export { default as Header, type HeaderProps } from "./components/Header";
|
|
4
5
|
export { default as ImageBackground, type ImageBackgroundProps, } from "./components/ImageBackground";
|
|
6
|
+
export { default as IndicatorLight, type IndicatorLightProps, } from "./components/IndicatorLight";
|
|
5
7
|
export { default as QuickDateRangePicker, type QuickDateRangePickerProps, } from "./components/QuickDateRangePicker";
|
|
6
8
|
export { default as SegmentedButtons, TimeUnitSwitcher, type TimeUnitSwitcherProps, } from "./components/SegmentedButtons";
|
|
7
9
|
export { default as Sidebar, type SidebarProps } from "./components/Sidebar";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { AuthProvider, AuthCheck, AuthCallback, useAuth, } from "./components/Auth";
|
|
2
2
|
export { default as Calendar } from "./components/Calendar";
|
|
3
3
|
export { default as CircularProgress, } from "./components/CircularProgress";
|
|
4
|
+
export { default as Header } from "./components/Header";
|
|
4
5
|
export { default as ImageBackground, } from "./components/ImageBackground";
|
|
6
|
+
export { default as IndicatorLight, } from "./components/IndicatorLight";
|
|
5
7
|
export { default as QuickDateRangePicker, } from "./components/QuickDateRangePicker";
|
|
6
8
|
export { default as SegmentedButtons, TimeUnitSwitcher, } from "./components/SegmentedButtons";
|
|
7
9
|
export { default as Sidebar } from "./components/Sidebar";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,SAAS,EAET,YAAY,EAEZ,OAAO,GACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAsB,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,OAAO,IAAI,eAAe,GAE3B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,OAAO,IAAI,oBAAoB,GAEhC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,gBAAgB,GAEjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAqB,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EACL,OAAO,IAAI,kBAAkB,GAE9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,OAAO,IAAI,aAAa,GAEzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,OAAO,IAAI,UAAU,GAEtB,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,SAAS,EAET,YAAY,EAEZ,OAAO,GACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAsB,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EACL,OAAO,IAAI,eAAe,GAE3B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,OAAO,IAAI,cAAc,GAE1B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,OAAO,IAAI,oBAAoB,GAEhC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,gBAAgB,GAEjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAqB,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EACL,OAAO,IAAI,kBAAkB,GAE9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,OAAO,IAAI,aAAa,GAEzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,OAAO,IAAI,UAAU,GAEtB,MAAM,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsingroc/tsingroc-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@rsbuild/core": "^1.3.11",
|
|
42
42
|
"@rsbuild/plugin-react": "^1.3.0",
|
|
43
43
|
"@rspress/plugin-preview": "^2.0.0-alpha.0",
|
|
44
|
-
"@types/node": "^22.
|
|
44
|
+
"@types/node": "^22.15.2",
|
|
45
45
|
"@types/react": "^18.3.20",
|
|
46
46
|
"@types/react-dom": "^18.3.6",
|
|
47
47
|
"echarts-for-react": "^3.0.2",
|