zartui 1.0.2 → 2.0.2

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 (191) hide show
  1. package/es/action-sheet/index.css +1 -1
  2. package/es/action-sheet/index.js +3 -3
  3. package/es/action-sheet/index.less +12 -8
  4. package/es/area/style/index.js +1 -0
  5. package/es/area/style/less.js +1 -0
  6. package/es/avatar/index.css +1 -1
  7. package/es/button/index.css +1 -1
  8. package/es/button/index.js +28 -13
  9. package/es/button/index.less +60 -27
  10. package/es/calendar/components/Header.js +1 -6
  11. package/es/calendar/index.css +1 -1
  12. package/es/calendar/index.js +31 -8
  13. package/es/calendar/index.less +16 -10
  14. package/es/cell/index.css +1 -1
  15. package/es/cell/index.js +62 -40
  16. package/es/cell/index.less +67 -12
  17. package/es/cell/shared.js +2 -0
  18. package/es/checkbox/index.css +1 -1
  19. package/es/checkbox/index.less +18 -15
  20. package/es/checkbox-group/index.js +1 -0
  21. package/es/datetime-picker/style/index.js +1 -0
  22. package/es/datetime-picker/style/less.js +1 -0
  23. package/es/field/index.css +1 -1
  24. package/es/field/index.js +94 -9
  25. package/es/field/index.less +81 -11
  26. package/es/hierarchy-select/hierarchySelect.js +1 -8
  27. package/es/hierarchy-select/index.css +1 -1
  28. package/es/hierarchy-select/index.js +6 -14
  29. package/es/hierarchy-select/index.less +4 -5
  30. package/es/hierarchy-select/markList.js +1 -16
  31. package/es/icon/index.css +1 -1
  32. package/es/image/index.css +1 -1
  33. package/es/image-preview/ImagePreview.js +1 -1
  34. package/es/image-preview/index.css +1 -1
  35. package/es/image-preview/index.less +4 -2
  36. package/es/index.js +3 -4
  37. package/es/loading/index.css +1 -1
  38. package/es/loading/index.js +3 -3
  39. package/es/loading/index.less +1 -1
  40. package/es/media-picker/image/PickFileIcon.js +2 -9
  41. package/es/media-picker/image/PickPhotoIcon.js +2 -9
  42. package/es/media-picker/image/TakeAudioIcon.js +2 -9
  43. package/es/media-picker/image/TakePhotoIcon.js +2 -9
  44. package/es/media-picker/image/TakeVideoIcon.js +2 -9
  45. package/es/media-picker/index.css +1 -1
  46. package/es/media-picker/index.js +22 -17
  47. package/es/media-picker/index.less +6 -4
  48. package/es/media-picker/style/index.js +4 -0
  49. package/es/media-picker/style/less.js +4 -0
  50. package/es/mixins/checkbox.js +12 -30
  51. package/es/multiple-picker/index.css +1 -1
  52. package/es/multiple-picker/index.js +18 -11
  53. package/es/multiple-picker/index.less +11 -7
  54. package/es/multiple-picker/style/index.js +1 -0
  55. package/es/multiple-picker/style/less.js +1 -0
  56. package/es/pdf-viewer/style/index.js +1 -0
  57. package/es/pdf-viewer/style/less.js +1 -0
  58. package/es/picker/index.css +1 -1
  59. package/es/picker/index.js +18 -9
  60. package/es/picker/index.less +18 -2
  61. package/es/picker/style/index.js +1 -0
  62. package/es/picker/style/less.js +1 -0
  63. package/es/popup/index.css +1 -1
  64. package/es/popup/index.js +120 -49
  65. package/es/popup/index.less +31 -2
  66. package/es/radio/index.css +1 -1
  67. package/es/radio/index.less +24 -29
  68. package/es/radio-group/index.js +1 -0
  69. package/es/search/index.css +1 -1
  70. package/es/search/index.js +1 -1
  71. package/es/search/index.less +31 -3
  72. package/es/signature/index.js +7 -6
  73. package/es/signature/index.less +1 -1
  74. package/es/step/index.css +1 -1
  75. package/es/step/index.js +3 -5
  76. package/es/step/index.less +3 -1
  77. package/es/stepper/index.css +1 -1
  78. package/es/steps/index.css +1 -1
  79. package/es/steps/index.less +3 -3
  80. package/es/style/reset.css +1 -1
  81. package/es/style/var.less +106 -62
  82. package/es/switch-cell/index.css +1 -1
  83. package/es/tabs/Title.js +6 -1
  84. package/es/tabs/index.css +1 -1
  85. package/es/tabs/index.js +2 -4
  86. package/es/tabs/index.less +18 -15
  87. package/es/toast/index.css +1 -1
  88. package/es/uploader/index.css +1 -1
  89. package/lib/action-sheet/index.css +1 -1
  90. package/lib/action-sheet/index.js +3 -3
  91. package/lib/action-sheet/index.less +12 -8
  92. package/lib/area/style/index.js +1 -0
  93. package/lib/area/style/less.js +1 -0
  94. package/lib/avatar/index.css +1 -1
  95. package/lib/button/index.css +1 -1
  96. package/lib/button/index.js +28 -13
  97. package/lib/button/index.less +60 -27
  98. package/lib/calendar/components/Header.js +1 -6
  99. package/lib/calendar/index.css +1 -1
  100. package/lib/calendar/index.js +31 -8
  101. package/lib/calendar/index.less +16 -10
  102. package/lib/cell/index.css +1 -1
  103. package/lib/cell/index.js +62 -40
  104. package/lib/cell/index.less +67 -12
  105. package/lib/cell/shared.js +2 -0
  106. package/lib/checkbox/index.css +1 -1
  107. package/lib/checkbox/index.less +18 -15
  108. package/lib/checkbox-group/index.js +1 -0
  109. package/lib/datetime-picker/style/index.js +1 -0
  110. package/lib/datetime-picker/style/less.js +1 -0
  111. package/lib/field/index.css +1 -1
  112. package/lib/field/index.js +94 -9
  113. package/lib/field/index.less +81 -11
  114. package/lib/hierarchy-select/hierarchySelect.js +1 -8
  115. package/lib/hierarchy-select/index.css +1 -1
  116. package/lib/hierarchy-select/index.js +6 -15
  117. package/lib/hierarchy-select/index.less +4 -5
  118. package/lib/hierarchy-select/markList.js +1 -16
  119. package/lib/icon/index.css +1 -1
  120. package/lib/image/index.css +1 -1
  121. package/lib/image-preview/ImagePreview.js +1 -1
  122. package/lib/image-preview/index.css +1 -1
  123. package/lib/image-preview/index.less +4 -2
  124. package/lib/index.css +1 -1
  125. package/lib/index.js +2 -6
  126. package/lib/index.less +3 -4
  127. package/lib/loading/index.css +1 -1
  128. package/lib/loading/index.js +3 -3
  129. package/lib/loading/index.less +1 -1
  130. package/lib/media-picker/image/PickFileIcon.js +2 -9
  131. package/lib/media-picker/image/PickPhotoIcon.js +2 -9
  132. package/lib/media-picker/image/TakeAudioIcon.js +2 -9
  133. package/lib/media-picker/image/TakePhotoIcon.js +2 -9
  134. package/lib/media-picker/image/TakeVideoIcon.js +2 -9
  135. package/lib/media-picker/index.css +1 -1
  136. package/lib/media-picker/index.js +22 -11
  137. package/lib/media-picker/index.less +6 -4
  138. package/lib/media-picker/style/index.js +4 -0
  139. package/lib/media-picker/style/less.js +4 -0
  140. package/lib/mixins/checkbox.js +12 -30
  141. package/lib/multiple-picker/index.css +1 -1
  142. package/lib/multiple-picker/index.js +19 -11
  143. package/lib/multiple-picker/index.less +11 -7
  144. package/lib/multiple-picker/style/index.js +1 -0
  145. package/lib/multiple-picker/style/less.js +1 -0
  146. package/lib/pdf-viewer/style/index.js +1 -0
  147. package/lib/pdf-viewer/style/less.js +1 -0
  148. package/lib/picker/index.css +1 -1
  149. package/lib/picker/index.js +19 -9
  150. package/lib/picker/index.less +18 -2
  151. package/lib/picker/style/index.js +1 -0
  152. package/lib/picker/style/less.js +1 -0
  153. package/lib/popup/index.css +1 -1
  154. package/lib/popup/index.js +120 -49
  155. package/lib/popup/index.less +31 -2
  156. package/lib/radio/index.css +1 -1
  157. package/lib/radio/index.less +24 -29
  158. package/lib/radio-group/index.js +1 -0
  159. package/lib/search/index.css +1 -1
  160. package/lib/search/index.js +1 -1
  161. package/lib/search/index.less +31 -3
  162. package/lib/signature/index.js +7 -6
  163. package/lib/signature/index.less +1 -1
  164. package/lib/step/index.css +1 -1
  165. package/lib/step/index.js +3 -5
  166. package/lib/step/index.less +3 -1
  167. package/lib/stepper/index.css +1 -1
  168. package/lib/steps/index.css +1 -1
  169. package/lib/steps/index.less +3 -3
  170. package/lib/style/reset.css +1 -1
  171. package/lib/style/var.less +106 -62
  172. package/lib/switch-cell/index.css +1 -1
  173. package/lib/tabs/Title.js +6 -1
  174. package/lib/tabs/index.css +1 -1
  175. package/lib/tabs/index.js +2 -4
  176. package/lib/tabs/index.less +18 -15
  177. package/lib/toast/index.css +1 -1
  178. package/lib/uploader/index.css +1 -1
  179. package/lib/zart.js +1199 -2181
  180. package/lib/zart.min.js +4 -4
  181. package/package.json +5 -6
  182. package/es/pdf-viewer-v2/index.css +0 -1
  183. package/es/pdf-viewer-v2/index.js +0 -231
  184. package/es/pdf-viewer-v2/index.less +0 -40
  185. package/es/pdf-viewer-v2/style/index.js +0 -8
  186. package/es/pdf-viewer-v2/style/less.js +0 -8
  187. package/lib/pdf-viewer-v2/index.css +0 -1
  188. package/lib/pdf-viewer-v2/index.js +0 -242
  189. package/lib/pdf-viewer-v2/index.less +0 -40
  190. package/lib/pdf-viewer-v2/style/index.js +0 -8
  191. package/lib/pdf-viewer-v2/style/less.js +0 -8
@@ -165,6 +165,9 @@ export default createComponent({
165
165
  this.currentDate = date;
166
166
  this.scrollIntoView();
167
167
  },
168
+ onCancel: function onCancel() {
169
+ this.$emit('cancel');
170
+ },
168
171
  init: function init() {
169
172
  var _this = this;
170
173
 
@@ -455,7 +458,22 @@ export default createComponent({
455
458
 
456
459
  if (this.showConfirm) {
457
460
  var text = this.buttonDisabled ? this.confirmDisabledText : this.confirmText;
458
- return h(Button, {
461
+ return [h(Button, {
462
+ "attrs": {
463
+ "block": true,
464
+ "color": this.color,
465
+ "disabled": this.buttonDisabled,
466
+ "nativeType": "button"
467
+ },
468
+ "class": bem('confirm'),
469
+ "on": {
470
+ "click": this.onCancel
471
+ },
472
+ "style": {
473
+ marginRight: "4px",
474
+ backgroundColor: "white"
475
+ }
476
+ }, [text || '取消']), h(Button, {
459
477
  "attrs": {
460
478
  "block": true,
461
479
  "type": "primary",
@@ -466,8 +484,11 @@ export default createComponent({
466
484
  "class": bem('confirm'),
467
485
  "on": {
468
486
  "click": this.onConfirm
487
+ },
488
+ "style": {
489
+ marginLeft: "4px"
469
490
  }
470
- }, [text || t('confirm')]);
491
+ }, [text || t('confirm')])];
471
492
  }
472
493
  },
473
494
  genFooter: function genFooter() {
@@ -513,8 +534,6 @@ export default createComponent({
513
534
  var h = arguments[0];
514
535
 
515
536
  if (this.poppable) {
516
- var _attrs;
517
-
518
537
  var createListener = function createListener(name) {
519
538
  return function () {
520
539
  return _this5.$emit(name);
@@ -522,11 +541,15 @@ export default createComponent({
522
541
  };
523
542
 
524
543
  return h(Popup, {
525
- "attrs": (_attrs = {
526
- "round": true,
527
- "value": this.value
528
- }, _attrs["round"] = this.round, _attrs["position"] = this.position, _attrs["closeable"] = this.showTitle || this.showSubtitle, _attrs["getContainer"] = this.getContainer, _attrs["closeOnPopstate"] = this.closeOnPopstate, _attrs["closeOnClickOverlay"] = this.closeOnClickOverlay, _attrs),
529
544
  "class": bem('popup'),
545
+ "attrs": {
546
+ "value": this.value,
547
+ "round": this.round,
548
+ "position": this.position,
549
+ "getContainer": this.getContainer,
550
+ "closeOnPopstate": this.closeOnPopstate,
551
+ "closeOnClickOverlay": this.closeOnClickOverlay
552
+ },
530
553
  "on": {
531
554
  "input": this.togglePopup,
532
555
  "open": createListener('open'),
@@ -6,6 +6,7 @@
6
6
  flex-direction: column;
7
7
  height: 100%;
8
8
  background-color: @calendar-background-color;
9
+ color: #2D4B73;
9
10
 
10
11
  &__popup {
11
12
  &.zt-popup--top,
@@ -31,12 +32,17 @@
31
32
 
32
33
  &__header-title {
33
34
  height: @calendar-header-title-height;
34
- font-weight: @base-font-weight;
35
+ font-weight: 400;
35
36
  line-height: @calendar-header-title-height;
36
- text-align: left;
37
- padding-left: @padding-md;
38
37
  position: relative;
39
-
38
+ color: #2D4B73;
39
+ font-size: 14px;
40
+ line-height: 20px;
41
+ opacity: 0.4;
42
+ display: flex;
43
+ justify-content: center;
44
+ align-items: center;
45
+ border-bottom: 1px solid rgba(45,75,115,0.10);
40
46
  }
41
47
 
42
48
  &__header-title .hint-block {
@@ -47,6 +53,7 @@
47
53
  width: 4px;
48
54
  height: 16px;
49
55
  background: #0091fa;
56
+
50
57
  }
51
58
 
52
59
  &__header-title::after {
@@ -71,9 +78,6 @@
71
78
  text-align: center;
72
79
  }
73
80
 
74
- &__header-title {
75
- font-size: @calendar-header-title-font-size;
76
- }
77
81
 
78
82
  &__header-subtitle {
79
83
  font-size: @calendar-header-subtitle-font-size;
@@ -235,8 +239,11 @@
235
239
 
236
240
  &__footer {
237
241
  flex-shrink: 0;
238
- padding-bottom: constant(safe-area-inset-bottom);
239
- padding-bottom: env(safe-area-inset-bottom);
242
+ // padding-bottom: constant(safe-area-inset-bottom);
243
+ // padding-bottom: env(safe-area-inset-bottom);
244
+ display: flex;
245
+ padding: 8px 16px 8px 16px;
246
+ border-top: 1px solid rgba(45,75,115,0.10);
240
247
 
241
248
  &--unfit {
242
249
  padding-bottom: 0;
@@ -244,7 +251,6 @@
244
251
  }
245
252
 
246
253
  &__confirm {
247
- border-radius: 0px;
248
254
  //height: @calendar-confirm-button-height;
249
255
  //margin: @calendar-confirm-button-margin;
250
256
  }
package/es/cell/index.css CHANGED
@@ -1 +1 @@
1
- .zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;overflow:hidden;color:rgba(0,0,0,.6);font-size:16px;line-height:24px;background-color:#fff}.zt-cell--noFlex{display:block}.zt-cell--noFlex .zt-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt-cell::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#000;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__placeholder{color:#c8c9cc;-webkit-box-flex:1;-webkit-flex:1;flex:1;text-align:right}.zt-cell__value{position:relative;overflow:hidden;color:#000;text-align:right;vertical-align:middle;word-wrap:break-word}.zt-cell__value--alone{color:rgba(0,0,0,.6);text-align:left}.zt-cell__left-icon,.zt-cell__right-icon{height:24px;font-size:16px;line-height:24px}.zt-cell__left-icon{margin-right:4px}.zt-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt-cell--clickable{cursor:pointer}.zt-cell--clickable:active{background-color:rgba(0,0,0,.04)}.zt-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell--large{padding-top:12px;padding-bottom:12px}.zt-cell--large .zt-cell__title{font-size:16px}.zt-cell--large .zt-cell__label{font-size:14px}
1
+ .zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:16px;line-height:20px;background-color:#fff}.zt-cell--noFlex{display:block}.zt-cell--noFlex .zt-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__title-content,.zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt-cell__value{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__placeholder{color:#c8c9cc;-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word}.zt-cell__value--alone{color:rgba(0,0,0,.6);text-align:left}.zt-cell__left-icon,.zt-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt-cell__left-icon{margin-right:4px}.zt-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell--large{padding-top:12px;padding-bottom:12px}.zt-cell--large .zt-cell__title{font-size:16px}.zt-cell--large .zt-cell__label{font-size:14px}.zt-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;background-color:#f5faff;font-size:14px;line-height:20px}.zt-cell__direction-column .zt-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell__direction-column .zt-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__direction-column .zt-cell__title-subtitle{display:-webkit-box;display:-webkit-flex;display:flex;white-space:nowrap;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;flex:1;opacity:.4}.zt-cell__direction-column .zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;text-align:left;min-height:44px;padding:12px;box-sizing:border-box;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt-cell__direction-column .zt-cell__value .zt-icon{-webkit-box-flex:2;-webkit-flex:2;flex:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__direction-column .zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt-cell__clickable{cursor:pointer}.zt-cell__clickable:active{background-color:rgba(0,0,0,.04)}
package/es/cell/index.js CHANGED
@@ -21,27 +21,65 @@ function Cell(h, props, slots, ctx) {
21
21
  label = props.label,
22
22
  value = props.value,
23
23
  isLink = props.isLink,
24
- placeholder = props.placeholder;
25
- var showTitle = slots.title || isDef(title);
24
+ placeholder = props.placeholder,
25
+ direction = props.direction,
26
+ subtitle = props.subtitle;
27
+ var showTitle = slots.title || isDef(title) || icon || slots.icon;
28
+ var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
26
29
 
27
30
  function Label() {
28
31
  var showLabel = slots.label || isDef(label);
29
32
 
30
- if (showLabel) {
33
+ if (showLabel && direction !== "column") {
31
34
  return h("div", {
32
35
  "class": [bem('label'), props.labelClass]
33
36
  }, [slots.label ? slots.label() : label]);
34
37
  }
35
38
  }
36
39
 
40
+ function LeftIcon() {
41
+ if (slots.icon) {
42
+ return slots.icon();
43
+ }
44
+
45
+ if (icon) {
46
+ return h(Icon, {
47
+ "class": bem('left-icon'),
48
+ "attrs": {
49
+ "name": icon,
50
+ "classPrefix": props.iconPrefix
51
+ }
52
+ });
53
+ }
54
+ } // 渲染副标题
55
+
56
+
57
+ function renderSubTitle() {
58
+ if (direction === "column") {
59
+ if (slots != null && slots.subtitle) {
60
+ return h("div", {
61
+ "class": bem('title-subtitle')
62
+ }, [slots == null ? void 0 : slots.subtitle()]);
63
+ }
64
+
65
+ if (subtitle) {
66
+ return h("div", {
67
+ "class": bem('title-subtitle')
68
+ }, [subtitle]);
69
+ }
70
+ }
71
+ }
72
+
37
73
  function Title() {
38
74
  if (showTitle) {
39
75
  return h("div", {
40
76
  "class": [bem('title'), props.titleClass],
41
77
  "style": props.titleStyle
42
- }, [slots.title ? slots.title() : h("span", [title]), Label(), props.required ? h("span", {
78
+ }, [LeftIcon(), slots.title ? slots.title() : h("span", {
79
+ "class": bem('title-content')
80
+ }, [title, Label()]), props.required ? h("span", {
43
81
  "style": "color:#ff5023;margin-left:4px;"
44
- }, ["*"]) : ""]);
82
+ }, ["*"]) : "", renderSubTitle()]);
45
83
  }
46
84
  }
47
85
 
@@ -55,36 +93,6 @@ function Cell(h, props, slots, ctx) {
55
93
  }
56
94
  }
57
95
 
58
- function Value() {
59
- var showValue = slots.default || isDef(value);
60
-
61
- if (showValue) {
62
- return h("div", {
63
- "class": [bem('value', {
64
- alone: !showTitle
65
- }), props.valueClass]
66
- }, [slots.default ? slots.default() : value !== "" ? h("span", [value]) : PlaceholderSpan()]);
67
- } else {
68
- return PlaceholderSpan();
69
- }
70
- }
71
-
72
- function LeftIcon() {
73
- if (slots.icon) {
74
- return slots.icon();
75
- }
76
-
77
- if (icon) {
78
- return h(Icon, {
79
- "class": bem('left-icon'),
80
- "attrs": {
81
- "name": icon,
82
- "classPrefix": props.iconPrefix
83
- }
84
- });
85
- }
86
- }
87
-
88
96
  function RightIcon() {
89
97
  var rightIconSlot = slots['right-icon'];
90
98
 
@@ -97,20 +105,34 @@ function Cell(h, props, slots, ctx) {
97
105
  return h(Icon, {
98
106
  "class": bem('right-icon'),
99
107
  "attrs": {
100
- "name": arrowDirection ? "arrow-" + arrowDirection : 'arrow'
108
+ "name": arrowDirection ? "arrow-" + arrowDirection : 'arrow-right'
101
109
  }
102
110
  });
103
111
  }
104
112
  }
105
113
 
114
+ function Value() {
115
+ var showValue = slots.default || isDef(value) || clickable || slots['right-icon'];
116
+
117
+ if (showValue) {
118
+ return h("div", {
119
+ "class": [bem('value', {
120
+ alone: !showTitle
121
+ }), props.valueClass, direction === 'column' && clickable ? bem('clickable') : '']
122
+ }, [slots.default ? slots.default() : value !== "" ? h("span", {
123
+ "class": bem('value-content')
124
+ }, [value]) : PlaceholderSpan(), slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
125
+ } else {
126
+ return PlaceholderSpan();
127
+ }
128
+ }
129
+
106
130
  function onClick(event) {
107
131
  emit(ctx, 'click', event);
108
132
  functionalRoute(ctx);
109
133
  }
110
134
 
111
- var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
112
135
  var classes = {
113
- clickable: clickable,
114
136
  center: props.center,
115
137
  // required: props.required,
116
138
  borderless: !props.border,
@@ -122,7 +144,7 @@ function Cell(h, props, slots, ctx) {
122
144
  }
123
145
 
124
146
  return h("div", _mergeJSXProps([{
125
- "class": bem(classes),
147
+ "class": [bem(classes), direction === 'column' ? bem('direction-column') : '', clickable && direction !== 'column' ? bem('clickable') : ''],
126
148
  "attrs": {
127
149
  "role": clickable ? 'button' : null,
128
150
  "tabindex": clickable ? 0 : null
@@ -130,7 +152,7 @@ function Cell(h, props, slots, ctx) {
130
152
  "on": {
131
153
  "click": onClick
132
154
  }
133
- }, inherit(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);
155
+ }, inherit(ctx)]), [Title(), Value()]);
134
156
  }
135
157
 
136
158
  Cell.props = _extends({}, cellProps, routeProps);
@@ -22,9 +22,9 @@
22
22
  }
23
23
  }
24
24
 
25
- &::after {
26
- .hairline-bottom(@cell-border-color, @padding-md, );
27
- }
25
+ // &::after {
26
+ // .hairline-bottom(@cell-border-color, @padding-md, );
27
+ // }
28
28
 
29
29
  &:last-child::after,
30
30
  &--borderless::after {
@@ -40,19 +40,27 @@
40
40
 
41
41
  &__title,
42
42
  &__value {
43
+ display: flex;
43
44
  flex: 1;
45
+ &-content {
46
+ flex: 18;
47
+ }
48
+
49
+ }
50
+ &__value {
51
+ justify-content: flex-end;
44
52
  }
45
53
 
46
54
  &__placeholder {
47
55
  color: @field-placeholder-text-color;
48
- flex: 1;
56
+ flex: 9;
49
57
  text-align: right;
50
58
  }
51
59
 
52
60
  &__value {
53
61
  position: relative;
54
62
  overflow: hidden;
55
- color: @cell-value-color;
63
+ color: @cell-text-color;
56
64
  text-align: right;
57
65
  vertical-align: middle;
58
66
  word-wrap: break-word;
@@ -80,13 +88,7 @@
80
88
  color: @cell-right-icon-color;
81
89
  }
82
90
 
83
- &--clickable {
84
- cursor: pointer;
85
-
86
- &:active {
87
- background-color: @cell-active-color;
88
- }
89
- }
91
+
90
92
 
91
93
  &--center {
92
94
  align-items: center;
@@ -105,3 +107,56 @@
105
107
  }
106
108
  }
107
109
  }
110
+
111
+ .zt-cell__direction-column {
112
+ flex-direction: column;
113
+ background-color: #f5faff;
114
+ font-size: 14px;
115
+ line-height: 20px;
116
+ .zt-cell__title {
117
+ margin-bottom: 8px;
118
+ display: flex;
119
+ align-items: center;
120
+ &-content {
121
+ white-space: nowrap;
122
+ overflow: hidden;
123
+ text-overflow: ellipsis;
124
+ flex: 1;
125
+ }
126
+ &-subtitle {
127
+ display: flex;
128
+ white-space: nowrap;
129
+ justify-content: flex-end;
130
+ flex: 1;
131
+ opacity: 0.4;
132
+ }
133
+ }
134
+
135
+ .zt-cell__value {
136
+ display: flex;
137
+ text-align: left;
138
+ min-height: 44px;
139
+ padding: 12px;
140
+ box-sizing: border-box;
141
+ background-color: white;
142
+ align-items: center;
143
+ justify-content: flex-start;
144
+ .zt-icon {
145
+ flex: 2;
146
+ display: flex;
147
+ justify-content: flex-end;
148
+ }
149
+ &-content {
150
+ flex: 18;
151
+ word-break: break-all;
152
+ }
153
+ }
154
+ }
155
+
156
+
157
+ .zt-cell__clickable {
158
+ cursor: pointer;
159
+ &:active {
160
+ background-color: @cell-active-color;
161
+ }
162
+ }
package/es/cell/shared.js CHANGED
@@ -14,6 +14,8 @@ export var cellProps = {
14
14
  value: [Number, String],
15
15
  label: [Number, String],
16
16
  arrowDirection: String,
17
+ direction: String,
18
+ subtitle: String,
17
19
  border: {
18
20
  type: Boolean,
19
21
  default: true
@@ -1 +1 @@
1
- .zt-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:10px 0}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-left:12px}.zt-checkbox__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:24px;line-height:1em;cursor:pointer}.zt-checkbox__icon i,.zt-checkbox__icon img{-webkit-transform:scale(.8333);transform:scale(.8333);-webkit-transform-origin:center;transform-origin:center}.zt-checkbox__icon .zt-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid #c8c9cc;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{border-radius:100%}.zt-checkbox__icon--checked .zt-icon{color:#fff;background-color:#0091fa;border-color:#0091fa}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{background-color:rgba(0,0,0,.1);border-color:#c8c9cc}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:.4;background-color:#0091fa;color:#fff}.zt-checkbox__label{margin-left:8px;color:#000;line-height:24px}.zt-checkbox__label--left{margin:0 8px 0 0}.zt-checkbox__label--disabled{color:#c8c9cc}
1
+ .zt-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:14px 0}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-left:12px}.zt-checkbox__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:20px;line-height:1em;cursor:pointer}.zt-checkbox__icon .zt-icon{display:block;box-sizing:border-box;width:1em;height:1em;color:transparent;font-size:1em;line-height:.95em;text-align:center;background-image:-webkit-linear-gradient(315deg,#e6ebf0 0,#fff 100%);background-image:linear-gradient(135deg,#e6ebf0 0,#fff 100%);border:1px solid rgba(45,75,115,.13);box-shadow:-1px -1px 2px 0 #fff,0 0 3px 0 rgba(45,75,115,.2);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;border-radius:100%}.zt-checkbox__icon--checked .zt-icon{color:#fff;background:#0091fa;box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.2);border:1px solid rgba(255,255,255,.5)}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{border:1px solid rgba(255,255,255,.5);box-shadow:-1px -1px 2px 0 #fff,0 0 3px 0 rgba(45,75,115,.2);background-image:-webkit-linear-gradient(316deg,#e1e6eb 0,#e5edf5 100%);background-image:linear-gradient(134deg,#e1e6eb 0,#e5edf5 100%)}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:.4;background:#0091fa;color:#fff}.zt-checkbox__label{margin-left:8px;color:#000;line-height:20px}.zt-checkbox__label--left{margin:0 8px 0 0}.zt-checkbox__label--disabled{color:#c8c9cc}
@@ -2,7 +2,6 @@
2
2
 
3
3
  .zt-checkbox {
4
4
  display: flex;
5
- align-items: center;
6
5
  overflow: hidden;
7
6
  cursor: pointer;
8
7
  user-select: none;
@@ -26,27 +25,28 @@
26
25
  font-size: @checkbox-size;
27
26
  line-height: 1em;
28
27
  cursor: pointer;
29
- i, img {
30
- transform: scale(0.8333);
31
- transform-origin: center;
32
- }
33
28
 
34
29
  .zt-icon {
35
30
  display: block;
36
31
  box-sizing: border-box;
37
- width: 1.25em;
38
- height: 1.25em;
32
+ width: 1em;
33
+ height: 1em;
39
34
  color: transparent;
40
- font-size: 0.8em;
41
- line-height: 1.25;
35
+ font-size: 1em;
36
+ line-height: 0.95em;
42
37
  text-align: center;
43
- border: 1px solid @checkbox-border-color;
38
+ background-image: @gradient-white-1;
39
+ border: 1px solid @radio-border-color;
40
+ box-shadow: -1px -1px 2px 0 #FFF, 0 0 3px 0 rgba(45,75,115,0.20);
44
41
  transition-duration: @checkbox-transition-duration;
45
42
  transition-property: color, border-color, background-color;
46
43
  }
47
44
 
48
45
  &--round {
49
46
  .zt-icon {
47
+ display: flex;
48
+ justify-content: center;
49
+ align-items: center;
50
50
  border-radius: 100%;
51
51
  }
52
52
  }
@@ -54,8 +54,9 @@
54
54
  &--checked {
55
55
  .zt-icon {
56
56
  color: @white;
57
- background-color: @checkbox-checked-icon-color;
58
- border-color: @checkbox-checked-icon-color;
57
+ background: @checkbox-checked-icon-color;
58
+ box-shadow: inset 1px 1px 2px 0 @gray-a2;
59
+ border: 1px solid rgba(255,255,255,0.50);
59
60
  }
60
61
  }
61
62
 
@@ -63,15 +64,16 @@
63
64
  cursor: not-allowed;
64
65
 
65
66
  .zt-icon {
66
- background-color: @checkbox-disabled-background-color;
67
- border-color: @checkbox-disabled-icon-color;
67
+ border: 1px solid @checkbox-disabled-border-color;
68
+ box-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45,75,115,0.20);
69
+ background-image: @gradient-white;
68
70
  }
69
71
  }
70
72
 
71
73
  &--disabled&--checked {
72
74
  .zt-icon {
73
75
  opacity: .4;
74
- background-color: @checkbox-checked-icon-color;
76
+ background: @radio-checked-icon-color;
75
77
  color: @white;
76
78
  }
77
79
  }
@@ -91,3 +93,4 @@
91
93
  }
92
94
  }
93
95
  }
96
+
@@ -14,6 +14,7 @@ export default createComponent({
14
14
  direction: String,
15
15
  iconSize: [Number, String],
16
16
  checkedColor: String,
17
+ boxShadow: String,
17
18
  value: {
18
19
  type: Array,
19
20
  default: function _default() {
@@ -4,4 +4,5 @@ import '../../info/index.css';
4
4
  import '../../icon/index.css';
5
5
  import '../../popup/index.css';
6
6
  import '../../loading/index.css';
7
+ import '../../button/index.css';
7
8
  import '../../picker/index.css';
@@ -4,4 +4,5 @@ import '../../info/index.less';
4
4
  import '../../icon/index.less';
5
5
  import '../../popup/index.less';
6
6
  import '../../loading/index.less';
7
+ import '../../button/index.less';
7
8
  import '../../picker/index.less';
@@ -1 +1 @@
1
- .zt-field__root{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:#fff;padding:10px 16px}.zt-field__root::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-field__root--borderless::after,.zt-field__root:last-child::after{display:none}.zt-field{padding:0;background-color:#fff}.zt-field::after{display:none}.zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;width:6.2em;margin-right:12px;color:#646566;text-align:left;word-wrap:break-word;vertical-align:middle}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field--disabled .zt-field__label{color:#c8c9cc}.zt-field__value{overflow:visible}.zt-field__body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-field__body input{caret-color:#0091fa}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:rgba(0,0,0,.6);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none}.zt-field__control::-webkit-input-placeholder{color:#c8c9cc}.zt-field__control::placeholder{color:#c8c9cc}.zt-field__control:disabled{color:#c8c9cc;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#c8c9cc}.zt-field__control:read-only{cursor:default}.zt-field__control--center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.zt-field__control--right{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;text-align:right}.zt-field__control--custom{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:24px}.zt-field__control[type=date],.zt-field__control[type=datetime-local],.zt-field__control[type=time]{min-height:24px}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__button,.zt-field__clear,.zt-field__icon,.zt-field__right-icon{-webkit-flex-shrink:0;flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:-8px;padding:0 8px;line-height:inherit}.zt-field__zt-clear-icon{margin-right:-8px;padding:0 8px;height:20px}.zt-field__clear{color:#c8c9cc;font-size:16px;cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:16px;line-height:inherit}.zt-field__zt-left-icon{margin-right:4px;height:20px}.zt-field__zt-clear-size,.zt-field__zt-left-icon-size{width:20px;height:20px}.zt-field__left-icon{margin-right:4px}.zt-field__right-icon{color:#969799}.zt-field__button{padding-left:8px}.zt-field__error-message{position:relative;background-color:rgba(230,35,20,.08);margin-top:10px;padding:5px 8px;color:#ff5023;font-size:12px;line-height:20px;text-align:left;word-break:break-all}.zt-field__error-message::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:0;left:0;border-top:1px solid #ff5023;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:4px;color:#646566;font-size:12px;line-height:16px;text-align:left}.zt-field--error .zt-field__control::-webkit-input-placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error .zt-field__control,.zt-field--error .zt-field__control::placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error-label span{color:#ff5023}
1
+ .zt-field__root{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:#fff;padding:10px 16px}.zt-field__root--borderless::after,.zt-field__root:last-child::after{display:none}.zt-field{padding:0;font-size:14px;line-height:20px}.zt-field::after{display:none}.zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;margin-right:12px;color:#646566;text-align:left;word-wrap:break-word;vertical-align:middle;-webkit-box-flex:4;-webkit-flex:4;flex:4}.zt-field__label-content{color:#2d4b73}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field--disabled .zt-field__label{color:#c8c9cc}.zt-field__value{overflow:visible;-webkit-box-flex:6;-webkit-flex:6;flex:6;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-field__body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;width:100%}.zt-field__body input{caret-color:#0091fa}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:#2d4b73;line-height:inherit;background-color:transparent;border:0;resize:none;font-size:14px}.zt-field__control::-webkit-input-placeholder{color:#c8c9cc}.zt-field__control::placeholder{color:#c8c9cc}.zt-field__control:disabled{color:#c8c9cc;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#c8c9cc}.zt-field__control:read-only{cursor:default}.zt-field__control--center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.zt-field__control--right{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;text-align:right}.zt-field__control--custom{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:20px}.zt-field__control[type=date],.zt-field__control[type=datetime-local],.zt-field__control[type=time]{min-height:20px}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__button,.zt-field__clear,.zt-field__icon,.zt-field__right-icon{-webkit-flex-shrink:0;flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:-8px;padding:0 8px;line-height:inherit}.zt-field__zt-clear-icon{margin-right:-8px;padding:0 8px;height:20px}.zt-field__clear{color:#c8c9cc;font-size:16px;cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:16px;line-height:inherit}.zt-field__zt-left-icon{margin-right:4px;height:20px}.zt-field__zt-clear-size,.zt-field__zt-left-icon-size{width:20px;height:20px;color:rgba(45,75,115,.4)}.zt-field__left-icon{margin-right:4px}.zt-field__right-icon{color:#969799}.zt-field__button{padding:0 8px 0 8px}.zt-field__error-message{position:relative;background-color:rgba(230,35,20,.08);margin-top:0;padding:5px 8px;color:#ff5023;font-size:12px;line-height:20px;text-align:left;word-break:break-all}.zt-field__error-message::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:0;left:0;border-top:1px solid #ff5023;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{color:#646566;font-size:12px;line-height:20px;text-align:left}.zt-field--error .zt-field__control::-webkit-input-placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error .zt-field__control,.zt-field--error .zt-field__control::placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error-label span{color:#ff5023}.zt-field__column{background-color:#f5faff}.zt-field__column .zt-field__label{margin-right:0;line-height:20px}.zt-field__column .zt-field__label-content{color:#2d4b73}.zt-field__column .zt-field__right-icon-box{position:absolute;right:12px;bottom:12px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-field__column .zt-field__right-icon-box-row{-webkit-flex-shrink:0;flex-shrink:0}.zt-field__column .zt-field__value{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt-field__column .zt-field__value .zt-field__body{-webkit-box-flex:8;-webkit-flex:8;flex:8}.zt-field__column .zt-field__value .zt-field__body textarea{padding-bottom:16px}.zt-field__column .zt-field__word-limit{position:absolute;bottom:12px}.zt-field__column .zt-field__no-error{background:rgba(45,75,115,.04);color:rgba(45,75,115,.6)}.zt-field__column .zt-field__no-error::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:0;left:0;border-top:1px solid #000;-webkit-transform:scaleY(.5);transform:scaleY(.5);opacity:.2}