@24city/web-console 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ - 修正手机宽度下工作台顶栏放不下、把页面撑出横向滚动的问题(0.1.0 起就有,模块多时出现,如 AdFlow 的三个模块):
6
+ 产品模块放不下时在顶栏里横向滑动;576px 以下积分徽章收起(账号菜单和个人中心里仍能看到)。原来写的收起规则指向了不存在的类名,没有生效。
7
+ - 组件总览页新增「工作台外壳 · 四个模块」整页预览,截图对比覆盖这种情况。
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  从“AdFlow 的底座”补成“各产品共用的界面规范”:补齐设计变量、收进两个产品的通用组件、写出成文规范、加上检查手段。
@@ -0,0 +1,210 @@
1
+ import { jsx as a, jsxs as c, Fragment as O } from "react/jsx-runtime";
2
+ import { useState as b, useEffect as P } from "react";
3
+ import { Layout as f, Button as y, Typography as F, Space as Q, Nav as T } from "@douyinfe/semi-ui";
4
+ import { IconSidebar as $ } from "@douyinfe/semi-icons";
5
+ import { useLocation as Y, useNavigate as q, Outlet as D } from "react-router";
6
+ import { h as J, B as V, o as X, e as Z, W as z, b as ee } from "./wallet-badge-dVrO6py9.js";
7
+ import { u as R, b as ae, a as te } from "./context-CaVim6ZO.js";
8
+ import { u as ne } from "./use-media-query-DvyinWNg.js";
9
+ import { a as oe } from "./scale-smFifpMm.js";
10
+ const se = "_layout_1a313_6", le = "_header_1a313_13", re = "_headerLeft_1a313_34", ce = "_logo_1a313_43", ie = "_logoMark_1a313_58", de = "_logoText_1a313_65", ue = "_modules_1a313_75", me = "_module_1a313_75", _e = "_moduleText_1a313_123", pe = "_moduleIcon_1a313_143", he = "_moduleInk_1a313_147", fe = "_headerRight_1a313_167", ye = "_walletSlot_1a313_172", ke = "_body_1a313_180", ge = "_sider_1a313_186", Ne = "_siderInner_1a313_200", ve = "_panel_1a313_207", be = "_expandButton_1a313_244", Ie = "_menu_1a313_260", we = "_menuGroup_1a313_271", xe = "_menuGroupPlain_1a313_280", Ce = "_menuGroupTitle_1a313_285", Me = "_menuList_1a313_296", Be = "_collapseButton_1a313_419", Le = "_mask_1a313_440", Ge = "_content_1a313_449", Se = "_contentCentered_1a313_455", Te = "_contentInner_1a313_467", $e = "_letterMark_1a313_520", e = {
11
+ layout: se,
12
+ header: le,
13
+ headerLeft: re,
14
+ logo: ce,
15
+ logoMark: ie,
16
+ logoText: de,
17
+ modules: ue,
18
+ module: me,
19
+ moduleText: _e,
20
+ moduleIcon: pe,
21
+ moduleInk: he,
22
+ headerRight: fe,
23
+ walletSlot: ye,
24
+ body: ke,
25
+ sider: ge,
26
+ siderInner: Ne,
27
+ panel: ve,
28
+ expandButton: be,
29
+ menu: Ie,
30
+ menuGroup: we,
31
+ menuGroupPlain: xe,
32
+ menuGroupTitle: Ce,
33
+ menuList: Me,
34
+ collapseButton: Be,
35
+ mask: Le,
36
+ content: Ge,
37
+ contentCentered: Se,
38
+ contentInner: Te,
39
+ letterMark: $e
40
+ }, Pe = (n, l) => n === l || n.startsWith(`${l}/`), Re = (n, l) => n.flatMap((o) => o.items).find((o) => new URL(o.to, "http://console.local").pathname === l), Ue = (n, l) => {
41
+ var o;
42
+ return (o = [...n].map((r) => ({ module: r, path: new URL(r.to, "http://console.local").pathname })).filter(({ path: r }) => Pe(l, r)).sort((r, u) => u.path.length - r.path.length)[0]) == null ? void 0 : o.module;
43
+ }, Ae = () => {
44
+ const [n, l] = b(!1);
45
+ return P(() => {
46
+ const o = () => l(window.scrollY > 0);
47
+ return o(), window.addEventListener("scroll", o, { passive: !0 }), () => window.removeEventListener("scroll", o);
48
+ }, []), n;
49
+ }, Ee = ({ size: n = 30, className: l }) => {
50
+ const o = R(), r = (u) => l ? `${u} ${l}` : u;
51
+ return o.markUrl ? /* @__PURE__ */ a(
52
+ "span",
53
+ {
54
+ className: r(e.logoMark),
55
+ style: { width: n, height: n, backgroundImage: `url("${o.markUrl}")` },
56
+ "aria-hidden": "true"
57
+ }
58
+ ) : /* @__PURE__ */ a("span", { className: r(e.letterMark), style: { width: n, height: n }, "aria-hidden": "true", children: Array.from(o.mark).slice(0, 2).join("") });
59
+ }, De = ({
60
+ modules: n = [],
61
+ activeModuleKey: l,
62
+ moduleTarget: o,
63
+ sidebar: r = [],
64
+ selectedKey: u,
65
+ renderItemLabel: I,
66
+ headerRight: U,
67
+ menuLabel: A = "工作台菜单",
68
+ children: E,
69
+ extra: K
70
+ }) => {
71
+ var S;
72
+ const { config: w } = ae(), x = R(), k = Y(), g = q(), C = w.routes.app, p = J(C, V(te())), M = X(C, k.pathname), h = M ? [] : r ?? [], B = h.length > 0, W = l ?? ((S = Ue(n, k.pathname)) == null ? void 0 : S.key), m = Re([...h, p], k.pathname), L = u ?? (m == null ? void 0 : m.key), i = ne(oe("desktop")), j = Ae(), [_, N] = b(!i), [v, d] = b(!1), H = new Map([...h, p].flatMap((t) => t.items.map((s) => [s.key, s])));
73
+ P(() => {
74
+ N(!i), d(!1);
75
+ }, [i]);
76
+ const G = (t) => {
77
+ const s = H.get(t);
78
+ s && g(s.to), d(!1);
79
+ };
80
+ return /* @__PURE__ */ c(f, { className: e.layout, children: [
81
+ /* @__PURE__ */ c(f.Header, { className: e.header, "data-scrolled": j ? "true" : "false", children: [
82
+ /* @__PURE__ */ c("div", { className: e.headerLeft, children: [
83
+ /* @__PURE__ */ c(
84
+ y,
85
+ {
86
+ theme: "borderless",
87
+ type: "tertiary",
88
+ className: e.logo,
89
+ "aria-label": `${x.shortName} 首页`,
90
+ onClick: () => g(w.routes.publicHome),
91
+ children: [
92
+ /* @__PURE__ */ a(Ee, {}),
93
+ /* @__PURE__ */ a(F.Text, { className: e.logoText, children: x.shortName })
94
+ ]
95
+ }
96
+ ),
97
+ n.length ? /* @__PURE__ */ a("div", { className: e.modules, role: "navigation", "aria-label": "产品模块", children: n.map((t) => /* @__PURE__ */ c(
98
+ y,
99
+ {
100
+ theme: "borderless",
101
+ type: "tertiary",
102
+ className: e.module,
103
+ "aria-current": W === t.key ? "page" : void 0,
104
+ onClick: () => g(o ? o(t) : t.to),
105
+ children: [
106
+ /* @__PURE__ */ c("span", { className: e.moduleText, children: [
107
+ t.icon ? /* @__PURE__ */ a("span", { className: e.moduleIcon, children: /* @__PURE__ */ a(t.icon, {}) }) : null,
108
+ t.label
109
+ ] }),
110
+ /* @__PURE__ */ a("span", { className: e.moduleInk, "aria-hidden": "true" })
111
+ ]
112
+ },
113
+ t.key
114
+ )) }) : null
115
+ ] }),
116
+ /* @__PURE__ */ a(Q, { spacing: 10, className: e.headerRight, children: U ?? /* @__PURE__ */ c(O, { children: [
117
+ /* @__PURE__ */ a(Z, {}),
118
+ /* @__PURE__ */ a("span", { className: e.walletSlot, children: /* @__PURE__ */ a(z, {}) }),
119
+ /* @__PURE__ */ a(ee, { personal: p, selectedKey: m && p.items.includes(m) ? m.key : void 0, onOpen: G })
120
+ ] }) })
121
+ ] }),
122
+ /* @__PURE__ */ c(f, { className: e.body, children: [
123
+ B ? /* @__PURE__ */ a("aside", { className: e.sider, "data-collapsed": _ ? "true" : "false", children: /* @__PURE__ */ c(
124
+ "div",
125
+ {
126
+ className: e.siderInner,
127
+ "data-collapsed": _ ? "true" : "false",
128
+ "data-peek": v ? "true" : "false",
129
+ onMouseEnter: () => {
130
+ _ && i && d(!0);
131
+ },
132
+ onMouseLeave: () => {
133
+ i && d(!1);
134
+ },
135
+ children: [
136
+ _ ? /* @__PURE__ */ a(
137
+ y,
138
+ {
139
+ theme: "light",
140
+ type: "tertiary",
141
+ className: e.expandButton,
142
+ icon: /* @__PURE__ */ a($, { "aria-hidden": "true" }),
143
+ "aria-label": "展开侧边栏",
144
+ "aria-expanded": v,
145
+ onClick: () => {
146
+ i ? (N(!1), d(!1)) : d((t) => !t);
147
+ }
148
+ }
149
+ ) : null,
150
+ /* @__PURE__ */ c("div", { className: e.panel, children: [
151
+ /* @__PURE__ */ a("nav", { className: e.menu, "aria-label": A, children: h.map((t) => /* @__PURE__ */ c(
152
+ "div",
153
+ {
154
+ className: t.label ? e.menuGroup : `${e.menuGroup} ${e.menuGroupPlain}`,
155
+ role: "group",
156
+ "aria-label": t.label || void 0,
157
+ children: [
158
+ t.label ? /* @__PURE__ */ a("div", { className: e.menuGroupTitle, children: t.label }) : null,
159
+ /* @__PURE__ */ a(
160
+ T,
161
+ {
162
+ mode: "vertical",
163
+ className: e.menuList,
164
+ selectedKeys: L ? [L] : [],
165
+ onSelect: ({ itemKey: s }) => G(String(s)),
166
+ children: t.items.map((s) => /* @__PURE__ */ a(
167
+ T.Item,
168
+ {
169
+ itemKey: s.key,
170
+ icon: s.icon ? /* @__PURE__ */ a(s.icon, {}) : void 0,
171
+ text: I ? I(s) : s.label
172
+ },
173
+ s.key
174
+ ))
175
+ }
176
+ )
177
+ ]
178
+ },
179
+ t.key
180
+ )) }),
181
+ i ? /* @__PURE__ */ a(
182
+ y,
183
+ {
184
+ theme: "borderless",
185
+ type: "tertiary",
186
+ className: e.collapseButton,
187
+ icon: /* @__PURE__ */ a($, { "aria-hidden": "true" }),
188
+ onClick: () => {
189
+ N((t) => !t), d(!1);
190
+ },
191
+ children: _ ? "固定侧边栏" : "收起侧边栏"
192
+ }
193
+ ) : null
194
+ ] })
195
+ ]
196
+ }
197
+ ) }) : null,
198
+ v && !i && B ? /* @__PURE__ */ a("div", { className: e.mask, "aria-hidden": "true", onClick: () => d(!1) }) : null,
199
+ /* @__PURE__ */ a(f.Content, { className: M ? `${e.content} ${e.contentCentered}` : e.content, children: /* @__PURE__ */ a("div", { className: e.contentInner, children: E ?? /* @__PURE__ */ a(D, {}) }) })
200
+ ] }),
201
+ K
202
+ ] });
203
+ };
204
+ export {
205
+ Ee as B,
206
+ De as C,
207
+ Re as a,
208
+ Ue as f,
209
+ Pe as i
210
+ };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { A as $, a as aa, b as ea, E as sa, F as oa, P as ta, c as ra, d as na,
4
4
  import { A as Ga } from "./chunks/auth-provider-CqiyTeOt.js";
5
5
  import { M as ja, a as Va, S as Ya } from "./chunks/status-tag-BrLUhH6Z.js";
6
6
  import { ConsoleSemiProvider as Za, MODAL_BUTTON_PROPS as Ja, modalButtonProps as $a } from "./semi.js";
7
- import { B as ee, C as se, f as oe, a as te, i as re } from "./chunks/console-layout-DH-aROYp.js";
7
+ import { B as ee, C as se, f as oe, a as te, i as re } from "./chunks/console-layout-BWz1qRog.js";
8
8
  import { C as ie, a as ue, b as le, F as ce, c as pe, d as Se, e as me, f as de, g as Ce, h as fe, i as ge, j as Pe, k as Ae, L as Le, M as Ee, S as Te, l as he, m as Re, n as Be, o as Fe, T as ye, W as xe, p as Ne, w as be } from "./chunks/waterfall-CQG8aVdx.js";
9
9
  import { E as _e, R as Ue, U as Ie } from "./chunks/unsupported-browser-Dwq1mNRy.js";
10
10
  import { L as ve } from "./chunks/link-button-giJEcTmG.js";
@@ -1,4 +1,4 @@
1
- import { B as s, C as i, f as o, a as t, i as d } from "../chunks/console-layout-DH-aROYp.js";
1
+ import { B as s, C as i, f as o, a as t, i as d } from "../chunks/console-layout-BWz1qRog.js";
2
2
  export {
3
3
  s as BrandMark,
4
4
  i as ConsoleLayout,
package/dist/styles.css CHANGED
@@ -2584,14 +2584,14 @@
2584
2584
  * 选中项浅主色底。尺寸取自有米有数页面的计算样式。颜色只引用 Semi 设计变量。
2585
2585
  */
2586
2586
 
2587
- ._layout_1sj6a_6 {
2587
+ ._layout_1a313_6 {
2588
2588
  min-height: 100dvh;
2589
2589
  background: transparent;
2590
2590
  }
2591
2591
 
2592
2592
  /* ---------- 顶栏:60px,logo · 产品模块 · 空间与账号 ---------- */
2593
2593
 
2594
- ._header_1sj6a_13 {
2594
+ ._header_1a313_13 {
2595
2595
  position: sticky;
2596
2596
  top: 0;
2597
2597
  z-index: var(--app-z-header);
@@ -2607,20 +2607,21 @@
2607
2607
  box-shadow var(--app-duration) var(--app-ease);
2608
2608
  }
2609
2609
 
2610
- ._header_1sj6a_13[data-scrolled='true'] {
2610
+ ._header_1a313_13[data-scrolled='true'] {
2611
2611
  background: var(--semi-color-bg-1);
2612
2612
  box-shadow: 0 4px 4px rgba(var(--semi-grey-9), 0.04);
2613
2613
  }
2614
2614
 
2615
- ._headerLeft_1sj6a_34 {
2615
+ ._headerLeft_1a313_34 {
2616
2616
  display: flex;
2617
2617
  min-width: 0;
2618
2618
  height: 100%;
2619
+ flex: 1 1 auto;
2619
2620
  align-items: center;
2620
2621
  gap: 40px;
2621
2622
  }
2622
2623
 
2623
- ._logo_1sj6a_42.semi-button {
2624
+ ._logo_1a313_43.semi-button {
2624
2625
  display: inline-flex;
2625
2626
  height: 40px;
2626
2627
  flex-shrink: 0;
@@ -2630,19 +2631,19 @@
2630
2631
  background: transparent;
2631
2632
  }
2632
2633
 
2633
- ._logo_1sj6a_42.semi-button:hover {
2634
+ ._logo_1a313_43.semi-button:hover {
2634
2635
  background: transparent;
2635
2636
  }
2636
2637
 
2637
2638
  /* 30px 产品图标(叠卡复刻,浅橙渐变圆角底自带在 SVG 里,与 public/favicon.svg 是同一张),与公开首页顶栏同一尺寸;宽屏再接一段 16px 字标。 */
2638
- ._logoMark_1sj6a_57 {
2639
+ ._logoMark_1a313_58 {
2639
2640
  display: inline-block;
2640
2641
  width: 30px;
2641
2642
  height: 30px;
2642
2643
  flex: none;
2643
2644
  }
2644
2645
 
2645
- ._logoText_1sj6a_64.semi-typography {
2646
+ ._logoText_1a313_65.semi-typography {
2646
2647
  display: none;
2647
2648
  color: var(--semi-color-text-0);
2648
2649
  font-size: var(--app-font-size-h6);
@@ -2651,17 +2652,29 @@
2651
2652
  white-space: nowrap;
2652
2653
  }
2653
2654
 
2654
- ._modules_1sj6a_73 {
2655
+ /* 模块多到放不下时在顶栏里横向滑动,不把页面撑出横向滚动。 */
2656
+ ._modules_1a313_75 {
2655
2657
  display: flex;
2658
+ min-width: 0;
2656
2659
  height: 100%;
2657
2660
  align-items: stretch;
2658
2661
  gap: 32px;
2662
+ overflow-x: auto;
2663
+ scrollbar-width: none;
2664
+ }
2665
+
2666
+ ._modules_1a313_75::-webkit-scrollbar {
2667
+ display: none;
2668
+ }
2669
+
2670
+ ._modules_1a313_75 ._module_1a313_75.semi-button {
2671
+ flex: none;
2659
2672
  }
2660
2673
 
2661
2674
  /* 模块菜单:16px 文字(素材平台前有平台图标),选中主色加粗,下方一条与图标加文字同宽的 2px 主色短线。
2662
2675
  悬停只变文字颜色:Semi 文字按钮悬停、按下时铺的灰底,按下时的缩小和聚焦时的灰圈都去掉
2663
2676
  (选择器要比 Semi 文字按钮的悬停规则更具体),键盘聚焦改为文字外一圈主色描边。 */
2664
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless {
2677
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless {
2665
2678
  position: relative;
2666
2679
  display: inline-flex;
2667
2680
  height: 100%;
@@ -2676,30 +2689,30 @@
2676
2689
  font-weight: 400;
2677
2690
  }
2678
2691
 
2679
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless:hover,
2680
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless:active,
2681
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless:focus-visible {
2692
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless:hover,
2693
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless:active,
2694
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless:focus-visible {
2682
2695
  background: transparent;
2683
2696
  box-shadow: none;
2684
2697
  scale: none;
2685
2698
  }
2686
2699
 
2687
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless:hover {
2700
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless:hover {
2688
2701
  color: rgb(var(--app-brand-6));
2689
2702
  }
2690
2703
 
2691
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless:focus-visible ._moduleText_1sj6a_110 {
2704
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless:focus-visible ._moduleText_1a313_123 {
2692
2705
  border-radius: 4px;
2693
2706
  outline: 2px solid rgb(var(--app-brand-6));
2694
2707
  outline-offset: 4px;
2695
2708
  }
2696
2709
 
2697
- ._modules_1sj6a_73 ._module_1sj6a_73[aria-current='page'].semi-button.semi-button-borderless {
2710
+ ._modules_1a313_75 ._module_1a313_75[aria-current='page'].semi-button.semi-button-borderless {
2698
2711
  color: rgb(var(--app-brand-6));
2699
2712
  font-weight: 600;
2700
2713
  }
2701
2714
 
2702
- ._moduleText_1sj6a_110 {
2715
+ ._moduleText_1a313_123 {
2703
2716
  position: relative;
2704
2717
  display: inline-flex;
2705
2718
  align-items: center;
@@ -2708,11 +2721,11 @@
2708
2721
  white-space: nowrap;
2709
2722
  }
2710
2723
 
2711
- ._moduleIcon_1sj6a_130 {
2724
+ ._moduleIcon_1a313_143 {
2712
2725
  display: inline-flex;
2713
2726
  }
2714
2727
 
2715
- ._moduleInk_1sj6a_134 {
2728
+ ._moduleInk_1a313_147 {
2716
2729
  position: absolute;
2717
2730
  bottom: 10px;
2718
2731
  left: 0;
@@ -2727,27 +2740,31 @@
2727
2740
  transform var(--app-duration) var(--app-ease);
2728
2741
  }
2729
2742
 
2730
- ._module_1sj6a_73[aria-current='page'] ._moduleInk_1sj6a_134 {
2743
+ ._module_1a313_75[aria-current='page'] ._moduleInk_1a313_147 {
2731
2744
  opacity: 1;
2732
2745
  transform: scaleX(1);
2733
2746
  }
2734
2747
 
2735
- ._headerRight_1sj6a_154.semi-space {
2736
- min-width: 0;
2748
+ ._headerRight_1a313_167.semi-space {
2749
+ flex: none;
2737
2750
  flex-wrap: nowrap;
2738
2751
  }
2739
2752
 
2753
+ ._walletSlot_1a313_172 {
2754
+ display: contents;
2755
+ }
2756
+
2740
2757
  /* 右侧工具的样式各在自己的模块里:upgrade-entry、wallet-badge、account-menu。 */
2741
2758
 
2742
2759
  /* ---------- 侧栏:232px,224px 白底圆角面板 ---------- */
2743
2760
 
2744
- ._body_1sj6a_163.semi-layout {
2761
+ ._body_1a313_180.semi-layout {
2745
2762
  min-height: calc(100dvh - var(--app-header-height));
2746
2763
  flex-direction: row;
2747
2764
  background: transparent;
2748
2765
  }
2749
2766
 
2750
- ._sider_1sj6a_169 {
2767
+ ._sider_1a313_186 {
2751
2768
  position: sticky;
2752
2769
  z-index: var(--app-z-sider);
2753
2770
  top: var(--app-header-height);
@@ -2757,18 +2774,18 @@
2757
2774
  transition: width var(--app-duration) var(--app-ease);
2758
2775
  }
2759
2776
 
2760
- ._sider_1sj6a_169[data-collapsed='true'] {
2777
+ ._sider_1a313_186[data-collapsed='true'] {
2761
2778
  width: 24px;
2762
2779
  }
2763
2780
 
2764
- ._siderInner_1sj6a_183 {
2781
+ ._siderInner_1a313_200 {
2765
2782
  position: relative;
2766
2783
  height: 100%;
2767
2784
  box-sizing: border-box;
2768
2785
  padding: 8px 0 8px 8px;
2769
2786
  }
2770
2787
 
2771
- ._panel_1sj6a_190 {
2788
+ ._panel_1a313_207 {
2772
2789
  display: flex;
2773
2790
  width: 224px;
2774
2791
  height: 100%;
@@ -2783,11 +2800,11 @@
2783
2800
  }
2784
2801
 
2785
2802
  /* 收起:面板移出窄条外;指针移上窄条或点开后浮出,白底加投影盖在内容上。 */
2786
- ._siderInner_1sj6a_183[data-collapsed='true'] {
2803
+ ._siderInner_1a313_200[data-collapsed='true'] {
2787
2804
  padding: 8px 0;
2788
2805
  }
2789
2806
 
2790
- ._siderInner_1sj6a_183[data-collapsed='true'] ._panel_1sj6a_190 {
2807
+ ._siderInner_1a313_200[data-collapsed='true'] ._panel_1a313_207 {
2791
2808
  position: absolute;
2792
2809
  top: 8px;
2793
2810
  left: 8px;
@@ -2799,13 +2816,13 @@
2799
2816
  transform: translateX(calc(-100% - 16px));
2800
2817
  }
2801
2818
 
2802
- ._siderInner_1sj6a_183[data-collapsed='true'][data-peek='true'] ._panel_1sj6a_190 {
2819
+ ._siderInner_1a313_200[data-collapsed='true'][data-peek='true'] ._panel_1a313_207 {
2803
2820
  opacity: 1;
2804
2821
  pointer-events: auto;
2805
2822
  transform: translateX(0);
2806
2823
  }
2807
2824
 
2808
- ._expandButton_1sj6a_227.semi-button {
2825
+ ._expandButton_1a313_244.semi-button {
2809
2826
  width: 24px;
2810
2827
  height: 48px;
2811
2828
  padding: 0;
@@ -2816,12 +2833,12 @@
2816
2833
  color: var(--semi-color-text-2);
2817
2834
  }
2818
2835
 
2819
- ._expandButton_1sj6a_227.semi-button:hover {
2836
+ ._expandButton_1a313_244.semi-button:hover {
2820
2837
  color: rgb(var(--app-brand-6));
2821
2838
  }
2822
2839
 
2823
2840
  /* 菜单:分组标题 13px 灰色,菜单项 40px、8px 圆角、18px 灰色图标。每个分组一段 Semi Nav,分组标题由外壳渲染。 */
2824
- ._menu_1sj6a_243 {
2841
+ ._menu_1a313_260 {
2825
2842
  display: flex;
2826
2843
  overflow-y: auto;
2827
2844
  min-height: 0;
@@ -2832,21 +2849,21 @@
2832
2849
  scrollbar-width: none;
2833
2850
  }
2834
2851
 
2835
- ._menuGroup_1sj6a_254 {
2852
+ ._menuGroup_1a313_271 {
2836
2853
  margin: 0 0 20px;
2837
2854
  }
2838
2855
 
2839
- ._menuGroup_1sj6a_254:first-child {
2856
+ ._menuGroup_1a313_271:first-child {
2840
2857
  margin-top: 8px;
2841
2858
  }
2842
2859
 
2843
2860
  /* 没有标题的分组(例如“我的内容”最上面的两项)后面紧跟下一组的标题,只隔菜单项自带的 4px。 */
2844
- ._menuGroupPlain_1sj6a_263 {
2861
+ ._menuGroupPlain_1a313_280 {
2845
2862
  margin-bottom: 0;
2846
2863
  }
2847
2864
 
2848
2865
  /* 分组标题(行业、内容管理)比菜单项浅:介于次要文字和占位文字之间的灰 */
2849
- ._menuGroupTitle_1sj6a_268 {
2866
+ ._menuGroupTitle_1a313_285 {
2850
2867
  height: 24px;
2851
2868
  margin: 0 0 6px;
2852
2869
  padding: 0 12px;
@@ -2857,7 +2874,7 @@
2857
2874
  }
2858
2875
 
2859
2876
  /* Semi 的 Nav 自带 240px 宽、右边框和内边距,这里只要它的列表。 */
2860
- ._menuList_1sj6a_279.semi-navigation {
2877
+ ._menuList_1a313_296.semi-navigation {
2861
2878
  display: block;
2862
2879
  width: 100%;
2863
2880
  padding: 0;
@@ -2865,18 +2882,18 @@
2865
2882
  background: transparent;
2866
2883
  }
2867
2884
 
2868
- ._menuList_1sj6a_279 .semi-navigation-inner,
2869
- ._menuList_1sj6a_279 .semi-navigation-list-wrapper {
2885
+ ._menuList_1a313_296 .semi-navigation-inner,
2886
+ ._menuList_1a313_296 .semi-navigation-list-wrapper {
2870
2887
  width: 100%;
2871
2888
  }
2872
2889
 
2873
2890
  /* Semi 竖向导航的列表顶部自带 12px 内边距,每个分组都会多出一截。 */
2874
- ._menuList_1sj6a_279 .semi-navigation-list-wrapper {
2891
+ ._menuList_1a313_296 .semi-navigation-list-wrapper {
2875
2892
  padding-top: 0;
2876
2893
  }
2877
2894
 
2878
2895
  /* 比 Semi 的 .semi-navigation-list > .semi-navigation-item-normal 多一个类,不依赖样式表先后 */
2879
- ._menuList_1sj6a_279 .semi-navigation-list .semi-navigation-item {
2896
+ ._menuList_1a313_296 .semi-navigation-list .semi-navigation-item {
2880
2897
  height: 40px;
2881
2898
  /* Semi 的菜单项是 flex 但不居中,它靠 8px 上下内边距和 20px 行高对齐;这里改成 40px 行高,图标要垂直居中 */
2882
2899
  align-items: center;
@@ -2890,7 +2907,7 @@
2890
2907
  line-height: 40px;
2891
2908
  }
2892
2909
 
2893
- ._menuList_1sj6a_279 .semi-navigation-item-icon {
2910
+ ._menuList_1a313_296 .semi-navigation-item-icon {
2894
2911
  min-width: 0;
2895
2912
  margin-right: 10px;
2896
2913
  color: var(--semi-color-text-2);
@@ -2898,35 +2915,35 @@
2898
2915
  }
2899
2916
 
2900
2917
  /* Semi 给 Nav 图标加了 size="large"(20px),这里统一 18px */
2901
- ._menuList_1sj6a_279 .semi-navigation-item-icon .semi-icon {
2918
+ ._menuList_1a313_296 .semi-navigation-item-icon .semi-icon {
2902
2919
  font-size: 18px;
2903
2920
  }
2904
2921
 
2905
- ._menuList_1sj6a_279 .semi-navigation-item-text {
2922
+ ._menuList_1a313_296 .semi-navigation-item-text {
2906
2923
  min-width: 0;
2907
2924
  flex: 1;
2908
2925
  }
2909
2926
 
2910
2927
  /* 比 Semi 的悬停规则(.semi-navigation-item-normal:hover:not(.semi-navigation-item-selected))多一个类,不依赖样式表先后 */
2911
- ._menuList_1sj6a_279 .semi-navigation-item.semi-navigation-item-normal:not(.semi-navigation-item-disabled):hover {
2928
+ ._menuList_1a313_296 .semi-navigation-item.semi-navigation-item-normal:not(.semi-navigation-item-disabled):hover {
2912
2929
  background: var(--semi-color-fill-0);
2913
2930
  color: rgb(var(--app-brand-6));
2914
2931
  }
2915
2932
 
2916
- ._menuList_1sj6a_279 .semi-navigation-item.semi-navigation-item-normal:hover .semi-navigation-item-icon,
2917
- ._menuList_1sj6a_279 .semi-navigation-item.semi-navigation-item-selected .semi-navigation-item-icon {
2933
+ ._menuList_1a313_296 .semi-navigation-item.semi-navigation-item-normal:hover .semi-navigation-item-icon,
2934
+ ._menuList_1a313_296 .semi-navigation-item.semi-navigation-item-selected .semi-navigation-item-icon {
2918
2935
  color: rgb(var(--app-brand-6));
2919
2936
  }
2920
2937
 
2921
- ._menuList_1sj6a_279 .semi-navigation-item.semi-navigation-item-selected,
2922
- ._menuList_1sj6a_279 .semi-navigation-item.semi-navigation-item-selected:hover {
2938
+ ._menuList_1a313_296 .semi-navigation-item.semi-navigation-item-selected,
2939
+ ._menuList_1a313_296 .semi-navigation-item.semi-navigation-item-selected:hover {
2923
2940
  background: var(--semi-color-primary-light-default);
2924
2941
  color: rgb(var(--app-brand-6));
2925
2942
  font-weight: 600;
2926
2943
  }
2927
2944
 
2928
2945
  /* 行业菜单项:名称占满,右边是置顶按钮。没置顶的悬停(或键盘聚焦)才出现,置顶的一直显示为主色。 */
2929
- ._industryItem_1sj6a_348 {
2946
+ ._industryItem_1a313_365 {
2930
2947
  display: flex;
2931
2948
  min-width: 0;
2932
2949
  align-items: center;
@@ -2934,15 +2951,15 @@
2934
2951
  gap: 4px;
2935
2952
  }
2936
2953
 
2937
- ._industryName_1sj6a_356 {
2954
+ ._industryName_1a313_373 {
2938
2955
  overflow: hidden;
2939
2956
  min-width: 0;
2940
2957
  text-overflow: ellipsis;
2941
2958
  white-space: nowrap;
2942
2959
  }
2943
2960
 
2944
- ._menu_1sj6a_243 ._pinButton_1sj6a_363.semi-button,
2945
- ._menu_1sj6a_243 ._pinButtonActive_1sj6a_364.semi-button {
2961
+ ._menu_1a313_260 ._pinButton_1a313_380.semi-button,
2962
+ ._menu_1a313_260 ._pinButtonActive_1a313_381.semi-button {
2946
2963
  width: 24px;
2947
2964
  height: 24px;
2948
2965
  flex-shrink: 0;
@@ -2952,35 +2969,35 @@
2952
2969
  color: var(--semi-color-text-2);
2953
2970
  }
2954
2971
 
2955
- ._menu_1sj6a_243 ._pinButton_1sj6a_363.semi-button {
2972
+ ._menu_1a313_260 ._pinButton_1a313_380.semi-button {
2956
2973
  opacity: 0;
2957
2974
  }
2958
2975
 
2959
- ._menuList_1sj6a_279 .semi-navigation-item:hover ._pinButton_1sj6a_363.semi-button,
2960
- ._menu_1sj6a_243 ._pinButton_1sj6a_363.semi-button:focus-visible {
2976
+ ._menuList_1a313_296 .semi-navigation-item:hover ._pinButton_1a313_380.semi-button,
2977
+ ._menu_1a313_260 ._pinButton_1a313_380.semi-button:focus-visible {
2961
2978
  opacity: 1;
2962
2979
  }
2963
2980
 
2964
2981
  /* 比 Semi 文字按钮的悬停规则更具体,不依赖样式表先后 */
2965
- ._menu_1sj6a_243 ._pinButton_1sj6a_363.semi-button.semi-button-borderless:hover,
2966
- ._menu_1sj6a_243 ._pinButtonActive_1sj6a_364.semi-button.semi-button-borderless:hover {
2982
+ ._menu_1a313_260 ._pinButton_1a313_380.semi-button.semi-button-borderless:hover,
2983
+ ._menu_1a313_260 ._pinButtonActive_1a313_381.semi-button.semi-button-borderless:hover {
2967
2984
  background: var(--semi-color-fill-2);
2968
2985
  color: rgb(var(--app-brand-6));
2969
2986
  }
2970
2987
 
2971
- ._menu_1sj6a_243 ._pinButtonActive_1sj6a_364.semi-button {
2988
+ ._menu_1a313_260 ._pinButtonActive_1a313_381.semi-button {
2972
2989
  color: rgb(var(--app-brand-6));
2973
2990
  }
2974
2991
 
2975
2992
  /* 菜单项里图标的通用间距、字号不作用在置顶按钮上 */
2976
- ._menuList_1sj6a_279 .semi-navigation-item ._pinButton_1sj6a_363 .semi-icon,
2977
- ._menuList_1sj6a_279 .semi-navigation-item ._pinButtonActive_1sj6a_364 .semi-icon {
2993
+ ._menuList_1a313_296 .semi-navigation-item ._pinButton_1a313_380 .semi-icon,
2994
+ ._menuList_1a313_296 .semi-navigation-item ._pinButtonActive_1a313_381 .semi-icon {
2978
2995
  margin: 0;
2979
2996
  color: inherit;
2980
2997
  font-size: 14px;
2981
2998
  }
2982
2999
 
2983
- ._collapseButton_1sj6a_402.semi-button {
3000
+ ._collapseButton_1a313_419.semi-button {
2984
3001
  display: flex;
2985
3002
  width: 100%;
2986
3003
  height: 40px;
@@ -2995,13 +3012,13 @@
2995
3012
  font-weight: 400;
2996
3013
  }
2997
3014
 
2998
- ._collapseButton_1sj6a_402.semi-button:hover {
3015
+ ._collapseButton_1a313_419.semi-button:hover {
2999
3016
  background: transparent;
3000
3017
  color: rgb(var(--app-brand-6));
3001
3018
  }
3002
3019
 
3003
3020
  /* 窄屏浮出菜单时的点击遮罩,点空白处收起。 */
3004
- ._mask_1sj6a_423 {
3021
+ ._mask_1a313_440 {
3005
3022
  position: fixed;
3006
3023
  z-index: var(--app-z-mask);
3007
3024
  inset: var(--app-header-height) 0 0;
@@ -3010,25 +3027,25 @@
3010
3027
 
3011
3028
  /* ---------- 内容区:与侧栏面板隔开 20px,右侧留 24px ---------- */
3012
3029
 
3013
- ._content_1sj6a_432 {
3030
+ ._content_1a313_449 {
3014
3031
  min-width: 0;
3015
3032
  padding: 8px var(--app-page-gutter) var(--app-page-gutter) 20px;
3016
3033
  }
3017
3034
 
3018
3035
  /* 个人中心没有侧栏:左右留白相同,页面自己居中。 */
3019
- ._contentCentered_1sj6a_438 {
3036
+ ._contentCentered_1a313_455 {
3020
3037
  padding: 8px var(--app-page-gutter) var(--app-page-gutter);
3021
3038
  }
3022
3039
 
3023
3040
  /* 横向溢出用 clip 裁掉:不能用 hidden,按规范 overflow-y 会随之变成 auto,内容区成了不滚动的滚动容器,
3024
3041
  * 页面里的 position: sticky(内容广场的吸顶搜索与筛选条)就失效了。 */
3025
- ._body_1sj6a_163 > ._content_1sj6a_432 {
3042
+ ._body_1a313_180 > ._content_1a313_449 {
3026
3043
  flex: 1 1 auto;
3027
3044
  overflow-x: clip;
3028
3045
  overflow-y: visible;
3029
3046
  }
3030
3047
 
3031
- ._contentInner_1sj6a_450 {
3048
+ ._contentInner_1a313_467 {
3032
3049
  display: flex;
3033
3050
  max-width: var(--app-content-max-width);
3034
3051
  margin: 0 auto;
@@ -3037,51 +3054,51 @@
3037
3054
  }
3038
3055
 
3039
3056
  @media (min-width: 1440px) {
3040
- ._logoText_1sj6a_64.semi-typography {
3057
+ ._logoText_1a313_65.semi-typography {
3041
3058
  display: inline;
3042
3059
  }
3043
3060
  }
3044
3061
 
3045
3062
  @media (max-width: 576px) {
3046
- ._header_1sj6a_13 {
3063
+ ._header_1a313_13 {
3047
3064
  padding: 0 12px;
3048
3065
  }
3049
3066
 
3050
- ._headerLeft_1sj6a_34 {
3067
+ ._headerLeft_1a313_34 {
3051
3068
  gap: 12px;
3052
3069
  }
3053
3070
 
3054
- ._modules_1sj6a_73 {
3071
+ ._modules_1a313_75 {
3055
3072
  gap: 16px;
3056
3073
  }
3057
3074
 
3058
- ._modules_1sj6a_73 ._module_1sj6a_73.semi-button.semi-button-borderless {
3075
+ ._modules_1a313_75 ._module_1a313_75.semi-button.semi-button-borderless {
3059
3076
  font-size: var(--app-font-size-lead);
3060
3077
  }
3061
3078
 
3062
3079
  /* 手机上顶栏放不下,平台图标收起,只留文字。 */
3063
- ._moduleIcon_1sj6a_130 {
3080
+ ._moduleIcon_1a313_143 {
3064
3081
  display: none;
3065
3082
  }
3066
3083
 
3067
- ._wallet_1sj6a_486 {
3084
+ ._walletSlot_1a313_172 {
3068
3085
  display: none;
3069
3086
  }
3070
3087
 
3071
- ._content_1sj6a_432 {
3088
+ ._content_1a313_449 {
3072
3089
  padding: 8px 12px 16px 12px;
3073
3090
  }
3074
3091
  }
3075
3092
 
3076
3093
  /* 产品图标由 BrandMark 写入内联背景图(runtime-config 的 brand.markUrl)。 */
3077
- ._logoMark_1sj6a_57 {
3094
+ ._logoMark_1a313_58 {
3078
3095
  background-position: center;
3079
3096
  background-size: contain;
3080
3097
  background-repeat: no-repeat;
3081
3098
  }
3082
3099
 
3083
3100
  /* 没有图标的产品:字标放在主色渐变的圆角方块里。 */
3084
- ._letterMark_1sj6a_503 {
3101
+ ._letterMark_1a313_520 {
3085
3102
  display: inline-flex;
3086
3103
  flex: none;
3087
3104
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24city/web-console",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "24.city 产品用户端的界面底座:Semi Design 主题与设计变量、控制台外壳、账号与会员界面、列表与数据组件、界面规范与守卫",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,209 +0,0 @@
1
- import { jsx as a, jsxs as c, Fragment as O } from "react/jsx-runtime";
2
- import { useState as v, useEffect as P } from "react";
3
- import { Layout as f, Button as y, Typography as F, Space as Q, Nav as T } from "@douyinfe/semi-ui";
4
- import { IconSidebar as $ } from "@douyinfe/semi-icons";
5
- import { useLocation as Y, useNavigate as q, Outlet as D } from "react-router";
6
- import { h as J, B as V, o as X, e as Z, W as z, b as ee } from "./wallet-badge-dVrO6py9.js";
7
- import { u as S, b as ae, a as ne } from "./context-CaVim6ZO.js";
8
- import { u as te } from "./use-media-query-DvyinWNg.js";
9
- import { a as se } from "./scale-smFifpMm.js";
10
- const oe = "_layout_1sj6a_6", le = "_header_1sj6a_13", re = "_headerLeft_1sj6a_34", ce = "_logo_1sj6a_42", ie = "_logoMark_1sj6a_57", de = "_logoText_1sj6a_64", ue = "_modules_1sj6a_73", me = "_module_1sj6a_73", pe = "_moduleText_1sj6a_110", _e = "_moduleIcon_1sj6a_130", he = "_moduleInk_1sj6a_134", fe = "_headerRight_1sj6a_154", ye = "_body_1sj6a_163", ke = "_sider_1sj6a_169", ge = "_siderInner_1sj6a_183", je = "_panel_1sj6a_190", Ne = "_expandButton_1sj6a_227", ve = "_menu_1sj6a_243", be = "_menuGroup_1sj6a_254", Ie = "_menuGroupPlain_1sj6a_263", xe = "_menuGroupTitle_1sj6a_268", Ce = "_menuList_1sj6a_279", Me = "_collapseButton_1sj6a_402", Be = "_mask_1sj6a_423", Le = "_content_1sj6a_432", we = "_contentCentered_1sj6a_438", Ge = "_contentInner_1sj6a_450", Te = "_letterMark_1sj6a_503", e = {
11
- layout: oe,
12
- header: le,
13
- headerLeft: re,
14
- logo: ce,
15
- logoMark: ie,
16
- logoText: de,
17
- modules: ue,
18
- module: me,
19
- moduleText: pe,
20
- moduleIcon: _e,
21
- moduleInk: he,
22
- headerRight: fe,
23
- body: ye,
24
- sider: ke,
25
- siderInner: ge,
26
- panel: je,
27
- expandButton: Ne,
28
- menu: ve,
29
- menuGroup: be,
30
- menuGroupPlain: Ie,
31
- menuGroupTitle: xe,
32
- menuList: Ce,
33
- collapseButton: Me,
34
- mask: Be,
35
- content: Le,
36
- contentCentered: we,
37
- contentInner: Ge,
38
- letterMark: Te
39
- }, $e = (t, l) => t === l || t.startsWith(`${l}/`), Pe = (t, l) => t.flatMap((s) => s.items).find((s) => new URL(s.to, "http://console.local").pathname === l), Se = (t, l) => {
40
- var s;
41
- return (s = [...t].map((r) => ({ module: r, path: new URL(r.to, "http://console.local").pathname })).filter(({ path: r }) => $e(l, r)).sort((r, u) => u.path.length - r.path.length)[0]) == null ? void 0 : s.module;
42
- }, Re = () => {
43
- const [t, l] = v(!1);
44
- return P(() => {
45
- const s = () => l(window.scrollY > 0);
46
- return s(), window.addEventListener("scroll", s, { passive: !0 }), () => window.removeEventListener("scroll", s);
47
- }, []), t;
48
- }, Ue = ({ size: t = 30, className: l }) => {
49
- const s = S(), r = (u) => l ? `${u} ${l}` : u;
50
- return s.markUrl ? /* @__PURE__ */ a(
51
- "span",
52
- {
53
- className: r(e.logoMark),
54
- style: { width: t, height: t, backgroundImage: `url("${s.markUrl}")` },
55
- "aria-hidden": "true"
56
- }
57
- ) : /* @__PURE__ */ a("span", { className: r(e.letterMark), style: { width: t, height: t }, "aria-hidden": "true", children: Array.from(s.mark).slice(0, 2).join("") });
58
- }, qe = ({
59
- modules: t = [],
60
- activeModuleKey: l,
61
- moduleTarget: s,
62
- sidebar: r = [],
63
- selectedKey: u,
64
- renderItemLabel: b,
65
- headerRight: R,
66
- menuLabel: U = "工作台菜单",
67
- children: A,
68
- extra: E
69
- }) => {
70
- var G;
71
- const { config: I } = ae(), x = S(), k = Y(), g = q(), C = I.routes.app, _ = J(C, V(ne())), M = X(C, k.pathname), h = M ? [] : r ?? [], B = h.length > 0, K = l ?? ((G = Se(t, k.pathname)) == null ? void 0 : G.key), m = Pe([...h, _], k.pathname), L = u ?? (m == null ? void 0 : m.key), i = te(se("desktop")), W = Re(), [p, j] = v(!i), [N, d] = v(!1), H = new Map([...h, _].flatMap((n) => n.items.map((o) => [o.key, o])));
72
- P(() => {
73
- j(!i), d(!1);
74
- }, [i]);
75
- const w = (n) => {
76
- const o = H.get(n);
77
- o && g(o.to), d(!1);
78
- };
79
- return /* @__PURE__ */ c(f, { className: e.layout, children: [
80
- /* @__PURE__ */ c(f.Header, { className: e.header, "data-scrolled": W ? "true" : "false", children: [
81
- /* @__PURE__ */ c("div", { className: e.headerLeft, children: [
82
- /* @__PURE__ */ c(
83
- y,
84
- {
85
- theme: "borderless",
86
- type: "tertiary",
87
- className: e.logo,
88
- "aria-label": `${x.shortName} 首页`,
89
- onClick: () => g(I.routes.publicHome),
90
- children: [
91
- /* @__PURE__ */ a(Ue, {}),
92
- /* @__PURE__ */ a(F.Text, { className: e.logoText, children: x.shortName })
93
- ]
94
- }
95
- ),
96
- t.length ? /* @__PURE__ */ a("div", { className: e.modules, role: "navigation", "aria-label": "产品模块", children: t.map((n) => /* @__PURE__ */ c(
97
- y,
98
- {
99
- theme: "borderless",
100
- type: "tertiary",
101
- className: e.module,
102
- "aria-current": K === n.key ? "page" : void 0,
103
- onClick: () => g(s ? s(n) : n.to),
104
- children: [
105
- /* @__PURE__ */ c("span", { className: e.moduleText, children: [
106
- n.icon ? /* @__PURE__ */ a("span", { className: e.moduleIcon, children: /* @__PURE__ */ a(n.icon, {}) }) : null,
107
- n.label
108
- ] }),
109
- /* @__PURE__ */ a("span", { className: e.moduleInk, "aria-hidden": "true" })
110
- ]
111
- },
112
- n.key
113
- )) }) : null
114
- ] }),
115
- /* @__PURE__ */ a(Q, { spacing: 10, className: e.headerRight, children: R ?? /* @__PURE__ */ c(O, { children: [
116
- /* @__PURE__ */ a(Z, {}),
117
- /* @__PURE__ */ a(z, {}),
118
- /* @__PURE__ */ a(ee, { personal: _, selectedKey: m && _.items.includes(m) ? m.key : void 0, onOpen: w })
119
- ] }) })
120
- ] }),
121
- /* @__PURE__ */ c(f, { className: e.body, children: [
122
- B ? /* @__PURE__ */ a("aside", { className: e.sider, "data-collapsed": p ? "true" : "false", children: /* @__PURE__ */ c(
123
- "div",
124
- {
125
- className: e.siderInner,
126
- "data-collapsed": p ? "true" : "false",
127
- "data-peek": N ? "true" : "false",
128
- onMouseEnter: () => {
129
- p && i && d(!0);
130
- },
131
- onMouseLeave: () => {
132
- i && d(!1);
133
- },
134
- children: [
135
- p ? /* @__PURE__ */ a(
136
- y,
137
- {
138
- theme: "light",
139
- type: "tertiary",
140
- className: e.expandButton,
141
- icon: /* @__PURE__ */ a($, { "aria-hidden": "true" }),
142
- "aria-label": "展开侧边栏",
143
- "aria-expanded": N,
144
- onClick: () => {
145
- i ? (j(!1), d(!1)) : d((n) => !n);
146
- }
147
- }
148
- ) : null,
149
- /* @__PURE__ */ c("div", { className: e.panel, children: [
150
- /* @__PURE__ */ a("nav", { className: e.menu, "aria-label": U, children: h.map((n) => /* @__PURE__ */ c(
151
- "div",
152
- {
153
- className: n.label ? e.menuGroup : `${e.menuGroup} ${e.menuGroupPlain}`,
154
- role: "group",
155
- "aria-label": n.label || void 0,
156
- children: [
157
- n.label ? /* @__PURE__ */ a("div", { className: e.menuGroupTitle, children: n.label }) : null,
158
- /* @__PURE__ */ a(
159
- T,
160
- {
161
- mode: "vertical",
162
- className: e.menuList,
163
- selectedKeys: L ? [L] : [],
164
- onSelect: ({ itemKey: o }) => w(String(o)),
165
- children: n.items.map((o) => /* @__PURE__ */ a(
166
- T.Item,
167
- {
168
- itemKey: o.key,
169
- icon: o.icon ? /* @__PURE__ */ a(o.icon, {}) : void 0,
170
- text: b ? b(o) : o.label
171
- },
172
- o.key
173
- ))
174
- }
175
- )
176
- ]
177
- },
178
- n.key
179
- )) }),
180
- i ? /* @__PURE__ */ a(
181
- y,
182
- {
183
- theme: "borderless",
184
- type: "tertiary",
185
- className: e.collapseButton,
186
- icon: /* @__PURE__ */ a($, { "aria-hidden": "true" }),
187
- onClick: () => {
188
- j((n) => !n), d(!1);
189
- },
190
- children: p ? "固定侧边栏" : "收起侧边栏"
191
- }
192
- ) : null
193
- ] })
194
- ]
195
- }
196
- ) }) : null,
197
- N && !i && B ? /* @__PURE__ */ a("div", { className: e.mask, "aria-hidden": "true", onClick: () => d(!1) }) : null,
198
- /* @__PURE__ */ a(f.Content, { className: M ? `${e.content} ${e.contentCentered}` : e.content, children: /* @__PURE__ */ a("div", { className: e.contentInner, children: A ?? /* @__PURE__ */ a(D, {}) }) })
199
- ] }),
200
- E
201
- ] });
202
- };
203
- export {
204
- Ue as B,
205
- qe as C,
206
- Pe as a,
207
- Se as f,
208
- $e as i
209
- };