@spacego/fe-components 0.0.5 → 0.0.6
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/lib/config/constants.js +0 -1
- package/lib/fe-layouts/auth-layout/index.js +25 -24
- package/lib/fe-layouts/basics-layout/index.js +55 -56
- package/lib/fe-layouts/context/global-context.provider.js +25 -30
- package/lib/hooks/use-auth.hook.js +7 -7
- package/lib/index.css +1 -1
- package/lib/index.js +28 -34
- package/lib/router/index.js +4 -48
- package/lib/store/modules/layout-config.store.js +3 -3
- package/lib/store/modules/theme.store.js +3 -3
- package/lib/types/config/constants.d.ts +0 -1
- package/lib/types/fe-layouts/context/global-context.d.ts +6 -10
- package/lib/types/index.d.ts +3 -0
- package/lib/types/router/index.d.ts +1 -33
- package/package.json +1 -2
- package/lib/router/permission.js +0 -43
- package/lib/router/routes.js +0 -57
- package/lib/types/router/permission.d.ts +0 -23
- package/lib/types/router/routes.d.ts +0 -11
package/lib/config/constants.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useSelector as p } from "@spacego/zustand";
|
|
3
|
-
import { useState as u
|
|
4
|
-
import { FaCheck as
|
|
5
|
-
import { IoMoon as
|
|
6
|
-
import { LuPalette as
|
|
7
|
-
import { MdWbSunny as
|
|
8
|
-
import { Outlet as
|
|
9
|
-
import
|
|
10
|
-
import T from "../../fe-loading/index.js";
|
|
3
|
+
import { useState as u } from "react";
|
|
4
|
+
import { FaCheck as g } from "react-icons/fa6";
|
|
5
|
+
import { IoMoon as v } from "react-icons/io5";
|
|
6
|
+
import { LuPalette as N } from "react-icons/lu";
|
|
7
|
+
import { MdWbSunny as b } from "react-icons/md";
|
|
8
|
+
import { Outlet as y } from "react-router-dom";
|
|
9
|
+
import w from "../../assets/svg/login-view.svg.js";
|
|
11
10
|
import "@ant-design/icons";
|
|
12
|
-
import { applyThemeWithTransition as
|
|
11
|
+
import { applyThemeWithTransition as k } from "../../utils/theme.js";
|
|
13
12
|
import "../../store/modules/layout-config.store.js";
|
|
14
|
-
import { useThemeStore as
|
|
15
|
-
import { THEME_COLORS as
|
|
16
|
-
import "
|
|
17
|
-
import { useGlobal as M } from "../context/context.js";
|
|
13
|
+
import { useThemeStore as T } from "../../store/modules/theme.store.js";
|
|
14
|
+
import { THEME_COLORS as E } from "../../config/theme.js";
|
|
15
|
+
import { useGlobal as C } from "../context/context.js";
|
|
18
16
|
/* empty css */
|
|
19
17
|
import "../basics-layout/index.js";
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import "antd";
|
|
19
|
+
import "@spacego/turbo-utils";
|
|
20
|
+
/* empty css */
|
|
21
|
+
function J() {
|
|
22
|
+
const { appName: s, logo: n } = C(), { theme: o, themeColor: m, TOGGLE_THEME: c, SET_THEME_COLOR: f } = T(p(["theme", "themeColor", "TOGGLE_THEME", "SET_THEME_COLOR"])), [a, i] = u(!1), d = (r) => {
|
|
22
23
|
const l = r.currentTarget.getBoundingClientRect(), h = l.left + l.width / 2, x = l.top + l.height / 2;
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
k(o === "light" ? "dark" : "light", h, x).then(() => {
|
|
25
|
+
c();
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
return /* @__PURE__ */ t("div", { className: "flex min-h-full flex-1 select-none overflow-x-hidden", children: [
|
|
@@ -43,13 +44,13 @@ function K() {
|
|
|
43
44
|
},
|
|
44
45
|
onMouseEnter: () => i(!0),
|
|
45
46
|
onMouseLeave: () => i(!1),
|
|
46
|
-
children:
|
|
47
|
+
children: E.map((r) => /* @__PURE__ */ e(
|
|
47
48
|
"div",
|
|
48
49
|
{
|
|
49
50
|
className: "w-5 h-5 rounded-full flex items-center justify-center cursor-pointer hover-scale-animation shrink-0",
|
|
50
51
|
style: { backgroundColor: r },
|
|
51
52
|
onClick: () => f(r),
|
|
52
|
-
children:
|
|
53
|
+
children: m === r && /* @__PURE__ */ e(g, { className: "size-[10px] text-white" })
|
|
53
54
|
},
|
|
54
55
|
r
|
|
55
56
|
))
|
|
@@ -62,10 +63,10 @@ function K() {
|
|
|
62
63
|
className: "w-8 h-8 flex items-center justify-center cursor-pointer hover-scale-animation",
|
|
63
64
|
onMouseEnter: () => i(!0),
|
|
64
65
|
onMouseLeave: () => i(!1),
|
|
65
|
-
children: /* @__PURE__ */ e(
|
|
66
|
+
children: /* @__PURE__ */ e(N, { className: "h-[16px] w-[16px] text-(--color-primary)" })
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
|
-
/* @__PURE__ */ e("div", { className: "w-8 h-8 flex items-center justify-center cursor-pointer hover-scale-animation", onClick: d, children: o === "dark" ? /* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e("div", { className: "w-8 h-8 flex items-center justify-center cursor-pointer hover-scale-animation", onClick: d, children: o === "dark" ? /* @__PURE__ */ e(b, { className: "h-[18px] w-[18px]" }) : /* @__PURE__ */ e(v, { className: "h-[18px] w-[18px]" }) })
|
|
69
70
|
] })
|
|
70
71
|
]
|
|
71
72
|
}
|
|
@@ -77,13 +78,13 @@ function K() {
|
|
|
77
78
|
/* @__PURE__ */ e("div", { className: "relative hidden w-0 flex-1 lg:block", children: /* @__PURE__ */ t("div", { className: "bg-background-deep absolute inset-0 h-full w-full dark:bg-[#070709]!", children: [
|
|
78
79
|
/* @__PURE__ */ e("div", { className: "login-background absolute left-0 top-0 size-full" }),
|
|
79
80
|
/* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center mr-20 h-full -enter-x", children: [
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
+
/* @__PURE__ */ e(w, { className: "animate-float h-64 w-2/5" }),
|
|
81
82
|
/* @__PURE__ */ e("div", { className: "text-1xl mt-6 font-sans lg:text-2xl text-[#333] dark:text-[#f2f2f2]", children: "企业级的大型中后台管理系统" }),
|
|
82
83
|
/* @__PURE__ */ e("div", { className: "mt-2 text-[#323639] dark:text-[#a1a1aa]", children: "高效、安全、易用的管理系统" })
|
|
83
84
|
] })
|
|
84
85
|
] }) }),
|
|
85
86
|
/* @__PURE__ */ t("div", { className: "login-side flex flex-col items-center justify-center relative px-6 py-10 lg:flex-initial lg:px-8 min-h-full w-2/5 flex-1 dark:bg-[#14161a]", children: [
|
|
86
|
-
/* @__PURE__ */ e(
|
|
87
|
+
/* @__PURE__ */ e(y, {}),
|
|
87
88
|
/* @__PURE__ */ e("div", { className: "text-[#71717a] absolute bottom-3 flex text-center text-xs", children: /* @__PURE__ */ t("div", { className: "text-md flex justify-center mt-4", children: [
|
|
88
89
|
"Copyright © 2024 ",
|
|
89
90
|
/* @__PURE__ */ e("a", { href: "https://dshuais.netlify.app/", className: "text-(--color-primary)! hover:text-(--hover-primary-color)! mx-1", target: "_blank", children: "DuShuai" })
|
|
@@ -92,5 +93,5 @@ function K() {
|
|
|
92
93
|
] });
|
|
93
94
|
}
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
J as default
|
|
96
97
|
};
|
|
@@ -1,63 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as f, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useSelector as y } from "@spacego/zustand";
|
|
3
3
|
import { Layout as g, Spin as Z } from "antd";
|
|
4
|
-
import { useMemo as d, useEffect as
|
|
5
|
-
import { useLocation as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import ue from "./components/
|
|
14
|
-
import { findRouteByPath as b, findMenuParentKeys as de, buildRouteMap as me, findParentRoutes as he, findMenuByKey as pe } from "./components/utils/index.js";
|
|
4
|
+
import { useMemo as d, useEffect as $ } from "react";
|
|
5
|
+
import { useLocation as ee, useNavigate as te, Outlet as oe } from "react-router-dom";
|
|
6
|
+
import { useAuth as ne } from "../../hooks/use-auth.hook.js";
|
|
7
|
+
import { useLayoutConfigStore as re } from "../../store/modules/layout-config.store.js";
|
|
8
|
+
import { useThemeStore as ae } from "../../store/modules/theme.store.js";
|
|
9
|
+
import { useGlobal as se } from "../context/context.js";
|
|
10
|
+
import ie from "./components/basics-layout/header.js";
|
|
11
|
+
import le from "./components/basics-layout/sidebar.js";
|
|
12
|
+
import ce from "./components/basics-layout/tabs.js";
|
|
13
|
+
import { findRouteByPath as b, findMenuParentKeys as ue, buildRouteMap as fe, findParentRoutes as de, findMenuByKey as me } from "./components/utils/index.js";
|
|
15
14
|
/* empty css */
|
|
16
15
|
/* empty css */
|
|
17
|
-
const { Content:
|
|
18
|
-
function
|
|
19
|
-
const r =
|
|
16
|
+
const { Content: he } = g;
|
|
17
|
+
function Se() {
|
|
18
|
+
const r = ee(), m = te(), { logout: R } = ne(), {
|
|
20
19
|
token: T,
|
|
21
|
-
menus:
|
|
20
|
+
menus: a = [],
|
|
22
21
|
routes: o = [],
|
|
23
|
-
appName:
|
|
24
|
-
logo:
|
|
22
|
+
appName: _,
|
|
23
|
+
logo: L,
|
|
25
24
|
headerActionsRender: v,
|
|
26
25
|
breadcrumbBeforeRender: M,
|
|
27
|
-
searchRender:
|
|
28
|
-
noticeRender:
|
|
29
|
-
isNotice:
|
|
30
|
-
userInfo:
|
|
31
|
-
userMenuItems:
|
|
26
|
+
searchRender: x,
|
|
27
|
+
noticeRender: B,
|
|
28
|
+
isNotice: S,
|
|
29
|
+
userInfo: K,
|
|
30
|
+
userMenuItems: k,
|
|
32
31
|
sidebarBefore: N,
|
|
33
32
|
sidebarAfter: D,
|
|
34
33
|
tabsBefore: I,
|
|
35
34
|
tabsAfter: w
|
|
36
|
-
} =
|
|
35
|
+
} = se(), { tabsAttribute: O, sidebarCollapsed: G, loadingConfig: P, ADD_TAB: V, REMOVE_TAB: j, SET_ACTIVE_TAB_KEY: E, SET_SIDEBAR_COLLAPSED: H } = re(y(["tabsAttribute", "sidebarCollapsed", "loadingConfig", "ADD_TAB", "REMOVE_TAB", "SET_ACTIVE_TAB_KEY", "SET_SIDEBAR_COLLAPSED"])), { tabsList: h, tabsActiveKey: i } = O, { theme: Y, TOGGLE_THEME: z } = ae(y(["theme", "TOGGLE_THEME"])), l = d(() => {
|
|
37
36
|
var t;
|
|
38
37
|
if (!o || o.length === 0)
|
|
39
38
|
return i;
|
|
40
39
|
const e = b(r.pathname, o);
|
|
41
40
|
return e && (((t = e.handle) == null ? void 0 : t.activeRouteMenuId) || e.id) || i;
|
|
42
|
-
}, [r.pathname, o, i]),
|
|
41
|
+
}, [r.pathname, o, i]), q = d(() => {
|
|
43
42
|
const e = [];
|
|
44
|
-
if (!
|
|
43
|
+
if (!a || a.length === 0 || !l)
|
|
45
44
|
return e;
|
|
46
|
-
const t =
|
|
45
|
+
const t = ue(l, a);
|
|
47
46
|
return t && e.push(...t), e;
|
|
48
|
-
}, [l,
|
|
47
|
+
}, [l, a]), F = d(() => {
|
|
49
48
|
const e = [];
|
|
50
49
|
if (!o || o.length === 0)
|
|
51
50
|
return r.pathname === "/" && e.push({ title: "首页" }), e;
|
|
52
|
-
const t = o, n =
|
|
53
|
-
return c ?
|
|
51
|
+
const t = o, n = fe(t), c = b(r.pathname, t);
|
|
52
|
+
return c ? de(c, n).forEach((u) => {
|
|
54
53
|
var C;
|
|
55
|
-
const A = ((C =
|
|
54
|
+
const A = ((C = u.handle) == null ? void 0 : C.title) || u.id || "";
|
|
56
55
|
A && e.push({ title: A });
|
|
57
56
|
}) : r.pathname === "/" && e.push({ title: "首页" }), e;
|
|
58
57
|
}, [r.pathname, o]), J = (e) => {
|
|
59
58
|
var n;
|
|
60
|
-
const t =
|
|
59
|
+
const t = me(e, a);
|
|
61
60
|
m(((n = t == null ? void 0 : t.routeNode) == null ? void 0 : n.path) ?? "/");
|
|
62
61
|
}, Q = (e) => {
|
|
63
62
|
E(e);
|
|
@@ -71,7 +70,7 @@ function Ne() {
|
|
|
71
70
|
const e = p == null ? void 0 : p(r.pathname);
|
|
72
71
|
if (e && e.id && !["root", "blank", "auth"].includes(e.id)) {
|
|
73
72
|
const n = e.id, c = ((t = e.handle) == null ? void 0 : t.title) || e.id;
|
|
74
|
-
h.find((
|
|
73
|
+
h.find((u) => u.key === n) ? E(n) : V({
|
|
75
74
|
key: n,
|
|
76
75
|
label: c,
|
|
77
76
|
path: r.pathname
|
|
@@ -80,42 +79,42 @@ function Ne() {
|
|
|
80
79
|
};
|
|
81
80
|
return $(() => {
|
|
82
81
|
T && W();
|
|
83
|
-
}, [r.pathname, T]), /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
82
|
+
}, [r.pathname, T]), /* @__PURE__ */ f(g, { className: "basics-layout w-full h-screen overflow-hidden flex flex-col", children: [
|
|
83
|
+
/* @__PURE__ */ s(
|
|
84
|
+
ie,
|
|
86
85
|
{
|
|
87
|
-
breadcrumbItems:
|
|
88
|
-
appName:
|
|
89
|
-
logo:
|
|
86
|
+
breadcrumbItems: F,
|
|
87
|
+
appName: _,
|
|
88
|
+
logo: L,
|
|
90
89
|
headerActionsRender: v,
|
|
91
90
|
breadcrumbBeforeRender: M,
|
|
92
|
-
searchRender:
|
|
93
|
-
noticeRender:
|
|
94
|
-
isNotice:
|
|
95
|
-
userInfo:
|
|
96
|
-
userMenuItems:
|
|
91
|
+
searchRender: x,
|
|
92
|
+
noticeRender: B,
|
|
93
|
+
isNotice: S,
|
|
94
|
+
userInfo: K,
|
|
95
|
+
userMenuItems: k,
|
|
97
96
|
theme: Y,
|
|
98
97
|
onToggleTheme: z,
|
|
99
98
|
onLogout: R
|
|
100
99
|
}
|
|
101
100
|
),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
101
|
+
/* @__PURE__ */ f(g, { className: "flex-1 overflow-hidden", children: [
|
|
102
|
+
/* @__PURE__ */ s(
|
|
103
|
+
le,
|
|
105
104
|
{
|
|
106
105
|
collapsed: G,
|
|
107
106
|
onCollapse: H,
|
|
108
|
-
menus:
|
|
107
|
+
menus: a,
|
|
109
108
|
activeKey: l,
|
|
110
|
-
openKeys:
|
|
109
|
+
openKeys: q,
|
|
111
110
|
onMenuClick: J,
|
|
112
111
|
beforeRender: N,
|
|
113
112
|
afterRender: D
|
|
114
113
|
}
|
|
115
114
|
),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
115
|
+
/* @__PURE__ */ f(he, { className: "flex flex-col flex-1 overflow-hidden bg-[#eff1f4] dark:bg-[#141619]", children: [
|
|
116
|
+
/* @__PURE__ */ s(
|
|
117
|
+
ce,
|
|
119
118
|
{
|
|
120
119
|
tabs: h,
|
|
121
120
|
activeKey: i,
|
|
@@ -125,14 +124,14 @@ function Ne() {
|
|
|
125
124
|
afterRender: w
|
|
126
125
|
}
|
|
127
126
|
),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
P.show && /* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ f("div", { className: "flex-1 overflow-auto p-3 custom-scrollbar relative", children: [
|
|
128
|
+
/* @__PURE__ */ s(oe, {}),
|
|
129
|
+
P.show && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-9999 flex items-center justify-center bg-white/80 dark:bg-[#1a1c1f]/80", children: /* @__PURE__ */ s(Z, { spinning: !0 }) })
|
|
131
130
|
] })
|
|
132
131
|
] })
|
|
133
132
|
] })
|
|
134
133
|
] });
|
|
135
134
|
}
|
|
136
135
|
export {
|
|
137
|
-
|
|
136
|
+
Se as default
|
|
138
137
|
};
|
|
@@ -1,55 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as H } from "react/jsx-runtime";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
|
-
import { GlobalContext as
|
|
4
|
-
function
|
|
5
|
-
const [
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
|
|
3
|
+
import { GlobalContext as L } from "./context.js";
|
|
4
|
+
function z(e) {
|
|
5
|
+
const [r, n] = t(e.appName), [s, o] = t(e.logo), [i, c] = t(e.noticeRender), [a, d] = t(e.description), [f, b] = t(e.descriptionDetail), [u, m] = t(e.copyright), [l, R] = t(e.userMenuItems), [h, A] = t(e.userInfo), [B, I] = t(e.sidebarBefore), [N, g] = t(e.sidebarAfter), [D, x] = t(e.tabsBefore), [S, v] = t(e.tabsAfter), [y, C] = t(e.headerActionsRender), [M, G] = t(e.searchRender), [P, T] = t(e.breadcrumbBeforeRender), [U, j] = t(e.isNotice ?? !0);
|
|
6
|
+
return /* @__PURE__ */ H(
|
|
7
|
+
L.Provider,
|
|
8
8
|
{
|
|
9
9
|
value: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
...e,
|
|
11
|
+
appName: r,
|
|
12
|
+
logo: s,
|
|
13
|
+
noticeRender: i,
|
|
13
14
|
description: a,
|
|
14
15
|
descriptionDetail: f,
|
|
15
|
-
copyright:
|
|
16
|
+
copyright: u,
|
|
16
17
|
userMenuItems: l,
|
|
17
18
|
userInfo: h,
|
|
18
19
|
sidebarBefore: B,
|
|
19
20
|
sidebarAfter: N,
|
|
20
21
|
tabsBefore: D,
|
|
21
|
-
tabsAfter:
|
|
22
|
-
headerActionsRender:
|
|
23
|
-
searchRender:
|
|
24
|
-
breadcrumbBeforeRender:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
routes: L,
|
|
28
|
-
isNotice: w,
|
|
29
|
-
setAppName: s,
|
|
22
|
+
tabsAfter: S,
|
|
23
|
+
headerActionsRender: y,
|
|
24
|
+
searchRender: M,
|
|
25
|
+
breadcrumbBeforeRender: P,
|
|
26
|
+
isNotice: U,
|
|
27
|
+
setAppName: n,
|
|
30
28
|
setLogo: o,
|
|
31
|
-
setNoticeRender:
|
|
29
|
+
setNoticeRender: c,
|
|
32
30
|
setDescription: d,
|
|
33
|
-
setDescriptionDetail:
|
|
31
|
+
setDescriptionDetail: b,
|
|
34
32
|
setCopyright: m,
|
|
35
33
|
setUserMenuItems: R,
|
|
36
34
|
setUserInfo: A,
|
|
37
35
|
setSidebarBefore: I,
|
|
38
36
|
setSidebarAfter: g,
|
|
39
37
|
setTabsBefore: x,
|
|
40
|
-
setTabsAfter:
|
|
41
|
-
setHeaderActionsRender:
|
|
42
|
-
setSearchRender:
|
|
43
|
-
setBreadcrumbBeforeRender:
|
|
44
|
-
|
|
45
|
-
setMenus: H,
|
|
46
|
-
setRoutes: q,
|
|
47
|
-
setIsNotice: z
|
|
38
|
+
setTabsAfter: v,
|
|
39
|
+
setHeaderActionsRender: C,
|
|
40
|
+
setSearchRender: G,
|
|
41
|
+
setBreadcrumbBeforeRender: T,
|
|
42
|
+
setIsNotice: j
|
|
48
43
|
},
|
|
49
44
|
children: e.children
|
|
50
45
|
}
|
|
51
46
|
);
|
|
52
47
|
}
|
|
53
48
|
export {
|
|
54
|
-
|
|
49
|
+
z as default
|
|
55
50
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { useSubmit as i, useFetcher as
|
|
1
|
+
import { useSubmit as i, useFetcher as c, useSearchParams as n } from "react-router-dom";
|
|
2
2
|
import { useLayoutConfigStore as a } from "../store/modules/layout-config.store.js";
|
|
3
3
|
import "../store/modules/theme.store.js";
|
|
4
4
|
import { useGlobal as l } from "../fe-layouts/context/context.js";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "react";
|
|
7
|
-
function
|
|
8
|
-
const
|
|
7
|
+
function E() {
|
|
8
|
+
const o = i(), e = c(), [r] = n(), { setToken: t } = l();
|
|
9
9
|
return {
|
|
10
10
|
login: (s, u) => {
|
|
11
|
-
const m = u ||
|
|
12
|
-
|
|
11
|
+
const m = u || r.get("from") || "/";
|
|
12
|
+
o({ token: s, redirectTo: m }, { method: "post", replace: !0 });
|
|
13
13
|
},
|
|
14
14
|
logout: () => {
|
|
15
|
-
|
|
15
|
+
t == null || t(void 0), e.submit(null, { action: "/logout", method: "post" }), setTimeout(() => {
|
|
16
16
|
a.getState().RESET();
|
|
17
17
|
}, 300);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
E as useAuth
|
|
23
23
|
};
|
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.loading-spin{background-color:#ffffff40;position:fixed;top:0;left:0}.loading-spin .spin-animation path{animation:custom 2s linear infinite}@keyframes custom{0%{opacity:0}25%{opacity:.1}50%{opacity:.2}75%{opacity:.5}to{opacity:1}}.loading-spin .spin-animation path:nth-child(1){animation-delay:0s}.loading-spin .spin-animation path:nth-child(2){animation-delay:.5s}.loading-spin .spin-animation path:nth-child(3){animation-delay:1s}.loading-spin .spin-animation path:nth-child(4){animation-delay:2s}.bg-background-deep{background-color:#f1f3f6}.bg-background-deep .login-background{background:linear-gradient(154deg,#07070915 30%,color-mix(in srgb,var(--color-primary) 30%,transparent) 48%,#07070915 64%);filter:blur(100px)}.bg-background-deep .-enter-x{animation:enter-x-animation .3s ease-in-out .2s forwards;opacity:0;transform:translate(-50px)}.bg-background-deep .animate-float{animation:float 5s linear 0s infinite}.login-side .side-content{animation-name:slide-right;animation-duration:.3s;animation-timing-function:cubic-bezier(.16,1,.3,1)}.login-side .side-content.exit-x{animation-name:exit-x-animation;animation-duration:.5s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-fill-mode:forwards}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-3{right:calc(var(--spacing)*3)}.right-\[-7px\]{right:-7px}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-0{left:calc(var(--spacing)*0)}.left-\[-7px\]{left:-7px}.z-1{z-index:1}.z-10{z-index:10}.z-9999{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\!{margin-inline:calc(var(--spacing)*1)!important}.mx-9{margin-inline:calc(var(--spacing)*9)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-20{margin-right:calc(var(--spacing)*20)}.mr-\[-10px\]{margin-right:-10px}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-\[2px\]{margin-bottom:2px}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.aspect-\[2\]{aspect-ratio:2}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-\[10px\]{width:10px;height:10px}.size-full{width:100%;height:100%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-64{height:calc(var(--spacing)*64)}.h-\[16px\]{height:16px}.h-\[18px\]{height:18px}.h-\[38px\]{height:38px}.h-\[46px\]{height:46px}.h-\[50px\]{height:50px}.h-full{height:100%}.h-screen{height:100vh}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-\[16px\]{width:16px}.w-\[18px\]{width:18px}.w-full{width:100%}.min-w-\[204px\]{min-width:204px}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-right{transform-origin:100%}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-tl-\[8px\]{border-top-left-radius:8px}.rounded-tr-\[8px\]{border-top-right-radius:8px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-\(--border-color\){border-color:var(--border-color)}.border-\(--color-primary\){border-color:var(--color-primary)}.border-transparent{border-color:#0000}.bg-\(--background-primary-light\)\!{background-color:var(--background-primary-light)!important}.bg-\(--global-background-color\){background-color:var(--global-background-color)}.bg-\(--global-background-color\)\!{background-color:var(--global-background-color)!important}.bg-\[\#eff1f4\]{background-color:#eff1f4}.bg-\[\#f4f4f5\]{background-color:#f4f4f5}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.fill-transparent{fill:#0000}.p-0\!{padding:calc(var(--spacing)*0)!important}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-\[16px\]{padding-inline:16px}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-1{padding-top:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-sm\!{font-size:var(--text-sm)!important;line-height:var(--tw-leading,var(--text-sm--line-height))!important}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-\(--color-primary\){color:var(--color-primary)}.text-\(--color-primary\)\!{color:var(--color-primary)!important}.text-\(--icon-text-color\){color:var(--icon-text-color)}.text-\(--text-color\){color:var(--text-color)}.text-\[\#2d2f32\]{color:#2d2f32}.text-\[\#333\]{color:#333}.text-\[\#18181bcc\]{color:#18181bcc}.text-\[\#71717a\]{color:#71717a}.text-\[\#323639\]{color:#323639}.text-\[\#323639cc\]{color:#323639cc}.text-\[\#333333\]{color:#333}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.outline-\(--color-primary\){outline-color:var(--color-primary)}.outline-\[\#e4e4e7\]{outline-color:#e4e4e7}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-\[\.is-active\]\:fill-\(--background-primary-light\):is(:where(.group).is-active *){fill:var(--background-primary-light)}@media(hover:hover){.hover\:bg-\(--hover-background-color\):hover{background-color:var(--hover-background-color)}.hover\:bg-\[\#dfe3e4\]:hover{background-color:#dfe3e4}.hover\:bg-\[\#f4f4f5\]:hover{background-color:#f4f4f5}.hover\:text-\(--hover-primary-color\)\!:hover{color:var(--hover-primary-color)!important}.hover\:text-\[\#18181b\]:hover{color:#18181b}.hover\:text-\[\#323639\]:hover{color:#323639}.hover\:text-black:hover{color:var(--color-black)}}@media(min-width:40rem){.sm\:top-6{top:calc(var(--spacing)*6)}.sm\:left-6{left:calc(var(--spacing)*6)}}@media(min-width:48rem){.md\:flex{display:flex}}@media(min-width:64rem){.lg\:block{display:block}.lg\:flex{display:flex}.lg\:flex-initial{flex:0 auto}.lg\:px-8{padding-inline:calc(var(--spacing)*8)}.lg\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.dark\:bg-\[\#1a1c1f\]\!:where(.dark,.dark *){background-color:#1a1c1f!important}.dark\:bg-\[\#1a1c1f\]\/80:where(.dark,.dark *){background-color:#1a1c1fcc}.dark\:bg-\[\#2e3033\]:where(.dark,.dark *){background-color:#2e3033}.dark\:bg-\[\#292a2d\]:where(.dark,.dark *){background-color:#292a2d}.dark\:bg-\[\#14161a\]:where(.dark,.dark *){background-color:#14161a}.dark\:bg-\[\#070709\]\!:where(.dark,.dark *){background-color:#070709!important}.dark\:bg-\[\#141619\]:where(.dark,.dark *){background-color:#141619}.dark\:text-\[\#a1a1a2\]:where(.dark,.dark *){color:#a1a1a2}.dark\:text-\[\#a1a1aa\]:where(.dark,.dark *){color:#a1a1aa}.dark\:text-\[\#cfd0d0\]:where(.dark,.dark *){color:#cfd0d0}.dark\:text-\[\#f0f0f0\]:where(.dark,.dark *){color:#f0f0f0}.dark\:text-\[\#f2f2f2\]:where(.dark,.dark *){color:#f2f2f2}.dark\:text-\[\#f9f9f9\]\!:where(.dark,.dark *){color:#f9f9f9!important}.dark\:outline-\[\#36363a\]:where(.dark,.dark *){outline-color:#36363a}@media(hover:hover){.dark\:hover\:bg-\[\#292a2d\]:where(.dark,.dark *):hover{background-color:#292a2d}.dark\:hover\:bg-\[\#333538\]:where(.dark,.dark *):hover{background-color:#333538}.dark\:hover\:bg-transparent:where(.dark,.dark *):hover{background-color:#0000}.dark\:hover\:text-\[\#f0f0f0\]:where(.dark,.dark *):hover{color:#f0f0f0}.dark\:hover\:text-white:where(.dark,.dark *):hover{color:var(--color-white)}}}@keyframes enter-x-animation{to{opacity:1;transform:translate(0)}}@keyframes float{0%{transform:translateY(0)}50%{transform:translateY(-20px)}to{transform:translateY(0)}}@keyframes slide-right{0%{opacity:0;transform:translate(50px)}to{opacity:1;transform:translate(0)}}@keyframes exit-x-animation{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(50px)}}@keyframes scale-pulse{0%{transform:scale(1)}50%{transform:scale(.9)}to{transform:scale(1)}}.hover-scale-animation:hover{animation:.3s cubic-bezier(.4,0,.2,1) scale-pulse}:root{--color-primary:#006be6;--global-background-color:white;--border-color:#e4e4e7;--text-color:#323639}[data-theme=dark]{--global-background-color:#1a1c1f;--border-color:#36363a;--text-color:#f2f2f2}html{background-color:var(--global-background-color);--hover-primary-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){html{--hover-primary-color:color-mix(in srgb,var(--color-primary)80%,transparent)}}#root,body,html{width:100%;height:100%}body{min-height:100vh}.spin-wrapper-full,.spin-wrapper-full .ant-spin-container{width:100%;height:100%}.spin-wrapper-full .ant-spin{max-height:100%!important}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}.basics-layout{--sidebar-width: 220px;--header-height: 64px;--tabs-height: 44px;--background-primary-light: color-mix(in srgb, var(--color-primary) 10%, transparent);--hover-background-color: #f4f4f5;--icon-text-color: #323639}[data-theme=dark] .basics-layout{--hover-background-color: #2e3033;--icon-text-color: #dddddd;--background-primary-light: #292a2d}.basics-layout .layout-header{flex-shrink:0}.basics-layout .layout-header .basics-breadcrumb .ant-breadcrumb-separator{display:flex;align-items:center;margin-inline:6px}.basics-layout .layout-sidebar{z-index:20;flex-shrink:0}.basics-layout .layout-sidebar .sidebar-menu{background:var(--global-background-color);border:none}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item{margin:4px 8px;width:calc(100% - 16px);border-radius:8px;transition:all .3s cubic-bezier(.4,0,.2,1);padding-inline:30%}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item:hover{background:var(--hover-background-color)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item:hover .ant-menu-item-icon{transition:transform .3s cubic-bezier(.4,0,.2,1);transform:scale(1.18)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item.ant-menu-item-selected{background-color:var(--background-primary-light);color:var(--color-primary)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item .ant-menu-title-content{margin-inline-start:8px}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-submenu-title{margin:4px 8px;width:calc(100% - 16px);border-radius:8px;padding-inline:30%}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-submenu-title:hover{background-color:var(--hover-background-color)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-submenu-title:hover .ant-menu-item-icon{transition:transform .3s cubic-bezier(.4,0,.2,1);transform:scale(1.18)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-sub{background:transparent}.basics-layout .custom-scrollbar::-webkit-scrollbar{width:8px;height:8px}.basics-layout .custom-scrollbar::-webkit-scrollbar-track{background:transparent}.basics-layout .custom-scrollbar::-webkit-scrollbar-thumb{background:#0000004d;border-radius:4px}.basics-layout .custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#00000080}.basics-layout .layout-tabs{position:relative;scrollbar-width:thin}
|
|
1
|
+
.bg-background-deep{background-color:#f1f3f6}.bg-background-deep .login-background{background:linear-gradient(154deg,#07070915 30%,color-mix(in srgb,var(--color-primary) 30%,transparent) 48%,#07070915 64%);filter:blur(100px)}.bg-background-deep .-enter-x{animation:enter-x-animation .3s ease-in-out .2s forwards;opacity:0;transform:translate(-50px)}.bg-background-deep .animate-float{animation:float 5s linear 0s infinite}.login-side .side-content{animation-name:slide-right;animation-duration:.3s;animation-timing-function:cubic-bezier(.16,1,.3,1)}.login-side .side-content.exit-x{animation-name:exit-x-animation;animation-duration:.5s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-fill-mode:forwards}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-3{right:calc(var(--spacing)*3)}.right-\[-7px\]{right:-7px}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-0{left:calc(var(--spacing)*0)}.left-\[-7px\]{left:-7px}.z-1{z-index:1}.z-10{z-index:10}.z-9999{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\!{margin-inline:calc(var(--spacing)*1)!important}.mx-9{margin-inline:calc(var(--spacing)*9)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-20{margin-right:calc(var(--spacing)*20)}.mr-\[-10px\]{margin-right:-10px}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-\[2px\]{margin-bottom:2px}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.aspect-\[2\]{aspect-ratio:2}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-\[10px\]{width:10px;height:10px}.size-full{width:100%;height:100%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-64{height:calc(var(--spacing)*64)}.h-\[16px\]{height:16px}.h-\[18px\]{height:18px}.h-\[38px\]{height:38px}.h-\[46px\]{height:46px}.h-\[50px\]{height:50px}.h-full{height:100%}.h-screen{height:100vh}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-\[16px\]{width:16px}.w-\[18px\]{width:18px}.w-full{width:100%}.min-w-\[204px\]{min-width:204px}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-right{transform-origin:100%}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-tl-\[8px\]{border-top-left-radius:8px}.rounded-tr-\[8px\]{border-top-right-radius:8px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-\(--border-color\){border-color:var(--border-color)}.border-\(--color-primary\){border-color:var(--color-primary)}.border-transparent{border-color:#0000}.bg-\(--background-primary-light\)\!{background-color:var(--background-primary-light)!important}.bg-\(--global-background-color\){background-color:var(--global-background-color)}.bg-\(--global-background-color\)\!{background-color:var(--global-background-color)!important}.bg-\[\#eff1f4\]{background-color:#eff1f4}.bg-\[\#f4f4f5\]{background-color:#f4f4f5}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.fill-transparent{fill:#0000}.p-0\!{padding:calc(var(--spacing)*0)!important}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-\[16px\]{padding-inline:16px}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-1{padding-top:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-sm\!{font-size:var(--text-sm)!important;line-height:var(--tw-leading,var(--text-sm--line-height))!important}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-\(--color-primary\){color:var(--color-primary)}.text-\(--color-primary\)\!{color:var(--color-primary)!important}.text-\(--icon-text-color\){color:var(--icon-text-color)}.text-\(--text-color\){color:var(--text-color)}.text-\[\#2d2f32\]{color:#2d2f32}.text-\[\#333\]{color:#333}.text-\[\#18181bcc\]{color:#18181bcc}.text-\[\#71717a\]{color:#71717a}.text-\[\#323639\]{color:#323639}.text-\[\#323639cc\]{color:#323639cc}.text-\[\#333333\]{color:#333}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.outline-\(--color-primary\){outline-color:var(--color-primary)}.outline-\[\#e4e4e7\]{outline-color:#e4e4e7}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-\[\.is-active\]\:fill-\(--background-primary-light\):is(:where(.group).is-active *){fill:var(--background-primary-light)}@media(hover:hover){.hover\:bg-\(--hover-background-color\):hover{background-color:var(--hover-background-color)}.hover\:bg-\[\#dfe3e4\]:hover{background-color:#dfe3e4}.hover\:bg-\[\#f4f4f5\]:hover{background-color:#f4f4f5}.hover\:text-\(--hover-primary-color\)\!:hover{color:var(--hover-primary-color)!important}.hover\:text-\[\#18181b\]:hover{color:#18181b}.hover\:text-\[\#323639\]:hover{color:#323639}.hover\:text-black:hover{color:var(--color-black)}}@media(min-width:40rem){.sm\:top-6{top:calc(var(--spacing)*6)}.sm\:left-6{left:calc(var(--spacing)*6)}}@media(min-width:48rem){.md\:flex{display:flex}}@media(min-width:64rem){.lg\:block{display:block}.lg\:flex{display:flex}.lg\:flex-initial{flex:0 auto}.lg\:px-8{padding-inline:calc(var(--spacing)*8)}.lg\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.dark\:bg-\[\#1a1c1f\]\!:where(.dark,.dark *){background-color:#1a1c1f!important}.dark\:bg-\[\#1a1c1f\]\/80:where(.dark,.dark *){background-color:#1a1c1fcc}.dark\:bg-\[\#2e3033\]:where(.dark,.dark *){background-color:#2e3033}.dark\:bg-\[\#292a2d\]:where(.dark,.dark *){background-color:#292a2d}.dark\:bg-\[\#14161a\]:where(.dark,.dark *){background-color:#14161a}.dark\:bg-\[\#070709\]\!:where(.dark,.dark *){background-color:#070709!important}.dark\:bg-\[\#141619\]:where(.dark,.dark *){background-color:#141619}.dark\:text-\[\#a1a1a2\]:where(.dark,.dark *){color:#a1a1a2}.dark\:text-\[\#a1a1aa\]:where(.dark,.dark *){color:#a1a1aa}.dark\:text-\[\#cfd0d0\]:where(.dark,.dark *){color:#cfd0d0}.dark\:text-\[\#f0f0f0\]:where(.dark,.dark *){color:#f0f0f0}.dark\:text-\[\#f2f2f2\]:where(.dark,.dark *){color:#f2f2f2}.dark\:text-\[\#f9f9f9\]\!:where(.dark,.dark *){color:#f9f9f9!important}.dark\:outline-\[\#36363a\]:where(.dark,.dark *){outline-color:#36363a}@media(hover:hover){.dark\:hover\:bg-\[\#292a2d\]:where(.dark,.dark *):hover{background-color:#292a2d}.dark\:hover\:bg-\[\#333538\]:where(.dark,.dark *):hover{background-color:#333538}.dark\:hover\:bg-transparent:where(.dark,.dark *):hover{background-color:#0000}.dark\:hover\:text-\[\#f0f0f0\]:where(.dark,.dark *):hover{color:#f0f0f0}.dark\:hover\:text-white:where(.dark,.dark *):hover{color:var(--color-white)}}}@keyframes enter-x-animation{to{opacity:1;transform:translate(0)}}@keyframes float{0%{transform:translateY(0)}50%{transform:translateY(-20px)}to{transform:translateY(0)}}@keyframes slide-right{0%{opacity:0;transform:translate(50px)}to{opacity:1;transform:translate(0)}}@keyframes exit-x-animation{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(50px)}}@keyframes scale-pulse{0%{transform:scale(1)}50%{transform:scale(.9)}to{transform:scale(1)}}.hover-scale-animation:hover{animation:.3s cubic-bezier(.4,0,.2,1) scale-pulse}:root{--color-primary:#006be6;--global-background-color:white;--border-color:#e4e4e7;--text-color:#323639}[data-theme=dark]{--global-background-color:#1a1c1f;--border-color:#36363a;--text-color:#f2f2f2}html{background-color:var(--global-background-color);--hover-primary-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){html{--hover-primary-color:color-mix(in srgb,var(--color-primary)80%,transparent)}}#root,body,html{width:100%;height:100%}body{min-height:100vh}.spin-wrapper-full,.spin-wrapper-full .ant-spin-container{width:100%;height:100%}.spin-wrapper-full .ant-spin{max-height:100%!important}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}.basics-layout{--sidebar-width: 220px;--header-height: 64px;--tabs-height: 44px;--background-primary-light: color-mix(in srgb, var(--color-primary) 10%, transparent);--hover-background-color: #f4f4f5;--icon-text-color: #323639}[data-theme=dark] .basics-layout{--hover-background-color: #2e3033;--icon-text-color: #dddddd;--background-primary-light: #292a2d}.basics-layout .layout-header{flex-shrink:0}.basics-layout .layout-header .basics-breadcrumb .ant-breadcrumb-separator{display:flex;align-items:center;margin-inline:6px}.basics-layout .layout-sidebar{z-index:20;flex-shrink:0}.basics-layout .layout-sidebar .sidebar-menu{background:var(--global-background-color);border:none}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item{margin:4px 8px;width:calc(100% - 16px);border-radius:8px;transition:all .3s cubic-bezier(.4,0,.2,1);padding-inline:30%}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item:hover{background:var(--hover-background-color)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item:hover .ant-menu-item-icon{transition:transform .3s cubic-bezier(.4,0,.2,1);transform:scale(1.18)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item.ant-menu-item-selected{background-color:var(--background-primary-light);color:var(--color-primary)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-item .ant-menu-title-content{margin-inline-start:8px}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-submenu-title{margin:4px 8px;width:calc(100% - 16px);border-radius:8px;padding-inline:30%}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-submenu-title:hover{background-color:var(--hover-background-color)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-submenu-title:hover .ant-menu-item-icon{transition:transform .3s cubic-bezier(.4,0,.2,1);transform:scale(1.18)}.basics-layout .layout-sidebar .sidebar-menu .ant-menu-sub{background:transparent}.basics-layout .custom-scrollbar::-webkit-scrollbar{width:8px;height:8px}.basics-layout .custom-scrollbar::-webkit-scrollbar-track{background:transparent}.basics-layout .custom-scrollbar::-webkit-scrollbar-thumb{background:#0000004d;border-radius:4px}.basics-layout .custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#00000080}.basics-layout .layout-tabs{position:relative;scrollbar-width:thin}.loading-spin{background-color:#ffffff40;position:fixed;top:0;left:0}.loading-spin .spin-animation path{animation:custom 2s linear infinite}@keyframes custom{0%{opacity:0}25%{opacity:.1}50%{opacity:.2}75%{opacity:.5}to{opacity:1}}.loading-spin .spin-animation path:nth-child(1){animation-delay:0s}.loading-spin .spin-animation path:nth-child(2){animation-delay:.5s}.loading-spin .spin-animation path:nth-child(3){animation-delay:1s}.loading-spin .spin-animation path:nth-child(4){animation-delay:2s}
|
package/lib/index.js
CHANGED
|
@@ -1,52 +1,46 @@
|
|
|
1
1
|
import { getIcon as t, renderIcon as r } from "./utils/icon.js";
|
|
2
|
-
import { applyTheme as m, applyThemeColor as p, applyThemeWithTransition as f, getRealTheme as l, getTheme as
|
|
3
|
-
import { useLayoutConfigStore as
|
|
2
|
+
import { applyTheme as m, applyThemeColor as p, applyThemeWithTransition as f, getRealTheme as l, getTheme as u, initTheme as s, listenSystemTheme as x, toggleTheme as n } from "./utils/theme.js";
|
|
3
|
+
import { useLayoutConfigStore as T } from "./store/modules/layout-config.store.js";
|
|
4
4
|
import { useThemeStore as y } from "./store/modules/theme.store.js";
|
|
5
|
-
import {
|
|
6
|
-
import { THEME_COLORS as
|
|
7
|
-
import {
|
|
8
|
-
import { useAuth as
|
|
5
|
+
import { NOOP as g, STORE_KEY as L } from "./config/constants.js";
|
|
6
|
+
import { THEME_COLORS as c } from "./config/theme.js";
|
|
7
|
+
import { generateRouter as R } from "./router/index.js";
|
|
8
|
+
import { useAuth as E } from "./hooks/use-auth.hook.js";
|
|
9
9
|
import { default as G } from "./fe-layouts/auth-layout/index.js";
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { GlobalContext as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
10
|
+
import { default as A } from "./fe-layouts/basics-layout/index.js";
|
|
11
|
+
import { default as F } from "./fe-layouts/blank-layout/index.js";
|
|
12
|
+
import { GlobalContext as _, useGlobal as k } from "./fe-layouts/context/context.js";
|
|
13
|
+
import { default as z } from "./fe-layouts/context/global-context.provider.js";
|
|
14
|
+
import { default as K } from "./fe-layouts/layout.js";
|
|
15
15
|
import { default as N } from "./fe-loading/index.js";
|
|
16
|
-
import {
|
|
17
|
-
import { createLazyComponent as w, getPath as J, processRoutes as Q } from "./router/utils.js";
|
|
18
|
-
import { createPermissionHelpers as V } from "./router/permission.js";
|
|
16
|
+
import { createLazyComponent as Y, getPath as j, processRoutes as q } from "./router/utils.js";
|
|
19
17
|
export {
|
|
20
|
-
g as APP_KEY,
|
|
21
18
|
G as AuthLayout,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
A as BasicsLayout,
|
|
20
|
+
F as BlankLayout,
|
|
21
|
+
K as FeLayout,
|
|
25
22
|
N as FeLoading,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
_ as GlobalContext,
|
|
24
|
+
z as GlobalContextProvider,
|
|
25
|
+
g as NOOP,
|
|
29
26
|
L as STORE_KEY,
|
|
30
|
-
|
|
27
|
+
c as THEME_COLORS,
|
|
31
28
|
m as applyTheme,
|
|
32
29
|
p as applyThemeColor,
|
|
33
30
|
f as applyThemeWithTransition,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
V as createPermissionHelpers,
|
|
37
|
-
E as createRouter,
|
|
38
|
-
O as generateRouter,
|
|
31
|
+
Y as createLazyComponent,
|
|
32
|
+
R as generateRouter,
|
|
39
33
|
t as getIcon,
|
|
40
|
-
|
|
34
|
+
j as getPath,
|
|
41
35
|
l as getRealTheme,
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
u as getTheme,
|
|
37
|
+
s as initTheme,
|
|
44
38
|
x as listenSystemTheme,
|
|
45
|
-
|
|
39
|
+
q as processRoutes,
|
|
46
40
|
r as renderIcon,
|
|
47
41
|
n as toggleTheme,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
E as useAuth,
|
|
43
|
+
k as useGlobal,
|
|
44
|
+
T as useLayoutConfigStore,
|
|
51
45
|
y as useThemeStore
|
|
52
46
|
};
|
package/lib/router/index.js
CHANGED
|
@@ -1,52 +1,8 @@
|
|
|
1
|
-
import { createBrowserRouter as
|
|
2
|
-
import { createPermissionHelpers as c } from "./permission.js";
|
|
3
|
-
import { createDefaultRoutes as u } from "./routes.js";
|
|
1
|
+
import { createBrowserRouter as e } from "react-router-dom";
|
|
4
2
|
import "react";
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
/** 最终合并后的路由配置 */
|
|
9
|
-
routes: m(i, o),
|
|
10
|
-
/** 权限帮助函数,包含 ProtectedLoader 等,用于外部调用 processRoutes */
|
|
11
|
-
permissionHelpers: r
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function m(s, n) {
|
|
15
|
-
const e = /* @__PURE__ */ new Map();
|
|
16
|
-
return s.forEach((t) => {
|
|
17
|
-
if (t.id)
|
|
18
|
-
e.set(t.id, t);
|
|
19
|
-
else {
|
|
20
|
-
const o = t.path || `route-${Math.random().toString(36).substring(2, 9)}`;
|
|
21
|
-
e.set(o, t);
|
|
22
|
-
}
|
|
23
|
-
}), n.forEach((t) => {
|
|
24
|
-
if (t.id)
|
|
25
|
-
if (t.id === "root" && e.has("root")) {
|
|
26
|
-
const o = e.get("root"), r = t, i = [
|
|
27
|
-
...o.children || [],
|
|
28
|
-
...r.children || []
|
|
29
|
-
];
|
|
30
|
-
e.set("root", {
|
|
31
|
-
...o,
|
|
32
|
-
...r,
|
|
33
|
-
// 属性以 customRoot 为准
|
|
34
|
-
children: i
|
|
35
|
-
});
|
|
36
|
-
} else
|
|
37
|
-
e.set(t.id, t);
|
|
38
|
-
else {
|
|
39
|
-
const o = `custom-${t.path || Math.random().toString(36).substring(2, 9)}`;
|
|
40
|
-
e.set(o, t);
|
|
41
|
-
}
|
|
42
|
-
}), Array.from(e.values());
|
|
43
|
-
}
|
|
44
|
-
function g(s) {
|
|
45
|
-
return a(s);
|
|
3
|
+
function n(r) {
|
|
4
|
+
return e(r);
|
|
46
5
|
}
|
|
47
6
|
export {
|
|
48
|
-
|
|
49
|
-
c as createPermissionHelpers,
|
|
50
|
-
R as createRouter,
|
|
51
|
-
g as generateRouter
|
|
7
|
+
n as generateRouter
|
|
52
8
|
};
|
|
@@ -5,7 +5,6 @@ import "@ant-design/icons";
|
|
|
5
5
|
import "./theme.store.js";
|
|
6
6
|
import { STORE_KEY as E } from "../../config/constants.js";
|
|
7
7
|
import "react-router-dom";
|
|
8
|
-
import "antd";
|
|
9
8
|
import "react";
|
|
10
9
|
import "../../fe-layouts/context/context.js";
|
|
11
10
|
import "@spacego/zustand";
|
|
@@ -13,10 +12,11 @@ import "react-icons/fa6";
|
|
|
13
12
|
import "react-icons/io5";
|
|
14
13
|
import "react-icons/lu";
|
|
15
14
|
import "react-icons/md";
|
|
16
|
-
import "@spacego/turbo-utils";
|
|
17
|
-
/* empty css */
|
|
18
15
|
/* empty css */
|
|
19
16
|
import "../../fe-layouts/basics-layout/index.js";
|
|
17
|
+
import "antd";
|
|
18
|
+
import "@spacego/turbo-utils";
|
|
19
|
+
/* empty css */
|
|
20
20
|
const A = () => ({
|
|
21
21
|
tabsAttribute: {
|
|
22
22
|
tabsList: [{
|
|
@@ -6,7 +6,6 @@ import { applyThemeColor as n, applyTheme as m } from "../../utils/theme.js";
|
|
|
6
6
|
import "./layout-config.store.js";
|
|
7
7
|
import { STORE_KEY as i } from "../../config/constants.js";
|
|
8
8
|
import "react-router-dom";
|
|
9
|
-
import "antd";
|
|
10
9
|
import "react";
|
|
11
10
|
import "../../fe-layouts/context/context.js";
|
|
12
11
|
import "@spacego/zustand";
|
|
@@ -14,10 +13,11 @@ import "react-icons/fa6";
|
|
|
14
13
|
import "react-icons/io5";
|
|
15
14
|
import "react-icons/lu";
|
|
16
15
|
import "react-icons/md";
|
|
17
|
-
import "@spacego/turbo-utils";
|
|
18
|
-
/* empty css */
|
|
19
16
|
/* empty css */
|
|
20
17
|
import "../../fe-layouts/basics-layout/index.js";
|
|
18
|
+
import "antd";
|
|
19
|
+
import "@spacego/turbo-utils";
|
|
20
|
+
/* empty css */
|
|
21
21
|
const p = () => ({
|
|
22
22
|
theme: "light",
|
|
23
23
|
themeColor: "#006BE6",
|
|
@@ -74,6 +74,10 @@ export interface IGlobalContextProps {
|
|
|
74
74
|
* @name 登录凭证
|
|
75
75
|
*/
|
|
76
76
|
token?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @name 设置登录凭证
|
|
79
|
+
*/
|
|
80
|
+
setToken?: (token?: string) => void;
|
|
77
81
|
/**
|
|
78
82
|
* @name 菜单列表
|
|
79
83
|
*/
|
|
@@ -225,15 +229,7 @@ export interface IGlobalContext {
|
|
|
225
229
|
/**
|
|
226
230
|
* @name 设置登录凭证
|
|
227
231
|
*/
|
|
228
|
-
setToken
|
|
229
|
-
/**
|
|
230
|
-
* @name 设置菜单列表
|
|
231
|
-
*/
|
|
232
|
-
setMenus: (menus?: MenuItem[]) => void;
|
|
233
|
-
/**
|
|
234
|
-
* @name 设置路由配置
|
|
235
|
-
*/
|
|
236
|
-
setRoutes: (routes?: RouteObject[]) => void;
|
|
232
|
+
setToken?: (token?: string) => void;
|
|
237
233
|
/**
|
|
238
234
|
* @name 是否显示通知按钮
|
|
239
235
|
* @default true
|
|
@@ -242,5 +238,5 @@ export interface IGlobalContext {
|
|
|
242
238
|
/**
|
|
243
239
|
* @name 设置是否显示通知按钮
|
|
244
240
|
*/
|
|
245
|
-
setIsNotice
|
|
241
|
+
setIsNotice?: (isNotice?: boolean) => void;
|
|
246
242
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -11,3 +11,6 @@ export * from './hooks';
|
|
|
11
11
|
/**------------------------------------------- components ------------------------------------------- */
|
|
12
12
|
export * from './fe-layouts';
|
|
13
13
|
export { default as FeLoading } from './fe-loading';
|
|
14
|
+
/**------------------------------------------- typings ------------------------------------------- */
|
|
15
|
+
export * from './typings/index.d';
|
|
16
|
+
export { type IRecord, type IResponse } from './typings/shims-axios.d';
|
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
1
|
import { RouteObject } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
import { TModule } from './utils';
|
|
5
|
-
export interface CreateRouterOptions {
|
|
6
|
-
/** 页面模块集合 import.meta.glob的结果 */
|
|
7
|
-
modules: TModule;
|
|
8
|
-
/** token 操作方法 */
|
|
9
|
-
token: TokenHelpers;
|
|
10
|
-
/** 基础布局组件 */
|
|
11
|
-
BaseLayout: ComponentType<any>;
|
|
12
|
-
/** 外部传入的路由配置(第一层,RouteObject结构) */
|
|
13
|
-
routes?: RouteObject[];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* 创建路由器配置(第一层)
|
|
17
|
-
* @param options
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
export declare function createRouter(options: CreateRouterOptions): {
|
|
21
|
-
/** 最终合并后的路由配置 */
|
|
22
|
-
routes: RouteObject[];
|
|
23
|
-
/** 权限帮助函数,包含 ProtectedLoader 等,用于外部调用 processRoutes */
|
|
24
|
-
permissionHelpers: {
|
|
25
|
-
RootLoader: () => import('./permission').AuthStatus;
|
|
26
|
-
ProtectedLoader: ({ request }: import('react-router-dom').LoaderFunctionArgs) => Response | null;
|
|
27
|
-
LoginLoader: () => Promise<Response | null>;
|
|
28
|
-
LoginAction: ({ request }: import('react-router-dom').LoaderFunctionArgs) => Promise<Response | null>;
|
|
29
|
-
LogoutAction: () => Response;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
2
|
+
export * from './utils';
|
|
32
3
|
/**
|
|
33
4
|
* 生成路由表
|
|
34
5
|
* @param routes 路由数组
|
|
35
6
|
* @returns
|
|
36
7
|
*/
|
|
37
8
|
export declare function generateRouter(routes: RouteObject[]): import('react-router-dom').DataRouter;
|
|
38
|
-
export * from './permission';
|
|
39
|
-
export * from './routes';
|
|
40
|
-
export * from './utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spacego/fe-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "🚀 A component library for fe to use.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"@spacego/zustand": "workspace:^",
|
|
49
49
|
"@vitejs/plugin-react-swc": "3.5.0",
|
|
50
50
|
"antd": "^6.2.1",
|
|
51
|
-
"axios": "^1.13.4",
|
|
52
51
|
"nprogress": "^0.2.0",
|
|
53
52
|
"react": "^18.2.0",
|
|
54
53
|
"@types/react": "^18.2.66",
|
package/lib/router/permission.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { message as o } from "antd";
|
|
2
|
-
import { redirect as e } from "react-router-dom";
|
|
3
|
-
function h(i) {
|
|
4
|
-
const { getToken: r, setToken: a, removeToken: u } = i;
|
|
5
|
-
function s() {
|
|
6
|
-
return { token: r() };
|
|
7
|
-
}
|
|
8
|
-
function l({ request: n }) {
|
|
9
|
-
if (!r()) {
|
|
10
|
-
const t = new URLSearchParams();
|
|
11
|
-
return t.set("from", new URL(n.url).pathname), e("/auth/login?" + t.toString());
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
async function m() {
|
|
16
|
-
return r() ? e("/") : null;
|
|
17
|
-
}
|
|
18
|
-
async function f({ request: n }) {
|
|
19
|
-
const c = await n.formData(), t = c.get("token");
|
|
20
|
-
if (!t)
|
|
21
|
-
return o.warning("You must provide a token to log in"), null;
|
|
22
|
-
try {
|
|
23
|
-
a(t), o.success("登录成功");
|
|
24
|
-
} catch {
|
|
25
|
-
return o.warning("Invalid login attempt"), null;
|
|
26
|
-
}
|
|
27
|
-
const k = c.get("redirectTo");
|
|
28
|
-
return e(k || "/");
|
|
29
|
-
}
|
|
30
|
-
function g() {
|
|
31
|
-
return u(), o.success("退出成功"), e("/auth/login");
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
RootLoader: s,
|
|
35
|
-
ProtectedLoader: l,
|
|
36
|
-
LoginLoader: m,
|
|
37
|
-
LoginAction: f,
|
|
38
|
-
LogoutAction: g
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
h as createPermissionHelpers
|
|
43
|
-
};
|
package/lib/router/routes.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { createLazyComponent as t } from "./utils.js";
|
|
3
|
-
function d(o, c, e) {
|
|
4
|
-
const { RootLoader: n, LoginLoader: a, LoginAction: i, LogoutAction: l } = c;
|
|
5
|
-
return [
|
|
6
|
-
{
|
|
7
|
-
id: "root",
|
|
8
|
-
path: "/",
|
|
9
|
-
// 使用 element: 可以传递自定义 props
|
|
10
|
-
element: /* @__PURE__ */ r(e, { layoutType: "basic" }),
|
|
11
|
-
loader: n,
|
|
12
|
-
children: []
|
|
13
|
-
// ...dynamicRoutes
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: "blank",
|
|
17
|
-
path: "/blank",
|
|
18
|
-
element: /* @__PURE__ */ r(e, { layoutType: "blank" }),
|
|
19
|
-
loader: n,
|
|
20
|
-
children: []
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: "auth",
|
|
24
|
-
element: /* @__PURE__ */ r(e, { layoutType: "auth" }),
|
|
25
|
-
loader: n,
|
|
26
|
-
children: [
|
|
27
|
-
{
|
|
28
|
-
path: "/auth/login",
|
|
29
|
-
loader: a,
|
|
30
|
-
action: i,
|
|
31
|
-
// 使用 Component: 简洁,但不能传递自定义 props
|
|
32
|
-
Component: t("/basics/login", o)
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
path: "/auth/register",
|
|
36
|
-
loader: a,
|
|
37
|
-
action: i,
|
|
38
|
-
// 使用 Component: 简洁,但不能传递自定义 props
|
|
39
|
-
Component: t("/basics/register", o)
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
// logout路由只用来退出登录,不展示页面
|
|
45
|
-
path: "/logout",
|
|
46
|
-
action: l,
|
|
47
|
-
Component: t("/basics/error", o)
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
path: "*",
|
|
51
|
-
Component: t("/basics/error", o)
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
d as createDefaultRoutes
|
|
57
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { LoaderFunctionArgs } from 'react-router-dom';
|
|
2
|
-
export type AuthStatus = {
|
|
3
|
-
token: string | void | null;
|
|
4
|
-
};
|
|
5
|
-
export interface TokenHelpers {
|
|
6
|
-
/** 获取token */
|
|
7
|
-
getToken: () => string | void | null;
|
|
8
|
-
/** 设置token */
|
|
9
|
-
setToken: (token: string) => void;
|
|
10
|
-
/** 移除token */
|
|
11
|
-
removeToken: () => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 创建权限相关的 loader 和 action
|
|
15
|
-
* @param tokenHelpers token 操作方法
|
|
16
|
-
*/
|
|
17
|
-
export declare function createPermissionHelpers(tokenHelpers: TokenHelpers): {
|
|
18
|
-
RootLoader: () => AuthStatus;
|
|
19
|
-
ProtectedLoader: ({ request }: LoaderFunctionArgs) => Response | null;
|
|
20
|
-
LoginLoader: () => Promise<Response | null>;
|
|
21
|
-
LoginAction: ({ request }: LoaderFunctionArgs) => Promise<Response | null>;
|
|
22
|
-
LogoutAction: () => Response;
|
|
23
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { RouteObject } from 'react-router-dom';
|
|
3
|
-
import { createPermissionHelpers } from './permission';
|
|
4
|
-
import { TModule } from './utils';
|
|
5
|
-
/**
|
|
6
|
-
* 创建默认路由表
|
|
7
|
-
* @param modules 页面模块集合
|
|
8
|
-
* @param permissionHelpers 权限相关的 loader 和 action
|
|
9
|
-
* @param BaseLayout 基础布局组件
|
|
10
|
-
*/
|
|
11
|
-
export declare function createDefaultRoutes(modules: TModule, permissionHelpers: ReturnType<typeof createPermissionHelpers>, BaseLayout: ComponentType<any>): RouteObject[];
|