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
package/lib/cell/index.js CHANGED
@@ -34,27 +34,65 @@ function Cell(h, props, slots, ctx) {
34
34
  label = props.label,
35
35
  value = props.value,
36
36
  isLink = props.isLink,
37
- placeholder = props.placeholder;
38
- var showTitle = slots.title || (0, _utils.isDef)(title);
37
+ placeholder = props.placeholder,
38
+ direction = props.direction,
39
+ subtitle = props.subtitle;
40
+ var showTitle = slots.title || (0, _utils.isDef)(title) || icon || slots.icon;
41
+ var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
39
42
 
40
43
  function Label() {
41
44
  var showLabel = slots.label || (0, _utils.isDef)(label);
42
45
 
43
- if (showLabel) {
46
+ if (showLabel && direction !== "column") {
44
47
  return h("div", {
45
48
  "class": [bem('label'), props.labelClass]
46
49
  }, [slots.label ? slots.label() : label]);
47
50
  }
48
51
  }
49
52
 
53
+ function LeftIcon() {
54
+ if (slots.icon) {
55
+ return slots.icon();
56
+ }
57
+
58
+ if (icon) {
59
+ return h(_icon.default, {
60
+ "class": bem('left-icon'),
61
+ "attrs": {
62
+ "name": icon,
63
+ "classPrefix": props.iconPrefix
64
+ }
65
+ });
66
+ }
67
+ } // 渲染副标题
68
+
69
+
70
+ function renderSubTitle() {
71
+ if (direction === "column") {
72
+ if (slots != null && slots.subtitle) {
73
+ return h("div", {
74
+ "class": bem('title-subtitle')
75
+ }, [slots == null ? void 0 : slots.subtitle()]);
76
+ }
77
+
78
+ if (subtitle) {
79
+ return h("div", {
80
+ "class": bem('title-subtitle')
81
+ }, [subtitle]);
82
+ }
83
+ }
84
+ }
85
+
50
86
  function Title() {
51
87
  if (showTitle) {
52
88
  return h("div", {
53
89
  "class": [bem('title'), props.titleClass],
54
90
  "style": props.titleStyle
55
- }, [slots.title ? slots.title() : h("span", [title]), Label(), props.required ? h("span", {
91
+ }, [LeftIcon(), slots.title ? slots.title() : h("span", {
92
+ "class": bem('title-content')
93
+ }, [title, Label()]), props.required ? h("span", {
56
94
  "style": "color:#ff5023;margin-left:4px;"
57
- }, ["*"]) : ""]);
95
+ }, ["*"]) : "", renderSubTitle()]);
58
96
  }
59
97
  }
60
98
 
@@ -68,36 +106,6 @@ function Cell(h, props, slots, ctx) {
68
106
  }
69
107
  }
70
108
 
71
- function Value() {
72
- var showValue = slots.default || (0, _utils.isDef)(value);
73
-
74
- if (showValue) {
75
- return h("div", {
76
- "class": [bem('value', {
77
- alone: !showTitle
78
- }), props.valueClass]
79
- }, [slots.default ? slots.default() : value !== "" ? h("span", [value]) : PlaceholderSpan()]);
80
- } else {
81
- return PlaceholderSpan();
82
- }
83
- }
84
-
85
- function LeftIcon() {
86
- if (slots.icon) {
87
- return slots.icon();
88
- }
89
-
90
- if (icon) {
91
- return h(_icon.default, {
92
- "class": bem('left-icon'),
93
- "attrs": {
94
- "name": icon,
95
- "classPrefix": props.iconPrefix
96
- }
97
- });
98
- }
99
- }
100
-
101
109
  function RightIcon() {
102
110
  var rightIconSlot = slots['right-icon'];
103
111
 
@@ -110,20 +118,34 @@ function Cell(h, props, slots, ctx) {
110
118
  return h(_icon.default, {
111
119
  "class": bem('right-icon'),
112
120
  "attrs": {
113
- "name": arrowDirection ? "arrow-" + arrowDirection : 'arrow'
121
+ "name": arrowDirection ? "arrow-" + arrowDirection : 'arrow-right'
114
122
  }
115
123
  });
116
124
  }
117
125
  }
118
126
 
127
+ function Value() {
128
+ var showValue = slots.default || (0, _utils.isDef)(value) || clickable || slots['right-icon'];
129
+
130
+ if (showValue) {
131
+ return h("div", {
132
+ "class": [bem('value', {
133
+ alone: !showTitle
134
+ }), props.valueClass, direction === 'column' && clickable ? bem('clickable') : '']
135
+ }, [slots.default ? slots.default() : value !== "" ? h("span", {
136
+ "class": bem('value-content')
137
+ }, [value]) : PlaceholderSpan(), slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
138
+ } else {
139
+ return PlaceholderSpan();
140
+ }
141
+ }
142
+
119
143
  function onClick(event) {
120
144
  (0, _functional.emit)(ctx, 'click', event);
121
145
  (0, _router.functionalRoute)(ctx);
122
146
  }
123
147
 
124
- var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
125
148
  var classes = {
126
- clickable: clickable,
127
149
  center: props.center,
128
150
  // required: props.required,
129
151
  borderless: !props.border,
@@ -135,7 +157,7 @@ function Cell(h, props, slots, ctx) {
135
157
  }
136
158
 
137
159
  return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
138
- "class": bem(classes),
160
+ "class": [bem(classes), direction === 'column' ? bem('direction-column') : '', clickable && direction !== 'column' ? bem('clickable') : ''],
139
161
  "attrs": {
140
162
  "role": clickable ? 'button' : null,
141
163
  "tabindex": clickable ? 0 : null
@@ -143,7 +165,7 @@ function Cell(h, props, slots, ctx) {
143
165
  "on": {
144
166
  "click": onClick
145
167
  }
146
- }, (0, _functional.inherit)(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);
168
+ }, (0, _functional.inherit)(ctx)]), [Title(), Value()]);
147
169
  }
148
170
 
149
171
  Cell.props = (0, _extends2.default)({}, _shared.cellProps, _router.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
+ }
@@ -18,6 +18,8 @@ var cellProps = {
18
18
  value: [Number, String],
19
19
  label: [Number, String],
20
20
  arrowDirection: String,
21
+ direction: String,
22
+ subtitle: String,
21
23
  border: {
22
24
  type: Boolean,
23
25
  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
+
@@ -21,6 +21,7 @@ var _default2 = createComponent({
21
21
  direction: String,
22
22
  iconSize: [Number, String],
23
23
  checkedColor: String,
24
+ boxShadow: String,
24
25
  value: {
25
26
  type: Array,
26
27
  default: function _default() {
@@ -4,4 +4,5 @@ require('../../info/index.css');
4
4
  require('../../icon/index.css');
5
5
  require('../../popup/index.css');
6
6
  require('../../loading/index.css');
7
+ require('../../button/index.css');
7
8
  require('../../picker/index.css');
@@ -4,4 +4,5 @@ require('../../info/index.less');
4
4
  require('../../icon/index.less');
5
5
  require('../../popup/index.less');
6
6
  require('../../loading/index.less');
7
+ require('../../button/index.less');
7
8
  require('../../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}
@@ -67,7 +67,10 @@ var _default = createComponent({
67
67
  labelWidth: [Number, String],
68
68
  labelClass: null,
69
69
  labelAlign: String,
70
- inputAlign: String,
70
+ inputAlign: {
71
+ type: String,
72
+ default: 'left'
73
+ },
71
74
  placeholder: String,
72
75
  errorMessage: String,
73
76
  errorMessageAlign: String,
@@ -84,7 +87,7 @@ var _default = createComponent({
84
87
  },
85
88
  error: {
86
89
  type: Boolean,
87
- default: null
90
+ default: false
88
91
  },
89
92
  colon: {
90
93
  type: Boolean,
@@ -541,7 +544,10 @@ var _default = createComponent({
541
544
  "on": {
542
545
  "click": this.onClickLeftIcon
543
546
  }
544
- }, [h(_SearchIcon.default, {
547
+ }, [h(_icon.default, {
548
+ "attrs": {
549
+ "name": "search"
550
+ },
545
551
  "class": bem('zt-left-icon-size')
546
552
  })]);
547
553
  } else if (this.leftIcon) {
@@ -601,7 +607,7 @@ var _default = createComponent({
601
607
  if (message) {
602
608
  var errorMessageAlign = this.getProp('errorMessageAlign');
603
609
  return h("div", {
604
- "class": bem('error-message', errorMessageAlign)
610
+ "class": [bem('error-message', errorMessageAlign), this.error ? '' : bem('no-error')]
605
611
  }, [message]);
606
612
  }
607
613
  },
@@ -623,12 +629,14 @@ var _default = createComponent({
623
629
  }
624
630
 
625
631
  if (this.label) {
626
- return h("span", [this.label + colon]);
632
+ return h("span", {
633
+ "class": bem('label-content')
634
+ }, [this.label + colon]);
627
635
  }
628
636
  }
629
637
  },
630
638
  render: function render() {
631
- var _bem;
639
+ var _bem2;
632
640
 
633
641
  var h = arguments[0];
634
642
  var slots = this.slots;
@@ -653,6 +661,82 @@ var _default = createComponent({
653
661
  };
654
662
  }
655
663
 
664
+ if (this.direction === 'column') {
665
+ var _bem;
666
+
667
+ return h("div", {
668
+ "class": [bem('root'), bem("column")]
669
+ }, [h(_cell.default, {
670
+ "attrs": {
671
+ "icon": this.leftIcon,
672
+ "size": this.size,
673
+ "center": this.center,
674
+ "border": this.border,
675
+ "isLink": this.isLink,
676
+ "required": this.required,
677
+ "clickable": this.clickable,
678
+ "titleStyle": this.labelStyle,
679
+ "valueClass": bem('value'),
680
+ "titleClass": [bem('label', labelAlign), this.labelClass, {
681
+ 'zt-field--error-label': this.showErrorMessage
682
+ }],
683
+ "arrowDirection": this.arrowDirection,
684
+ "noFlex": this.type === 'textarea',
685
+ "direction": this.direction
686
+ },
687
+ "scopedSlots": scopedSlots,
688
+ "class": bem((_bem = {
689
+ error: this.showError,
690
+ disabled: disabled
691
+ }, _bem["label-" + labelAlign] = labelAlign, _bem['min-height'] = this.type === 'textarea' && !this.autosize, _bem)),
692
+ "on": {
693
+ "click": this.onClick
694
+ }
695
+ }, [h("div", {
696
+ "class": bem('body')
697
+ }, [this.genInput(), this.showClear &&
698
+ /*<Icon
699
+ name="clear"
700
+ class={bem('clear')}
701
+ onTouchstart={this.onClear}
702
+ />*/
703
+ h("div", {
704
+ "class": bem('zt-clear-icon'),
705
+ "on": {
706
+ "touchstart": this.onClear,
707
+ "click": this.onClear
708
+ }
709
+ }, [h(_ClearIcon.default, {
710
+ "class": bem('zt-clear-size'),
711
+ "attrs": {
712
+ "color": this.iconColor
713
+ }
714
+ })]), this.type === 'password' && h("div", {
715
+ "on": {
716
+ "click": this.togglePwdVisible
717
+ },
718
+ "style": "width:20px;height:20px;margin-left:12px;display:flex;justify-content:center;align-items:center;color:rgba(0,0,0,.4);"
719
+ }, [this.showPassword ? h(_icon.default, {
720
+ "attrs": {
721
+ "name": "eye-open",
722
+ "color": this.iconColor
723
+ }
724
+ }) : h(_icon.default, {
725
+ "attrs": {
726
+ "name": "eye-closed",
727
+ "color": this.iconColor
728
+ }
729
+ })]), this.genWordLimit(), this.type === "textarea" ? h("div", {
730
+ "class": bem("right-icon-box")
731
+ }, [this.genRightIcon(), slots('button') && h("div", {
732
+ "class": bem('button')
733
+ }, [slots('button')])]) : h("div", {
734
+ "class": bem("right-icon-box-row")
735
+ }, [this.genRightIcon(), slots('button') && h("div", {
736
+ "class": bem('button')
737
+ }, [slots('button')])])])]), this.genMessage()]);
738
+ }
739
+
656
740
  return h("div", {
657
741
  "class": bem('root')
658
742
  }, [h(_cell.default, {
@@ -670,13 +754,14 @@ var _default = createComponent({
670
754
  'zt-field--error-label': this.showErrorMessage
671
755
  }],
672
756
  "arrowDirection": this.arrowDirection,
673
- "noFlex": this.type === 'textarea'
757
+ "noFlex": this.type === 'textarea',
758
+ "direction": this.direction
674
759
  },
675
760
  "scopedSlots": scopedSlots,
676
- "class": bem((_bem = {
761
+ "class": bem((_bem2 = {
677
762
  error: this.showError,
678
763
  disabled: disabled
679
- }, _bem["label-" + labelAlign] = labelAlign, _bem['min-height'] = this.type === 'textarea' && !this.autosize, _bem)),
764
+ }, _bem2["label-" + labelAlign] = labelAlign, _bem2['min-height'] = this.type === 'textarea' && !this.autosize, _bem2)),
680
765
  "on": {
681
766
  "click": this.onClick
682
767
  }