bkui-vue 0.0.1-beta.118 → 0.0.1-beta.120
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.
- package/dist/index.cjs.js +25 -25
- package/dist/index.esm.js +80 -33
- package/dist/index.umd.js +21 -21
- package/dist/style.css +1 -1
- package/lib/affix/affix.variable.css +4 -1
- package/lib/alert/alert.variable.css +4 -1
- package/lib/backtop/backtop.variable.css +4 -1
- package/lib/badge/badge.variable.css +4 -1
- package/lib/breadcrumb/breadcrumb.variable.css +4 -1
- package/lib/button/button.css +9 -0
- package/lib/button/button.d.ts +10 -0
- package/lib/button/button.less +12 -1
- package/lib/button/button.variable.css +13 -1
- package/lib/button/index.d.ts +16 -1
- package/lib/button/index.js +1 -1
- package/lib/card/card.variable.css +4 -1
- package/lib/cascader/cascader.variable.css +4 -1
- package/lib/checkbox/checkbox.variable.css +4 -1
- package/lib/code-diff/code-diff.variable.css +4 -1
- package/lib/collapse/collapse.variable.css +4 -1
- package/lib/container/container.variable.css +4 -1
- package/lib/date-picker/date-picker.variable.css +4 -1
- package/lib/dialog/dialog.css +5 -1
- package/lib/dialog/dialog.less +6 -1
- package/lib/dialog/dialog.variable.css +5 -1
- package/lib/divider/divider.variable.css +4 -1
- package/lib/dropdown/dropdown.variable.css +4 -1
- package/lib/exception/exception.variable.css +4 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +4 -1
- package/lib/form/form.variable.css +4 -1
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +99 -15
- package/lib/input/input.less +83 -18
- package/lib/input/input.variable.css +102 -15
- package/lib/link/link.variable.css +4 -1
- package/lib/loading/loading.variable.css +4 -1
- package/lib/menu/menu.variable.css +4 -1
- package/lib/menu/submenu.variable.css +4 -1
- package/lib/message/message.variable.css +4 -1
- package/lib/modal/index.d.ts +29 -1
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +11 -0
- package/lib/modal/props.mixin.d.ts +5 -0
- package/lib/navigation/navigation.variable.css +4 -1
- package/lib/notify/notify.variable.css +4 -1
- package/lib/pagination/pagination.variable.css +4 -1
- package/lib/popover/popover.variable.css +4 -1
- package/lib/popover2/popover2.variable.css +4 -1
- package/lib/process/process.variable.css +4 -1
- package/lib/progress/progress.variable.css +4 -1
- package/lib/radio/radio.variable.css +4 -1
- package/lib/resize-layout/resize-layout.variable.css +4 -1
- package/lib/select/index.d.ts +62 -515
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +11 -2
- package/lib/select/select.css +14 -2
- package/lib/select/select.d.ts +17 -92
- package/lib/select/select.less +22 -8
- package/lib/select/select.variable.css +18 -3
- package/lib/select/selectTagInput.d.ts +5 -4
- package/lib/select/type.d.ts +9 -3
- package/lib/sideslider/index.d.ts +19 -23
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +9 -11
- package/lib/sideslider/sideslider.variable.css +4 -1
- package/lib/slider/slider.variable.css +4 -1
- package/lib/steps/steps.variable.css +4 -1
- package/lib/styles/themes/themes.less +6 -1
- package/lib/switcher/switcher.variable.css +4 -1
- package/lib/tab/tab.variable.css +4 -1
- package/lib/table/plugins/head-filter.variable.css +4 -1
- package/lib/table/plugins/head-sort.variable.css +4 -1
- package/lib/table/plugins/settings.variable.css +4 -1
- package/lib/table/table.variable.css +4 -1
- package/lib/tag/tag.variable.css +4 -1
- package/lib/tag-input/tag-input.variable.css +4 -1
- package/lib/timeline/timeline.variable.css +4 -1
- package/lib/transfer/transfer.variable.css +4 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/tree.d.ts +1 -1
- package/lib/tree/tree.variable.css +4 -1
- package/lib/upload/upload.variable.css +4 -1
- package/package.json +1 -1
package/lib/input/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon")):t(e["../shared"],e.vue,e["../icon"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,((e,t,r)=>(()=>{"use strict";var o={6870:e=>{e.exports=r},4212:t=>{t.exports=e},748:e=>{e.exports=t}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.r(l),a.d(l,{default:()=>v});var e=a(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=a(748);Object.create,Object.create;var n,i,u=a(6870),s={type:e.PropTypes.string.def("text"),clearable:e.PropTypes.bool,disabled:e.PropTypes.bool,readonly:e.PropTypes.bool,placeholder:e.PropTypes.string.def("Enter"),prefixIcon:e.PropTypes.string,suffixIcon:e.PropTypes.string,suffix:e.PropTypes.string,prefix:e.PropTypes.string,step:e.PropTypes.integer,max:e.PropTypes.integer,min:e.PropTypes.integer,maxlength:e.PropTypes.integer,behavior:e.PropTypes.commonType(["simplicity","normal"]).def("normal"),showWordLimit:e.PropTypes.bool,showControl:e.PropTypes.bool.def(!0),showClearOnlyHover:e.PropTypes.bool.def(!1),precision:e.PropTypes.number.def(0).validate((function(e){return e>=0&&e<20})),modelValue:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),size:e.PropTypes.size(),rows:e.PropTypes.number};function c(e,t){return{value:e,evt:t}}function p(e){return e}!function(e){e.UPDATE="update:modelValue",e.FOCUS="focus",e.BLUR="blur",e.CHANGE="change",e.CLEAR="clear",e.INPUT="input",e.KEYPRESS="keypress",e.KEYDOWN="keydown",e.KEYUP="keyup",e.ENTER="enter",e.PASTE="paste",e.COMPOSITIONSTART="compositionstart",e.COMPOSITIONUPDATE="compositionupdate",e.COMPOSITIONEND="compositionend"}(i||(i={}));var d=(r(n={},i.UPDATE,c),r(n,i.FOCUS,(function(e){return e})),r(n,i.BLUR,(function(e){return e})),r(n,i.CHANGE,c),r(n,i.CLEAR,(function(){return!0})),r(n,i.INPUT,c),r(n,i.KEYPRESS,c),r(n,i.KEYDOWN,c),r(n,i.KEYUP,c),r(n,i.ENTER,c),r(n,i.PASTE,c),r(n,i.COMPOSITIONSTART,p),r(n,i.COMPOSITIONUPDATE,p),r(n,i.COMPOSITIONEND,p),n);const f=(0,o.defineComponent)({name:"Input",inheritAttrs:!1,props:s,emits:d,setup:function(n,a){var l=(0,e.useFormItem)(),s=(0,o.ref)(!1),c=(0,o.ref)(!1),p=(0,o.computed)((function(){return"textarea"===n.type})),d=(0,o.computed)((function(){return p.value?"bk-textarea":"bk-input"})),f=a.attrs,v=f.class,m=f.style,y=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(f,["class","style"]),b=(0,o.ref)(),P=(0,o.computed)((function(){var t;return(0,e.classes)((r(t={},"".concat(d.value,"--").concat(n.size),!!n.size),r(t,"is-focused",s.value),r(t,"is-readonly",n.readonly),r(t,"is-disabled",n.disabled),r(t,"is-simplicity","simplicity"===n.behavior),r(t,"".concat(v),!!v),t),d.value)})),T={search:function(){return(0,o.createVNode)(u.Search,null,null)},password:function(){return(0,o.createVNode)(u.Eye,{onClick:B},null)}},x=z("suffix-icon"),g=(0,o.computed)((function(){var e=T[n.type];return E.value?(0,o.createVNode)(u.Unvisible,{onClick:B,class:x},null):e?(0,o.createVNode)(e,{class:x},null):null})),h=(0,o.computed)((function(){return"number"===n.type})),N=(0,o.computed)((function(){return Math.floor(n.maxlength)})),E=(0,o.ref)(!1),O=(0,o.computed)((function(){return(0,e.classes)({"show-clear-only-hover":n.showClearOnlyHover},x)})),S=(0,o.computed)((function(){return(0,e.classes)({"is-disabled":n.disabled||n.modelValue>=n.max})})),C=(0,o.computed)((function(){return(0,e.classes)({"is-disabled":n.disabled||n.modelValue<=n.min})}));function I(){var e,t=h.value?n.min:"";a.emit(i.UPDATE,t),a.emit(i.CHANGE,t),a.emit(i.CLEAR),null===(e=null==l?void 0:l.validate)||void 0===e||e.call(l,"change")}function A(e){s.value=!0,a.emit(i.FOCUS,e)}function w(e){var t;if(s.value=!1,a.emit(i.BLUR,e),h.value&&(e.target.value>n.max||e.target.value<n.min)){var r=e.target.value>n.max?n.max:n.min;a.emit(i.UPDATE,r),a.emit(i.CHANGE,r)}null===(t=null==l?void 0:l.validate)||void 0===t||t.call(l,"blur")}a.expose({focus:function(){b.value.focus()},clear:I});var U,V,j=[i.KEYUP,i.KEYDOWN,i.KEYPRESS,i.PASTE,i.CHANGE,i.INPUT].map((function(e){return function(t){var r;e!==i.KEYDOWN||"Enter"!==t.code&&"Enter"!==t.key&&13!==t.keyCode||a.emit(i.ENTER,t.target.value,t),c.value&&[i.INPUT,i.CHANGE].some((function(t){return e===t}))||(e===i.INPUT&&a.emit(i.UPDATE,h.value?+t.target.value:t.target.value),a.emit(e,t.target.value,t),e===i.INPUT&&(null===(r=null==l?void 0:l.validate)||void 0===r||r.call(l,"change")))}})),D=(V=6,function(e){if(Array.isArray(e))return e}(U=j)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,a=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(a.push(o.value),!t||a.length!==t);l=!0);}catch(e){i=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw n}}return a}}(U,V)||function(e,r){if(e){if("string"==typeof e)return t(e,r);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)?t(e,r):void 0}}(U,V)||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.")}()),k=D[0],R=D[1],K=D[2],M=D[3],Y=D[4],H=D[5];function L(){c.value=!0}function F(e){c.value=!1,H(e)}function q(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=parseInt(String(e),10),o=Number.isInteger(n.precision)?n.precision:0,a=parseFloat(n.modelValue.toString()),l=Number.isInteger(r)?r:1,i=a+(t?l:-1*l);return Number.isInteger(n.max)&&(i=Math.min(i,n.max)),Number.isInteger(n.min)&&(i=Math.max(i,n.min)),+i.toFixed(o)}function G(){if(!n.disabled){var e=q(n.step);a.emit(i.UPDATE,e)}}function W(){if(!n.disabled){var e=q(n.step,!1);a.emit(i.UPDATE,e)}}function z(e){return"".concat(d.value,"--").concat(e)}function B(){E.value=!E.value}var _=(0,o.computed)((function(){return{value:n.modelValue,maxlength:n.maxlength,placeholder:n.placeholder,readonly:n.readonly,disabled:n.disabled,onInput:H,onFocus:A,onBlur:w,onPaste:M,onChange:Y,onKeypress:K,onKeydown:R,onKeyup:k,onCompositionstart:L,onCompositionend:F}}));return function(){var e,t,r,l,i,s;return(0,o.createVNode)("div",{class:P.value,style:m},[null!==(r=null===(t=null===(e=a.slots)||void 0===e?void 0:e.prefix)||void 0===t?void 0:t.call(e))&&void 0!==r?r:n.prefix&&(0,o.createVNode)("div",{class:z("prefix-area")},[(0,o.createVNode)("span",{class:z("prefix-area--text")},[n.prefix])]),p.value?(0,o.createVNode)("textarea",(0,o.mergeProps)({ref:b,spellcheck:!1},y,_.value,{rows:n.rows}),null):(0,o.createVNode)("input",(0,o.mergeProps)({spellcheck:!1},y,{ref:b,class:"".concat(d.value,"--text"),type:E.value&&"password"===n.type?"text":n.type,step:n.step,max:n.max,min:n.min},_.value),null),!p.value&&n.clearable&&!!n.modelValue&&(0,o.createVNode)(u.Close,{onClick:I,class:O.value},null),g.value,"number"==typeof n.maxlength&&(n.showWordLimit||p.value)&&(0,o.createVNode)("p",{class:z("max-length")},[n.modelValue.toString().length,(0,o.createTextVNode)("/"),(0,o.createVNode)("span",null,[N.value])]),h.value&&n.showControl&&(0,o.createVNode)("div",{class:z("number-control")},[(0,o.createVNode)(u.DownSmall,{class:S.value,onClick:G},null),(0,o.createVNode)(u.DownSmall,{class:C.value,onClick:W},null)]),null!==(s=null===(i=null===(l=a.slots)||void 0===l?void 0:l.suffix)||void 0===i?void 0:i.call(l))&&void 0!==s?s:n.suffix&&(0,o.createVNode)("div",{class:z("suffix-area")},[(0,o.createVNode)("span",{class:z("suffix-area--text")},[n.suffix])])])}}}),v=(0,e.withInstall)(f)})(),l})()));
|
package/lib/input/input.css
CHANGED
@@ -41,6 +41,34 @@
|
|
41
41
|
transition: all 0.3s;
|
42
42
|
flex-direction: column;
|
43
43
|
}
|
44
|
+
.bk-textarea ::placeholder {
|
45
|
+
color: #c4c6cc;
|
46
|
+
}
|
47
|
+
.bk-textarea.is-disabled,
|
48
|
+
.bk-textarea.is-readonly {
|
49
|
+
background-color: #fafbfd;
|
50
|
+
border-color: #dcdee5;
|
51
|
+
}
|
52
|
+
.bk-textarea.is-disabled .bk-input--prefix-area,
|
53
|
+
.bk-textarea.is-readonly .bk-input--prefix-area,
|
54
|
+
.bk-textarea.is-disabled .bk-input--suffix-area,
|
55
|
+
.bk-textarea.is-readonly .bk-input--suffix-area,
|
56
|
+
.bk-textarea.is-disabled .bk-input--suffix-icon,
|
57
|
+
.bk-textarea.is-readonly .bk-input--suffix-icon {
|
58
|
+
background-color: #fafbfd;
|
59
|
+
}
|
60
|
+
.bk-textarea.is-disabled input,
|
61
|
+
.bk-textarea.is-readonly input,
|
62
|
+
.bk-textarea.is-disabled textarea,
|
63
|
+
.bk-textarea.is-readonly textarea {
|
64
|
+
cursor: not-allowed;
|
65
|
+
background-color: #fafbfd;
|
66
|
+
opacity: 1;
|
67
|
+
}
|
68
|
+
.bk-textarea.is-readonly input,
|
69
|
+
.bk-textarea.is-readonly textarea {
|
70
|
+
cursor: auto;
|
71
|
+
}
|
44
72
|
.bk-textarea > textarea {
|
45
73
|
width: 100%;
|
46
74
|
flex: 1;
|
@@ -55,11 +83,20 @@
|
|
55
83
|
.bk-textarea--max-length {
|
56
84
|
padding-right: 10px;
|
57
85
|
margin: 0;
|
86
|
+
margin-left: auto;
|
87
|
+
font-size: 12px;
|
58
88
|
text-align: right;
|
89
|
+
transform: scale(0.8);
|
90
|
+
justify-content: flex-end;
|
59
91
|
}
|
60
92
|
.bk-textarea--max-length span {
|
61
93
|
color: #979ba5;
|
62
94
|
}
|
95
|
+
.bk-textarea.is-focused:not(.is-readonly) {
|
96
|
+
border-color: #3a84ff;
|
97
|
+
outline: 0;
|
98
|
+
box-shadow: 0px 0px 3px 0px #a3c5fd;
|
99
|
+
}
|
63
100
|
.bk-input {
|
64
101
|
display: inline-flex;
|
65
102
|
align-items: stretch;
|
@@ -70,7 +107,38 @@
|
|
70
107
|
border-radius: 2px;
|
71
108
|
transition: all 0.3s;
|
72
109
|
}
|
73
|
-
.bk-input
|
110
|
+
.bk-input ::placeholder {
|
111
|
+
color: #c4c6cc;
|
112
|
+
}
|
113
|
+
.bk-input.is-disabled,
|
114
|
+
.bk-input.is-readonly {
|
115
|
+
background-color: #fafbfd;
|
116
|
+
border-color: #dcdee5;
|
117
|
+
}
|
118
|
+
.bk-input.is-disabled .bk-input--prefix-area,
|
119
|
+
.bk-input.is-readonly .bk-input--prefix-area,
|
120
|
+
.bk-input.is-disabled .bk-input--suffix-area,
|
121
|
+
.bk-input.is-readonly .bk-input--suffix-area,
|
122
|
+
.bk-input.is-disabled .bk-input--suffix-icon,
|
123
|
+
.bk-input.is-readonly .bk-input--suffix-icon {
|
124
|
+
background-color: #fafbfd;
|
125
|
+
}
|
126
|
+
.bk-input.is-disabled input,
|
127
|
+
.bk-input.is-readonly input,
|
128
|
+
.bk-input.is-disabled textarea,
|
129
|
+
.bk-input.is-readonly textarea {
|
130
|
+
cursor: not-allowed;
|
131
|
+
background-color: #fafbfd;
|
132
|
+
opacity: 1;
|
133
|
+
}
|
134
|
+
.bk-input.is-readonly input,
|
135
|
+
.bk-input.is-readonly textarea {
|
136
|
+
cursor: auto;
|
137
|
+
}
|
138
|
+
.bk-input:hover:not(.is-disabled) {
|
139
|
+
border-color: #979ba5;
|
140
|
+
}
|
141
|
+
.bk-input:hover:not(.is-disabled) .show-clear-only-hover {
|
74
142
|
display: block;
|
75
143
|
}
|
76
144
|
.bk-input.is-simplicity {
|
@@ -78,6 +146,14 @@
|
|
78
146
|
border-color: transparent;
|
79
147
|
border-bottom-color: #c4c6cc;
|
80
148
|
}
|
149
|
+
.bk-input.is-simplicity:hover:not(.is-disabled) {
|
150
|
+
border-color: transparent;
|
151
|
+
border-bottom-color: #c4c6cc;
|
152
|
+
box-shadow: none;
|
153
|
+
}
|
154
|
+
.bk-input.is-simplicity:hover:not(.is-disabled) .bk-input--text {
|
155
|
+
background-color: #f5f7fa;
|
156
|
+
}
|
81
157
|
.bk-input--suffix-icon {
|
82
158
|
display: flex;
|
83
159
|
height: 100%;
|
@@ -98,6 +174,9 @@
|
|
98
174
|
.bk-input--large .bk-input--max-length {
|
99
175
|
font-size: 16px;
|
100
176
|
}
|
177
|
+
.bk-input--large .bk-input--number-control span:first-child {
|
178
|
+
margin-bottom: 4px;
|
179
|
+
}
|
101
180
|
.bk-input--small {
|
102
181
|
height: 26px;
|
103
182
|
font-size: 12px;
|
@@ -121,21 +200,15 @@
|
|
121
200
|
border-bottom-color: #3a84ff;
|
122
201
|
box-shadow: none;
|
123
202
|
}
|
124
|
-
.bk-input.is-
|
125
|
-
|
126
|
-
cursor: not-allowed;
|
127
|
-
background-color: #fafbfd;
|
128
|
-
opacity: 1;
|
129
|
-
}
|
130
|
-
.bk-input.is-readonly input {
|
131
|
-
cursor: auto;
|
203
|
+
.bk-input.is-focused:not(.is-readonly).is-simplicity .bk-input--text {
|
204
|
+
background-color: #f5f7fa;
|
132
205
|
}
|
133
206
|
.bk-input--prefix-area,
|
134
207
|
.bk-input--suffix-area {
|
135
208
|
display: flex;
|
136
209
|
padding: 0 10px;
|
137
210
|
color: #63656e;
|
138
|
-
background-color: #
|
211
|
+
background-color: #f5f7fa;
|
139
212
|
border-right: 1px solid #c4c6cc;
|
140
213
|
align-items: center;
|
141
214
|
}
|
@@ -146,6 +219,8 @@
|
|
146
219
|
.bk-input--max-length {
|
147
220
|
align-self: center;
|
148
221
|
padding-right: 10px;
|
222
|
+
font-size: 12px;
|
223
|
+
transform: scale(0.8);
|
149
224
|
}
|
150
225
|
.bk-input--max-length span {
|
151
226
|
color: #979ba5;
|
@@ -188,19 +263,28 @@
|
|
188
263
|
color: #c4c6cc;
|
189
264
|
}
|
190
265
|
.bk-input--number-control {
|
266
|
+
display: flex;
|
191
267
|
width: 26px;
|
192
268
|
height: 100%;
|
269
|
+
padding: 4px 0;
|
193
270
|
font-size: 0;
|
194
|
-
flex-direction: column;
|
195
271
|
user-select: none;
|
272
|
+
flex-direction: column;
|
273
|
+
align-items: center;
|
196
274
|
}
|
197
275
|
.bk-input--number-control span {
|
198
|
-
display:
|
199
|
-
height: 50%;
|
276
|
+
display: flex;
|
200
277
|
overflow: hidden;
|
201
278
|
line-height: 1;
|
202
|
-
color: #
|
279
|
+
color: #979ba5;
|
203
280
|
text-align: center;
|
281
|
+
cursor: pointer;
|
282
|
+
background-color: #f5f7fa;
|
283
|
+
flex: 1;
|
284
|
+
align-items: center;
|
285
|
+
}
|
286
|
+
.bk-input--number-control span.is-disabled {
|
287
|
+
cursor: not-allowed;
|
204
288
|
}
|
205
289
|
.bk-input--number-control svg {
|
206
290
|
font-size: 16px;
|
@@ -209,5 +293,5 @@
|
|
209
293
|
transform: rotate(180deg);
|
210
294
|
}
|
211
295
|
.bk-input--number-control span:hover {
|
212
|
-
background-color: #
|
296
|
+
background-color: #eaebf0;
|
213
297
|
}
|
package/lib/input/input.less
CHANGED
@@ -8,12 +8,41 @@
|
|
8
8
|
}
|
9
9
|
|
10
10
|
.disabled() {
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
&.is-disabled,
|
12
|
+
&.is-readonly {
|
13
|
+
background-color: @input-disabled-bg;
|
14
|
+
border-color: @disable-color;
|
15
|
+
.@{bk-prefix}-input--prefix-area,
|
16
|
+
.@{bk-prefix}-input--suffix-area,
|
17
|
+
.@{bk-prefix}-input--suffix-icon {
|
18
|
+
background-color: @input-disabled-bg;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
&.is-disabled input,
|
23
|
+
&.is-readonly input,
|
24
|
+
&.is-disabled textarea,
|
25
|
+
&.is-readonly textarea {
|
26
|
+
cursor: not-allowed;
|
27
|
+
background-color: @input-disabled-bg;
|
28
|
+
opacity: 1;
|
29
|
+
}
|
30
|
+
|
31
|
+
&.is-readonly input,
|
32
|
+
&.is-readonly textarea {
|
33
|
+
cursor: auto;
|
34
|
+
}
|
35
|
+
|
36
|
+
}
|
37
|
+
|
38
|
+
.placeholder() {
|
39
|
+
::placeholder {
|
40
|
+
color: @light-gray;
|
41
|
+
}
|
14
42
|
}
|
15
43
|
|
16
44
|
.@{bk-prefix}-textarea {
|
45
|
+
.placeholder();
|
17
46
|
display: inline-flex;
|
18
47
|
width: 100%;
|
19
48
|
min-height: 70px;
|
@@ -27,6 +56,7 @@
|
|
27
56
|
box-sizing: border-box;
|
28
57
|
transition: all .3s;
|
29
58
|
flex-direction: column;
|
59
|
+
.disabled();
|
30
60
|
|
31
61
|
> textarea {
|
32
62
|
width: 100%;
|
@@ -43,12 +73,21 @@
|
|
43
73
|
&--max-length {
|
44
74
|
padding-right: @input-horizontal-padding;
|
45
75
|
margin: 0;
|
76
|
+
margin-left: auto;
|
77
|
+
font-size: 12px;
|
46
78
|
text-align: right;
|
79
|
+
transform: scale(.8);
|
80
|
+
justify-content: flex-end;
|
47
81
|
|
48
82
|
span {
|
49
83
|
color: @input-maxlength-color;
|
84
|
+
|
50
85
|
}
|
51
86
|
}
|
87
|
+
|
88
|
+
&.is-focused:not(.is-readonly) {
|
89
|
+
.active();
|
90
|
+
}
|
52
91
|
}
|
53
92
|
|
54
93
|
.@{bk-prefix}-input {
|
@@ -60,8 +99,12 @@
|
|
60
99
|
border: @border-width-base @border-style-base @input-border-color;
|
61
100
|
border-radius: @border-radius-base;
|
62
101
|
transition: all .3s;
|
102
|
+
.placeholder();
|
103
|
+
.disabled();
|
104
|
+
|
105
|
+
&:hover:not(.is-disabled) {
|
106
|
+
border-color: @gray-color;
|
63
107
|
|
64
|
-
&:hover {
|
65
108
|
.show-clear-only-hover {
|
66
109
|
display: block;
|
67
110
|
}
|
@@ -71,6 +114,15 @@
|
|
71
114
|
background-color: transparent;
|
72
115
|
border-color: transparent;
|
73
116
|
border-bottom-color: @input-border-color;
|
117
|
+
|
118
|
+
&:hover:not(.is-disabled) {
|
119
|
+
border-color: transparent;
|
120
|
+
border-bottom-color: @light-gray;
|
121
|
+
box-shadow: none;
|
122
|
+
.@{bk-prefix}-input--text {
|
123
|
+
background-color: @input-block-color;
|
124
|
+
}
|
125
|
+
}
|
74
126
|
}
|
75
127
|
|
76
128
|
&--suffix-icon {
|
@@ -94,6 +146,11 @@
|
|
94
146
|
.@{bk-prefix}-input--max-length {
|
95
147
|
font-size: @font-size-large;
|
96
148
|
}
|
149
|
+
.@{bk-prefix}-input--number-control {
|
150
|
+
span:first-child {
|
151
|
+
margin-bottom: 4px;
|
152
|
+
}
|
153
|
+
}
|
97
154
|
}
|
98
155
|
|
99
156
|
&--small {
|
@@ -114,22 +171,18 @@
|
|
114
171
|
|
115
172
|
&.is-focused:not(.is-readonly) {
|
116
173
|
.active();
|
117
|
-
|
174
|
+
|
118
175
|
&.is-simplicity {
|
119
176
|
border-color: transparent;
|
120
177
|
border-bottom-color: @primary-color;
|
121
178
|
box-shadow: none;
|
179
|
+
.@{bk-prefix}-input--text {
|
180
|
+
background-color: @input-block-color;
|
181
|
+
}
|
122
182
|
}
|
123
183
|
}
|
124
184
|
|
125
|
-
|
126
|
-
&.is-readonly input {
|
127
|
-
.disabled();
|
128
|
-
}
|
129
|
-
|
130
|
-
&.is-readonly input {
|
131
|
-
cursor: auto;
|
132
|
-
}
|
185
|
+
|
133
186
|
|
134
187
|
&--prefix-area,
|
135
188
|
&--suffix-area {
|
@@ -149,6 +202,8 @@
|
|
149
202
|
&--max-length {
|
150
203
|
align-self: center;
|
151
204
|
padding-right: @input-horizontal-padding;
|
205
|
+
font-size: 12px;
|
206
|
+
transform: scale(.8);
|
152
207
|
|
153
208
|
span {
|
154
209
|
color: @input-maxlength-color;
|
@@ -200,19 +255,29 @@
|
|
200
255
|
}
|
201
256
|
|
202
257
|
&--number-control {
|
258
|
+
display: flex;
|
203
259
|
width: 26px;
|
204
260
|
height: 100%;
|
261
|
+
padding: 4px 0;
|
205
262
|
font-size: 0;
|
206
|
-
flex-direction: column;
|
207
263
|
user-select: none;
|
264
|
+
flex-direction: column;
|
265
|
+
align-items: center;
|
208
266
|
|
209
267
|
span {
|
210
|
-
display:
|
211
|
-
height: 50%;
|
268
|
+
display: flex;
|
212
269
|
overflow: hidden;
|
213
270
|
line-height: 1;
|
214
|
-
color: @
|
271
|
+
color: @gray-color;
|
215
272
|
text-align: center;
|
273
|
+
cursor: pointer;
|
274
|
+
background-color: @input-block-color;
|
275
|
+
flex: 1;
|
276
|
+
align-items: center;
|
277
|
+
|
278
|
+
&.is-disabled {
|
279
|
+
cursor: not-allowed;
|
280
|
+
}
|
216
281
|
}
|
217
282
|
|
218
283
|
svg {
|
@@ -224,7 +289,7 @@
|
|
224
289
|
}
|
225
290
|
|
226
291
|
span:hover {
|
227
|
-
background-color:
|
292
|
+
background-color: @input-block-hover-color;
|
228
293
|
}
|
229
294
|
}
|
230
295
|
}
|
@@ -32,7 +32,8 @@
|
|
32
32
|
--input-broder-radius: 3px;
|
33
33
|
--input-shadow-color: #a3c5fd;
|
34
34
|
--input-horizontal-padding: 10px;
|
35
|
-
--input-block-color: #
|
35
|
+
--input-block-color: #f5f7fa;
|
36
|
+
--input-block-hover-color: #eaebf0;
|
36
37
|
--input-icon-size: var(--font-size-large);
|
37
38
|
--input-maxlength-color: #979ba5;
|
38
39
|
--button-primary-hover-color: #5594fa;
|
@@ -44,6 +45,8 @@
|
|
44
45
|
--button-danger-active-color: #db2626;
|
45
46
|
--button-success-active-color: #1ab943;
|
46
47
|
--button-warning-active-color: #eb9000;
|
48
|
+
--button-selected-bg-color: #e1ecff;
|
49
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
47
50
|
--fixed-navbar-background: #fff;
|
48
51
|
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
49
52
|
--switch-default-color: #fff;
|
@@ -141,6 +144,34 @@
|
|
141
144
|
transition: all 0.3s;
|
142
145
|
flex-direction: column;
|
143
146
|
}
|
147
|
+
.bk-textarea ::placeholder {
|
148
|
+
color: var(--light-gray);
|
149
|
+
}
|
150
|
+
.bk-textarea.is-disabled,
|
151
|
+
.bk-textarea.is-readonly {
|
152
|
+
background-color: var(--input-disabled-bg);
|
153
|
+
border-color: var(--disable-color);
|
154
|
+
}
|
155
|
+
.bk-textarea.is-disabled .bk-input--prefix-area,
|
156
|
+
.bk-textarea.is-readonly .bk-input--prefix-area,
|
157
|
+
.bk-textarea.is-disabled .bk-input--suffix-area,
|
158
|
+
.bk-textarea.is-readonly .bk-input--suffix-area,
|
159
|
+
.bk-textarea.is-disabled .bk-input--suffix-icon,
|
160
|
+
.bk-textarea.is-readonly .bk-input--suffix-icon {
|
161
|
+
background-color: var(--input-disabled-bg);
|
162
|
+
}
|
163
|
+
.bk-textarea.is-disabled input,
|
164
|
+
.bk-textarea.is-readonly input,
|
165
|
+
.bk-textarea.is-disabled textarea,
|
166
|
+
.bk-textarea.is-readonly textarea {
|
167
|
+
cursor: not-allowed;
|
168
|
+
background-color: var(--input-disabled-bg);
|
169
|
+
opacity: 1;
|
170
|
+
}
|
171
|
+
.bk-textarea.is-readonly input,
|
172
|
+
.bk-textarea.is-readonly textarea {
|
173
|
+
cursor: auto;
|
174
|
+
}
|
144
175
|
.bk-textarea > textarea {
|
145
176
|
width: 100%;
|
146
177
|
flex: 1;
|
@@ -155,11 +186,20 @@
|
|
155
186
|
.bk-textarea--max-length {
|
156
187
|
padding-right: var(--input-horizontal-padding);
|
157
188
|
margin: 0;
|
189
|
+
margin-left: auto;
|
190
|
+
font-size: 12px;
|
158
191
|
text-align: right;
|
192
|
+
transform: scale(0.8);
|
193
|
+
justify-content: flex-end;
|
159
194
|
}
|
160
195
|
.bk-textarea--max-length span {
|
161
196
|
color: var(--input-maxlength-color);
|
162
197
|
}
|
198
|
+
.bk-textarea.is-focused:not(.is-readonly) {
|
199
|
+
border-color: var(--primary-color);
|
200
|
+
outline: 0;
|
201
|
+
box-shadow: 0px 0px 3px 0px var(--input-shadow-color);
|
202
|
+
}
|
163
203
|
.bk-input {
|
164
204
|
display: inline-flex;
|
165
205
|
align-items: stretch;
|
@@ -170,7 +210,38 @@
|
|
170
210
|
border-radius: var(--border-radius-base);
|
171
211
|
transition: all 0.3s;
|
172
212
|
}
|
173
|
-
.bk-input
|
213
|
+
.bk-input ::placeholder {
|
214
|
+
color: var(--light-gray);
|
215
|
+
}
|
216
|
+
.bk-input.is-disabled,
|
217
|
+
.bk-input.is-readonly {
|
218
|
+
background-color: var(--input-disabled-bg);
|
219
|
+
border-color: var(--disable-color);
|
220
|
+
}
|
221
|
+
.bk-input.is-disabled .bk-input--prefix-area,
|
222
|
+
.bk-input.is-readonly .bk-input--prefix-area,
|
223
|
+
.bk-input.is-disabled .bk-input--suffix-area,
|
224
|
+
.bk-input.is-readonly .bk-input--suffix-area,
|
225
|
+
.bk-input.is-disabled .bk-input--suffix-icon,
|
226
|
+
.bk-input.is-readonly .bk-input--suffix-icon {
|
227
|
+
background-color: var(--input-disabled-bg);
|
228
|
+
}
|
229
|
+
.bk-input.is-disabled input,
|
230
|
+
.bk-input.is-readonly input,
|
231
|
+
.bk-input.is-disabled textarea,
|
232
|
+
.bk-input.is-readonly textarea {
|
233
|
+
cursor: not-allowed;
|
234
|
+
background-color: var(--input-disabled-bg);
|
235
|
+
opacity: 1;
|
236
|
+
}
|
237
|
+
.bk-input.is-readonly input,
|
238
|
+
.bk-input.is-readonly textarea {
|
239
|
+
cursor: auto;
|
240
|
+
}
|
241
|
+
.bk-input:hover:not(.is-disabled) {
|
242
|
+
border-color: var(--gray-color);
|
243
|
+
}
|
244
|
+
.bk-input:hover:not(.is-disabled) .show-clear-only-hover {
|
174
245
|
display: block;
|
175
246
|
}
|
176
247
|
.bk-input.is-simplicity {
|
@@ -178,6 +249,14 @@
|
|
178
249
|
border-color: transparent;
|
179
250
|
border-bottom-color: var(--input-border-color);
|
180
251
|
}
|
252
|
+
.bk-input.is-simplicity:hover:not(.is-disabled) {
|
253
|
+
border-color: transparent;
|
254
|
+
border-bottom-color: var(--light-gray);
|
255
|
+
box-shadow: none;
|
256
|
+
}
|
257
|
+
.bk-input.is-simplicity:hover:not(.is-disabled) .bk-input--text {
|
258
|
+
background-color: var(--input-block-color);
|
259
|
+
}
|
181
260
|
.bk-input--suffix-icon {
|
182
261
|
display: flex;
|
183
262
|
height: 100%;
|
@@ -198,6 +277,9 @@
|
|
198
277
|
.bk-input--large .bk-input--max-length {
|
199
278
|
font-size: var(--font-size-large);
|
200
279
|
}
|
280
|
+
.bk-input--large .bk-input--number-control span:first-child {
|
281
|
+
margin-bottom: 4px;
|
282
|
+
}
|
201
283
|
.bk-input--small {
|
202
284
|
height: var(--component-size-small);
|
203
285
|
font-size: var(--font-size-base);
|
@@ -221,14 +303,8 @@
|
|
221
303
|
border-bottom-color: var(--primary-color);
|
222
304
|
box-shadow: none;
|
223
305
|
}
|
224
|
-
.bk-input.is-
|
225
|
-
|
226
|
-
cursor: not-allowed;
|
227
|
-
background-color: var(--input-disabled-bg);
|
228
|
-
opacity: 1;
|
229
|
-
}
|
230
|
-
.bk-input.is-readonly input {
|
231
|
-
cursor: auto;
|
306
|
+
.bk-input.is-focused:not(.is-readonly).is-simplicity .bk-input--text {
|
307
|
+
background-color: var(--input-block-color);
|
232
308
|
}
|
233
309
|
.bk-input--prefix-area,
|
234
310
|
.bk-input--suffix-area {
|
@@ -246,6 +322,8 @@
|
|
246
322
|
.bk-input--max-length {
|
247
323
|
align-self: center;
|
248
324
|
padding-right: var(--input-horizontal-padding);
|
325
|
+
font-size: 12px;
|
326
|
+
transform: scale(0.8);
|
249
327
|
}
|
250
328
|
.bk-input--max-length span {
|
251
329
|
color: var(--input-maxlength-color);
|
@@ -288,19 +366,28 @@
|
|
288
366
|
color: var(--light-gray);
|
289
367
|
}
|
290
368
|
.bk-input--number-control {
|
369
|
+
display: flex;
|
291
370
|
width: 26px;
|
292
371
|
height: 100%;
|
372
|
+
padding: 4px 0;
|
293
373
|
font-size: 0;
|
294
|
-
flex-direction: column;
|
295
374
|
user-select: none;
|
375
|
+
flex-direction: column;
|
376
|
+
align-items: center;
|
296
377
|
}
|
297
378
|
.bk-input--number-control span {
|
298
|
-
display:
|
299
|
-
height: 50%;
|
379
|
+
display: flex;
|
300
380
|
overflow: hidden;
|
301
381
|
line-height: 1;
|
302
|
-
color: var(--
|
382
|
+
color: var(--gray-color);
|
303
383
|
text-align: center;
|
384
|
+
cursor: pointer;
|
385
|
+
background-color: var(--input-block-color);
|
386
|
+
flex: 1;
|
387
|
+
align-items: center;
|
388
|
+
}
|
389
|
+
.bk-input--number-control span.is-disabled {
|
390
|
+
cursor: not-allowed;
|
304
391
|
}
|
305
392
|
.bk-input--number-control svg {
|
306
393
|
font-size: var(--input-icon-size);
|
@@ -309,5 +396,5 @@
|
|
309
396
|
transform: rotate(180deg);
|
310
397
|
}
|
311
398
|
.bk-input--number-control span:hover {
|
312
|
-
background-color:
|
399
|
+
background-color: var(--input-block-hover-color);
|
313
400
|
}
|
@@ -32,7 +32,8 @@
|
|
32
32
|
--input-broder-radius: 3px;
|
33
33
|
--input-shadow-color: #a3c5fd;
|
34
34
|
--input-horizontal-padding: 10px;
|
35
|
-
--input-block-color: #
|
35
|
+
--input-block-color: #f5f7fa;
|
36
|
+
--input-block-hover-color: #eaebf0;
|
36
37
|
--input-icon-size: var(--font-size-large);
|
37
38
|
--input-maxlength-color: #979ba5;
|
38
39
|
--button-primary-hover-color: #5594fa;
|
@@ -44,6 +45,8 @@
|
|
44
45
|
--button-danger-active-color: #db2626;
|
45
46
|
--button-success-active-color: #1ab943;
|
46
47
|
--button-warning-active-color: #eb9000;
|
48
|
+
--button-selected-bg-color: #e1ecff;
|
49
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
47
50
|
--fixed-navbar-background: #fff;
|
48
51
|
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
49
52
|
--switch-default-color: #fff;
|
@@ -32,7 +32,8 @@
|
|
32
32
|
--input-broder-radius: 3px;
|
33
33
|
--input-shadow-color: #a3c5fd;
|
34
34
|
--input-horizontal-padding: 10px;
|
35
|
-
--input-block-color: #
|
35
|
+
--input-block-color: #f5f7fa;
|
36
|
+
--input-block-hover-color: #eaebf0;
|
36
37
|
--input-icon-size: var(--font-size-large);
|
37
38
|
--input-maxlength-color: #979ba5;
|
38
39
|
--button-primary-hover-color: #5594fa;
|
@@ -44,6 +45,8 @@
|
|
44
45
|
--button-danger-active-color: #db2626;
|
45
46
|
--button-success-active-color: #1ab943;
|
46
47
|
--button-warning-active-color: #eb9000;
|
48
|
+
--button-selected-bg-color: #e1ecff;
|
49
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
47
50
|
--fixed-navbar-background: #fff;
|
48
51
|
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
49
52
|
--switch-default-color: #fff;
|
@@ -32,7 +32,8 @@
|
|
32
32
|
--input-broder-radius: 3px;
|
33
33
|
--input-shadow-color: #a3c5fd;
|
34
34
|
--input-horizontal-padding: 10px;
|
35
|
-
--input-block-color: #
|
35
|
+
--input-block-color: #f5f7fa;
|
36
|
+
--input-block-hover-color: #eaebf0;
|
36
37
|
--input-icon-size: var(--font-size-large);
|
37
38
|
--input-maxlength-color: #979ba5;
|
38
39
|
--button-primary-hover-color: #5594fa;
|
@@ -44,6 +45,8 @@
|
|
44
45
|
--button-danger-active-color: #db2626;
|
45
46
|
--button-success-active-color: #1ab943;
|
46
47
|
--button-warning-active-color: #eb9000;
|
48
|
+
--button-selected-bg-color: #e1ecff;
|
49
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
47
50
|
--fixed-navbar-background: #fff;
|
48
51
|
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
49
52
|
--switch-default-color: #fff;
|