zartui 0.1.36 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/README.md +20 -20
  2. package/es/action-sheet/index.css +1 -1
  3. package/es/action-sheet/index.js +18 -13
  4. package/es/action-sheet/index.less +10 -1
  5. package/es/avatar/index.less +39 -39
  6. package/es/avatar/local.less +1 -1
  7. package/es/button/index.less +206 -206
  8. package/es/calendar/index.less +250 -250
  9. package/es/cell/index.less +103 -103
  10. package/es/cell-group/index.less +22 -22
  11. package/es/checkbox/index.css +1 -1
  12. package/es/checkbox/index.less +4 -0
  13. package/es/checkbox-group/index.less +8 -8
  14. package/es/col/index.less +20 -20
  15. package/es/dialog/index.less +125 -125
  16. package/es/divider/index.css +1 -0
  17. package/es/divider/index.js +45 -0
  18. package/es/divider/index.less +64 -0
  19. package/es/divider/style/index.js +2 -0
  20. package/es/divider/style/less.js +2 -0
  21. package/es/empty/index.css +1 -1
  22. package/es/empty/index.less +7 -0
  23. package/es/field/ClearIcon.js +18 -0
  24. package/es/field/SearchIcon.js +18 -0
  25. package/es/field/index.css +1 -1
  26. package/es/field/index.js +32 -8
  27. package/es/field/index.less +15 -0
  28. package/es/icon/index.less +10 -10
  29. package/es/icon/local.less +1 -1
  30. package/es/image/index.less +47 -47
  31. package/es/image-preview/ImagePreview.js +10 -6
  32. package/es/image-preview/index.css +1 -1
  33. package/es/image-preview/index.less +23 -5
  34. package/es/index.js +7 -3
  35. package/es/info/index.less +29 -29
  36. package/es/lib/pinch.js +64 -0
  37. package/es/lib/vconsole.min.js +5982 -0
  38. package/es/locale/lang/zh-CN.js +3 -0
  39. package/es/mixins/bind-event.js +2 -2
  40. package/es/mixins/checkbox.js +25 -1
  41. package/es/mixins/click-outside.js +2 -2
  42. package/es/mixins/slots.js +3 -3
  43. package/es/nav-bar/index.less +74 -74
  44. package/es/notice-bar/CloseIcon.js +34 -0
  45. package/es/notice-bar/MenuIcon.js +35 -0
  46. package/es/notice-bar/NoticeIcon.js +35 -0
  47. package/es/notice-bar/OpenIcon.js +37 -0
  48. package/es/notice-bar/TipIcon.js +35 -0
  49. package/es/notice-bar/WarningIcon.js +35 -0
  50. package/es/notice-bar/index.css +1 -0
  51. package/es/notice-bar/index.js +279 -0
  52. package/es/notice-bar/index.less +66 -0
  53. package/es/notice-bar/style/index.js +4 -0
  54. package/es/notice-bar/style/less.js +4 -0
  55. package/es/number-keyboard/index.less +143 -143
  56. package/es/overlay/index.less +11 -11
  57. package/es/password-input/index.less +83 -83
  58. package/es/pdf-viewer/index.js +178 -77
  59. package/es/pdf-viewer/style/index.js +1 -0
  60. package/es/pdf-viewer/style/less.js +1 -0
  61. package/es/picker/index.js +11 -18
  62. package/es/picker/index.less +151 -151
  63. package/es/picker/shared.js +8 -0
  64. package/es/popup/index.js +11 -0
  65. package/es/popup/index.less +137 -137
  66. package/es/radio/index.css +1 -1
  67. package/es/radio/index.js +1 -1
  68. package/es/radio/index.less +21 -3
  69. package/es/radio-group/index.js +1 -1
  70. package/es/radio-group/index.less +8 -8
  71. package/es/rate/index.less +47 -47
  72. package/es/row/index.less +42 -42
  73. package/es/search/index.css +1 -0
  74. package/es/search/index.js +117 -0
  75. package/es/search/index.less +84 -0
  76. package/es/search/style/index.js +6 -0
  77. package/es/search/style/less.js +6 -0
  78. package/es/signature/index.js +2 -2
  79. package/es/signature/index.less +50 -50
  80. package/es/skeleton/index.css +1 -0
  81. package/es/skeleton/index.js +107 -0
  82. package/es/skeleton/index.less +65 -0
  83. package/es/skeleton/style/index.js +2 -0
  84. package/es/skeleton/style/less.js +2 -0
  85. package/es/slider/index.less +94 -94
  86. package/es/step/index.less +139 -139
  87. package/es/stepper/index.css +1 -1
  88. package/es/stepper/index.js +6 -2
  89. package/es/stepper/index.less +38 -42
  90. package/es/steps/index.less +21 -21
  91. package/es/sticky/index.less +11 -11
  92. package/es/style/animation.less +139 -139
  93. package/es/style/base.less +11 -11
  94. package/es/style/clearfix.less +5 -5
  95. package/es/style/ellipsis.less +13 -13
  96. package/es/style/hairline.less +47 -47
  97. package/es/style/mixins/clearfix.less +7 -7
  98. package/es/style/mixins/ellipsis.less +15 -15
  99. package/es/style/mixins/hairline.less +39 -39
  100. package/es/style/normalize.less +38 -38
  101. package/es/style/reset.less +171 -171
  102. package/es/style/var.less +65 -28
  103. package/es/swipe/index.css +1 -1
  104. package/es/swipe/index.js +7 -1
  105. package/es/swipe/index.less +12 -13
  106. package/es/swipe-cell/index.less +29 -29
  107. package/es/swipe-item/index.less +8 -8
  108. package/es/switch/index.less +56 -56
  109. package/es/switch/shared.js +2 -2
  110. package/es/switch-cell/index.less +15 -15
  111. package/es/tab/index.less +17 -17
  112. package/es/tabs/index.less +153 -153
  113. package/es/tag/index.less +99 -99
  114. package/es/toast/Toast.js +15 -2
  115. package/es/toast/index.css +1 -1
  116. package/es/toast/index.less +8 -1
  117. package/es/toast/svg/SuccessIcon.js +35 -0
  118. package/es/toast/svg/WarnIcon.js +34 -0
  119. package/es/uploader/index.less +163 -163
  120. package/es/utils/create/bem.js +7 -7
  121. package/es/utils/create/component.js +4 -1
  122. package/es/utils/dom/raf.js +2 -2
  123. package/es/utils/dom/reset-scroll.js +3 -3
  124. package/es/utils/index.js +7 -0
  125. package/es/utils/media/image-util.js +25 -25
  126. package/es/utils/router.js +2 -2
  127. package/lib/7893e51cf0a4877dac80.worker.js +10 -0
  128. package/lib/action-sheet/index.css +1 -1
  129. package/lib/action-sheet/index.js +18 -13
  130. package/lib/action-sheet/index.less +10 -1
  131. package/lib/avatar/index.less +39 -39
  132. package/lib/avatar/local.less +1 -1
  133. package/lib/be09b519a460e229fd8d.worker.js +2527 -0
  134. package/lib/button/index.less +206 -206
  135. package/lib/calendar/index.less +250 -250
  136. package/lib/cell/index.less +103 -103
  137. package/lib/cell-group/index.less +22 -22
  138. package/lib/checkbox/index.css +1 -1
  139. package/lib/checkbox/index.less +4 -0
  140. package/lib/checkbox-group/index.less +8 -8
  141. package/lib/col/index.less +20 -20
  142. package/lib/dialog/index.less +125 -125
  143. package/lib/divider/index.css +1 -0
  144. package/lib/divider/index.js +57 -0
  145. package/lib/divider/index.less +64 -0
  146. package/lib/divider/style/index.js +2 -0
  147. package/lib/divider/style/less.js +2 -0
  148. package/lib/empty/index.css +1 -1
  149. package/lib/empty/index.less +7 -0
  150. package/lib/field/ClearIcon.js +23 -0
  151. package/lib/field/SearchIcon.js +23 -0
  152. package/lib/field/index.css +1 -1
  153. package/lib/field/index.js +34 -8
  154. package/lib/field/index.less +15 -0
  155. package/lib/icon/index.less +10 -10
  156. package/lib/icon/local.less +1 -1
  157. package/lib/image/index.less +47 -47
  158. package/lib/image-preview/ImagePreview.js +10 -6
  159. package/lib/image-preview/index.css +1 -1
  160. package/lib/image-preview/index.less +23 -5
  161. package/lib/index.css +1 -1
  162. package/lib/index.js +18 -2
  163. package/lib/index.less +5 -1
  164. package/lib/info/index.less +29 -29
  165. package/lib/lib/pinch.js +70 -0
  166. package/lib/lib/vconsole.min.js +5989 -0
  167. package/lib/locale/lang/zh-CN.js +3 -0
  168. package/lib/mixins/bind-event.js +2 -2
  169. package/lib/mixins/checkbox.js +25 -1
  170. package/lib/mixins/click-outside.js +2 -2
  171. package/lib/mixins/slots.js +3 -3
  172. package/lib/nav-bar/index.less +74 -74
  173. package/lib/notice-bar/CloseIcon.js +39 -0
  174. package/lib/notice-bar/MenuIcon.js +40 -0
  175. package/lib/notice-bar/NoticeIcon.js +40 -0
  176. package/lib/notice-bar/OpenIcon.js +42 -0
  177. package/lib/notice-bar/TipIcon.js +40 -0
  178. package/lib/notice-bar/WarningIcon.js +40 -0
  179. package/lib/notice-bar/index.css +1 -0
  180. package/lib/notice-bar/index.js +297 -0
  181. package/lib/notice-bar/index.less +66 -0
  182. package/lib/notice-bar/style/index.js +4 -0
  183. package/lib/notice-bar/style/less.js +4 -0
  184. package/lib/number-keyboard/index.less +143 -143
  185. package/lib/overlay/index.less +11 -11
  186. package/lib/password-input/index.less +83 -83
  187. package/lib/pdf-viewer/index.js +179 -79
  188. package/lib/pdf-viewer/style/index.js +1 -0
  189. package/lib/pdf-viewer/style/less.js +1 -0
  190. package/lib/picker/index.js +11 -18
  191. package/lib/picker/index.less +151 -151
  192. package/lib/picker/shared.js +8 -0
  193. package/lib/popup/index.js +11 -0
  194. package/lib/popup/index.less +137 -137
  195. package/lib/radio/index.css +1 -1
  196. package/lib/radio/index.js +1 -1
  197. package/lib/radio/index.less +21 -3
  198. package/lib/radio-group/index.js +1 -1
  199. package/lib/radio-group/index.less +8 -8
  200. package/lib/rate/index.less +47 -47
  201. package/lib/row/index.less +42 -42
  202. package/lib/search/index.css +1 -0
  203. package/lib/search/index.js +131 -0
  204. package/lib/search/index.less +84 -0
  205. package/lib/search/style/index.js +6 -0
  206. package/lib/search/style/less.js +6 -0
  207. package/lib/signature/index.js +2 -2
  208. package/lib/signature/index.less +50 -50
  209. package/lib/skeleton/index.css +1 -0
  210. package/lib/skeleton/index.js +119 -0
  211. package/lib/skeleton/index.less +65 -0
  212. package/lib/skeleton/style/index.js +2 -0
  213. package/lib/skeleton/style/less.js +2 -0
  214. package/lib/slider/index.less +94 -94
  215. package/lib/step/index.less +139 -139
  216. package/lib/stepper/index.css +1 -1
  217. package/lib/stepper/index.js +6 -2
  218. package/lib/stepper/index.less +38 -42
  219. package/lib/steps/index.less +21 -21
  220. package/lib/sticky/index.less +11 -11
  221. package/lib/style/animation.less +139 -139
  222. package/lib/style/base.less +11 -11
  223. package/lib/style/clearfix.less +5 -5
  224. package/lib/style/ellipsis.less +13 -13
  225. package/lib/style/hairline.less +47 -47
  226. package/lib/style/mixins/clearfix.less +7 -7
  227. package/lib/style/mixins/ellipsis.less +15 -15
  228. package/lib/style/mixins/hairline.less +39 -39
  229. package/lib/style/normalize.less +38 -38
  230. package/lib/style/reset.less +171 -171
  231. package/lib/style/var.less +65 -28
  232. package/lib/swipe/index.css +1 -1
  233. package/lib/swipe/index.js +7 -1
  234. package/lib/swipe/index.less +12 -13
  235. package/lib/swipe-cell/index.less +29 -29
  236. package/lib/swipe-item/index.less +8 -8
  237. package/lib/switch/index.less +56 -56
  238. package/lib/switch/shared.js +2 -2
  239. package/lib/switch-cell/index.less +15 -15
  240. package/lib/tab/index.less +17 -17
  241. package/lib/tabs/index.less +153 -153
  242. package/lib/tag/index.less +99 -99
  243. package/lib/toast/Toast.js +17 -2
  244. package/lib/toast/index.css +1 -1
  245. package/lib/toast/index.less +8 -1
  246. package/lib/toast/svg/SuccessIcon.js +40 -0
  247. package/lib/toast/svg/WarnIcon.js +39 -0
  248. package/lib/uploader/index.less +163 -163
  249. package/lib/utils/create/bem.js +7 -7
  250. package/lib/utils/create/component.js +7 -1
  251. package/lib/utils/dom/raf.js +2 -2
  252. package/lib/utils/dom/reset-scroll.js +3 -3
  253. package/lib/utils/index.js +9 -0
  254. package/lib/utils/media/image-util.js +25 -25
  255. package/lib/utils/router.js +2 -2
  256. package/lib/zart.js +11597 -42838
  257. package/lib/zart.min.js +5 -5
  258. package/package.json +1 -1
  259. package/lib/a037f57fc4d92a8a1f1e.worker.js +0 -60600
  260. package/lib/b7cf90b4775181215df7.worker.js +0 -10
package/README.md CHANGED
@@ -1,21 +1,21 @@
1
- # Zart
2
-
3
- [Zart](https://zart.egovazx.top) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
4
-
5
- Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了Zart项目的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
6
-
7
- ## 特性
8
-
9
- 1)【组件重构】【组件审核】提供60多个高质量组件,覆盖移动端各类场景;
10
-
11
- 2)【UI重构】基于全新的视觉规范;
12
-
13
- 3)【在线网站】完善的文档、示例、演示效果;
14
-
15
- 4)支持主题定制、按需引入;
16
-
17
- 5)支持vue2.0、TypeScript;
18
-
19
- 6)性能佳,组件平均体积小(min+gzip);
20
-
1
+ # Zart
2
+
3
+ [Zart](https://zart.egovazx.top) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
4
+
5
+ Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了Zart项目的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
6
+
7
+ ## 特性
8
+
9
+ 1)【组件重构】【组件审核】提供60多个高质量组件,覆盖移动端各类场景;
10
+
11
+ 2)【UI重构】基于全新的视觉规范;
12
+
13
+ 3)【在线网站】完善的文档、示例、演示效果;
14
+
15
+ 4)支持主题定制、按需引入;
16
+
17
+ 5)支持vue2.0、TypeScript;
18
+
19
+ 6)性能佳,组件平均体积小(min+gzip);
20
+
21
21
  7)单元测试覆盖率 90%+,提供稳定性保障。
@@ -1 +1 @@
1
- .zt-action-sheet{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;overflow:hidden;color:rgba(0,0,0,.6)}.zt-action-sheet__content{-webkit-box-flex:1;-webkit-flex:1 auto;flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt-action-sheet__cancel,.zt-action-sheet__item{display:block;width:100%;padding:10px 16px;font-size:16px;line-height:24px;background-color:#fff;border:none;cursor:pointer}.zt-action-sheet__cancel:active,.zt-action-sheet__item:active{background-color:rgba(0,0,0,.04)}.zt-action-sheet__item{position:relative;color:#000}.zt-action-sheet__item:not(:last-child).zt-action-sheet__item::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-action-sheet__item--disabled,.zt-action-sheet__item--loading{color:rgba(0,0,0,.2)}.zt-action-sheet__item--disabled:active,.zt-action-sheet__item--loading:active{background-color:#fff}.zt-action-sheet__item--disabled{cursor:not-allowed}.zt-action-sheet__item--loading{cursor:default}.zt-action-sheet__cancel{-webkit-flex-shrink:0;flex-shrink:0;box-sizing:border-box;color:#000}.zt-action-sheet__subname{margin-top:8px;color:#969799;font-size:12px;line-height:18px}.zt-action-sheet__gap{display:block;height:12px;background-color:#f5f5fa}.zt-action-sheet__header{-webkit-flex-shrink:0;flex-shrink:0;font-size:14px;line-height:44px;text-align:center;position:relative;color:rgba(0,0,0,.4)}.zt-action-sheet__header::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-action-sheet__description{position:relative;-webkit-flex-shrink:0;flex-shrink:0;padding:20px 16px;color:#969799;font-size:14px;line-height:20px;text-align:center}.zt-action-sheet__description::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-action-sheet__loading-icon .zt-loading__spinner{width:22px;height:22px}.zt-action-sheet__close{position:absolute;top:0;right:0;padding:0 16px;color:#c8c9cc;font-size:22px;line-height:inherit}.zt-action-sheet__close:active{color:#969799}
1
+ .zt-action-sheet{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;overflow:hidden;color:rgba(0,0,0,.6)}.zt-action-sheet__content{-webkit-box-flex:1;-webkit-flex:1 auto;flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt-action-sheet__cancel,.zt-action-sheet__item{display:block;width:100%;padding:10px 16px;font-size:16px;line-height:24px;background-color:#fff;border:none;cursor:pointer}.zt-action-sheet__cancel:active,.zt-action-sheet__item:active{background-color:rgba(0,0,0,.04)}.zt-action-sheet__item{position:relative;color:#000}.zt-action-sheet__item:not(:last-child).zt-action-sheet__item::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-action-sheet__item--disabled,.zt-action-sheet__item--loading{color:rgba(0,0,0,.2)}.zt-action-sheet__item--disabled:active,.zt-action-sheet__item--loading:active{background-color:#fff}.zt-action-sheet__item--disabled{cursor:not-allowed}.zt-action-sheet__item--loading{cursor:default}.zt-action-sheet__item--has-subname{padding-top:9px;padding-bottom:9px}.zt-action-sheet__cancel{-webkit-flex-shrink:0;flex-shrink:0;box-sizing:border-box;color:#000}.zt-action-sheet__subname{margin-top:2px;color:#969799;font-size:12px;line-height:16px}.zt-action-sheet__gap{display:block;height:12px;background-color:#f5f5fa}.zt-action-sheet__header{-webkit-flex-shrink:0;flex-shrink:0;font-size:14px;line-height:44px;text-align:center;position:relative;color:rgba(0,0,0,.4)}.zt-action-sheet__header::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-action-sheet__header--align-start{text-align:start}.zt-action-sheet__description{position:relative;-webkit-flex-shrink:0;flex-shrink:0;padding:20px 16px;color:#969799;font-size:14px;line-height:20px;text-align:center}.zt-action-sheet__description::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-action-sheet__loading-icon .zt-loading__spinner{width:20px;height:20px}.zt-action-sheet__close{position:absolute;top:0;right:0;padding:0 16px;color:rgba(0,0,0,.4);font-size:20px;line-height:inherit}.zt-action-sheet__close:active{color:#969799}
@@ -26,6 +26,20 @@ function ActionSheet(h, props, slots, ctx) {
26
26
  }
27
27
 
28
28
  function Header() {
29
+ if (slots.title) {
30
+ return h("div", {
31
+ "class": bem('header', 'align-start')
32
+ }, [slots.title(), closeable && h(Icon, {
33
+ "attrs": {
34
+ "name": props.closeIcon
35
+ },
36
+ "class": bem('close'),
37
+ "on": {
38
+ "click": onCancel
39
+ }
40
+ })]);
41
+ }
42
+
29
43
  if (title) {
30
44
  return h("div", {
31
45
  "class": bem('header')
@@ -80,13 +94,15 @@ function ActionSheet(h, props, slots, ctx) {
80
94
  }, [item.subname])];
81
95
  }
82
96
 
97
+ var hasSubName = !loading && item.subname;
83
98
  return h("button", {
84
99
  "attrs": {
85
100
  "type": "button"
86
101
  },
87
102
  "class": [bem('item', {
88
103
  disabled: disabled,
89
- loading: loading
104
+ loading: loading,
105
+ 'has-subname': hasSubName
90
106
  }), item.className],
91
107
  "style": {
92
108
  color: item.color
@@ -113,16 +129,6 @@ function ActionSheet(h, props, slots, ctx) {
113
129
  }
114
130
  }
115
131
 
116
- function Description() {
117
- var description = (slots.description == null ? void 0 : slots.description()) || props.description;
118
-
119
- if (description) {
120
- return h("div", {
121
- "class": bem('description')
122
- }, [description]);
123
- }
124
- }
125
-
126
132
  return h(Popup, _mergeJSXProps([{
127
133
  "class": bem(),
128
134
  "attrs": {
@@ -138,7 +144,7 @@ function ActionSheet(h, props, slots, ctx) {
138
144
  "closeOnClickOverlay": props.closeOnClickOverlay,
139
145
  "safeAreaInsetBottom": props.safeAreaInsetBottom
140
146
  }
141
- }, inherit(ctx, true)]), [Header(), Description(), h("div", {
147
+ }, inherit(ctx, true)]), [Header(), h("div", {
142
148
  "class": bem('content')
143
149
  }, [props.actions && props.actions.map(Option), slots.default == null ? void 0 : slots.default()]), CancelText()]);
144
150
  }
@@ -148,7 +154,6 @@ ActionSheet.props = _extends({}, popupMixinProps, {
148
154
  actions: Array,
149
155
  duration: [Number, String],
150
156
  cancelText: String,
151
- description: String,
152
157
  getContainer: [String, Function],
153
158
  closeOnPopstate: Boolean,
154
159
  closeOnClickAction: Boolean,
@@ -54,6 +54,11 @@
54
54
  &--loading {
55
55
  cursor: default;
56
56
  }
57
+
58
+ &--has-subname {
59
+ padding-top: 9px;
60
+ padding-bottom: 9px;
61
+ }
57
62
  }
58
63
 
59
64
  &__cancel {
@@ -63,7 +68,7 @@
63
68
  }
64
69
 
65
70
  &__subname {
66
- margin-top: @padding-xs;
71
+ margin-top: 2px;
67
72
  color: @action-sheet-subname-color;
68
73
  font-size: @action-sheet-subname-font-size;
69
74
  line-height: @action-sheet-subname-line-height;
@@ -86,6 +91,10 @@
86
91
  &::after {
87
92
  .hairline-bottom(@cell-border-color);
88
93
  }
94
+
95
+ &--align-start {
96
+ text-align: start;
97
+ }
89
98
  }
90
99
 
91
100
  &__description {
@@ -1,40 +1,40 @@
1
- @import '../style/var';
2
- @import '~zart-icons/src/encode-woff2.less';
3
-
4
- .zt-avatar {
5
- font-family: PingFangSC, PingFangSC-Semibold;
6
- font-weight: bold;
7
- color: #ffffff;
8
- display: flex;
9
- justify-content: center;
10
- align-items: center;
11
- &__img {
12
- background-color: @avatar-default-bg;
13
- color: @avatar-default-color;
14
- text-align: center;
15
- &--small {
16
- width: @avatar-size-small;
17
- height: @avatar-size-small;
18
- font-size: @avatar-font-size-small;
19
- line-height: @avatar-size-small;
20
- }
21
- &--medium {
22
- width: @avatar-size-medium;
23
- height: @avatar-size-medium;
24
- font-size: @avatar-font-size-medium;
25
- line-height: @avatar-size-medium;
26
- }
27
- &--large {
28
- width: @avatar-size-large;
29
- height: @avatar-size-large;
30
- font-size: @avatar-font-size-large;
31
- line-height: @avatar-size-large;
32
- }
33
- &--square {
34
- border-radius: 4px;
35
- }
36
- &--circle {
37
- border-radius: @avatar-circle-radius;
38
- }
39
- }
1
+ @import '../style/var';
2
+ @import '~zart-icons/src/encode-woff2.less';
3
+
4
+ .zt-avatar {
5
+ font-family: PingFangSC, PingFangSC-Semibold;
6
+ font-weight: bold;
7
+ color: #ffffff;
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ &__img {
12
+ background-color: @avatar-default-bg;
13
+ color: @avatar-default-color;
14
+ text-align: center;
15
+ &--small {
16
+ width: @avatar-size-small;
17
+ height: @avatar-size-small;
18
+ font-size: @avatar-font-size-small;
19
+ line-height: @avatar-size-small;
20
+ }
21
+ &--medium {
22
+ width: @avatar-size-medium;
23
+ height: @avatar-size-medium;
24
+ font-size: @avatar-font-size-medium;
25
+ line-height: @avatar-size-medium;
26
+ }
27
+ &--large {
28
+ width: @avatar-size-large;
29
+ height: @avatar-size-large;
30
+ font-size: @avatar-font-size-large;
31
+ line-height: @avatar-size-large;
32
+ }
33
+ &--square {
34
+ border-radius: 4px;
35
+ }
36
+ &--circle {
37
+ border-radius: @avatar-circle-radius;
38
+ }
39
+ }
40
40
  }
@@ -1 +1 @@
1
- @import '~zart-icons/src/encode.less';
1
+ @import '~zart-icons/src/encode.less';
@@ -1,206 +1,206 @@
1
- @import '../style/var';
2
-
3
- .zt-button {
4
- position: relative;
5
- display: inline-block;
6
- box-sizing: border-box;
7
- height: @button-default-height;
8
- margin: 0;
9
- padding: 0;
10
- font-size: @button-default-font-size;
11
- line-height: @button-default-line-height;
12
- font-family: @base-font-family;
13
- font-weight: @base-font-weight;
14
- text-align: center;
15
- border-radius: @button-border-radius;
16
- border-color: @button-default-border-color;
17
- cursor: pointer;
18
- transition: opacity @animation-duration-fast;
19
- -webkit-appearance: none;
20
-
21
- &::before {
22
- position: absolute;
23
- top: 50%;
24
- left: 50%;
25
- width: 100%;
26
- height: 100%;
27
- background-color: @black;
28
- border: inherit;
29
- border-color: @black;
30
- border-radius: inherit; /* inherit parent's border radius */
31
- transform: translate(-50%, -50%);
32
- opacity: 0;
33
- content: ' ';
34
- }
35
-
36
- &:active::before {
37
- opacity: 0.1;
38
- }
39
-
40
- &--loading,
41
- &--disabled {
42
- &::before {
43
- display: none;
44
- }
45
- }
46
-
47
- &--default {
48
- color: @button-default-color;
49
- background-color: @button-default-background-color;
50
- border: @button-border-width solid @button-default-border-color;
51
- }
52
-
53
- &--primary {
54
- color: @button-primary-color;
55
- background-color: @button-primary-background-color;
56
- border: @button-border-width solid @button-primary-border-color;
57
- }
58
-
59
- &--info {
60
- color: @button-info-color;
61
- background-color: @button-info-background-color;
62
- border: @button-border-width solid @button-info-border-color;
63
- }
64
-
65
- &--danger {
66
- color: @button-danger-color;
67
- background-color: @button-danger-background-color;
68
- border: @button-border-width solid @button-danger-border-color;
69
- }
70
-
71
- &--warning {
72
- color: @button-warning-color;
73
- background-color: @button-warning-background-color;
74
- border: @button-border-width solid @button-warning-border-color;
75
- }
76
-
77
- &--success {
78
- color: @button-success-color;
79
- background-color: @button-success-background-color;
80
- border: @button-border-width solid @button-success-border-color;
81
- }
82
-
83
- &--plain {
84
- background-color: @button-plain-background-color;
85
- font-weight: @plain-font-weight;
86
-
87
- &.zt-button--primary {
88
- color: @button-primary-background-color;
89
- }
90
-
91
- &.zt-button--info {
92
- color: @button-info-background-color;
93
- }
94
-
95
- &.zt-button--danger {
96
- color: @button-danger-background-color;
97
- }
98
-
99
- &.zt-button--warning {
100
- color: @button-warning-background-color;
101
- }
102
-
103
- &.zt-button--success {
104
- color: @button-success-background-color;
105
- }
106
- }
107
-
108
- &--large {
109
- width: 100%;
110
- height: @button-large-height;
111
- }
112
-
113
- &--normal {
114
- padding: 0 16px;
115
- font-size: @button-normal-font-size;
116
- }
117
-
118
- &--small {
119
- height: @button-small-height;
120
- padding: 0 @padding-xs;
121
- font-size: @button-small-font-size;
122
- }
123
-
124
- &__loading {
125
- color: inherit;
126
- font-size: inherit;
127
- }
128
-
129
- &--mini {
130
- height: @button-mini-height;
131
- padding: 0 @padding-xs;
132
- font-size: @button-mini-font-size;
133
- font-weight: @plain-font-weight;
134
- border-radius: @border-radius-sm;
135
-
136
- & + .zt-button--mini {
137
- margin-left: @padding-base;
138
- }
139
- }
140
-
141
- &--block {
142
- display: block;
143
- width: 100%;
144
- }
145
-
146
- &--disabled {
147
- cursor: not-allowed;
148
- opacity: @button-disabled-opacity;
149
- }
150
-
151
- &--loading {
152
- cursor: default;
153
- }
154
-
155
- &--round {
156
- border-radius: @button-round-border-radius;
157
- }
158
-
159
- &--square {
160
- border-radius: 0;
161
- }
162
-
163
- // align-items are ignored when flex container is a button in legacy safari
164
- // see: https://bugs.webkit.org/show_bug.cgi?id=169700
165
- &__content {
166
- display: flex;
167
- align-items: center;
168
- justify-content: center;
169
- height: 100%;
170
-
171
- // fix icon vertical align
172
- // see: https://github.com/youzan/vant/issues/7617
173
- &::before {
174
- content: ' ';
175
- }
176
- }
177
-
178
- &__icon {
179
- font-size: 1.2em;
180
- line-height: inherit;
181
- }
182
-
183
- &__icon + &__text,
184
- &__loading + &__text,
185
- &__text + &__icon,
186
- &__text + &__loading {
187
- margin-left: @padding-base;
188
- }
189
-
190
- &--hairline {
191
- border-width: 0;
192
-
193
- &::after {
194
- border-color: inherit;
195
- border-radius: @button-border-radius * 2;
196
- }
197
-
198
- &.zt-button--round::after {
199
- border-radius: @button-round-border-radius;
200
- }
201
-
202
- &.zt-button--square::after {
203
- border-radius: 0;
204
- }
205
- }
206
- }
1
+ @import '../style/var';
2
+
3
+ .zt-button {
4
+ position: relative;
5
+ display: inline-block;
6
+ box-sizing: border-box;
7
+ height: @button-default-height;
8
+ margin: 0;
9
+ padding: 0;
10
+ font-size: @button-default-font-size;
11
+ line-height: @button-default-line-height;
12
+ font-family: @base-font-family;
13
+ font-weight: @base-font-weight;
14
+ text-align: center;
15
+ border-radius: @button-border-radius;
16
+ border-color: @button-default-border-color;
17
+ cursor: pointer;
18
+ transition: opacity @animation-duration-fast;
19
+ -webkit-appearance: none;
20
+
21
+ &::before {
22
+ position: absolute;
23
+ top: 50%;
24
+ left: 50%;
25
+ width: 100%;
26
+ height: 100%;
27
+ background-color: @black;
28
+ border: inherit;
29
+ border-color: @black;
30
+ border-radius: inherit; /* inherit parent's border radius */
31
+ transform: translate(-50%, -50%);
32
+ opacity: 0;
33
+ content: ' ';
34
+ }
35
+
36
+ &:active::before {
37
+ opacity: 0.1;
38
+ }
39
+
40
+ &--loading,
41
+ &--disabled {
42
+ &::before {
43
+ display: none;
44
+ }
45
+ }
46
+
47
+ &--default {
48
+ color: @button-default-color;
49
+ background-color: @button-default-background-color;
50
+ border: @button-border-width solid @button-default-border-color;
51
+ }
52
+
53
+ &--primary {
54
+ color: @button-primary-color;
55
+ background-color: @button-primary-background-color;
56
+ border: @button-border-width solid @button-primary-border-color;
57
+ }
58
+
59
+ &--info {
60
+ color: @button-info-color;
61
+ background-color: @button-info-background-color;
62
+ border: @button-border-width solid @button-info-border-color;
63
+ }
64
+
65
+ &--danger {
66
+ color: @button-danger-color;
67
+ background-color: @button-danger-background-color;
68
+ border: @button-border-width solid @button-danger-border-color;
69
+ }
70
+
71
+ &--warning {
72
+ color: @button-warning-color;
73
+ background-color: @button-warning-background-color;
74
+ border: @button-border-width solid @button-warning-border-color;
75
+ }
76
+
77
+ &--success {
78
+ color: @button-success-color;
79
+ background-color: @button-success-background-color;
80
+ border: @button-border-width solid @button-success-border-color;
81
+ }
82
+
83
+ &--plain {
84
+ background-color: @button-plain-background-color;
85
+ font-weight: @plain-font-weight;
86
+
87
+ &.zt-button--primary {
88
+ color: @button-primary-background-color;
89
+ }
90
+
91
+ &.zt-button--info {
92
+ color: @button-info-background-color;
93
+ }
94
+
95
+ &.zt-button--danger {
96
+ color: @button-danger-background-color;
97
+ }
98
+
99
+ &.zt-button--warning {
100
+ color: @button-warning-background-color;
101
+ }
102
+
103
+ &.zt-button--success {
104
+ color: @button-success-background-color;
105
+ }
106
+ }
107
+
108
+ &--large {
109
+ width: 100%;
110
+ height: @button-large-height;
111
+ }
112
+
113
+ &--normal {
114
+ padding: 0 16px;
115
+ font-size: @button-normal-font-size;
116
+ }
117
+
118
+ &--small {
119
+ height: @button-small-height;
120
+ padding: 0 @padding-xs;
121
+ font-size: @button-small-font-size;
122
+ }
123
+
124
+ &__loading {
125
+ color: inherit;
126
+ font-size: inherit;
127
+ }
128
+
129
+ &--mini {
130
+ height: @button-mini-height;
131
+ padding: 0 @padding-xs;
132
+ font-size: @button-mini-font-size;
133
+ font-weight: @plain-font-weight;
134
+ border-radius: @border-radius-sm;
135
+
136
+ & + .zt-button--mini {
137
+ margin-left: @padding-base;
138
+ }
139
+ }
140
+
141
+ &--block {
142
+ display: block;
143
+ width: 100%;
144
+ }
145
+
146
+ &--disabled {
147
+ cursor: not-allowed;
148
+ opacity: @button-disabled-opacity;
149
+ }
150
+
151
+ &--loading {
152
+ cursor: default;
153
+ }
154
+
155
+ &--round {
156
+ border-radius: @button-round-border-radius;
157
+ }
158
+
159
+ &--square {
160
+ border-radius: 0;
161
+ }
162
+
163
+ // align-items are ignored when flex container is a button in legacy safari
164
+ // see: https://bugs.webkit.org/show_bug.cgi?id=169700
165
+ &__content {
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ height: 100%;
170
+
171
+ // fix icon vertical align
172
+ // see: https://github.com/youzan/vant/issues/7617
173
+ &::before {
174
+ content: ' ';
175
+ }
176
+ }
177
+
178
+ &__icon {
179
+ font-size: 1.2em;
180
+ line-height: inherit;
181
+ }
182
+
183
+ &__icon + &__text,
184
+ &__loading + &__text,
185
+ &__text + &__icon,
186
+ &__text + &__loading {
187
+ margin-left: @padding-base;
188
+ }
189
+
190
+ &--hairline {
191
+ border-width: 0;
192
+
193
+ &::after {
194
+ border-color: inherit;
195
+ border-radius: @button-border-radius * 2;
196
+ }
197
+
198
+ &.zt-button--round::after {
199
+ border-radius: @button-round-border-radius;
200
+ }
201
+
202
+ &.zt-button--square::after {
203
+ border-radius: 0;
204
+ }
205
+ }
206
+ }