@das-fed/web 7.1.0-qatar.1 → 7.1.0-qatar.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { K as e, B as t, D as n, C as i, E as r, e as u, m as o, x as m, q as p, n as g, f as D, k as l, w as L, z as b, A as c, h, i as A, H as T, I as y, r as R, F as W, G as I, L as M, J as F, s as V, j as d, o as f, v as k, y as v, t as w } from "./index-CzrFWqFK.js";
1
+ import { L as s, C as t, E as n, D as i, F as r, e as u, m as o, x as m, q as l, n as p, f as g, k as D, w as L, z as b, A as h, h as T, i as c, I as A, J as R, r as y, G as M, H as W, M as I, K as F, B as V, s as d, j as f, o as k, v, y as w, t as x } from "./index-BaX9zH-6.js";
2
2
  export {
3
- e as DasMainAppLayout,
3
+ s as DasMainAppLayout,
4
4
  t as DasWebLayout,
5
5
  n as DasWebMenu,
6
6
  i as DasWebNav,
@@ -8,26 +8,27 @@ export {
8
8
  u as createDasWebApp,
9
9
  o as currentLang,
10
10
  m as currentTheme,
11
- p as customLangeData,
12
- g as dir,
13
- D as getI18nRule,
14
- l as getLang,
11
+ l as customLangeData,
12
+ p as dir,
13
+ g as getI18nRule,
14
+ D as getLang,
15
15
  L as getThemeRule,
16
16
  b as getVar,
17
- c as getVarValue,
18
- h as i18n,
19
- A as initI18n,
20
- T as initMainApp,
21
- y as initMicroApp,
22
- R as initTheme,
23
- W as layout,
24
- I as layoutData,
25
- M as mainAppFramework,
17
+ h as getVarValue,
18
+ T as i18n,
19
+ c as initI18n,
20
+ A as initMainApp,
21
+ R as initMicroApp,
22
+ y as initTheme,
23
+ M as layout,
24
+ W as layoutData,
25
+ I as mainAppFramework,
26
26
  F as microFrontend,
27
- V as setI18nRule,
28
- d as setLang,
29
- f as setLangRule,
30
- k as setTheme,
31
- v as setThemeRule,
32
- w as t
27
+ V as setGlobalThemeRule,
28
+ d as setI18nRule,
29
+ f as setLang,
30
+ k as setLangRule,
31
+ v as setTheme,
32
+ w as setThemeRule,
33
+ x as t
33
34
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@das-fed/web",
3
- "version": "7.1.0-qatar.1",
3
+ "version": "7.1.0-qatar.2",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/ui": "7.1.0-qatar.1",
8
- "@das-fed/utils": "7.1.0-qatar.1",
9
- "@das-fed/web": "7.1.0-qatar.1",
10
- "@das-fed/web-components": "7.1.0-qatar.1",
7
+ "@das-fed/ui": "7.1.0-qatar.2",
8
+ "@das-fed/utils": "7.1.0-qatar.2",
9
+ "@das-fed/web": "7.1.0-qatar.2",
10
+ "@das-fed/web-components": "7.1.0-qatar.2",
11
11
  "@microsoft/signalr": "^8.0.7",
12
12
  "@vueuse/core": "^9.13.0",
13
13
  "animate.css": "^4.1.1",
@@ -19,7 +19,7 @@
19
19
  "vue-router": "^4.4.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@das-fed/cli": "7.1.0-qatar.1",
22
+ "@das-fed/cli": "7.1.0-qatar.2",
23
23
  "@types/crypto-js": "^4.2.2",
24
24
  "@types/lodash": "^4.14.194",
25
25
  "@types/lodash-es": "^4.17.12",
@@ -1,75 +1,198 @@
1
- import { ref as h, computed as b } from "vue";
2
- const d = h("light"), i = h({
1
+ import { ref as u, computed as b } from "vue";
2
+ import { setThemeRule as p } from "@das-fed/web/packages/theme/index";
3
+ const f = {
4
+ "--das-color-brand-primary": "#348CAB",
5
+ // 品牌主色-默认
6
+ "--das-color-brand-primary-light": "#EBFAFF",
7
+ // 品牌主色-浅色背景
8
+ "--das-color-brand-primary-hover": "#53A2BE",
9
+ // 品牌主色-悬停
10
+ "--das-color-brand-primary-active": "#24718C",
11
+ // 品牌主色-激活
12
+ "--das-color-brand-primary-disabled": "#BEE4F1",
13
+ // 品牌主色-禁用
14
+ "--das-color-brand-primary-shadow": "rgba(52, 140, 171, 0.1)",
15
+ // 品牌主色-焦点阴影
16
+ "--das-color-brand-secondary": "#495CA6",
17
+ // 品牌辅助色-默认
18
+ "--das-color-brand-secondary-hover": "#6578C2",
19
+ // 品牌辅助色-悬停
20
+ "--das-color-brand-secondary-active": "#405192",
21
+ // 品牌辅助色-激活
22
+ "--das-color-brand-secondary-disabled": "#C8D2F1",
23
+ // 品牌辅助色-禁用
24
+ "--das-color-success": "#1BA854",
25
+ // 功能色-成功
26
+ "--das-color-info": "#276FF5",
27
+ // 功能色-信息
28
+ "--das-color-warning": "#FF991C",
29
+ // 功能色-警告
30
+ "--das-color-danger": "#FB2323",
31
+ // 功能色-危险
32
+ "--das-color-danger-light": "#FFDBE0",
33
+ // 功能色-危险浅色背景
34
+ "--das-color-text-title": "#212121",
35
+ // 文字色-标题
36
+ "--das-color-text-body": "#666666",
37
+ // 文字色-正文
38
+ "--das-color-text-subtle": "#999999",
39
+ // 文字色-辅助
40
+ "--das-color-text-caption": "#B2B2B2",
41
+ // 文字色-说明
42
+ "--das-color-bg-page": "#F2F7FF",
43
+ // 背景色-页面
44
+ "--das-color-bg-container": "#FFFFFF",
45
+ // 背景色-容器
46
+ "--das-color-bg-disabled": "#F5F5F5",
47
+ // 背景色-禁用
48
+ "--das-color-mask-dark": "#000000",
49
+ // 遮罩色-深色
50
+ "--das-color-mask-dark-opacity": "rgba(0, 0, 0, 0.5)",
51
+ // 遮罩色-深色半透明
52
+ "--das-color-border-light": "#FFFFFF",
53
+ // 描边色-弱
54
+ "--das-color-border-base": "#E5E5E5",
55
+ // 描边色-常规
56
+ "--das-color-border-strong": "#D9D9D9"
57
+ // 描边色-强调
58
+ }, y = {
59
+ "--das-font-size-xxs": "10px",
60
+ // 极小字号,用于角标、辅助标识、弱提示等低层级信息
61
+ "--das-font-size-xs": "12px",
62
+ // 辅助字号,用于表格、说明文字、错误提示等紧凑信息
63
+ "--das-font-size-sm": "14px",
64
+ // 小字号,用于表单、列表、菜单等常规控件文字
65
+ "--das-font-size-md": "16px",
66
+ // 基础字号,用于正文、默认输入内容、常规阅读文本
67
+ "--das-font-size-lg": "18px",
68
+ // 大字号,用于模块标题、弹窗标题等强调文本
69
+ "--das-font-size-xl": "20px",
70
+ // 一级内容标题字号,用于页面内重要标题
71
+ "--das-font-size-2xl": "24px",
72
+ // 展示标题字号,用于重点数据、卡片标题等
73
+ "--das-font-size-3xl": "28px",
74
+ // 大展示标题字号,用于关键指标或大号标题
75
+ "--das-font-size-4xl": "32px",
76
+ // 页面标题字号,用于页面级标题
77
+ "--das-font-size-5xl": "40px",
78
+ // 大屏标题字号,用于运营屏、看板标题等展示场景
79
+ "--das-font-size-6xl": "48px",
80
+ // 超大展示字号,用于大屏核心数据或强视觉标题
81
+ "--das-font-size-7xl": "56px",
82
+ // 最大展示字号,用于超大屏核心数据或主视觉标题
83
+ "--das-line-height-xxs": "15px",
84
+ // 10px 字号对应行高
85
+ "--das-line-height-xs": "18px",
86
+ // 12px 字号对应行高
87
+ "--das-line-height-sm": "21px",
88
+ // 14px 字号对应行高
89
+ "--das-line-height-md": "24px",
90
+ // 16px 字号对应行高
91
+ "--das-line-height-lg": "27px",
92
+ // 18px 字号对应行高
93
+ "--das-line-height-xl": "30px",
94
+ // 20px 字号对应行高
95
+ "--das-line-height-2xl": "36px",
96
+ // 24px 字号对应行高
97
+ "--das-line-height-3xl": "42px",
98
+ // 28px 字号对应行高
99
+ "--das-line-height-4xl": "48px",
100
+ // 32px 字号对应行高
101
+ "--das-line-height-5xl": "60px",
102
+ // 40px 字号对应行高
103
+ "--das-line-height-6xl": "72px",
104
+ // 48px 字号对应行高
105
+ "--das-line-height-7xl": "84px"
106
+ // 56px 字号对应行高
107
+ }, F = {
108
+ "--das-radius-none": "0px",
109
+ // 无圆角
110
+ "--das-radius-xs": "3px",
111
+ // 极小圆角,多选框表格、下拉多选、多选树、多选列表等
112
+ "--das-radius-sm": "4px",
113
+ // 小尺寸圆角,按钮、输入框、标签等
114
+ "--das-radius-md": "6px",
115
+ // 中尺寸圆角,搜索框、下拉面板等
116
+ "--das-radius-lg": "8px",
117
+ // 大尺寸圆角,卡片、弹窗、通知等
118
+ "--das-radius-xl": "12px",
119
+ // 超大尺寸圆角,强调容器或特殊面板
120
+ "--das-radius-pill": "999px"
121
+ // 胶囊圆角
122
+ }, z = () => {
123
+ const s = /* @__PURE__ */ Object.assign({ "./module/color.ts": f, "./module/fontSize.ts": y, "./module/radius.ts": F });
124
+ Object.keys(s).map((e) => p(s[e]));
125
+ }, r = u("light"), c = u({
3
126
  light: {},
4
127
  dark: {}
5
- }), u = h({
128
+ }), m = u({
6
129
  light: {},
7
130
  dark: {}
8
- }), v = "dasTheme", r = "das-theme", y = (t) => {
131
+ }), v = "dasTheme", h = "das-theme", T = (s) => {
9
132
  let e = {
10
133
  light: {},
11
134
  dark: {}
12
135
  };
13
- if (!t) return e;
14
- const { light: l = {}, dark: n = {}, base: a = {}, ...s } = t || {};
15
- e.light = { ...l, ...a }, e.dark = n || {};
16
- for (const o in s) {
17
- const c = s[o];
18
- if (typeof c == "string" && (e.light[o] = c), typeof c == "object")
19
- for (const m in c)
20
- e[m] || (e[m] = {}), e[m][o] || (e[m][o] = {}), e[m][o] = c[m];
136
+ if (!s) return e;
137
+ const { light: o = {}, dark: d = {}, base: a = {}, ...t } = s || {};
138
+ e.light = { ...o, ...a }, e.dark = d || {};
139
+ for (const l in t) {
140
+ const n = t[l];
141
+ if (typeof n == "string" && (e.light[l] = n), typeof n == "object")
142
+ for (const i in n)
143
+ e[i] || (e[i] = {}), e[i][l] || (e[i][l] = {}), e[i][l] = n[i];
21
144
  }
22
145
  return e;
23
146
  };
24
- function T(t) {
25
- const e = "das-global-theme", l = "das-custom-theme";
26
- if (!document.getElementById(l)) {
147
+ function _(s) {
148
+ const e = "das-global-theme", o = "das-custom-theme";
149
+ if (!document.getElementById(o)) {
27
150
  const a = document.createElement("style");
28
- a.appendChild(document.createTextNode("")), a.setAttribute("id", l), document.head.appendChild(a);
151
+ a.appendChild(document.createTextNode("")), a.setAttribute("id", o), document.head.appendChild(a);
29
152
  }
30
153
  if (!document.getElementById(e)) {
31
154
  const a = document.createElement("style");
32
155
  a.appendChild(document.createTextNode("")), a.setAttribute("id", e), document.head.appendChild(a);
33
156
  }
34
- t || (t = "custom");
35
- let n = document.getElementById(l);
36
- return t === "global" && (n = document.getElementById(e)), n.sheet;
157
+ s || (s = "custom");
158
+ let d = document.getElementById(o);
159
+ return s === "global" && (d = document.getElementById(e)), d.sheet;
37
160
  }
38
- const g = (t, e) => {
161
+ const g = (s, e) => {
39
162
  e || (e = "custom");
40
- const l = T(e), n = y(t);
41
- for (const s in n) {
42
- const o = n[s];
43
- for (const c in o) {
44
- const m = o[c], f = `${r}-${s}`;
45
- l.insertRule(`.${f} { ${c}:${m} } `, l.cssRules.length);
163
+ const o = _(e), d = T(s);
164
+ for (const t in d) {
165
+ const l = d[t];
166
+ for (const n in l) {
167
+ const i = l[n], x = `${h}-${t}`;
168
+ o.insertRule(`.${x} { ${n}:${i} } `, o.cssRules.length);
46
169
  }
47
- e === "global" && (u.value[s] || (u.value[s] = {}), u.value[s] = { ...u.value[s], ...o }), e === "custom" && (i.value[s] || (i.value[s] = {}), i.value[s] = { ...i.value[s], ...o });
170
+ e === "global" && (m.value[t] || (m.value[t] = {}), m.value[t] = { ...m.value[t], ...l }), e === "custom" && (c.value[t] || (c.value[t] = {}), c.value[t] = { ...c.value[t], ...l });
48
171
  }
49
- const a = `${r}-${d.value}`;
172
+ const a = `${h}-${r.value}`;
50
173
  document.body.classList.contains(a) || document.body.classList.add(a);
51
- }, D = async (t) => {
52
- var n, a;
174
+ }, C = async (s) => {
175
+ var d, a;
53
176
  const e = window[v];
54
177
  e && g(e, "global");
55
- let l = Object.assign(((n = t == null ? void 0 : t.theme) == null ? void 0 : n.glob) || {});
56
- (a = t == null ? void 0 : t.microApps) == null || a.map((s) => {
57
- var o;
58
- l = Object.assign(l, ((o = s.theme) == null ? void 0 : o.glob) || {});
59
- }), Object.values(l).filter((s) => !!s).flat().map((s) => g(s));
60
- }, C = (t) => {
61
- document.body.classList.add(`${r}-light`), t === "light" && document.body.classList.remove(`${r}-${d.value}`), d.value = t, document.body.classList.add(`${r}-${d.value}`);
62
- }, $ = (t) => b(() => {
63
- var e, l, n, a;
64
- return ((l = (e = u.value) == null ? void 0 : e[d.value]) == null ? void 0 : l[t]) || ((a = (n = i.value) == null ? void 0 : n[d.value]) == null ? void 0 : a[t]) || t;
65
- }), E = (t) => `var(${t})`, R = $, x = {};
178
+ let o = Object.assign(((d = s == null ? void 0 : s.theme) == null ? void 0 : d.glob) || {});
179
+ (a = s == null ? void 0 : s.microApps) == null || a.map((t) => {
180
+ var l;
181
+ o = Object.assign(o, ((l = t.theme) == null ? void 0 : l.glob) || {});
182
+ }), Object.values(o).filter((t) => !!t).flat().map((t) => g(t));
183
+ }, D = (s) => {
184
+ document.body.classList.add(`${h}-light`), s === "light" && document.body.classList.remove(`${h}-${r.value}`), r.value = s, document.body.classList.add(`${h}-${r.value}`);
185
+ }, B = (s) => b(() => {
186
+ var e, o, d, a;
187
+ return ((o = (e = m.value) == null ? void 0 : e[r.value]) == null ? void 0 : o[s]) || ((a = (d = c.value) == null ? void 0 : d[r.value]) == null ? void 0 : a[s]) || s;
188
+ }), k = (s) => `var(${s})`, R = B;
66
189
  export {
67
- d as currentTheme,
68
- x as default,
69
- $ as getThemeRule,
70
- E as getVar,
190
+ r as currentTheme,
191
+ B as getThemeRule,
192
+ k as getVar,
71
193
  R as getVarValue,
72
- D as initTheme,
73
- C as setTheme,
194
+ C as initTheme,
195
+ z as setGlobalThemeRule,
196
+ D as setTheme,
74
197
  g as setThemeRule
75
198
  };
Binary file
@@ -0,0 +1,2 @@
1
+ declare const setGlobalThemeRule: () => void;
2
+ export { setGlobalThemeRule };
@@ -1,3 +1,5 @@
1
+ import { setGlobalThemeRule } from './global';
2
+
1
3
  declare const currentTheme: import('vue').Ref<any, any>;
2
4
  declare const setThemeRule: (data: any, type?: "global" | "custom") => void;
3
5
  declare const initTheme: (opt?: any) => any;
@@ -8,6 +10,4 @@ declare const getThemeRule: (key: string) => import('vue').ComputedRef<any>;
8
10
  declare const getVar: (key: string) => string;
9
11
  /** 获取css var实际值 */
10
12
  declare const getVarValue: (key: string) => import('vue').ComputedRef<any>;
11
- export { initTheme, setTheme, getThemeRule, currentTheme, setThemeRule, getVar, getVarValue };
12
- declare const _default: {};
13
- export default _default;
13
+ export { initTheme, setTheme, getThemeRule, currentTheme, setThemeRule, getVar, getVarValue, setGlobalThemeRule };
Binary file
Binary file