@mxmweb/zui-layouts 1.1.1 → 1.1.2
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/index.js +155 -145
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as n, jsxs as k, Fragment as
|
|
1
|
+
import { jsx as n, jsxs as k, Fragment as ie } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
|
-
import x, { forwardRef as
|
|
3
|
+
import x, { forwardRef as U, createElement as V } from "react";
|
|
4
4
|
import s from "styled-components";
|
|
5
|
-
import { deepMergeTheme as
|
|
6
|
-
import { GoogleNavbar as
|
|
5
|
+
import { useTheme as E, deepMergeTheme as O, defaultTheme as L } from "@mxmweb/zui-theme";
|
|
6
|
+
import { GoogleNavbar as re, CustomDock as ae } from "@mxmweb/zui-components";
|
|
7
7
|
/**
|
|
8
8
|
* React Router v6.30.1
|
|
9
9
|
*
|
|
@@ -14,33 +14,33 @@ import { GoogleNavbar as le, CustomDock as ie } from "@mxmweb/zui-components";
|
|
|
14
14
|
*
|
|
15
15
|
* @license MIT
|
|
16
16
|
*/
|
|
17
|
-
const re = /* @__PURE__ */ u.createContext(null);
|
|
18
|
-
process.env.NODE_ENV !== "production" && (re.displayName = "DataRouter");
|
|
19
|
-
const ae = /* @__PURE__ */ u.createContext(null);
|
|
20
|
-
process.env.NODE_ENV !== "production" && (ae.displayName = "DataRouterState");
|
|
21
17
|
const ce = /* @__PURE__ */ u.createContext(null);
|
|
22
|
-
process.env.NODE_ENV !== "production" && (ce.displayName = "
|
|
18
|
+
process.env.NODE_ENV !== "production" && (ce.displayName = "DataRouter");
|
|
23
19
|
const se = /* @__PURE__ */ u.createContext(null);
|
|
24
|
-
process.env.NODE_ENV !== "production" && (se.displayName = "
|
|
20
|
+
process.env.NODE_ENV !== "production" && (se.displayName = "DataRouterState");
|
|
25
21
|
const de = /* @__PURE__ */ u.createContext(null);
|
|
26
|
-
process.env.NODE_ENV !== "production" && (de.displayName = "
|
|
27
|
-
const
|
|
22
|
+
process.env.NODE_ENV !== "production" && (de.displayName = "Await");
|
|
23
|
+
const he = /* @__PURE__ */ u.createContext(null);
|
|
24
|
+
process.env.NODE_ENV !== "production" && (he.displayName = "Navigation");
|
|
25
|
+
const fe = /* @__PURE__ */ u.createContext(null);
|
|
26
|
+
process.env.NODE_ENV !== "production" && (fe.displayName = "Location");
|
|
27
|
+
const ee = /* @__PURE__ */ u.createContext({
|
|
28
28
|
outlet: null,
|
|
29
29
|
matches: [],
|
|
30
30
|
isDataRoute: !1
|
|
31
31
|
});
|
|
32
|
-
process.env.NODE_ENV !== "production" && (
|
|
33
|
-
const
|
|
34
|
-
process.env.NODE_ENV !== "production" && (
|
|
35
|
-
const
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
return
|
|
32
|
+
process.env.NODE_ENV !== "production" && (ee.displayName = "Route");
|
|
33
|
+
const pe = /* @__PURE__ */ u.createContext(null);
|
|
34
|
+
process.env.NODE_ENV !== "production" && (pe.displayName = "RouteError");
|
|
35
|
+
const ue = /* @__PURE__ */ u.createContext(null);
|
|
36
|
+
function ge(t) {
|
|
37
|
+
let l = u.useContext(ee).outlet;
|
|
38
|
+
return l && /* @__PURE__ */ u.createElement(ue.Provider, {
|
|
39
39
|
value: t
|
|
40
|
-
},
|
|
40
|
+
}, l);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function xe(t) {
|
|
43
|
+
return ge(t.context);
|
|
44
44
|
}
|
|
45
45
|
new Promise(() => {
|
|
46
46
|
});
|
|
@@ -50,14 +50,14 @@ new Promise(() => {
|
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
const
|
|
53
|
+
const ke = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), te = (...t) => t.filter((l, c, d) => !!l && l.trim() !== "" && d.indexOf(l) === c).join(" ").trim();
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-react v0.456.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
var
|
|
60
|
+
var Ce = {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
width: 24,
|
|
63
63
|
height: 24,
|
|
@@ -74,30 +74,30 @@ var xe = {
|
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
const
|
|
77
|
+
const we = U(
|
|
78
78
|
({
|
|
79
79
|
color: t = "currentColor",
|
|
80
|
-
size:
|
|
80
|
+
size: l = 24,
|
|
81
81
|
strokeWidth: c = 2,
|
|
82
82
|
absoluteStrokeWidth: d,
|
|
83
83
|
className: e = "",
|
|
84
84
|
children: p,
|
|
85
|
-
iconNode:
|
|
86
|
-
|
|
87
|
-
},
|
|
85
|
+
iconNode: N,
|
|
86
|
+
...$
|
|
87
|
+
}, A) => V(
|
|
88
88
|
"svg",
|
|
89
89
|
{
|
|
90
|
-
ref:
|
|
91
|
-
...
|
|
92
|
-
width:
|
|
93
|
-
height:
|
|
90
|
+
ref: A,
|
|
91
|
+
...Ce,
|
|
92
|
+
width: l,
|
|
93
|
+
height: l,
|
|
94
94
|
stroke: t,
|
|
95
|
-
strokeWidth: d ? Number(c) * 24 / Number(
|
|
96
|
-
className:
|
|
97
|
-
|
|
95
|
+
strokeWidth: d ? Number(c) * 24 / Number(l) : c,
|
|
96
|
+
className: te("lucide", e),
|
|
97
|
+
...$
|
|
98
98
|
},
|
|
99
99
|
[
|
|
100
|
-
...
|
|
100
|
+
...N.map(([a, i]) => V(a, i)),
|
|
101
101
|
...Array.isArray(p) ? p : [p]
|
|
102
102
|
]
|
|
103
103
|
)
|
|
@@ -108,12 +108,12 @@ const ke = J(
|
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
110
|
*/
|
|
111
|
-
const
|
|
112
|
-
const c =
|
|
113
|
-
({ className: d, ...e }, p) =>
|
|
111
|
+
const oe = (t, l) => {
|
|
112
|
+
const c = U(
|
|
113
|
+
({ className: d, ...e }, p) => V(we, {
|
|
114
114
|
ref: p,
|
|
115
|
-
iconNode:
|
|
116
|
-
className:
|
|
115
|
+
iconNode: l,
|
|
116
|
+
className: te(`lucide-${ke(t)}`, d),
|
|
117
117
|
...e
|
|
118
118
|
})
|
|
119
119
|
);
|
|
@@ -125,7 +125,7 @@ const ee = (t, i) => {
|
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
127
|
*/
|
|
128
|
-
const
|
|
128
|
+
const ye = oe("ArrowLeft", [
|
|
129
129
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
130
130
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
131
131
|
]);
|
|
@@ -135,9 +135,9 @@ const Ce = ee("ArrowLeft", [
|
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const I = oe("ChevronRight", [
|
|
139
139
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
140
|
-
]),
|
|
140
|
+
]), me = s.div`
|
|
141
141
|
display: flex;
|
|
142
142
|
justify-content: flex-start;
|
|
143
143
|
align-items: flex-start;
|
|
@@ -147,7 +147,7 @@ const B = ee("ChevronRight", [
|
|
|
147
147
|
width: 100%;
|
|
148
148
|
max-width: 98%;
|
|
149
149
|
position: relative;
|
|
150
|
-
`,
|
|
150
|
+
`, ve = s.div`
|
|
151
151
|
display: flex;
|
|
152
152
|
height: 38px;
|
|
153
153
|
z-index: 10;
|
|
@@ -158,7 +158,7 @@ const B = ee("ChevronRight", [
|
|
|
158
158
|
justify-content: flex-start;
|
|
159
159
|
width: 100%;
|
|
160
160
|
min-width: 0; /* 确保 flex 子元素可以收缩 */
|
|
161
|
-
`,
|
|
161
|
+
`, be = s.button`
|
|
162
162
|
display: flex;
|
|
163
163
|
align-items: center;
|
|
164
164
|
justify-content: center;
|
|
@@ -184,7 +184,7 @@ const B = ee("ChevronRight", [
|
|
|
184
184
|
&:active svg {
|
|
185
185
|
transform: translateY(0);
|
|
186
186
|
}
|
|
187
|
-
`,
|
|
187
|
+
`, De = s.div`
|
|
188
188
|
line-height: 1.4;
|
|
189
189
|
cursor: pointer;
|
|
190
190
|
transition: color 0.2s ease;
|
|
@@ -197,14 +197,14 @@ const B = ee("ChevronRight", [
|
|
|
197
197
|
&:hover {
|
|
198
198
|
color: #007bff;
|
|
199
199
|
}
|
|
200
|
-
`,
|
|
200
|
+
`, Ne = s.div`
|
|
201
201
|
line-height: 1.4;
|
|
202
202
|
white-space: nowrap;
|
|
203
203
|
overflow: hidden;
|
|
204
204
|
text-overflow: ellipsis;
|
|
205
205
|
flex: 1;
|
|
206
206
|
min-width: 0;
|
|
207
|
-
`,
|
|
207
|
+
`, Q = s.div`
|
|
208
208
|
display: flex;
|
|
209
209
|
align-items: center;
|
|
210
210
|
gap: 4px;
|
|
@@ -212,7 +212,7 @@ const B = ee("ChevronRight", [
|
|
|
212
212
|
max-width: 50%;
|
|
213
213
|
min-width: 0;
|
|
214
214
|
overflow: hidden;
|
|
215
|
-
`,
|
|
215
|
+
`, S = s.div`
|
|
216
216
|
display: flex;
|
|
217
217
|
align-items: center;
|
|
218
218
|
gap: 4px;
|
|
@@ -229,12 +229,12 @@ const B = ee("ChevronRight", [
|
|
|
229
229
|
&:hover {
|
|
230
230
|
color: ${(t) => t.$isLast ? "#007bff" : "inherit"};
|
|
231
231
|
}
|
|
232
|
-
`,
|
|
232
|
+
`, z = s.div`
|
|
233
233
|
display: flex;
|
|
234
234
|
align-items: center;
|
|
235
235
|
color: #6c757d;
|
|
236
236
|
margin: 0 2px;
|
|
237
|
-
`,
|
|
237
|
+
`, $e = s.div`
|
|
238
238
|
display: flex;
|
|
239
239
|
flex-direction: column;
|
|
240
240
|
width: 100%;
|
|
@@ -249,60 +249,65 @@ s.div`
|
|
|
249
249
|
transform: translateX(-50%);
|
|
250
250
|
z-index: 1000;
|
|
251
251
|
`;
|
|
252
|
-
const
|
|
252
|
+
const Fe = ({
|
|
253
253
|
children: t,
|
|
254
|
-
goBack:
|
|
254
|
+
goBack: l,
|
|
255
255
|
title: c,
|
|
256
256
|
description: d,
|
|
257
257
|
breadcrumbs: e,
|
|
258
258
|
dockItems: p,
|
|
259
|
-
dockActiveMode:
|
|
260
|
-
defaultDockActiveId:
|
|
261
|
-
defaultDockActiveIds:
|
|
259
|
+
dockActiveMode: N = "single",
|
|
260
|
+
defaultDockActiveId: $,
|
|
261
|
+
defaultDockActiveIds: A,
|
|
262
262
|
styles: a,
|
|
263
|
-
eventsEmit:
|
|
263
|
+
eventsEmit: i
|
|
264
264
|
}) => {
|
|
265
|
-
var
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
265
|
+
var H, G, P, Y, q, K, X, Z;
|
|
266
|
+
const b = E(), w = O(
|
|
267
|
+
// 基础:默认主题 + useTheme的配置
|
|
268
|
+
O({ theme: L, mode: "light" }, b),
|
|
269
|
+
// 最高层:用户手动传入的styles
|
|
270
|
+
a
|
|
271
|
+
), o = (w == null ? void 0 : w.theme) || L, W = x.useRef(null), T = () => {
|
|
272
|
+
i != null && i.onGoBack ? i.onGoBack() : l && l();
|
|
273
|
+
}, R = () => {
|
|
274
|
+
i != null && i.onTitleClick && i.onTitleClick();
|
|
275
|
+
}, y = (h, D) => {
|
|
276
|
+
i != null && i.onBreadcrumbClick ? i.onBreadcrumbClick(h, D) : h.onClick && h.onClick();
|
|
277
|
+
}, g = (h, D) => {
|
|
278
|
+
i != null && i.onDockItemClick && i.onDockItemClick(h, D);
|
|
274
279
|
}, C = () => {
|
|
275
280
|
if (!e || e.length === 0) return null;
|
|
276
|
-
const h = x.useRef(null), [
|
|
281
|
+
const h = x.useRef(null), [D, M] = x.useState({ start: 0, end: e.length, showEllipsis: !1 }), j = x.useCallback(() => {
|
|
277
282
|
if (!h.current || e.length <= 3) {
|
|
278
|
-
|
|
283
|
+
M({ start: 0, end: e.length, showEllipsis: !1 });
|
|
279
284
|
return;
|
|
280
285
|
}
|
|
281
286
|
const f = h.current.offsetWidth * 0.5;
|
|
282
|
-
let
|
|
283
|
-
if (
|
|
284
|
-
|
|
287
|
+
let B = Math.floor((f - 30) / (120 + 20));
|
|
288
|
+
if (B < 2 && (B = 2), B >= e.length) {
|
|
289
|
+
M({ start: 0, end: e.length, showEllipsis: !1 });
|
|
285
290
|
return;
|
|
286
291
|
}
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
start:
|
|
290
|
-
end:
|
|
291
|
-
showEllipsis:
|
|
292
|
+
const le = 0, J = Math.min(B - 1, e.length);
|
|
293
|
+
M({
|
|
294
|
+
start: le,
|
|
295
|
+
end: J,
|
|
296
|
+
showEllipsis: J < e.length - 1
|
|
292
297
|
});
|
|
293
298
|
}, [e.length]);
|
|
294
299
|
if (x.useEffect(() => {
|
|
295
|
-
|
|
300
|
+
j();
|
|
296
301
|
const r = new ResizeObserver(() => {
|
|
297
|
-
|
|
302
|
+
j();
|
|
298
303
|
});
|
|
299
304
|
return h.current && r.observe(h.current), () => {
|
|
300
305
|
r.disconnect();
|
|
301
306
|
};
|
|
302
|
-
}, [
|
|
303
|
-
return /* @__PURE__ */ n(
|
|
307
|
+
}, [j]), e.length <= 3)
|
|
308
|
+
return /* @__PURE__ */ n(Q, { children: e.map((r, f) => /* @__PURE__ */ k(x.Fragment, { children: [
|
|
304
309
|
/* @__PURE__ */ n(
|
|
305
|
-
|
|
310
|
+
S,
|
|
306
311
|
{
|
|
307
312
|
$isLast: f === e.length - 1,
|
|
308
313
|
$isClickable: !!(f < e.length - 1 || r.onClick),
|
|
@@ -314,30 +319,30 @@ const Te = ({
|
|
|
314
319
|
children: r.label
|
|
315
320
|
}
|
|
316
321
|
),
|
|
317
|
-
f < e.length - 1 && /* @__PURE__ */ n(
|
|
322
|
+
f < e.length - 1 && /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(I, { size: 14 }) })
|
|
318
323
|
] }, r.id)) });
|
|
319
|
-
const { start:
|
|
320
|
-
return /* @__PURE__ */ k(
|
|
321
|
-
e.slice(
|
|
324
|
+
const { start: m, end: v, showEllipsis: F } = D;
|
|
325
|
+
return /* @__PURE__ */ k(Q, { children: [
|
|
326
|
+
e.slice(m, v).map((r, f) => /* @__PURE__ */ k(x.Fragment, { children: [
|
|
322
327
|
/* @__PURE__ */ n(
|
|
323
|
-
|
|
328
|
+
S,
|
|
324
329
|
{
|
|
325
|
-
$isLast: f ===
|
|
326
|
-
$isClickable: !!(f <
|
|
327
|
-
onClick: () => y(r,
|
|
330
|
+
$isLast: f === v - m - 1 && !F,
|
|
331
|
+
$isClickable: !!(f < v - m - 1 || r.onClick),
|
|
332
|
+
onClick: () => y(r, m + f),
|
|
328
333
|
style: {
|
|
329
|
-
color: f ===
|
|
334
|
+
color: f === v - m - 1 && !F ? o.colors.text : o.colors.textSecondary || o.colors.disabledText
|
|
330
335
|
},
|
|
331
336
|
title: r.label,
|
|
332
337
|
children: r.label
|
|
333
338
|
}
|
|
334
339
|
),
|
|
335
|
-
f <
|
|
340
|
+
f < v - m - 1 && /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(I, { size: 14 }) })
|
|
336
341
|
] }, r.id)),
|
|
337
|
-
|
|
338
|
-
/* @__PURE__ */ n(
|
|
342
|
+
F && /* @__PURE__ */ k(ie, { children: [
|
|
343
|
+
/* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(I, { size: 14 }) }),
|
|
339
344
|
/* @__PURE__ */ n(
|
|
340
|
-
|
|
345
|
+
S,
|
|
341
346
|
{
|
|
342
347
|
$isLast: !1,
|
|
343
348
|
$isClickable: !1,
|
|
@@ -346,13 +351,13 @@ const Te = ({
|
|
|
346
351
|
cursor: "default",
|
|
347
352
|
maxWidth: "auto"
|
|
348
353
|
},
|
|
349
|
-
title: `${e.slice(
|
|
354
|
+
title: `${e.slice(v, -1).map((r) => r.label).join(" > ")}`,
|
|
350
355
|
children: "..."
|
|
351
356
|
}
|
|
352
357
|
),
|
|
353
|
-
/* @__PURE__ */ n(
|
|
358
|
+
/* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(I, { size: 14 }) }),
|
|
354
359
|
/* @__PURE__ */ n(
|
|
355
|
-
|
|
360
|
+
S,
|
|
356
361
|
{
|
|
357
362
|
$isLast: !0,
|
|
358
363
|
$isClickable: !!e[e.length - 1].onClick,
|
|
@@ -366,58 +371,58 @@ const Te = ({
|
|
|
366
371
|
)
|
|
367
372
|
] })
|
|
368
373
|
] });
|
|
369
|
-
}, [
|
|
374
|
+
}, [_, ne] = x.useState(!0);
|
|
370
375
|
return /* @__PURE__ */ n(
|
|
371
|
-
|
|
376
|
+
me,
|
|
372
377
|
{
|
|
373
378
|
style: {
|
|
374
379
|
background: o.colors.appBackground,
|
|
375
380
|
color: o.colors.text,
|
|
376
|
-
fontFamily: ((
|
|
381
|
+
fontFamily: ((G = (H = o.fonts) == null ? void 0 : H.body) == null ? void 0 : G.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
377
382
|
},
|
|
378
383
|
children: /* @__PURE__ */ k("div", { style: { height: "100%", display: "flex", width: "100%", gap: 12 }, children: [
|
|
379
|
-
p && p.length > 0 && /* @__PURE__ */ n("div", { style: { flex: `0 0 ${
|
|
380
|
-
|
|
384
|
+
p && p.length > 0 && /* @__PURE__ */ n("div", { style: { flex: `0 0 ${_ ? 72 : 28}px`, transition: "flex-basis .2s ease" }, children: /* @__PURE__ */ n(
|
|
385
|
+
re,
|
|
381
386
|
{
|
|
382
387
|
items: p,
|
|
383
|
-
open:
|
|
384
|
-
onOpenChange:
|
|
388
|
+
open: _,
|
|
389
|
+
onOpenChange: ne,
|
|
385
390
|
onItemClick: (h) => g({ id: String(h.key), label: h.name }, 0),
|
|
386
391
|
defaultOpen: !0
|
|
387
392
|
}
|
|
388
393
|
) }),
|
|
389
394
|
/* @__PURE__ */ k("div", { style: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0 }, children: [
|
|
390
|
-
(c || d ||
|
|
391
|
-
|
|
392
|
-
|
|
395
|
+
(c || d || l || e) && /* @__PURE__ */ k(ve, { ref: W, children: [
|
|
396
|
+
l && /* @__PURE__ */ n(
|
|
397
|
+
be,
|
|
393
398
|
{
|
|
394
|
-
onClick:
|
|
399
|
+
onClick: T,
|
|
395
400
|
style: { color: o.colors.primary, borderRadius: o.space.radius || "6px" },
|
|
396
401
|
title: "\u8FD4\u56DE",
|
|
397
|
-
children: /* @__PURE__ */ n(
|
|
402
|
+
children: /* @__PURE__ */ n(ye, { size: 18 })
|
|
398
403
|
}
|
|
399
404
|
),
|
|
400
405
|
C(),
|
|
401
406
|
c && /* @__PURE__ */ n(
|
|
402
|
-
|
|
407
|
+
De,
|
|
403
408
|
{
|
|
404
|
-
onClick:
|
|
409
|
+
onClick: R,
|
|
405
410
|
style: {
|
|
406
411
|
color: o.colors.text,
|
|
407
|
-
fontSize: ((
|
|
408
|
-
fontWeight: ((
|
|
412
|
+
fontSize: ((Y = (P = o.fonts) == null ? void 0 : P.heading) == null ? void 0 : Y.size) || "16px",
|
|
413
|
+
fontWeight: ((K = (q = o.fonts) == null ? void 0 : q.heading) == null ? void 0 : K.weight) || "600"
|
|
409
414
|
},
|
|
410
415
|
title: c,
|
|
411
416
|
children: c
|
|
412
417
|
}
|
|
413
418
|
),
|
|
414
419
|
d && /* @__PURE__ */ n(
|
|
415
|
-
|
|
420
|
+
Ne,
|
|
416
421
|
{
|
|
417
422
|
style: {
|
|
418
423
|
color: o.colors.textSecondary || o.colors.disabledText,
|
|
419
424
|
opacity: 0.7,
|
|
420
|
-
fontSize: ((
|
|
425
|
+
fontSize: ((Z = (X = o.fonts) == null ? void 0 : X.body) == null ? void 0 : Z.size) || "12px"
|
|
421
426
|
},
|
|
422
427
|
title: d,
|
|
423
428
|
children: d
|
|
@@ -425,7 +430,7 @@ const Te = ({
|
|
|
425
430
|
)
|
|
426
431
|
] }),
|
|
427
432
|
/* @__PURE__ */ n(
|
|
428
|
-
|
|
433
|
+
$e,
|
|
429
434
|
{
|
|
430
435
|
style: {
|
|
431
436
|
background: o.colors.dashboardBackground || "transparent",
|
|
@@ -433,14 +438,14 @@ const Te = ({
|
|
|
433
438
|
borderRadius: o.space.radius || void 0,
|
|
434
439
|
boxShadow: o.colors.shadow || void 0
|
|
435
440
|
},
|
|
436
|
-
children: t || /* @__PURE__ */ n(
|
|
441
|
+
children: t || /* @__PURE__ */ n(xe, {})
|
|
437
442
|
}
|
|
438
443
|
)
|
|
439
444
|
] })
|
|
440
445
|
] })
|
|
441
446
|
}
|
|
442
447
|
);
|
|
443
|
-
},
|
|
448
|
+
}, Ae = s.div.withConfig({
|
|
444
449
|
shouldForwardProp: (t) => !["backgroundImage", "backgroundColor"].includes(t)
|
|
445
450
|
})`
|
|
446
451
|
position: fixed;
|
|
@@ -453,7 +458,7 @@ const Te = ({
|
|
|
453
458
|
flex-direction: column;
|
|
454
459
|
overflow: hidden;
|
|
455
460
|
z-index: 1;
|
|
456
|
-
`,
|
|
461
|
+
`, Re = s.div`
|
|
457
462
|
height: 48px;
|
|
458
463
|
width: 100%;
|
|
459
464
|
display: flex;
|
|
@@ -462,7 +467,7 @@ const Te = ({
|
|
|
462
467
|
background: transparent;
|
|
463
468
|
z-index: 10;
|
|
464
469
|
flex-shrink: 0;
|
|
465
|
-
`,
|
|
470
|
+
`, Be = s.div`
|
|
466
471
|
flex: 1;
|
|
467
472
|
width: 100%;
|
|
468
473
|
overflow-y: auto;
|
|
@@ -489,7 +494,7 @@ const Te = ({
|
|
|
489
494
|
&::-webkit-scrollbar-thumb:hover {
|
|
490
495
|
background: rgba(255, 255, 255, 0.5);
|
|
491
496
|
}
|
|
492
|
-
`,
|
|
497
|
+
`, Ie = s.div`
|
|
493
498
|
height: 80px;
|
|
494
499
|
width: 100%;
|
|
495
500
|
display: flex;
|
|
@@ -499,45 +504,50 @@ const Te = ({
|
|
|
499
504
|
background: transparent;
|
|
500
505
|
z-index: 10;
|
|
501
506
|
flex-shrink: 0;
|
|
502
|
-
`,
|
|
507
|
+
`, Ve = ({
|
|
503
508
|
children: t,
|
|
504
|
-
backgroundImage:
|
|
509
|
+
backgroundImage: l,
|
|
505
510
|
backgroundColor: c,
|
|
506
511
|
header: d,
|
|
507
512
|
dockItems: e,
|
|
508
513
|
dockActiveMode: p = "single",
|
|
509
|
-
defaultDockActiveId:
|
|
510
|
-
defaultDockActiveIds:
|
|
511
|
-
styles:
|
|
514
|
+
defaultDockActiveId: N,
|
|
515
|
+
defaultDockActiveIds: $,
|
|
516
|
+
styles: A,
|
|
512
517
|
eventsEmit: a
|
|
513
518
|
}) => {
|
|
514
|
-
var
|
|
515
|
-
const
|
|
519
|
+
var R, y;
|
|
520
|
+
const i = E(), b = O(
|
|
521
|
+
// 基础:默认主题 + useTheme的配置
|
|
522
|
+
O({ theme: L, mode: "light" }, i),
|
|
523
|
+
// 最高层:用户手动传入的styles
|
|
524
|
+
A
|
|
525
|
+
), w = (b == null ? void 0 : b.theme) || L, o = (g, C) => {
|
|
516
526
|
a != null && a.onDockItemClick ? a.onDockItemClick(g, C) : g.onClick && g.onClick();
|
|
517
|
-
},
|
|
527
|
+
}, W = (g, C) => {
|
|
518
528
|
a != null && a.onDockActiveChange && a.onDockActiveChange(g, C);
|
|
519
|
-
},
|
|
529
|
+
}, T = (g, C) => {
|
|
520
530
|
a != null && a.onDockActiveChangeMultiple && a.onDockActiveChangeMultiple(g, C);
|
|
521
531
|
};
|
|
522
532
|
return /* @__PURE__ */ k(
|
|
523
|
-
|
|
533
|
+
Ae,
|
|
524
534
|
{
|
|
525
|
-
backgroundImage:
|
|
535
|
+
backgroundImage: l,
|
|
526
536
|
backgroundColor: c,
|
|
527
537
|
children: [
|
|
528
|
-
d && /* @__PURE__ */ n(
|
|
538
|
+
d && /* @__PURE__ */ n(Re, { children: d }),
|
|
529
539
|
/* @__PURE__ */ n(
|
|
530
|
-
|
|
540
|
+
Be,
|
|
531
541
|
{
|
|
532
542
|
style: {
|
|
533
543
|
color: w.colors.text,
|
|
534
|
-
fontFamily: ((y = (
|
|
544
|
+
fontFamily: ((y = (R = w.fonts) == null ? void 0 : R.body) == null ? void 0 : y.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
535
545
|
},
|
|
536
546
|
children: t
|
|
537
547
|
}
|
|
538
548
|
),
|
|
539
|
-
e && e.length > 0 && /* @__PURE__ */ n(
|
|
540
|
-
|
|
549
|
+
e && e.length > 0 && /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n(
|
|
550
|
+
ae,
|
|
541
551
|
{
|
|
542
552
|
items: e,
|
|
543
553
|
itemWidth: 48,
|
|
@@ -545,11 +555,11 @@ const Te = ({
|
|
|
545
555
|
magnification: 1.5,
|
|
546
556
|
itemGap: 8,
|
|
547
557
|
activeMode: p,
|
|
548
|
-
defaultActiveId:
|
|
549
|
-
defaultActiveIds:
|
|
558
|
+
defaultActiveId: N,
|
|
559
|
+
defaultActiveIds: $,
|
|
550
560
|
onItemClick: o,
|
|
551
|
-
onActiveChange:
|
|
552
|
-
onActiveChangeMultiple:
|
|
561
|
+
onActiveChange: W,
|
|
562
|
+
onActiveChangeMultiple: T
|
|
553
563
|
}
|
|
554
564
|
) })
|
|
555
565
|
]
|
|
@@ -557,6 +567,6 @@ const Te = ({
|
|
|
557
567
|
);
|
|
558
568
|
};
|
|
559
569
|
export {
|
|
560
|
-
|
|
561
|
-
|
|
570
|
+
Fe as DashboardContainer,
|
|
571
|
+
Ve as DockContainer
|
|
562
572
|
};
|