bkui-vue 0.0.1-beta.330 → 0.0.1-beta.332

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 (48) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +76 -33
  3. package/dist/index.umd.js +26 -26
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/alert/alert.css +4 -0
  7. package/lib/alert/alert.less +24 -19
  8. package/lib/alert/alert.variable.css +4 -0
  9. package/lib/checkbox/checkbox.css +10 -6
  10. package/lib/checkbox/checkbox.less +38 -32
  11. package/lib/checkbox/checkbox.variable.css +10 -6
  12. package/lib/checkbox/index.js +1 -1
  13. package/lib/dialog/dialog.css +9 -9
  14. package/lib/dialog/dialog.less +1 -1
  15. package/lib/dialog/dialog.variable.css +9 -9
  16. package/lib/form/form-item.d.ts +14 -3
  17. package/lib/form/form.css +13 -7
  18. package/lib/form/form.less +61 -52
  19. package/lib/form/form.variable.css +13 -7
  20. package/lib/form/index.d.ts +11 -2
  21. package/lib/form/index.js +1 -1
  22. package/lib/form/type.d.ts +1 -2
  23. package/lib/form/utils.d.ts +2 -0
  24. package/lib/info-box/info-box.css +8 -8
  25. package/lib/info-box/info-box.less +8 -8
  26. package/lib/info-box/info-box.variable.css +8 -8
  27. package/lib/input/input.css +5 -2
  28. package/lib/input/input.less +3 -2
  29. package/lib/input/input.variable.css +5 -2
  30. package/lib/message/message.css +1 -1
  31. package/lib/message/message.less +1 -1
  32. package/lib/message/message.variable.css +1 -1
  33. package/lib/modal/modal.css +8 -8
  34. package/lib/modal/modal.variable.css +8 -8
  35. package/lib/pagination/pagination.less +9 -7
  36. package/lib/radio/index.js +1 -1
  37. package/lib/radio/radio.css +60 -63
  38. package/lib/radio/radio.less +74 -78
  39. package/lib/radio/radio.variable.css +60 -63
  40. package/lib/select/index.js +1 -1
  41. package/lib/shared/index.js +1 -1
  42. package/lib/table/index.js +1 -1
  43. package/lib/table/table.css +13 -6
  44. package/lib/table/table.less +6 -0
  45. package/lib/table/table.variable.css +13 -6
  46. package/lib/tree/tree.css +10 -6
  47. package/lib/tree/tree.variable.css +10 -6
  48. package/package.json +1 -1
@@ -59,9 +59,13 @@
59
59
  margin-top: -8px;
60
60
  margin-right: -10px;
61
61
  font-size: 12px;
62
+ color: #c4c6cc;
62
63
  white-space: nowrap;
63
64
  cursor: pointer;
64
65
  }
66
+ .bk-alert-close:hover {
67
+ color: #979ba5;
68
+ }
65
69
  .bk-alert-close-icon {
66
70
  line-height: 1;
67
71
  }
@@ -16,7 +16,7 @@
16
16
  @error-background-color: #ffeded;
17
17
  @error-icon-color: #ea3636;
18
18
 
19
- .bk-alert {
19
+ .@{bk-prefix}-alert {
20
20
  position: relative;
21
21
  font-size: @font-size-base;
22
22
  color: #63656e;
@@ -25,90 +25,95 @@
25
25
  border: @border-width-base @border-style-base;
26
26
  border-radius: @border-radius-base;
27
27
 
28
- .bk-alert-icon-info {
28
+ .@{bk-prefix}-alert-icon-info {
29
29
  display: flex; // 修复 svg 对不齐的问题(svg 是一个 inline 元素)
30
30
  margin-right: 8px;
31
31
  font-size: 16px;
32
32
  line-height: 1;
33
33
  }
34
34
 
35
-
35
+
36
36
  }
37
37
 
38
- .bk-alert-wraper {
38
+ .@{bk-prefix}-alert-wraper {
39
39
  display: flex;
40
40
  padding: 8px 10px;
41
41
  }
42
42
 
43
- .bk-alert-info {
43
+ .@{bk-prefix}-alert-info {
44
44
  background-color: @info-background-color;
45
45
  border-color: @info-border-color;
46
46
 
47
- .bk-alert-icon-info {
47
+ .@{bk-prefix}-alert-icon-info {
48
48
  color: @info-icon-color;
49
49
  }
50
50
  }
51
51
 
52
- .bk-alert-success {
52
+ .@{bk-prefix}-alert-success {
53
53
  background-color: @success-background-color;
54
54
  border-color: @success-border-color;
55
55
 
56
- .bk-alert-icon-info {
56
+ .@{bk-prefix}-alert-icon-info {
57
57
  color: @success-icon-color;
58
58
  }
59
59
  }
60
60
 
61
- .bk-alert-warning {
61
+ .@{bk-prefix}-alert-warning {
62
62
  background-color: @warning-background-color;
63
63
  border-color: @warning-border-color;
64
64
 
65
- .bk-alert-icon-info {
65
+ .@{bk-prefix}-alert-icon-info {
66
66
  color: @warning-icon-color;
67
67
  }
68
68
  }
69
69
 
70
- .bk-alert-error {
70
+ .@{bk-prefix}-alert-error {
71
71
  background-color: @error-background-color;
72
72
  border-color: @error-border-color;
73
73
 
74
- .bk-alert-icon-info {
74
+ .@{bk-prefix}-alert-icon-info {
75
75
  color: @error-icon-color;
76
76
  }
77
77
  }
78
78
 
79
- .bk-alert-content {
79
+ .@{bk-prefix}-alert-content {
80
80
  display: flex;
81
81
  flex: 1;
82
82
  flex-direction: column;
83
83
  overflow: hidden;
84
84
  }
85
85
 
86
- .bk-alert-title {
86
+ .@{bk-prefix}-alert-title {
87
87
  line-height: 16px;
88
88
  }
89
89
 
90
- .bk-alert-close {
90
+ .@{bk-prefix}-alert-close {
91
91
  padding: 8px 12px 0 6px;
92
92
  margin-top: -8px;
93
93
  margin-right: -10px;
94
94
  font-size: 12px;
95
+ color: #c4c6cc;
95
96
  white-space: nowrap;
96
97
  cursor: pointer;
98
+
99
+ &:hover {
100
+ color: #979ba5;
101
+ }
97
102
  }
98
103
 
99
- .bk-alert-close-icon {
104
+ .@{bk-prefix}-alert-close-icon {
100
105
  line-height: 1;
101
106
  }
102
107
 
103
- .bk-alert-leave-leave {
108
+ .@{bk-prefix}-alert-leave-leave {
104
109
  opacity: 1;
105
110
  }
106
111
 
107
- .bk-alert-leave-leave-active {
112
+ .@{bk-prefix}-alert-leave-leave-active {
108
113
  overflow: hidden;
109
114
  transition: opacity .15s, height .2s;
110
115
  }
111
116
 
112
- .bk-alert-leave-leave-to {
117
+ .@{bk-prefix}-alert-leave-leave-to {
113
118
  opacity: 0;
114
119
  }
@@ -178,9 +178,13 @@
178
178
  margin-top: -8px;
179
179
  margin-right: -10px;
180
180
  font-size: 12px;
181
+ color: #c4c6cc;
181
182
  white-space: nowrap;
182
183
  cursor: pointer;
183
184
  }
185
+ .bk-alert-close:hover {
186
+ color: #979ba5;
187
+ }
184
188
  .bk-alert-close-icon {
185
189
  line-height: 1;
186
190
  }
@@ -1,8 +1,12 @@
1
+ .bk-checkbox-group {
2
+ display: inline-block;
3
+ letter-spacing: normal;
4
+ }
1
5
  .bk-checkbox {
2
6
  display: inline-flex;
3
7
  justify-self: center;
8
+ align-items: center;
4
9
  font-size: 14px;
5
- line-height: 18px;
6
10
  letter-spacing: normal;
7
11
  color: #63656e;
8
12
  cursor: pointer;
@@ -68,21 +72,20 @@
68
72
  .bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
69
73
  background: #dcdee5;
70
74
  }
71
- .bk-checkbox .bk-checkbox-input {
75
+ .bk-checkbox-input {
72
76
  position: relative;
73
77
  display: inline-block;
74
78
  width: 16px;
75
79
  height: 16px;
76
- margin-right: 5px;
77
80
  vertical-align: middle;
78
81
  border: 1px solid #979ba5;
79
82
  border-radius: 2px;
80
83
  }
81
- .bk-checkbox .bk-checkbox-input.small {
84
+ .bk-checkbox-input.small {
82
85
  width: 14px;
83
86
  height: 14px;
84
87
  }
85
- .bk-checkbox .bk-checkbox-original {
88
+ .bk-checkbox-original {
86
89
  position: absolute;
87
90
  top: 0;
88
91
  left: 0;
@@ -90,7 +93,8 @@
90
93
  width: 0;
91
94
  height: 0;
92
95
  }
93
- .bk-checkbox .bk-checkbox-label {
96
+ .bk-checkbox-label {
94
97
  display: inline-block;
98
+ margin-left: 5px;
95
99
  vertical-align: middle;
96
100
  }
@@ -1,20 +1,26 @@
1
1
  @import '../styles/themes/themes.less';
2
2
 
3
+ .@{bk-prefix}-checkbox-group {
4
+ display: inline-block;
5
+ letter-spacing: normal;
6
+ }
7
+
3
8
  .@{bk-prefix}-checkbox {
4
9
  display: inline-flex;
5
10
  justify-self: center;
11
+ align-items: center;
6
12
  font-size: 14px;
7
- line-height: 18px;
8
13
  letter-spacing: normal;
9
14
  color: #63656e;
10
15
  cursor: pointer;
11
16
  user-select: none;
12
- &~.@{bk-prefix}-checkbox {
17
+
18
+ & ~ .@{bk-prefix}-checkbox {
13
19
  margin-left: 30px;
14
20
  }
15
21
 
16
22
  &.is-checked {
17
- .bk-checkbox-input {
23
+ .@{bk-prefix}-checkbox-input {
18
24
  background: @primary-color;
19
25
  border-color: @primary-color;
20
26
  transition: all .1s;
@@ -43,7 +49,7 @@
43
49
  }
44
50
 
45
51
  &.is-indeterminated {
46
- .bk-checkbox-input {
52
+ .@{bk-prefix}-checkbox-input {
47
53
  background: @primary-color;
48
54
  border-color: @primary-color;
49
55
  transition: all .1s;
@@ -74,7 +80,7 @@
74
80
  color: #c4c6cc;
75
81
  cursor: not-allowed;
76
82
 
77
- .bk-checkbox-input {
83
+ .@{bk-prefix}-checkbox-input {
78
84
  background: #fafbfd;
79
85
  border-color: @disable-color;
80
86
 
@@ -84,39 +90,39 @@
84
90
  }
85
91
 
86
92
  &.is-checked {
87
- .bk-checkbox-input {
93
+ .@{bk-prefix}-checkbox-input {
88
94
  background: @disable-color;
89
95
  }
90
96
  }
91
97
  }
98
+ }
92
99
 
93
- .bk-checkbox-input {
94
- position: relative;
95
- display: inline-block;
96
- width: 16px;
97
- height: 16px;
98
- margin-right: 5px;
99
- vertical-align: middle;
100
- border: 1px solid #979ba5;
101
- border-radius: 2px;
102
-
103
- &.small {
104
- width: 14px;
105
- height: 14px;
106
- }
107
- }
100
+ .@{bk-prefix}-checkbox-input {
101
+ position: relative;
102
+ display: inline-block;
103
+ width: 16px;
104
+ height: 16px;
105
+ vertical-align: middle;
106
+ border: 1px solid #979ba5;
107
+ border-radius: 2px;
108
108
 
109
- .bk-checkbox-original {
110
- position: absolute;
111
- top: 0;
112
- left: 0;
113
- z-index: -1;
114
- width: 0;
115
- height: 0;
109
+ &.small {
110
+ width: 14px;
111
+ height: 14px;
116
112
  }
113
+ }
117
114
 
118
- .bk-checkbox-label {
119
- display: inline-block;
120
- vertical-align: middle;
121
- }
115
+ .@{bk-prefix}-checkbox-original {
116
+ position: absolute;
117
+ top: 0;
118
+ left: 0;
119
+ z-index: -1;
120
+ width: 0;
121
+ height: 0;
122
+ }
123
+
124
+ .@{bk-prefix}-checkbox-label {
125
+ display: inline-block;
126
+ margin-left: 5px;
127
+ vertical-align: middle;
122
128
  }
@@ -117,11 +117,15 @@
117
117
  --search-select-placeholder-color: var(--light-gray);
118
118
  --search-select-message-color: var(--danger-color);
119
119
  }
120
+ .bk-checkbox-group {
121
+ display: inline-block;
122
+ letter-spacing: normal;
123
+ }
120
124
  .bk-checkbox {
121
125
  display: inline-flex;
122
126
  justify-self: center;
127
+ align-items: center;
123
128
  font-size: 14px;
124
- line-height: 18px;
125
129
  letter-spacing: normal;
126
130
  color: #63656e;
127
131
  cursor: pointer;
@@ -187,21 +191,20 @@
187
191
  .bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
188
192
  background: var(--disable-color);
189
193
  }
190
- .bk-checkbox .bk-checkbox-input {
194
+ .bk-checkbox-input {
191
195
  position: relative;
192
196
  display: inline-block;
193
197
  width: 16px;
194
198
  height: 16px;
195
- margin-right: 5px;
196
199
  vertical-align: middle;
197
200
  border: 1px solid #979ba5;
198
201
  border-radius: 2px;
199
202
  }
200
- .bk-checkbox .bk-checkbox-input.small {
203
+ .bk-checkbox-input.small {
201
204
  width: 14px;
202
205
  height: 14px;
203
206
  }
204
- .bk-checkbox .bk-checkbox-original {
207
+ .bk-checkbox-original {
205
208
  position: absolute;
206
209
  top: 0;
207
210
  left: 0;
@@ -209,7 +212,8 @@
209
212
  width: 0;
210
213
  height: 0;
211
214
  }
212
- .bk-checkbox .bk-checkbox-label {
215
+ .bk-checkbox-label {
213
216
  display: inline-block;
217
+ margin-left: 5px;
214
218
  vertical-align: middle;
215
219
  }
@@ -1 +1 @@
1
- !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],r);else{var t="object"==typeof exports?r(require("../shared"),require("vue")):r(e["../shared"],e.vue);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r)=>(()=>{"use strict";var t={4212:r=>{r.exports=e},748:e=>{e.exports=r}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.r(a),n.d(a,{BkCheckbox:()=>c,BkCheckboxGroup:()=>s,default:()=>d});var e=n(4212);function r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}var t=n(748),o=Symbol("CheckboxGroup"),i={modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]),trueLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(!0),falseLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),disabled:e.PropTypes.bool.def(!1),checked:e.PropTypes.bool.def(!1),indeterminate:e.PropTypes.bool,beforeChange:e.PropTypes.func,size:e.PropTypes.size().def("large")};const l=(0,t.defineComponent)({name:"Checkbox",props:i,emits:["update:modelValue","change"],setup:function(n){var a,i,l=function(){var e=(0,t.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}(),u=(i=2,function(e){if(Array.isArray(e))return e}(a=l)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,a=[],i=!0,l=!1;try{for(t=t.call(e);!(i=(o=t.next()).done)&&(a.push(o.value),!r||a.length!==r);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==t.return||t.return()}finally{if(l)throw n}}return a}}(a,i)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(a,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],c=u[1],d=c.blur,p=c.focus,f=function(){var r=(0,t.getCurrentInstance)(),n=r.props,a=r.emit,i=(0,t.inject)(o,e.EMPTY_OBJ),l=!(0,e.isEmptyObj)(i),u=(0,t.ref)(n.checked),s=(0,t.computed)((function(){return!(!l||!i.props.disabled)||n.disabled}));return l?(0,t.watch)((function(){return i.props.modelValue}),(function(e){u.value=e.includes(n.label)}),{deep:!0}):(0,t.watch)((function(){return n.modelValue}),(function(e){""!==e&&(u.value=e===n.trueLabel)}),{immediate:!0}),(0,t.onMounted)((function(){l&&i.register(r.proxy)})),(0,t.onBeforeUnmount)((function(){l&&i.unregister(r.proxy)})),{isChecked:u,isDisabled:s,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];u.value=e},handleChange:function(e){if(!s.value){var r=e.target;u.value=r.checked;var o=u.value?n.trueLabel:n.falseLabel;a("change",o),a("update:modelValue",o),l&&i.handleChange(),(0,t.nextTick)((function(){r.checked!==u.value&&(r.checked=u.value)}))}}}}();return{isFocus:s,isChecked:f.isChecked,isDisabled:f.isDisabled,setChecked:f.setChecked,handleBlur:d,handleFocus:p,handleChange:f.handleChange,size:n.size}},render:function(){var r=(0,e.classes)({"bk-checkbox":!0,"is-focused":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled,"is-indeterminated":this.indeterminate});return(0,t.createVNode)("label",{class:r},[(0,t.createVNode)("span",{class:[(0,e.resolveClassName)("checkbox-input"),this.size]},[(0,t.createVNode)("input",{role:"checkbox",type:"checkbox",class:"bk-checkbox-original",disabled:this.isDisabled,checked:this.isChecked,onChange:this.handleChange},null)]),this.$slots.default?this.$slots.default():(0,t.createVNode)("span",{class:"bk-checkbox-label"},[this.label])])}});var u={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.array,disabled:e.PropTypes.bool,withValidate:e.PropTypes.bool.def(!0)};const s=(0,t.defineComponent)({name:"CheckboxGroup",props:u,emits:["change","update:modelValue"],setup:function(r,n){var a=(0,e.useFormItem)(),i=[];return(0,t.provide)(o,{name:"CheckboxGroup",props:r,register:function(e){i.push(e)},unregister:function(e){var r=i.indexOf(e);r>-1&&i.splice(r,1)},handleChange:function(){var e=i.reduce((function(e,r){return r.isChecked&&e.push(r.label),e}),[]);n.emit("update:modelValue",e),n.emit("change",e)}}),(0,t.watch)((function(){return r.modelValue}),(function(){var e;r.withValidate&&(null===(e=null==a?void 0:a.validate)||void 0===e||e.call(a,"change"))})),(0,t.onMounted)((function(){var e=r.modelValue||[];i.forEach((function(r){e.includes(r.label)&&r.setChecked(!0)}))})),{}},render:function(){var e;return(0,t.createVNode)("div",{class:"bk-checkbox-group"},[null===(e=this.$slots)||void 0===e?void 0:e.default()])}});var c=(0,e.withInstallProps)(l,{Group:s});const d=c})(),a})()));
1
+ !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],r);else{var t="object"==typeof exports?r(require("../shared"),require("vue")):r(e["../shared"],e.vue);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r)=>(()=>{"use strict";var t={4212:r=>{r.exports=e},748:e=>{e.exports=r}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.r(a),n.d(a,{BkCheckbox:()=>c,BkCheckboxGroup:()=>s,default:()=>d});var e=n(4212);function r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}var t=n(748),o=Symbol("CheckboxGroup"),l={modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]),trueLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(!0),falseLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),disabled:e.PropTypes.bool.def(!1),checked:e.PropTypes.bool.def(!1),indeterminate:e.PropTypes.bool,beforeChange:e.PropTypes.func,size:e.PropTypes.size().def("large")};const i=(0,t.defineComponent)({name:"Checkbox",props:l,emits:["update:modelValue","change"],setup:function(n){var a,l,i=function(){var e=(0,t.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}(),u=(l=2,function(e){if(Array.isArray(e))return e}(a=i)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,a=[],l=!0,i=!1;try{for(t=t.call(e);!(l=(o=t.next()).done)&&(a.push(o.value),!r||a.length!==r);l=!0);}catch(e){i=!0,n=e}finally{try{l||null==t.return||t.return()}finally{if(i)throw n}}return a}}(a,l)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],c=u[1],d=c.blur,p=c.focus,f=function(){var r=(0,t.getCurrentInstance)(),n=r.props,a=r.emit,l=(0,t.inject)(o,e.EMPTY_OBJ),i=!(0,e.isEmptyObj)(l),u=(0,t.ref)(n.checked),s=(0,t.computed)((function(){return!(!i||!l.props.disabled)||n.disabled}));return i?(0,t.watch)((function(){return l.props.modelValue}),(function(e){u.value=e.includes(n.label)}),{deep:!0}):(0,t.watch)((function(){return n.modelValue}),(function(e){""!==e&&(u.value=e===n.trueLabel)}),{immediate:!0}),(0,t.onMounted)((function(){i&&l.register(r.proxy)})),(0,t.onBeforeUnmount)((function(){i&&l.unregister(r.proxy)})),{isChecked:u,isDisabled:s,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];u.value=e},handleChange:function(e){if(!s.value){var r=e.target;u.value=r.checked;var o=u.value?n.trueLabel:n.falseLabel;a("change",o),a("update:modelValue",o),i&&l.handleChange(),(0,t.nextTick)((function(){r.checked!==u.value&&(r.checked=u.value)}))}}}}();return{isFocus:s,isChecked:f.isChecked,isDisabled:f.isDisabled,setChecked:f.setChecked,handleBlur:d,handleFocus:p,handleChange:f.handleChange,size:n.size}},render:function(){var r=this,o=(0,e.classes)({"bk-checkbox":!0,"is-focused":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled,"is-indeterminated":this.indeterminate});return(0,t.createVNode)("label",{class:o},[(0,t.createVNode)("span",{class:[(0,e.resolveClassName)("checkbox-input"),this.size]},[(0,t.createVNode)("input",{role:"checkbox",type:"checkbox",class:"bk-checkbox-original",disabled:this.isDisabled,checked:this.isChecked,onChange:this.handleChange},null)]),r.label||r.$slots.default?(0,t.createVNode)("span",{class:"bk-checkbox-label"},[r.$slots.default?r.$slots.default():r.label]):null])}});var u={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.array,disabled:e.PropTypes.bool,withValidate:e.PropTypes.bool.def(!0)};const s=(0,t.defineComponent)({name:"CheckboxGroup",props:u,emits:["change","update:modelValue"],setup:function(r,n){var a=(0,e.useFormItem)(),l=[];return(0,t.provide)(o,{name:"CheckboxGroup",props:r,register:function(e){l.push(e)},unregister:function(e){var r=l.indexOf(e);r>-1&&l.splice(r,1)},handleChange:function(){var e=l.reduce((function(e,r){return r.isChecked&&e.push(r.label),e}),[]);n.emit("update:modelValue",e),n.emit("change",e)}}),(0,t.watch)((function(){return r.modelValue}),(function(){var e;r.withValidate&&(null===(e=null==a?void 0:a.validate)||void 0===e||e.call(a,"change"))})),(0,t.onMounted)((function(){var e=r.modelValue||[];l.forEach((function(r){e.includes(r.label)&&r.setChecked(!0)}))})),{}},render:function(){var e;return(0,t.createVNode)("div",{class:"bk-checkbox-group"},[null===(e=this.$slots)||void 0===e?void 0:e.default()])}});var c=(0,e.withInstallProps)(i,{Group:s});const d=c})(),a})()));
@@ -14,21 +14,21 @@
14
14
  padding: 24px 24px 0;
15
15
  }
16
16
  .bk-modal-wrapper.bk-info-wrapper .bk-dialog-header .bk-dialog-title {
17
- height: 24px;
18
- margin-top: 20px;
19
- margin-bottom: 20px;
17
+ height: 27px;
18
+ margin: 15px 0 10px;
20
19
  }
21
20
  .bk-modal-wrapper.bk-info-wrapper .bk-modal-content {
22
- min-height: auto;
23
- padding: 0 50px 65px;
21
+ height: 100%;
22
+ max-height: 100%;
23
+ min-height: 100%;
24
+ padding: 0 50px 10px;
24
25
  }
25
26
  .bk-modal-wrapper.bk-info-wrapper .bk-modal-content .bk-info-sub-title {
26
- margin-bottom: 20px;
27
+ margin-bottom: 10px;
27
28
  text-align: center;
28
29
  }
29
30
  .bk-modal-wrapper.bk-info-wrapper .bk-modal-footer {
30
- height: 65px;
31
- padding: 0 24px 33px;
31
+ padding: 0 65px 33px;
32
32
  background-color: #fff;
33
33
  border-top: none;
34
34
  }
@@ -98,7 +98,6 @@
98
98
  user-select: none;
99
99
  }
100
100
  .bk-modal-wrapper.bk-dialog-wrapper .bk-dialog-header {
101
- height: 79px;
102
101
  padding: 24px;
103
102
  font-size: 20px;
104
103
  }
@@ -127,6 +126,7 @@
127
126
  white-space: nowrap;
128
127
  }
129
128
  .bk-modal-wrapper.bk-dialog-wrapper .bk-modal-content {
129
+ height: calc(100% - 79px);
130
130
  max-height: calc(100vh - 300px);
131
131
  min-height: 100px;
132
132
  padding: 3px 24px 0;
@@ -38,7 +38,6 @@
38
38
  }
39
39
 
40
40
  .bk-dialog-header {
41
- height: 79px;
42
41
  padding: 24px;
43
42
  font-size: 20px;
44
43
 
@@ -74,6 +73,7 @@
74
73
  }
75
74
 
76
75
  .bk-modal-content {
76
+ height: calc(100% - 79px);
77
77
  max-height: calc(100vh - 300px);
78
78
  min-height: 100px;
79
79
  padding: 3px 24px 0;
@@ -14,21 +14,21 @@
14
14
  padding: 24px 24px 0;
15
15
  }
16
16
  .bk-modal-wrapper.bk-info-wrapper .bk-dialog-header .bk-dialog-title {
17
- height: 24px;
18
- margin-top: 20px;
19
- margin-bottom: 20px;
17
+ height: 27px;
18
+ margin: 15px 0 10px;
20
19
  }
21
20
  .bk-modal-wrapper.bk-info-wrapper .bk-modal-content {
22
- min-height: auto;
23
- padding: 0 50px 65px;
21
+ height: 100%;
22
+ max-height: 100%;
23
+ min-height: 100%;
24
+ padding: 0 50px 10px;
24
25
  }
25
26
  .bk-modal-wrapper.bk-info-wrapper .bk-modal-content .bk-info-sub-title {
26
- margin-bottom: 20px;
27
+ margin-bottom: 10px;
27
28
  text-align: center;
28
29
  }
29
30
  .bk-modal-wrapper.bk-info-wrapper .bk-modal-footer {
30
- height: 65px;
31
- padding: 0 24px 33px;
31
+ padding: 0 65px 33px;
32
32
  background-color: #fff;
33
33
  border-top: none;
34
34
  }
@@ -98,7 +98,6 @@
98
98
  user-select: none;
99
99
  }
100
100
  .bk-modal-wrapper.bk-dialog-wrapper .bk-dialog-header {
101
- height: 79px;
102
101
  padding: 24px;
103
102
  font-size: 20px;
104
103
  }
@@ -127,6 +126,7 @@
127
126
  white-space: nowrap;
128
127
  }
129
128
  .bk-modal-wrapper.bk-dialog-wrapper .bk-modal-content {
129
+ height: calc(100% - 79px);
130
130
  max-height: calc(100vh - 300px);
131
131
  min-height: 100px;
132
132
  padding: 3px 24px 0;
@@ -3,7 +3,9 @@ declare const formItemProps: {
3
3
  label: import("vue-types").VueTypeValidableDef<string> & {
4
4
  default: string;
5
5
  };
6
- labelWidth: import("vue-types").VueTypeDef<string | number>;
6
+ labelWidth: import("vue-types").VueTypeDef<string | number> & {
7
+ default: string | number;
8
+ };
7
9
  labelPosition: import("vue-types").VueTypeDef<string>;
8
10
  property: import("vue-types").VueTypeValidableDef<string> & {
9
11
  default: string;
@@ -49,7 +51,9 @@ declare const _default: import("vue").DefineComponent<{
49
51
  label: import("vue-types").VueTypeValidableDef<string> & {
50
52
  default: string;
51
53
  };
52
- labelWidth: import("vue-types").VueTypeDef<string | number>;
54
+ labelWidth: import("vue-types").VueTypeDef<string | number> & {
55
+ default: string | number;
56
+ };
53
57
  labelPosition: import("vue-types").VueTypeDef<string>;
54
58
  property: import("vue-types").VueTypeValidableDef<string> & {
55
59
  default: string;
@@ -90,7 +94,11 @@ declare const _default: import("vue").DefineComponent<{
90
94
  default: string;
91
95
  };
92
96
  }, {
97
+ isShowLabel: import("vue").ComputedRef<boolean>;
93
98
  labelStyles: import("vue").ComputedRef<any>;
99
+ contentStyles: import("vue").ComputedRef<{
100
+ "margin-left": any;
101
+ }>;
94
102
  isFormTypeVertical: import("vue").ComputedRef<boolean>;
95
103
  validate: (trigger?: String) => Promise<boolean>;
96
104
  clearValidate: () => void;
@@ -100,7 +108,9 @@ declare const _default: import("vue").DefineComponent<{
100
108
  label: import("vue-types").VueTypeValidableDef<string> & {
101
109
  default: string;
102
110
  };
103
- labelWidth: import("vue-types").VueTypeDef<string | number>;
111
+ labelWidth: import("vue-types").VueTypeDef<string | number> & {
112
+ default: string | number;
113
+ };
104
114
  labelPosition: import("vue-types").VueTypeDef<string>;
105
115
  property: import("vue-types").VueTypeValidableDef<string> & {
106
116
  default: string;
@@ -145,6 +155,7 @@ declare const _default: import("vue").DefineComponent<{
145
155
  required: boolean;
146
156
  property: string;
147
157
  email: boolean;
158
+ labelWidth: string | number;
148
159
  max: number;
149
160
  min: number;
150
161
  maxlength: number;
package/lib/form/form.css CHANGED
@@ -1,19 +1,18 @@
1
1
  .bk-form {
2
2
  text-align: left;
3
3
  }
4
- .bk-form--vertical .bk-form-item {
5
- flex-direction: column;
6
- }
7
4
  .bk-form--vertical .bk-form-label {
5
+ float: unset;
8
6
  width: auto;
9
7
  padding-right: 0;
8
+ margin-bottom: 8px;
9
+ line-height: 20px;
10
10
  text-align: left;
11
11
  }
12
12
  .bk-form--vertical .bk-form-content {
13
13
  text-align: left;
14
14
  }
15
15
  .bk-form-item {
16
- display: flex;
17
16
  margin-bottom: 24px;
18
17
  }
19
18
  .bk-form-item.is-required .bk-form-label:after {
@@ -31,16 +30,24 @@
31
30
  .bk-form-item.is-error .bk-tag-input {
32
31
  border-color: #ea3636;
33
32
  }
33
+ .bk-form-item:after,
34
+ .bk-form-item:before {
35
+ display: table;
36
+ content: '';
37
+ }
38
+ .bk-form-item:after {
39
+ clear: both;
40
+ }
34
41
  .bk-form-label {
35
42
  position: relative;
36
- width: 150px;
43
+ float: left;
37
44
  padding-right: 24px;
38
45
  font-size: 14px;
39
46
  font-weight: normal;
40
47
  line-height: 32px;
41
48
  color: #63656e;
42
49
  text-align: right;
43
- flex: 0 0 auto;
50
+ vertical-align: middle;
44
51
  }
45
52
  .bk-form-label-description {
46
53
  cursor: pointer;
@@ -49,7 +56,6 @@
49
56
  .bk-form-content {
50
57
  position: relative;
51
58
  line-height: 32px;
52
- flex: 1;
53
59
  }
54
60
  .bk-form-error {
55
61
  position: absolute;