yxuse 1.0.22 → 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 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%)"},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:{},table:{},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",s="green",n=()=>{const r=e();localStorage.getItem(a)||localStorage.setItem(a,r);const o=document.documentElement,c=g[r].common;Object.keys(c).forEach(t=>{Object.keys(c[t]).forEach(b=>{const m=`--${t}-${b}`;o.style.setProperty(m,c[t][b])})})},l=r=>{localStorage.setItem(a,r),n()},e=()=>localStorage.getItem(a)||s,d=r=>{const o=e();return g[o][r]||{}},i=r=>{const o=e();return g[o].common[r]||{}},u=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=u;
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,4 +1,4 @@
1
- const t = {
1
+ const g = {
2
2
  green: {
3
3
  common: {
4
4
  color: {
@@ -31,7 +31,13 @@ const t = {
31
31
  background: {
32
32
  "error-gradual": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
33
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%)"
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"
35
41
  },
36
42
  button: {
37
43
  background: "rgba(103, 186, 145, 0.10)",
@@ -51,6 +57,16 @@ const t = {
51
57
  "checked-icon-color": "rgba(80, 165, 122, 1)",
52
58
  "checked-border-color": "rgba(154, 209, 162, 1)"
53
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
+ },
54
70
  input: {
55
71
  background: "rgba(237, 246, 239, 1)",
56
72
  "border-color": "rgba(80, 165, 122, 1)",
@@ -76,8 +92,23 @@ const t = {
76
92
  "dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
77
93
  },
78
94
  tree: {},
79
- layout: {},
80
- table: {},
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
+ },
81
112
  chart: {
82
113
  pie_color_1: "#50A57A",
83
114
  pie_color_2: "#F8B85A",
@@ -91,11 +122,39 @@ const t = {
91
122
  deep: "#1D4B34",
92
123
  light: "rgba(80, 165, 122, 0.50)",
93
124
  paler: "#637B6B",
94
- warning: "#F8B85A"
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"
95
140
  }
96
141
  },
97
142
  cloud: {},
98
- "station-control-center": {}
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
+ }
99
158
  },
100
159
  blue: {
101
160
  common: {
@@ -105,37 +164,45 @@ const t = {
105
164
  cloud: {},
106
165
  "station-control-center": {}
107
166
  }
108
- }, e = "yxTheme", d = "green", b = () => {
109
- const r = a();
110
- localStorage.getItem(e) || localStorage.setItem(e, r);
111
- const o = document.documentElement, c = t[r].common;
112
- Object.keys(c).forEach((g) => {
113
- Object.keys(c[g]).forEach((n) => {
114
- const l = `--${g}-${n}`;
115
- o.style.setProperty(l, c[g][n]);
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]);
116
175
  });
117
176
  });
118
- }, i = (r) => {
119
- localStorage.setItem(e, r), b();
120
- }, a = () => localStorage.getItem(e) || d, s = (r) => {
121
- const o = a();
122
- return t[o][r] || {};
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] || {};
123
182
  }, u = (r) => {
124
- const o = a();
125
- return t[o].common[r] || {};
126
- }, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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({
127
192
  __proto__: null,
128
- changeTheme: i,
129
- getCurTheme: a,
193
+ changeTheme: l,
194
+ getCurTheme: t,
130
195
  getGroupColor: u,
131
196
  getSystemThemeConfig: s,
132
- install: b
197
+ install: d,
198
+ installSystemTheme: m
133
199
  }, Symbol.toStringTag, { value: "Module" }));
134
200
  export {
135
201
  s as a,
136
202
  u as b,
137
- i as c,
138
- a as g,
139
- b as i,
140
- m as t
203
+ l as c,
204
+ m as d,
205
+ t as g,
206
+ d as i,
207
+ F as t
141
208
  };
package/lib/theme.cjs.js CHANGED
@@ -1 +1 @@
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;
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.22",
3
+ "version": "1.0.25",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "yx"