Skip to content

Commit

Permalink
feat(*): Css variable into Next (alibaba-fusion#2038)
Browse files Browse the repository at this point in the history
support css variable
- add dist/next.var.css dist/next.var.min.css
- add style2.js index.css variable.css to component under lib&es
- edit src/[component]/**.scss to support css variable
- add scripts to generate files above

Co-authored-by: csr632 <[email protected]>
Co-authored-by: youluna <[email protected]>
Co-authored-by: mavericker-1996 <[email protected]>
  • Loading branch information
3 people committed Aug 26, 2020
1 parent 7f00cac commit bed22a2
Show file tree
Hide file tree
Showing 112 changed files with 1,205 additions and 440 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ coverage/
docs-lang/
gemini-report/
.idea/
.vscode/
*.iml
*.log
.DS_Store

src/core-temp
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
language: node_js

node_js:
- 8
- 12

install:
- npm install
Expand Down
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"type": "node"
}
]
}
2 changes: 1 addition & 1 deletion docs/tab/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Fusion 提供了三级选项卡,分别用于不同的场景。

| 参数 | 说明 | 类型 | 默认值 |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- |
| size | 尺寸<br><br>**可选值**:<br>'small', 'medium' | Enum | 'medium' |
| activeKey | 被激活的选项卡的 key, 赋值则tab为受控组件, 用户无法切换 | Number/String | - |
| size | 尺寸<br><br>**可选值**:<br>'small', 'medium' | Enum | 'medium' |
| shape | 外观形态<br><br>**可选值**:<br>'pure', 'wrapped', 'text', 'capsule' | Enum | 'pure' |
| defaultActiveKey | 初始化时被激活的选项卡的 key | Number/String | - |
| animation | 是否开启动效 | Boolean | true |
Expand Down
59 changes: 59 additions & 0 deletions index-noreset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@import "lib/affix/index.css";
@import "lib/animate/index.css";
@import "lib/badge/index.css";
@import "lib/balloon/index.css";
@import "lib/breadcrumb/index.css";
@import "lib/button/index.css";
@import "lib/calendar/index.css";
@import "lib/card/index.css";
@import "lib/cascader/index.css";
@import "lib/cascader-select/index.css";
@import "lib/checkbox/index.css";
@import "lib/collapse/index.css";
@import "lib/config-provider/index.css";
@import "lib/date-picker/index.css";
@import "lib/dialog/index.css";
@import "lib/drawer/index.css";
@import "lib/dropdown/index.css";
@import "lib/field/index.css";
@import "lib/form/index.css";
@import "lib/grid/index.css";
@import "lib/icon/index.css";
@import "lib/input/index.css";
@import "lib/list/index.css";
@import "lib/loading/index.css";
@import "lib/menu/index.css";
@import "lib/menu-button/index.css";
@import "lib/message/index.css";
@import "lib/nav/index.css";
@import "lib/number-picker/index.css";
@import "lib/overlay/index.css";
@import "lib/pagination/index.css";
@import "lib/paragraph/index.css";
@import "lib/progress/index.css";
@import "lib/radio/index.css";
@import "lib/range/index.css";
@import "lib/rating/index.css";
@import "lib/search/index.css";
@import "lib/select/index.css";
@import "lib/slider/index.css";
@import "lib/split-button/index.css";
@import "lib/step/index.css";
@import "lib/switch/index.css";
@import "lib/tab/index.css";
@import "lib/table/index.css";
@import "lib/tag/index.css";
@import "lib/time-picker/index.css";
@import "lib/timeline/index.css";
@import "lib/transfer/index.css";
@import "lib/tree/index.css";
@import "lib/tree-select/index.css";
@import "lib/upload/index.css";
@import "lib/virtual-list/index.css";
@import "lib/shell/index.css";
@import "lib/notification/index.css";
@import "lib/typography/index.css";
@import "lib/divider/index.css";
@import "lib/avatar/index.css";
@import "lib/box/index.css";
@import "lib/responsive-grid/index.css";
118 changes: 59 additions & 59 deletions index-noreset.scss
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
@import "lib/affix/index.scss";
@import "lib/animate/index.scss";
@import "lib/badge/index.scss";
@import "lib/balloon/index.scss";
@import "lib/breadcrumb/index.scss";
@import "lib/button/index.scss";
@import "lib/calendar/index.scss";
@import "lib/card/index.scss";
@import "lib/cascader/index.scss";
@import "lib/cascader-select/index.scss";
@import "lib/checkbox/index.scss";
@import "lib/collapse/index.scss";
@import "lib/config-provider/index.scss";
@import "lib/date-picker/index.scss";
@import "lib/dialog/index.scss";
@import "lib/drawer/index.scss";
@import "lib/dropdown/index.scss";
@import "lib/field/index.scss";
@import "lib/form/index.scss";
@import "lib/grid/index.scss";
@import "lib/icon/index.scss";
@import "lib/input/index.scss";
@import "lib/list/index.scss";
@import "lib/loading/index.scss";
@import "lib/menu/index.scss";
@import "lib/menu-button/index.scss";
@import "lib/message/index.scss";
@import "lib/nav/index.scss";
@import "lib/number-picker/index.scss";
@import "lib/overlay/index.scss";
@import "lib/pagination/index.scss";
@import "lib/paragraph/index.scss";
@import "lib/progress/index.scss";
@import "lib/radio/index.scss";
@import "lib/range/index.scss";
@import "lib/rating/index.scss";
@import "lib/search/index.scss";
@import "lib/select/index.scss";
@import "lib/slider/index.scss";
@import "lib/split-button/index.scss";
@import "lib/step/index.scss";
@import "lib/switch/index.scss";
@import "lib/tab/index.scss";
@import "lib/table/index.scss";
@import "lib/tag/index.scss";
@import "lib/time-picker/index.scss";
@import "lib/timeline/index.scss";
@import "lib/transfer/index.scss";
@import "lib/tree/index.scss";
@import "lib/tree-select/index.scss";
@import "lib/upload/index.scss";
@import "lib/virtual-list/index.scss";
@import "lib/shell/index.scss";
@import "lib/notification/index.scss";
@import "lib/typography/index.scss";
@import "lib/divider/index.scss";
@import "lib/avatar/index.scss";
@import "lib/box/index.scss";
@import "lib/responsive-grid/index.scss";
@import "lib/affix/main.scss";
@import "lib/animate/main.scss";
@import "lib/badge/main.scss";
@import "lib/balloon/main.scss";
@import "lib/breadcrumb/main.scss";
@import "lib/button/main.scss";
@import "lib/calendar/main.scss";
@import "lib/card/main.scss";
@import "lib/cascader/main.scss";
@import "lib/cascader-select/main.scss";
@import "lib/checkbox/main.scss";
@import "lib/collapse/main.scss";
@import "lib/config-provider/main.scss";
@import "lib/date-picker/main.scss";
@import "lib/dialog/main.scss";
@import "lib/drawer/main.scss";
@import "lib/dropdown/main.scss";
@import "lib/field/main.scss";
@import "lib/form/main.scss";
@import "lib/grid/main.scss";
@import "lib/icon/main.scss";
@import "lib/input/main.scss";
@import "lib/list/main.scss";
@import "lib/loading/main.scss";
@import "lib/menu/main.scss";
@import "lib/menu-button/main.scss";
@import "lib/message/main.scss";
@import "lib/nav/main.scss";
@import "lib/number-picker/main.scss";
@import "lib/overlay/main.scss";
@import "lib/pagination/main.scss";
@import "lib/paragraph/main.scss";
@import "lib/progress/main.scss";
@import "lib/radio/main.scss";
@import "lib/range/main.scss";
@import "lib/rating/main.scss";
@import "lib/search/main.scss";
@import "lib/select/main.scss";
@import "lib/slider/main.scss";
@import "lib/split-button/main.scss";
@import "lib/step/main.scss";
@import "lib/switch/main.scss";
@import "lib/tab/main.scss";
@import "lib/table/main.scss";
@import "lib/tag/main.scss";
@import "lib/time-picker/main.scss";
@import "lib/timeline/main.scss";
@import "lib/transfer/main.scss";
@import "lib/tree/main.scss";
@import "lib/tree-select/main.scss";
@import "lib/upload/main.scss";
@import "lib/virtual-list/main.scss";
@import "lib/shell/main.scss";
@import "lib/notification/main.scss";
@import "lib/typography/main.scss";
@import "lib/divider/main.scss";
@import "lib/avatar/main.scss";
@import "lib/box/main.scss";
@import "lib/responsive-grid/main.scss";
2 changes: 2 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "./reset.css";
@import "./index-noreset.css";
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"index.scss",
"reset.scss",
"variables.scss",
"index.css",
"index-noreset.css",
"reset.css",
"variables.css",
".fusion"
],
"main": "index.js",
Expand All @@ -47,10 +51,12 @@
"report-coverage": "codecov",
"dev": "node ./scripts/server/index.js",
"build": "node ./scripts/build/index.js",
"db-build": "node --inspect=9229 ./scripts/build/index.js",
"check": "node ./scripts/check/index.js",
"create": "node ./scripts/create-new.js",
"check-sass": "node ./scripts/check/sass.js",
"docs": "node ./scripts/docs/index.js",
"clear-dist": "node ./scripts/clear-dist.js",
"api": "node ./scripts/api.js",
"pack": "node ./scripts/pack.js",
"pack-adaptor": "node ./scripts/adaptor/build.js",
Expand All @@ -65,7 +71,7 @@
"commitmsg": "commitlint -E GIT_PARAMS",
"precommit": "lint-staged",
"changelog": "node ./scripts/changelog.js",
"prepub": "npm run tslint && npm run eslint && npm run stylelint && npm run changelog && npm run build && npm run tslint && npm run check && npm run docs && npm run pack && npm run pack -- minimize && npm run pack-adaptor"
"prepub": "npm run tslint && npm run eslint && npm run stylelint && npm run changelog && npm run build && npm run tslint && npm run check && npm run docs && npm run clear-dist && npm run pack && npm run pack -- minimize && npm run pack-adaptor"
},
"lint-staged": {
"types/**/*.d.ts": [
Expand Down Expand Up @@ -158,6 +164,7 @@
"karma-spec-reporter": "^0.0.26",
"karma-webdriver-launcher": "^1.0.5",
"karma-webpack": "^3.0.5",
"less": "^3.12.2",
"lint-staged": "^7.2.2",
"loader-utils": "^1.1.0",
"lodash": "^4.17.5",
Expand All @@ -169,9 +176,11 @@
"node-sass": "^4.13.1",
"node-sass-package-importer": "^5.2.0",
"nunjucks": "^3.2.0",
"postcss-calc": "^7.0.2",
"postcss": "^7.0.32",
"postcss-calc": "^7.0.3",
"postcss-custom-properties": "^9.1.1",
"postcss-import": "^12.0.1",
"postcss-loader": "^2.0.6",
"postcss-scss": "1.0.2",
"power-assert": "^1.5.0",
"prettier": "1.16.4",
"promise-polyfill": "^8.1.0",
Expand All @@ -192,7 +201,8 @@
"sinon": "^5.0.10",
"solarlunar": "^2.0.7",
"style-loader": "^0.18.2",
"stylelint": "^9.2.1",
"stylelint": "^13.0.0",
"stylelint-config-recommended": "^3.0.0",
"stylelint-scss": "^3.1.1",
"tslint": "^5.18.0",
"typescript": "^3.5.3",
Expand Down
1 change: 1 addition & 0 deletions reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "lib/core2/reset.css";
Loading

0 comments on commit bed22a2

Please sign in to comment.