@zl-ui-kit/theme 0.26.2 → 0.27.1

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.
@@ -369,119 +369,119 @@ body[data-theme='red-light'] .el-select__wrapper.is-focused .el-select__placehol
369
369
  color: var(--el-color-primary);
370
370
  }
371
371
 
372
- /*
373
- * 全局 reset(随每套主题 CSS 一并注入;变量取 --zl-*,缺省回退为浅色值)
374
- * 由参考实现迁移,变量命名按需求 §7.2.1 统一 zl- 前缀
375
- */
376
-
377
- /* ============================================================
378
- * 开源字体(OFL-1.1)自托管:替换参考实现中的商业授权字体
379
- * - Noto Sans SC(思源黑体):通用中文正文字体,覆盖系统字体缺失场景
380
- * - Smiley Sans(得意黑):品牌标语展示字体,替换商业「方正」系列
381
- * 字体文件见本包 src/assets/fonts/(经 ./assets/* 导出)
382
- * ============================================================ */
383
- @font-face {
384
- font-family: 'Noto Sans SC';
385
- font-style: normal;
386
- font-weight: 400;
387
- font-display: swap;
388
- src: url(../assets/fonts/noto-sans-sc-400.woff2) format('woff2');
389
- }
390
- @font-face {
391
- font-family: 'Noto Sans SC';
392
- font-style: normal;
393
- font-weight: 500;
394
- font-display: swap;
395
- src: url(../assets/fonts/noto-sans-sc-500.woff2) format('woff2');
396
- }
397
- @font-face {
398
- font-family: 'Noto Sans SC';
399
- font-style: normal;
400
- font-weight: 700;
401
- font-display: swap;
402
- src: url(../assets/fonts/noto-sans-sc-700.woff2) format('woff2');
403
- }
404
- @font-face {
405
- font-family: 'Smiley Sans';
406
- font-style: normal;
407
- font-weight: 400;
408
- font-display: swap;
409
- src: url(../assets/fonts/smiley-sans.woff2) format('woff2');
410
- }
411
-
412
- :root {
413
- /* 品牌标语字体:默认得意黑(开源),回退思源黑体 / 系统字体;替换参考实现的商业字体 */
414
- --zl-slogan-font-family: 'Smiley Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
415
- }
416
-
417
- html,
418
- body,
419
- micro-app,
420
- #root,
421
- #app {
422
- height: 100%;
423
- }
424
-
425
- html,
426
- body {
427
- margin: 0;
428
- padding: 0;
429
- }
430
-
431
- #root {
432
- background: var(--zl-fill-2, #f0f2f5);
433
- color: var(--zl-text-2, #4d5e7d);
434
- font-size: 12px;
435
- line-height: 20px;
436
- overscroll-behavior: contain;
437
- font-family:
438
- Inter,
439
- -apple-system,
440
- BlinkMacSystemFont,
441
- 'PingFang SC',
442
- 'Hiragino Sans GB',
443
- 'Noto Sans SC',
444
- 'Microsoft YaHei',
445
- 'Helvetica Neue',
446
- Helvetica,
447
- Arial,
448
- sans-serif;
449
- }
450
-
451
- *,
452
- *::before,
453
- *::after {
454
- box-sizing: border-box;
455
- }
456
-
457
- ::-webkit-scrollbar {
458
- width: 10px;
459
- height: 10px;
460
- background: transparent;
461
- }
462
-
463
- ::-webkit-scrollbar-thumb {
464
- background: var(--zl-fill-3, #e3e9ef) content-box;
465
- border: 2px solid transparent;
466
- border-radius: 5px;
467
- }
468
-
469
- ::-webkit-scrollbar-thumb:hover {
470
- background-color: var(--zl-fill-4, rgb(179, 192, 204));
471
- }
372
+ /*
373
+ * 全局 reset(随每套主题 CSS 一并注入;变量取 --zl-*,缺省回退为浅色值)
374
+ * 由参考实现迁移,变量命名按需求 §7.2.1 统一 zl- 前缀
375
+ */
472
376
 
473
- /*
474
- * Element Plus 组件样式覆盖(占位骨架)
475
- * 参考实现的 18 个组件覆盖基于原 UI 库类名体系,需按 EP 的 .el-* BEM 结构逐组件重写,
476
- * 以 playground 主题预览页视觉验收为准(需求 §7.2.2 / P15)。
477
- * 本文件随 per-theme CSS 一同生效;以下为首批全局性微调。
478
- */
479
-
480
- /* 与 zl 设计一致的圆角与动效基调 */
481
- .el-button {
482
- --el-button-border-radius: var(--zl-radius-base, 4px);
483
- }
484
-
485
- .el-dialog {
486
- --el-dialog-border-radius: var(--zl-radius-base, 4px);
487
- }
377
+ /* ============================================================
378
+ * 开源字体(OFL-1.1)自托管:替换参考实现中的商业授权字体
379
+ * - Noto Sans SC(思源黑体):通用中文正文字体,覆盖系统字体缺失场景
380
+ * - Smiley Sans(得意黑):品牌标语展示字体,替换商业「方正」系列
381
+ * 字体文件见本包 src/assets/fonts/(经 ./assets/* 导出)
382
+ * ============================================================ */
383
+ @font-face {
384
+ font-family: 'Noto Sans SC';
385
+ font-style: normal;
386
+ font-weight: 400;
387
+ font-display: swap;
388
+ src: url(../assets/fonts/noto-sans-sc-400.woff2) format('woff2');
389
+ }
390
+ @font-face {
391
+ font-family: 'Noto Sans SC';
392
+ font-style: normal;
393
+ font-weight: 500;
394
+ font-display: swap;
395
+ src: url(../assets/fonts/noto-sans-sc-500.woff2) format('woff2');
396
+ }
397
+ @font-face {
398
+ font-family: 'Noto Sans SC';
399
+ font-style: normal;
400
+ font-weight: 700;
401
+ font-display: swap;
402
+ src: url(../assets/fonts/noto-sans-sc-700.woff2) format('woff2');
403
+ }
404
+ @font-face {
405
+ font-family: 'Smiley Sans';
406
+ font-style: normal;
407
+ font-weight: 400;
408
+ font-display: swap;
409
+ src: url(../assets/fonts/smiley-sans.woff2) format('woff2');
410
+ }
411
+
412
+ :root {
413
+ /* 品牌标语字体:默认得意黑(开源),回退思源黑体 / 系统字体;替换参考实现的商业字体 */
414
+ --zl-slogan-font-family: 'Smiley Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
415
+ }
416
+
417
+ html,
418
+ body,
419
+ micro-app,
420
+ #root,
421
+ #app {
422
+ height: 100%;
423
+ }
424
+
425
+ html,
426
+ body {
427
+ margin: 0;
428
+ padding: 0;
429
+ }
430
+
431
+ #root {
432
+ background: var(--zl-fill-2, #f0f2f5);
433
+ color: var(--zl-text-2, #4d5e7d);
434
+ font-size: 12px;
435
+ line-height: 20px;
436
+ overscroll-behavior: contain;
437
+ font-family:
438
+ Inter,
439
+ -apple-system,
440
+ BlinkMacSystemFont,
441
+ 'PingFang SC',
442
+ 'Hiragino Sans GB',
443
+ 'Noto Sans SC',
444
+ 'Microsoft YaHei',
445
+ 'Helvetica Neue',
446
+ Helvetica,
447
+ Arial,
448
+ sans-serif;
449
+ }
450
+
451
+ *,
452
+ *::before,
453
+ *::after {
454
+ box-sizing: border-box;
455
+ }
456
+
457
+ ::-webkit-scrollbar {
458
+ width: 10px;
459
+ height: 10px;
460
+ background: transparent;
461
+ }
462
+
463
+ ::-webkit-scrollbar-thumb {
464
+ background: var(--zl-fill-3, #e3e9ef) content-box;
465
+ border: 2px solid transparent;
466
+ border-radius: 5px;
467
+ }
468
+
469
+ ::-webkit-scrollbar-thumb:hover {
470
+ background-color: var(--zl-fill-4, rgb(179, 192, 204));
471
+ }
472
+
473
+ /*
474
+ * Element Plus 组件样式覆盖(占位骨架)
475
+ * 参考实现的 18 个组件覆盖基于原 UI 库类名体系,需按 EP 的 .el-* BEM 结构逐组件重写,
476
+ * 以 playground 主题预览页视觉验收为准(需求 §7.2.2 / P15)。
477
+ * 本文件随 per-theme CSS 一同生效;以下为首批全局性微调。
478
+ */
479
+
480
+ /* 与 zl 设计一致的圆角与动效基调 */
481
+ .el-button {
482
+ --el-button-border-radius: var(--zl-radius-base, 4px);
483
+ }
484
+
485
+ .el-dialog {
486
+ --el-dialog-border-radius: var(--zl-radius-base, 4px);
487
+ }
@@ -1,15 +1,15 @@
1
- /*
2
- * Element Plus 组件样式覆盖(占位骨架)
3
- * 参考实现的 18 个组件覆盖基于原 UI 库类名体系,需按 EP 的 .el-* BEM 结构逐组件重写,
4
- * 以 playground 主题预览页视觉验收为准(需求 §7.2.2 / P15)。
5
- * 本文件随 per-theme CSS 一同生效;以下为首批全局性微调。
6
- */
7
-
8
- /* 与 zl 设计一致的圆角与动效基调 */
9
- .el-button {
10
- --el-button-border-radius: var(--zl-radius-base, 4px);
11
- }
12
-
13
- .el-dialog {
14
- --el-dialog-border-radius: var(--zl-radius-base, 4px);
15
- }
1
+ /*
2
+ * Element Plus 组件样式覆盖(占位骨架)
3
+ * 参考实现的 18 个组件覆盖基于原 UI 库类名体系,需按 EP 的 .el-* BEM 结构逐组件重写,
4
+ * 以 playground 主题预览页视觉验收为准(需求 §7.2.2 / P15)。
5
+ * 本文件随 per-theme CSS 一同生效;以下为首批全局性微调。
6
+ */
7
+
8
+ /* 与 zl 设计一致的圆角与动效基调 */
9
+ .el-button {
10
+ --el-button-border-radius: var(--zl-radius-base, 4px);
11
+ }
12
+
13
+ .el-dialog {
14
+ --el-dialog-border-radius: var(--zl-radius-base, 4px);
15
+ }
@@ -1,27 +1,27 @@
1
- // ============================================================
2
- // SCSS 工具(供消费方深度定制编译使用;变量前缀 zl-)
3
- // 入口:@zl/theme/scss(colors / map / theme 三个模块)
4
- // ============================================================
5
-
6
- @use 'sass:list';
7
- @use '../generated/_constants' as *;
8
-
9
- $color-gradient-range: (6, 3) !default;
10
-
11
- /** 遍历全部色彩类型 */
12
- @mixin colorForEach() {
13
- @each $color in $color-types {
14
- @content ($color);
15
- }
16
- }
17
-
18
- /** 色板渐变背景(默认 6→3 级) */
19
- @mixin colorGradient($color, $direction, $range: $color-gradient-range) {
20
- $color-stops: ();
21
-
22
- @each $stop in $range {
23
- $color-stops: list.append($color-stops, var(--zl-#{$color}-#{$stop}), comma);
24
- }
25
-
26
- background-image: linear-gradient($direction, $color-stops);
27
- }
1
+ // ============================================================
2
+ // SCSS 工具(供消费方深度定制编译使用;变量前缀 zl-)
3
+ // 入口:@zl/theme/scss(colors / map / theme 三个模块)
4
+ // ============================================================
5
+
6
+ @use 'sass:list';
7
+ @use '../generated/_constants' as *;
8
+
9
+ $color-gradient-range: (6, 3) !default;
10
+
11
+ /** 遍历全部色彩类型 */
12
+ @mixin colorForEach() {
13
+ @each $color in $color-types {
14
+ @content ($color);
15
+ }
16
+ }
17
+
18
+ /** 色板渐变背景(默认 6→3 级) */
19
+ @mixin colorGradient($color, $direction, $range: $color-gradient-range) {
20
+ $color-stops: ();
21
+
22
+ @each $stop in $range {
23
+ $color-stops: list.append($color-stops, var(--zl-#{$color}-#{$stop}), comma);
24
+ }
25
+
26
+ background-image: linear-gradient($direction, $color-stops);
27
+ }
@@ -1,16 +1,16 @@
1
- // 嵌套 map 取值工具
2
-
3
- @use 'sass:map';
4
- @use 'sass:meta';
5
-
6
- @function mapGet($map, $keys...) {
7
- @each $key in $keys {
8
- @if meta.type-of($map) == 'map' and map.has-key($map, $key) {
9
- $map: map.get($map, $key);
10
- } @else {
11
- @warn "Key `#{$key}` not found in map or map is not nested.";
12
- @return null;
13
- }
14
- }
15
- @return $map;
16
- }
1
+ // 嵌套 map 取值工具
2
+
3
+ @use 'sass:map';
4
+ @use 'sass:meta';
5
+
6
+ @function mapGet($map, $keys...) {
7
+ @each $key in $keys {
8
+ @if meta.type-of($map) == 'map' and map.has-key($map, $key) {
9
+ $map: map.get($map, $key);
10
+ } @else {
11
+ @warn "Key `#{$key}` not found in map or map is not nested.";
12
+ @return null;
13
+ }
14
+ }
15
+ @return $map;
16
+ }
@@ -1,13 +1,13 @@
1
- // 主题作用域 mixin:为每套主题生成选择器块(light 无属性选择器)
2
-
3
- @use '../generated/_constants' as *;
4
-
5
- @mixin theme() {
6
- @each $theme in $themes-name {
7
- $filter: if($theme == 'light', '', "[data-theme='#{$theme}']");
8
-
9
- body#{$filter} {
10
- @content ($theme);
11
- }
12
- }
13
- }
1
+ // 主题作用域 mixin:为每套主题生成选择器块(light 无属性选择器)
2
+
3
+ @use '../generated/_constants' as *;
4
+
5
+ @mixin theme() {
6
+ @each $theme in $themes-name {
7
+ $filter: if($theme == 'light', '', "[data-theme='#{$theme}']");
8
+
9
+ body#{$filter} {
10
+ @content ($theme);
11
+ }
12
+ }
13
+ }