@done-coding/admin-plugin-theme 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,84 @@
1
- const o = "admin-theme-signal-teal";
2
- function r() {
3
- if (typeof document > "u" || document.getElementById(o)) return;
1
+ import { defineComponent as l, openBlock as s, createElementBlock as c, Fragment as u, renderSlot as a, unref as r, createVNode as t, withCtx as n, createElementVNode as b, markRaw as m } from "vue";
2
+ import { AppFooter as p, AppSidebar as f, AppAside as g, AppHeader as h, AppTheme as d } from "@done-coding/admin-core";
3
+ const v = { class: "signal-teal-user-area" }, y = /* @__PURE__ */ l({
4
+ __name: "SignalTealShell",
5
+ props: {
6
+ menus: {},
7
+ menuFlatList: {},
8
+ sidebarMenus: {},
9
+ headerMenus: {},
10
+ activeMenu: {},
11
+ activeModuleMenu: {},
12
+ showHeader: { type: Boolean },
13
+ showSidebar: { type: Boolean },
14
+ showAside: { type: Boolean },
15
+ sidebarAboveHeader: { type: Boolean }
16
+ },
17
+ setup(e) {
18
+ return (o, C) => (s(), c(u, null, [
19
+ a(o.$slots, "default", { Footer: r(p) }),
20
+ t(r(f), {
21
+ show: e.showSidebar,
22
+ aboveHeader: e.sidebarAboveHeader,
23
+ menus: e.sidebarMenus,
24
+ menuFlatList: e.menuFlatList
25
+ }, {
26
+ bottom: n(() => [
27
+ b("div", v, [
28
+ a(o.$slots, "userEntry")
29
+ ])
30
+ ]),
31
+ _: 3
32
+ }, 8, ["show", "aboveHeader", "menus", "menuFlatList"]),
33
+ t(r(g), { show: e.showAside }, {
34
+ default: n(() => [
35
+ a(o.$slots, "aside")
36
+ ]),
37
+ _: 3
38
+ }, 8, ["show"]),
39
+ t(r(h), {
40
+ show: e.showHeader,
41
+ menus: e.headerMenus,
42
+ activeMenu: e.activeMenu,
43
+ activeModuleMenu: e.activeModuleMenu,
44
+ menuFlatList: e.menuFlatList
45
+ }, {
46
+ left: n(() => [
47
+ a(o.$slots, "brand")
48
+ ]),
49
+ right: n(() => [
50
+ a(o.$slots, "themeSwitcher", { Default: r(d) }, () => [
51
+ t(r(d))
52
+ ]),
53
+ a(o.$slots, "settings")
54
+ ]),
55
+ _: 3
56
+ }, 8, ["show", "menus", "activeMenu", "activeModuleMenu", "menuFlatList"])
57
+ ], 64));
58
+ }
59
+ }), i = "admin-theme-signal-teal";
60
+ function x() {
61
+ if (typeof document > "u" || document.getElementById(i)) return;
4
62
  const e = document.createElement("style");
5
- e.id = o, e.setAttribute("data-dc-theme", "signal-teal"), e.textContent = `
63
+ e.id = i, e.setAttribute("data-dc-theme", "signal-teal"), e.textContent = `
6
64
  :root{--dc-core-font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"JetBrains Mono","Liberation Mono",monospace;}
7
65
  .app-header-module-item{font-family:var(--dc-core-font-mono);letter-spacing:.02em;}
8
66
  .app-sidebar .el-menu-item.is-active{position:relative;background:var(--el-color-primary-light-9);}
9
67
  .app-sidebar .el-menu-item.is-active::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);height:58%;width:2px;border-radius:0 2px 2px 0;background:var(--dc-core-primary-color);pointer-events:none;}
68
+ .app-sidebar .signal-teal-user-area{display:flex;align-items:center;width:100%;box-sizing:border-box;padding:12px 16px;border-top:1px solid var(--dc-core-border-color,var(--el-border-color));border-bottom-left-radius:var(--dc-core-radius,10px);border-bottom-right-radius:var(--dc-core-radius,10px);transition:background var(--dc-core-motion-duration,.2s) ease;}
69
+ .app-sidebar .signal-teal-user-area:hover{background:var(--el-fill-color-light);}
10
70
  `, document.head.appendChild(e);
11
71
  }
12
- function a() {
72
+ function w() {
13
73
  var e;
14
- typeof document > "u" || (e = document.getElementById(o)) == null || e.remove();
74
+ typeof document > "u" || (e = document.getElementById(i)) == null || e.remove();
15
75
  }
16
- const n = {
76
+ const S = {
17
77
  id: "signal-teal",
18
78
  label: "青信控制台",
19
79
  description: {
20
- suitable: "工程师味的内容生产 / 运营中控台、数据看板、SaaS 工作台:要深青单色脊 + 克制浅色 premium 质感 + 等宽技术纹理(版本号 / 代号 / ID / env key),经典左栏、实心布局、密度中偏松。",
21
- unsuitable: "需要强多色出彩 / 暖色亲和的内容前台;偏好套框悬浮或动画 shell 的炫技形态;高视觉负载诉求(本主题刻意克制,boldness 仅在青色激活轨一处)。"
80
+ suitable: "工程师味的内容生产 / 运营中控台、数据看板、SaaS 工作台:要深青单色脊 + 克制浅色 premium 质感 + 等宽技术纹理(版本号 / 代号 / ID / env key),经典左栏、套框悬浮卡片、密度中偏松。",
81
+ unsuitable: "需要强多色出彩 / 暖色亲和的内容前台;偏好满铺实心、零边距的极致信息密度布局;高视觉负载 / 动画 shell 炫技诉求(本主题刻意克制)。"
22
82
  },
23
83
  config: {
24
84
  light: {
@@ -29,7 +89,9 @@ const n = {
29
89
  warningColor: "#e08a3c",
30
90
  dangerColor: "#f04438",
31
91
  errorColor: "#f04438",
32
- infoColor: "#3b7dd8",
92
+ // info = 中性语义(来源/次要标签):用中性灰,[MUST NOT] 用饱和链接蓝——
93
+ // 蓝是 teal 色板里唯一外来色,既破单色脊调性、又把被动 info 标签误导成可点链接。
94
+ infoColor: "#909399",
33
95
  surface: "#ffffff",
34
96
  borderColor: "#e6e8eb",
35
97
  borderWidth: "1px",
@@ -46,7 +108,8 @@ const n = {
46
108
  warningColor: "#f0a85a",
47
109
  dangerColor: "#f87171",
48
110
  errorColor: "#f87171",
49
- infoColor: "#6ba8f0",
111
+ // info = 中性语义:暗态中性灰(同 light 理由,[MUST NOT] 用饱和链接蓝)。
112
+ infoColor: "#8d9095",
50
113
  surface: "#161a20",
51
114
  borderColor: "#262e38",
52
115
  borderWidth: "1px",
@@ -57,27 +120,37 @@ const n = {
57
120
  }
58
121
  },
59
122
  layout: {
60
- // 经典左栏 + 实心布局:内置默认 AppShell(不写自定义 shell)、不套框、无悬浮内缝。
123
+ // 套框 + 悬浮卡片 + 内缝 gap(克制科技感):自定义 SignalTealShell(userEntry 落侧栏底部)。
124
+ // 四边 viewport 框 + 模块圆角卡片(surface 底 + 10px 圆角 + 主题软投影)+ gap 露底色缝。
125
+ shell: m(y),
126
+ viewport: {
127
+ paddingTop: 14,
128
+ paddingRight: 14,
129
+ paddingBottom: 14,
130
+ paddingLeft: 14
131
+ },
132
+ gap: { size: 12 },
61
133
  sidebar: {
62
134
  width: 232,
63
135
  collapseWidth: 64,
64
- background: "var(--dc-core-surface, var(--el-bg-color-overlay))"
136
+ background: "var(--dc-core-surface, var(--el-bg-color-overlay))",
137
+ style: { borderRadius: "10px" }
65
138
  },
66
139
  header: {
67
140
  height: 52,
68
- background: "var(--dc-core-surface, var(--el-bg-color-overlay))"
141
+ background: "var(--dc-core-surface, var(--el-bg-color-overlay))",
142
+ style: { borderRadius: "10px" }
69
143
  },
70
- body: { shimPadding: 20 },
71
- gap: { size: 0 }
144
+ body: { shimPadding: 16 }
72
145
  },
73
146
  // 生命周期钩子(榨干点):激活注入青色激活轨 + 等宽纹理,切走 / 注销清理。
74
147
  onActivate() {
75
- r();
148
+ x();
76
149
  },
77
150
  onDeactivate() {
78
- a();
151
+ w();
79
152
  }
80
153
  };
81
154
  export {
82
- n as default
155
+ S as default
83
156
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/admin-plugin-theme",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "内部前端库",
5
5
  "private": false,
6
6
  "main": "es/index.mjs",
@@ -72,5 +72,5 @@
72
72
  "engines": {
73
73
  "node": ">=18.0.0"
74
74
  },
75
- "gitHead": "1ccb23a3a48d593d791d6835ba7acaca95a5b708"
75
+ "gitHead": "fe1b759a459bbc1e0493b82da37b5e7b8149b5d2"
76
76
  }
@@ -0,0 +1,27 @@
1
+ import { AppShellProps } from '@done-coding/admin-core';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {
6
+ Footer: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
7
+ }): any;
8
+ userEntry?(_: {}): any;
9
+ aside?(_: {}): any;
10
+ brand?(_: {}): any;
11
+ themeSwitcher?(_: {
12
+ Default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
13
+ }): any;
14
+ settings?(_: {}): any;
15
+ };
16
+ refs: {};
17
+ rootEl: any;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<AppShellProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppShellProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };