@alicloud/console-base-theme 1.4.7 → 1.5.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.
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _styledComponents = require("styled-components");
9
+
10
+ var _mixin = require("../mixin");
11
+
12
+ // 为所有的控制台添加日文默认字体,仅日文下会生效,这里对 body 上的 class 有耦合,该 class 由 ConsoleBase 注入
13
+ var _default = (0, _styledComponents.createGlobalStyle)(["body.lang-ja{", "}"], _mixin.mixinTypoFontFamilyBaseJa);
14
+
15
+ exports.default = _default;
@@ -9,18 +9,25 @@ var _exportNames = {
9
9
  mixinTopNavButtonDarkFix: true,
10
10
  ThemeStyleLight: true,
11
11
  ThemeStyleDark: true,
12
+ GlobalStyleFontFamilyForJa: true,
12
13
  toggleBodyClass: true
13
14
  };
15
+ Object.defineProperty(exports, "GlobalStyleFontFamilyForJa", {
16
+ enumerable: true,
17
+ get: function get() {
18
+ return _globalStyleFontFamilyForJa.default;
19
+ }
20
+ });
14
21
  Object.defineProperty(exports, "ThemeStyleDark", {
15
22
  enumerable: true,
16
23
  get: function get() {
17
- return _themeStyleDark.default;
24
+ return _globalStyleThemeDark.default;
18
25
  }
19
26
  });
20
27
  Object.defineProperty(exports, "ThemeStyleLight", {
21
28
  enumerable: true,
22
29
  get: function get() {
23
- return _themeStyleLight.default;
30
+ return _globalStyleThemeLight.default;
24
31
  }
25
32
  });
26
33
  exports.mixinTopNavButtonDarkFix = void 0;
@@ -61,9 +68,11 @@ Object.keys(_mixin).forEach(function (key) {
61
68
  });
62
69
  });
63
70
 
64
- var _themeStyleLight = _interopRequireDefault(require("./theme-style-light"));
71
+ var _globalStyleThemeLight = _interopRequireDefault(require("./global-style-theme-light"));
72
+
73
+ var _globalStyleThemeDark = _interopRequireDefault(require("./global-style-theme-dark"));
65
74
 
66
- var _themeStyleDark = _interopRequireDefault(require("./theme-style-dark"));
75
+ var _globalStyleFontFamilyForJa = _interopRequireDefault(require("./global-style-font-family-for-ja"));
67
76
 
68
77
  var _util = require("./util");
69
78
 
@@ -15,15 +15,15 @@ var _bg = require("./bg");
15
15
 
16
16
  var _border = require("./border");
17
17
 
18
- var mixinTypoFontFamilyBase = (0, _styledComponents.css)(["font-family:", ";font-family:var(--cb-typo-font-family-base,", ");"], _var.TYPO.FONT_FAMILY_BASE, _var.TYPO.FONT_FAMILY_BASE); // 日文专属
18
+ // 日文专属
19
+ var mixinTypoFontFamilyBaseJa = (0, _styledComponents.css)(["font-family:", ";font-family:var(--cb-typo-font-family-base-ja,", ");"], _var.TYPO.FONT_FAMILY_BASE_JA, _var.TYPO.FONT_FAMILY_BASE_JA); // lang-ja 是 console-base 注入到 body 的 className,虽然有些耦合,但比较实用
19
20
 
20
- exports.mixinTypoFontFamilyBase = mixinTypoFontFamilyBase;
21
- var mixinTypoFontFamilyBaseJa = (0, _styledComponents.css)(["font-family:", ";font-family:var(--cb-typo-font-family-base-ja,", ");"], _var.TYPO.FONT_FAMILY_BASE_JA, _var.TYPO.FONT_FAMILY_BASE_JA);
22
21
  exports.mixinTypoFontFamilyBaseJa = mixinTypoFontFamilyBaseJa;
23
- var mixinTypoFontFamilyMono = (0, _styledComponents.css)(["font-family:", ";font-family:var(--cb-typo-font-family-monospace,", ");"], _var.TYPO.FONT_FAMILY_MONOSPACE, _var.TYPO.FONT_FAMILY_MONOSPACE); // lang-ja 是 console-base 注入到 body 的 className,虽然有些耦合,但比较实用
24
-
22
+ var mixinTypoFontFamilyBase = (0, _styledComponents.css)(["font-family:", ";font-family:var(--cb-typo-font-family-base,", ");body.lang-ja &{", "}"], _var.TYPO.FONT_FAMILY_BASE, _var.TYPO.FONT_FAMILY_BASE, mixinTypoFontFamilyBaseJa);
23
+ exports.mixinTypoFontFamilyBase = mixinTypoFontFamilyBase;
24
+ var mixinTypoFontFamilyMono = (0, _styledComponents.css)(["font-family:", ";font-family:var(--cb-typo-font-family-monospace,", ");"], _var.TYPO.FONT_FAMILY_MONOSPACE, _var.TYPO.FONT_FAMILY_MONOSPACE);
25
25
  exports.mixinTypoFontFamilyMono = mixinTypoFontFamilyMono;
26
- var mixinTypoFontBase = (0, _styledComponents.css)(["line-height:1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;", " body.lang-ja &{", "}"], mixinTypoFontFamilyBase, mixinTypoFontFamilyBaseJa);
26
+ var mixinTypoFontBase = (0, _styledComponents.css)(["line-height:1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;", ""], mixinTypoFontFamilyBase);
27
27
  exports.mixinTypoFontBase = mixinTypoFontBase;
28
28
  var mixinTypoStrong = (0, _styledComponents.css)(["font-weight:600;", ""], _text.mixinTextPrimary);
29
29
  exports.mixinTypoStrong = mixinTypoStrong;
@@ -0,0 +1,4 @@
1
+ import { createGlobalStyle } from 'styled-components';
2
+ import { mixinTypoFontFamilyBaseJa } from '../mixin'; // 为所有的控制台添加日文默认字体,仅日文下会生效,这里对 body 上的 class 有耦合,该 class 由 ConsoleBase 注入
3
+
4
+ export default createGlobalStyle(["body.lang-ja{", "}"], mixinTypoFontFamilyBaseJa);
package/build/es/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { css } from 'styled-components';
2
2
  export * from './var';
3
3
  export * from './mixin';
4
- export { default as ThemeStyleLight } from './theme-style-light';
5
- export { default as ThemeStyleDark } from './theme-style-dark';
4
+ export { default as ThemeStyleLight } from './global-style-theme-light';
5
+ export { default as ThemeStyleDark } from './global-style-theme-dark';
6
+ export { default as GlobalStyleFontFamilyForJa } from './global-style-font-family-for-ja';
6
7
  export { toggleBodyClass } from './util'; // 主题黑的时候,在顶栏上的 button 背景色不能是标准的... FIXME 我需要调整颜色的策略 primary-secondary-tertiary 区分 container 和 control
7
8
 
8
9
  export var mixinTopNavButtonDarkFix = css([".theme-dark &{background-color:rgba(255,255,255,0.08);}"]);
@@ -2,13 +2,13 @@ import { css } from 'styled-components';
2
2
  import { TYPO, COLOR } from '../var';
3
3
  import { mixinTextPrimary, mixinTextEmphasis, mixinTextCode, mixinTextSecondary, mixinTextTertiary } from './text';
4
4
  import { mixinBgSecondary, mixinBgSecondaryFade } from './bg';
5
- import { mixinBorderTertiary, mixinBorderTertiaryColor } from './border';
6
- export var mixinTypoFontFamilyBase = css(["font-family:", ";font-family:var(--cb-typo-font-family-base,", ");"], TYPO.FONT_FAMILY_BASE, TYPO.FONT_FAMILY_BASE); // 日文专属
5
+ import { mixinBorderTertiary, mixinBorderTertiaryColor } from './border'; // 日文专属
7
6
 
8
- export var mixinTypoFontFamilyBaseJa = css(["font-family:", ";font-family:var(--cb-typo-font-family-base-ja,", ");"], TYPO.FONT_FAMILY_BASE_JA, TYPO.FONT_FAMILY_BASE_JA);
9
- export var mixinTypoFontFamilyMono = css(["font-family:", ";font-family:var(--cb-typo-font-family-monospace,", ");"], TYPO.FONT_FAMILY_MONOSPACE, TYPO.FONT_FAMILY_MONOSPACE); // lang-ja 是 console-base 注入到 body 的 className,虽然有些耦合,但比较实用
7
+ export var mixinTypoFontFamilyBaseJa = css(["font-family:", ";font-family:var(--cb-typo-font-family-base-ja,", ");"], TYPO.FONT_FAMILY_BASE_JA, TYPO.FONT_FAMILY_BASE_JA); // lang-ja 是 console-base 注入到 body 的 className,虽然有些耦合,但比较实用
10
8
 
11
- export var mixinTypoFontBase = css(["line-height:1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;", " body.lang-ja &{", "}"], mixinTypoFontFamilyBase, mixinTypoFontFamilyBaseJa);
9
+ export var mixinTypoFontFamilyBase = css(["font-family:", ";font-family:var(--cb-typo-font-family-base,", ");body.lang-ja &{", "}"], TYPO.FONT_FAMILY_BASE, TYPO.FONT_FAMILY_BASE, mixinTypoFontFamilyBaseJa);
10
+ export var mixinTypoFontFamilyMono = css(["font-family:", ";font-family:var(--cb-typo-font-family-monospace,", ");"], TYPO.FONT_FAMILY_MONOSPACE, TYPO.FONT_FAMILY_MONOSPACE);
11
+ export var mixinTypoFontBase = css(["line-height:1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;", ""], mixinTypoFontFamilyBase);
12
12
  export var mixinTypoStrong = css(["font-weight:600;", ""], mixinTextPrimary);
13
13
  export var mixinTypoEm = css(["font-style:normal;", ""], mixinTextEmphasis);
14
14
  export var mixinTypoSmall = css(["font-size:inherit;", ""], mixinTextTertiary);
@@ -0,0 +1,2 @@
1
+ declare const _default: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
2
+ export default _default;
@@ -1,7 +1,8 @@
1
1
  export * from './var';
2
2
  export * from './mixin';
3
- export { default as ThemeStyleLight } from './theme-style-light';
4
- export { default as ThemeStyleDark } from './theme-style-dark';
3
+ export { default as ThemeStyleLight } from './global-style-theme-light';
4
+ export { default as ThemeStyleDark } from './global-style-theme-dark';
5
+ export { default as GlobalStyleFontFamilyForJa } from './global-style-font-family-for-ja';
5
6
  export { toggleBodyClass } from './util';
6
7
  export declare const mixinTopNavButtonDarkFix: import("styled-components").FlattenSimpleInterpolation;
7
8
  export type { IPropsEllipsisLines as EllipsisLinesProps } from './types';
@@ -1,6 +1,6 @@
1
1
  import { IPropsEllipsisLines } from '../types';
2
- export declare const mixinTypoFontFamilyBase: import("styled-components").FlattenSimpleInterpolation;
3
2
  export declare const mixinTypoFontFamilyBaseJa: import("styled-components").FlattenSimpleInterpolation;
3
+ export declare const mixinTypoFontFamilyBase: import("styled-components").FlattenSimpleInterpolation;
4
4
  export declare const mixinTypoFontFamilyMono: import("styled-components").FlattenSimpleInterpolation;
5
5
  export declare const mixinTypoFontBase: import("styled-components").FlattenSimpleInterpolation;
6
6
  export declare const mixinTypoStrong: import("styled-components").FlattenSimpleInterpolation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/console-base-theme",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "description": "控制台主题 - 基于 css variable 和 styled-components",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,