diff --git a/package.json b/package.json index bfc0f9288..01489fd65 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "build:site": "gulp build:site --max-old-space-size=8192 --gulpfile ./scripts/gulp/gulpfile.ts", "icons": "gulp icons --gulpfile ./scripts/gulp/gulpfile.ts", "gen": "ts-node scripts/gen/generate.ts", - "less-variable-update": "ts-node scripts/gen/style-variable/update.ts", + "lessvariable:update": "ts-node scripts/gen/style-variable/update.ts", "prepare": "husky install", "preinstall": "npx only-allow pnpm", "version": "lerna version --conventional-commits", @@ -98,6 +98,7 @@ "eslint-plugin-jsdoc": "^37.9.7", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-vue": "^8.5.0", + "fast-glob": "^3.2.11", "figlet": "^1.5.2", "fs-extra": "^10.0.1", "gulp": "^4.0.2", @@ -110,9 +111,9 @@ "less-plugin-npm-import": "^2.1.0", "lint-staged": "^12.3.7", "lodash": "^4.17.21", - "npm-run-all": "^4.1.5", "markdownlint-cli": "^0.30.0", "marked": "^4.0.12", + "npm-run-all": "^4.1.5", "ora": "^5.4.1", "parse5": "^6.0.1", "postcss-less": "^5.0.0", diff --git a/packages/components/alert/docs/Index.zh.md b/packages/components/alert/docs/Index.zh.md index 90cdfb4de..f63c4ceca 100644 --- a/packages/components/alert/docs/Index.zh.md +++ b/packages/components/alert/docs/Index.zh.md @@ -33,7 +33,7 @@ export interface AlertPagination { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@alert-success-color` | `@color-success-d10` | - | - | | `@alert-info-color` | `@color-info-d10` | - | - | @@ -44,13 +44,13 @@ export interface AlertPagination { | `@alert-warning-background-color` | `@color-warning-l50` | - | - | | `@alert-error-background-color` | `@color-error-l50` | - | - | | `@alert-color` | `@text-color` | - | - | -| `@alert-color-secondary` | `@text-color-secondary` | - | - | +| `@alert-color-secondary` | `@text-color-secondary` | `@color-graphite-l10` | - | | `@alert-disabled-color` | `@disabled-color` | - | - | -| `@alert-font-size` | `@font-size-md` | - | - | -| `@alert-line-height` | `@line-height-base` | - | - | +| `@alert-font-size` | `@font-size-md` | `@font-size-sm` | - | +| `@alert-line-height` | `@line-height-base` | `@font-size-2xl` | - | | `@alert-border-radius` | `@border-radius-sm` | - | - | | `@alert-margin-bottom` | `@spacing-lg` | - | - | -| `@alert-padding` | `@spacing-sm @spacing-lg` | - | - | +| `@alert-padding` | `@spacing-sm @spacing-lg` | `@spacing-xs @spacing-lg` | - | | `@alert-icon-margin-right` | `@spacing-sm` | - | - | | `@alert-icon-font-size-with-description` | `@font-size-xl` | - | - | | `@alert-icon-margin-right-with-description` | `@spacing-lg` | - | - | diff --git a/packages/components/anchor/docs/Index.zh.md b/packages/components/anchor/docs/Index.zh.md index d59fedb5b..e28ce0834 100644 --- a/packages/components/anchor/docs/Index.zh.md +++ b/packages/components/anchor/docs/Index.zh.md @@ -42,7 +42,7 @@ subtitle: 锚点 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@anchor-background-color` | `@background-color-component` | - | - | | `@anchor-wrapper-margin-left` | `-@spacing-xs` | - | - | @@ -50,12 +50,12 @@ subtitle: 锚点 | `@anchor-color` | `@text-color` | - | - | | `@anchor-border-width` | `@border-width-md` | - | - | | `@anchor-border-color` | `@border-color` | - | - | -| `@anchor-ink-ball-width` | `2px` | - | - | -| `@anchor-ink-ball-height` | `16px` | - | - | -| `@anchor-ink-ball-radius` | `2px` | - | - | +| `@anchor-ink-ball-width` | `2px` | `2px` | - | +| `@anchor-ink-ball-height` | `16px` | `16px` | - | +| `@anchor-ink-ball-radius` | `2px` | `2px` | - | | `@anchor-ink-ball-background-color` | `@color-primary` | - | - | -| `@anchor-link-margin` | `@spacing-md 0 @spacing-md @spacing-lg` | - | - | -| `@anchor-link-font-size` | `@font-size-md` | - | - | +| `@anchor-link-margin` | `@spacing-md 0 @spacing-md @spacing-lg` | `@spacing-md 0 @spacing-lg @spacing-lg` | - | +| `@anchor-link-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@anchor-link-line-height` | `1` | - | - | | `@anchor-ink-line-width` | `1px` | - | - | | `@anchor-link-active-color` | `@color-primary` | - | - | diff --git a/packages/components/avatar/docs/Index.zh.md b/packages/components/avatar/docs/Index.zh.md index d7cc70c4a..7413270d9 100644 --- a/packages/components/avatar/docs/Index.zh.md +++ b/packages/components/avatar/docs/Index.zh.md @@ -27,7 +27,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@avatar-size-sm` | `@height-sm` | - | - | | `@avatar-size-md` | `@height-md` | - | - | diff --git a/packages/components/back-top/docs/Index.zh.md b/packages/components/back-top/docs/Index.zh.md index 9366ae240..9cb098832 100644 --- a/packages/components/back-top/docs/Index.zh.md +++ b/packages/components/back-top/docs/Index.zh.md @@ -27,7 +27,7 @@ subtitle: 回到顶部 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@back-top-zindex` | `@zindex-l2-base` | - | - | | `@back-top-height` | `60px` | - | - | @@ -41,8 +41,8 @@ subtitle: 回到顶部 | `@back-top-right-lg` | `@back-top-right-gutter * 2` | - | - | | `@back-top-right-xl` | `@back-top-right-gutter * 3` | - | - | | `@back-top-bottom` | `50px` | - | - | -| `@back-top-color` | `@color-primary` | - | - | -| `@back-top-hover-color` | `@color-primary-l30` | - | - | +| `@back-top-color` | `@color-primary` | `@color-primary-l30` | - | +| `@back-top-hover-color` | `@color-primary-l30` | `@color-primary` | - | | `@back-top-background-color` | `@color-white` | - | - | | `@back-top-background-hover-color` | `@color-white` | - | - | | `@back-top-box-shadow` | `0 2px 8px 0 rgba(30,35,43,0.12)` | - | - | diff --git a/packages/components/badge/docs/Index.zh.md b/packages/components/badge/docs/Index.zh.md index 76b0f3969..5d448e688 100644 --- a/packages/components/badge/docs/Index.zh.md +++ b/packages/components/badge/docs/Index.zh.md @@ -30,7 +30,7 @@ cover: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@badge-zindex` | `@zindex-auto` | - | - | | `@badge-font-size` | `@font-size-sm` | - | - | diff --git a/packages/components/breadcrumb/docs/Index.zh.md b/packages/components/breadcrumb/docs/Index.zh.md index a187c9c02..d63d55ef2 100644 --- a/packages/components/breadcrumb/docs/Index.zh.md +++ b/packages/components/breadcrumb/docs/Index.zh.md @@ -25,13 +25,13 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@breadcrumb-base-color` | `@text-color-secondary` | - | - | | `@breadcrumb-link-color` | `@color-graphite` | - | - | | `@breadcrumb-link-color-hover` | `@color-primary` | - | - | -| `@breadcrumb-separator-color` | `@text-color-secondary` | - | - | +| `@breadcrumb-separator-color` | `@text-color-secondary` | `@color-graphite-l10` | - | | `@breadcrumb-last-item-color` | `@color-graphite-d40` | - | - | | `@breadcrumb-font-size` | `@font-size-base` | - | - | -| `@breadcrumb-separator-margin` | `0 @margin-sm` | - | - | +| `@breadcrumb-separator-margin` | `0 @margin-sm` | `0 @margin-xs` | - | \ No newline at end of file diff --git a/packages/components/button/docs/Index.zh.md b/packages/components/button/docs/Index.zh.md index 4c23a11f5..d1f12919f 100644 --- a/packages/components/button/docs/Index.zh.md +++ b/packages/components/button/docs/Index.zh.md @@ -40,13 +40,13 @@ subtitle: 按钮 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@button-zindex` | `@zindex-l1-1` | - | - | | `@button-font-weight` | `@font-weight-md` | - | - | | `@button-line-height` | `@line-height-base` | - | - | -| `@button-height-xs` | `@height-sm` | - | - | -| `@button-height-sm` | `@height-md` | - | - | +| `@button-height-xs` | `@height-sm` | `24px` | - | +| `@button-height-sm` | `@height-md` | `32px` | - | | `@button-height-md` | `@height-md` | - | - | | `@button-height-lg` | `@height-lg` | - | - | | `@button-height-xl` | `@height-xl` | - | - | @@ -106,5 +106,4 @@ subtitle: 按钮 | `@button-text-hover-background-color` | `transparent` | - | - | | `@button-icon-color` | `@color-graphite-d20` | - | - | | `@button-icon-font-size` | `@font-size-lg` | - | - | -| `@button-icon-color` | `@color-graphite-d20` | - | - | diff --git a/packages/components/card/docs/Index.zh.md b/packages/components/card/docs/Index.zh.md index 099e32ce2..6ca70cf78 100644 --- a/packages/components/card/docs/Index.zh.md +++ b/packages/components/card/docs/Index.zh.md @@ -54,9 +54,9 @@ export interface CardButtonProps extends ButtonProps { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | -| `@card-padding-sm` | `@spacing-md` | - | - | +| `@card-padding-sm` | `@spacing-md` | `@spacing-lg` | - | | `@card-padding-md` | `@spacing-lg` | - | - | | `@card-padding-lg` | `@spacing-xl` | - | - | | `@card-color` | `@text-color` | - | - | diff --git a/packages/components/carousel/docs/Index.zh.md b/packages/components/carousel/docs/Index.zh.md index b39ee26e4..d089bfda1 100644 --- a/packages/components/carousel/docs/Index.zh.md +++ b/packages/components/carousel/docs/Index.zh.md @@ -39,7 +39,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@carousel-arrow-size` | `32px` | - | - | | `@carousel-arrow-color` | `@color-white` | - | - | diff --git a/packages/components/checkbox/docs/Index.zh.md b/packages/components/checkbox/docs/Index.zh.md index 48ae4e49a..4108bc3d2 100644 --- a/packages/components/checkbox/docs/Index.zh.md +++ b/packages/components/checkbox/docs/Index.zh.md @@ -55,10 +55,10 @@ cover: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@checkbox-font-size-sm` | `@form-font-size-sm` | - | - | -| `@checkbox-font-size-md` | `@form-font-size-md` | - | - | +| `@checkbox-font-size-md` | `@form-font-size-md` | `@form-font-size-sm` | - | | `@checkbox-font-size-lg` | `@form-font-size-lg` | - | - | | `@checkbox-line-height` | `@form-line-height` | - | - | | `@checkbox-height-sm` | `@form-height-sm` | - | - | @@ -76,12 +76,12 @@ cover: | `@checkbox-border-radius` | `@border-radius-sm` | - | - | | `@checkbox-color` | `@form-color` | - | - | | `@checkbox-background-color` | `@form-background-color` | - | - | -| `@checkbox-hover-color` | `@form-hover-color` | - | - | +| `@checkbox-hover-color` | `@form-hover-color` | `@form-active-color` | - | | `@checkbox-active-color` | `@form-active-color` | - | - | -| `@checkbox-focus-color` | `@form-focus-color` | - | - | +| `@checkbox-focus-color` | `@form-focus-color` | `@form-active-color` | - | | `@checkbox-disabled-color` | `@form-disabled-color` | - | - | | `@checkbox-disabled-background-color` | `@form-disabled-background-color` | - | - | -| `@checkbox-font-size` | `@font-size-md` | - | - | +| `@checkbox-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@checkbox-inner-zindex` | `@zindex-l1-1` | - | - | | `@checkbox-box-size` | `16px` | - | - | | `@checkbox-box-border-radius` | `@border-radius-sm` | - | - | @@ -91,6 +91,6 @@ cover: | `@checkbox-tick-width` | `(@checkbox-box-size / @font-size-base) * 5px` | - | - | | `@checkbox-tick-height` | `(@checkbox-box-size / @font-size-base) * 9px` | - | - | | `@checkbox-tick-border-width` | `@border-width-md` | - | - | -| `@checkbox-label-padding` | `0 @spacing-sm` | - | - | +| `@checkbox-label-padding` | `0 @spacing-sm` | `0 @spacing-xs` | - | | `@checkbox-group-item-margin-right` | `@spacing-sm` | - | - | diff --git a/packages/components/collapse/docs/Index.zh.md b/packages/components/collapse/docs/Index.zh.md index 36e6a97f6..7f8cc7bd0 100644 --- a/packages/components/collapse/docs/Index.zh.md +++ b/packages/components/collapse/docs/Index.zh.md @@ -31,7 +31,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@collapse-line-height` | `@line-height-base` | - | - | | `@collapse-font-size` | `@font-size-md` | - | - | diff --git a/packages/components/comment/docs/Index.zh.md b/packages/components/comment/docs/Index.zh.md index fa5cd2e40..fc493b658 100644 --- a/packages/components/comment/docs/Index.zh.md +++ b/packages/components/comment/docs/Index.zh.md @@ -29,7 +29,7 @@ subtitle: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@comment-padding-md` | `@spacing-md 0` | - | - | | `@comment-margin-right` | `@spacing-md` | - | - | diff --git a/packages/components/date-picker/docs/Index.zh.md b/packages/components/date-picker/docs/Index.zh.md index 09950813d..069e28a90 100644 --- a/packages/components/date-picker/docs/Index.zh.md +++ b/packages/components/date-picker/docs/Index.zh.md @@ -105,7 +105,7 @@ const defaultFormat = { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@date-picker-line-height` | `@form-line-height` | - | - | | `@date-picker-color` | `@form-color` | - | - | diff --git a/packages/components/divider/docs/Index.zh.md b/packages/components/divider/docs/Index.zh.md index b73c7d27c..7dfe63136 100644 --- a/packages/components/divider/docs/Index.zh.md +++ b/packages/components/divider/docs/Index.zh.md @@ -24,7 +24,7 @@ cover: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@divider-border-width` | `@border-width-sm` | - | - | | `@divider-border-color` | `@border-color` | - | - | diff --git a/packages/components/drawer/docs/Index.zh.md b/packages/components/drawer/docs/Index.zh.md index cce017c98..12b8317e2 100644 --- a/packages/components/drawer/docs/Index.zh.md +++ b/packages/components/drawer/docs/Index.zh.md @@ -178,7 +178,7 @@ const openDrawer = () => open({ ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@drawer-font-size` | `@font-size-md` | - | - | | `@drawer-line-height` | `@line-height-base` | - | - | @@ -188,8 +188,8 @@ const openDrawer = () => open({ | `@drawer-box-shadow-start` | `@shadow-right-lg` | - | - | | `@drawer-box-shadow-end` | `@shadow-left-lg` | - | - | | `@drawer-box-shadow-top` | `@shadow-bottom-lg` | - | - | -| `@drawer-header-padding` | `@spacing-lg @spacing-xl @spacing-sm` | - | - | -| `@drawer-body-padding` | `@spacing-sm @spacing-xl` | - | - | -| `@drawer-footer-padding` | `@spacing-sm @spacing-xl @spacing-lg` | - | - | +| `@drawer-header-padding` | `@spacing-lg @spacing-xl @spacing-sm` | `0 @spacing-lg 0` | - | +| `@drawer-body-padding` | `@spacing-sm @spacing-xl` | `@spacing-lg @spacing-2xl` | - | +| `@drawer-footer-padding` | `@spacing-sm @spacing-xl @spacing-lg` | `@spacing-md @spacing-lg @spacing-md` | - | | `@drawer-footer-button-margin-left` | `@spacing-sm` | - | - | diff --git a/packages/components/dropdown/docs/Index.zh.md b/packages/components/dropdown/docs/Index.zh.md index a5bc3ad9e..9c6c198b2 100644 --- a/packages/components/dropdown/docs/Index.zh.md +++ b/packages/components/dropdown/docs/Index.zh.md @@ -34,7 +34,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@dropdown-menu-item-height` | `@height-md` | - | - | | `@dropdown-menu-item-margin` | `0` | - | - | diff --git a/packages/components/empty/docs/Index.zh.md b/packages/components/empty/docs/Index.zh.md index 4a9be19f5..d2f43f667 100644 --- a/packages/components/empty/docs/Index.zh.md +++ b/packages/components/empty/docs/Index.zh.md @@ -28,19 +28,19 @@ cols: 1 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@empty-line-height` | `@line-height-base` | - | - | | `@empty-margin` | `@spacing-lg 0` | - | - | | `@empty-image-margin-bottom` | `@spacing-sm` | - | - | | `@empty-image-icon-opacity` | `0.3` | - | - | -| `@empty-image-icon-font-size` | `64px` | - | - | +| `@empty-image-icon-font-size` | `64px` | `48px` | - | | `@empty-image-icon-color` | `@text-color` | - | - | -| `@empty-description-opacity` | `1` | - | - | +| `@empty-description-opacity` | `1` | `1` | - | | `@empty-description-margin` | `0` | - | - | -| `@empty-description-color` | `@color-graphite-d10` | - | - | -| `@empty-description-font-size` | `@font-size-md` | - | - | +| `@empty-description-color` | `@color-graphite-d10` | `@color-graphite-d10` | - | +| `@empty-description-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@empty-content-margin-top` | `@spacing-lg` | - | - | -| `@empty-content-color` | `@color-graphite` | - | - | -| `@empty-content-font-size` | `@font-size-md` | - | - | +| `@empty-content-color` | `@color-graphite` | `@color-graphite` | - | +| `@empty-content-font-size` | `@font-size-md` | `@font-size-sm` | - | \ No newline at end of file diff --git a/packages/components/form/docs/Index.zh.md b/packages/components/form/docs/Index.zh.md index df0db9c8c..f7a8bf8cc 100644 --- a/packages/components/form/docs/Index.zh.md +++ b/packages/components/form/docs/Index.zh.md @@ -116,12 +116,12 @@ export default defineComponent({ ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@form-font-size-xs` | `@font-size-sm` | - | - | -| `@form-font-size-sm` | `@font-size-md` | - | - | -| `@form-font-size-md` | `@font-size-md` | - | - | -| `@form-font-size-lg` | `@font-size-lg` | - | - | +| `@form-font-size-sm` | `@font-size-md` | `@font-size-sm` | - | +| `@form-font-size-md` | `@font-size-md` | `@font-size-sm` | - | +| `@form-font-size-lg` | `@font-size-lg` | `@font-size-md` | - | | `@form-line-height` | `@line-height-base` | - | - | | `@form-height-xs` | `@height-xs` | - | - | | `@form-height-sm` | `@height-sm` | - | - | @@ -141,7 +141,7 @@ export default defineComponent({ | `@form-border-radius-lg` | `@border-radius-lg` | - | - | | `@form-color` | `@text-color` | - | - | | `@form-color-secondary` | `@text-color-secondary` | - | - | -| `@form-tooltip-color` | `@text-color-secondary` | - | - | +| `@form-tooltip-color` | `@text-color-secondary` | `@color-primary-l10` | - | | `@form-background-color` | `@background-color-component` | - | - | | `@form-placeholder-color` | `@color-graphite` | - | - | | `@form-hover-color` | `@color-primary-l10` | - | - | @@ -149,22 +149,22 @@ export default defineComponent({ | `@form-active-box-shadow` | `0 0 0 2px fade(@form-active-color, 20%)` | - | - | | `@form-focus-color` | `@color-primary-d10` | - | - | | `@form-focus-box-shadow` | `0 0 0 2px fade(@form-focus-color, 20%)` | - | - | -| `@form-disabled-color` | `@text-color-disabled` | - | - | +| `@form-disabled-color` | `@text-color-disabled` | `@color-graphite-l10` | - | | `@form-disabled-border-color` | `@color-graphite-l20` | - | - | -| `@form-disabled-background-color` | `@background-color-disabled` | - | - | +| `@form-disabled-background-color` | `@background-color-disabled` | `@color-graphite-l40` | - | | `@form-icon-color` | `@color-graphite-d20` | - | - | -| `@form-icon-hover-color` | `@color-graphite-d20` | - | - | +| `@form-icon-hover-color` | `@color-graphite-d20` | `@color-primary` | - | | `@form-item-valid-color` | `@color-success` | - | - | | `@form-item-validating-color` | `@color-pending` | - | - | | `@form-item-invalid-color` | `@color-error` | - | - | | `@form-item-invalid-box-shadow` | `0 0 0 2px fade(@form-item-invalid-color, 20%)` | - | - | -| `@form-item-margin-bottom` | `24px` | - | - | +| `@form-item-margin-bottom` | `24px` | `@spacing-sm` | - | | `@form-item-vertical-label-margin` | `0` | - | - | | `@form-item-vertical-label-padding` | `0 0 8px` | - | - | -| `@form-item-font-size` | `@font-size-md` | - | - | +| `@form-item-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@form-item-font-height` | `ceil(@form-item-font-size * @form-line-height)` | - | - | | `@form-item-label-required-color` | `@color-red-l10` | - | - | -| `@form-item-label-color` | `@color-black` | - | - | +| `@form-item-label-color` | `@color-black` | `@color-graphite-d10` | - | | `@form-item-label-colon-margin-right` | `8px` | - | - | | `@form-item-label-colon-margin-left` | `2px` | - | - | | `@form-item-label-margin-left` | `8px` | - | - | diff --git a/packages/components/grid/docs/Index.zh.md b/packages/components/grid/docs/Index.zh.md index 7bcf012ce..cf2ab9b6b 100644 --- a/packages/components/grid/docs/Index.zh.md +++ b/packages/components/grid/docs/Index.zh.md @@ -42,7 +42,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@grid-columns` | `24` | - | - | \ No newline at end of file diff --git a/packages/components/header/docs/Index.zh.md b/packages/components/header/docs/Index.zh.md index b873aac2e..b23211c95 100644 --- a/packages/components/header/docs/Index.zh.md +++ b/packages/components/header/docs/Index.zh.md @@ -29,13 +29,13 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@header-line-height` | `@line-height-base` | - | - | -| `@header-height-xl` | `@height-xl` | - | - | -| `@header-height-lg` | `@height-xl` | - | - | -| `@header-height-md` | `@height-lg` | - | - | -| `@header-height-sm` | `@height-md` | - | - | +| `@header-height-xl` | `@height-xl` | `@height-xl` | - | +| `@header-height-lg` | `@height-xl` | `@height-xl` | - | +| `@header-height-md` | `@height-lg` | `@height-xl` | - | +| `@header-height-sm` | `@height-md` | `@height-md` | - | | `@header-font-size` | `@font-size-md` | - | - | | `@header-color` | `@text-color` | - | - | | `@header-background-color` | `@background-color-component` | - | - | @@ -55,7 +55,7 @@ order: 0 | `@header-title-font-size-xl` | `@font-size-3xl` | - | - | | `@header-title-font-size-lg` | `@font-size-2xl` | - | - | | `@header-title-font-size-md` | `@font-size-xl` | - | - | -| `@header-title-font-size-sm` | `@font-size-lg` | - | - | +| `@header-title-font-size-sm` | `@font-size-lg` | `@font-size-md` | - | | `@header-sub-title-color` | `@text-color-secondary` | - | - | | `@header-suffix-color` | `@text-color-secondary` | - | - | | `@header-suffix-padding` | `0 @spacing-xs 0 @spacing-sm` | - | - | diff --git a/packages/components/image/docs/Index.zh.md b/packages/components/image/docs/Index.zh.md index 835181714..a7e5868cd 100644 --- a/packages/components/image/docs/Index.zh.md +++ b/packages/components/image/docs/Index.zh.md @@ -49,7 +49,7 @@ subtitle: 图片 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@image-min-width` | `96px` | - | - | | `@image-min-height` | `96px` | - | - | diff --git a/packages/components/input-number/docs/Index.zh.md b/packages/components/input-number/docs/Index.zh.md index 42eee4281..228432a04 100644 --- a/packages/components/input-number/docs/Index.zh.md +++ b/packages/components/input-number/docs/Index.zh.md @@ -34,7 +34,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@input-number-height-sm` | `@input-height-sm` | - | - | | `@input-number-height-md` | `@input-height-md` | - | - | diff --git a/packages/components/input/docs/Index.zh.md b/packages/components/input/docs/Index.zh.md index 053ffed9d..5820b10ac 100644 --- a/packages/components/input/docs/Index.zh.md +++ b/packages/components/input/docs/Index.zh.md @@ -32,7 +32,7 @@ subtitle: 输入框 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@input-font-size-sm` | `@form-font-size-sm` | - | - | | `@input-font-size-md` | `@form-font-size-md` | - | - | @@ -41,12 +41,12 @@ subtitle: 输入框 | `@input-height-sm` | `@form-height-sm` | - | - | | `@input-height-md` | `@form-height-md` | - | - | | `@input-height-lg` | `@form-height-lg` | - | - | -| `@input-padding-horizontal-sm` | `@form-padding-horizontal-sm` | - | - | -| `@input-padding-horizontal-md` | `@form-padding-horizontal-md` | - | - | -| `@input-padding-horizontal-lg` | `@form-padding-horizontal-lg` | - | - | -| `@input-padding-vertical-sm` | `@form-padding-vertical-sm` | - | - | -| `@input-padding-vertical-md` | `@form-padding-vertical-md` | - | - | -| `@input-padding-vertical-lg` | `@form-padding-vertical-lg` | - | - | +| `@input-padding-horizontal-sm` | `@form-padding-horizontal-sm` | `12px` | - | +| `@input-padding-horizontal-md` | `@form-padding-horizontal-md` | `12px` | - | +| `@input-padding-horizontal-lg` | `@form-padding-horizontal-lg` | `12px` | - | +| `@input-padding-vertical-sm` | `@form-padding-vertical-sm` | `2px` | - | +| `@input-padding-vertical-md` | `@form-padding-vertical-md` | `6px` | - | +| `@input-padding-vertical-lg` | `@form-padding-vertical-lg` | `8px` | - | | `@input-addon-margin-with-selector-sm` | `-(@input-padding-vertical-sm + 1) -@input-padding-horizontal-sm` | - | - | | `@input-addon-margin-with-selector-md` | `-(@input-padding-vertical-md + 1) -@input-padding-horizontal-md` | - | - | | `@input-addon-margin-with-selector-lg` | `-(@input-padding-vertical-lg + 1) -@input-padding-horizontal-lg` | - | - | @@ -66,7 +66,7 @@ subtitle: 输入框 | `@input-icon-color` | `@form-icon-color` | - | - | | `@input-icon-hover-color` | `@form-icon-hover-color` | - | - | | `@input-icon-font-size` | `@font-size-lg` | - | - | -| `@input-clear-icon-line-height` | `@font-size-xl` | - | - | -| `@input-addon-background-color` | `@background-color-base` | - | - | +| `@input-clear-icon-line-height` | `@font-size-xl` | `@font-size-lg + 2` | - | +| `@input-addon-background-color` | `@background-color-base` | `@color-graphite-l50` | - | | `@input-wrapper-inner-margin` | `@spacing-xs` | - | - | \ No newline at end of file diff --git a/packages/components/layout/docs/Index.zh.md b/packages/components/layout/docs/Index.zh.md index 01736d39c..e68920177 100644 --- a/packages/components/layout/docs/Index.zh.md +++ b/packages/components/layout/docs/Index.zh.md @@ -38,12 +38,12 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@layout-header-background-color` | `@background-color-component` | - | - | | `@layout-header-color` | `@text-color` | - | - | | `@layout-header-height` | `64px` | - | - | -| `@layout-header-padding` | `0 @spacing-xl` | - | - | +| `@layout-header-padding` | `0 @spacing-xl` | `0 @spacing-lg` | - | | `@layout-header-box-shadow` | `0 2px 8px 0 rgba(0, 0, 0, 0.08)` | - | - | | `@layout-footer-background` | `@background-color-component` | - | - | | `@layout-footer-color` | `@text-color` | - | - | @@ -51,5 +51,5 @@ order: 0 | `@layout-sider-background` | `@background-color-component` | - | - | | `@layout-sider-color` | `@text-color` | - | - | | `@layout-sider-width` | `224px` | - | - | -| `@layout-sider-collapsed-width` | `64px` | - | - | +| `@layout-sider-collapsed-width` | `64px` | `44px` | - | \ No newline at end of file diff --git a/packages/components/list/docs/Index.zh.md b/packages/components/list/docs/Index.zh.md index b90dea7be..baeeda396 100644 --- a/packages/components/list/docs/Index.zh.md +++ b/packages/components/list/docs/Index.zh.md @@ -58,7 +58,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@list-border-color` | `@border-color` | - | - | | `@list-border-size` | `@border-width-sm` | - | - | diff --git a/packages/components/menu/docs/Index.zh.md b/packages/components/menu/docs/Index.zh.md index 2ebb9a092..393214001 100644 --- a/packages/components/menu/docs/Index.zh.md +++ b/packages/components/menu/docs/Index.zh.md @@ -117,7 +117,7 @@ export interface MenuClickOptions { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@menu-text-color` | `@text-color` | - | - | | `@menu-background-color` | `@background-color-component` | - | - | @@ -131,7 +131,7 @@ export interface MenuClickOptions { | `@menu-font-size` | `@font-size-md` | - | - | | `@menu-vertical-padding` | `4px 8px` | - | - | | `@menu-vertical-font-size` | `@font-size-md` | - | - | -| `@menu-item-height` | `@height-lg` | - | - | +| `@menu-item-height` | `@height-lg` | `44px` | - | | `@menu-item-padding-left` | `@spacing-md` | - | - | | `@menu-item-padding-right` | `@spacing-xl` | - | - | | `@menu-item-margin` | `@spacing-xs 0` | - | - | @@ -145,16 +145,16 @@ export interface MenuClickOptions { | `@menu-sub-suffix-icon-right` | `8px` | - | - | | `@menu-overlay-zindex` | `@zindex-l4-3` | - | - | | `@menu-overlay-min-width` | `128px` | - | - | -| `@menu-overlay-border-radius` | `@border-radius-md` | - | - | +| `@menu-overlay-border-radius` | `@border-radius-md` | `@border-radius-sm` | - | | `@menu-overlay-box-shadow` | `@shadow-bottom-md` | - | - | | `@menu-dark-disabled-color` | `@disabled-color-dark` | - | - | -| `@menu-dark-color` | `@text-color-dark` | - | - | -| `@menu-dark-background-color` | `@background-color-component-dark` | - | - | -| `@menu-dark-highlight-background-color` | `fade(@color-white, 6%)` | - | - | -| `@menu-dark-highlight-color` | `@color-primary` | - | - | +| `@menu-dark-color` | `@text-color-dark` | `@color-graphite-l30` | - | +| `@menu-dark-background-color` | `@background-color-component-dark` | `@color-graphite-d40` | - | +| `@menu-dark-highlight-background-color` | `fade(@color-white, 6%)` | `@color-graphite-d30` | - | +| `@menu-dark-highlight-color` | `@color-primary` | `@color-graphite-l30` | - | | `@menu-dark-group-label-color` | `@color-graphite-d10` | - | - | | `@menu-collapsed-font-size` | `@font-size-lg` | - | - | -| `@menu-collapsed-width` | `64px` | - | - | +| `@menu-collapsed-width` | `64px` | `44px` | - | | `@menu-sub-inline-font-size` | `@font-size-md` | - | - | | `@menu-icon-font-size` | `@font-size-lg` | - | - | diff --git a/packages/components/message/docs/Index.zh.md b/packages/components/message/docs/Index.zh.md index 247d2273f..12c726286 100644 --- a/packages/components/message/docs/Index.zh.md +++ b/packages/components/message/docs/Index.zh.md @@ -98,15 +98,15 @@ export interface MessageRef { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@message-margin` | `@spacing-sm` | - | - | | `@message-font-size` | `@font-size-md` | - | - | -| `@message-line-height` | `@line-height-base` | - | - | +| `@message-line-height` | `@line-height-base` | `24px` | - | | `@message-content-min-width` | `128px` | - | - | | `@message-content-max-width` | `480px` | - | - | | `@message-content-padding-horizontal` | `@spacing-lg` | - | - | -| `@message-content-padding-vertical` | `(round((((@height-lg - @message-font-size * @message-line-height) / 2) * 10) / 10))` | - | - | +| `@message-content-padding-vertical` | `(round((((@height-lg - @message-font-size * @message-line-height) / 2) * 10) / 10))` | `8px` | - | | `@message-content-bg-color` | `@background-color-component` | - | - | | `@message-content-border-radius` | `@border-radius-md` | - | - | | `@message-content-box-shadow` | `@shadow-bottom-md` | - | - | diff --git a/packages/components/modal/docs/Index.zh.md b/packages/components/modal/docs/Index.zh.md index 373b4cd48..9be8b54ff 100644 --- a/packages/components/modal/docs/Index.zh.md +++ b/packages/components/modal/docs/Index.zh.md @@ -194,35 +194,36 @@ const openModal = () => open({ ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@modal-max-width` | `calc(100vw - 32px)` | - | - | -| `@modal-font-size` | `@font-size-md` | - | - | +| `@modal-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@modal-line-height` | `@line-height-base` | - | - | | `@modal-background-color` | `@background-color-component` | - | - | | `@modal-box-shadow` | `@shadow-bottom-md` | - | - | | `@modal-border-radius` | `@border-radius-md` | - | - | -| `@modal-header-padding` | `@spacing-lg @spacing-xl @spacing-sm` | - | - | -| `@modal-body-padding` | `@spacing-sm @spacing-xl` | - | - | -| `@modal-footer-padding` | `@spacing-sm @spacing-xl @spacing-lg` | - | - | +| `@modal-header-padding` | `@spacing-lg @spacing-xl @spacing-sm` | `0 @spacing-lg` | - | +| `@modal-body-padding` | `@spacing-sm @spacing-xl` | `@spacing-sm @spacing-lg` | - | +| `@modal-footer-padding` | `@spacing-sm @spacing-xl @spacing-lg` | `@spacing-md @spacing-lg` | - | | `@modal-footer-button-margin-left` | `@spacing-sm` | - | - | -| `@modal-footer-min-height` | `64px` | - | - | +| `@modal-footer-min-height` | `64px` | `56px` | - | | `@modal-header-title-font-size` | `@font-size-lg` | - | - | | `@modal-body-title-font-size` | `@font-size-md` | - | - | -| `@modal-body-title-font-weight` | `@font-weight-xl` | - | - | +| `@modal-body-title-font-weight` | `@font-weight-xl` | `@font-weight-md` | - | | `@modal-body-title-margin-bottom` | `4px` | - | - | -| `@modal-body-title-color` | `@text-color` | - | - | -| `@modal-body-content-font-size` | `@modal-font-size` | - | - | -| `@modal-body-content-color` | `@text-color` | - | - | -| `@modal-body-content-padding` | `0` | - | - | +| `@modal-body-title-color` | `@text-color` | `@color-graphite-d40` | - | +| `@modal-body-content-font-size` | `@modal-font-size` | `@modal-font-size` | - | +| `@modal-body-content-color` | `@text-color` | `@color-graphite-d10` | - | +| `@modal-body-content-padding` | `0` | `0 @spacing-lg 0 0` | - | | `@modal-body-icon-font-size` | `48px` | - | - | | `@modal-body-icon-margin` | `0 @spacing-lg` | - | - | -| `@modal-body-confirm-color` | `@color-warning` | - | - | -| `@modal-body-info-color` | `@color-info` | - | - | +| `@modal-body-confirm-color` | `@color-warning` | `@color-warning-l10` | - | +| `@modal-body-info-color` | `@color-info` | `@color-info-l10` | - | | `@modal-body-success-color` | `@color-success` | - | - | -| `@modal-body-warning-color` | `@color-warning` | - | - | -| `@modal-body-error-color` | `@color-error` | - | - | +| `@modal-body-warning-color` | `@color-warning` | `@color-warning-l10` | - | +| `@modal-body-error-color` | `@color-error` | `@color-error-l10` | - | | `@modal-body-typed-padding` | `@spacing-sm @spacing-lg` | - | - | | `@modal-max-width-screen-sm` | `calc(100vw - 16px)` | - | - | | `@modal-margin-screen-sm` | `@spacing-sm auto` | - | - | +| `@modal-typed-body-padding` | - | `@spacing-sm @spacing-lg` | - | diff --git a/packages/components/notification/docs/Index.zh.md b/packages/components/notification/docs/Index.zh.md index f1f470df2..0b4ee0e10 100644 --- a/packages/components/notification/docs/Index.zh.md +++ b/packages/components/notification/docs/Index.zh.md @@ -107,10 +107,10 @@ export interface NotificationRef { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | -| `@notification-padding` | `8px 8px 8px 16px` | - | - | -| `@notification-margin` | `0 0 16px 0` | - | - | +| `@notification-padding` | `8px 8px 8px 16px` | `8px 8px 8px 16px` | - | +| `@notification-margin` | `0 0 16px 0` | `0 0 8px 0` | - | | `@notification-width` | `384px` | - | - | | `@notification-max-width` | `calc(100vw - 48px)` | - | - | | `@notification-font-size` | `@font-size-md` | - | - | @@ -127,15 +127,15 @@ export interface NotificationRef { | `@notification-icon-warning-color` | `@color-warning-l10` | - | - | | `@notification-icon-error-color` | `@color-error-l10` | - | - | | `@notification-close-width` | `14px` | - | - | -| `@notification-close-font-size` | `@font-size-sm` | - | - | +| `@notification-close-font-size` | `@font-size-sm` | `@font-size-lg` | - | | `@notification-close-color` | `@color-graphite-d20` | - | - | -| `@notification-close-hover-color` | `@color-graphite-d20` | - | - | -| `@notification-close-right` | `8px` | - | - | -| `@notification-close-top` | `8px` | - | - | -| `@notification-title-font-size` | `@font-size-lg` | - | - | -| `@notification-title-line-height` | `@line-height-base` | - | - | -| `@notification-title-margin` | `0 16px 8px 0` | - | - | -| `@notification-content-font-size` | `@font-size-md` | - | - | +| `@notification-close-hover-color` | `@color-graphite-d20` | `@color-primary` | - | +| `@notification-close-right` | `8px` | `8px` | - | +| `@notification-close-top` | `8px` | `8px` | - | +| `@notification-title-font-size` | `@font-size-lg` | `@font-size-md` | - | +| `@notification-title-line-height` | `@line-height-base` | `24px` | - | +| `@notification-title-margin` | `0 16px 8px 0` | `0 24px 8px 0` | - | +| `@notification-content-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@notification-content-color` | `@color-graphite-d10` | - | - | | `@notification-content-margin` | `0 16px 0 0` | - | - | | `@notification-footer-margin` | `8px 0 0 0` | - | - | diff --git a/packages/components/pagination/docs/Index.zh.md b/packages/components/pagination/docs/Index.zh.md index 4dc4bf890..a621a298b 100644 --- a/packages/components/pagination/docs/Index.zh.md +++ b/packages/components/pagination/docs/Index.zh.md @@ -50,24 +50,24 @@ export interface PaginationItemRenderOptions { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@pagination-font-size` | `@font-size-md` | - | - | | `@pagination-font-size-sm` | `@font-size-sm` | - | - | | `@pagination-item-icon-font-size` | `@font-size-sm` | - | - | | `@pagination-item-height-md` | `@height-md` | - | - | -| `@pagination-item-height-sm` | `@height-sm` | - | - | +| `@pagination-item-height-sm` | `@height-sm` | `24px` | - | | `@pagination-item-margin-right-md` | `@spacing-sm` | - | - | | `@pagination-item-margin-right-sm` | `@spacing-xs` | - | - | | `@pagination-item-input-width-md` | `48px` | - | - | | `@pagination-item-input-width-sm` | `40px` | - | - | -| `@pagination-item-spacing-sm` | `20px` | - | - | -| `@pagination-item-active-color` | `@button-primary` | - | - | -| `@pagination-item-active-background-color` | `@button-primary-background-color` | - | - | +| `@pagination-item-spacing-sm` | `20px` | `24px` | - | +| `@pagination-item-active-color` | `@button-primary` | `@color-primary` | - | +| `@pagination-item-active-background-color` | `@button-primary-background-color` | `@color-primary-l50` | - | | `@pagination-item-color` | `@color-graphite-d40` | - | - | | `@pagination-item-background-color` | `tint(@button-primary-background-color, 90%)` | - | - | | `@pagination-item-hover-color` | `@color-graphite-d40` | - | - | -| `@pagination-item-hover-background-color` | `tint(@button-primary-background-color, 90%)` | - | - | +| `@pagination-item-hover-background-color` | `tint(@button-primary-background-color, 90%)` | `@color-graphite-l50` | - | | `@pagination-item-disabled-color` | `@button-disable-color` | - | - | | `@pagination-item-disabled-background-color` | `@button-disable-background-color` | - | - | | `@pagination-item-button-hover-color` | `@color-graphite-d20` | - | - | diff --git a/packages/components/popconfirm/docs/Index.zh.md b/packages/components/popconfirm/docs/Index.zh.md index 144a55718..81f2344be 100644 --- a/packages/components/popconfirm/docs/Index.zh.md +++ b/packages/components/popconfirm/docs/Index.zh.md @@ -28,7 +28,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@popconfirm-zindex` | `@zindex-l4-2` | - | - | | `@popconfirm-font-size` | `@font-size-md` | - | - | @@ -37,11 +37,11 @@ order: 0 | `@popconfirm-border-radius` | `@border-radius-sm` | - | - | | `@popconfirm-box-shadow` | `@shadow-bottom-md` | - | - | | `@popconfirm-icon-size` | `@font-size-lg` | - | - | -| `@popconfirm-wrapper-min-width` | `192px` | - | - | +| `@popconfirm-wrapper-min-width` | `192px` | `320px` | - | | `@popconfirm-wrapper-padding` | `@spacing-sm @spacing-lg` | - | - | | `@popconfirm-title-padding` | `@spacing-sm 0` | - | - | | `@popconfirm-title-height` | `32px` | - | - | -| `@popconfirm-title-icon-color` | `@color-warning` | - | - | +| `@popconfirm-title-icon-color` | `@color-warning` | `@color-warning-l10` | - | | `@popconfirm-title-icon-margin-right` | `@spacing-sm` | - | - | | `@popconfirm-footer-padding` | `@spacing-sm 0 0 0` | - | - | | `@popconfirm-footer-button-margin-left` | `@spacing-sm` | - | - | diff --git a/packages/components/popover/docs/Index.zh.md b/packages/components/popover/docs/Index.zh.md index 4c3a61cbc..d9e52d1d3 100644 --- a/packages/components/popover/docs/Index.zh.md +++ b/packages/components/popover/docs/Index.zh.md @@ -26,21 +26,22 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@popover-zindex` | `@zindex-l4-2` | - | - | -| `@popover-font-size` | `@font-size-md` | - | - | -| `@popover-color` | `@text-color` | - | - | +| `@popover-font-size` | `@font-size-md` | `@font-size-sm` | - | +| `@popover-color` | `@text-color` | `@color-graphite-d10` | - | | `@popover-background-color` | `@background-color-component` | - | - | | `@popover-border-radius` | `@border-radius-sm` | - | - | -| `@popover-box-shadow` | `@shadow-bottom-md` | - | - | -| `@popover-wrapper-min-width` | `192px` | - | - | +| `@popover-box-shadow` | `@shadow-bottom-md` | `@shadow-bottom-sm` | - | +| `@popover-wrapper-min-width` | `192px` | `240px` | - | | `@popover-wrapper-padding` | `@spacing-xs @spacing-sm` | - | - | | `@popover-wrapper-with-header-padding` | `@spacing-sm @spacing-sm @spacing-sm @spacing-md` | - | - | | `@popover-header-padding` | `0 0 @spacing-xs 0` | - | - | | `@popover-header-height` | `24px` | - | - | -| `@popover-content-padding` | `@spacing-xs 0` | - | - | +| `@popover-content-padding` | `@spacing-xs 0` | `0` | - | | `@popover-content-line-height` | `20px` | - | - | | `@popover-close-icon-hover-color` | `@color-primary-d10` | - | - | | `@popover-close-icon-active-color` | `@color-primary-l10` | - | - | +| `@popover-border-color` | - | `@color-graphite-l30` | - | \ No newline at end of file diff --git a/packages/components/progress/docs/Index.zh.md b/packages/components/progress/docs/Index.zh.md index 46217c282..99068ab3e 100644 --- a/packages/components/progress/docs/Index.zh.md +++ b/packages/components/progress/docs/Index.zh.md @@ -55,11 +55,11 @@ cover: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@progress-normal-background-color` | `@color-success` | - | - | | `@progress-success-background-color` | `@color-success` | - | - | -| `@progress-exception-background-color` | `@color-error` | - | - | +| `@progress-exception-background-color` | `@color-error` | `@color-red-l10` | - | | `@progress-active-background-color` | `@color-success` | - | - | | `@progress-trail-background-color` | `@color-graphite-l40` | - | - | | `@progress-text-width` | `36px` | - | - | diff --git a/packages/components/radio/docs/Index.zh.md b/packages/components/radio/docs/Index.zh.md index 41053d0b6..74d923cf8 100644 --- a/packages/components/radio/docs/Index.zh.md +++ b/packages/components/radio/docs/Index.zh.md @@ -53,10 +53,10 @@ subtitle: 单选框 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@radio-font-size-sm` | `@form-font-size-sm` | - | - | -| `@radio-font-size-md` | `@form-font-size-md` | - | - | +| `@radio-font-size-md` | `@form-font-size-md` | `@form-font-size-sm` | - | | `@radio-font-size-lg` | `@form-font-size-lg` | - | - | | `@radio-line-height` | `@form-line-height` | - | - | | `@radio-height-sm` | `@form-height-sm` | - | - | @@ -74,9 +74,9 @@ subtitle: 单选框 | `@radio-border-radius` | `@border-radius-sm` | - | - | | `@radio-color` | `@form-color` | - | - | | `@radio-background-color` | `@form-background-color` | - | - | -| `@radio-hover-color` | `@form-hover-color` | - | - | +| `@radio-hover-color` | `@form-hover-color` | `@form-active-color` | - | | `@radio-active-color` | `@form-active-color` | - | - | -| `@radio-focus-color` | `@form-focus-color` | - | - | +| `@radio-focus-color` | `@form-focus-color` | `@form-active-color` | - | | `@radio-focus-box-shadow` | `@form-focus-box-shadow` | - | - | | `@radio-disabled-color` | `@form-disabled-color` | - | - | | `@radio-disabled-border-color` | `@form-disabled-border-color` | - | - | diff --git a/packages/components/rate/docs/Index.zh.md b/packages/components/rate/docs/Index.zh.md index 56cc73bcc..49ed9dfdf 100644 --- a/packages/components/rate/docs/Index.zh.md +++ b/packages/components/rate/docs/Index.zh.md @@ -25,7 +25,7 @@ subtitle: 评分 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@rate-placeholder-color` | `@form-placeholder-color` | - | - | | `@rate-active-color` | `@color-yellow` | - | - | diff --git a/packages/components/result/docs/Index.zh.md b/packages/components/result/docs/Index.zh.md index f5adfdc30..ca26e9b39 100644 --- a/packages/components/result/docs/Index.zh.md +++ b/packages/components/result/docs/Index.zh.md @@ -33,7 +33,7 @@ type ResultStatus = 'success' | 'error' | 'info' | 'warning' ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@result-padding` | `@spacing-gutter * 6 @spacing-gutter * 4` | - | - | | `@result-text-align` | `center` | - | - | @@ -54,7 +54,7 @@ type ResultStatus = 'success' | 'error' | 'info' | 'warning' | `@result-content-padding` | `@spacing-xl @spacing-gutter * 5` | - | - | | `@result-content-background-color` | `@color-grey-l50` | - | - | | `@result-success` | `@color-success` | - | - | -| `@result-warning` | `@color-warning` | - | - | +| `@result-warning` | `@color-warning` | `@color-warning-l10` | - | | `@result-error` | `@color-error` | - | - | | `@result-info` | `@color-info` | - | - | \ No newline at end of file diff --git a/packages/components/select/docs/Index.zh.md b/packages/components/select/docs/Index.zh.md index f2a53304d..bbb1ca331 100644 --- a/packages/components/select/docs/Index.zh.md +++ b/packages/components/select/docs/Index.zh.md @@ -113,18 +113,18 @@ export type SelectSearchFn = (data: SelectData, searchValue: string) => boolean ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@select-font-size-sm` | `@form-font-size-sm` | - | - | -| `@select-font-size-md` | `@form-font-size-md` | - | - | -| `@select-font-size-lg` | `@form-font-size-lg` | - | - | +| `@select-font-size-md` | `@form-font-size-md` | `@form-font-size-sm` | - | +| `@select-font-size-lg` | `@form-font-size-lg` | `@form-font-size-md` | - | | `@select-line-height` | `@form-line-height` | - | - | | `@select-height-sm` | `@form-height-sm` | - | - | | `@select-height-md` | `@form-height-md` | - | - | | `@select-height-lg` | `@form-height-lg` | - | - | -| `@select-padding-horizontal-sm` | `@form-padding-horizontal-sm` | - | - | -| `@select-padding-horizontal-md` | `@form-padding-horizontal-md` | - | - | -| `@select-padding-horizontal-lg` | `@form-padding-horizontal-lg` | - | - | +| `@select-padding-horizontal-sm` | `@form-padding-horizontal-sm` | `12px` | - | +| `@select-padding-horizontal-md` | `@form-padding-horizontal-md` | `12px` | - | +| `@select-padding-horizontal-lg` | `@form-padding-horizontal-lg` | `12px` | - | | `@select-padding-vertical-sm` | `@form-padding-vertical-sm` | - | - | | `@select-padding-vertical-md` | `@form-padding-vertical-md` | - | - | | `@select-padding-vertical-lg` | `@form-padding-vertical-lg` | - | - | @@ -141,43 +141,43 @@ export type SelectSearchFn = (data: SelectData, searchValue: string) => boolean | `@select-active-box-shadow` | `@form-active-box-shadow` | - | - | | `@select-disabled-color` | `@form-disabled-color` | - | - | | `@select-disabled-background-color` | `@form-disabled-background-color` | - | - | -| `@select-option-font-size` | `@font-size-md` | - | - | +| `@select-option-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@select-option-height` | `@height-md` | - | - | | `@select-option-padding` | `@spacing-sm @spacing-md` | - | - | | `@select-option-color` | `@text-color` | - | - | | `@select-option-disabled-color` | `@text-color-disabled` | - | - | -| `@select-option-active-background-color` | `@color-graphite-l50` | - | - | +| `@select-option-active-background-color` | `@color-graphite-l50` | `@color-graphite-l50` | - | | `@select-option-selected-color` | `@color-primary` | - | - | -| `@select-option-selected-background-color` | `@color-primary-l50` | - | - | -| `@select-option-selected-font-weight` | `@font-weight-xl` | - | - | +| `@select-option-selected-background-color` | `@color-primary-l50` | `@color-primary-l50` | - | +| `@select-option-selected-font-weight` | `@font-weight-xl` | `@font-weight-md` | - | | `@select-option-label-margin-left` | `@spacing-sm` | - | - | | `@select-option-group-border` | `@border-width-sm @border-style @border-color` | - | - | | `@select-option-group-color` | `@color-graphite` | - | - | -| `@select-option-group-margin` | `0 @spacing-md` | - | - | -| `@select-option-group-padding-left` | `0` | - | - | +| `@select-option-group-margin` | `0 @spacing-md` | `0 @spacing-md` | - | +| `@select-option-group-padding-left` | `0` | `0` | - | | `@select-option-grouped-padding-left` | `@spacing-xl` | - | - | | `@select-option-container-zindex` | `@zindex-l4-3` | - | - | -| `@select-option-container-padding` | `@spacing-sm 0` | - | - | +| `@select-option-container-padding` | `@spacing-sm 0` | `@spacing-xs 0` | - | | `@select-option-container-background-color` | `@background-color-component` | - | - | | `@select-option-container-border-radius` | `@border-radius-sm` | - | - | | `@select-option-container-box-shadow` | `@shadow-bottom-md` | - | - | | `@select-overlay-input-padding` | `0 @spacing-md @spacing-sm` | - | - | -| `@select-icon-font-size` | `@font-size-sm` | - | - | -| `@select-icon-margin-right` | `@spacing-xs` | - | - | -| `@select-icon-color` | `@select-placeholder-color` | - | - | -| `@select-icon-hover-color` | `@select-color-secondary` | - | - | +| `@select-icon-font-size` | `@font-size-sm` | `@font-size-lg` | - | +| `@select-icon-margin-right` | `@spacing-xs` | `@spacing-sm` | - | +| `@select-icon-color` | `@select-placeholder-color` | `@color-graphite-l20` | - | +| `@select-icon-hover-color` | `@select-color-secondary` | `@color-primary` | - | | `@select-icon-background-color` | `@select-background-color` | - | - | -| `@select-multiple-padding` | `@select-padding-vertical-md` | - | - | -| `@select-multiple-item-padding` | `0 @spacing-xs` | - | - | -| `@select-multiple-item-background-color` | `@color-graphite-l40` | - | - | +| `@select-multiple-padding` | `@select-padding-vertical-md` | `4px` | - | +| `@select-multiple-item-padding` | `0 @spacing-xs` | `0 @spacing-sm 0 @spacing-sm` | - | +| `@select-multiple-item-background-color` | `@color-graphite-l40` | `@color-graphite-l40` | - | | `@select-multiple-item-disabled-color` | `@select-disabled-color` | - | - | -| `@select-multiple-item-disabled-border-color` | `@select-border-color` | - | - | +| `@select-multiple-item-disabled-border-color` | `@select-border-color` | `@color-graphite-l30` | - | | `@select-multiple-item-border-width` | `@border-width-sm` | - | - | | `@select-multiple-item-border` | `@select-multiple-item-border-width @border-style @border-color-split` | - | - | -| `@select-multiple-item-border-radius` | `@select-border-radius` | - | - | +| `@select-multiple-item-border-radius` | `@select-border-radius` | `2px` | - | | `@select-multiple-item-label-margin` | `0 -@spacing-xs 0 @spacing-xs` | - | - | -| `@select-multiple-item-remove-icon-font-size` | `@font-size-xs` | - | - | -| `@select-multiple-item-remove-icon-color` | `@color-graphite` | - | - | -| `@select-multiple-item-remove-icon-hover-color` | `@color-graphite-d10` | - | - | +| `@select-multiple-item-remove-icon-font-size` | `@font-size-xs` | `@font-size-lg` | - | +| `@select-multiple-item-remove-icon-color` | `@color-graphite` | `@color-graphite-d20` | - | +| `@select-multiple-item-remove-icon-hover-color` | `@color-graphite-d10` | `@color-primary-l10` | - | | `@select-multiple-item-remove-icon-margin` | `0 0 0 @spacing-xs` | - | - | diff --git a/packages/components/skeleton/docs/Index.zh.md b/packages/components/skeleton/docs/Index.zh.md index 031458fe1..30d84f398 100644 --- a/packages/components/skeleton/docs/Index.zh.md +++ b/packages/components/skeleton/docs/Index.zh.md @@ -30,7 +30,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@skeleton-margin-bottom` | `@spacing-sm` | - | - | | `@skeleton-loader-margin-bottom` | `@spacing-xs` | - | - | diff --git a/packages/components/slider/docs/Index.zh.md b/packages/components/slider/docs/Index.zh.md index 296148726..84a4adbae 100644 --- a/packages/components/slider/docs/Index.zh.md +++ b/packages/components/slider/docs/Index.zh.md @@ -37,14 +37,14 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@slider-marks-label-color` | `rgba(0, 0, 0, 0.451)` | - | - | | `@slider-rail-background-color` | `@color-graphite-l30` | - | - | | `@slider-track-background-color` | `@color-primary` | - | - | | `@slider-thumb-background-color` | `@color-white` | - | - | | `@slider-dot-background-color` | `@color-white` | - | - | -| `@slider-dot-border` | `2px solid @color-primary` | - | - | +| `@slider-dot-border` | `2px solid @color-primary` | `2px solid @color-graphite-l30` | - | | `@slider-thumb-border` | `2px solid @color-primary` | - | - | | `@slider-rail-hover-background-color` | `@color-graphite-l30` | - | - | | `@slider-track-hover-background-color` | `@color-primary` | - | - | @@ -53,10 +53,10 @@ order: 0 | `@slider-thumb-focus-box-shadow` | `0 0 0 5px fade(#46a6ff, 12%)` | - | - | | `@slider-dot-active-border-color` | `@color-primary` | - | - | | `@slider-marks-label-active-color` | `rgba(0, 0, 0, 0.851)` | - | - | -| `@slider-track-disabled-background-color` | `rgba(0, 0, 0, 0.251)` | - | - | +| `@slider-track-disabled-background-color` | `rgba(0, 0, 0, 0.251)` | `@color-graphite` | - | | `@slider-thumb-disabled-background-color` | `@color-white` | - | - | -| `@slider-thumb-disabled-border-color` | `rgba(0, 0, 0, 0.251)` | - | - | -| `@slider-dot-disabled-active-border-color` | `rgba(0, 0, 0, 0.251)` | - | - | +| `@slider-thumb-disabled-border-color` | `rgba(0, 0, 0, 0.251)` | `@color-graphite` | - | +| `@slider-dot-disabled-active-border-color` | `rgba(0, 0, 0, 0.251)` | `@color-graphite` | - | | `@slider-thumb-width` | `10px` | - | - | | `@slider-thumb-height` | `10px` | - | - | | `@slider-thumb-margin-top` | `-3px` | - | - | diff --git a/packages/components/space/docs/Index.zh.md b/packages/components/space/docs/Index.zh.md index a2b31382c..bec58e7eb 100644 --- a/packages/components/space/docs/Index.zh.md +++ b/packages/components/space/docs/Index.zh.md @@ -31,7 +31,7 @@ cover: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@space-margin-sm` | `@spacing-sm` | - | - | | `@space-margin-md` | `@spacing-lg` | - | - | diff --git a/packages/components/spin/docs/Index.zh.md b/packages/components/spin/docs/Index.zh.md index 1c94d94e9..be1bea9ea 100644 --- a/packages/components/spin/docs/Index.zh.md +++ b/packages/components/spin/docs/Index.zh.md @@ -33,7 +33,7 @@ cover: ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@spin-zindex` | `@zindex-l2-base` | - | - | | `@spin-tip-color` | `@color-primary` | - | - | diff --git a/packages/components/statistic/docs/Index.zh.md b/packages/components/statistic/docs/Index.zh.md index 4dbd7ee42..643ac0286 100644 --- a/packages/components/statistic/docs/Index.zh.md +++ b/packages/components/statistic/docs/Index.zh.md @@ -33,7 +33,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@statistic-font-size-sm` | `@font-size-md` | - | - | | `@statistic-font-size-md` | `@font-size-md` | - | - | diff --git a/packages/components/stepper/docs/Index.zh.md b/packages/components/stepper/docs/Index.zh.md index 1d182261f..3324357c1 100644 --- a/packages/components/stepper/docs/Index.zh.md +++ b/packages/components/stepper/docs/Index.zh.md @@ -37,26 +37,26 @@ subtitle: 步骤条 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@stepper-background` | `@background-color-component` | - | - | -| `@stepper-line-border` | `1px solid transparent` | - | - | +| `@stepper-line-border` | `1px solid transparent` | `1px dashed transparent` | - | | `@stepper-item-process-tail-color` | `@disabled-color` | - | - | | `@stepper-item-process-icon-color` | `@color-primary` | - | - | -| `@stepper-item-process-title-color` | `@text-color` | - | - | -| `@stepper-item-process-description-color` | `@text-color` | - | - | +| `@stepper-item-process-title-color` | `@text-color` | `@color-graphite-d40` | - | +| `@stepper-item-process-description-color` | `@text-color` | `@color-graphite` | - | | `@stepper-item-finish-tail-color` | `@color-primary` | - | - | | `@stepper-item-finish-icon-color` | `@color-primary` | - | - | -| `@stepper-item-finish-title-color` | `@text-color` | - | - | -| `@stepper-item-finish-description-color` | `@text-color-secondary` | - | - | +| `@stepper-item-finish-title-color` | `@text-color` | `@color-graphite-d40` | - | +| `@stepper-item-finish-description-color` | `@text-color-secondary` | `@color-graphite` | - | | `@stepper-item-wait-tail-color` | `@disabled-color` | - | - | | `@stepper-item-wait-icon-color` | `@disabled-color` | - | - | -| `@stepper-item-wait-title-color` | `@text-color-secondary` | - | - | -| `@stepper-item-wait-description-color` | `@text-color-secondary` | - | - | +| `@stepper-item-wait-title-color` | `@text-color-secondary` | `@color-graphite` | - | +| `@stepper-item-wait-description-color` | `@text-color-secondary` | `@color-graphite` | - | | `@stepper-item-error-tail-color` | `@stepper-item-wait-tail-color` | - | - | -| `@stepper-item-error-icon-color` | `@color-error` | - | - | -| `@stepper-item-error-title-color` | `@color-error` | - | - | -| `@stepper-item-error-description-color` | `@color-error` | - | - | +| `@stepper-item-error-icon-color` | `@color-error` | `@color-error-d10` | - | +| `@stepper-item-error-title-color` | `@color-error` | `@text-color` | - | +| `@stepper-item-error-description-color` | `@color-error` | `@text-color` | - | | `@stepper-item-spacing-md` | `@spacing-lg` | - | - | | `@stepper-item-icon-size-md` | `32px` | - | - | | `@stepper-item-icon-font-size-md` | `@font-size-lg` | - | - | diff --git a/packages/components/switch/docs/Index.zh.md b/packages/components/switch/docs/Index.zh.md index 632a5d22f..c7a7a5689 100644 --- a/packages/components/switch/docs/Index.zh.md +++ b/packages/components/switch/docs/Index.zh.md @@ -35,7 +35,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@switch-font-size` | `@form-font-size-xs` | - | - | | `@switch-line-height` | `@form-line-height` | - | - | @@ -47,7 +47,7 @@ order: 0 | `@switch-padding-horizontal-lg` | `@form-padding-horizontal-lg` | - | - | | `@switch-border-radius` | `@border-radius-full` | - | - | | `@switch-color` | `@form-background-color` | - | - | -| `@switch-background-color` | `@form-placeholder-color` | - | - | +| `@switch-background-color` | `@form-placeholder-color` | `@color-graphite-l10` | - | | `@switch-active-color` | `@form-active-color` | - | - | | `@switch-active-disabled-color` | `@color-primary-l30` | - | - | | `@switch-disabled-color` | `@color-graphite-l30` | - | - | diff --git a/packages/components/table/docs/Index.zh.md b/packages/components/table/docs/Index.zh.md index 9f8bc2e02..ebefb3d8d 100644 --- a/packages/components/table/docs/Index.zh.md +++ b/packages/components/table/docs/Index.zh.md @@ -200,47 +200,47 @@ export type TablePaginationPosition = 'topStart' | 'top' | 'topEnd' | 'bottomSta ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@table-color` | `@text-color` | - | - | -| `@table-head-line-height` | `@line-height-base` | - | - | -| `@table-body-line-height` | `@line-height-base` | - | - | -| `@table-head-height-lg` | `@height-xxl` | - | - | -| `@table-head-height-md` | `@height-xl` | - | - | -| `@table-head-height-sm` | `@height-md` | - | - | +| `@table-head-line-height` | `@line-height-base` | `1` | - | +| `@table-body-line-height` | `@line-height-base` | `1.084` | - | +| `@table-head-height-lg` | `@height-xxl` | `@height-lg` | - | +| `@table-head-height-md` | `@height-xl` | `@height-md` | - | +| `@table-head-height-sm` | `@height-md` | `@height-sm` | - | | `@table-padding-top-lg` | `@spacing-lg` | - | - | | `@table-padding-bottom-lg` | `@spacing-lg` | - | - | | `@table-padding-left-lg` | `@spacing-lg` | - | - | -| `@table-padding-right-lg` | `@spacing-lg` | - | - | +| `@table-padding-right-lg` | `@spacing-lg` | `4px` | - | | `@table-padding-top-md` | `@spacing-md` | - | - | | `@table-padding-bottom-md` | `@spacing-md` | - | - | | `@table-padding-left-md` | `@spacing-md` | - | - | -| `@table-padding-right-md` | `@spacing-md` | - | - | +| `@table-padding-right-md` | `@spacing-md` | `4px` | - | | `@table-padding-top-sm` | `@spacing-sm` | - | - | | `@table-padding-bottom-sm` | `@spacing-sm` | - | - | | `@table-padding-left-sm` | `@spacing-sm` | - | - | -| `@table-padding-right-sm` | `@spacing-sm` | - | - | -| `@table-font-size-lg` | `@font-size-lg` | - | - | -| `@table-font-size-md` | `@font-size-md` | - | - | +| `@table-padding-right-sm` | `@spacing-sm` | `4px` | - | +| `@table-font-size-lg` | `@font-size-lg` | `@font-size-md` | - | +| `@table-font-size-md` | `@font-size-md` | `@font-size-sm` | - | | `@table-font-size-sm` | `@font-size-sm` | - | - | | `@table-border-width` | `@border-width-sm` | - | - | -| `@table-border-style` | `@border-style` | - | - | -| `@table-border-color` | `@border-color-split` | - | - | +| `@table-border-style` | `@border-style` | `@border-style` | - | +| `@table-border-color` | `@border-color-split` | `@color-graphite-l30` | - | | `@table-background-color` | `@background-color-component` | - | - | | `@table-border-radius` | `@border-radius-sm` | - | - | -| `@table-head-background-color` | `@background-color-light` | - | - | -| `@table-head-color` | `@color-black` | - | - | +| `@table-head-background-color` | `@background-color-light` | `@color-graphite-l50` | - | +| `@table-head-color` | `@color-black` | `@color-graphite-d20` | - | | `@table-head-split-height` | `16px` | - | - | | `@table-head-split-color` | `rgba(0, 0, 0, 0.06)` | - | - | -| `@table-head-icon-color` | `@color-black` | - | - | +| `@table-head-icon-color` | `@color-black` | `@color-graphite-l10` | - | | `@table-head-icon-active-color` | `@color-primary` | - | - | | `@table-head-icon-hover-background-color` | `@color-graphite-l40` | - | - | -| `@table-head-font-weight` | `@font-weight-lg` | - | - | -| `@table-body-hover-background` | `@background-color-light` | - | - | +| `@table-head-font-weight` | `@font-weight-lg` | `@font-weight-md` | - | +| `@table-body-hover-background` | `@background-color-light` | `@color-graphite-l50` | - | | `@table-pagination-margin` | `@spacing-lg 0` | - | - | | `@table-icon-margin` | `@spacing-xs` | - | - | | `@table-expandable-icon-size` | `@font-size-md` | - | - | -| `@table-expandable-icon-color` | `@color-black` | - | - | +| `@table-expandable-icon-color` | `@color-black` | `@color-graphite` | - | | `@table-sticky-scroll-bar-background` | `fade(#000, 35%)` | - | - | | `@table-sticky-scroll-bar-radius` | `4px` | - | - | \ No newline at end of file diff --git a/packages/components/tabs/docs/Index.zh.md b/packages/components/tabs/docs/Index.zh.md index 927ed4e1d..b0dd9ec32 100644 --- a/packages/components/tabs/docs/Index.zh.md +++ b/packages/components/tabs/docs/Index.zh.md @@ -37,7 +37,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@tabs-selected-color` | `@color-primary` | - | - | | `@tabs-hover-color` | `@color-primary-l10` | - | - | diff --git a/packages/components/tag/docs/Index.zh.md b/packages/components/tag/docs/Index.zh.md index a57f4e55c..d01a8eebc 100644 --- a/packages/components/tag/docs/Index.zh.md +++ b/packages/components/tag/docs/Index.zh.md @@ -46,10 +46,10 @@ export interface TagData extends Omit { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | -| `@tag-font-size` | `@font-size-md` | - | - | -| `@tag-line-height` | `@line-height-base` | - | - | +| `@tag-font-size` | `@font-size-md` | `@font-size-sm` | - | +| `@tag-line-height` | `@line-height-base` | `1.3333` | - | | `@tag-rect-min-width` | `40px` | - | - | | `@tag-round-min-width` | `52px` | - | - | | `@tag-numeric-min-width` | `64px` | - | - | diff --git a/packages/components/textarea/docs/Index.zh.md b/packages/components/textarea/docs/Index.zh.md index ce0c8f46d..641337355 100644 --- a/packages/components/textarea/docs/Index.zh.md +++ b/packages/components/textarea/docs/Index.zh.md @@ -32,7 +32,7 @@ subtitle: 文本域 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@textarea-font-size-sm` | `@form-font-size-sm` | - | - | | `@textarea-font-size-md` | `@form-font-size-md` | - | - | @@ -47,7 +47,7 @@ subtitle: 文本域 | `@textarea-border-width` | `@form-border-width` | - | - | | `@textarea-border-style` | `@form-border-style` | - | - | | `@textarea-border-color` | `@form-border-color` | - | - | -| `@textarea-border-radius` | `@border-radius-md` | - | - | +| `@textarea-border-radius` | `@border-radius-md` | `@border-radius-sm` | - | | `@textarea-color` | `@form-color` | - | - | | `@textarea-color-secondary` | `@form-color-secondary` | - | - | | `@textarea-background-color` | `@form-background-color` | - | - | diff --git a/packages/components/time-picker/docs/Index.zh.md b/packages/components/time-picker/docs/Index.zh.md index 07ad11f73..183c4a88b 100644 --- a/packages/components/time-picker/docs/Index.zh.md +++ b/packages/components/time-picker/docs/Index.zh.md @@ -78,7 +78,7 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@time-picker-font-size-sm` | `@form-font-size-sm` | - | - | | `@time-picker-font-size-md` | `@form-font-size-md` | - | - | @@ -95,36 +95,34 @@ order: 0 | `@time-picker-padding-vertical-lg` | `@form-padding-vertical-lg` | - | - | | `@time-picker-border-width` | `@form-border-width` | - | - | | `@time-picker-border-style` | `@form-border-style` | - | - | -| `@time-picker-border-color` | `@form-border-color` | - | - | +| `@time-picker-border-color` | `@form-border-color` | `@color-graphite-l30` | - | | `@time-picker-border-radius` | `@border-radius-sm` | - | - | | `@time-picker-color` | `@form-color` | - | - | | `@time-picker-disabled-color` | `@form-disabled-color` | - | - | | `@time-picker-overlay-width` | `200px` | - | - | | `@time-picker-overlay-padding` | `@spacing-sm` | - | - | | `@time-picker-overlay-box-shadow` | `@shadow-bottom-md` | - | - | -| `@time-picker-overlay-font-size` | `@font-size-md` | - | - | +| `@time-picker-overlay-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@time-picker-overlay-background-color` | `@form-background-color` | - | - | | `@time-picker-footer-padding` | `@spacing-sm 0` | - | - | | `@time-picker-footer-margin` | `0 @spacing-lg` | - | - | | `@time-range-picker-overlay-padding` | `@spacing-lg` | - | - | | `@time-range-picker-trigger-separator-margin` | `@spacing-xl` | - | - | | `@time-range-picker-overlay-side-width` | `184px` | - | - | -| `@time-range-picker-overlay-gap-padding` | `5px 8px` | - | - | +| `@time-range-picker-overlay-gap-padding` | `5px 8px` | `2px 8px` | - | | `@time-range-picker-panel-border-width` | `@time-picker-border-width` | - | - | | `@time-range-picker-panel-border-style` | `@time-picker-border-style` | - | - | | `@time-range-picker-panel-border-color` | `@time-picker-border-color` | - | - | | `@time-range-picker-panel-border-radius` | `@time-picker-border-radius` | - | - | | `@time-picker-input-margin` | `@spacing-sm` | - | - | -| `@time-picker-color` | `@form-color` | - | - | | `@time-picker-color-secondary` | `@form-color-secondary` | - | - | | `@time-picker-background-color` | `@form-background-color` | - | - | | `@time-picker-placeholder-color` | `@form-placeholder-color` | - | - | | `@time-picker-hover-color` | `@form-hover-color` | - | - | | `@time-picker-active-color` | `@form-active-color` | - | - | | `@time-picker-active-box-shadow` | `@form-active-box-shadow` | - | - | -| `@time-picker-disabled-color` | `@form-disabled-color` | - | - | | `@time-picker-disabled-background-color` | `@form-disabled-background-color` | - | - | -| `@time-picker-icon-font-size` | `@font-size-sm` | - | - | +| `@time-picker-icon-font-size` | `@font-size-sm` | `@font-size-lg` | - | | `@time-picker-icon-margin-left` | `@spacing-xs` | - | - | | `@time-picker-icon-margin-right` | `@spacing-xs` | - | - | | `@time-picker-icon-color` | `@time-picker-placeholder-color` | - | - | diff --git a/packages/components/timeline/docs/Index.zh.md b/packages/components/timeline/docs/Index.zh.md index 231d1d7df..edf725fb1 100644 --- a/packages/components/timeline/docs/Index.zh.md +++ b/packages/components/timeline/docs/Index.zh.md @@ -56,7 +56,7 @@ export const statusColors = ['primary', 'info', 'pending', 'success', 'warning', ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@timeline-font-size` | `@font-size-sm` | - | - | | `@timeline-line-height` | `1.25` | - | - | diff --git a/packages/components/tooltip/docs/Index.zh.md b/packages/components/tooltip/docs/Index.zh.md index 8660b0063..3a8e9167b 100644 --- a/packages/components/tooltip/docs/Index.zh.md +++ b/packages/components/tooltip/docs/Index.zh.md @@ -32,16 +32,16 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@tooltip-zindex` | `@zindex-l4-5` | - | - | -| `@tooltip-font-size` | `@font-size-md` | - | - | -| `@tooltip-color` | `@color-white` | - | - | -| `@tooltip-background-color` | `@color-grey-d30` | - | - | +| `@tooltip-font-size` | `@font-size-md` | `@font-size-sm` | - | +| `@tooltip-color` | `@color-white` | `@color-graphite-d10` | - | +| `@tooltip-background-color` | `@color-grey-d30` | `@background-color-component` | - | | `@tooltip-border-radius` | `@border-radius-sm` | - | - | | `@tooltip-box-shadow` | `@shadow-bottom-md` | - | - | | `@tooltip-wrapper-max-width` | `400px` | - | - | | `@tooltip-wrapper-min-width` | `24px` | - | - | -| `@tooltip-wrapper-min-height` | `@height-md` | - | - | +| `@tooltip-wrapper-min-height` | `@height-md` | `@height-xs` | - | | `@tooltip-wrapper-padding` | `@spacing-xs @spacing-sm` | - | - | \ No newline at end of file diff --git a/packages/components/transfer/docs/Index.zh.md b/packages/components/transfer/docs/Index.zh.md index 07db31466..c4e18600d 100644 --- a/packages/components/transfer/docs/Index.zh.md +++ b/packages/components/transfer/docs/Index.zh.md @@ -181,14 +181,14 @@ export interface TransferOperationsSlotParams { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@transfer-list-width` | `260px` | - | - | | `@transfer-list-height` | `290px` | - | - | -| `@transfer-list-border-color` | `@form-border-color` | - | - | +| `@transfer-list-border-color` | `@form-border-color` | `@color-graphite-l30` | - | | `@transfer-list-border-radius` | `2px` | - | - | | `@transfer-list-background-color` | `@form-background-color` | - | - | -| `@transfer-font-size` | `@font-size-md` | - | - | +| `@transfer-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@transfer-color` | `@text-color` | - | - | | `@transfer-disabled-color` | `@text-color-disabled` | - | - | | `@transfer-list-header-height` | `@height-lg` | - | - | diff --git a/packages/components/tree-select/docs/Index.zh.md b/packages/components/tree-select/docs/Index.zh.md index e12d59649..7b008f5f2 100644 --- a/packages/components/tree-select/docs/Index.zh.md +++ b/packages/components/tree-select/docs/Index.zh.md @@ -112,9 +112,9 @@ order: 0 ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | -| `@tree-select-option-font-size` | `@font-size-md` | - | - | +| `@tree-select-option-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@tree-select-option-height` | `@height-md` | - | - | | `@tree-select-option-margin-left` | `@spacing-md` | - | - | | `@tree-select-option-padding` | `@spacing-sm` | - | - | @@ -125,8 +125,9 @@ order: 0 | `@tree-select-option-selected-background-color` | `tint(@color-primary, 90%)` | - | - | | `@tree-select-option-selected-font-weight` | `@font-weight-xl` | - | - | | `@tree-select-option-container-zindex` | `@zindex-l4-3` | - | - | -| `@tree-select-option-container-padding` | `@spacing-sm` | - | - | +| `@tree-select-option-container-padding` | `@spacing-sm` | `8px 12px` | - | | `@tree-select-option-container-background-color` | `@background-color-component` | - | - | | `@tree-select-option-container-border-radius` | `@border-radius-sm` | - | - | | `@tree-select-option-container-box-shadow` | `@shadow-bottom-md` | - | - | +| `@tree-select-border-radius` | - | `@border-radius-sm` | - | diff --git a/packages/components/tree/docs/Index.zh.md b/packages/components/tree/docs/Index.zh.md index 53ddb92c5..6bfa4fe84 100644 --- a/packages/components/tree/docs/Index.zh.md +++ b/packages/components/tree/docs/Index.zh.md @@ -112,25 +112,25 @@ export type TreeDropType = 'before' | 'inside' | 'after' ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@tree-node-prefix` | `~'@{tree-prefix}-node'` | - | - | -| `@tree-font-size` | `@font-size-md` | - | - | +| `@tree-font-size` | `@font-size-md` | `@font-size-sm` | - | | `@tree-icon-font-size` | `@font-size-lg` | - | - | | `@tree-icon-color` | `@color-graphite-d20` | - | - | | `@tree-background-color` | `@background-color-component` | - | - | | `@tree-background-color-focused` | `@background-color-selected-light` | - | - | | `@tree-box-shadow-size` | `2px` | - | - | | `@tree-box-shadow-color` | `@color-primary-l20` | - | - | -| `@tree-node-disabled-color` | `@text-color-disabled` | - | - | +| `@tree-node-disabled-color` | `@text-color-disabled` | `@color-graphite-d10` | - | | `@tree-node-hover-background-color` | `@color-graphite-l50` | - | - | -| `@tree-node-selected-color` | `@color-graphite-d40` | - | - | -| `@tree-node-selected-background-color` | `@color-graphite-l40` | - | - | +| `@tree-node-selected-color` | `@color-graphite-d40` | `@color-primary` | - | +| `@tree-node-selected-background-color` | `@color-graphite-l40` | `@color-white` | - | | `@tree-node-line-width` | `1px` | - | - | | `@tree-node-line-border` | `1px dashed @color-graphite` | - | - | -| `@tree-node-padding-vertical` | `(@spacing-sm / 2)` | - | - | +| `@tree-node-padding-vertical` | `(@spacing-sm / 2)` | `0` | - | | `@tree-node-checkbox-margin` | `0 @spacing-xs 0 @spacing-xs` | - | - | -| `@tree-node-content-height` | `@height-sm` | - | - | +| `@tree-node-content-height` | `@height-sm` | `@height-md` | - | | `@tree-node-content-label-padding` | `0 @spacing-xs` | - | - | | `@tree-node-content-label-highlight-color` | `@color-primary` | - | - | | `@tree-expand-icon-color` | `@color-graphite` | - | - | diff --git a/packages/components/typography/docs/Index.zh.md b/packages/components/typography/docs/Index.zh.md index c68468081..aab9c1658 100644 --- a/packages/components/typography/docs/Index.zh.md +++ b/packages/components/typography/docs/Index.zh.md @@ -23,7 +23,7 @@ type TypographyConfig = TypographyType | TypographyOptions ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@typography-default-color` | `@text-color` | - | - | | `@typography-color-secondary` | `@text-color-secondary` | - | - | diff --git a/packages/components/upload/docs/Index.zh.md b/packages/components/upload/docs/Index.zh.md index b72401544..9f0123bf9 100644 --- a/packages/components/upload/docs/Index.zh.md +++ b/packages/components/upload/docs/Index.zh.md @@ -96,7 +96,7 @@ interface UploadRequestChangeOption { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@upload-list-margin` | `8px 0 0` | - | - | | `@upload-border-radius` | `2px` | - | - | @@ -122,7 +122,7 @@ interface UploadRequestChangeOption { | `@upload-file-font-size` | `@font-size-sm` | - | - | | `@upload-icon-wrap-max-width` | `120px` | - | - | | `@upload-icon-margin` | `0 0 0 16px` | - | - | -| `@upload-icon-file-margin` | `0 8px 0 0` | - | - | +| `@upload-icon-file-margin` | `0 8px 0 0` | `2px 8px 0 0` | - | | `@upload-icon-font-size` | `@font-size-lg` | - | - | | `@upload-tip-margin` | `8px 0 0` | - | - | | `@upload-color-error` | `@color-red-d10` | - | - | diff --git a/packages/pro/layout/docs/Index.zh.md b/packages/pro/layout/docs/Index.zh.md index 7b229bdc0..83feaebd2 100644 --- a/packages/pro/layout/docs/Index.zh.md +++ b/packages/pro/layout/docs/Index.zh.md @@ -60,7 +60,7 @@ interface SiderHover { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@pro-layout-height` | `100%` | - | - | | `@pro-layout-header-light-color` | `@text-color` | - | - | @@ -81,13 +81,13 @@ interface SiderHover { | `@pro-layout-header-dark-active-box-shadow` | `inset 0 2px 0 0 @color-primary` | - | - | | `@pro-layout-header-dark-active-background-color` | `@color-graphite-d30` | - | - | | `@pro-layout-header-dark-box-shadow` | `none` | - | - | -| `@pro-layout-header-height` | `@layout-header-height` | - | - | +| `@pro-layout-header-height` | `@layout-header-height` | `44px` | - | | `@pro-layout-header-menu-item-line-height` | `@pro-layout-header-height - 2` | - | - | -| `@pro-layout-header-logo-width` | `@pro-layout-sider-width - 24px` | - | - | +| `@pro-layout-header-logo-width` | `@pro-layout-sider-width - 24px` | `@pro-layout-sider-width - 16px` | - | | `@pro-layout-header-extra-width` | `256px` | - | - | -| `@pro-layout-header-item-radius` | `24px` | - | - | -| `@pro-layout-header-item-margin` | `0 @spacing-xs` | - | - | -| `@pro-layout-header-item-padding` | `0 @spacing-md` | - | - | +| `@pro-layout-header-item-radius` | `24px` | `0` | - | +| `@pro-layout-header-item-margin` | `0 @spacing-xs` | `0` | - | +| `@pro-layout-header-item-padding` | `0 @spacing-md` | `0 20px` | - | | `@pro-layout-header-vertical-menu-item-font-size` | `@font-size-sm` | - | - | | `@pro-layout-header-vertical-menu-item-height` | `32px` | - | - | | `@pro-layout-header-vertical-menu-item-line-height` | `32px` | - | - | diff --git a/packages/pro/transfer/docs/Index.zh.md b/packages/pro/transfer/docs/Index.zh.md index 2d4846cb9..117318d26 100644 --- a/packages/pro/transfer/docs/Index.zh.md +++ b/packages/pro/transfer/docs/Index.zh.md @@ -113,7 +113,7 @@ export interface ProTransferTreeProps { ## 主题变量 -| 名称 | `default` | `dark` | 备注 | +| 名称 | default | seer | 备注 | | --- | --- | --- | --- | | `@pro-transfer-list-min-width` | `260px` | - | - | | `@pro-transfer-list-min-height` | `290px` | - | - | diff --git a/scripts/gen/style-variable/config.ts b/scripts/gen/style-variable/config.ts index 4e2c89b4a..cb05d298f 100644 --- a/scripts/gen/style-variable/config.ts +++ b/scripts/gen/style-variable/config.ts @@ -1,11 +1,17 @@ -interface UpdateStyleVariableConfig { +import type { Pattern } from 'fast-glob' + +export interface UpdateStyleVariableConfig { dirs: string[] - includes: string[] - excludes: string[] + targetDocs: string + sourcePattern: Pattern + includes?: string[] + excludes?: string[] } export default { dirs: ['components', 'pro'], + targetDocs: 'docs/Index.zh.md', + sourcePattern: 'style/themes/*.variable.less', excludes: [ 'components/_private', 'components/config', diff --git a/scripts/gen/style-variable/update.ts b/scripts/gen/style-variable/update.ts index c107f5c39..1a608f201 100644 --- a/scripts/gen/style-variable/update.ts +++ b/scripts/gen/style-variable/update.ts @@ -1,5 +1,9 @@ +import type { UpdateStyleVariableConfig } from './config' +import type { Pattern } from 'fast-glob' + import { join } from 'path' +import fg from 'fast-glob' import { appendFile, lstatSync, readFile, readdir, writeFile } from 'fs-extra' import config from './config' @@ -8,78 +12,114 @@ const packageRoot = join(__dirname, '../../../packages') const insertBeginFlag = `` const insertEndFlag = `` -async function update() { - for (const dir of config.dirs ?? []) { - const curDirPath = join(packageRoot, dir) - const components = await readdir(curDirPath) - const requiredUpdate = components.filter(component => isRequired(dir, component, curDirPath)) - for (const component of requiredUpdate) { - const lessVariable = await readFile(getComponentStylePath(curDirPath, component), 'utf-8') - const template = getDocsTemplate(file2Array(lessVariable)) - appendVariable(getComponentDocsPath(curDirPath, component), template) +class UpdateStyleVariable { + public async start(config: UpdateStyleVariableConfig) { + for (const dir of config.dirs ?? []) { + const curDirPath = join(packageRoot, dir) + const components = await readdir(curDirPath) + const requiredUpdate = components.filter(component => this.isRequired(dir, component, curDirPath, config)) + for (const component of requiredUpdate) { + const themeFiles = await this.getComponentStylePath(curDirPath, component, config.sourcePattern) + const lessVariables = await this.getLessVariable(themeFiles) + const themes = themeFiles.map(themeFile => this.getTheme(themeFile)) + const template = this.getDocsTemplate(lessVariables, themes) + this.appendVariable(this.getComponentDocsPath(curDirPath, component, config.targetDocs), template) + } } } -} -function isRequired(dir: string, component: string, curDirPath: string) { - const curComponentName = `${dir}/${component}` - if (!lstatSync(join(curDirPath, component)).isDirectory()) { - return false - } - if ((config.includes ?? []).length > 0) { - return (config.includes ?? []).includes(curComponentName) + private async getLessVariable(themeFiles: string[]) { + return await Promise.all(themeFiles.map(themeFile => readFile(themeFile, 'utf-8'))).then(fileContents => + fileContents.reduce((acc, fileContent, index) => { + const curTheme = this.getTheme(themeFiles?.[index]) + if (!curTheme) { + console.warn('Invalid file naming about variable less') + return acc + } + const obj = this.file2Obj(fileContent) + for (const objKey in obj) { + acc[objKey] = acc[objKey] ? { ...acc[objKey], [curTheme]: obj[objKey] } : { [curTheme]: obj[objKey] } + } + return acc + }, {} as Record>), + ) } - if ((config.excludes ?? []).length > 0) { - return !(config.excludes ?? []).includes(curComponentName) - } - return true -} -function getComponentStylePath(dir: string, component: string) { - return join(dir, component, 'style/themes/default.variable.less') -} + private getTheme(themeFile: string) { + return themeFile.match(/.*\/(.*)\.variable.less$/)?.[1] + } -function getComponentDocsPath(dir: string, component: string) { - return join(dir, component, 'docs/Index.zh.md') -} + private isRequired(dir: string, component: string, curDirPath: string, config: UpdateStyleVariableConfig) { + const curComponentName = `${dir}/${component}` + if (!lstatSync(join(curDirPath, component)).isDirectory()) { + return false + } + if ((config.includes ?? []).length > 0) { + return (config.includes ?? []).includes(curComponentName) + } + if ((config.excludes ?? []).length > 0) { + return !(config.excludes ?? []).includes(curComponentName) + } + return true + } -/* eslint-disable */ -function getDocsTemplate(variables: string[][]) { - const existVariables = variables.filter(variable => variable[0] && variable[1]) + private async getComponentStylePath(dir: string, component: string, sourcePattern: Pattern) { + const variablesPath = await fg(sourcePattern, { cwd: join(dir, component) }) + return variablesPath.map(variablePath => join(dir, component, variablePath)) + } - if (existVariables.length === 0) { - return '' + private getComponentDocsPath(dir: string, component: string, targetDocs: string) { + return join(dir, component, targetDocs) } - return `${insertBeginFlag} + /* eslint-disable */ + private getDocsTemplate(variables: Record>, themes: (string | undefined)[]) { + const variablesEntries = Object.entries(variables).filter( + variable => variable[0] && Object.values(variable[1]).some(item => item), + ) + const exitThemes = themes.filter(theme => theme) as string[] + if (Object.keys(variablesEntries).length === 0) { + return '' + } + + return `${insertBeginFlag} ## 主题变量 -| 名称 | \`default\` | \`dark\` | 备注 | +| 名称 | ${exitThemes.join(' | ')} | 备注 | | --- | --- | --- | --- | -${existVariables - .map( - variable => `| \`${variable[0]}\` | \`${variable[1]}\` | - | - | -`, - ) +${variablesEntries + .map(variable => { + const themeValue = exitThemes + .map(theme => { + const value = variable[1][theme] + return value ? `\`${value}\`` : '-' + }) + .join(' | ') + return `| \`${variable[0]}\` | ${themeValue} | - | +` + }) .join('')}${insertEndFlag}` -} -/* eslint-enable */ + } + /* eslint-enable */ -function file2Array(fileContent: string) { - return fileContent - .replace(/\/\*(.|\s)*\*\/|\/\/.*/g, '') // 去除注释 - .split(/;\s*/) - .map(attr => attr.split(/:\s*/).map(item => item.replace(/(^\s*|\s*$|\n|`)/g, ''))) // 去除首尾空格和中间换行 -} + private file2Obj(fileContent: string) { + return fileContent + .replace(/\/\*(.|\s)*\*\/|\/\/.*/g, '') // 去除注释 + .split(/;\s*/) + .map(attr => attr.split(/:\s*/).map(item => item.replace(/(^\s*|\s*$|\n|`)/g, ''))) // 去除首尾空格和中间换行 + .reduce((acc, item) => ({ ...acc, [item[0]]: item[1] }), {} as Record) + } -async function appendVariable(target: string, template: string) { - let targetContent = await readFile(target, 'utf-8') - if (targetContent.includes(insertBeginFlag)) { - targetContent = targetContent.replace(new RegExp(`${insertBeginFlag}(.|\\s)*?${insertEndFlag}`), template) // 匹配原有的内容进行替换 - writeFile(target, targetContent, 'utf-8') - } else { - template.trim() && appendFile(target, `\n${template}`) + private async appendVariable(target: string, template: string) { + let targetContent = await readFile(target, 'utf-8') + if (targetContent.includes(insertBeginFlag)) { + targetContent = targetContent.replace(new RegExp(`${insertBeginFlag}(.|\\s)*?${insertEndFlag}`), template) // 匹配原有的内容进行替换 + writeFile(target, targetContent, 'utf-8') + } else { + template.trim() && appendFile(target, `\n${template}`) + } } } -update() +const updater = new UpdateStyleVariable() +updater.start(config).then(() => console.log('Update completed!'))