@zl-ui-kit/theme 0.26.1 → 0.27.0

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/dist/index.js CHANGED
@@ -1248,36 +1248,20 @@ function buildCssVars(resolved, themeName, baseName = themeName) {
1248
1248
  decls.push(`--el-bg-color-overlay: ${get("bg-3")};`);
1249
1249
  decls.push(`--el-color-white: ${isDark ? "#141414" : "#ffffff"};`);
1250
1250
  decls.push(`--el-color-black: ${isDark ? "#ffffff" : "#000000"};`);
1251
- decls.push(`--el-mask-color: rgb(0, 0, 0, ${isDark ? "0.3" : "0.1"});`);
1251
+ decls.push(`--el-mask-color: rgb(0, 0, 0, ${isDark ? "0.8" : "0.5"});`);
1252
1252
  decls.push(`color-scheme: ${isDark ? "dark" : "light"};`);
1253
1253
  decls.push(`--el-border-radius-base: ${get("radius-base")};`);
1254
1254
  decls.push(`--el-border-radius-small: ${get("radius-small")};`);
1255
1255
  const isPlainBase = baseName === "light" || baseName === "dark";
1256
- const isLightBase = baseName === "light";
1257
1256
  decls.push(`--zl-menu-hover-bg: ${isPlainBase ? "var(--zl-fill-2)" : "rgba(255, 255, 255, 0.2)"};`);
1258
1257
  decls.push(`--zl-menu-text-color: ${isPlainBase ? "var(--zl-text-1)" : "var(--zl-white)"};`);
1259
- if (isLightBase) {
1260
- decls.push("--zl-menu-active-bg: var(--zl-primary-1);");
1261
- decls.push("--zl-menu-active-color: var(--zl-primary-6);");
1262
- decls.push("--zl-menu-active-border-color: var(--zl-primary-6);");
1263
- decls.push("--zl-menu-icon-color: var(--zl-text-3);");
1264
- decls.push("--zl-menu-font-size: 14px;");
1265
- decls.push("--zl-menu-item-height: 40px;");
1266
- } else {
1267
- decls.push("--zl-menu-active-bg: var(--zl-menu-hover-bg);");
1268
- decls.push("--zl-menu-active-color: var(--zl-menu-text-color);");
1269
- decls.push("--zl-menu-active-border-color: transparent;");
1270
- decls.push("--zl-menu-icon-color: currentColor;");
1271
- decls.push("--zl-menu-font-size: 12px;");
1272
- decls.push("--zl-menu-item-height: 36px;");
1273
- }
1274
1258
  decls.push(`--zl-menu-trigger-arrow-color: ${isDark ? "#253044" : "#f6fafc"};`);
1275
1259
  decls.push(`--zl-menu-trigger-bg: linear-gradient(135deg, var(--zl-modo-5), var(--zl-modo-7));`);
1276
1260
  decls.push(
1277
- isLightBase ? `--zl-layout-vertical-aside-bg: linear-gradient(180deg, var(--zl-primary-1) 0%, var(--zl-bg-1) 100%);` : `--zl-layout-vertical-aside-bg: linear-gradient(180deg, var(--zl-modo-7) 0%, var(--zl-modo-9) 100%);`
1261
+ `--zl-layout-vertical-aside-bg: linear-gradient(180deg, var(--zl-modo-7) 0%, var(--zl-modo-9) 100%);`
1278
1262
  );
1279
1263
  decls.push(
1280
- isLightBase ? `--zl-layout-horizontal-header-bg: var(--zl-bg-1);` : `--zl-layout-horizontal-header-bg: linear-gradient(90deg, var(--zl-modo-7) 0%, var(--zl-modo-6) 60%, var(--zl-modo-5) 100%);`
1264
+ `--zl-layout-horizontal-header-bg: linear-gradient(90deg, var(--zl-modo-7) 0%, var(--zl-modo-6) 60%, var(--zl-modo-5) 100%);`
1281
1265
  );
1282
1266
  return decls.join("\n ");
1283
1267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zl-ui-kit/theme",
3
- "version": "0.26.1",
3
+ "version": "0.27.0",
4
4
  "type": "module",
5
5
  "description": "ZL UI 主题引擎:内置 5 套主题(light/dark/red-light/red-dark/blue),--zl-* 业务变量 + --el-* Element Plus 变量三层体系,支持运行时自定义主题(defineTheme/setTheme)",
6
6
  "license": "MIT",
@@ -41,8 +41,8 @@
41
41
  "cross-env": "^7.0.3",
42
42
  "tsup": "^8.3.5",
43
43
  "typescript": "^5.7.3",
44
- "@jichuang/eslint-config": "1.0.0",
45
- "@jichuang/tsconfig": "1.0.0"
44
+ "@jichuang/tsconfig": "1.0.0",
45
+ "@jichuang/eslint-config": "1.0.0"
46
46
  },
47
47
  "repository": {
48
48
  "type": "git",
@@ -1,93 +1,93 @@
1
- Google Inc.
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- http://scripts.sil.org/OFL
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.
1
+ Google Inc.
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,6 +1,6 @@
1
- Smiley Sans(得意黑)
2
- 作者:oooooohmygosh 等字体设计师
3
- 许可:SIL Open Font License 1.1(OFL-1.1),可免费商用,无任何限制
4
- 项目地址:https://github.com/atelier-anchor/smiley-sans
5
-
6
- 本目录内 SmileySans-Oblique.ttf.woff2 为根据上述 OFL-1.1 许可分发的字体子集包裹(@fontpkg/smiley-sans)。
1
+ Smiley Sans(得意黑)
2
+ 作者:oooooohmygosh 等字体设计师
3
+ 许可:SIL Open Font License 1.1(OFL-1.1),可免费商用,无任何限制
4
+ 项目地址:https://github.com/atelier-anchor/smiley-sans
5
+
6
+ 本目录内 SmileySans-Oblique.ttf.woff2 为根据上述 OFL-1.1 许可分发的字体子集包裹(@fontpkg/smiley-sans)。
@@ -1,100 +1,100 @@
1
- /*
2
- * 全局 reset(随每套主题 CSS 一并注入;变量取 --zl-*,缺省回退为浅色值)
3
- * 由参考实现迁移,变量命名按需求 §7.2.1 统一 zl- 前缀
4
- */
5
-
6
- /* ============================================================
7
- * 开源字体(OFL-1.1)自托管:替换参考实现中的商业授权字体
8
- * - Noto Sans SC(思源黑体):通用中文正文字体,覆盖系统字体缺失场景
9
- * - Smiley Sans(得意黑):品牌标语展示字体,替换商业「方正」系列
10
- * 字体文件见本包 src/assets/fonts/(经 ./assets/* 导出)
11
- * ============================================================ */
12
- @font-face {
13
- font-family: 'Noto Sans SC';
14
- font-style: normal;
15
- font-weight: 400;
16
- font-display: swap;
17
- src: url(../assets/fonts/noto-sans-sc-400.woff2) format('woff2');
18
- }
19
- @font-face {
20
- font-family: 'Noto Sans SC';
21
- font-style: normal;
22
- font-weight: 500;
23
- font-display: swap;
24
- src: url(../assets/fonts/noto-sans-sc-500.woff2) format('woff2');
25
- }
26
- @font-face {
27
- font-family: 'Noto Sans SC';
28
- font-style: normal;
29
- font-weight: 700;
30
- font-display: swap;
31
- src: url(../assets/fonts/noto-sans-sc-700.woff2) format('woff2');
32
- }
33
- @font-face {
34
- font-family: 'Smiley Sans';
35
- font-style: normal;
36
- font-weight: 400;
37
- font-display: swap;
38
- src: url(../assets/fonts/smiley-sans.woff2) format('woff2');
39
- }
40
-
41
- :root {
42
- /* 品牌标语字体:默认得意黑(开源),回退思源黑体 / 系统字体;替换参考实现的商业字体 */
43
- --zl-slogan-font-family: 'Smiley Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
44
- }
45
-
46
- html,
47
- body,
48
- micro-app,
49
- #root,
50
- #app {
51
- height: 100%;
52
- }
53
-
54
- html,
55
- body {
56
- margin: 0;
57
- padding: 0;
58
- }
59
-
60
- #root {
61
- background: var(--zl-fill-2, #f0f2f5);
62
- color: var(--zl-text-2, #4d5e7d);
63
- font-size: 12px;
64
- line-height: 20px;
65
- overscroll-behavior: contain;
66
- font-family:
67
- Inter,
68
- -apple-system,
69
- BlinkMacSystemFont,
70
- 'PingFang SC',
71
- 'Hiragino Sans GB',
72
- 'Noto Sans SC',
73
- 'Microsoft YaHei',
74
- 'Helvetica Neue',
75
- Helvetica,
76
- Arial,
77
- sans-serif;
78
- }
79
-
80
- *,
81
- *::before,
82
- *::after {
83
- box-sizing: border-box;
84
- }
85
-
86
- ::-webkit-scrollbar {
87
- width: 10px;
88
- height: 10px;
89
- background: transparent;
90
- }
91
-
92
- ::-webkit-scrollbar-thumb {
93
- background: var(--zl-fill-3, #e3e9ef) content-box;
94
- border: 2px solid transparent;
95
- border-radius: 5px;
96
- }
97
-
98
- ::-webkit-scrollbar-thumb:hover {
99
- background-color: var(--zl-fill-4, rgb(179, 192, 204));
100
- }
1
+ /*
2
+ * 全局 reset(随每套主题 CSS 一并注入;变量取 --zl-*,缺省回退为浅色值)
3
+ * 由参考实现迁移,变量命名按需求 §7.2.1 统一 zl- 前缀
4
+ */
5
+
6
+ /* ============================================================
7
+ * 开源字体(OFL-1.1)自托管:替换参考实现中的商业授权字体
8
+ * - Noto Sans SC(思源黑体):通用中文正文字体,覆盖系统字体缺失场景
9
+ * - Smiley Sans(得意黑):品牌标语展示字体,替换商业「方正」系列
10
+ * 字体文件见本包 src/assets/fonts/(经 ./assets/* 导出)
11
+ * ============================================================ */
12
+ @font-face {
13
+ font-family: 'Noto Sans SC';
14
+ font-style: normal;
15
+ font-weight: 400;
16
+ font-display: swap;
17
+ src: url(../assets/fonts/noto-sans-sc-400.woff2) format('woff2');
18
+ }
19
+ @font-face {
20
+ font-family: 'Noto Sans SC';
21
+ font-style: normal;
22
+ font-weight: 500;
23
+ font-display: swap;
24
+ src: url(../assets/fonts/noto-sans-sc-500.woff2) format('woff2');
25
+ }
26
+ @font-face {
27
+ font-family: 'Noto Sans SC';
28
+ font-style: normal;
29
+ font-weight: 700;
30
+ font-display: swap;
31
+ src: url(../assets/fonts/noto-sans-sc-700.woff2) format('woff2');
32
+ }
33
+ @font-face {
34
+ font-family: 'Smiley Sans';
35
+ font-style: normal;
36
+ font-weight: 400;
37
+ font-display: swap;
38
+ src: url(../assets/fonts/smiley-sans.woff2) format('woff2');
39
+ }
40
+
41
+ :root {
42
+ /* 品牌标语字体:默认得意黑(开源),回退思源黑体 / 系统字体;替换参考实现的商业字体 */
43
+ --zl-slogan-font-family: 'Smiley Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
44
+ }
45
+
46
+ html,
47
+ body,
48
+ micro-app,
49
+ #root,
50
+ #app {
51
+ height: 100%;
52
+ }
53
+
54
+ html,
55
+ body {
56
+ margin: 0;
57
+ padding: 0;
58
+ }
59
+
60
+ #root {
61
+ background: var(--zl-fill-2, #f0f2f5);
62
+ color: var(--zl-text-2, #4d5e7d);
63
+ font-size: 12px;
64
+ line-height: 20px;
65
+ overscroll-behavior: contain;
66
+ font-family:
67
+ Inter,
68
+ -apple-system,
69
+ BlinkMacSystemFont,
70
+ 'PingFang SC',
71
+ 'Hiragino Sans GB',
72
+ 'Noto Sans SC',
73
+ 'Microsoft YaHei',
74
+ 'Helvetica Neue',
75
+ Helvetica,
76
+ Arial,
77
+ sans-serif;
78
+ }
79
+
80
+ *,
81
+ *::before,
82
+ *::after {
83
+ box-sizing: border-box;
84
+ }
85
+
86
+ ::-webkit-scrollbar {
87
+ width: 10px;
88
+ height: 10px;
89
+ background: transparent;
90
+ }
91
+
92
+ ::-webkit-scrollbar-thumb {
93
+ background: var(--zl-fill-3, #e3e9ef) content-box;
94
+ border: 2px solid transparent;
95
+ border-radius: 5px;
96
+ }
97
+
98
+ ::-webkit-scrollbar-thumb:hover {
99
+ background-color: var(--zl-fill-4, rgb(179, 192, 204));
100
+ }