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 CHANGED
@@ -52,6 +52,12 @@ pnpm set registry https://registry.npmjs.org
52
52
  * @param systemName 系统名称
53
53
  */
54
54
  getSystemThemeConfig;
55
+
56
+ /**
57
+ * @description:获取当前主题下的某个组/模块配置颜色
58
+ * @param groupName 名称
59
+ */
60
+ getGroupColor;
55
61
  ```
56
62
 
57
63
  - css 变量 json 配置
package/lib/index.cjs4.js CHANGED
@@ -1 +1 @@
1
- "use strict";const b={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:{},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":{}}},o="yxTheme",m="green",c=()=>{const r=e();localStorage.getItem(o)||localStorage.setItem(o,r);const a=document.documentElement,g=b[r].common;Object.keys(g).forEach(t=>{Object.keys(g[t]).forEach(n=>{const i=`--${t}-${n}`;a.style.setProperty(i,g[t][n])})})},l=r=>{localStorage.setItem(o,r),c()},e=()=>localStorage.getItem(o)||m,d=r=>{const a=e();return b[a][r]||{}},s=Object.freeze(Object.defineProperty({__proto__:null,changeTheme:l,getCurTheme:e,getSystemThemeConfig:d,install:c},Symbol.toStringTag,{value:"Module"}));exports.changeTheme=l;exports.getCurTheme=e;exports.getSystemThemeConfig=d;exports.install=c;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%)"},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 n = {
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
- }, o = "yxTheme", d = "green", b = () => {
103
- const r = c();
104
- localStorage.getItem(o) || localStorage.setItem(o, r);
105
- const e = document.documentElement, a = n[r].common;
106
- Object.keys(a).forEach((g) => {
107
- Object.keys(a[g]).forEach((t) => {
108
- const l = `--${g}-${t}`;
109
- e.style.setProperty(l, a[g][t]);
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(o, r), b();
114
- }, c = () => localStorage.getItem(o) || d, s = (r) => {
115
- const e = c();
116
- return n[e][r] || {};
117
- }, u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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: c,
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
- c as g,
138
+ a as g,
128
139
  b as i,
129
- u as t
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 m, i as t } from "./index.es4.js";
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
- m as getSystemThemeConfig,
6
- t as install
5
+ o as getGroupColor,
6
+ t as getSystemThemeConfig,
7
+ m as install
7
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yxuse",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "yx"