@digitalc/dxp-ui 0.0.5-alpha.6 → 0.0.5-alpha.8
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/README.md +108 -4
- package/package.json +2 -3
- package/es/assets/iconFont/demo.css +0 -539
- package/es/assets/iconFont/demo_index.html +0 -4400
- package/es/assets/iconFont/iconfont.css +0 -750
- package/es/assets/iconFont/iconfont.eot +0 -0
- package/es/assets/iconFont/iconfont.json +0 -1290
- package/es/assets/iconFont/iconfont.svg +0 -385
- package/es/assets/iconFont/iconfont.ttf +0 -0
- package/es/assets/iconFont/iconfont.woff +0 -0
- package/es/assets/iconFont/iconfont.woff2 +0 -0
- package/es/assets/token.json +0 -259
- package/es/components/Amount/designTokens.d.ts +0 -6
- package/es/components/Amount/designTokens.js +0 -9
- package/es/components/Amount/index.d.ts +0 -22
- package/es/components/Amount/index.js +0 -139
- package/es/components/Amount/style/index.less +0 -10
- package/es/components/Amount/style/variables.less +0 -4
- package/es/components/Button/designTokens.d.ts +0 -66
- package/es/components/Button/designTokens.js +0 -131
- package/es/components/Button/index.d.ts +0 -44
- package/es/components/Button/index.js +0 -88
- package/es/components/Button/style/index.less +0 -38
- package/es/components/Button/style/variables.less +0 -5
- package/es/components/Chip/designTokens.d.ts +0 -15
- package/es/components/Chip/designTokens.js +0 -22
- package/es/components/Chip/index.d.ts +0 -11
- package/es/components/Chip/index.js +0 -91
- package/es/components/Chip/style/index.less +0 -9
- package/es/components/Chip/style/variables.less +0 -4
- package/es/components/Divider/index.d.ts +0 -16
- package/es/components/Divider/index.js +0 -55
- package/es/components/Divider/style/index.less +0 -78
- package/es/components/Divider/style/variables.less +0 -4
- package/es/components/Icon/Icon.d.ts +0 -9
- package/es/components/Icon/Icon.js +0 -14
- package/es/components/Icon/designTokens.d.ts +0 -6
- package/es/components/Icon/designTokens.js +0 -7
- package/es/components/Icon/index.d.ts +0 -10
- package/es/components/Icon/index.js +0 -29
- package/es/components/IconButton/designTokens.d.ts +0 -21
- package/es/components/IconButton/designTokens.js +0 -39
- package/es/components/IconButton/index.d.ts +0 -23
- package/es/components/IconButton/index.js +0 -105
- package/es/components/IconButton/style/index.less +0 -59
- package/es/components/IconButton/style/variables.less +0 -5
- package/es/components/IconButtonGroup/index.d.ts +0 -15
- package/es/components/IconButtonGroup/index.js +0 -22
- package/es/components/Image/index.d.ts +0 -20
- package/es/components/Image/index.js +0 -24
- package/es/components/Input/designTokens.d.ts +0 -26
- package/es/components/Input/designTokens.js +0 -34
- package/es/components/Input/index.d.ts +0 -10
- package/es/components/Input/index.js +0 -83
- package/es/components/Input/style/index.less +0 -13
- package/es/components/Input/style/variables.less +0 -5
- package/es/components/Modal/designTokens.d.ts +0 -21
- package/es/components/Modal/designTokens.js +0 -24
- package/es/components/Modal/index.d.ts +0 -17
- package/es/components/Modal/index.js +0 -86
- package/es/components/Modal/style/index.less +0 -76
- package/es/components/Modal/style/variables.less +0 -5
- package/es/components/Stepper/designTokens.d.ts +0 -16
- package/es/components/Stepper/designTokens.js +0 -51
- package/es/components/Stepper/index.d.ts +0 -15
- package/es/components/Stepper/index.js +0 -88
- package/es/components/Stepper/style/index.less +0 -68
- package/es/components/Stepper/style/variables.less +0 -5
- package/es/components/StickyFooter/designTokens.d.ts +0 -10
- package/es/components/StickyFooter/designTokens.js +0 -17
- package/es/components/StickyFooter/index.d.ts +0 -13
- package/es/components/StickyFooter/index.js +0 -70
- package/es/components/StickyFooter/style/index.less +0 -18
- package/es/components/StickyFooter/style/variables.less +0 -4
- package/es/components/Tabs/designTokens.d.ts +0 -32
- package/es/components/Tabs/designTokens.js +0 -45
- package/es/components/Tabs/index.d.ts +0 -13
- package/es/components/Tabs/index.js +0 -81
- package/es/components/Tabs/style/index.less +0 -19
- package/es/components/Tabs/style/variables.less +0 -4
- package/es/components/Tag/designTokens.d.ts +0 -92
- package/es/components/Tag/designTokens.js +0 -127
- package/es/components/Tag/index.d.ts +0 -15
- package/es/components/Tag/index.js +0 -85
- package/es/components/Tag/style/index.less +0 -9
- package/es/components/Tag/style/variables.less +0 -4
- package/es/components/Text/designTokens.d.ts +0 -23
- package/es/components/Text/designTokens.js +0 -24
- package/es/components/Text/index.d.ts +0 -13
- package/es/components/Text/index.js +0 -59
- package/es/components/Text/style/index.less +0 -2
- package/es/components/Text/style/variables.less +0 -4
- package/es/components/TextLink/designTokens.d.ts +0 -10
- package/es/components/TextLink/designTokens.js +0 -11
- package/es/components/TextLink/index.d.ts +0 -19
- package/es/components/TextLink/index.js +0 -93
- package/es/components/Toast/designTokens.d.ts +0 -13
- package/es/components/Toast/designTokens.js +0 -20
- package/es/components/Toast/index.d.ts +0 -25
- package/es/components/Toast/index.js +0 -174
- package/es/components/Toast/style/index.less +0 -18
- package/es/components/Toast/style/variables.less +0 -12
- package/es/components/Toggle/designTokens.d.ts +0 -9
- package/es/components/Toggle/designTokens.js +0 -13
- package/es/components/Toggle/index.d.ts +0 -27
- package/es/components/Toggle/index.js +0 -21
- package/es/components/index.d.ts +0 -35
- package/es/components/index.js +0 -20
- package/es/constants/index.d.ts +0 -15
- package/es/constants/index.js +0 -16
- package/es/fonts/Poppins/Poppins-Bold.ttf +0 -0
- package/es/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
- package/es/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
- package/es/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-Italic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-Light.ttf +0 -0
- package/es/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-Medium.ttf +0 -0
- package/es/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-Regular.ttf +0 -0
- package/es/fonts/Poppins/Poppins-SemiBold.ttf +0 -0
- package/es/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/es/fonts/Poppins/Poppins-Thin.ttf +0 -0
- package/es/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/es/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/es/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
- package/es/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
- package/es/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Italic-VariableFont_wdth,wght.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/es/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/es/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/es/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
- package/es/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/es/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/es/fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf +0 -0
- package/es/index.d.ts +0 -3
- package/es/index.js +0 -3
- package/es/style/antdDesignToken.json +0 -503
- package/es/style/themes/base-vars.css +0 -6
- package/es/style/themes/colorful.css +0 -5
- package/es/style/themes/index.css +0 -4
- package/es/style/variables.less +0 -34
- package/es/tokens/DXPGlobal.d.ts +0 -260
- package/es/tokens/DXPGlobal.js +0 -5
- package/es/utils/noop.d.ts +0 -1
- package/es/utils/noop.js +0 -1
- package/es/utils/scaleTool.d.ts +0 -12
- package/es/utils/scaleTool.js +0 -48
- package/es/utils/theme.d.ts +0 -11
- package/es/utils/theme.js +0 -15
- package/es/utils/themeContext.d.ts +0 -44
- package/es/utils/themeContext.js +0 -60
- package/es/utils/tokenHelper.d.ts +0 -1
- package/es/utils/tokenHelper.js +0 -7
- package/es/utils/tokenManager.d.ts +0 -1506
- package/es/utils/tokenManager.js +0 -771
- package/lib/assets/iconFont/demo.css +0 -539
- package/lib/assets/iconFont/demo_index.html +0 -4400
- package/lib/assets/iconFont/iconfont.css +0 -750
- package/lib/assets/iconFont/iconfont.eot +0 -0
- package/lib/assets/iconFont/iconfont.json +0 -1290
- package/lib/assets/iconFont/iconfont.svg +0 -385
- package/lib/assets/iconFont/iconfont.ttf +0 -0
- package/lib/assets/iconFont/iconfont.woff +0 -0
- package/lib/assets/iconFont/iconfont.woff2 +0 -0
- package/lib/assets/token.json +0 -259
- package/lib/components/Amount/designTokens.d.ts +0 -6
- package/lib/components/Amount/designTokens.js +0 -33
- package/lib/components/Amount/index.d.ts +0 -22
- package/lib/components/Amount/index.js +0 -154
- package/lib/components/Amount/style/index.less +0 -10
- package/lib/components/Amount/style/variables.less +0 -4
- package/lib/components/Button/designTokens.d.ts +0 -66
- package/lib/components/Button/designTokens.js +0 -139
- package/lib/components/Button/index.d.ts +0 -44
- package/lib/components/Button/index.js +0 -103
- package/lib/components/Button/style/index.less +0 -38
- package/lib/components/Button/style/variables.less +0 -5
- package/lib/components/Chip/designTokens.d.ts +0 -15
- package/lib/components/Chip/designTokens.js +0 -45
- package/lib/components/Chip/index.d.ts +0 -11
- package/lib/components/Chip/index.js +0 -174
- package/lib/components/Chip/style/index.less +0 -9
- package/lib/components/Chip/style/variables.less +0 -4
- package/lib/components/Divider/index.d.ts +0 -16
- package/lib/components/Divider/index.js +0 -111
- package/lib/components/Divider/style/index.less +0 -78
- package/lib/components/Divider/style/variables.less +0 -4
- package/lib/components/Icon/Icon.d.ts +0 -9
- package/lib/components/Icon/Icon.js +0 -47
- package/lib/components/Icon/designTokens.d.ts +0 -6
- package/lib/components/Icon/designTokens.js +0 -41
- package/lib/components/Icon/index.d.ts +0 -10
- package/lib/components/Icon/index.js +0 -73
- package/lib/components/IconButton/designTokens.d.ts +0 -21
- package/lib/components/IconButton/designTokens.js +0 -61
- package/lib/components/IconButton/index.d.ts +0 -23
- package/lib/components/IconButton/index.js +0 -200
- package/lib/components/IconButton/style/index.less +0 -59
- package/lib/components/IconButton/style/variables.less +0 -5
- package/lib/components/IconButtonGroup/index.d.ts +0 -15
- package/lib/components/IconButtonGroup/index.js +0 -53
- package/lib/components/Image/index.d.ts +0 -20
- package/lib/components/Image/index.js +0 -85
- package/lib/components/Input/designTokens.d.ts +0 -26
- package/lib/components/Input/designTokens.js +0 -75
- package/lib/components/Input/index.d.ts +0 -10
- package/lib/components/Input/index.js +0 -131
- package/lib/components/Input/style/index.less +0 -13
- package/lib/components/Input/style/variables.less +0 -5
- package/lib/components/Modal/designTokens.d.ts +0 -21
- package/lib/components/Modal/designTokens.js +0 -65
- package/lib/components/Modal/index.d.ts +0 -17
- package/lib/components/Modal/index.js +0 -101
- package/lib/components/Modal/style/index.less +0 -76
- package/lib/components/Modal/style/variables.less +0 -5
- package/lib/components/Stepper/designTokens.d.ts +0 -16
- package/lib/components/Stepper/designTokens.js +0 -78
- package/lib/components/Stepper/index.d.ts +0 -15
- package/lib/components/Stepper/index.js +0 -110
- package/lib/components/Stepper/style/index.less +0 -68
- package/lib/components/Stepper/style/variables.less +0 -5
- package/lib/components/StickyFooter/designTokens.d.ts +0 -10
- package/lib/components/StickyFooter/designTokens.js +0 -41
- package/lib/components/StickyFooter/index.d.ts +0 -13
- package/lib/components/StickyFooter/index.js +0 -132
- package/lib/components/StickyFooter/style/index.less +0 -18
- package/lib/components/StickyFooter/style/variables.less +0 -4
- package/lib/components/Tabs/designTokens.d.ts +0 -32
- package/lib/components/Tabs/designTokens.js +0 -70
- package/lib/components/Tabs/index.d.ts +0 -13
- package/lib/components/Tabs/index.js +0 -120
- package/lib/components/Tabs/style/index.less +0 -19
- package/lib/components/Tabs/style/variables.less +0 -4
- package/lib/components/Tag/designTokens.d.ts +0 -92
- package/lib/components/Tag/designTokens.js +0 -183
- package/lib/components/Tag/index.d.ts +0 -15
- package/lib/components/Tag/index.js +0 -146
- package/lib/components/Tag/style/index.less +0 -9
- package/lib/components/Tag/style/variables.less +0 -4
- package/lib/components/Text/designTokens.d.ts +0 -23
- package/lib/components/Text/designTokens.js +0 -47
- package/lib/components/Text/index.d.ts +0 -13
- package/lib/components/Text/index.js +0 -353
- package/lib/components/Text/style/index.less +0 -2
- package/lib/components/Text/style/variables.less +0 -4
- package/lib/components/TextLink/designTokens.d.ts +0 -10
- package/lib/components/TextLink/designTokens.js +0 -45
- package/lib/components/TextLink/index.d.ts +0 -19
- package/lib/components/TextLink/index.js +0 -119
- package/lib/components/Toast/designTokens.d.ts +0 -13
- package/lib/components/Toast/designTokens.js +0 -40
- package/lib/components/Toast/index.d.ts +0 -25
- package/lib/components/Toast/index.js +0 -208
- package/lib/components/Toast/style/index.less +0 -18
- package/lib/components/Toast/style/variables.less +0 -12
- package/lib/components/Toggle/designTokens.d.ts +0 -9
- package/lib/components/Toggle/designTokens.js +0 -47
- package/lib/components/Toggle/index.d.ts +0 -27
- package/lib/components/Toggle/index.js +0 -67
- package/lib/components/index.d.ts +0 -35
- package/lib/components/index.js +0 -71
- package/lib/constants/index.d.ts +0 -15
- package/lib/constants/index.js +0 -41
- package/lib/fonts/Poppins/Poppins-Bold.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Italic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Light.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Medium.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Regular.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-SemiBold.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-Thin.ttf +0 -0
- package/lib/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Italic-VariableFont_wdth,wght.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/lib/fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf +0 -0
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -21
- package/lib/style/antdDesignToken.json +0 -503
- package/lib/style/themes/base-vars.css +0 -6
- package/lib/style/themes/colorful.css +0 -5
- package/lib/style/themes/index.css +0 -4
- package/lib/style/variables.less +0 -34
- package/lib/tokens/DXPGlobal.d.ts +0 -260
- package/lib/tokens/DXPGlobal.js +0 -37
- package/lib/utils/noop.d.ts +0 -1
- package/lib/utils/noop.js +0 -26
- package/lib/utils/scaleTool.d.ts +0 -12
- package/lib/utils/scaleTool.js +0 -66
- package/lib/utils/theme.d.ts +0 -11
- package/lib/utils/theme.js +0 -32
- package/lib/utils/themeContext.d.ts +0 -44
- package/lib/utils/themeContext.js +0 -117
- package/lib/utils/tokenHelper.d.ts +0 -1
- package/lib/utils/tokenHelper.js +0 -38
- package/lib/utils/tokenManager.d.ts +0 -1506
- package/lib/utils/tokenManager.js +0 -799
- package/umd/dxp-ui.min.css +0 -1
- package/umd/dxp-ui.min.js +0 -1
- package/umd/static/Poppins-Bold.8001a01b.ttf +0 -0
- package/umd/static/Roboto-Bold.ff276312.ttf +0 -0
- package/umd/static/Roboto-Regular.a5023d7b.ttf +0 -0
- package/umd/static/Roboto-SemiBold.3452daa4.ttf +0 -0
- package/umd/static/iconfont.176e7470.svg +0 -1
- package/umd/static/iconfont.47a0c957.ttf +0 -0
- package/umd/static/iconfont.6f470e01.eot +0 -0
- package/umd/static/iconfont.796b49bb.woff +0 -0
package/README.md
CHANGED
|
@@ -9,7 +9,9 @@ React Component.
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```bash | pure
|
|
12
|
-
npm install @digitalc/dxp-ui
|
|
12
|
+
npm install @digitalc/dxp-ui
|
|
13
|
+
// 注意不在在 官方源上安装依赖,可以设置 npm 的镜像源。
|
|
14
|
+
npm config set registry https://registry.npmjs.org/
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## Usage
|
|
@@ -17,10 +19,10 @@ npm install @digitalc/dxp-ui
|
|
|
17
19
|
<!-- prettier-ignore -->
|
|
18
20
|
```tsx | pure
|
|
19
21
|
import { Button } from '@digitalc/dxp-ui';
|
|
22
|
+
// 后续完善打包工具后,会自动引入样式,目前如果样式不对的情况下,需要手动引入样式。
|
|
20
23
|
import "@digitalc/dxp-ui/umd/dxp-ui.min.css"
|
|
21
24
|
|
|
22
25
|
const Demo = () => {
|
|
23
|
-
|
|
24
26
|
return (
|
|
25
27
|
<div style={{ margin: 20 }}>
|
|
26
28
|
<div>
|
|
@@ -36,15 +38,114 @@ const Demo = () => {
|
|
|
36
38
|
|
|
37
39
|
export default Demo;
|
|
38
40
|
```
|
|
41
|
+
|
|
39
42
|
注意:
|
|
40
43
|
如果是使用的 Umi4、Vite 5 和 Turbopack 将原生支持智能样式编译的(:内置各种语言预处理工具),可以直接引用即可。
|
|
41
44
|
|
|
42
45
|
但如果是 使用的 webpack 或 umi3 脚手架的前端项目,需要在内部的 webpack 配置less编译。(因为包是esm格式,并支持了按需加载,所以没编译less文件),具体是通过 webpack-chain 添加指定的包,并进行构建。
|
|
43
46
|
|
|
47
|
+
```
|
|
48
|
+
chainWebpack(memo, { webpack, env }) {
|
|
49
|
+
// 额外 处理 dxp-ui-less... 需要安装 less-loader: npm install less-loader --save-dev
|
|
50
|
+
|
|
51
|
+
代码在下面,第4条。
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 兼容 @digitalc/dxp-ui 组件库
|
|
57
|
+
|
|
58
|
+
dxp-ui 使用了 antd5 做二次开发,但在"umi": "^3.x"项目中,已有组件库版本是 antd 4.x。
|
|
59
|
+
底层依赖的版本与4有差异,编译时会报错,所以需要兼容 @digitalc/dxp-ui 组件库。
|
|
60
|
+
|
|
61
|
+
整体兼容方案如下:
|
|
44
62
|
|
|
63
|
+
### 1、安装两个版本npm
|
|
64
|
+
|
|
65
|
+
如果必须需要用到 antd4 版本,可以看这篇 antd 多版本共存:
|
|
66
|
+
https://ant-design.antgroup.com/docs/react/migration-v5-cn
|
|
67
|
+
|
|
68
|
+
5.0 有哪些不兼容的变化: https://ant-design.antgroup.com/docs/react/migration-v5-cn
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
在 package.json 文件,添加以下内容,并执行 npm install :
|
|
72
|
+
"@digitalc/dxp-ui": "^0.0.5-alpha.6",
|
|
73
|
+
"antd": "^5.24.5",
|
|
74
|
+
"antd4": "npm:antd@4.24.16", // 兼容 antd4 ,但需要把 antd 前缀让出来。
|
|
45
75
|
```
|
|
76
|
+
|
|
77
|
+
### 2、在 umi.config.ts 中配置以下代码:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
export default {
|
|
81
|
+
antd: false, // 关闭 antd 的默认载入
|
|
82
|
+
esbuild: {},
|
|
83
|
+
// nodeModulesTransform: {
|
|
84
|
+
// type: 'none',
|
|
85
|
+
// },
|
|
86
|
+
};
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
替换压缩器为 esbuild这一步是因为比 webpack 快,非强制,如果开启,需要安装依赖。
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
$ yarn add @umijs/plugin-esbuild
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
默认会处理 node_modules 中的代码,这个打开后就不会处理 node_modules 中的代码,导致打包格式不对。 Umi 以下配置不要打开(必须关闭))。
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
// nodeModulesTransform: {
|
|
99
|
+
// type: 'none',
|
|
100
|
+
// },
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 3、在 根 BaseLayout.jsx 中,引入 ConfigProvider,将 children 用 ConfigProvider 包裹。
|
|
104
|
+
|
|
105
|
+
```js
|
|
106
|
+
import { ConfigProvider as Antd5ConfigProvider } from 'antd';
|
|
107
|
+
|
|
108
|
+
// antd5 配置前缀,防止与 antd4 css 冲突
|
|
109
|
+
<Antd5ConfigProvider
|
|
110
|
+
prefixCls={'ant5'}
|
|
111
|
+
theme={{
|
|
112
|
+
cssVar: true,
|
|
113
|
+
hashed: false,
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
{children}
|
|
117
|
+
</Antd5ConfigProvider>;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 4、正常情况下,已经可用了,不需要配置额外操作(也不需要将之前的antd,改成antd4,直接用5覆盖,具体修改内容:看下v4 to v5 升级指南)。
|
|
121
|
+
|
|
122
|
+
```js
|
|
123
|
+
import { Button as AntdBtn4 } from 'antd4';
|
|
124
|
+
import { Button as AntdBtn5 } from 'antd';
|
|
125
|
+
import { Button, IconButton, IconButtonGroup, Toast, Stepper } from '@digitalc/dxp-ui';
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<Button type="primary">Primary Button</Button>
|
|
129
|
+
<AntdBtn4>antd4 Button</AntdBtn4>
|
|
130
|
+
<AntdBtn5>antd5 Button</AntdBtn5>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
示例图:
|
|
136
|
+
|
|
137
|
+

|
|
138
|
+
|
|
139
|
+
改完后,尽量对项目做全量测试。
|
|
140
|
+
如果出现 less 格式不对,则需要做额外处理。
|
|
141
|
+
|
|
142
|
+
原因是使用的 Umi4、Vite 5 和 Turbopack 将原生支持智能样式编译的(:内置各种语言预处理工具),可以直接引用即可。
|
|
143
|
+
|
|
144
|
+
但如果是使用的 webpack 或 umi3 脚手架的前端项目,需要在内部的 webpack 配置less编译。(因为包是esm格式,并支持了按需加载,所以没编译less文件),具体是通过 webpack-chain 添加指定的包,并进行构建。
|
|
145
|
+
|
|
146
|
+
```bash
|
|
46
147
|
chainWebpack(memo, { webpack, env }) {
|
|
47
|
-
// 额外 处理 dxp-ui-less...
|
|
148
|
+
// 额外 处理 dxp-ui-less... 需要安装 less-loader: npm install less-loader --save-dev
|
|
48
149
|
memo.module
|
|
49
150
|
.rule('dxp-ui-less')
|
|
50
151
|
.test(/\.less$/)
|
|
@@ -62,6 +163,9 @@ export default Demo;
|
|
|
62
163
|
// 其他自定义变量...
|
|
63
164
|
},
|
|
64
165
|
});
|
|
65
|
-
// end...
|
|
66
166
|
}
|
|
67
167
|
```
|
|
168
|
+
|
|
169
|
+
end。
|
|
170
|
+
|
|
171
|
+
<img src="https://p.ipic.vip/xa5nz7.png" width="880" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalc/dxp-ui",
|
|
3
|
-
"version": "0.0.5-alpha.
|
|
3
|
+
"version": "0.0.5-alpha.8",
|
|
4
4
|
"description": "A UI library of Digitalc Design React Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"lint:css": "stylelint \"src/**/*.{less,css}\"",
|
|
36
36
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
37
37
|
"prepare": "dumi setup",
|
|
38
|
-
"prepublishOnly": "father doctor && npm run build",
|
|
39
38
|
"prepublishOnly1": "npm run build && SKIP_TESTS=true np --no-cleanup --any-branch --no-publish --no-test",
|
|
40
39
|
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,scss,md,json}\"",
|
|
41
40
|
"publish": "npm publish --access public",
|
|
@@ -118,7 +117,7 @@
|
|
|
118
117
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
119
118
|
},
|
|
120
119
|
"engines": {
|
|
121
|
-
"node": ">=
|
|
120
|
+
"node": ">=14.x"
|
|
122
121
|
},
|
|
123
122
|
"publishConfig": {
|
|
124
123
|
"access": "public"
|
|
@@ -1,539 +0,0 @@
|
|
|
1
|
-
/* Logo 字体 */
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: "iconfont logo";
|
|
4
|
-
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
|
5
|
-
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
|
6
|
-
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
|
7
|
-
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
|
8
|
-
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.logo {
|
|
12
|
-
font-family: "iconfont logo";
|
|
13
|
-
font-size: 160px;
|
|
14
|
-
font-style: normal;
|
|
15
|
-
-webkit-font-smoothing: antialiased;
|
|
16
|
-
-moz-osx-font-smoothing: grayscale;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* tabs */
|
|
20
|
-
.nav-tabs {
|
|
21
|
-
position: relative;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nav-tabs .nav-more {
|
|
25
|
-
position: absolute;
|
|
26
|
-
right: 0;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
height: 42px;
|
|
29
|
-
line-height: 42px;
|
|
30
|
-
color: #666;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
#tabs {
|
|
34
|
-
border-bottom: 1px solid #eee;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
#tabs li {
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
width: 100px;
|
|
40
|
-
height: 40px;
|
|
41
|
-
line-height: 40px;
|
|
42
|
-
text-align: center;
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
border-bottom: 2px solid transparent;
|
|
45
|
-
position: relative;
|
|
46
|
-
z-index: 1;
|
|
47
|
-
margin-bottom: -1px;
|
|
48
|
-
color: #666;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
#tabs .active {
|
|
53
|
-
border-bottom-color: #f00;
|
|
54
|
-
color: #222;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.tab-container .content {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* 页面布局 */
|
|
62
|
-
.main {
|
|
63
|
-
padding: 30px 100px;
|
|
64
|
-
width: 960px;
|
|
65
|
-
margin: 0 auto;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.main .logo {
|
|
69
|
-
color: #333;
|
|
70
|
-
text-align: left;
|
|
71
|
-
margin-bottom: 30px;
|
|
72
|
-
line-height: 1;
|
|
73
|
-
height: 110px;
|
|
74
|
-
margin-top: -50px;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
*zoom: 1;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.main .logo a {
|
|
80
|
-
font-size: 160px;
|
|
81
|
-
color: #333;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.helps {
|
|
85
|
-
margin-top: 40px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.helps pre {
|
|
89
|
-
padding: 20px;
|
|
90
|
-
margin: 10px 0;
|
|
91
|
-
border: solid 1px #e7e1cd;
|
|
92
|
-
background-color: #fffdef;
|
|
93
|
-
overflow: auto;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.icon_lists {
|
|
97
|
-
width: 100% !important;
|
|
98
|
-
overflow: hidden;
|
|
99
|
-
*zoom: 1;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.icon_lists li {
|
|
103
|
-
width: 100px;
|
|
104
|
-
margin-bottom: 10px;
|
|
105
|
-
margin-right: 20px;
|
|
106
|
-
text-align: center;
|
|
107
|
-
list-style: none !important;
|
|
108
|
-
cursor: default;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.icon_lists li .code-name {
|
|
112
|
-
line-height: 1.2;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.icon_lists .icon {
|
|
116
|
-
display: block;
|
|
117
|
-
height: 100px;
|
|
118
|
-
line-height: 100px;
|
|
119
|
-
font-size: 42px;
|
|
120
|
-
margin: 10px auto;
|
|
121
|
-
color: #333;
|
|
122
|
-
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
|
123
|
-
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
|
124
|
-
transition: font-size 0.25s linear, width 0.25s linear;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.icon_lists .icon:hover {
|
|
128
|
-
font-size: 100px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.icon_lists .svg-icon {
|
|
132
|
-
/* 通过设置 font-size 来改变图标大小 */
|
|
133
|
-
width: 1em;
|
|
134
|
-
/* 图标和文字相邻时,垂直对齐 */
|
|
135
|
-
vertical-align: -0.15em;
|
|
136
|
-
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
|
137
|
-
fill: currentColor;
|
|
138
|
-
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
|
139
|
-
normalize.css 中也包含这行 */
|
|
140
|
-
overflow: hidden;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.icon_lists li .name,
|
|
144
|
-
.icon_lists li .code-name {
|
|
145
|
-
color: #666;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/* markdown 样式 */
|
|
149
|
-
.markdown {
|
|
150
|
-
color: #666;
|
|
151
|
-
font-size: 14px;
|
|
152
|
-
line-height: 1.8;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.highlight {
|
|
156
|
-
line-height: 1.5;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.markdown img {
|
|
160
|
-
vertical-align: middle;
|
|
161
|
-
max-width: 100%;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.markdown h1 {
|
|
165
|
-
color: #404040;
|
|
166
|
-
font-weight: 500;
|
|
167
|
-
line-height: 40px;
|
|
168
|
-
margin-bottom: 24px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.markdown h2,
|
|
172
|
-
.markdown h3,
|
|
173
|
-
.markdown h4,
|
|
174
|
-
.markdown h5,
|
|
175
|
-
.markdown h6 {
|
|
176
|
-
color: #404040;
|
|
177
|
-
margin: 1.6em 0 0.6em 0;
|
|
178
|
-
font-weight: 500;
|
|
179
|
-
clear: both;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.markdown h1 {
|
|
183
|
-
font-size: 28px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.markdown h2 {
|
|
187
|
-
font-size: 22px;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.markdown h3 {
|
|
191
|
-
font-size: 16px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.markdown h4 {
|
|
195
|
-
font-size: 14px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.markdown h5 {
|
|
199
|
-
font-size: 12px;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.markdown h6 {
|
|
203
|
-
font-size: 12px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.markdown hr {
|
|
207
|
-
height: 1px;
|
|
208
|
-
border: 0;
|
|
209
|
-
background: #e9e9e9;
|
|
210
|
-
margin: 16px 0;
|
|
211
|
-
clear: both;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.markdown p {
|
|
215
|
-
margin: 1em 0;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.markdown>p,
|
|
219
|
-
.markdown>blockquote,
|
|
220
|
-
.markdown>.highlight,
|
|
221
|
-
.markdown>ol,
|
|
222
|
-
.markdown>ul {
|
|
223
|
-
width: 80%;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.markdown ul>li {
|
|
227
|
-
list-style: circle;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.markdown>ul li,
|
|
231
|
-
.markdown blockquote ul>li {
|
|
232
|
-
margin-left: 20px;
|
|
233
|
-
padding-left: 4px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.markdown>ul li p,
|
|
237
|
-
.markdown>ol li p {
|
|
238
|
-
margin: 0.6em 0;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.markdown ol>li {
|
|
242
|
-
list-style: decimal;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.markdown>ol li,
|
|
246
|
-
.markdown blockquote ol>li {
|
|
247
|
-
margin-left: 20px;
|
|
248
|
-
padding-left: 4px;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.markdown code {
|
|
252
|
-
margin: 0 3px;
|
|
253
|
-
padding: 0 5px;
|
|
254
|
-
background: #eee;
|
|
255
|
-
border-radius: 3px;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.markdown strong,
|
|
259
|
-
.markdown b {
|
|
260
|
-
font-weight: 600;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.markdown>table {
|
|
264
|
-
border-collapse: collapse;
|
|
265
|
-
border-spacing: 0px;
|
|
266
|
-
empty-cells: show;
|
|
267
|
-
border: 1px solid #e9e9e9;
|
|
268
|
-
width: 95%;
|
|
269
|
-
margin-bottom: 24px;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.markdown>table th {
|
|
273
|
-
white-space: nowrap;
|
|
274
|
-
color: #333;
|
|
275
|
-
font-weight: 600;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.markdown>table th,
|
|
279
|
-
.markdown>table td {
|
|
280
|
-
border: 1px solid #e9e9e9;
|
|
281
|
-
padding: 8px 16px;
|
|
282
|
-
text-align: left;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.markdown>table th {
|
|
286
|
-
background: #F7F7F7;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.markdown blockquote {
|
|
290
|
-
font-size: 90%;
|
|
291
|
-
color: #999;
|
|
292
|
-
border-left: 4px solid #e9e9e9;
|
|
293
|
-
padding-left: 0.8em;
|
|
294
|
-
margin: 1em 0;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.markdown blockquote p {
|
|
298
|
-
margin: 0;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.markdown .anchor {
|
|
302
|
-
opacity: 0;
|
|
303
|
-
transition: opacity 0.3s ease;
|
|
304
|
-
margin-left: 8px;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.markdown .waiting {
|
|
308
|
-
color: #ccc;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.markdown h1:hover .anchor,
|
|
312
|
-
.markdown h2:hover .anchor,
|
|
313
|
-
.markdown h3:hover .anchor,
|
|
314
|
-
.markdown h4:hover .anchor,
|
|
315
|
-
.markdown h5:hover .anchor,
|
|
316
|
-
.markdown h6:hover .anchor {
|
|
317
|
-
opacity: 1;
|
|
318
|
-
display: inline-block;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.markdown>br,
|
|
322
|
-
.markdown>p>br {
|
|
323
|
-
clear: both;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
.hljs {
|
|
328
|
-
display: block;
|
|
329
|
-
background: white;
|
|
330
|
-
padding: 0.5em;
|
|
331
|
-
color: #333333;
|
|
332
|
-
overflow-x: auto;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.hljs-comment,
|
|
336
|
-
.hljs-meta {
|
|
337
|
-
color: #969896;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.hljs-string,
|
|
341
|
-
.hljs-variable,
|
|
342
|
-
.hljs-template-variable,
|
|
343
|
-
.hljs-strong,
|
|
344
|
-
.hljs-emphasis,
|
|
345
|
-
.hljs-quote {
|
|
346
|
-
color: #df5000;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.hljs-keyword,
|
|
350
|
-
.hljs-selector-tag,
|
|
351
|
-
.hljs-type {
|
|
352
|
-
color: #a71d5d;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.hljs-literal,
|
|
356
|
-
.hljs-symbol,
|
|
357
|
-
.hljs-bullet,
|
|
358
|
-
.hljs-attribute {
|
|
359
|
-
color: #0086b3;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.hljs-section,
|
|
363
|
-
.hljs-name {
|
|
364
|
-
color: #63a35c;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.hljs-tag {
|
|
368
|
-
color: #333333;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.hljs-title,
|
|
372
|
-
.hljs-attr,
|
|
373
|
-
.hljs-selector-id,
|
|
374
|
-
.hljs-selector-class,
|
|
375
|
-
.hljs-selector-attr,
|
|
376
|
-
.hljs-selector-pseudo {
|
|
377
|
-
color: #795da3;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.hljs-addition {
|
|
381
|
-
color: #55a532;
|
|
382
|
-
background-color: #eaffea;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.hljs-deletion {
|
|
386
|
-
color: #bd2c00;
|
|
387
|
-
background-color: #ffecec;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.hljs-link {
|
|
391
|
-
text-decoration: underline;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/* 代码高亮 */
|
|
395
|
-
/* PrismJS 1.15.0
|
|
396
|
-
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
|
397
|
-
/**
|
|
398
|
-
* prism.js default theme for JavaScript, CSS and HTML
|
|
399
|
-
* Based on dabblet (http://dabblet.com)
|
|
400
|
-
* @author Lea Verou
|
|
401
|
-
*/
|
|
402
|
-
code[class*="language-"],
|
|
403
|
-
pre[class*="language-"] {
|
|
404
|
-
color: black;
|
|
405
|
-
background: none;
|
|
406
|
-
text-shadow: 0 1px white;
|
|
407
|
-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
408
|
-
text-align: left;
|
|
409
|
-
white-space: pre;
|
|
410
|
-
word-spacing: normal;
|
|
411
|
-
word-break: normal;
|
|
412
|
-
word-wrap: normal;
|
|
413
|
-
line-height: 1.5;
|
|
414
|
-
|
|
415
|
-
-moz-tab-size: 4;
|
|
416
|
-
-o-tab-size: 4;
|
|
417
|
-
tab-size: 4;
|
|
418
|
-
|
|
419
|
-
-webkit-hyphens: none;
|
|
420
|
-
-moz-hyphens: none;
|
|
421
|
-
-ms-hyphens: none;
|
|
422
|
-
hyphens: none;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
pre[class*="language-"]::-moz-selection,
|
|
426
|
-
pre[class*="language-"] ::-moz-selection,
|
|
427
|
-
code[class*="language-"]::-moz-selection,
|
|
428
|
-
code[class*="language-"] ::-moz-selection {
|
|
429
|
-
text-shadow: none;
|
|
430
|
-
background: #b3d4fc;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
pre[class*="language-"]::selection,
|
|
434
|
-
pre[class*="language-"] ::selection,
|
|
435
|
-
code[class*="language-"]::selection,
|
|
436
|
-
code[class*="language-"] ::selection {
|
|
437
|
-
text-shadow: none;
|
|
438
|
-
background: #b3d4fc;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
@media print {
|
|
442
|
-
|
|
443
|
-
code[class*="language-"],
|
|
444
|
-
pre[class*="language-"] {
|
|
445
|
-
text-shadow: none;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
/* Code blocks */
|
|
450
|
-
pre[class*="language-"] {
|
|
451
|
-
padding: 1em;
|
|
452
|
-
margin: .5em 0;
|
|
453
|
-
overflow: auto;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
:not(pre)>code[class*="language-"],
|
|
457
|
-
pre[class*="language-"] {
|
|
458
|
-
background: #f5f2f0;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/* Inline code */
|
|
462
|
-
:not(pre)>code[class*="language-"] {
|
|
463
|
-
padding: .1em;
|
|
464
|
-
border-radius: .3em;
|
|
465
|
-
white-space: normal;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.token.comment,
|
|
469
|
-
.token.prolog,
|
|
470
|
-
.token.doctype,
|
|
471
|
-
.token.cdata {
|
|
472
|
-
color: slategray;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.token.punctuation {
|
|
476
|
-
color: #999;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.namespace {
|
|
480
|
-
opacity: .7;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.token.property,
|
|
484
|
-
.token.tag,
|
|
485
|
-
.token.boolean,
|
|
486
|
-
.token.number,
|
|
487
|
-
.token.constant,
|
|
488
|
-
.token.symbol,
|
|
489
|
-
.token.deleted {
|
|
490
|
-
color: #905;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.token.selector,
|
|
494
|
-
.token.attr-name,
|
|
495
|
-
.token.string,
|
|
496
|
-
.token.char,
|
|
497
|
-
.token.builtin,
|
|
498
|
-
.token.inserted {
|
|
499
|
-
color: #690;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.token.operator,
|
|
503
|
-
.token.entity,
|
|
504
|
-
.token.url,
|
|
505
|
-
.language-css .token.string,
|
|
506
|
-
.style .token.string {
|
|
507
|
-
color: #9a6e3a;
|
|
508
|
-
background: hsla(0, 0%, 100%, .5);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.token.atrule,
|
|
512
|
-
.token.attr-value,
|
|
513
|
-
.token.keyword {
|
|
514
|
-
color: #07a;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
.token.function,
|
|
518
|
-
.token.class-name {
|
|
519
|
-
color: #DD4A68;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.token.regex,
|
|
523
|
-
.token.important,
|
|
524
|
-
.token.variable {
|
|
525
|
-
color: #e90;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
.token.important,
|
|
529
|
-
.token.bold {
|
|
530
|
-
font-weight: bold;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
.token.italic {
|
|
534
|
-
font-style: italic;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.token.entity {
|
|
538
|
-
cursor: help;
|
|
539
|
-
}
|