From d70958ee2e22255419e358424ff0a349b622936c Mon Sep 17 00:00:00 2001 From: WeilinerL <2207284210@qq.com> Date: Thu, 14 Mar 2024 15:48:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- docs/.vuepress/config.js | 2 +- docs/guide/changelog.md | 8 ++++++++ docs/guide/intro.md | 8 ++++---- docs/guide/theme.md | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c8f26d0..abdc845 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,6 @@ pnpm run example:dev ## 链接 -* [意见反馈]() -* [更新日志]() -* [联系我们]() +* [意见反馈](/issues) +* [更新日志](/blob/main/docs/guide/changelog.md) +* [联系我们](/blob/main/docs/guide/contact.md) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 56848b3..3727e80 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -23,7 +23,7 @@ module.exports = { nav: [ { text: 'Github', - link: '' + link: 'https://github.com/didi/mpx-cube-ui' } ], sidebar: sidebarConfig diff --git a/docs/guide/changelog.md b/docs/guide/changelog.md index 0b9aeb0..e13789c 100644 --- a/docs/guide/changelog.md +++ b/docs/guide/changelog.md @@ -1 +1,9 @@ ## 更新日志 + + + +### 1.0.10(2024.03.13) +#### mpx-cube-ui 项目开源 +- Initial commit([11019fb](https://github.com/didi/mpx-cube-ui/commit/11019fbfdece8ea0e76258fb11bd8fb557c1a190)) + + \ No newline at end of file diff --git a/docs/guide/intro.md b/docs/guide/intro.md index 61945ef..1088b2a 100644 --- a/docs/guide/intro.md +++ b/docs/guide/intro.md @@ -17,7 +17,7 @@ mpx-cube-ui 提供了灵活配置的主题定制能力。 mpx-cube-ui 在组件设计开发阶段对于表现层的结构和样式进行抽离,利用预编译器和 CSS 变量的能力,提供细粒度(颜色、字体、圆角、阴影等)的样式定制能力,你的项目可以按需使用主题的编译方案还是运行时方案来满足不同样式风格的业务场景开发。 -详见[主题与样式](http://localhost:8080/mpx-cube-ui/theme-passenger/guide/theme.html)章节。 +详见[主题与样式](/guide/theme.html)章节。 @@ -62,9 +62,9 @@ mpx-cube-ui 内置了文档示例一体化的能力。 ### 其他链接 -* 意见反馈 -* 更新日志 -* 联系我们 +* [意见反馈](https://github.com/didi/mpx-cube-ui/issues) +* [更新日志](/guide/changelog.html) +* [联系我们](/guide/contact.html) diff --git a/docs/guide/theme.md b/docs/guide/theme.md index 29ca4b7..3a99f35 100644 --- a/docs/guide/theme.md +++ b/docs/guide/theme.md @@ -4,7 +4,7 @@ ### 主题与样式 -mpx-cube-ui 在设计开发过程中对于表现层的结构和样式进行抽离,利用预编译器([stylus](https://stylus-lang.com/))和 [Css 变量](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties)的能力来提供细粒度的样式定制能力。你可以利用样式定制能力去搭建更加成体系的小程序主题样式来满足特定业务产品的开发。 +mpx-cube-ui 在设计开发过程中对于表现层的结构和样式进行抽离,利用预编译器([Stylus](https://stylus-lang.com/))和 [CSS 变量](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties)的能力来提供细粒度的样式定制能力。你可以利用样式定制能力去搭建更加成体系的小程序主题样式来满足特定业务产品的开发。 mpx-cube-ui 目前提供了一套默认的主题样式配置,具体见 todo: 主题样式配置位置。而在右方的模拟器当中你所看到的示例是使用了另外一份主题样式文件覆盖了默认样式配置而生成的,具体参见 todo: passenger 主题配置。 From 302ddaa82ba7ab114ef1ff9ef6c509737b146019 Mon Sep 17 00:00:00 2001 From: WeilinerL <2207284210@qq.com> Date: Thu, 14 Mar 2024 15:52:16 +0800 Subject: [PATCH 2/6] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index abdc845..63f6a3e 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,6 @@ pnpm run example:dev ## 链接 -* [意见反馈](/issues) -* [更新日志](/blob/main/docs/guide/changelog.md) -* [联系我们](/blob/main/docs/guide/contact.md) +* [意见反馈](https://github.com/didi/mpx-cube-ui/issues) +* [更新日志](/docs/guide/changelog.md) +* [联系我们](/docs/guide/contact.md) From a4c7f82b8d2c8166d7ce5646a82261e831a8f9a3 Mon Sep 17 00:00:00 2001 From: xiaolei <1017653702@qq.com> Date: Thu, 14 Mar 2024 19:36:58 +0800 Subject: [PATCH 3/6] [chore]clear code --- example/themes/driver-variables.styl | 2 +- example/themes/driver/{var => }/color.styl | 0 example/themes/driver/components/button.styl | 11 --- .../driver/components/checkbox-modal.styl | 10 --- .../themes/driver/components/checkbox.styl | 51 ------------ example/themes/driver/components/dialog.styl | 81 ------------------- example/themes/driver/components/modal.styl | 15 ---- example/themes/driver/components/popup.styl | 1 - .../themes/driver/components/radio-modal.styl | 9 --- example/themes/driver/components/radio.styl | 37 --------- example/themes/driver/components/toast.styl | 25 ------ example/themes/driver/index.styl | 10 --- example/themes/helper.styl | 17 ---- example/themes/passenger-variables.styl | 1 - example/themes/passenger/{var => }/color.styl | 0 .../themes/passenger/components/button.styl | 41 ---------- .../passenger/components/checkbox-modal.styl | 10 --- .../themes/passenger/components/checkbox.styl | 71 ---------------- .../themes/passenger/components/dialog.styl | 70 ---------------- .../themes/passenger/components/modal.styl | 44 ---------- .../themes/passenger/components/popup.styl | 0 .../passenger/components/radio-modal.styl | 9 --- .../themes/passenger/components/radio.styl | 46 ----------- .../themes/passenger/components/toast.styl | 27 ------- example/themes/passenger/index.styl | 10 --- 25 files changed, 1 insertion(+), 597 deletions(-) rename example/themes/driver/{var => }/color.styl (100%) delete mode 100644 example/themes/driver/components/button.styl delete mode 100644 example/themes/driver/components/checkbox-modal.styl delete mode 100644 example/themes/driver/components/checkbox.styl delete mode 100644 example/themes/driver/components/dialog.styl delete mode 100644 example/themes/driver/components/modal.styl delete mode 100644 example/themes/driver/components/popup.styl delete mode 100644 example/themes/driver/components/radio-modal.styl delete mode 100644 example/themes/driver/components/radio.styl delete mode 100644 example/themes/driver/components/toast.styl delete mode 100644 example/themes/driver/index.styl delete mode 100644 example/themes/helper.styl rename example/themes/passenger/{var => }/color.styl (100%) delete mode 100644 example/themes/passenger/components/button.styl delete mode 100644 example/themes/passenger/components/checkbox-modal.styl delete mode 100644 example/themes/passenger/components/checkbox.styl delete mode 100644 example/themes/passenger/components/dialog.styl delete mode 100644 example/themes/passenger/components/modal.styl delete mode 100644 example/themes/passenger/components/popup.styl delete mode 100644 example/themes/passenger/components/radio-modal.styl delete mode 100644 example/themes/passenger/components/radio.styl delete mode 100644 example/themes/passenger/components/toast.styl delete mode 100644 example/themes/passenger/index.styl diff --git a/example/themes/driver-variables.styl b/example/themes/driver-variables.styl index 67c349f..319ebec 100644 --- a/example/themes/driver-variables.styl +++ b/example/themes/driver-variables.styl @@ -1,6 +1,6 @@ @require '~@mpxjs/mpx-cube-ui/src/common/stylus/theme/var/size.styl' @require '~@mpxjs/mpx-cube-ui/src/common/stylus/theme/var/color.styl' -@require './driver/var/color.styl' +@require './driver/color.styl' .theme-driver { // button diff --git a/example/themes/driver/var/color.styl b/example/themes/driver/color.styl similarity index 100% rename from example/themes/driver/var/color.styl rename to example/themes/driver/color.styl diff --git a/example/themes/driver/components/button.styl b/example/themes/driver/components/button.styl deleted file mode 100644 index bffd870..0000000 --- a/example/themes/driver/components/button.styl +++ /dev/null @@ -1,11 +0,0 @@ -// button -$btn-bgc = linear-gradient(-49deg, $color-default-blue-start 0%, $color-default-blue-end 100%) - -// btn-primary -$btn-primary-bgc = linear-gradient(-45deg, $color-primary-orange-start 0%, $color-primary-orange-end 100%) - -// btn-disabled -$btn-disabled-color = $color-white-opacity - -// btn-light(司机端目前 light 样式,暂时复用 primary 样式) -$btn-light-bgc = linear-gradient(-45deg, $color-primary-orange-start 0%, $color-primary-orange-end 100%) diff --git a/example/themes/driver/components/checkbox-modal.styl b/example/themes/driver/components/checkbox-modal.styl deleted file mode 100644 index 59936a0..0000000 --- a/example/themes/driver/components/checkbox-modal.styl +++ /dev/null @@ -1,10 +0,0 @@ -// @type body -$checkbox-modal-body-padding-right = 0 - $modal-body-padding-right - -// @type subtitle -$checkbox-modal-subtitle-padding-right = $modal-body-padding-right -$checkbox-modal-subtitle-color = #757575 - -// @type checkbox -$checkbox-modal-item-padding-right = $modal-body-padding-right -$checkbox-modal-item-border-color = #e1e2e6 diff --git a/example/themes/driver/components/checkbox.styl b/example/themes/driver/components/checkbox.styl deleted file mode 100644 index c8004b1..0000000 --- a/example/themes/driver/components/checkbox.styl +++ /dev/null @@ -1,51 +0,0 @@ -// checkbox-checked-color -$checkbox-checked-color = $color-primary - -// checkbox size -$checkbox-ui-round-width = 20px -$checkbox-ui-round-height = $checkbox-ui-round-width -$checkbox-ui-square-width = 18px -$checkbox-ui-square-height = $checkbox-ui-square-width -$checkbox-ui-width = $checkbox-ui-round-width -$checkbox-ui-height = $checkbox-ui-round-height -$checkbox-inner-ui-width = 7px -$checkbox-inner-ui-height = 4px - -// checkbox border -$checkbox-ui-round-border = 1px solid #C8C9CC -$checkbox-ui-square-border = 1px solid #C8C9CC -$checkbox-ui-round-border_disabled = 2px solid $color-disabled -$checkbox-ui-square-border_disabled = 1px solid $color-disabled -$checkbox-ui-round-border_checked = 2px solid $color-primary -$checkbox-ui-square-border_checked = none -$cube-checkbox-ui_checked = 2px solid $color-primary -$checkbox-inner-ui-border = 2px solid $color-primary - -// background -$checkbox-ui-round-bgc = #FAFAFA -$checkbox-ui-square-bgc = $color-primary -$checkbox-ui-round-bgc_disabled = $fill-bgc -$checkbox-ui-square-bgc_disabled = $fill-bgc -$checkbox-ui-round-bgc_checked = #FFF8F4 -$checkbox-ui-square-bgc_checked = $color-primary -$checkbox-ui-round-bgimg = url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzYgMzYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNmZjdlMzM7c3Ryb2tlLXdpZHRoOjQiIGQ9Im03LjUgMTUuMyA4LjMgOC4xTDI4LjUgMTEiLz48L3N2Zz4=') -$checkbox-ui-square-bgimg = url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcgMTcuMTc3IDIuNTA4LTEuMjYgNS43NjkgNC4zMjhMMjYuODggOWgzLjE5MUwxNi4yNDQgMjggNyAxNy4xNzdaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=') - -// radius -$checkbox-ui-square-radius = 4px -$checkbox-ui-round-radius = 50% - -// checkbox margin -$checkbox-label-mr_left = 10px -$checkbox-label-mr_right = 28px -$checkbox-ui-margin = 0 0 0 10px -$checkbox-ui-margin-right = 10px -$checkbox-ui-round-margin-right = 10px -$checkbox-ui-square-margin-right = 10px -$checkbox-margin-left = 10px - -// checkbox label padding -$checkbox-label-padding = 10px 0 - -// transition -$checkbox-inner-ui-transition = transform .2s diff --git a/example/themes/driver/components/dialog.styl b/example/themes/driver/components/dialog.styl deleted file mode 100644 index 01af47f..0000000 --- a/example/themes/driver/components/dialog.styl +++ /dev/null @@ -1,81 +0,0 @@ -vendors = official -// https://stylus-lang.com/docs/keyframes.html#expansion - -$dialog-container-width = 270px -$dialog-container-border-radius = 2px -$dialog-bgc = $color-white -$dialog-btn-secondary-highlight-active-bgc = rgba(252, 145, 83, .04) - -// icon -$dialog-icon-bgc = $color-background -$dialog-icon-container-margin-top = 20px -$dialog-icon-container-margin-bottom = 16px -$dialog-icon-container-width = 30px -$dialog-icon-container-height = 30px -$dialog-icon-container-padding = 10px -$dialog-icon-container-border-radius = 50% - -// title -$dialog-icon-next-title-margin-top = 0px -$dialog-title-default-margin-top = 25px -$dialog-title-default-margin-left = 16px -$dialog-title-default-margin-right = 16px -$dialog-title-default-margin-bottom = 0 -$dialog-title-color = $color-biz-dark-grey -$dialog-title-margin-top = 24px -$dialog-title-def-color = $color-dark-grey-s -$dialog-title-def-font-size = $font-size-3xl -$dialog-title-def-line-height = 25px - -// content -$dialog-icon-next-content-margin-top = -4px -$dialog-title-next-content-margin-top = 12px -$dialog-content-container-margin = 16px 0 -$dialog-content-container-line-height = 22px -$dialog-content-def-padding = 0 25px -$dialog-content-next-input-margin-top = 12px -$dialog-content-color = $color-dark-grey-s -$dialog-content-margin-top = 10px -$dialog-content-margin-bottom = 20px -$dialog-content-def-text-align = justify - -// button -$dialog-button-padding = 17px 10px -$dialog-btn-color = $color-primary -$dialog-btn-bgc = $color-white -$dialog-btn-active-bgc = $color-light-grey-opacity -$dialog-btn-highlight-color = $color-primary -$dialog-btn-highlight-active-bgc = $dialog-btn-secondary-highlight-active-bgc -$dialog-btn-disabled-color = $text-color-hint -$dialog-btn-disabled-active-bgc = transparent -$dialog-btns-split-color = $border-color-normal -$dialog-btn-line-height = 21px - - -// close -$dialog-close-width = 32px -$dialog-close-height = 32px -$dialog-close-color = $color-dark-grey - - -// head-icon -$dialog-head-icon-width = 85px -$dialog-head-icon-height = $dialog-head-icon-width -$dialog-head-icon-border-radius = 50% -$dialog-head-icon-margin-top = -42.5px - - -/* 司机侧 dialog 样式重写 */ -$dialog-btn-half-width = 50% -$dialog-btn-width = 100% - -// animation -$dialog-zoom-animation = dialog-zoom .3s ease-in-out - -@keyframes dialog-zoom - 0% - transform scale(0) - 50% - transform scale(1.1) - 100% - transform scale(1) diff --git a/example/themes/driver/components/modal.styl b/example/themes/driver/components/modal.styl deleted file mode 100644 index 8366b28..0000000 --- a/example/themes/driver/components/modal.styl +++ /dev/null @@ -1,15 +0,0 @@ -// @type modal-body -$modal-body-padding-right = 25px - -// @type modal-cancel -$modal-cancel-color = #323232 -$modal-cancel-border-bottom-color = #e1e2e6 - -// @type modal-title -$modal-title-color = #323232 - -// @type modal-cancel-icon -$modal-close-icon-color = #000000 - -// @type modal-content -$modal-content-color = #4b4b4d \ No newline at end of file diff --git a/example/themes/driver/components/popup.styl b/example/themes/driver/components/popup.styl deleted file mode 100644 index 5ecfcd5..0000000 --- a/example/themes/driver/components/popup.styl +++ /dev/null @@ -1 +0,0 @@ -// popup diff --git a/example/themes/driver/components/radio-modal.styl b/example/themes/driver/components/radio-modal.styl deleted file mode 100644 index 33ef99f..0000000 --- a/example/themes/driver/components/radio-modal.styl +++ /dev/null @@ -1,9 +0,0 @@ -// @type body -$radio-modal-body-padding-right = 0 - $modal-body-padding-right - -// @type subtitle -$radio-modal-subtitle-padding-right = $modal-body-padding-right - -// @type radio -$radio-modal-item-padding-right = $modal-body-padding-right -$radio-modal-item-bottom-border-color = #e1e2e6 \ No newline at end of file diff --git a/example/themes/driver/components/radio.styl b/example/themes/driver/components/radio.styl deleted file mode 100644 index b444b22..0000000 --- a/example/themes/driver/components/radio.styl +++ /dev/null @@ -1,37 +0,0 @@ -// radio background -$radio-inner-ui-bgc = $color-primary -$radio-ui-bgc = #fff -$radio-ui-bgc_disabled = $fill-bgc -$radio-ui-bgimg = none - -// radio size -$radio-ui-width = 18px -$radio-inner-ui-width = 10px -$radio-inner-ui-scale-size = 1 -$radio-ui-scale-size = 1 - -// radio border -$radio-ui-border_disabled = 1px solid $color-disabled -$radio-ui-border_checked = 1px solid $color-primary - -// radio margin -$radio-ui-margin = 0 0 0 10px -$radio-ui-margin-right = 10px -$radio-label-mr_left = 10px -$radio-label-mr_right = 28px - -// radio padding -$radio-label-padding = 10px 0 - -// tick -$radio-inner-ui-tick = tick-radio-passenger - -// transition -$radio-ui_checked-transition = none -$radio-ui-transform = none - -$radio-label-opacity_disabled = .3 -$radio-label-color_disabled = unset - -// transition -$radio-inner-ui-transition = transform .2s linear diff --git a/example/themes/driver/components/toast.styl b/example/themes/driver/components/toast.styl deleted file mode 100644 index 8c60797..0000000 --- a/example/themes/driver/components/toast.styl +++ /dev/null @@ -1,25 +0,0 @@ -$toast-dark-opacity-bgc := rgba(0, 0, 0, 0.8) - -// toast -$toast-z-index = 900 -$toast-color = $color-white -$toast-bgc = $toast-dark-opacity-bgc - -$toast-content-flex-direction = unset - -$toast-content-padding-v = 15px -$toast-content-padding-h = 13px -$toast-content-bdr = 7px - -$toast-icon-width = 24px -$toast-icon-height = 24px -$toast-icon-font-size = $font-size-3xl - -$toast-tip-line-height = 18px -$toast-tip-font-size = 15px -$toast-tip-margin-left = 6px -$toast-tip-margin-bottom = 0px -$toast-tip-max-width = 12em -$toast-tip-max-height = 40px - -$toast-tip-font-weight = unset diff --git a/example/themes/driver/index.styl b/example/themes/driver/index.styl deleted file mode 100644 index da0292f..0000000 --- a/example/themes/driver/index.styl +++ /dev/null @@ -1,10 +0,0 @@ -@require "./var/color.styl" -@require "./components/modal.styl" -@require "./components/radio-modal.styl" -@require "./components/checkbox-modal.styl" -@require "./components/button.styl" -@require "./components/toast.styl" -@require "./components/popup.styl" -@require "./components/dialog.styl" -@require "./components/radio.styl" -@require "./components/checkbox.styl" diff --git a/example/themes/helper.styl b/example/themes/helper.styl deleted file mode 100644 index d163353..0000000 --- a/example/themes/helper.styl +++ /dev/null @@ -1,17 +0,0 @@ - - -// cubeRule(s, v) -// --cube-{s} v - -// stylusRule(s, v) -// '$%s = %s' % (s, v) - -prefix = '$' - -$$var(s, v) - if runtime - --cube-{s} v - else - define(prefix + s, v) // 为什么没有生效? - - // s('--cube-%s: %s', $s, $v) diff --git a/example/themes/passenger-variables.styl b/example/themes/passenger-variables.styl index 6ec411f..a985a1c 100644 --- a/example/themes/passenger-variables.styl +++ b/example/themes/passenger-variables.styl @@ -1,6 +1,5 @@ @require '~@mpxjs/mpx-cube-ui/src/common/stylus/theme/var/size.styl' @require '~@mpxjs/mpx-cube-ui/src/common/stylus/theme/var/color.styl' -// @require './helper.styl' vendors = official // animation diff --git a/example/themes/passenger/var/color.styl b/example/themes/passenger/color.styl similarity index 100% rename from example/themes/passenger/var/color.styl rename to example/themes/passenger/color.styl diff --git a/example/themes/passenger/components/button.styl b/example/themes/passenger/components/button.styl deleted file mode 100644 index 85a7959..0000000 --- a/example/themes/passenger/components/button.styl +++ /dev/null @@ -1,41 +0,0 @@ -// button -$btn-color = $color-passenger-primary-blue -$btn-bgc = $color-passenger-default-blue-opacity-08 -$btn-border-color = $color-passenger-default-blue-opacity-08 -$btn-border-radius = 8px -$btn-opacity_active = 1 -$btn-bgc_active = $color-passenger-default-dark-blue -$btn-border-color_active = $color-passenger-default-blue-opacity-08 - -// btn-primary -$btn-primary-bgc = $color-passenger-primary-blue -$btn-primary-bgc_active = $color-passenger-primary-light-blue -$btn-primary-color_active = $color-white -$btn-primary-font-weight = bold - -// btn-light -$btn-light-color = $color-primary-orange_red -$btn-light-bgc = $color-light-orange_red -$btn-light-border-color = $color-light-orange_red -$btn-light-bgc_active = $color-light-dark-orange_red -$btn-light-font-weight = bold - -// btn-outline -$btn-outline-color = $color-passenger-primary-blue -$btn-outline-bgc = $color-white -$btn-outline-border-color = $color-passenger-primary-blue -$btn-outline-bgc_active = $color-passenger-light-grey -$btn-outline-border-color_active = $color-passenger-primary-blue -$btn-outline-font-weight = bold - -// btn-outline-primary -$btn-outline-primary-color = $color-primary-orange_red -$btn-outline-primary-bgc = $color-white -$btn-outline-primary-border-color = $color-primary-dark-orange_red -$btn-outline-primary-bgc_active = $color-light-dark-orange_red-s -$btn-outline-primary-active-bdc = $color-primary-dark-orange_red -$btn-outline-primary-active-color = $color-primary-orange_red - -// btn-disabled -$btn-disabled-color = $color-white -$btn-disabled-font-weight = bold diff --git a/example/themes/passenger/components/checkbox-modal.styl b/example/themes/passenger/components/checkbox-modal.styl deleted file mode 100644 index 9611d9e..0000000 --- a/example/themes/passenger/components/checkbox-modal.styl +++ /dev/null @@ -1,10 +0,0 @@ -// @type body -$checkbox-modal-body-padding-right = 0 - $modal-body-padding-right - -// @type subtitle -$checkbox-modal-subtitle-padding-right = $modal-body-padding-right -$checkbox-modal-subtitle-color = #757575 - -// @type checkbox -$checkbox-modal-item-padding-right = $modal-body-padding-right -$checkbox-modal-item-border-color = #EAEAEA diff --git a/example/themes/passenger/components/checkbox.styl b/example/themes/passenger/components/checkbox.styl deleted file mode 100644 index 03aa6bf..0000000 --- a/example/themes/passenger/components/checkbox.styl +++ /dev/null @@ -1,71 +0,0 @@ -// checkbox size -$checkbox-ui-round-width = 18px -$checkbox-ui-round-height = $checkbox-ui-round-width -$checkbox-ui-square-width = 18px -$checkbox-ui-square-height = $checkbox-ui-square-width -$checkbox-ui-width = $checkbox-ui-round-width -$checkbox-ui-height = $checkbox-ui-round-height -$checkbox-inner-ui-width = 7px -$checkbox-inner-ui-height = 4px - - -// checkbox border -$checkbox-ui-round-border_checked = none -$checkbox-ui-square-border_checked = none -$cube-checkbox-ui_checked = 2px solid $color-primary -$checkbox-inner-ui-border = 2px solid $color-white -$checkbox-ui-round-border = 1px solid rgba(0, 0, 0, .28) -$checkbox-ui-square-border = 1px solid rgba(0, 0, 0, .28) -$checkbox-ui-round-border_disabled = 1px solid $color-disabled -$checkbox-ui-square-border_disabled = 1px solid $color-disabled - -// checkbox margin -$checkbox-label-mr_left = 10px -$checkbox-label-mr_right = 28px -$checkbox-ui-margin = 0 0 0 10px -$checkbox-ui-margin-right = 10px -$checkbox-ui-round-margin-right = 10px -$checkbox-ui-square-margin-right = 10px -$checkbox-margin-left = 10px - -// background -$checkbox-ui-round-bgc = $color-white -$checkbox-ui-square-bgc = $color-white -$checkbox-ui-round-bgc_checked = #5B6B92 -$checkbox-ui-square-bgc_checked = #5B6B92 -$tick-passenger = url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzYgMzYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Ik0yMS45IDM1LjEgMTUgMjguM2MtLjctLjctLjctMS43IDAtMi40czEuOC0uNyAyLjQgMGw0LjUgNC40Yy40LjQgMS4xLjQgMS42IDBsOS4xLTljLjctLjcgMS44LS43IDIuNCAwIC43LjYuNyAxLjcgMCAyLjRMMjMuNSAzNS4xYy0uNS40LTEuMi40LTEuNiAweiIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6I2ZmZiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTcgLTEwKSIvPjwvc3ZnPg==') -$checkbox-ui-round-bgimg = $tick-passenger -$checkbox-ui-square-bgimg = $tick-passenger -$checkbox-ui-bg_disabled = linear-gradient( - to bottom right, - transparent 0%, - transparent calc(50% - 1px), - rgba(0, 0, 0, .28) 50%, - transparent calc(50% + 1px), - transparent 100% - ) -$checkbox-ui-bg-opacity = unset - -// radius -$checkbox-ui-square-radius = 5px -$checkbox-ui-round-radius = 50% - -// slash color -$checkbox-slash-color = rgba(0, 0, 0, .28) - -// tick -$checkbox-ui-square-url-name = tick-passenger -$checkbox-ui-round-url-name = tick-passenger - -// text & desc -$checkbox-text-desc-color_disabled = $color-disabled -$checkbox-desc-margin-top = 4px -$checkbox-text-font-size = 18px -$checkbox-desc-font-size = 12px -$checkbox-text-color = $text-color-desc -$checkbox-desc-color = #757575 -$checkbox-text-line-height = 1 -$checkbox-desc-line-height = 1.2 - -// transition -$checkbox-inner-ui-transition = none diff --git a/example/themes/passenger/components/dialog.styl b/example/themes/passenger/components/dialog.styl deleted file mode 100644 index 8c9ed69..0000000 --- a/example/themes/passenger/components/dialog.styl +++ /dev/null @@ -1,70 +0,0 @@ -vendors = official -// https://stylus-lang.com/docs/keyframes.html#expansion - -$dialog-container-width = 280px -$dialog-container-border-radius = 10px -$dialog-bgc = $color-white - -// icon -$dialog-icon-bgc = $color-background -$dialog-icon-container-margin-top = 20px -$dialog-icon-container-margin-bottom = 16px -$dialog-icon-container-width = 30px -$dialog-icon-container-height = 30px -$dialog-icon-container-padding = 10px -$dialog-icon-container-border-radius = 50% -$dialog-icon-line-height = 1 - -// title -$dialog-icon-next-title-margin-top = 0px -$dialog-title-default-margin = 30px 16px 0 -$dialog-title-color = $color-black -$dialog-title-margin-top = 24px -$dialog-title-font-size = $font-size-xl -$dialog-title-def-color = $color-black -$dialog-title-line-height = 1 - -// content -$dialog-icon-next-content-margin-top = -4px -$dialog-title-next-content-margin-top = 12px -$dialog-content-container-margin = 16px 0 -$dialog-content-container-line-height = 22px -$dialog-content-def-padding = 0 24px -$dialog-content-font-size = $font-size-sm -$dialog-content-color = $text-color-desc -$dialog-content-margin = 10px 0 20px 0 -$dialog-content-def-text-align = unset - -// button -$dialog-button-padding = 17px 10px -$dialog-btn-color = $color-bright-orange -$dialog-btn-bgc = $color-white -$dialog-btn-active-bgc = unset -$dialog-btn-highlight-color = $color-bright-orange -$dialog-btn-highlight-active-bgc = unset -$dialog-btn-disabled-color = $text-color-hint -$dialog-btn-disabled-active-bgc = transparent -$dialog-btns-split-color = $border-color-normal -$dialog-btn-line-height = 21px - -// close -$dialog-close-width = 32px -$dialog-close-height = 32px -$dialog-close-color = $text-color-hint - -// head-icon -$dialog-head-icon-width = 85px -$dialog-head-icon-height = $dialog-head-icon-width -$dialog-head-icon-border-radius = 50% -$dialog-head-icon-margin-top = -42.5px - -// animation -$dialog-zoom-animation = dialog-zoom .2s ease-in-out - -@keyframes dialog-zoom - 0% - transform scale(.9) - opacity 0 - 100% - transform scale(1) - opacity 1 diff --git a/example/themes/passenger/components/modal.styl b/example/themes/passenger/components/modal.styl deleted file mode 100644 index cce2cc1..0000000 --- a/example/themes/passenger/components/modal.styl +++ /dev/null @@ -1,44 +0,0 @@ -// @type modal-container -$modal-border-radius = 7px 7px 0 0 - -// @type modal-cancel -$modal-cancel-padding = 0 10px 0 10px -$modal-cancel-margin = 30px -$modal-cancel-height = 30px -$modal-cancel-line-height = 30px -$modal-cancel-font-weight = 400 -$modal-cancel-color = rgba(117, 117, 117, 1) -$modal-cancel-border-bottom-color = #EAEAEA - -// @type modal-body -$modal-body-padding-top = 0 -$modal-body-padding-right = 14px -$modal-body-padding-bottom = 0 -$modal-body-padding-left = 14px - -// @type modal-header -$modal-header-default-height = 30px - -// @type modal-title -$modal-title-margin-bottom = 10px -$modal-title-line-height = 1.45 -$modal-title-font-size = $font-size-2xl -$modal-title-color = $color-black - -// @type modal-close-icon -$modal-close-icon-top = 5px -$modal-close-icon-right = 5px -$modal-close-icon-padding = 5px -$modal-close-icon-color = $color-black - -// @type modal-content -$modal-content-line-height = 1.5 -$modal-content-font-size = $font-size-sm -$modal-content-color = rgba(68, 68, 68, 1) - -// @type modal-button-group -$modal-button-group-margin-top = 30px -$modal-button-font-size = $font-size-md - -// @type modal-footer -$modal-footer-padding = 0 14px 14px 14px \ No newline at end of file diff --git a/example/themes/passenger/components/popup.styl b/example/themes/passenger/components/popup.styl deleted file mode 100644 index e69de29..0000000 diff --git a/example/themes/passenger/components/radio-modal.styl b/example/themes/passenger/components/radio-modal.styl deleted file mode 100644 index f10b4f1..0000000 --- a/example/themes/passenger/components/radio-modal.styl +++ /dev/null @@ -1,9 +0,0 @@ -// @type body -$radio-modal-body-padding-right = 0 - $modal-body-padding-right - -// @type subtitle -$radio-modal-subtitle-padding-right = $modal-body-padding-right - -// @type radio -$radio-modal-item-padding-right = $modal-body-padding-right -$radio-modal-item-bottom-border-color = #EAEAEA \ No newline at end of file diff --git a/example/themes/passenger/components/radio.styl b/example/themes/passenger/components/radio.styl deleted file mode 100644 index d1301ef..0000000 --- a/example/themes/passenger/components/radio.styl +++ /dev/null @@ -1,46 +0,0 @@ -// radio background -$radio-inner-ui-bgc = $color-primary -$radio-ui-bgc = unset -$radio-ui-bgc_disabled = unset -$radio-ui-bgimg = url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzYgMzYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0yOTIzLjYgMTczNS4zLTEwLjYtMTAuOGMtMS4xLTEuMS0xLjEtMi45IDAtNHMyLjgtMS4xIDMuOSAwbDYuNyA2LjhjLjkuOSAyLjUgMSAzLjQgMGwxNC4yLTE0LjRjMS4xLTEuMSAyLjgtMS4xIDMuOSAwczEuMSAyLjkgMCAzLjlsLTE4LjEgMTguM2MtLjkgMS4xLTIuNSAxLjEtMy40LjJ6IiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojNWI2YjkyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjkxMSAtMTcwNikiLz48L3N2Zz4=') -$radio-ui-bgc-opacity = unset - -// radio size -$radio-ui-width = 18px -$radio-inner-ui-width = 10px -$radio-inner-ui-scale-size = 0 -$radio-ui-scale-size = 1 - -// radio border -$radio-ui-border = none -$radio-ui-border_disabled = none -$radio-ui-border_checked = none - -// radio margin -$radio-ui-margin = 0 0 0 10px -$radio-ui-margin-right = 10px -$radio-label-mr_left = 10px -$radio-label-mr_right = 28px - -// radio padding -$radio-label-padding = 10px 0 - -// tick -$radio-inner-ui-tick = tick-radio-passenger - -// transition -$radio-ui_checked-transition = none -$radio-ui-transform = scale(0) - -// text & desc -$radio-desc-margin-top = 4px -$radio-text-desc-color_disabled = $color-disabled -$radio-text-font-size = 16px -$radio-desc-font-size = 12px -$radio-text-color = $color-black -$radio-desc-color = #757575 -$radio-text-line-height = 1 -$radio-desc-line-height = 1.2 - -// transition -$radio-inner-ui-transition = none diff --git a/example/themes/passenger/components/toast.styl b/example/themes/passenger/components/toast.styl deleted file mode 100644 index ac7749f..0000000 --- a/example/themes/passenger/components/toast.styl +++ /dev/null @@ -1,27 +0,0 @@ -// toast -$toast-z-index = 900 -$toast-color = $color-white -$toast-bgc = $color-midnight-blue-opacity-9 - -$toast-content-direction = column - -$toast-content-padding = 30px 25px -$toast-content-border-radius = 8px - -$toast-icon-width = 30px -$toast-icon-height = $toast-icon-width -$toast-icon-font-size = $font-size-6xl -$toast-icon-line-height = 1 - -$toast-slot-icon-margin = 0 0 20px 0 -$toast-icon-margin-bottom = 20px - -$toast-tip-font-size = $font-size-sm -$toast-tip-line-height = 1.57 -$toast-tip-margin-left = 0px -$toast-tip-margin-bottom = 20px -$toast-tip-max-width = 10em -$toast-tip-max-height = 44px - -$toast-tip-font-weight = bold -$toast-tip-text-align = center diff --git a/example/themes/passenger/index.styl b/example/themes/passenger/index.styl deleted file mode 100644 index da0292f..0000000 --- a/example/themes/passenger/index.styl +++ /dev/null @@ -1,10 +0,0 @@ -@require "./var/color.styl" -@require "./components/modal.styl" -@require "./components/radio-modal.styl" -@require "./components/checkbox-modal.styl" -@require "./components/button.styl" -@require "./components/toast.styl" -@require "./components/popup.styl" -@require "./components/dialog.styl" -@require "./components/radio.styl" -@require "./components/checkbox.styl" From a6a53cdccdb4a8b3a6fa2cff1ff29cd8e84b03cc Mon Sep 17 00:00:00 2001 From: xiaolei <1017653702@qq.com> Date: Thu, 14 Mar 2024 19:44:50 +0800 Subject: [PATCH 4/6] [docs]update docs --- docs/guide/theme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/theme.md b/docs/guide/theme.md index 3a99f35..1ab9331 100644 --- a/docs/guide/theme.md +++ b/docs/guide/theme.md @@ -6,7 +6,7 @@ mpx-cube-ui 在设计开发过程中对于表现层的结构和样式进行抽离,利用预编译器([Stylus](https://stylus-lang.com/))和 [CSS 变量](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties)的能力来提供细粒度的样式定制能力。你可以利用样式定制能力去搭建更加成体系的小程序主题样式来满足特定业务产品的开发。 -mpx-cube-ui 目前提供了一套默认的主题样式配置,具体见 todo: 主题样式配置位置。而在右方的模拟器当中你所看到的示例是使用了另外一份主题样式文件覆盖了默认样式配置而生成的,具体参见 todo: passenger 主题配置。 +mpx-cube-ui 目前提供了一套默认的主题样式配置,具体见[主题样式配置](https://github.com/didi/mpx-cube-ui/tree/docs-improvement/packages/mpx-cube-ui/src/common/stylus/theme)文件。而在右方的模拟器当中你所看到的示例是使用了另外的主题样式文件覆盖了默认样式配置而生成的,你可以选择[乘客样式主题](https://github.com/didi/mpx-cube-ui/blob/docs-improvement/example/themes/passenger-variables.styl)或者[司机样式主题](https://github.com/didi/mpx-cube-ui/blob/docs-improvement/example/themes/driver-variables.styl)分别查看样式效果。 此外,考虑到不同小程序平台的样式隔离机制,mpx-cube-ui 也提供了几种样式覆盖策略来满足一些局部样式定制能力。 From 1d4718584095411b993b41b930dd686c7c28d5ac Mon Sep 17 00:00:00 2001 From: WeilinerL <2207284210@qq.com> Date: Thu, 14 Mar 2024 19:54:41 +0800 Subject: [PATCH 5/6] =?UTF-8?q?docs:=20=E6=96=87=E6=A1=A3=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/config.js | 2 +- docs/guide/changelog.md | 2 +- docs/guide/theme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 3727e80..77d1406 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -22,7 +22,7 @@ module.exports = { logo: 'data:image/png;base64,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', nav: [ { - text: 'Github', + text: 'GitHub', link: 'https://github.com/didi/mpx-cube-ui' } ], diff --git a/docs/guide/changelog.md b/docs/guide/changelog.md index e13789c..4705df0 100644 --- a/docs/guide/changelog.md +++ b/docs/guide/changelog.md @@ -2,7 +2,7 @@ -### 1.0.10(2024.03.13) +### 1.0.0(2024.03.13) #### mpx-cube-ui 项目开源 - Initial commit([11019fb](https://github.com/didi/mpx-cube-ui/commit/11019fbfdece8ea0e76258fb11bd8fb557c1a190)) diff --git a/docs/guide/theme.md b/docs/guide/theme.md index 1ab9331..d3854f9 100644 --- a/docs/guide/theme.md +++ b/docs/guide/theme.md @@ -6,7 +6,7 @@ mpx-cube-ui 在设计开发过程中对于表现层的结构和样式进行抽离,利用预编译器([Stylus](https://stylus-lang.com/))和 [CSS 变量](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties)的能力来提供细粒度的样式定制能力。你可以利用样式定制能力去搭建更加成体系的小程序主题样式来满足特定业务产品的开发。 -mpx-cube-ui 目前提供了一套默认的主题样式配置,具体见[主题样式配置](https://github.com/didi/mpx-cube-ui/tree/docs-improvement/packages/mpx-cube-ui/src/common/stylus/theme)文件。而在右方的模拟器当中你所看到的示例是使用了另外的主题样式文件覆盖了默认样式配置而生成的,你可以选择[乘客样式主题](https://github.com/didi/mpx-cube-ui/blob/docs-improvement/example/themes/passenger-variables.styl)或者[司机样式主题](https://github.com/didi/mpx-cube-ui/blob/docs-improvement/example/themes/driver-variables.styl)分别查看样式效果。 +mpx-cube-ui 目前提供了一套默认的主题样式配置,具体见[主题样式配置](https://github.com/didi/mpx-cube-ui/tree/main/packages/mpx-cube-ui/src/common/stylus/theme)文件。而在右方的模拟器当中你所看到的示例是使用了另外的主题样式文件覆盖了默认样式配置而生成的,你可以选择[乘客样式主题](https://github.com/didi/mpx-cube-ui/blob/main/example/themes/passenger-variables.styl)或者[司机样式主题](https://github.com/didi/mpx-cube-ui/blob/main/example/themes/driver-variables.styl)分别查看样式效果。 此外,考虑到不同小程序平台的样式隔离机制,mpx-cube-ui 也提供了几种样式覆盖策略来满足一些局部样式定制能力。 From 26c78319cac6454b2adc6167fb7cdf62f75e1d60 Mon Sep 17 00:00:00 2001 From: xiaolei <1017653702@qq.com> Date: Thu, 14 Mar 2024 19:55:15 +0800 Subject: [PATCH 6/6] [chore]clear code --- example/pages/button/index.mpx | 12 ------------ example/pages/picker-modal/index.mpx | 5 ----- 2 files changed, 17 deletions(-) diff --git a/example/pages/button/index.mpx b/example/pages/button/index.mpx index 3e380d4..7867c15 100644 --- a/example/pages/button/index.mpx +++ b/example/pages/button/index.mpx @@ -99,18 +99,6 @@ createPage({ } } }) - -// createPage({ -// // onShareAppMessage() { -// // return {} -// // }, -// methods: { -// onGetUserInfo(e) { -// console.log('the user info is:', e) -// }, -// getPhoneNumber() {} -// } -// })