@alicloud/console-base-theme 1.7.2 → 1.7.3
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/build/cjs/mixin/typo.js +17 -2
- package/build/es/mixin/typo.js +13 -1
- package/build/types/mixin/typo.d.ts +8 -0
- package/package.json +4 -4
package/build/cjs/mixin/typo.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.mixinTypoStrong = exports.mixinTypoSmall = exports.mixinTypoNoWrap = exports.mixinTypoLineWrap = exports.mixinTypoKbd = exports.mixinTypoFontFamilyMono = exports.mixinTypoFontFamilyBaseJa = exports.mixinTypoFontFamilyBase = exports.mixinTypoFontBase = exports.mixinTypoEm = exports.mixinTypoEllipsisLines = exports.mixinTypoEllipsis = exports.mixinTypoCode = exports.mixinTypoBlockquote = void 0;
|
|
6
|
+
exports.mixinTypoStrong = exports.mixinTypoSmall = exports.mixinTypoNoWrap = exports.mixinTypoLineWrap = exports.mixinTypoKbd = exports.mixinTypoFontFamilyMono = exports.mixinTypoFontFamilyBaseJa = exports.mixinTypoFontFamilyBase = exports.mixinTypoFontBase = exports.mixinTypoEm = exports.mixinTypoEllipsisLines = exports.mixinTypoEllipsis = exports.mixinTypoElementsList = exports.mixinTypoElementsInline = exports.mixinTypoCode = exports.mixinTypoBlockquote = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = require("styled-components");
|
|
9
9
|
|
|
@@ -11,10 +11,13 @@ var _var = require("../var");
|
|
|
11
11
|
|
|
12
12
|
var _text = require("./text");
|
|
13
13
|
|
|
14
|
+
var _link = require("./link");
|
|
15
|
+
|
|
14
16
|
var _bg = require("./bg");
|
|
15
17
|
|
|
16
18
|
var _border = require("./border");
|
|
17
19
|
|
|
20
|
+
// 此文件手动编辑
|
|
18
21
|
// 日文专属
|
|
19
22
|
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,虽然有些耦合,但比较实用
|
|
20
23
|
|
|
@@ -52,4 +55,16 @@ var mixinTypoEllipsisLines = (0, _styledComponents.css)(["display:-webkit-box;li
|
|
|
52
55
|
var h = props.lineHeight * props.lines;
|
|
53
56
|
return props.withMaxHeight ? (0, _styledComponents.css)(["max-height:", "px;"], h) : (0, _styledComponents.css)(["height:", "px;"], h);
|
|
54
57
|
});
|
|
55
|
-
|
|
58
|
+
/**
|
|
59
|
+
* 当某元素内部有各种 inline 元素需要有样式的时候,用它
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
exports.mixinTypoEllipsisLines = mixinTypoEllipsisLines;
|
|
63
|
+
var mixinTypoElementsInline = (0, _styledComponents.css)(["a{text-decoration:none;", " &:link:hover{text-decoration:underline;}}em{", "}strong{", "}small{font-size:inherit;", "}code{", " ", "}kbd{", "}br{content:'';display:block;}"], _link.mixinLinkPrimary, mixinTypoEm, mixinTypoStrong, _text.mixinTextTertiary, mixinTypoCode, mixinTypoFontFamilyMono, mixinTypoKbd);
|
|
64
|
+
/**
|
|
65
|
+
* 当某元素内部有 ul\ol\dl 元素需要有样式的时候,用它
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
exports.mixinTypoElementsInline = mixinTypoElementsInline;
|
|
69
|
+
var mixinTypoElementsList = (0, _styledComponents.css)(["ul,ol,dl{margin:1em 0 1em 1em;padding:0;line-height:1.5 !important;font-size:inherit;color:inherit;&:first-child{margin-top:0;}&:last-child{margin-bottom:0;}li{margin:0.5em 0;list-style:inherit;}}ul{list-style:disc inside;ul{list-style-type:circle;ul{list-style-type:disc;}}}ol{list-style:decimal inside;ol{list-style-type:lower-roman;}}dl{dt{margin-top:1em;padding:0;font-weight:600;}dd{margin:0 0 1em 0;}}"]);
|
|
70
|
+
exports.mixinTypoElementsList = mixinTypoElementsList;
|
package/build/es/mixin/typo.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// 此文件手动编辑
|
|
1
2
|
import { css } from 'styled-components';
|
|
2
3
|
import { TYPO, COLOR } from '../var';
|
|
3
4
|
import { mixinTextPrimary, mixinTextEmphasis, mixinTextCode, mixinTextSecondary, mixinTextTertiary } from './text';
|
|
5
|
+
import { mixinLinkPrimary } from './link';
|
|
4
6
|
import { mixinBgSecondary, mixinBgSecondaryFade } from './bg';
|
|
5
7
|
import { mixinBorderTertiary, mixinBorderTertiaryColor } from './border'; // 日文专属
|
|
6
8
|
|
|
@@ -26,4 +28,14 @@ export var mixinTypoEllipsisLines = css(["display:-webkit-box;line-height:", "px
|
|
|
26
28
|
}, function (props) {
|
|
27
29
|
var h = props.lineHeight * props.lines;
|
|
28
30
|
return props.withMaxHeight ? css(["max-height:", "px;"], h) : css(["height:", "px;"], h);
|
|
29
|
-
});
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* 当某元素内部有各种 inline 元素需要有样式的时候,用它
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
export var mixinTypoElementsInline = css(["a{text-decoration:none;", " &:link:hover{text-decoration:underline;}}em{", "}strong{", "}small{font-size:inherit;", "}code{", " ", "}kbd{", "}br{content:'';display:block;}"], mixinLinkPrimary, mixinTypoEm, mixinTypoStrong, mixinTextTertiary, mixinTypoCode, mixinTypoFontFamilyMono, mixinTypoKbd);
|
|
37
|
+
/**
|
|
38
|
+
* 当某元素内部有 ul\ol\dl 元素需要有样式的时候,用它
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
export var mixinTypoElementsList = css(["ul,ol,dl{margin:1em 0 1em 1em;padding:0;line-height:1.5 !important;font-size:inherit;color:inherit;&:first-child{margin-top:0;}&:last-child{margin-bottom:0;}li{margin:0.5em 0;list-style:inherit;}}ul{list-style:disc inside;ul{list-style-type:circle;ul{list-style-type:disc;}}}ol{list-style:decimal inside;ol{list-style-type:lower-roman;}}dl{dt{margin-top:1em;padding:0;font-weight:600;}dd{margin:0 0 1em 0;}}"]);
|
|
@@ -13,3 +13,11 @@ export declare const mixinTypoLineWrap: import("styled-components").FlattenSimpl
|
|
|
13
13
|
export declare const mixinTypoNoWrap: import("styled-components").FlattenSimpleInterpolation;
|
|
14
14
|
export declare const mixinTypoEllipsis: import("styled-components").FlattenSimpleInterpolation;
|
|
15
15
|
export declare const mixinTypoEllipsisLines: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<IPropsEllipsisLines, any>>;
|
|
16
|
+
/**
|
|
17
|
+
* 当某元素内部有各种 inline 元素需要有样式的时候,用它
|
|
18
|
+
*/
|
|
19
|
+
export declare const mixinTypoElementsInline: import("styled-components").FlattenSimpleInterpolation;
|
|
20
|
+
/**
|
|
21
|
+
* 当某元素内部有 ul\ol\dl 元素需要有样式的时候,用它
|
|
22
|
+
*/
|
|
23
|
+
export declare const mixinTypoElementsList: import("styled-components").FlattenSimpleInterpolation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alicloud/console-base-theme",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"description": "控制台主题 - 基于 css variable 和 styled-components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@alicloud/console-toolkit-cli": "^1.2.30",
|
|
28
28
|
"@alicloud/console-toolkit-preset-component": "^1.2.61",
|
|
29
|
-
"@alicloud/demo-rc-elements": "^1.
|
|
29
|
+
"@alicloud/demo-rc-elements": "^1.9.1",
|
|
30
30
|
"@types/lodash": "^4.14.182",
|
|
31
31
|
"@types/react": "^17.0.48",
|
|
32
32
|
"@types/styled-components": "^5.1.26",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"styled-components": ">=5"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@alicloud/console-base-theme-color": "^1.4.
|
|
42
|
+
"@alicloud/console-base-theme-color": "^1.4.3",
|
|
43
43
|
"@alicloud/mere-dom": "^1.5.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"clean": "rm -rf build",
|
|
54
54
|
"prepublishOnly": "yarn clean && yarn build"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "0f28ee9c90ef9bb42b85135b74f9b52ff435d3b6"
|
|
57
57
|
}
|