yxuse 1.0.20 → 1.0.22
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 +6 -0
- package/lib/index.cjs4.js +1 -1
- package/lib/index.es4.js +29 -18
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/index.cjs4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
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;
|
package/lib/index.es4.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
green: {
|
|
3
3
|
common: {
|
|
4
4
|
color: {
|
|
@@ -78,7 +78,13 @@ const n = {
|
|
|
78
78
|
tree: {},
|
|
79
79
|
layout: {},
|
|
80
80
|
table: {},
|
|
81
|
-
chart: {
|
|
81
|
+
chart: {
|
|
82
|
+
pie_color_1: "#50A57A",
|
|
83
|
+
pie_color_2: "#F8B85A",
|
|
84
|
+
pie_color_3: "#FF9892",
|
|
85
|
+
pie_color_4: "#55DDDD",
|
|
86
|
+
pie_color_5: "#85E9B7"
|
|
87
|
+
},
|
|
82
88
|
message: {},
|
|
83
89
|
text: {
|
|
84
90
|
main: "#50A57A",
|
|
@@ -99,32 +105,37 @@ const n = {
|
|
|
99
105
|
cloud: {},
|
|
100
106
|
"station-control-center": {}
|
|
101
107
|
}
|
|
102
|
-
},
|
|
103
|
-
const r =
|
|
104
|
-
localStorage.getItem(
|
|
105
|
-
const
|
|
106
|
-
Object.keys(
|
|
107
|
-
Object.keys(
|
|
108
|
-
const l = `--${g}-${
|
|
109
|
-
|
|
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]);
|
|
110
116
|
});
|
|
111
117
|
});
|
|
112
118
|
}, i = (r) => {
|
|
113
|
-
localStorage.setItem(
|
|
114
|
-
},
|
|
115
|
-
const
|
|
116
|
-
return
|
|
117
|
-
}, u =
|
|
119
|
+
localStorage.setItem(e, r), b();
|
|
120
|
+
}, a = () => localStorage.getItem(e) || d, s = (r) => {
|
|
121
|
+
const o = a();
|
|
122
|
+
return t[o][r] || {};
|
|
123
|
+
}, u = (r) => {
|
|
124
|
+
const o = a();
|
|
125
|
+
return t[o].common[r] || {};
|
|
126
|
+
}, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
118
127
|
__proto__: null,
|
|
119
128
|
changeTheme: i,
|
|
120
|
-
getCurTheme:
|
|
129
|
+
getCurTheme: a,
|
|
130
|
+
getGroupColor: u,
|
|
121
131
|
getSystemThemeConfig: s,
|
|
122
132
|
install: b
|
|
123
133
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
124
134
|
export {
|
|
125
135
|
s as a,
|
|
136
|
+
u as b,
|
|
126
137
|
i as c,
|
|
127
|
-
|
|
138
|
+
a as g,
|
|
128
139
|
b as i,
|
|
129
|
-
|
|
140
|
+
m as t
|
|
130
141
|
};
|
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.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;
|
package/lib/theme.es.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { c as s, g, a as
|
|
1
|
+
import { c as s, g, b as o, a as t, i as m } from "./index.es4.js";
|
|
2
2
|
export {
|
|
3
3
|
s as changeTheme,
|
|
4
4
|
g as getCurTheme,
|
|
5
|
-
|
|
6
|
-
t as
|
|
5
|
+
o as getGroupColor,
|
|
6
|
+
t as getSystemThemeConfig,
|
|
7
|
+
m as install
|
|
7
8
|
};
|