@alicloud/console-base-theme 1.3.90 → 1.4.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.
@@ -27,7 +27,7 @@ exports.mixinTopNavButtonDarkFix = void 0;
27
27
  Object.defineProperty(exports, "toggleBodyClass", {
28
28
  enumerable: true,
29
29
  get: function get() {
30
- return _toggleBodyClass.default;
30
+ return _util.toggleBodyClass;
31
31
  }
32
32
  });
33
33
 
@@ -65,7 +65,7 @@ var _themeStyleLight = _interopRequireDefault(require("./theme-style-light"));
65
65
 
66
66
  var _themeStyleDark = _interopRequireDefault(require("./theme-style-dark"));
67
67
 
68
- var _toggleBodyClass = _interopRequireDefault(require("./util/toggle-body-class"));
68
+ var _util = require("./util");
69
69
 
70
70
  // 主题黑的时候,在顶栏上的 button 背景色不能是标准的... FIXME 我需要调整颜色的策略 primary-secondary-tertiary 区分 container 和 control
71
71
  var mixinTopNavButtonDarkFix = (0, _styledComponents.css)([".theme-dark &{background-color:rgba(255,255,255,0.08);}"]);
@@ -19,9 +19,10 @@ var _shadow = require("./shadow");
19
19
  * 对按钮样式进行重置:
20
20
  * 1. 去掉 padding、background、border,定义 outline 以防止丑陋的 Chrome focus outline 样式
21
21
  * 2. 设置字体(family、颜色、大小、行间距等)继承
22
- * 3. 定义 disabled 的基础样式
22
+ * 3. 避免 link hover 的样式干扰
23
+ * 4. 定义 disabled 的基础样式
23
24
  */
24
- var mixinButtonReset = (0, _styledComponents.css)(["padding:0;border:1px solid transparent;box-sizing:border-box;outline:none;background:none;line-height:inherit;cursor:pointer;font-family:inherit;font-size:inherit;text-align:center;text-decoration:none;color:inherit;transition:all ease-out 0.3s;&:hover{text-decoration:none;}&[disabled]{cursor:not-allowed;}"]);
25
+ var mixinButtonReset = (0, _styledComponents.css)(["padding:0;border:1px solid transparent;box-sizing:border-box;outline:none;background:none;line-height:inherit;cursor:pointer;font-family:inherit;font-size:inherit;text-align:center;text-decoration:none;color:inherit;transition:all ease-out 0.3s;&:hover,&:link:hover{text-decoration:none;}&[disabled]{cursor:not-allowed;}"]);
25
26
  exports.mixinButtonReset = mixinButtonReset;
26
27
  var mixinButtonShadow = (0, _styledComponents.css)(["&:hover,&:focus{", "}&:active,&:disabled{box-shadow:none;}"], _shadow.mixinShadowLDown); // size mixins
27
28
 
@@ -27,7 +27,7 @@ var mixinTypoEm = (0, _styledComponents.css)(["font-style:normal;", ""], _text.m
27
27
  exports.mixinTypoEm = mixinTypoEm;
28
28
  var mixinTypoSmall = (0, _styledComponents.css)(["font-size:inherit;", ""], _text.mixinTextTertiary);
29
29
  exports.mixinTypoSmall = mixinTypoSmall;
30
- var mixinTypoCode = (0, _styledComponents.css)(["padding:2px 4px;border-radius:2px;", " ", " ", ""], _text.mixinTextCode, _bg.mixinBgSecondary, _border.mixinBorderTertiary);
30
+ var mixinTypoCode = (0, _styledComponents.css)(["padding:2px 4px;border-radius:2px;", " ", ""], _text.mixinTextCode, _bg.mixinBgSecondaryFade);
31
31
  exports.mixinTypoCode = mixinTypoCode;
32
32
  var mixinTypoKbd = (0, _styledComponents.css)(["display:inline-block;padding:2px 4px;border-radius:3px;box-shadow:inset 0 -1px 0 ", ";box-shadow:inset 0 -1px 0 var(--cb-color-shadow,", ");line-height:1.2;", " ", " ", ""], _var.COLOR.SHADOW, _var.COLOR.SHADOW, _text.mixinTextSecondary, _bg.mixinBgSecondary, _border.mixinBorderTertiary);
33
33
  exports.mixinTypoKbd = mixinTypoKbd;
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  var _typeof = require("@babel/runtime/helpers/typeof");
6
4
 
7
5
  Object.defineProperty(exports, "__esModule", {
@@ -9,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
9
7
  });
10
8
  exports.default = void 0;
11
9
 
12
- var _createThemeGlobalStyle = _interopRequireDefault(require("../util/create-theme-global-style"));
10
+ var _util = require("../util");
13
11
 
14
12
  var VARS = _interopRequireWildcard(require("./var"));
15
13
 
@@ -17,6 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
15
 
18
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
17
 
20
- var _default = (0, _createThemeGlobalStyle.default)(VARS);
18
+ var _default = (0, _util.createThemeGlobalStyle)(VARS);
21
19
 
22
20
  exports.default = _default;
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  var _typeof = require("@babel/runtime/helpers/typeof");
6
4
 
7
5
  Object.defineProperty(exports, "__esModule", {
@@ -11,12 +9,12 @@ exports.default = void 0;
11
9
 
12
10
  var VARS = _interopRequireWildcard(require("../var"));
13
11
 
14
- var _createThemeGlobalStyle = _interopRequireDefault(require("../util/create-theme-global-style"));
12
+ var _util = require("../util");
15
13
 
16
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
15
 
18
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
17
 
20
- var _default = (0, _createThemeGlobalStyle.default)(VARS);
18
+ var _default = (0, _util.createThemeGlobalStyle)(VARS);
21
19
 
22
20
  exports.default = _default;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ Object.defineProperty(exports, "createThemeGlobalStyle", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _createThemeGlobalStyle.default;
12
+ }
13
+ });
14
+ Object.defineProperty(exports, "toggleBodyClass", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _toggleBodyClass.default;
18
+ }
19
+ });
20
+
21
+ var _createThemeGlobalStyle = _interopRequireDefault(require("./create-theme-global-style"));
22
+
23
+ var _toggleBodyClass = _interopRequireDefault(require("./toggle-body-class"));
@@ -9,6 +9,8 @@ var _default = {
9
9
  // 全局吊顶
10
10
  TOOLKIT: 99,
11
11
  // 全局工具
12
+ MICRO_BROWSER: 1200,
13
+ // 微浏览器
12
14
  // dialog 主体
13
15
  DIALOG_SLIDE: 200,
14
16
  // 侧拉抽屉
package/build/es/index.js CHANGED
@@ -3,6 +3,6 @@ export * from './var';
3
3
  export * from './mixin';
4
4
  export { default as ThemeStyleLight } from './theme-style-light';
5
5
  export { default as ThemeStyleDark } from './theme-style-dark';
6
- export { default as toggleBodyClass } from './util/toggle-body-class'; // 主题黑的时候,在顶栏上的 button 背景色不能是标准的... FIXME 我需要调整颜色的策略 primary-secondary-tertiary 区分 container 和 control
6
+ export { toggleBodyClass } from './util'; // 主题黑的时候,在顶栏上的 button 背景色不能是标准的... FIXME 我需要调整颜色的策略 primary-secondary-tertiary 区分 container 和 control
7
7
 
8
8
  export var mixinTopNavButtonDarkFix = css([".theme-dark &{background-color:rgba(255,255,255,0.08);}"]);
@@ -6,10 +6,11 @@ import { mixinShadowLDown } from './shadow';
6
6
  * 对按钮样式进行重置:
7
7
  * 1. 去掉 padding、background、border,定义 outline 以防止丑陋的 Chrome focus outline 样式
8
8
  * 2. 设置字体(family、颜色、大小、行间距等)继承
9
- * 3. 定义 disabled 的基础样式
9
+ * 3. 避免 link hover 的样式干扰
10
+ * 4. 定义 disabled 的基础样式
10
11
  */
11
12
 
12
- export var mixinButtonReset = css(["padding:0;border:1px solid transparent;box-sizing:border-box;outline:none;background:none;line-height:inherit;cursor:pointer;font-family:inherit;font-size:inherit;text-align:center;text-decoration:none;color:inherit;transition:all ease-out 0.3s;&:hover{text-decoration:none;}&[disabled]{cursor:not-allowed;}"]);
13
+ export var mixinButtonReset = css(["padding:0;border:1px solid transparent;box-sizing:border-box;outline:none;background:none;line-height:inherit;cursor:pointer;font-family:inherit;font-size:inherit;text-align:center;text-decoration:none;color:inherit;transition:all ease-out 0.3s;&:hover,&:link:hover{text-decoration:none;}&[disabled]{cursor:not-allowed;}"]);
13
14
  export var mixinButtonShadow = css(["&:hover,&:focus{", "}&:active,&:disabled{box-shadow:none;}"], mixinShadowLDown); // size mixins
14
15
 
15
16
  export var mixinButtonSizeXs = css(["padding:0 ", "px;height:", "px;line-height:", "px;font-size:", "px;"], SIZE.PADDING_X_FORM_CONTROL_XS, SIZE.HEIGHT_FORM_CONTROL_XS, SIZE.HEIGHT_FORM_CONTROL_XS - 2, SIZE.FONT_SIZE_FORM_CONTROL_XS);
@@ -1,7 +1,7 @@
1
1
  import { css } from 'styled-components';
2
2
  import { TYPO, COLOR } from '../var';
3
3
  import { mixinTextPrimary, mixinTextEmphasis, mixinTextCode, mixinTextSecondary, mixinTextTertiary } from './text';
4
- import { mixinBgSecondary } from './bg';
4
+ import { mixinBgSecondary, mixinBgSecondaryFade } from './bg';
5
5
  import { mixinBorderTertiary, mixinBorderTertiaryColor } from './border';
6
6
  export var mixinTypoFontFamilyBase = css(["font-family:", ";font-family:var(--cb-typo-font-family-base,", ");"], TYPO.FONT_FAMILY_BASE, TYPO.FONT_FAMILY_BASE);
7
7
  export var mixinTypoFontFamilyMono = css(["font-family:", ";font-family:var(--cb-typo-font-family-monospace,", ");"], TYPO.FONT_FAMILY_MONOSPACE, TYPO.FONT_FAMILY_MONOSPACE);
@@ -9,7 +9,7 @@ export var mixinTypoFontBase = css(["line-height:1.5;-moz-osx-font-smoothing:gra
9
9
  export var mixinTypoStrong = css(["font-weight:600;", ""], mixinTextPrimary);
10
10
  export var mixinTypoEm = css(["font-style:normal;", ""], mixinTextEmphasis);
11
11
  export var mixinTypoSmall = css(["font-size:inherit;", ""], mixinTextTertiary);
12
- export var mixinTypoCode = css(["padding:2px 4px;border-radius:2px;", " ", " ", ""], mixinTextCode, mixinBgSecondary, mixinBorderTertiary);
12
+ export var mixinTypoCode = css(["padding:2px 4px;border-radius:2px;", " ", ""], mixinTextCode, mixinBgSecondaryFade);
13
13
  export var mixinTypoKbd = css(["display:inline-block;padding:2px 4px;border-radius:3px;box-shadow:inset 0 -1px 0 ", ";box-shadow:inset 0 -1px 0 var(--cb-color-shadow,", ");line-height:1.2;", " ", " ", ""], COLOR.SHADOW, COLOR.SHADOW, mixinTextSecondary, mixinBgSecondary, mixinBorderTertiary);
14
14
  export var mixinTypoBlockquote = css(["padding:8px 16px;border-left-width:4px;border-left-style:solid;", " ", ""], mixinBorderTertiaryColor, mixinTextTertiary);
15
15
  export var mixinTypoLineWrap = css(["white-space:normal;word-wrap:break-word;"]);
@@ -1,3 +1,3 @@
1
- import createThemeGlobalStyle from '../util/create-theme-global-style';
1
+ import { createThemeGlobalStyle } from '../util';
2
2
  import * as VARS from './var';
3
3
  export default createThemeGlobalStyle(VARS);
@@ -1,3 +1,3 @@
1
1
  import * as VARS from '../var';
2
- import createThemeGlobalStyle from '../util/create-theme-global-style';
2
+ import { createThemeGlobalStyle } from '../util';
3
3
  export default createThemeGlobalStyle(VARS);
@@ -0,0 +1,2 @@
1
+ export { default as createThemeGlobalStyle } from './create-theme-global-style';
2
+ export { default as toggleBodyClass } from './toggle-body-class';
@@ -3,6 +3,8 @@ export default {
3
3
  // 全局吊顶
4
4
  TOOLKIT: 99,
5
5
  // 全局工具
6
+ MICRO_BROWSER: 1200,
7
+ // 微浏览器
6
8
  // dialog 主体
7
9
  DIALOG_SLIDE: 200,
8
10
  // 侧拉抽屉
@@ -2,6 +2,6 @@ export * from './var';
2
2
  export * from './mixin';
3
3
  export { default as ThemeStyleLight } from './theme-style-light';
4
4
  export { default as ThemeStyleDark } from './theme-style-dark';
5
- export { default as toggleBodyClass } from './util/toggle-body-class';
5
+ export { toggleBodyClass } from './util';
6
6
  export declare const mixinTopNavButtonDarkFix: import("styled-components").FlattenSimpleInterpolation;
7
7
  export type { IPropsEllipsisLines as EllipsisLinesProps } from './types';
@@ -2,7 +2,8 @@
2
2
  * 对按钮样式进行重置:
3
3
  * 1. 去掉 padding、background、border,定义 outline 以防止丑陋的 Chrome focus outline 样式
4
4
  * 2. 设置字体(family、颜色、大小、行间距等)继承
5
- * 3. 定义 disabled 的基础样式
5
+ * 3. 避免 link hover 的样式干扰
6
+ * 4. 定义 disabled 的基础样式
6
7
  */
7
8
  export declare const mixinButtonReset: import("styled-components").FlattenSimpleInterpolation;
8
9
  export declare const mixinButtonShadow: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1,2 @@
1
+ export { default as createThemeGlobalStyle } from './create-theme-global-style';
2
+ export { default as toggleBodyClass } from './toggle-body-class';
@@ -64,6 +64,7 @@ declare const _default: {
64
64
  Z_INDEX: {
65
65
  TOP_NAV: number;
66
66
  TOOLKIT: number;
67
+ MICRO_BROWSER: number;
67
68
  DIALOG_SLIDE: number;
68
69
  DIALOG_NORMAL: number;
69
70
  DIALOG_SYS: number;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  TOP_NAV: number;
3
3
  TOOLKIT: number;
4
+ MICRO_BROWSER: number;
4
5
  DIALOG_SLIDE: number;
5
6
  DIALOG_NORMAL: number;
6
7
  DIALOG_SYS: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/console-base-theme",
3
- "version": "1.3.90",
3
+ "version": "1.4.1",
4
4
  "description": "控制台主题 - 基于 css variable 和 styled-components",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
@@ -25,22 +25,22 @@
25
25
  ],
26
26
  "devDependencies": {
27
27
  "@alicloud/console-toolkit-cli": "^1.2.30",
28
- "@alicloud/console-toolkit-preset-component": "^1.2.32",
29
- "@alicloud/demo-rc-elements": "^1.3.69",
30
- "@types/lodash": "^4.14.175",
31
- "@types/react": "^17.0.30",
32
- "@types/styled-components": "^5.1.15",
28
+ "@alicloud/console-toolkit-preset-component": "^1.2.53",
29
+ "@alicloud/demo-rc-elements": "^1.5.2",
30
+ "@types/lodash": "^4.14.178",
31
+ "@types/react": "^17.0.39",
32
+ "@types/styled-components": "^5.1.23",
33
33
  "lodash": "^4.17.21",
34
34
  "react": "^17.0.2",
35
- "styled-components": "^5.3.1",
36
- "typescript": "^4.4.4"
35
+ "styled-components": "^5.3.3",
36
+ "typescript": "^4.5.5"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "styled-components": ">=5"
40
40
  },
41
41
  "dependencies": {
42
- "@alicloud/console-base-theme-color": "^1.1.83",
43
- "@alicloud/mere-dom": "^1.1.62"
42
+ "@alicloud/console-base-theme-color": "^1.1.84",
43
+ "@alicloud/mere-dom": "^1.3.0"
44
44
  },
45
45
  "scripts": {
46
46
  "start": "breezr start-storybook",
@@ -53,5 +53,5 @@
53
53
  "clean": "rm -rf build",
54
54
  "prepublishOnly": "yarn clean && yarn build"
55
55
  },
56
- "gitHead": "c34c19b55903df37810149470d8fbcb62eaae71f"
56
+ "gitHead": "e575919bb3e5dc36f28501101c18cf0d7cee2488"
57
57
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Alibaba Cloud
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.