@das-fed/upf-utils 6.4.0-dev.248 → 6.4.0-dev.250
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/api-services/es5.js +2421 -2278
- package/api-services/index.js +2041 -1924
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +1335 -1207
- package/api-services/modules/app-manage/index.js +1093 -998
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +1335 -1207
- package/api-services/modules/authentication/index.js +1093 -998
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +1485 -1342
- package/api-services/modules/bems/index.js +1235 -1118
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1335 -1207
- package/api-services/modules/contract/index.js +1093 -998
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +1362 -1229
- package/api-services/modules/duty-manage/index.js +1125 -1022
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1417 -1298
- package/api-services/modules/enterpriseright/index.js +1168 -1087
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +2191 -2060
- package/api-services/modules/file/es5.js +2374 -2231
- package/api-services/modules/file/index.js +2049 -1932
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +1334 -1203
- package/api-services/modules/gateway-edge/index.js +1104 -1005
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1833 -1734
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1522 -1391
- package/api-services/modules/iot/index.js +1261 -1162
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1415 -1296
- package/api-services/modules/justauth/index.js +1168 -1087
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +1480 -1337
- package/api-services/modules/knowledge/index.js +1226 -1109
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1334 -1203
- package/api-services/modules/link/index.js +1104 -1005
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1481 -1341
- package/api-services/modules/permission/index.js +1234 -1121
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1485 -1366
- package/api-services/modules/platformManage/index.js +1221 -1140
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1351 -1220
- package/api-services/modules/portal/index.js +1100 -1001
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1417 -1298
- package/api-services/modules/space-manage/index.js +1168 -1087
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +1358 -1227
- package/api-services/modules/super-admin/index.js +1121 -1022
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1355 -1224
- package/api-services/modules/supplier/index.js +1106 -1007
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1482 -1339
- package/api-services/modules/supplychain-manage/index.js +1232 -1115
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1334 -1203
- package/api-services/modules/systemConfiguration/index.js +1104 -1005
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +1334 -1203
- package/api-services/modules/tool/index.js +1104 -1005
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1341 -1210
- package/api-services/src/create-service/index.js +1108 -1009
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +1752 -1621
- package/common-info/getPermissionMethod/es5.js +1326 -1198
- package/common-info/getPermissionMethod/index.js +1066 -971
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +1460 -1361
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +31 -1
- package/common-tools/timezone-format/es5.js +640 -462
- package/common-tools/timezone-format/index.d.ts +31 -1
- package/common-tools/timezone-format/index.js +467 -304
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +1342 -1211
- package/create-api-service/index.js +1109 -1010
- package/create-api-service/index.js.gz +0 -0
- package/esm-map.json +20 -0
- package/package.json +3 -3
- package/theme/bridge.d.ts +42 -0
- package/theme/es5.d.ts +8 -41
- package/theme/es5.js +800 -490
- package/theme/index.d.ts +8 -41
- package/theme/index.js +538 -391
- package/theme/index.js.gz +0 -0
- package/theme/source-variables.d.ts +35 -0
package/theme/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { bus as
|
|
2
|
-
const
|
|
1
|
+
import { bus as se } from "@das-fed/mframe";
|
|
2
|
+
const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
3
3
|
const r = String(e || "").trim();
|
|
4
4
|
return /^#([\da-f]{3}|[\da-f]{6})$/i.test(r) ? r.length === 4 ? `#${r.slice(1).split("").map((t) => `${t}${t}`).join("")}` : r : "";
|
|
5
5
|
}, B = (e) => {
|
|
6
|
-
const r =
|
|
6
|
+
const r = X(e);
|
|
7
7
|
if (!r)
|
|
8
8
|
return null;
|
|
9
9
|
const t = r.slice(1);
|
|
@@ -12,235 +12,369 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
12
12
|
green: Number.parseInt(t.slice(2, 4), 16),
|
|
13
13
|
blue: Number.parseInt(t.slice(4, 6), 16)
|
|
14
14
|
};
|
|
15
|
-
},
|
|
16
|
-
const u = B(e),
|
|
17
|
-
if (!u || !
|
|
15
|
+
}, H = (e) => Math.min(255, Math.max(0, Math.round(e))), Q = (e, r, t, o) => {
|
|
16
|
+
const u = B(e), n = B(r);
|
|
17
|
+
if (!u || !n)
|
|
18
18
|
return o;
|
|
19
|
-
const
|
|
20
|
-
return `#${[
|
|
21
|
-
},
|
|
19
|
+
const l = Math.min(1, Math.max(0, t)), i = H(u.red * l + n.red * (1 - l)), s = H(u.green * l + n.green * (1 - l)), c = H(u.blue * l + n.blue * (1 - l));
|
|
20
|
+
return `#${[i, s, c].map((p) => p.toString(16).padStart(2, "0")).join("")}`;
|
|
21
|
+
}, ce = (e, r, t) => {
|
|
22
22
|
const o = B(e);
|
|
23
23
|
if (!o)
|
|
24
24
|
return t;
|
|
25
25
|
const u = Math.min(1, Math.max(0, r));
|
|
26
26
|
return `rgba(${o.red}, ${o.green}, ${o.blue}, ${u})`;
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
}, D = (e, r = m) => Q(e || "#5582F3", r || m, fe, "#ebf1fe"), z = "#5582f3", j = "#e63946", pe = [
|
|
28
|
+
{
|
|
29
|
+
group: "foundation",
|
|
30
|
+
name: "brand",
|
|
31
|
+
displayName: "品牌基因",
|
|
32
|
+
shortDisplayName: "品牌",
|
|
33
|
+
description: "品牌识别专用颜色,用于Logo、品牌元素等",
|
|
34
|
+
variables: ["--upf-brand-primary", "--upf-brand-secondary"]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
group: "foundation",
|
|
38
|
+
name: "basic",
|
|
39
|
+
displayName: "交互与状态色",
|
|
40
|
+
shortDisplayName: "交互色",
|
|
41
|
+
description: "交互主色与状态反馈色,用于按钮、状态、标签等交互元素",
|
|
42
|
+
variables: [
|
|
43
|
+
"--upf-color-primary",
|
|
44
|
+
"--upf-color-primary-bg",
|
|
45
|
+
"--upf-color-success",
|
|
46
|
+
"--upf-color-warning",
|
|
47
|
+
"--upf-color-error",
|
|
48
|
+
"--upf-color-info"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
group: "foundation",
|
|
53
|
+
name: "text",
|
|
54
|
+
displayName: "文本色",
|
|
55
|
+
description: "文本层级颜色,用于标题、正文、辅助说明等",
|
|
56
|
+
variables: ["--upf-text-primary", "--upf-text-secondary", "--upf-text-disabled", "--upf-text-placeholder"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
group: "foundation",
|
|
60
|
+
name: "background",
|
|
61
|
+
displayName: "页面与容器背景",
|
|
62
|
+
shortDisplayName: "背景色",
|
|
63
|
+
description: "背景层级颜色,用于页面、卡片、弹窗等容器背景",
|
|
64
|
+
variables: ["--upf-bg-primary", "--upf-bg-secondary", "--upf-bg-elevated", "--upf-bg-mask"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
group: "foundation",
|
|
68
|
+
name: "border",
|
|
69
|
+
displayName: "边框与分割线",
|
|
70
|
+
shortDisplayName: "边框分割",
|
|
71
|
+
description: "边框和分割线颜色",
|
|
72
|
+
variables: ["--upf-border-color", "--upf-divider-color"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
group: "shell",
|
|
76
|
+
name: "nav",
|
|
77
|
+
displayName: "顶部导航",
|
|
78
|
+
description: "顶部导航栏相关颜色",
|
|
79
|
+
variables: ["--upf-nav-bg", "--upf-nav-border-color", "--upf-nav-text", "--upf-nav-hover-bg", "--upf-nav-active-bg", "--upf-nav-active-text"]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
group: "shell",
|
|
83
|
+
name: "menu",
|
|
84
|
+
displayName: "侧边菜单",
|
|
85
|
+
description: "左侧菜单相关颜色",
|
|
86
|
+
variables: [
|
|
87
|
+
"--upf-menu-bg",
|
|
88
|
+
"--upf-menu-text",
|
|
89
|
+
"--upf-menu-hover-bg",
|
|
90
|
+
"--upf-menu-active-bg",
|
|
91
|
+
"--upf-menu-active-text",
|
|
92
|
+
"--upf-menu-submenu-bg"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
group: "shell",
|
|
97
|
+
name: "tab",
|
|
98
|
+
displayName: "标签页",
|
|
99
|
+
description: "标签页相关颜色",
|
|
100
|
+
variables: ["--upf-tab-bg", "--upf-tab-text", "--upf-tab-hover-bg", "--upf-tab-active-bg", "--upf-tab-active-text"]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
group: "foundation",
|
|
104
|
+
name: "effect",
|
|
105
|
+
displayName: "圆角与阴影",
|
|
106
|
+
shortDisplayName: "圆角阴影",
|
|
107
|
+
description: "圆角和阴影等样式效果",
|
|
108
|
+
variables: ["--upf-border-radius", "--upf-box-shadow", "--upf-box-shadow-elevated"]
|
|
109
|
+
}
|
|
110
|
+
], S = [
|
|
111
|
+
{ name: "--upf-brand-primary", label: "品牌主色", hint: "品牌主色,建议用于导航背景、Logo等品牌识别场景", category: "brand" },
|
|
112
|
+
{ name: "--upf-brand-secondary", label: "品牌辅色", hint: "品牌辅色,用于辅助品牌识别和强调元素", category: "brand" },
|
|
113
|
+
{ name: "--upf-color-primary", label: "主色", hint: "功能主色,用于按钮、交互元素、状态反馈", category: "basic" },
|
|
114
|
+
{
|
|
115
|
+
name: "--upf-color-primary-bg",
|
|
116
|
+
label: "主色高亮背景",
|
|
117
|
+
hint: "主色配套高亮背景,默认跟随主色自动生成透明背景,也可手动覆盖",
|
|
118
|
+
category: "basic",
|
|
119
|
+
fallback: (e) => D(e["--upf-color-primary"], e["--upf-bg-primary"]),
|
|
120
|
+
fallbackDeps: ["--upf-color-primary", "--upf-bg-primary"]
|
|
121
|
+
},
|
|
122
|
+
{ name: "--upf-color-success", label: "成功色", hint: "成功状态色,用于成功提示、成功按钮", category: "basic" },
|
|
123
|
+
{ name: "--upf-color-warning", label: "警告色", hint: "警告状态色,用于警告提示、注意信息", category: "basic" },
|
|
124
|
+
{ name: "--upf-color-error", label: "错误色", hint: "错误状态色,用于错误提示、删除操作", category: "basic" },
|
|
125
|
+
{ name: "--upf-color-info", label: "信息色", hint: "信息状态色,用于信息提示、普通消息", category: "basic" },
|
|
126
|
+
{ name: "--upf-text-primary", label: "主要文本", hint: "主要文本,用于标题、重要内容", category: "text" },
|
|
127
|
+
{ name: "--upf-text-secondary", label: "次要文本", hint: "次要文本,用于辅助说明、描述文字", category: "text" },
|
|
128
|
+
{ name: "--upf-text-disabled", label: "禁用文本", hint: "禁用文本,用于禁用状态下的文字", category: "text" },
|
|
129
|
+
{ name: "--upf-text-placeholder", label: "占位文本", hint: "占位文本,用于输入框占位符", category: "text" },
|
|
130
|
+
{ name: "--upf-bg-primary", label: "主背景", hint: "主背景,用于页面整体背景", category: "background" },
|
|
131
|
+
{ name: "--upf-bg-secondary", label: "次背景", hint: "次背景,用于卡片、容器背景", category: "background" },
|
|
132
|
+
{ name: "--upf-bg-elevated", label: "浮层背景", hint: "浮层背景,用于弹窗、下拉浮层", category: "background" },
|
|
133
|
+
{ name: "--upf-bg-mask", label: "遮罩背景", hint: "遮罩背景,用于全屏遮罩层", category: "background" },
|
|
134
|
+
{ name: "--upf-border-color", label: "边框色", hint: "边框色,用于组件边框、分割线", category: "border" },
|
|
135
|
+
{ name: "--upf-divider-color", label: "分割线色", hint: "分割线色,用于内容分割线", category: "border" },
|
|
136
|
+
{ name: "--upf-nav-bg", label: "导航背景", hint: "导航背景色,建议使用品牌主色", category: "nav" },
|
|
137
|
+
{
|
|
138
|
+
name: "--upf-nav-border-color",
|
|
139
|
+
label: "导航边框",
|
|
140
|
+
hint: "导航边框色,用于顶部导航底部分割线",
|
|
141
|
+
category: "nav",
|
|
142
|
+
fallback: ["--upf-divider-color", "--upf-border-color"],
|
|
143
|
+
fallbackDeps: ["--upf-divider-color", "--upf-border-color"]
|
|
144
|
+
},
|
|
145
|
+
{ name: "--upf-nav-text", label: "导航文本", hint: "导航文本色,用于导航栏文字", category: "nav" },
|
|
146
|
+
{ name: "--upf-nav-hover-bg", label: "导航悬停", hint: "导航悬停背景,用于导航项悬停状态", category: "nav" },
|
|
147
|
+
{ name: "--upf-nav-active-bg", label: "导航激活", hint: "导航激活背景,用于导航项激活状态", category: "nav" },
|
|
148
|
+
{ name: "--upf-nav-active-text", label: "导航激活文本", hint: "导航激活文本,用于导航项激活状态文字", category: "nav" },
|
|
149
|
+
{ name: "--upf-menu-bg", label: "菜单背景", hint: "菜单背景,用于侧边菜单背景", category: "menu" },
|
|
150
|
+
{ name: "--upf-menu-text", label: "菜单文本", hint: "菜单文本,用于菜单项文字", category: "menu" },
|
|
151
|
+
{ name: "--upf-menu-hover-bg", label: "菜单悬停", hint: "菜单悬停背景,用于菜单项悬停状态", category: "menu" },
|
|
152
|
+
{ name: "--upf-menu-active-bg", label: "菜单激活", hint: "菜单激活背景,用于菜单项激活状态", category: "menu" },
|
|
153
|
+
{ name: "--upf-menu-active-text", label: "菜单激活文本", hint: "菜单激活文本,建议使用功能主色", category: "menu" },
|
|
154
|
+
{ name: "--upf-menu-submenu-bg", label: "子菜单背景", hint: "子菜单背景,用于子菜单展开背景", category: "menu" },
|
|
155
|
+
{ name: "--upf-tab-bg", label: "标签背景", hint: "标签背景,用于标签页背景", category: "tab" },
|
|
156
|
+
{ name: "--upf-tab-text", label: "标签文本", hint: "标签文本,用于标签页文字", category: "tab" },
|
|
157
|
+
{ name: "--upf-tab-hover-bg", label: "标签悬停", hint: "标签悬停背景,用于标签页悬停状态", category: "tab" },
|
|
158
|
+
{ name: "--upf-tab-active-bg", label: "标签激活", hint: "标签激活背景,用于标签页激活状态", category: "tab" },
|
|
159
|
+
{ name: "--upf-tab-active-text", label: "标签激活文本", hint: "标签激活文本,建议使用功能主色", category: "tab" },
|
|
160
|
+
{ name: "--upf-border-radius", label: "圆角", hint: "圆角大小,用于组件圆角", category: "effect" },
|
|
161
|
+
{ name: "--upf-box-shadow", label: "阴影", hint: "阴影效果,用于普通阴影", category: "effect" },
|
|
162
|
+
{ name: "--upf-box-shadow-elevated", label: "浮层阴影", hint: "浮层阴影,用于弹窗、浮层阴影", category: "effect" }
|
|
163
|
+
], me = S.map((e) => e.name), de = S.reduce((e, r) => (e[r.name] = r.label, e), {}), ge = S.reduce((e, r) => (e[r.name] = r.hint, e), {}), be = {
|
|
164
|
+
"--upf-nav-bg": "--upf-brand-primary",
|
|
165
|
+
"--upf-color-primary-bg": "--upf-color-primary",
|
|
166
|
+
"--upf-menu-active-text": "--upf-color-primary",
|
|
167
|
+
"--upf-tab-active-text": "--upf-color-primary"
|
|
168
|
+
}, v = {
|
|
169
|
+
"--upf-color-primary": z,
|
|
170
|
+
"--upf-color-primary-bg": D(z),
|
|
32
171
|
"--upf-color-success": "#52c41a",
|
|
33
172
|
"--upf-color-warning": "#faad14",
|
|
34
173
|
"--upf-color-error": "#ff4d4f",
|
|
35
174
|
"--upf-color-info": "#1890ff",
|
|
36
|
-
"--upf-text-primary": "#212121",
|
|
37
|
-
"--upf-text-secondary": "#666666",
|
|
38
175
|
"--upf-text-disabled": "#B2B2B2",
|
|
39
|
-
"--upf-text-placeholder": "#bfbfbf",
|
|
40
176
|
"--upf-bg-primary": "#ffffff",
|
|
41
177
|
"--upf-bg-secondary": "#F2F2F2",
|
|
42
178
|
"--upf-bg-elevated": "#ffffff",
|
|
43
|
-
"--upf-bg-mask": "rgba(0, 0, 0, 0.45)",
|
|
44
179
|
"--upf-border-color": "#D9D9D9",
|
|
45
|
-
"--upf-
|
|
46
|
-
"--upf-nav-bg": "#ffffff",
|
|
47
|
-
"--upf-nav-text": "#212121",
|
|
48
|
-
"--upf-nav-hover-bg": "#f2f6ff",
|
|
49
|
-
"--upf-nav-active-bg": "#f2f6ff",
|
|
50
|
-
"--upf-nav-active-text": "#5582f3",
|
|
51
|
-
"--upf-menu-bg": "#ffffff",
|
|
52
|
-
"--upf-menu-text": "#212121",
|
|
53
|
-
"--upf-menu-hover-bg": "#f2f2f2",
|
|
54
|
-
"--upf-menu-active-bg": "#f2f6ff",
|
|
55
|
-
"--upf-menu-active-text": "#5582f3",
|
|
56
|
-
"--upf-menu-submenu-bg": "#ffffff",
|
|
180
|
+
"--upf-nav-border-color": "rgba(235, 239, 245, 1)",
|
|
57
181
|
"--upf-tab-bg": "#ffffff",
|
|
58
182
|
"--upf-tab-text": "#666666",
|
|
59
|
-
"--upf-tab-hover-bg": "#f2f6ff",
|
|
60
183
|
"--upf-tab-active-bg": "#ffffff",
|
|
61
|
-
"--upf-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
184
|
+
"--upf-border-radius": "4px"
|
|
185
|
+
}, y = {
|
|
186
|
+
default: {
|
|
187
|
+
...v,
|
|
188
|
+
"--upf-brand-primary": "#0e5fd8",
|
|
189
|
+
"--upf-brand-secondary": "#3579de",
|
|
190
|
+
"--upf-text-primary": "#231815",
|
|
191
|
+
"--upf-text-secondary": "#666666",
|
|
192
|
+
"--upf-text-placeholder": "#bfbfbf",
|
|
193
|
+
"--upf-bg-mask": "rgba(0, 0, 0, 0.45)",
|
|
194
|
+
"--upf-divider-color": "#ebeff5",
|
|
195
|
+
"--upf-nav-bg": "#0e5fd8",
|
|
196
|
+
"--upf-nav-text": "#ffffff",
|
|
197
|
+
"--upf-nav-hover-bg": "#3579de",
|
|
198
|
+
"--upf-nav-active-bg": "#3579de",
|
|
199
|
+
"--upf-nav-active-text": "#ffffff",
|
|
200
|
+
"--upf-menu-bg": "#ffffff",
|
|
201
|
+
"--upf-menu-text": "#231815",
|
|
202
|
+
"--upf-menu-hover-bg": "#f2f2f2",
|
|
203
|
+
"--upf-menu-active-bg": "#eef3fe",
|
|
204
|
+
"--upf-menu-active-text": "#5582f3",
|
|
205
|
+
"--upf-menu-submenu-bg": "#ffffff",
|
|
206
|
+
"--upf-tab-hover-bg": "#eef3fe",
|
|
207
|
+
"--upf-tab-active-text": "#5582f3",
|
|
208
|
+
"--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.1)",
|
|
209
|
+
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.15)"
|
|
210
|
+
},
|
|
211
|
+
cjb: {
|
|
212
|
+
...v,
|
|
213
|
+
"--upf-brand-primary": "#ffffff",
|
|
214
|
+
"--upf-brand-secondary": "#f2f6ff",
|
|
215
|
+
"--upf-text-primary": "#212121",
|
|
216
|
+
"--upf-text-secondary": "#666666",
|
|
217
|
+
"--upf-text-placeholder": "#bfbfbf",
|
|
218
|
+
"--upf-bg-mask": "rgba(0, 0, 0, 0.45)",
|
|
219
|
+
"--upf-divider-color": "#ebeff5",
|
|
220
|
+
"--upf-nav-bg": "#ffffff",
|
|
221
|
+
"--upf-nav-text": "#212121",
|
|
222
|
+
"--upf-nav-hover-bg": "#f2f6ff",
|
|
223
|
+
"--upf-nav-active-bg": "#f2f6ff",
|
|
224
|
+
"--upf-nav-active-text": "#5582f3",
|
|
225
|
+
"--upf-menu-bg": "#ffffff",
|
|
226
|
+
"--upf-menu-text": "#212121",
|
|
227
|
+
"--upf-menu-hover-bg": "#f2f2f2",
|
|
228
|
+
"--upf-menu-active-bg": "#f2f6ff",
|
|
229
|
+
"--upf-menu-active-text": "#5582f3",
|
|
230
|
+
"--upf-menu-submenu-bg": "#ffffff",
|
|
231
|
+
"--upf-tab-hover-bg": "#f2f6ff",
|
|
232
|
+
"--upf-tab-active-text": "#5582f3",
|
|
233
|
+
"--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
|
|
234
|
+
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
|
|
235
|
+
},
|
|
236
|
+
ssl: {
|
|
237
|
+
...v,
|
|
238
|
+
"--upf-brand-primary": "#1f2346",
|
|
239
|
+
"--upf-brand-secondary": "#2d3158",
|
|
240
|
+
"--upf-text-primary": "#231815",
|
|
241
|
+
"--upf-text-secondary": "#666666",
|
|
242
|
+
"--upf-text-placeholder": "#b8c0cc",
|
|
243
|
+
"--upf-bg-mask": "rgba(15, 23, 42, 0.45)",
|
|
244
|
+
"--upf-divider-color": "rgba(235, 239, 245, 1)",
|
|
245
|
+
"--upf-nav-bg": "#1f2346",
|
|
246
|
+
"--upf-nav-border-color": "rgba(235, 239, 245, 0.1)",
|
|
247
|
+
"--upf-nav-text": "#ffffff",
|
|
248
|
+
"--upf-nav-hover-bg": "rgba(255, 255, 255, 0.16)",
|
|
249
|
+
"--upf-nav-active-bg": "#5582f3",
|
|
250
|
+
"--upf-nav-active-text": "#ffffff",
|
|
251
|
+
"--upf-menu-bg": "#1f2346",
|
|
252
|
+
"--upf-menu-text": "#ffffff",
|
|
253
|
+
"--upf-menu-hover-bg": "#2d3158",
|
|
254
|
+
"--upf-menu-active-bg": "#2d3158",
|
|
255
|
+
"--upf-menu-active-text": "#ffffff",
|
|
256
|
+
"--upf-menu-submenu-bg": "#171b36",
|
|
257
|
+
"--upf-tab-hover-bg": "#f2f6ff",
|
|
258
|
+
"--upf-tab-active-text": "#5582f3",
|
|
259
|
+
"--upf-box-shadow": "0 6px 18px rgba(15, 23, 42, 0.08)",
|
|
260
|
+
"--upf-box-shadow-elevated": "0 10px 28px rgba(35, 41, 75, 0.12)"
|
|
261
|
+
},
|
|
262
|
+
dkh: {
|
|
263
|
+
...v,
|
|
264
|
+
"--upf-brand-primary": "#eb0e1b",
|
|
265
|
+
"--upf-brand-secondary": "#f15760",
|
|
266
|
+
"--upf-color-primary": j,
|
|
267
|
+
"--upf-color-primary-bg": D(j),
|
|
268
|
+
"--upf-text-primary": "#231815",
|
|
269
|
+
"--upf-text-secondary": "#666666",
|
|
270
|
+
"--upf-text-placeholder": "#bfbfbf",
|
|
271
|
+
"--upf-bg-mask": "rgba(0, 0, 0, 0.45)",
|
|
272
|
+
"--upf-divider-color": "#ebeff5",
|
|
273
|
+
"--upf-nav-bg": "#eb0e1b",
|
|
274
|
+
"--upf-nav-text": "#ffffff",
|
|
275
|
+
"--upf-nav-hover-bg": "rgba(255, 255, 255, 0.3)",
|
|
276
|
+
"--upf-nav-active-bg": "rgba(255, 255, 255, 0.3)",
|
|
277
|
+
"--upf-nav-active-text": "#ffffff",
|
|
278
|
+
"--upf-menu-bg": "#ffffff",
|
|
279
|
+
"--upf-menu-text": "#231815",
|
|
280
|
+
"--upf-menu-hover-bg": "#f5f5f5",
|
|
281
|
+
"--upf-menu-active-bg": "#fce8ea",
|
|
282
|
+
"--upf-menu-active-text": "#e63946",
|
|
283
|
+
"--upf-menu-submenu-bg": "#ffffff",
|
|
284
|
+
"--upf-tab-hover-bg": "#fce8ea",
|
|
285
|
+
"--upf-tab-active-text": "#e63946",
|
|
286
|
+
"--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
|
|
287
|
+
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
|
|
288
|
+
}
|
|
289
|
+
}, he = (e, r) => {
|
|
290
|
+
if (!r)
|
|
291
|
+
return "";
|
|
292
|
+
if (typeof r == "function")
|
|
293
|
+
return String(r(e) || "");
|
|
294
|
+
const t = Array.isArray(r) ? r : [r];
|
|
295
|
+
for (const o of t) {
|
|
296
|
+
const u = String(e[o] || "").trim();
|
|
297
|
+
if (u)
|
|
298
|
+
return u;
|
|
299
|
+
}
|
|
300
|
+
return "";
|
|
301
|
+
}, $ = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), br = () => [...me], hr = () => ({ ...de }), yr = () => ({ ...ge }), vr = () => pe.map((e) => ({
|
|
302
|
+
...e,
|
|
303
|
+
variables: [...e.variables]
|
|
304
|
+
})), xr = () => ({ ...be }), ye = (e, r = y.default) => {
|
|
305
|
+
const t = $(e), o = $(r), u = {
|
|
306
|
+
...o,
|
|
307
|
+
...t
|
|
308
|
+
};
|
|
309
|
+
return S.reduce((n, l) => {
|
|
310
|
+
var p;
|
|
311
|
+
const i = t[l.name] || "", s = (p = l.fallbackDeps) == null ? void 0 : p.some((U) => !!t[U]), c = he({ ...u, ...n }, l.fallback);
|
|
312
|
+
return n[l.name] = i || (s ? c : "") || o[l.name] || c, n;
|
|
313
|
+
}, {});
|
|
314
|
+
}, ve = y.cjb, xe = {
|
|
66
315
|
name: "cjb",
|
|
67
316
|
displayName: "纯净白",
|
|
68
317
|
description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
|
|
69
318
|
mode: "light",
|
|
70
319
|
source: "preset",
|
|
71
320
|
basePresetName: "cjb",
|
|
72
|
-
variables:
|
|
73
|
-
},
|
|
74
|
-
"--upf-brand-primary": "#0e5fd8",
|
|
75
|
-
"--upf-brand-secondary": "#3579de",
|
|
76
|
-
"--upf-color-primary": L,
|
|
77
|
-
"--upf-color-primary-bg": y(L),
|
|
78
|
-
"--upf-color-success": "#52c41a",
|
|
79
|
-
"--upf-color-warning": "#faad14",
|
|
80
|
-
"--upf-color-error": "#ff4d4f",
|
|
81
|
-
"--upf-color-info": "#1890ff",
|
|
82
|
-
"--upf-text-primary": "#231815",
|
|
83
|
-
"--upf-text-secondary": "#666666",
|
|
84
|
-
"--upf-text-disabled": "#B2B2B2",
|
|
85
|
-
"--upf-text-placeholder": "#bfbfbf",
|
|
86
|
-
"--upf-bg-primary": "#ffffff",
|
|
87
|
-
"--upf-bg-secondary": "#F2F2F2",
|
|
88
|
-
"--upf-bg-elevated": "#ffffff",
|
|
89
|
-
"--upf-bg-mask": "rgba(0, 0, 0, 0.45)",
|
|
90
|
-
"--upf-border-color": "#D9D9D9",
|
|
91
|
-
"--upf-divider-color": "#ebeff5",
|
|
92
|
-
"--upf-nav-bg": "#0e5fd8",
|
|
93
|
-
"--upf-nav-text": "#ffffff",
|
|
94
|
-
"--upf-nav-hover-bg": "#3579de",
|
|
95
|
-
"--upf-nav-active-bg": "#3579de",
|
|
96
|
-
"--upf-nav-active-text": "#ffffff",
|
|
97
|
-
"--upf-menu-bg": "#ffffff",
|
|
98
|
-
"--upf-menu-text": "#231815",
|
|
99
|
-
"--upf-menu-hover-bg": "#f2f2f2",
|
|
100
|
-
"--upf-menu-active-bg": "#eef3fe",
|
|
101
|
-
"--upf-menu-active-text": "#5582f3",
|
|
102
|
-
"--upf-menu-submenu-bg": "#ffffff",
|
|
103
|
-
"--upf-tab-bg": "#ffffff",
|
|
104
|
-
"--upf-tab-text": "#666666",
|
|
105
|
-
"--upf-tab-hover-bg": "#eef3fe",
|
|
106
|
-
"--upf-tab-active-bg": "#ffffff",
|
|
107
|
-
"--upf-tab-active-text": "#5582f3",
|
|
108
|
-
"--upf-border-radius": "4px",
|
|
109
|
-
"--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.1)",
|
|
110
|
-
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.15)"
|
|
111
|
-
}, pe = {
|
|
321
|
+
variables: ve
|
|
322
|
+
}, Ee = y.default, Te = {
|
|
112
323
|
name: "default",
|
|
113
324
|
displayName: "经典蓝",
|
|
114
325
|
description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
|
|
115
326
|
mode: "light",
|
|
116
327
|
source: "preset",
|
|
117
328
|
basePresetName: "default",
|
|
118
|
-
variables:
|
|
119
|
-
},
|
|
120
|
-
"--upf-brand-primary": "#eb0e1b",
|
|
121
|
-
"--upf-brand-secondary": "#f15760",
|
|
122
|
-
"--upf-color-primary": z,
|
|
123
|
-
"--upf-color-primary-bg": y(z),
|
|
124
|
-
"--upf-color-success": "#52c41a",
|
|
125
|
-
"--upf-color-warning": "#faad14",
|
|
126
|
-
"--upf-color-error": "#ff4d4f",
|
|
127
|
-
"--upf-color-info": "#1890ff",
|
|
128
|
-
"--upf-text-primary": "#231815",
|
|
129
|
-
"--upf-text-secondary": "#666666",
|
|
130
|
-
"--upf-text-disabled": "#B2B2B2",
|
|
131
|
-
"--upf-text-placeholder": "#bfbfbf",
|
|
132
|
-
"--upf-bg-primary": "#ffffff",
|
|
133
|
-
"--upf-bg-secondary": "#F2F2F2",
|
|
134
|
-
"--upf-bg-elevated": "#ffffff",
|
|
135
|
-
"--upf-bg-mask": "rgba(0, 0, 0, 0.45)",
|
|
136
|
-
"--upf-border-color": "#D9D9D9",
|
|
137
|
-
"--upf-divider-color": "#ebeff5",
|
|
138
|
-
"--upf-nav-bg": "#eb0e1b",
|
|
139
|
-
"--upf-nav-text": "#ffffff",
|
|
140
|
-
"--upf-nav-hover-bg": "rgba(255, 255, 255, 0.3)",
|
|
141
|
-
"--upf-nav-active-bg": "rgba(255, 255, 255, 0.3)",
|
|
142
|
-
"--upf-nav-active-text": "#ffffff",
|
|
143
|
-
"--upf-menu-bg": "#ffffff",
|
|
144
|
-
"--upf-menu-text": "#231815",
|
|
145
|
-
"--upf-menu-hover-bg": "#f5f5f5",
|
|
146
|
-
"--upf-menu-active-bg": "#fce8ea",
|
|
147
|
-
"--upf-menu-active-text": "#e63946",
|
|
148
|
-
"--upf-menu-submenu-bg": "#ffffff",
|
|
149
|
-
"--upf-tab-bg": "#ffffff",
|
|
150
|
-
"--upf-tab-text": "#666666",
|
|
151
|
-
"--upf-tab-hover-bg": "#fce8ea",
|
|
152
|
-
"--upf-tab-active-bg": "#ffffff",
|
|
153
|
-
"--upf-tab-active-text": "#e63946",
|
|
154
|
-
"--upf-border-radius": "4px",
|
|
155
|
-
"--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
|
|
156
|
-
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
|
|
157
|
-
}, de = {
|
|
329
|
+
variables: Ee
|
|
330
|
+
}, Ce = y.dkh, Se = {
|
|
158
331
|
name: "dkh",
|
|
159
332
|
displayName: "大咖红",
|
|
160
333
|
description: "大咖红主题,壳层与内容交互色保持同系红色",
|
|
161
334
|
mode: "light",
|
|
162
335
|
source: "preset",
|
|
163
336
|
basePresetName: "dkh",
|
|
164
|
-
variables:
|
|
165
|
-
},
|
|
166
|
-
"--upf-brand-primary": "#1f2346",
|
|
167
|
-
"--upf-brand-secondary": "#2d3158",
|
|
168
|
-
"--upf-color-primary": U,
|
|
169
|
-
"--upf-color-primary-bg": y(U),
|
|
170
|
-
"--upf-color-success": "#52c41a",
|
|
171
|
-
"--upf-color-warning": "#faad14",
|
|
172
|
-
"--upf-color-error": "#ff4d4f",
|
|
173
|
-
"--upf-color-info": "#1890ff",
|
|
174
|
-
"--upf-text-primary": "#231815",
|
|
175
|
-
"--upf-text-secondary": "#666666",
|
|
176
|
-
"--upf-text-disabled": "#B2B2B2",
|
|
177
|
-
"--upf-text-placeholder": "#b8c0cc",
|
|
178
|
-
"--upf-bg-primary": "#ffffff",
|
|
179
|
-
"--upf-bg-secondary": "#F2F2F2",
|
|
180
|
-
"--upf-bg-elevated": "#ffffff",
|
|
181
|
-
"--upf-bg-mask": "rgba(15, 23, 42, 0.45)",
|
|
182
|
-
"--upf-border-color": "#D9D9D9",
|
|
183
|
-
"--upf-divider-color": "rgba(235, 239, 245, 0.1)",
|
|
184
|
-
"--upf-nav-bg": "#1f2346",
|
|
185
|
-
"--upf-nav-text": "#ffffff",
|
|
186
|
-
"--upf-nav-hover-bg": "rgba(255, 255, 255, 0.16)",
|
|
187
|
-
"--upf-nav-active-bg": "#5582f3",
|
|
188
|
-
"--upf-nav-active-text": "#ffffff",
|
|
189
|
-
"--upf-menu-bg": "#1f2346",
|
|
190
|
-
"--upf-menu-text": "#ffffff",
|
|
191
|
-
"--upf-menu-hover-bg": "#2d3158",
|
|
192
|
-
"--upf-menu-active-bg": "#2d3158",
|
|
193
|
-
"--upf-menu-active-text": "#ffffff",
|
|
194
|
-
"--upf-menu-submenu-bg": "#171b36",
|
|
195
|
-
"--upf-tab-bg": "#ffffff",
|
|
196
|
-
"--upf-tab-text": "#666666",
|
|
197
|
-
"--upf-tab-hover-bg": "#f2f6ff",
|
|
198
|
-
"--upf-tab-active-bg": "#ffffff",
|
|
199
|
-
"--upf-tab-active-text": "#5582f3",
|
|
200
|
-
"--upf-border-radius": "4px",
|
|
201
|
-
"--upf-box-shadow": "0 6px 18px rgba(15, 23, 42, 0.08)",
|
|
202
|
-
"--upf-box-shadow-elevated": "0 10px 28px rgba(35, 41, 75, 0.12)"
|
|
203
|
-
}, be = {
|
|
337
|
+
variables: Ce
|
|
338
|
+
}, we = y.ssl, Fe = {
|
|
204
339
|
name: "ssl",
|
|
205
340
|
displayName: "深邃蓝",
|
|
206
341
|
description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
|
|
207
342
|
mode: "dark",
|
|
208
343
|
source: "preset",
|
|
209
344
|
basePresetName: "ssl",
|
|
210
|
-
variables:
|
|
211
|
-
},
|
|
212
|
-
default:
|
|
213
|
-
cjb:
|
|
214
|
-
ssl:
|
|
215
|
-
dkh:
|
|
216
|
-
},
|
|
345
|
+
variables: we
|
|
346
|
+
}, _e = ["default", "cjb", "ssl", "dkh"], R = {
|
|
347
|
+
default: Te,
|
|
348
|
+
cjb: xe,
|
|
349
|
+
ssl: Fe,
|
|
350
|
+
dkh: Se
|
|
351
|
+
}, Ne = (e) => ({ ...e }), Z = (e) => ({
|
|
217
352
|
...e,
|
|
218
|
-
variables:
|
|
353
|
+
variables: Ne(e.variables)
|
|
219
354
|
}), g = (e) => {
|
|
220
355
|
const r = String(e || "").trim();
|
|
221
|
-
return
|
|
222
|
-
},
|
|
223
|
-
const t =
|
|
356
|
+
return R[r] ? Z(R[r]) : void 0;
|
|
357
|
+
}, Ae = () => _e.map((e) => Z(R[e])), ee = (e) => e, a = (e, r) => {
|
|
358
|
+
const t = ee(e);
|
|
224
359
|
return String((r ? t[r] : "") ?? "");
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}, Te = {
|
|
360
|
+
}, f = (e, r) => r.map((t) => ({ target: t, from: e })), M = (e) => {
|
|
361
|
+
const r = ee(e);
|
|
362
|
+
return {
|
|
363
|
+
...Object.entries(r).reduce((o, [u, n]) => (o[u] = String(n ?? ""), o), {}),
|
|
364
|
+
...ye(r)
|
|
365
|
+
};
|
|
366
|
+
}, ke = {
|
|
233
367
|
"#5582f3": "#3761CA",
|
|
234
368
|
"#e63946": "#C9303C"
|
|
235
|
-
},
|
|
369
|
+
}, K = (e, r) => {
|
|
236
370
|
const t = e || "#5582F3";
|
|
237
|
-
return
|
|
238
|
-
},
|
|
239
|
-
const
|
|
240
|
-
return
|
|
241
|
-
o[
|
|
371
|
+
return ke[X(t).toLowerCase()] || r(t, d, 0.84, "#3761CA");
|
|
372
|
+
}, He = "#999", Ve = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), Be = (e) => Ve(e) ? He : a(e.variables, "--upf-color-primary"), Re = (e) => Array.isArray(e) ? [...e] : [e], w = (e, r, t = {}) => r.reduce((o, u) => {
|
|
373
|
+
const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: Q, toRgbaColor: ce, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
|
|
374
|
+
return Re(u.target).forEach((l) => {
|
|
375
|
+
o[l] = String(n ?? "");
|
|
242
376
|
}), o;
|
|
243
|
-
}, {}),
|
|
377
|
+
}, {}), De = [
|
|
244
378
|
{ target: "--upf-primary", from: "--upf-color-primary" },
|
|
245
379
|
{ target: "--upf-text", from: "--upf-text-primary" },
|
|
246
380
|
{ target: "--upf-surface", from: "--upf-bg-primary" },
|
|
@@ -250,7 +384,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
250
384
|
{ target: "--upf-menu-item-hover-bg", from: "--upf-menu-hover-bg" },
|
|
251
385
|
{ target: "--upf-menu-item-active-bg", from: "--upf-menu-active-bg" },
|
|
252
386
|
{ target: "--upf-menu-item-active-text", from: "--upf-menu-active-text" }
|
|
253
|
-
],
|
|
387
|
+
], Me = [
|
|
254
388
|
{ target: "--el-color-primary", from: "--upf-color-primary" },
|
|
255
389
|
{ target: "--el-color-success", from: "--upf-color-success" },
|
|
256
390
|
{ target: "--el-color-warning", from: "--upf-color-warning" },
|
|
@@ -278,18 +412,18 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
278
412
|
{ target: "--el-checkbox-font-weight", value: "400" },
|
|
279
413
|
{ target: "--el-checkbox-input-width", value: "14px" },
|
|
280
414
|
{ target: "--el-checkbox-input-height", value: "14px" },
|
|
281
|
-
{ target: "--el-checkbox-checked-icon-color", value:
|
|
415
|
+
{ target: "--el-checkbox-checked-icon-color", value: m },
|
|
282
416
|
{
|
|
283
417
|
target: "--el-checkbox-input-border",
|
|
284
418
|
resolve: ({ variables: e }) => `1px solid ${a(e, "--upf-border-color")}`
|
|
285
419
|
}
|
|
286
|
-
],
|
|
420
|
+
], Pe = [
|
|
287
421
|
{ target: "--das-ui-color-primary-level1", from: "--upf-color-primary-bg" },
|
|
288
|
-
...
|
|
422
|
+
...f("--upf-color-primary-bg", [
|
|
289
423
|
"--das-ui-color-primary-level1",
|
|
290
424
|
"--das-ui-upload-bgcolor-hover"
|
|
291
425
|
]),
|
|
292
|
-
...
|
|
426
|
+
...f("--upf-bg-primary", [
|
|
293
427
|
"--das-black-list-mange-color-white"
|
|
294
428
|
]),
|
|
295
429
|
{ target: "--das-ui-color-primary", from: "--upf-color-primary" },
|
|
@@ -309,7 +443,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
309
443
|
// 共享桥接先兜底旧加载态、下拉态和范围选择器变量,保证首批迁移组件样式稳定。
|
|
310
444
|
{ target: "--das-ui-split-panel-color-primary", from: "--upf-color-primary" },
|
|
311
445
|
{ target: "--das-ui-split-panel-color-line", from: "--upf-divider-color" },
|
|
312
|
-
{ target: "--das-ui-split-panel-color-btn",
|
|
446
|
+
{ target: "--das-ui-split-panel-color-btn", value: "#999999" },
|
|
313
447
|
{ target: "--das-ui-tree-table-highlight-color", from: "--upf-color-primary" },
|
|
314
448
|
{ target: "--das-ui-tree-table-header-color", from: "--upf-text-primary" },
|
|
315
449
|
{ target: "--das-ui-tree-table-header-bg-color", from: "--upf-bg-secondary" },
|
|
@@ -367,7 +501,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
367
501
|
{ target: "--das-input-base-border-color", from: "--upf-border-color" },
|
|
368
502
|
{
|
|
369
503
|
target: ["--upf-form-active-border-color", "--das-input-active-border-color", "--upf-date-picker-active-border-color"],
|
|
370
|
-
resolve:
|
|
504
|
+
resolve: Be
|
|
371
505
|
},
|
|
372
506
|
{ target: "--das-input-font-color", from: "--upf-text-primary" },
|
|
373
507
|
{ target: "--das-input-sub-font-color", from: "--upf-text-placeholder" },
|
|
@@ -378,7 +512,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
378
512
|
{ target: "--das-ui-scrollbar-thumb-hover-color", from: "--upf-text-secondary" },
|
|
379
513
|
{ target: "--das-ui-scrollbar-padding", value: "1px" },
|
|
380
514
|
{ target: "--das-ui-scrollbar-thumb-size", value: "8px" },
|
|
381
|
-
{ target: "--das-user-manage-white", value:
|
|
515
|
+
{ target: "--das-user-manage-white", value: m },
|
|
382
516
|
{ target: "--das-user-manage-shadow-color", value: "rgba(38, 38, 38, 0.1)" },
|
|
383
517
|
{ target: "--das-user-manage-border-color", value: "rgba(38, 38, 38, 0.1)" },
|
|
384
518
|
{ target: "--das-layout-micro-container-bg-color", value: "#e2e7ef" },
|
|
@@ -389,7 +523,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
389
523
|
{ target: "--das-upf-ui-font-size-sm", value: "14px" },
|
|
390
524
|
{ target: "--das-upf-ui-line-height", value: "32px" },
|
|
391
525
|
{ target: "--das-ui-text-tooltip-shadow", value: "rgba(0, 0, 0, 0.2)" },
|
|
392
|
-
{ target: "--das-ui-text-tooltip-bgcolor", value:
|
|
526
|
+
{ target: "--das-ui-text-tooltip-bgcolor", value: m },
|
|
393
527
|
{ target: "--das-ui-search-form-font-color", from: "--upf-text-primary" },
|
|
394
528
|
{ target: "--das-ui-search-form-filter-font-color", from: "--upf-text-secondary" },
|
|
395
529
|
{ target: "--das-ui-search-form-filter-bgcolor", from: "--upf-bg-secondary" },
|
|
@@ -530,23 +664,23 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
530
664
|
target: "--das-ui-button-primary-hover",
|
|
531
665
|
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), d, 0.82, "#104CCC")
|
|
532
666
|
},
|
|
533
|
-
...
|
|
667
|
+
...f("--upf-color-primary", [
|
|
534
668
|
"--das-ui-search-form-primary-color"
|
|
535
669
|
]),
|
|
536
|
-
...
|
|
670
|
+
...f("--upf-text-primary", [
|
|
537
671
|
"--das-ui-tag-list-text-color"
|
|
538
672
|
]),
|
|
539
|
-
...
|
|
673
|
+
...f("--upf-border-color", [
|
|
540
674
|
"--das-ui-tag-list-border-color",
|
|
541
675
|
"--das-ui-upload-border-color"
|
|
542
676
|
]),
|
|
543
|
-
...
|
|
677
|
+
...f("--upf-bg-secondary", [
|
|
544
678
|
"--das-ui-upload-bgcolor"
|
|
545
679
|
]),
|
|
546
|
-
...
|
|
680
|
+
...f("--upf-text-secondary", [
|
|
547
681
|
"--das-ui-search-form-tip-color"
|
|
548
682
|
]),
|
|
549
|
-
{ target: "--das-ui-layout-header-menu-border-color", from: "--upf-border-color" },
|
|
683
|
+
{ target: "--das-ui-layout-header-menu-border-color", from: "--upf-nav-border-color" },
|
|
550
684
|
{ target: "--das-ui-layout-header-menu-background-color", from: "--upf-nav-bg" },
|
|
551
685
|
{ target: "--das-ui-layout-header-menu-color", from: "--upf-nav-text" },
|
|
552
686
|
{ target: "--das-ui-layout-header-menu-hover-background-color", from: "--upf-nav-hover-bg" },
|
|
@@ -596,43 +730,43 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
596
730
|
{ target: "--das-ui-layout-aside-menu-expired-color", from: "--upf-text-disabled" },
|
|
597
731
|
{ target: "--das-ui-layout-aside-menu-top-left-icon-color", from: "--upf-color-primary" },
|
|
598
732
|
{ target: "--das-ui-layout-aside-menu-top-right-icon-color", from: "--upf-text-secondary" }
|
|
599
|
-
],
|
|
733
|
+
], Ie = [
|
|
600
734
|
// 同源变量集中维护,新增 target 时优先追加到对应 source 分组。
|
|
601
|
-
...
|
|
735
|
+
...f("--upf-color-primary", [
|
|
602
736
|
"--upf-button-primary",
|
|
603
737
|
"--upf-notification-primary-bg"
|
|
604
738
|
]),
|
|
605
|
-
...
|
|
739
|
+
...f("--upf-text-primary", [
|
|
606
740
|
"--upf-button-default-text",
|
|
607
741
|
"--upf-notification-title-text",
|
|
608
742
|
"--upf-text-tooltip-text"
|
|
609
743
|
]),
|
|
610
|
-
...
|
|
744
|
+
...f("--upf-border-color", [
|
|
611
745
|
"--upf-button-default-border",
|
|
612
746
|
"--upf-text-tooltip-border"
|
|
613
747
|
]),
|
|
614
|
-
...
|
|
748
|
+
...f("--upf-text-disabled", [
|
|
615
749
|
"--upf-button-default-disabled",
|
|
616
750
|
"--upf-switch-off-color",
|
|
617
751
|
"--upf-message-thumb",
|
|
618
752
|
"--upf-text-tooltip-scrollbar-thumb"
|
|
619
753
|
]),
|
|
620
|
-
...
|
|
754
|
+
...f("--upf-bg-secondary", [
|
|
621
755
|
"--upf-button-default-disabled-bg",
|
|
622
756
|
"--upf-table-header-bg"
|
|
623
757
|
]),
|
|
624
|
-
...
|
|
625
|
-
...
|
|
626
|
-
...
|
|
627
|
-
...
|
|
628
|
-
...
|
|
629
|
-
...
|
|
758
|
+
...f("--upf-bg-primary", ["--upf-checkbox-filter-bg"]),
|
|
759
|
+
...f("--upf-color-info", ["--upf-loading-color-1"]),
|
|
760
|
+
...f("--upf-brand-secondary", ["--upf-loading-color-2"]),
|
|
761
|
+
...f("--upf-color-success", ["--upf-loading-color-3"]),
|
|
762
|
+
...f("--upf-divider-color", ["--upf-loading-color-6"]),
|
|
763
|
+
...f("--upf-text-secondary", [
|
|
630
764
|
"--upf-message-close",
|
|
631
765
|
"--upf-notification-description-text",
|
|
632
766
|
"--upf-notification-close",
|
|
633
767
|
"--upf-text-tooltip-scrollbar-thumb-hover"
|
|
634
768
|
]),
|
|
635
|
-
{ target: "--upf-button-primary-text", value:
|
|
769
|
+
{ target: "--upf-button-primary-text", value: m },
|
|
636
770
|
{ target: "--upf-button-primary-text-disabled", value: "rgba(255, 255, 255, 1)" },
|
|
637
771
|
{ target: "--upf-dialog-basic-header-height", value: "50px" },
|
|
638
772
|
{ target: "--upf-dialog-basic-content-padding", value: "30px" },
|
|
@@ -651,19 +785,19 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
651
785
|
{ target: "--upf-notification-font-size-sm", value: "12px" },
|
|
652
786
|
{ target: "--upf-notification-font-size-md", value: "14px" },
|
|
653
787
|
{ target: "--upf-notification-font-size-lg", value: "16px" },
|
|
654
|
-
{ target: "--upf-notification-primary-text", value:
|
|
788
|
+
{ target: "--upf-notification-primary-text", value: m },
|
|
655
789
|
{ target: "--upf-text-tooltip-scrollbar-padding", value: "1px" },
|
|
656
790
|
{
|
|
657
791
|
target: "--upf-button-primary-hover",
|
|
658
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3",
|
|
792
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", m, 0.82, "#87A9FF")
|
|
659
793
|
},
|
|
660
794
|
{
|
|
661
795
|
target: "--upf-button-active",
|
|
662
|
-
resolve: ({ variables: e, mixHexColor: r }) =>
|
|
796
|
+
resolve: ({ variables: e, mixHexColor: r }) => K(a(e, "--upf-color-primary"), r)
|
|
663
797
|
},
|
|
664
798
|
{
|
|
665
799
|
target: "--upf-button-disabled",
|
|
666
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3",
|
|
800
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", m, 0.3, "#B5CAFF")
|
|
667
801
|
},
|
|
668
802
|
{
|
|
669
803
|
target: "--upf-button-set",
|
|
@@ -675,7 +809,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
675
809
|
},
|
|
676
810
|
{
|
|
677
811
|
target: "--upf-button-set-active",
|
|
678
|
-
resolve: ({ variables: e, mixHexColor: r }) =>
|
|
812
|
+
resolve: ({ variables: e, mixHexColor: r }) => K(a(e, "--upf-color-primary"), r)
|
|
679
813
|
},
|
|
680
814
|
{
|
|
681
815
|
target: "--upf-button-set-disabled",
|
|
@@ -688,7 +822,7 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
688
822
|
},
|
|
689
823
|
{
|
|
690
824
|
target: "--upf-switch-on-color-disabled",
|
|
691
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"),
|
|
825
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), m, 0.32, "#B5CAFF")
|
|
692
826
|
},
|
|
693
827
|
{
|
|
694
828
|
target: "--upf-checkbox-focus-shadow",
|
|
@@ -879,69 +1013,69 @@ const p = "#ffffff", d = "#000000", ne = 0.115, q = (e) => {
|
|
|
879
1013
|
},
|
|
880
1014
|
{ target: "--upf-app-container-app-bg-override", from: "--upf-nav-bg" },
|
|
881
1015
|
{ target: "--upf-app-container-app-text-override", from: "--upf-nav-text" }
|
|
882
|
-
],
|
|
883
|
-
const t =
|
|
1016
|
+
], Oe = (e, r = {}) => w(e, De, r), Le = (e, r = {}) => w(e, Me, r), Ue = (e, r = {}) => w(e, Pe, r), ze = (e, r = {}) => w(e, Ie, r), P = (e, r = {}) => {
|
|
1017
|
+
const t = M(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = ze(t, l), s = {
|
|
884
1018
|
...t,
|
|
885
|
-
...
|
|
1019
|
+
...i
|
|
886
1020
|
};
|
|
887
1021
|
return {
|
|
888
1022
|
...t,
|
|
889
|
-
...
|
|
890
|
-
...o ?
|
|
891
|
-
...o ?
|
|
892
|
-
...
|
|
1023
|
+
...i,
|
|
1024
|
+
...o ? Le(s, l) : {},
|
|
1025
|
+
...o ? Ue(s, l) : {},
|
|
1026
|
+
...Oe(s, l)
|
|
893
1027
|
};
|
|
894
|
-
},
|
|
895
|
-
const t =
|
|
1028
|
+
}, W = "themeChange", T = "upf-theme-root-vars", je = "upf-default-theme-vars", C = "upf-theme-config", $e = ["--upf-color-primary", "--upf-brand-primary"], G = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), h = /* @__PURE__ */ new WeakMap(), E = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, Er = (e) => g(e), Tr = () => Ae(), F = () => g("default"), Cr = () => ({ ...F().variables }), I = (e) => e || (typeof document > "u" ? null : document.documentElement), re = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), _ = (e) => e.head || e.documentElement, te = (e, r) => {
|
|
1029
|
+
const t = _(e);
|
|
896
1030
|
t && (r.parentNode !== t || t.lastElementChild !== r) && t.appendChild(r);
|
|
897
|
-
},
|
|
1031
|
+
}, q = (e) => {
|
|
898
1032
|
var u;
|
|
899
|
-
if (
|
|
1033
|
+
if (Y.has(e))
|
|
900
1034
|
return;
|
|
901
|
-
const r =
|
|
1035
|
+
const r = _(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
|
|
902
1036
|
if (!r || !t)
|
|
903
1037
|
return;
|
|
904
1038
|
new t(() => {
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
}).observe(r, { childList: !0 }),
|
|
908
|
-
},
|
|
909
|
-
const r = e.getElementById(
|
|
910
|
-
if (
|
|
911
|
-
return
|
|
1039
|
+
const n = e.getElementById(T);
|
|
1040
|
+
re(n) && te(e, n);
|
|
1041
|
+
}).observe(r, { childList: !0 }), Y.add(e);
|
|
1042
|
+
}, Ke = (e) => {
|
|
1043
|
+
const r = e.getElementById(T);
|
|
1044
|
+
if (re(r))
|
|
1045
|
+
return te(e, r), q(e), r;
|
|
912
1046
|
const t = e.createElement("style");
|
|
913
|
-
return t.id =
|
|
914
|
-
},
|
|
1047
|
+
return t.id = T, _(e).appendChild(t), q(e), t;
|
|
1048
|
+
}, O = (e) => {
|
|
915
1049
|
const r = Object.entries(e).filter(([, t]) => String(t ?? "").trim()).map(([t, o]) => ` ${t}: ${String(o ?? "")};`).join(`
|
|
916
1050
|
`);
|
|
917
1051
|
return r ? `:root {
|
|
918
1052
|
${r}
|
|
919
1053
|
}` : ":root {}";
|
|
920
|
-
},
|
|
921
|
-
const t = g(e) ||
|
|
922
|
-
return
|
|
1054
|
+
}, We = (e = "default", r = {}) => {
|
|
1055
|
+
const t = g(e) || F();
|
|
1056
|
+
return O(P(t.variables, {
|
|
923
1057
|
...r,
|
|
924
1058
|
themeName: r.themeName || t.name,
|
|
925
1059
|
basePresetName: r.basePresetName || t.basePresetName
|
|
926
1060
|
}));
|
|
927
|
-
},
|
|
928
|
-
const r = e.getElementById(
|
|
1061
|
+
}, Sr = (e = {}) => We("default", e), Ge = (e) => {
|
|
1062
|
+
const r = e.getElementById(T);
|
|
929
1063
|
if (r != null && r.textContent)
|
|
930
1064
|
return !0;
|
|
931
1065
|
const t = h.get(e) || h.get(e.documentElement);
|
|
932
1066
|
return !!(t && Object.keys(t).length);
|
|
933
|
-
},
|
|
1067
|
+
}, Ye = (e) => {
|
|
934
1068
|
var o;
|
|
935
1069
|
const r = ((o = e.defaultView) == null ? void 0 : o.getComputedStyle) || (typeof getComputedStyle == "function" ? getComputedStyle : void 0);
|
|
936
1070
|
if (!r || !e.documentElement)
|
|
937
1071
|
return !1;
|
|
938
1072
|
const t = r(e.documentElement);
|
|
939
|
-
return
|
|
940
|
-
},
|
|
1073
|
+
return $e.some((u) => t.getPropertyValue(u).trim());
|
|
1074
|
+
}, L = (e) => Object.prototype.toString.call(e) === "[object Object]", N = (e) => ({
|
|
941
1075
|
themeName: e.name,
|
|
942
1076
|
basePresetName: e.basePresetName,
|
|
943
1077
|
variables: e.variables
|
|
944
|
-
}),
|
|
1078
|
+
}), x = () => N(F()), oe = (e) => {
|
|
945
1079
|
if (typeof window > "u")
|
|
946
1080
|
return null;
|
|
947
1081
|
try {
|
|
@@ -949,94 +1083,94 @@ ${r}
|
|
|
949
1083
|
if (!r)
|
|
950
1084
|
return null;
|
|
951
1085
|
const t = JSON.parse(r);
|
|
952
|
-
return
|
|
1086
|
+
return L(t) ? t : null;
|
|
953
1087
|
} catch {
|
|
954
1088
|
return null;
|
|
955
1089
|
}
|
|
956
|
-
},
|
|
957
|
-
if (!
|
|
1090
|
+
}, qe = (e, r) => {
|
|
1091
|
+
if (!L(e))
|
|
958
1092
|
return null;
|
|
959
1093
|
const t = { ...r };
|
|
960
1094
|
return Object.entries(e).forEach(([o, u]) => {
|
|
961
1095
|
!o.startsWith("--") || typeof u != "string" && typeof u != "number" || (t[o] = String(u));
|
|
962
|
-
}),
|
|
963
|
-
},
|
|
964
|
-
const r =
|
|
1096
|
+
}), M(t);
|
|
1097
|
+
}, ae = (e) => {
|
|
1098
|
+
const r = L(e.customTheme) ? e.customTheme : null;
|
|
965
1099
|
if (!r)
|
|
966
1100
|
return null;
|
|
967
|
-
const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = g(t) ||
|
|
1101
|
+
const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = g(t) || F(), u = qe(r.variables, o.variables);
|
|
968
1102
|
return u ? {
|
|
969
1103
|
themeName: "custom",
|
|
970
1104
|
basePresetName: o.name,
|
|
971
1105
|
variables: u
|
|
972
1106
|
} : null;
|
|
973
|
-
},
|
|
1107
|
+
}, Je = (e) => {
|
|
974
1108
|
if (!e.useStoredTheme)
|
|
975
1109
|
return null;
|
|
976
|
-
const r = String(e.storageKey ||
|
|
1110
|
+
const r = String(e.storageKey || C).trim() || C, t = oe(r);
|
|
977
1111
|
if (!t)
|
|
978
1112
|
return null;
|
|
979
1113
|
const o = [t.currentTheme, t.remoteTheme];
|
|
980
1114
|
for (const u of o) {
|
|
981
|
-
const
|
|
982
|
-
if (!
|
|
1115
|
+
const n = String(u || "").trim();
|
|
1116
|
+
if (!n)
|
|
983
1117
|
continue;
|
|
984
|
-
if (
|
|
985
|
-
const
|
|
986
|
-
if (
|
|
987
|
-
return
|
|
1118
|
+
if (n === "custom") {
|
|
1119
|
+
const i = ae(t);
|
|
1120
|
+
if (i)
|
|
1121
|
+
return i;
|
|
988
1122
|
continue;
|
|
989
1123
|
}
|
|
990
|
-
const
|
|
991
|
-
if (
|
|
992
|
-
return
|
|
1124
|
+
const l = g(n);
|
|
1125
|
+
if (l)
|
|
1126
|
+
return N(l);
|
|
993
1127
|
}
|
|
994
1128
|
return null;
|
|
995
|
-
},
|
|
1129
|
+
}, Xe = (e) => {
|
|
996
1130
|
const r = e.documentElement, t = [r.getAttribute("data-theme"), r.getAttribute("data-skin")];
|
|
997
1131
|
for (const o of t) {
|
|
998
1132
|
const u = g(String(o || "").trim());
|
|
999
1133
|
if (u)
|
|
1000
|
-
return
|
|
1134
|
+
return N(u);
|
|
1001
1135
|
}
|
|
1002
1136
|
return null;
|
|
1003
|
-
},
|
|
1137
|
+
}, Qe = (e, r) => {
|
|
1004
1138
|
const t = String(r.presetName || "").trim();
|
|
1005
1139
|
if (t) {
|
|
1006
1140
|
if (t === "custom") {
|
|
1007
1141
|
if (r.useStoredTheme === !1)
|
|
1008
|
-
return
|
|
1009
|
-
const u = String(r.storageKey ||
|
|
1010
|
-
return (
|
|
1142
|
+
return x();
|
|
1143
|
+
const u = String(r.storageKey || C).trim() || C, n = oe(u);
|
|
1144
|
+
return (n ? ae(n) : null) || x();
|
|
1011
1145
|
}
|
|
1012
1146
|
const o = g(t);
|
|
1013
|
-
return o ?
|
|
1147
|
+
return o ? N(o) : x();
|
|
1014
1148
|
}
|
|
1015
|
-
return
|
|
1016
|
-
},
|
|
1017
|
-
const t =
|
|
1149
|
+
return Xe(e) || Je(r) || x();
|
|
1150
|
+
}, Ze = (e, r) => {
|
|
1151
|
+
const t = _(e);
|
|
1018
1152
|
(r.parentNode !== t || t.firstChild !== r) && t.insertBefore(r, t.firstChild);
|
|
1019
|
-
},
|
|
1020
|
-
var
|
|
1153
|
+
}, wr = (e = {}) => {
|
|
1154
|
+
var p;
|
|
1021
1155
|
if (typeof document > "u")
|
|
1022
1156
|
return null;
|
|
1023
|
-
const r = ((
|
|
1024
|
-
if (!e.force &&
|
|
1157
|
+
const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Qe(r, e), o = e.styleId || je;
|
|
1158
|
+
if (!e.force && Ge(r))
|
|
1025
1159
|
return null;
|
|
1026
1160
|
const u = r.getElementById(o);
|
|
1027
|
-
if (!e.force && !u &&
|
|
1161
|
+
if (!e.force && !u && Ye(r))
|
|
1028
1162
|
return null;
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1163
|
+
const n = u || r.createElement("style");
|
|
1164
|
+
n.id || (n.id = o);
|
|
1165
|
+
const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, s = O(P(t.variables, {
|
|
1032
1166
|
includeElementAndDasUiBridges: e.includeElementAndDasUiBridges,
|
|
1033
|
-
themeName:
|
|
1034
|
-
basePresetName:
|
|
1167
|
+
themeName: l,
|
|
1168
|
+
basePresetName: i
|
|
1035
1169
|
}));
|
|
1036
|
-
|
|
1170
|
+
n.textContent !== s && (n.textContent = s), Ze(r, n);
|
|
1037
1171
|
const { setThemeAttributes: c = !0 } = e;
|
|
1038
|
-
return c && ((e.themeName || !r.documentElement.getAttribute("data-theme")) && r.documentElement.setAttribute("data-theme",
|
|
1039
|
-
},
|
|
1172
|
+
return c && ((e.themeName || !r.documentElement.getAttribute("data-theme")) && r.documentElement.setAttribute("data-theme", l), e.skinName !== null && !r.documentElement.getAttribute("data-skin") && r.documentElement.setAttribute("data-skin", e.skinName || i)), n;
|
|
1173
|
+
}, J = (e, r) => {
|
|
1040
1174
|
if (!e.length || !r.length)
|
|
1041
1175
|
return;
|
|
1042
1176
|
const t = new Set(r);
|
|
@@ -1044,22 +1178,22 @@ ${r}
|
|
|
1044
1178
|
const u = e[o];
|
|
1045
1179
|
t.has(u) && e.removeProperty(u);
|
|
1046
1180
|
}
|
|
1047
|
-
},
|
|
1048
|
-
const t =
|
|
1049
|
-
(
|
|
1181
|
+
}, er = (e, r) => {
|
|
1182
|
+
const t = Ke(e), o = O(r);
|
|
1183
|
+
(G.get(e) !== o || t.textContent !== o) && (t.textContent = o, G.set(e, o));
|
|
1050
1184
|
const u = Object.keys(r);
|
|
1051
|
-
|
|
1052
|
-
},
|
|
1185
|
+
J(e.documentElement.style, u), e.body && J(e.body.style, u);
|
|
1186
|
+
}, rr = (e) => {
|
|
1053
1187
|
typeof window > "u" || (window.__UPF_THEME_SNAPSHOT__ = e);
|
|
1054
|
-
},
|
|
1055
|
-
const t =
|
|
1188
|
+
}, tr = (e, r) => {
|
|
1189
|
+
const t = E(r) || {}, o = e.ownerDocument || document;
|
|
1056
1190
|
h.set(e, t);
|
|
1057
1191
|
const u = e === o.documentElement || e === o.body;
|
|
1058
1192
|
u && h.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
|
|
1059
|
-
},
|
|
1060
|
-
const r =
|
|
1193
|
+
}, or = (e) => {
|
|
1194
|
+
const r = I(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
|
|
1061
1195
|
return (r ? h.get(r) : null) || (t ? h.get(t) : null) || o;
|
|
1062
|
-
},
|
|
1196
|
+
}, ar = (e = !0) => {
|
|
1063
1197
|
var r;
|
|
1064
1198
|
if (typeof window > "u" || !window.name)
|
|
1065
1199
|
return null;
|
|
@@ -1074,150 +1208,163 @@ ${r}
|
|
|
1074
1208
|
} catch {
|
|
1075
1209
|
return null;
|
|
1076
1210
|
}
|
|
1077
|
-
},
|
|
1211
|
+
}, ur = (e, r) => {
|
|
1078
1212
|
if (r !== void 0)
|
|
1079
1213
|
return r;
|
|
1080
1214
|
const t = e.config || {};
|
|
1081
1215
|
return String(t.basePresetName || t.name || e.themeName || "").trim() || null;
|
|
1082
|
-
},
|
|
1083
|
-
const t =
|
|
1216
|
+
}, nr = (e, r = {}) => {
|
|
1217
|
+
const t = I(r.root);
|
|
1084
1218
|
if (!t)
|
|
1085
1219
|
return {};
|
|
1086
|
-
const o =
|
|
1220
|
+
const o = M(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, s]) => (l[i] = String(s ?? ""), l), {}) : P(o, {
|
|
1087
1221
|
includeElementAndDasUiBridges: r.includeElementAndDasUiBridges,
|
|
1088
1222
|
themeName: r.themeName,
|
|
1089
1223
|
basePresetName: r.basePresetName
|
|
1090
|
-
}),
|
|
1091
|
-
return t ===
|
|
1092
|
-
t.style.getPropertyValue(
|
|
1093
|
-
}),
|
|
1094
|
-
},
|
|
1095
|
-
const t = e.config || {}, o =
|
|
1224
|
+
}), n = t.ownerDocument || document;
|
|
1225
|
+
return t === n.documentElement || t === n.body ? er(n, u) : Object.entries(u).forEach(([l, i]) => {
|
|
1226
|
+
t.style.getPropertyValue(l) !== i && t.style.setProperty(l, i);
|
|
1227
|
+
}), tr(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
|
|
1228
|
+
}, ue = (e, r = {}) => {
|
|
1229
|
+
const t = e.config || {}, o = nr(e.variables || {}, {
|
|
1096
1230
|
...r,
|
|
1097
1231
|
themeName: r.themeName || e.themeName,
|
|
1098
1232
|
basePresetName: r.basePresetName || String(t.basePresetName || t.name || ""),
|
|
1099
|
-
skinName:
|
|
1233
|
+
skinName: ur(e, r.skinName)
|
|
1100
1234
|
});
|
|
1101
|
-
return
|
|
1102
|
-
},
|
|
1235
|
+
return rr(e), o;
|
|
1236
|
+
}, V = (e, r, t = !0) => {
|
|
1103
1237
|
try {
|
|
1104
1238
|
return e && e.__THEME_API__ || null;
|
|
1105
1239
|
} catch {
|
|
1106
1240
|
return null;
|
|
1107
1241
|
}
|
|
1108
|
-
},
|
|
1109
|
-
const r =
|
|
1242
|
+
}, A = (e = !0) => typeof window > "u" ? null : V(window, "current", e) || V(window.parent, "parent", e) || V(window.top, "top", e), ne = (e = {}) => {
|
|
1243
|
+
const r = A(e.debug), t = r != null && r.getCurrentTheme ? r.getCurrentTheme() : null;
|
|
1110
1244
|
if (t)
|
|
1111
1245
|
return t;
|
|
1112
1246
|
const o = (typeof window < "u" ? window.__UPF_THEME_SNAPSHOT__ : null) || null;
|
|
1113
|
-
return o ||
|
|
1114
|
-
},
|
|
1115
|
-
const r =
|
|
1247
|
+
return o || ar(e.debug);
|
|
1248
|
+
}, lr = (e = {}) => {
|
|
1249
|
+
const r = or(e.root);
|
|
1116
1250
|
if (r)
|
|
1117
|
-
return
|
|
1118
|
-
const t =
|
|
1251
|
+
return E(r);
|
|
1252
|
+
const t = ne(e);
|
|
1119
1253
|
if (t != null && t.variables)
|
|
1120
|
-
return
|
|
1121
|
-
const o =
|
|
1254
|
+
return E(t.variables);
|
|
1255
|
+
const o = A(e.debug);
|
|
1122
1256
|
if (!o)
|
|
1123
1257
|
return null;
|
|
1124
1258
|
const u = o.getVariables ? o.getVariables() : null;
|
|
1125
|
-
return
|
|
1126
|
-
},
|
|
1127
|
-
const t =
|
|
1259
|
+
return E(u);
|
|
1260
|
+
}, Fr = (e, r = !0) => {
|
|
1261
|
+
const t = A(r);
|
|
1128
1262
|
return t != null && t.changeTheme ? (t.changeTheme(e), !0) : !1;
|
|
1129
|
-
},
|
|
1130
|
-
const r =
|
|
1131
|
-
return r ? (
|
|
1132
|
-
},
|
|
1263
|
+
}, le = (e = {}) => {
|
|
1264
|
+
const r = ne(e);
|
|
1265
|
+
return r ? (ue(r, e), r) : (e.debug, null);
|
|
1266
|
+
}, _r = (e = {}) => le({
|
|
1133
1267
|
includeBridges: !1,
|
|
1134
1268
|
includeElementAndDasUiBridges: !1,
|
|
1135
1269
|
...e
|
|
1136
|
-
}),
|
|
1270
|
+
}), ir = (e, r = !0) => {
|
|
1137
1271
|
try {
|
|
1138
|
-
const t =
|
|
1139
|
-
return t.event.on(
|
|
1140
|
-
t.event.off(
|
|
1272
|
+
const t = se("microApp");
|
|
1273
|
+
return t.event.on(W, e), () => {
|
|
1274
|
+
t.event.off(W, e);
|
|
1141
1275
|
};
|
|
1142
1276
|
} catch {
|
|
1143
1277
|
return null;
|
|
1144
1278
|
}
|
|
1145
|
-
},
|
|
1279
|
+
}, sr = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, fr = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", cr = (e) => {
|
|
1146
1280
|
let r = "";
|
|
1147
1281
|
return (t) => {
|
|
1148
|
-
const o =
|
|
1282
|
+
const o = fr(t);
|
|
1149
1283
|
o && o === r || (r = o, e(t));
|
|
1150
1284
|
};
|
|
1151
|
-
},
|
|
1152
|
-
const u =
|
|
1153
|
-
return
|
|
1154
|
-
|
|
1285
|
+
}, pr = (e, r, t = !1, o = !0) => {
|
|
1286
|
+
const u = cr(r), n = sr(e, u), l = ir(u, o), s = (t ? [n, l] : [l, n]).filter(Boolean);
|
|
1287
|
+
return s.length ? () => {
|
|
1288
|
+
s.forEach((c) => c());
|
|
1155
1289
|
} : null;
|
|
1156
|
-
},
|
|
1157
|
-
const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...
|
|
1158
|
-
let
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1161
|
-
},
|
|
1162
|
-
|
|
1290
|
+
}, mr = (e = {}) => {
|
|
1291
|
+
const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l = A(u);
|
|
1292
|
+
let i = !1, s = null, c = null;
|
|
1293
|
+
const p = () => {
|
|
1294
|
+
i || le({ ...n, debug: u });
|
|
1295
|
+
}, k = pr(l, (b) => {
|
|
1296
|
+
ue(b, n), o && (b == null ? void 0 : b.source) !== "mountSync" && o(b);
|
|
1163
1297
|
}, t, u);
|
|
1164
|
-
return r && (
|
|
1165
|
-
|
|
1298
|
+
return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ie) => Promise.resolve().then(ie))(p), typeof requestAnimationFrame == "function" ? s = requestAnimationFrame(() => {
|
|
1299
|
+
s = null, p();
|
|
1166
1300
|
}) : c = setTimeout(() => {
|
|
1167
|
-
c = null,
|
|
1301
|
+
c = null, p();
|
|
1168
1302
|
}, 16)), () => {
|
|
1169
|
-
|
|
1303
|
+
i = !0, s !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(s), s = null), c !== null && (clearTimeout(c), c = null), k == null || k();
|
|
1170
1304
|
};
|
|
1171
|
-
},
|
|
1305
|
+
}, Nr = (e = {}) => mr({
|
|
1172
1306
|
includeBridges: !1,
|
|
1173
1307
|
includeElementAndDasUiBridges: !1,
|
|
1174
1308
|
...e
|
|
1175
|
-
}),
|
|
1176
|
-
var
|
|
1177
|
-
const t =
|
|
1309
|
+
}), dr = (e, r) => {
|
|
1310
|
+
var n;
|
|
1311
|
+
const t = I(r), o = String(e || "").trim();
|
|
1178
1312
|
if (!t || !o)
|
|
1179
1313
|
return "";
|
|
1180
1314
|
const u = typeof getComputedStyle > "u" ? "" : getComputedStyle(t).getPropertyValue(o).trim();
|
|
1181
|
-
return u || String(((
|
|
1182
|
-
},
|
|
1183
|
-
value:
|
|
1315
|
+
return u || String(((n = lr({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
|
|
1316
|
+
}, Ar = (e) => `var(${String(e || "").trim()})`, kr = (e, r) => ({
|
|
1317
|
+
value: dr(String(e || "").trim(), r)
|
|
1184
1318
|
});
|
|
1185
1319
|
export {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1320
|
+
_e as BUILTIN_PRESET_THEME_NAMES,
|
|
1321
|
+
Pe as DAS_UI_THEME_BRIDGE_ITEMS,
|
|
1322
|
+
Me as ELEMENT_THEME_BRIDGE_ITEMS,
|
|
1323
|
+
De as LEGACY_THEME_BRIDGE_ITEMS,
|
|
1324
|
+
R as PRESET_THEMES,
|
|
1325
|
+
y as PRESET_THEME_VARIABLES,
|
|
1326
|
+
pe as THEME_SOURCE_VARIABLE_CATEGORIES,
|
|
1327
|
+
ge as THEME_SOURCE_VARIABLE_HINTS,
|
|
1328
|
+
de as THEME_SOURCE_VARIABLE_LABELS,
|
|
1329
|
+
S as THEME_SOURCE_VARIABLE_META,
|
|
1330
|
+
me as THEME_SOURCE_VARIABLE_NAMES,
|
|
1331
|
+
be as THEME_SOURCE_VARIABLE_RELATIONS,
|
|
1332
|
+
Ie as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
|
|
1333
|
+
ue as applyThemeEventToDocument,
|
|
1334
|
+
nr as applyThemeVariablesToDocument,
|
|
1335
|
+
Sr as buildDefaultThemeCssText,
|
|
1336
|
+
We as buildPresetThemeCssText,
|
|
1337
|
+
P as buildRuntimeThemeVariables,
|
|
1338
|
+
Fr as changeTheme,
|
|
1339
|
+
wr as ensureDefaultThemeStyle,
|
|
1340
|
+
Tr as getAllPresetThemes,
|
|
1341
|
+
ne as getCurrentTheme,
|
|
1342
|
+
F as getDefaultPresetTheme,
|
|
1343
|
+
Cr as getDefaultThemeVariables,
|
|
1344
|
+
ar as getHostThemeSnapshotFromWindowName,
|
|
1345
|
+
Er as getPresetTheme,
|
|
1346
|
+
A as getThemeAPI,
|
|
1347
|
+
vr as getThemeSourceVariableCategories,
|
|
1348
|
+
yr as getThemeSourceVariableHints,
|
|
1349
|
+
hr as getThemeSourceVariableLabels,
|
|
1350
|
+
br as getThemeSourceVariableNames,
|
|
1351
|
+
xr as getThemeSourceVariableRelations,
|
|
1352
|
+
dr as getThemeVariable,
|
|
1353
|
+
lr as getThemeVariables,
|
|
1354
|
+
Ar as getVar,
|
|
1355
|
+
kr as getVarValue,
|
|
1356
|
+
Nr as initHostThemeRootSync,
|
|
1357
|
+
mr as initSubAppThemeSync,
|
|
1358
|
+
Q as mixHexColor,
|
|
1359
|
+
X as normalizeHexColor,
|
|
1360
|
+
ye as normalizeThemeSourceVariables,
|
|
1361
|
+
D as resolvePrimaryBgColor,
|
|
1362
|
+
w as resolveThemeBridgeVariables,
|
|
1363
|
+
_r as syncHostThemeRoot,
|
|
1364
|
+
le as syncThemeFromHost,
|
|
1365
|
+
Ue as toDasUiColorOverrides,
|
|
1366
|
+
Le as toElementThemeVariables,
|
|
1367
|
+
Oe as toLegacyThemeVariables,
|
|
1368
|
+
ce as toRgbaColor,
|
|
1369
|
+
ze as toUpfComponentThemeVariables
|
|
1223
1370
|
};
|