yxuse 1.0.24 → 1.0.25

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/README.md CHANGED
@@ -58,6 +58,12 @@ pnpm set registry https://registry.npmjs.org
58
58
  * @param groupName 名称
59
59
  */
60
60
  getGroupColor;
61
+
62
+ /**
63
+ * @description:注册当前系统私有css变量
64
+ * @param systemName 系统名称
65
+ */
66
+ installSystemTheme;
61
67
  ```
62
68
 
63
69
  - css 变量 json 配置
package/lib/index.cjs4.js CHANGED
@@ -1 +1 @@
1
- "use strict";const t={green:{common:{color:{"main-100":"rgba(80, 165, 122, 1)","main-50":"rgba(80, 165, 122, 0.5)","main-25":"rgba(80, 165, 122, 0.25)","main-15":"rgba(80, 165, 122, 0.15)","main-5":"rgba(80, 165, 122, 0.05)","error-100":"rgba(255, 152, 146, 1)","error-50":"rgba(255, 152, 146, 0.5)","error-25":"rgba(255, 152, 146, 0.25)","error-15":"rgba(255, 152, 146, 0.15)","error-5":"rgba(255, 152, 146, 0.05)","warning-100":"rgba(249, 162, 33, 1)","warning-50":"rgba(249, 162, 33, 0.5)","warning-25":"rgba(249, 162, 33, 0.25)","warning-15":"rgba(249, 162, 33, 0.15)","warning-5":"rgba(249, 162, 33, 0.05)","info-100":"rgba(133, 233, 183, 1)","info-50":"rgba(133, 233, 183, 0.5)","info-25":"rgba(133, 233, 183, 0.25)","info-15":"rgba(133, 233, 183, 0.15)","info-5":"rgba(133, 233, 183, 0.05)","neutral-100":"rgba(85, 221, 221, 1)","neutral-50":"rgba(85, 221, 221, 0.5)","neutral-25":"rgba(85, 221, 221, 0.25)","neutral-15":"rgba(85, 221, 221, 0.15)","neutral-5":"rgba(85, 221, 221, 0.05)"},background:{"error-gradual":"linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)","warning-gradual":"linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)","success-gradual":"linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)",page:"rgba(241, 243, 242, 1)","main-content-special":"rgba(103, 186, 145, 0.10)",section:"rgba(252, 255, 253, 1)"},button:{background:"rgba(103, 186, 145, 0.10)","border-color":"rgba(80, 165, 122, 1)","text-color":"rgba(80, 165, 122, 1)","active-background-color":"rgba(80, 165, 122, 1)","active-border-color":"rgba(154, 209, 162, 1)","active-text-color":"#fff"},checkbox:{background:"rgba(216, 233, 219, 1)","icon-color":"rgba(80, 165, 122, 0)","border-color":"rgba(154, 209, 162, 1)","text-color":"#9AD1A2","checked-text-color":"#1D4B34","checked-background":"rgba(216, 233, 219, 1)","checked-icon-color":"rgba(80, 165, 122, 1)","checked-border-color":"rgba(154, 209, 162, 1)"},input:{background:"rgba(237, 246, 239, 1)","border-color":"rgba(80, 165, 122, 1)",color:"rgba(29, 75, 52, 1)","placeholder-color":"rgba(80, 165, 122, 1)","hover-background":"rgba(237, 246, 239, 0.30)","hover-border-color":"rgba(80, 165, 122, 1)","hover-color":"rgba(80, 165, 122, 1)","active-background":"rgba(237, 246, 239, 0.30)","active-border-color":"rgba(80, 165, 122, 1)","active-color":"rgba(80, 165, 122, 1)","disabled-background":"rgba(237, 246, 239, 1)","disabled-border-color":"rgba(237, 246, 239, 1)","disabled-color":"rgba(83, 83, 83, 1)"},select:{"dropdown-background":"rgba(237, 246, 239, 1)","dropdown-border-color":"rgba(80, 165, 122, 1)","dropdown-item-color":"rgba(80, 165, 122, 1)","dropdown-item-hover-background":"rgba(178, 220, 198, 1)","dropdown-item-hover-color":"rgba(29, 75, 52, 1)","dropdown-item-selected-background":"rgba(178, 220, 198, 1)","dropdown-item-selected-color":"rgba(29, 75, 52, 1)"},tree:{},layout:{"nav-background":"#fff","view-background":"#F1F3F2"},table:{"header-background":"#67BA91","header-text-color":"#fff","row-background":"#D1EFDA","row-odd-background":"#EAF9ED","row-border-bottom-color":"#9AD1A2","row-text-color":"#1D4B34","row-error-background":"linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)","row-warning-background":"linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)","row-hover-background":"#b2dcc6","row-hover-text-color":"rgba(29, 75, 52, 1)"},chart:{pie_color_1:"#50A57A",pie_color_2:"#F8B85A",pie_color_3:"#FF9892",pie_color_4:"#55DDDD",pie_color_5:"#85E9B7"},message:{},text:{main:"#50A57A",deep:"#1D4B34",light:"rgba(80, 165, 122, 0.50)",paler:"#637B6B",warning:"#F8B85A"}},cloud:{},"station-control-center":{}},blue:{common:{"--test1":"#fff","--test2":"#ccc"},cloud:{},"station-control-center":{}}},a="yxTheme",m="green",n=()=>{const r=e();localStorage.getItem(a)||localStorage.setItem(a,r);const o=document.documentElement,g=t[r].common;Object.keys(g).forEach(c=>{Object.keys(g[c]).forEach(b=>{const u=`--${c}-${b}`;o.style.setProperty(u,g[c][b])})})},l=r=>{localStorage.setItem(a,r),n()},e=()=>localStorage.getItem(a)||m,d=r=>{const o=e();return t[o][r]||{}},i=r=>{const o=e();return t[o].common[r]||{}},s=Object.freeze(Object.defineProperty({__proto__:null,changeTheme:l,getCurTheme:e,getGroupColor:i,getSystemThemeConfig:d,install:n},Symbol.toStringTag,{value:"Module"}));exports.changeTheme=l;exports.getCurTheme=e;exports.getGroupColor=i;exports.getSystemThemeConfig=d;exports.install=n;exports.theme=s;
1
+ "use strict";const g={green:{common:{color:{"main-100":"rgba(80, 165, 122, 1)","main-50":"rgba(80, 165, 122, 0.5)","main-25":"rgba(80, 165, 122, 0.25)","main-15":"rgba(80, 165, 122, 0.15)","main-5":"rgba(80, 165, 122, 0.05)","error-100":"rgba(255, 152, 146, 1)","error-50":"rgba(255, 152, 146, 0.5)","error-25":"rgba(255, 152, 146, 0.25)","error-15":"rgba(255, 152, 146, 0.15)","error-5":"rgba(255, 152, 146, 0.05)","warning-100":"rgba(249, 162, 33, 1)","warning-50":"rgba(249, 162, 33, 0.5)","warning-25":"rgba(249, 162, 33, 0.25)","warning-15":"rgba(249, 162, 33, 0.15)","warning-5":"rgba(249, 162, 33, 0.05)","info-100":"rgba(133, 233, 183, 1)","info-50":"rgba(133, 233, 183, 0.5)","info-25":"rgba(133, 233, 183, 0.25)","info-15":"rgba(133, 233, 183, 0.15)","info-5":"rgba(133, 233, 183, 0.05)","neutral-100":"rgba(85, 221, 221, 1)","neutral-50":"rgba(85, 221, 221, 0.5)","neutral-25":"rgba(85, 221, 221, 0.25)","neutral-15":"rgba(85, 221, 221, 0.15)","neutral-5":"rgba(85, 221, 221, 0.05)"},background:{"error-gradual":"linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)","warning-gradual":"linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)","success-gradual":"linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)",page:"rgba(241, 243, 242, 1)","main-content-special":"rgba(103, 186, 145, 0.10)",section:"rgba(252, 255, 253, 1)",success:"rgba(80, 165, 122, 1)",warning:"#F9A221",error:"#FF9892"},button:{background:"rgba(103, 186, 145, 0.10)","border-color":"rgba(80, 165, 122, 1)","text-color":"rgba(80, 165, 122, 1)","active-background-color":"rgba(80, 165, 122, 1)","active-border-color":"rgba(154, 209, 162, 1)","active-text-color":"#fff"},checkbox:{background:"rgba(216, 233, 219, 1)","icon-color":"rgba(80, 165, 122, 0)","border-color":"rgba(154, 209, 162, 1)","text-color":"#9AD1A2","checked-text-color":"#1D4B34","checked-background":"rgba(216, 233, 219, 1)","checked-icon-color":"rgba(80, 165, 122, 1)","checked-border-color":"rgba(154, 209, 162, 1)"},radio:{background:"rgba(191, 225, 209, 1)","icon-border-color":"rgba(191, 225, 209, 1)","icon-checked-background":"rgba(103, 186, 145, 1)","icon-checked-point-background":"rgba(210, 255, 218, 1)"},switch:{background:"#637B6B","checked-background":"#9BE9C2"},input:{background:"rgba(237, 246, 239, 1)","border-color":"rgba(80, 165, 122, 1)",color:"rgba(29, 75, 52, 1)","placeholder-color":"rgba(80, 165, 122, 1)","hover-background":"rgba(237, 246, 239, 0.30)","hover-border-color":"rgba(80, 165, 122, 1)","hover-color":"rgba(80, 165, 122, 1)","active-background":"rgba(237, 246, 239, 0.30)","active-border-color":"rgba(80, 165, 122, 1)","active-color":"rgba(80, 165, 122, 1)","disabled-background":"rgba(237, 246, 239, 1)","disabled-border-color":"rgba(237, 246, 239, 1)","disabled-color":"rgba(83, 83, 83, 1)"},select:{"dropdown-background":"rgba(237, 246, 239, 1)","dropdown-border-color":"rgba(80, 165, 122, 1)","dropdown-item-color":"rgba(80, 165, 122, 1)","dropdown-item-hover-background":"rgba(178, 220, 198, 1)","dropdown-item-hover-color":"rgba(29, 75, 52, 1)","dropdown-item-selected-background":"rgba(178, 220, 198, 1)","dropdown-item-selected-color":"rgba(29, 75, 52, 1)"},tree:{},layout:{"nav-background":"#fff","view-background":"#F1F3F2"},table:{"header-background":"#67BA91","header-text-color":"#fff","row-background":"#D1EFDA","row-odd-background":"#EAF9ED","row-border-bottom-color":"#9AD1A2","row-text-color":"#1D4B34","row-error-background":"linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)","row-warning-background":"linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)","row-hover-background":"#b2dcc6","row-hover-text-color":"rgba(29, 75, 52, 1)"},chart:{pie_color_1:"#50A57A",pie_color_2:"#F8B85A",pie_color_3:"#FF9892",pie_color_4:"#55DDDD",pie_color_5:"#85E9B7"},message:{},text:{main:"#50A57A",deep:"#1D4B34",light:"rgba(80, 165, 122, 0.50)",paler:"#637B6B",success:"#50A57A",warning:"#F8B85A",error:"#FF9892",white:"#fff"},dialog:{"header-background":"#fff","body-background":"#fff","footer-background":"#fff"},progress:{background:"#CADFD3","active-background":"#67BA91"}},cloud:{},"station-control-center":{"equipment-line-status-NORMAL-SFED":"#F9A221","equipment-line-status-NORMAL":"#50A57A","equipment-line-status-WARN":"#FF9892","equipment-line-status-OFF_LINE":"#D1D3D2","equipment-status-NORMAL":"#50A57A","equipment-status-WARN":"#FF9892","equipment-status-OFF_LINE":"#D1D3D2","equipment-background-NORMAL":"#F9FCF9","equipment-border-NORMAL":"1px solid #50A57A","equipment-background-WARN":"#F9FBFC","equipment-border-WARN":"1px solid #FF9892","equipment-background-OFF_LINE":"#E9F2EE","equipment-border-OFF_LINE":"1px solid #fff"}},blue:{common:{"--test1":"#fff","--test2":"#ccc"},cloud:{},"station-control-center":{}}},n="yxTheme",m="green",d=()=>{const r=a();localStorage.getItem(n)||localStorage.setItem(n,r);const o=document.documentElement,e=g[r].common;Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(c=>{const b=`--${t}-${c}`;o.style.setProperty(b,e[t][c])})})},l=r=>{localStorage.setItem(n,r),d()},a=()=>localStorage.getItem(n)||m,i=r=>{const o=a();return g[o][r]||{}},u=r=>{const o=a();return g[o].common[r]||{}},s=r=>{const o=a(),e=g[o][r],t=document.documentElement;Object.keys(e).forEach(c=>{const b=`--${c}`;t.style.setProperty(b,e[c])})},F=Object.freeze(Object.defineProperty({__proto__:null,changeTheme:l,getCurTheme:a,getGroupColor:u,getSystemThemeConfig:i,install:d,installSystemTheme:s},Symbol.toStringTag,{value:"Module"}));exports.changeTheme=l;exports.getCurTheme=a;exports.getGroupColor=u;exports.getSystemThemeConfig=i;exports.install=d;exports.installSystemTheme=s;exports.theme=F;
package/lib/index.es4.js CHANGED
@@ -1,167 +1,208 @@
1
- const n = {
2
- green: {
3
- common: {
4
- color: {
5
- "main-100": "rgba(80, 165, 122, 1)",
6
- "main-50": "rgba(80, 165, 122, 0.5)",
7
- "main-25": "rgba(80, 165, 122, 0.25)",
8
- "main-15": "rgba(80, 165, 122, 0.15)",
9
- "main-5": "rgba(80, 165, 122, 0.05)",
10
- "error-100": "rgba(255, 152, 146, 1)",
11
- "error-50": "rgba(255, 152, 146, 0.5)",
12
- "error-25": "rgba(255, 152, 146, 0.25)",
13
- "error-15": "rgba(255, 152, 146, 0.15)",
14
- "error-5": "rgba(255, 152, 146, 0.05)",
15
- "warning-100": "rgba(249, 162, 33, 1)",
16
- "warning-50": "rgba(249, 162, 33, 0.5)",
17
- "warning-25": "rgba(249, 162, 33, 0.25)",
18
- "warning-15": "rgba(249, 162, 33, 0.15)",
19
- "warning-5": "rgba(249, 162, 33, 0.05)",
20
- "info-100": "rgba(133, 233, 183, 1)",
21
- "info-50": "rgba(133, 233, 183, 0.5)",
22
- "info-25": "rgba(133, 233, 183, 0.25)",
23
- "info-15": "rgba(133, 233, 183, 0.15)",
24
- "info-5": "rgba(133, 233, 183, 0.05)",
25
- "neutral-100": "rgba(85, 221, 221, 1)",
26
- "neutral-50": "rgba(85, 221, 221, 0.5)",
27
- "neutral-25": "rgba(85, 221, 221, 0.25)",
28
- "neutral-15": "rgba(85, 221, 221, 0.15)",
29
- "neutral-5": "rgba(85, 221, 221, 0.05)"
30
- },
31
- background: {
32
- "error-gradual": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
33
- "warning-gradual": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
34
- "success-gradual": "linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)",
35
- page: "rgba(241, 243, 242, 1)",
36
- "main-content-special": "rgba(103, 186, 145, 0.10)",
37
- section: "rgba(252, 255, 253, 1)"
38
- },
39
- button: {
40
- background: "rgba(103, 186, 145, 0.10)",
41
- "border-color": "rgba(80, 165, 122, 1)",
42
- "text-color": "rgba(80, 165, 122, 1)",
43
- "active-background-color": "rgba(80, 165, 122, 1)",
44
- "active-border-color": "rgba(154, 209, 162, 1)",
45
- "active-text-color": "#fff"
46
- },
47
- checkbox: {
48
- background: "rgba(216, 233, 219, 1)",
49
- "icon-color": "rgba(80, 165, 122, 0)",
50
- "border-color": "rgba(154, 209, 162, 1)",
51
- "text-color": "#9AD1A2",
52
- "checked-text-color": "#1D4B34",
53
- "checked-background": "rgba(216, 233, 219, 1)",
54
- "checked-icon-color": "rgba(80, 165, 122, 1)",
55
- "checked-border-color": "rgba(154, 209, 162, 1)"
56
- },
57
- input: {
58
- background: "rgba(237, 246, 239, 1)",
59
- "border-color": "rgba(80, 165, 122, 1)",
60
- color: "rgba(29, 75, 52, 1)",
61
- "placeholder-color": "rgba(80, 165, 122, 1)",
62
- "hover-background": "rgba(237, 246, 239, 0.30)",
63
- "hover-border-color": "rgba(80, 165, 122, 1)",
64
- "hover-color": "rgba(80, 165, 122, 1)",
65
- "active-background": "rgba(237, 246, 239, 0.30)",
66
- "active-border-color": "rgba(80, 165, 122, 1)",
67
- "active-color": "rgba(80, 165, 122, 1)",
68
- "disabled-background": "rgba(237, 246, 239, 1)",
69
- "disabled-border-color": "rgba(237, 246, 239, 1)",
70
- "disabled-color": "rgba(83, 83, 83, 1)"
71
- },
72
- select: {
73
- "dropdown-background": "rgba(237, 246, 239, 1)",
74
- "dropdown-border-color": "rgba(80, 165, 122, 1)",
75
- "dropdown-item-color": "rgba(80, 165, 122, 1)",
76
- "dropdown-item-hover-background": "rgba(178, 220, 198, 1)",
77
- "dropdown-item-hover-color": "rgba(29, 75, 52, 1)",
78
- "dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
79
- "dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
80
- },
81
- tree: {},
82
- layout: {
83
- "nav-background": "#fff",
84
- "view-background": "#F1F3F2"
85
- },
86
- table: {
87
- "header-background": "#67BA91",
88
- "header-text-color": "#fff",
89
- "row-background": "#D1EFDA",
90
- "row-odd-background": "#EAF9ED",
91
- //奇数行色值
92
- "row-border-bottom-color": "#9AD1A2",
93
- "row-text-color": "#1D4B34",
94
- "row-error-background": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
95
- "row-warning-background": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
96
- "row-hover-background": "#b2dcc6",
97
- "row-hover-text-color": "rgba(29, 75, 52, 1)"
98
- },
99
- chart: {
100
- pie_color_1: "#50A57A",
101
- pie_color_2: "#F8B85A",
102
- pie_color_3: "#FF9892",
103
- pie_color_4: "#55DDDD",
104
- pie_color_5: "#85E9B7"
105
- },
106
- message: {},
107
- text: {
108
- main: "#50A57A",
109
- deep: "#1D4B34",
110
- light: "rgba(80, 165, 122, 0.50)",
111
- paler: "#637B6B",
112
- warning: "#F8B85A"
113
- }
114
- },
115
- cloud: {},
116
- "station-control-center": {}
117
- },
118
- blue: {
119
- common: {
120
- "--test1": "#fff",
121
- "--test2": "#ccc"
122
- },
123
- cloud: {},
124
- "station-control-center": {}
125
- }
126
- },
127
- e = "yxTheme",
128
- l = "green",
129
- b = () => {
130
- const r = a();
131
- localStorage.getItem(e) || localStorage.setItem(e, r);
132
- const o = document.documentElement,
133
- c = n[r].common;
134
- Object.keys(c).forEach(g => {
135
- Object.keys(c[g]).forEach(t => {
136
- const d = `--${g}-${t}`;
137
- o.style.setProperty(d, c[g][t]);
138
- });
139
- });
140
- },
141
- i = r => {
142
- localStorage.setItem(e, r), b();
143
- },
144
- a = () => localStorage.getItem(e) || l,
145
- u = r => {
146
- const o = a();
147
- return n[o][r] || {};
148
- },
149
- s = r => {
150
- const o = a();
151
- return n[o].common[r] || {};
152
- },
153
- m = /* @__PURE__ */ Object.freeze(
154
- /* @__PURE__ */ Object.defineProperty(
155
- {
156
- __proto__: null,
157
- changeTheme: i,
158
- getCurTheme: a,
159
- getGroupColor: s,
160
- getSystemThemeConfig: u,
161
- install: b
162
- },
163
- Symbol.toStringTag,
164
- { value: "Module" }
165
- )
166
- );
167
- export { u as a, s as b, i as c, a as g, b as i, m as t };
1
+ const g = {
2
+ green: {
3
+ common: {
4
+ color: {
5
+ "main-100": "rgba(80, 165, 122, 1)",
6
+ "main-50": "rgba(80, 165, 122, 0.5)",
7
+ "main-25": "rgba(80, 165, 122, 0.25)",
8
+ "main-15": "rgba(80, 165, 122, 0.15)",
9
+ "main-5": "rgba(80, 165, 122, 0.05)",
10
+ "error-100": "rgba(255, 152, 146, 1)",
11
+ "error-50": "rgba(255, 152, 146, 0.5)",
12
+ "error-25": "rgba(255, 152, 146, 0.25)",
13
+ "error-15": "rgba(255, 152, 146, 0.15)",
14
+ "error-5": "rgba(255, 152, 146, 0.05)",
15
+ "warning-100": "rgba(249, 162, 33, 1)",
16
+ "warning-50": "rgba(249, 162, 33, 0.5)",
17
+ "warning-25": "rgba(249, 162, 33, 0.25)",
18
+ "warning-15": "rgba(249, 162, 33, 0.15)",
19
+ "warning-5": "rgba(249, 162, 33, 0.05)",
20
+ "info-100": "rgba(133, 233, 183, 1)",
21
+ "info-50": "rgba(133, 233, 183, 0.5)",
22
+ "info-25": "rgba(133, 233, 183, 0.25)",
23
+ "info-15": "rgba(133, 233, 183, 0.15)",
24
+ "info-5": "rgba(133, 233, 183, 0.05)",
25
+ "neutral-100": "rgba(85, 221, 221, 1)",
26
+ "neutral-50": "rgba(85, 221, 221, 0.5)",
27
+ "neutral-25": "rgba(85, 221, 221, 0.25)",
28
+ "neutral-15": "rgba(85, 221, 221, 0.15)",
29
+ "neutral-5": "rgba(85, 221, 221, 0.05)"
30
+ },
31
+ background: {
32
+ "error-gradual": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
33
+ "warning-gradual": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
34
+ "success-gradual": "linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)",
35
+ page: "rgba(241, 243, 242, 1)",
36
+ "main-content-special": "rgba(103, 186, 145, 0.10)",
37
+ section: "rgba(252, 255, 253, 1)",
38
+ success: "rgba(80, 165, 122, 1)",
39
+ warning: "#F9A221",
40
+ error: "#FF9892"
41
+ },
42
+ button: {
43
+ background: "rgba(103, 186, 145, 0.10)",
44
+ "border-color": "rgba(80, 165, 122, 1)",
45
+ "text-color": "rgba(80, 165, 122, 1)",
46
+ "active-background-color": "rgba(80, 165, 122, 1)",
47
+ "active-border-color": "rgba(154, 209, 162, 1)",
48
+ "active-text-color": "#fff"
49
+ },
50
+ checkbox: {
51
+ background: "rgba(216, 233, 219, 1)",
52
+ "icon-color": "rgba(80, 165, 122, 0)",
53
+ "border-color": "rgba(154, 209, 162, 1)",
54
+ "text-color": "#9AD1A2",
55
+ "checked-text-color": "#1D4B34",
56
+ "checked-background": "rgba(216, 233, 219, 1)",
57
+ "checked-icon-color": "rgba(80, 165, 122, 1)",
58
+ "checked-border-color": "rgba(154, 209, 162, 1)"
59
+ },
60
+ radio: {
61
+ background: "rgba(191, 225, 209, 1)",
62
+ "icon-border-color": "rgba(191, 225, 209, 1)",
63
+ "icon-checked-background": "rgba(103, 186, 145, 1)",
64
+ "icon-checked-point-background": "rgba(210, 255, 218, 1)"
65
+ },
66
+ switch: {
67
+ background: "#637B6B",
68
+ "checked-background": "#9BE9C2"
69
+ },
70
+ input: {
71
+ background: "rgba(237, 246, 239, 1)",
72
+ "border-color": "rgba(80, 165, 122, 1)",
73
+ color: "rgba(29, 75, 52, 1)",
74
+ "placeholder-color": "rgba(80, 165, 122, 1)",
75
+ "hover-background": "rgba(237, 246, 239, 0.30)",
76
+ "hover-border-color": "rgba(80, 165, 122, 1)",
77
+ "hover-color": "rgba(80, 165, 122, 1)",
78
+ "active-background": "rgba(237, 246, 239, 0.30)",
79
+ "active-border-color": "rgba(80, 165, 122, 1)",
80
+ "active-color": "rgba(80, 165, 122, 1)",
81
+ "disabled-background": "rgba(237, 246, 239, 1)",
82
+ "disabled-border-color": "rgba(237, 246, 239, 1)",
83
+ "disabled-color": "rgba(83, 83, 83, 1)"
84
+ },
85
+ select: {
86
+ "dropdown-background": "rgba(237, 246, 239, 1)",
87
+ "dropdown-border-color": "rgba(80, 165, 122, 1)",
88
+ "dropdown-item-color": "rgba(80, 165, 122, 1)",
89
+ "dropdown-item-hover-background": "rgba(178, 220, 198, 1)",
90
+ "dropdown-item-hover-color": "rgba(29, 75, 52, 1)",
91
+ "dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
92
+ "dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
93
+ },
94
+ tree: {},
95
+ layout: {
96
+ "nav-background": "#fff",
97
+ "view-background": "#F1F3F2"
98
+ },
99
+ table: {
100
+ "header-background": "#67BA91",
101
+ "header-text-color": "#fff",
102
+ "row-background": "#D1EFDA",
103
+ "row-odd-background": "#EAF9ED",
104
+ //奇数行色值
105
+ "row-border-bottom-color": "#9AD1A2",
106
+ "row-text-color": "#1D4B34",
107
+ "row-error-background": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
108
+ "row-warning-background": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
109
+ "row-hover-background": "#b2dcc6",
110
+ "row-hover-text-color": "rgba(29, 75, 52, 1)"
111
+ },
112
+ chart: {
113
+ pie_color_1: "#50A57A",
114
+ pie_color_2: "#F8B85A",
115
+ pie_color_3: "#FF9892",
116
+ pie_color_4: "#55DDDD",
117
+ pie_color_5: "#85E9B7"
118
+ },
119
+ message: {},
120
+ text: {
121
+ main: "#50A57A",
122
+ deep: "#1D4B34",
123
+ light: "rgba(80, 165, 122, 0.50)",
124
+ paler: "#637B6B",
125
+ success: "#50A57A",
126
+ warning: "#F8B85A",
127
+ error: "#FF9892",
128
+ white: "#fff"
129
+ },
130
+ //弹窗
131
+ dialog: {
132
+ "header-background": "#fff",
133
+ "body-background": "#fff",
134
+ "footer-background": "#fff"
135
+ },
136
+ //进度条
137
+ progress: {
138
+ background: "#CADFD3",
139
+ "active-background": "#67BA91"
140
+ }
141
+ },
142
+ cloud: {},
143
+ "station-control-center": {
144
+ "equipment-line-status-NORMAL-SFED": "#F9A221",
145
+ "equipment-line-status-NORMAL": "#50A57A",
146
+ "equipment-line-status-WARN": "#FF9892",
147
+ "equipment-line-status-OFF_LINE": "#D1D3D2",
148
+ "equipment-status-NORMAL": "#50A57A",
149
+ "equipment-status-WARN": "#FF9892",
150
+ "equipment-status-OFF_LINE": "#D1D3D2",
151
+ "equipment-background-NORMAL": "#F9FCF9",
152
+ "equipment-border-NORMAL": "1px solid #50A57A",
153
+ "equipment-background-WARN": "#F9FBFC",
154
+ "equipment-border-WARN": "1px solid #FF9892",
155
+ "equipment-background-OFF_LINE": "#E9F2EE",
156
+ "equipment-border-OFF_LINE": "1px solid #fff"
157
+ }
158
+ },
159
+ blue: {
160
+ common: {
161
+ "--test1": "#fff",
162
+ "--test2": "#ccc"
163
+ },
164
+ cloud: {},
165
+ "station-control-center": {}
166
+ }
167
+ }, n = "yxTheme", i = "green", d = () => {
168
+ const r = t();
169
+ localStorage.getItem(n) || localStorage.setItem(n, r);
170
+ const o = document.documentElement, e = g[r].common;
171
+ Object.keys(e).forEach((a) => {
172
+ Object.keys(e[a]).forEach((c) => {
173
+ const b = `--${a}-${c}`;
174
+ o.style.setProperty(b, e[a][c]);
175
+ });
176
+ });
177
+ }, l = (r) => {
178
+ localStorage.setItem(n, r), d();
179
+ }, t = () => localStorage.getItem(n) || i, s = (r) => {
180
+ const o = t();
181
+ return g[o][r] || {};
182
+ }, u = (r) => {
183
+ const o = t();
184
+ return g[o].common[r] || {};
185
+ }, m = (r) => {
186
+ const o = t(), e = g[o][r], a = document.documentElement;
187
+ Object.keys(e).forEach((c) => {
188
+ const b = `--${c}`;
189
+ a.style.setProperty(b, e[c]);
190
+ });
191
+ }, F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
192
+ __proto__: null,
193
+ changeTheme: l,
194
+ getCurTheme: t,
195
+ getGroupColor: u,
196
+ getSystemThemeConfig: s,
197
+ install: d,
198
+ installSystemTheme: m
199
+ }, Symbol.toStringTag, { value: "Module" }));
200
+ export {
201
+ s as a,
202
+ u as b,
203
+ l as c,
204
+ m as d,
205
+ t as g,
206
+ d as i,
207
+ F as t
208
+ };
package/lib/theme.cjs.js CHANGED
@@ -1,8 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const e = require("./index.cjs4.js");
4
- exports.changeTheme = e.changeTheme;
5
- exports.getCurTheme = e.getCurTheme;
6
- exports.getGroupColor = e.getGroupColor;
7
- exports.getSystemThemeConfig = e.getSystemThemeConfig;
8
- exports.install = e.install;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs4.js");exports.changeTheme=e.changeTheme;exports.getCurTheme=e.getCurTheme;exports.getGroupColor=e.getGroupColor;exports.getSystemThemeConfig=e.getSystemThemeConfig;exports.install=e.install;exports.installSystemTheme=e.installSystemTheme;
package/lib/theme.es.js CHANGED
@@ -1,8 +1,9 @@
1
- import { c as s, g, b as o, a as t, i as m } from "./index.es4.js";
1
+ import { c as s, g as t, b as m, a as g, i as o, d as h } from "./index.es4.js";
2
2
  export {
3
3
  s as changeTheme,
4
- g as getCurTheme,
5
- o as getGroupColor,
6
- t as getSystemThemeConfig,
7
- m as install
4
+ t as getCurTheme,
5
+ m as getGroupColor,
6
+ g as getSystemThemeConfig,
7
+ o as install,
8
+ h as installSystemTheme
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yxuse",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "yx"