bkui-vue 0.0.2-beta.9 → 0.0.2-table-refactor.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.
- package/dist/index.cjs.js +69 -61
- package/dist/index.esm.js +15945 -15487
- package/dist/index.umd.js +69 -61
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.d.ts +1 -1
- package/lib/affix/index.d.ts +4 -4
- package/lib/alert/alert.css +7 -0
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.less +16 -6
- package/lib/alert/alert.variable.css +7 -0
- package/lib/alert/index.d.ts +10 -10
- package/lib/animate-number/index.d.ts +1 -1
- package/lib/backtop/index.d.ts +1 -1
- package/lib/badge/badge.d.ts +2 -2
- package/lib/badge/index.d.ts +7 -7
- package/lib/breadcrumb/index.d.ts +2 -2
- package/lib/button/button.css +20 -0
- package/lib/button/button.less +105 -94
- package/lib/button/button.variable.css +20 -0
- package/lib/button/index.d.ts +2 -2
- package/lib/card/card.d.ts +1 -1
- package/lib/card/index.d.ts +4 -4
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/index.d.ts +5 -2
- package/lib/cascader/index.js +1 -1
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +6 -3
- package/lib/checkbox/checkbox.d.ts +4 -4
- package/lib/checkbox/index.d.ts +22 -19
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/index.d.ts +1 -1
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse-transition/index.d.ts +128 -2
- package/lib/collapse-transition/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +16 -0
- package/lib/color-picker/components/recommend-colors.d.ts +16 -0
- package/lib/color-picker/index.d.ts +19 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/index.js +1 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/config-provider/use-global-config.d.ts +2 -0
- package/lib/config-provider/use-prefix.d.ts +2 -0
- package/lib/container/index.d.ts +2 -2
- package/lib/date-picker/date-picker.d.ts +3 -1
- package/lib/date-picker/index.d.ts +12 -5
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/date-range.d.ts +2 -1
- package/lib/dialog/dialog.css +2 -0
- package/lib/dialog/dialog.variable.css +2 -0
- package/lib/dialog/index.d.ts +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +3 -2
- package/lib/divider/index.d.ts +1 -1
- package/lib/dropdown/dropdown.css +1 -0
- package/lib/dropdown/dropdown.variable.css +1 -0
- package/lib/dropdown/index.d.ts +2 -2
- package/lib/exception/index.d.ts +2 -2
- package/lib/fixed-navbar/index.d.ts +1 -1
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +1 -1
- package/lib/hooks.d.ts +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icon/assistant.d.ts +4 -0
- package/lib/icon/assistant.js +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/image/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/info-box/info-box.css +2 -0
- package/lib/info-box/info-box.less +2 -1
- package/lib/info-box/info-box.variable.css +2 -0
- package/lib/input/index.d.ts +146 -50
- package/lib/input/index.js +2 -1
- package/lib/input/index.js.LICENSE.txt +1 -0
- package/lib/input/input.css +34 -6
- package/lib/input/input.d.ts +100 -11
- package/lib/input/input.less +53 -14
- package/lib/input/input.variable.css +34 -6
- package/lib/input/util.d.ts +6 -0
- package/lib/link/index.d.ts +4 -4
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +2 -2
- package/lib/locale/index.js +1 -1
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.d.ts +2 -2
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +33 -9
- package/lib/message/message.less +78 -54
- package/lib/message/message.variable.css +33 -9
- package/lib/message/messageConstructor.d.ts +25 -4
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +2 -0
- package/lib/modal/modal.variable.css +2 -0
- package/lib/navigation/index.d.ts +4 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.d.ts +1 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/components/overflow-title.d.ts +257 -1
- package/lib/overflow-title/index.d.ts +387 -2
- package/lib/overflow-title/index.js +1 -1
- package/lib/overflow-title/props.d.ts +129 -0
- package/lib/pagination/index.d.ts +2 -2
- package/lib/plugin-popover/index.js +1 -1
- package/lib/pop-confirm/index.d.ts +1 -1
- package/lib/popover/content.d.ts +33 -0
- package/lib/popover/index.d.ts +74 -16
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +1 -0
- package/lib/popover/popover.d.ts +40 -7
- package/lib/popover/popover.less +3 -2
- package/lib/popover/popover.variable.css +1 -0
- package/lib/popover/props.d.ts +25 -2
- package/lib/popover/use-floating.d.ts +1 -1
- package/lib/popover/use-popover-init.d.ts +2 -1
- package/lib/popover2/index.d.ts +1 -1
- package/lib/preset.d.ts +2 -0
- package/lib/process/index.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/radio/index.d.ts +23 -23
- package/lib/radio/radio-button.d.ts +4 -4
- package/lib/radio/radio-group.d.ts +4 -4
- package/lib/radio/radio.d.ts +4 -4
- package/lib/rate/index.d.ts +8 -4
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +2 -1
- package/lib/resize-layout/index.d.ts +4 -4
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +12 -0
- package/lib/resize-layout/resize-layout.d.ts +1 -1
- package/lib/resize-layout/resize-layout.less +12 -0
- package/lib/resize-layout/resize-layout.variable.css +12 -0
- package/lib/search-select/index.d.ts +62 -29
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/input.d.ts +5 -1
- package/lib/search-select/menu.d.ts +33 -2
- package/lib/search-select/search-select.css +31 -11
- package/lib/search-select/search-select.d.ts +23 -20
- package/lib/search-select/search-select.less +29 -10
- package/lib/search-select/search-select.variable.css +31 -11
- package/lib/search-select/selected.d.ts +5 -1
- package/lib/search-select/utils.d.ts +13 -5
- package/lib/select/common.d.ts +1 -0
- package/lib/select/index.d.ts +203 -72
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +11 -0
- package/lib/select/select.css +9 -1
- package/lib/select/select.d.ts +86 -31
- package/lib/select/select.less +11 -1
- package/lib/select/select.variable.css +9 -1
- package/lib/select/selectTagInput.d.ts +8 -5
- package/lib/shared/helper.d.ts +1 -1
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +3 -4
- package/lib/shared/pop-manager.d.ts +6 -2
- package/lib/shared/popover.d.ts +2 -2
- package/lib/shared/vue-types.d.ts +3 -2
- package/lib/sideslider/index.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/index.js +1 -1
- package/lib/styles/mixins/clearfix.css +8 -0
- package/lib/styles/mixins/clearfix.less +10 -0
- package/lib/styles/mixins/clearfix.variable.css +8 -0
- package/lib/styles/mixins/mixins.css +72 -0
- package/lib/styles/mixins/mixins.less +5 -0
- package/lib/styles/mixins/mixins.variable.css +72 -0
- package/lib/styles/mixins/popper.less +6 -5
- package/lib/swiper/index.d.ts +1 -1
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.css +0 -6
- package/lib/swiper/swiper.less +0 -8
- package/lib/swiper/swiper.variable.css +0 -6
- package/lib/switcher/index.d.ts +30 -16
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.d.ts +74 -5
- package/lib/tab/index.d.ts +3 -3
- package/lib/tab/tab-nav.d.ts +12 -2
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/components/table-cell.d.ts +22 -24
- package/lib/table/components/table-column.d.ts +123 -81
- package/lib/table/const.d.ts +18 -2
- package/lib/table/events.d.ts +26 -26
- package/lib/table/index.d.ts +279 -294
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +3 -0
- package/lib/table/plugins/head-filter.less +3 -0
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/settings.d.ts +7 -17
- package/lib/table/plugins/use-column-resize.d.ts +30 -10
- package/lib/table/plugins/use-fixed-column.d.ts +6 -5
- package/lib/table/plugins/use-pagination.d.ts +7 -4
- package/lib/table/props.d.ts +117 -58
- package/lib/table/render.d.ts +7 -17
- package/lib/table/table.css +79 -10
- package/lib/table/table.d.ts +95 -72
- package/lib/table/table.less +55 -20
- package/lib/table/table.variable.css +79 -10
- package/lib/table/use-attributes.d.ts +55 -0
- package/lib/table/use-column.d.ts +175 -49
- package/lib/table/use-common.d.ts +1608 -88
- package/lib/table/use-render.d.ts +11 -0
- package/lib/table/utils.d.ts +30 -29
- package/lib/table-column/index.d.ts +235 -405
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.d.ts +10 -10
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag-input/index.d.ts +49 -7
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.css +9 -1
- package/lib/tag-input/tag-input.d.ts +46 -6
- package/lib/tag-input/tag-input.less +13 -4
- package/lib/tag-input/tag-input.variable.css +9 -1
- package/lib/tag-input/tag-props.d.ts +16 -2
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/timeline/index.d.ts +1 -1
- package/lib/transfer/index.d.ts +1 -1
- package/lib/tree/constant.d.ts +2 -2
- package/lib/tree/index.d.ts +37 -7
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +8 -1
- package/lib/tree/tree.d.ts +20 -2
- package/lib/tree/use-node-action.d.ts +3 -2
- package/lib/tree/use-node-attribute.d.ts +15 -8
- package/lib/tree/use-tree-init.d.ts +1 -2
- package/lib/tree/util.d.ts +7 -2
- package/lib/upload/index.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +43 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -0
- package/lib/virtual-render/v-virtual-render.d.ts +1 -0
- package/lib/virtual-render/virtual-render.d.ts +27 -2
- package/lib/volar.components.d.ts +24 -24
- package/package.json +17 -16
package/lib/input/index.js
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../directives"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../directives","../icon"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../directives"),require("../icon")):t(e["../shared"],e.vue,e["../config-provider"],e["../directives"],e["../icon"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,((e,t,r,o,n)=>(()=>{var i={2717:e=>{"use strict";e.exports=r},4061:e=>{"use strict";e.exports=o},6870:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,r)=>{var o=r(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var n=t&&t.prototype instanceof h?t:h,i=Object.create(n.prototype),u=new L(o||[]);return a(i,"_invoke",{value:E(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var v={};function h(){}function y(){}function m(){}var g={};p(g,l,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(V([])));x&&x!==r&&i.call(x,l)&&(g=x);var w=m.prototype=h.prototype=Object.create(g);function P(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(n,a,u,l){var c=d(e[n],e,a);if("throw"!==c.type){var s=c.arg,p=s.value;return p&&"object"==o(p)&&i.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,u,l)}),(function(e){r("throw",e,u,l)})):t.resolve(p).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,l)}))}l(c.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function E(e,t,r){var o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return{value:void 0,done:!0}}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var u=N(a,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var l=d(e,t,r);if("normal"===l.type){if(o=r.done?"completed":"suspendedYield",l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o="completed",r.method="throw",r.arg=l.arg)}}}function N(e,t){var r=t.method,o=e.iterator[r];if(void 0===o)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,N(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var n=d(o,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,v;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function V(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return y.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:y,configurable:!0}),y.displayName=p(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,p(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},P(T.prototype),p(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,o,n,i){void 0===i&&(i=Promise);var a=new T(f(e,r,o,n),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(w),p(w,s,"Generator"),p(w,l,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var o in t)r.push(o);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=V,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return a.type="throw",a.arg=e,t.next=r,o&&(t.method="next",t.arg=void 0),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o],a=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var u=i.call(n,"catchLoc"),l=i.call(n,"finallyLoc");if(u&&l){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(u){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return r(n.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var a=n?n.completion:{};return a.type=e,a.arg=t,n?(this.method="next",this.next=n.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;S(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:V(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,r)=>{var o=r(7609)();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>P});var e=u(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){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var n=u(748),i=u(2841),a=u.n(i);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var c,s=u(2717),p=u(4061),f=u(6870),d=void 0,v=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function h(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;d||(d=document.createElement("textarea"),document.body.appendChild(d));var n=function(e){var t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),n=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:v.map((function(e){return"".concat(e,":").concat(t.getPropertyValue(e))})).join(";"),paddingSize:o,borderSize:n,boxSizing:r}}(e),i=n.paddingSize,a=n.borderSize,u=n.boxSizing,l=n.contextStyle;d.setAttribute("style","".concat(l,";").concat("\n height:0 !important;\n visibility:hidden !important;\n \n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n")),d.value=e.value||e.placeholder||"";var c=d.scrollHeight,s={};"border-box"===u?c+=a:"content-box"===u&&(c-=i),d.value="";var p=d.scrollHeight-i;if(Number.isInteger(r)){var f=p*r;"border-box"===u&&(f=f+i+a),c=Math.max(f,c),s.minHeight="".concat(f,"px")}if(Number.isInteger(o)){var h=p*o;"border-box"===u&&(h=h+i+a),c=Math.min(h,c)}return s.height="".concat(c,"px"),null===(t=d.parentNode)||void 0===t||t.removeChild(d),d=void 0,s}var y,m={type:e.PropTypes.string.def("text"),clearable:e.PropTypes.bool,disabled:e.PropTypes.bool,readonly:e.PropTypes.bool,placeholder:e.PropTypes.string.def(""),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,maxcharacter:e.PropTypes.integer,behavior:(0,e.InputBehaviorType)(),showWordLimit:e.PropTypes.bool,showControl:e.PropTypes.bool.def(!0),showClearOnlyHover:e.PropTypes.bool.def(!0),precision:e.PropTypes.number.def(0).validate((function(e){return e>=0&&e<20})),modelValue:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]),size:e.PropTypes.size(),rows:e.PropTypes.number,selectReadonly:e.PropTypes.bool.def(!1),withValidate:e.PropTypes.bool.def(!0),overMaxLengthLimit:e.PropTypes.bool.def(!1),showOverflowTooltips:e.PropTypes.bool.def(!0),resize:e.PropTypes.bool.def(!0),autosize:e.PropTypes.oneOfType([Boolean,Object]).def(!1),stopPropagation:e.PropTypes.bool.def(!0)};function g(e,t){return!0}function b(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"}(y||(y={}));var x=(o(c={},y.UPDATE,g),o(c,y.FOCUS,(function(e){return e})),o(c,y.BLUR,(function(e){return e})),o(c,y.CHANGE,g),o(c,y.CLEAR,(function(){return!0})),o(c,y.INPUT,g),o(c,y.KEYPRESS,g),o(c,y.KEYDOWN,g),o(c,y.KEYUP,g),o(c,y.ENTER,g),o(c,y.PASTE,(function(e,t){return!0})),o(c,y.COMPOSITIONSTART,b),o(c,y.COMPOSITIONUPDATE,b),o(c,y.COMPOSITIONEND,b),c);const w=(0,n.defineComponent)({name:"Input",directives:{bkTooltips:p.bkTooltips},inheritAttrs:!1,props:m,emits:x,setup:function(r,i){var u=this,l=(0,s.usePrefix)().resolveClassName,c=(0,e.useFormItem)(),p=(0,s.useLocale)("input"),d=(0,n.ref)(!1),v=(0,n.ref)(!1),m=(0,n.computed)((function(){return"textarea"===r.type})),g=(0,n.computed)((function(){return m.value?l("textarea"):l("input")})),b=i.attrs,x=(b.class,b.style),w=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}(b,["class","style"]),P=(0,n.ref)(),T=(0,n.ref)(void 0===r.modelValue||null===r.modelValue?{}:{value:r.modelValue}),E=(0,n.computed)((function(){var t;return(0,e.classes)((o(t={},"".concat(g.value,"--").concat(r.size),!!r.size),o(t,"resizable",r.resize),o(t,"is-focused",d.value),o(t,"is-readonly",r.readonly&&!r.selectReadonly),o(t,"is-disabled",r.disabled),o(t,"is-simplicity","simplicity"===r.behavior),o(t,"".concat(i.attrs.class),!!i.attrs.class),t),g.value)})),N=(0,n.ref)(!1),O=(0,n.ref)({}),S=function(){var e,t;if(m.value)if(r.autosize){var o=null===(e=r.autosize)||void 0===e?void 0:e.minRows,i=null===(t=r.autosize)||void 0===t?void 0:t.maxRows,a=h(P.value,o,i);O.value=Object.assign({overflowY:"hidden"},a),(0,n.nextTick)((function(){O.value=a}))}else O.value={minHeight:h(P.value).minHeight}},L=function(e){var t=!1;return function(){var o;!t&&r.autosize&&(null===(null===(o=P.value)||void 0===o?void 0:o.offsetParent)||(e(),t=!0))}}(S),V=ne("suffix-icon"),C={search:function(){return(0,n.createVNode)(f.Search,null,null)},password:function(){return(0,n.createVNode)(f.Unvisible,{onClick:ie,class:V},null)}},j=(0,n.computed)((function(){var e=C[r.type];return U.value?(0,n.createVNode)(f.Eye,{class:V,onClick:ie},null):e?(0,n.createVNode)(e,{class:V},null):null})),I=(0,n.computed)((function(){return"number"===r.type})),A=(0,n.computed)((function(){var e,t;return Math.floor(null!==(t=null!==(e=r.maxlength)&&void 0!==e?e:r.maxcharacter)&&void 0!==t?t:0)})),U=(0,n.ref)(!1),k=(0,n.computed)((function(){return(0,e.classes)(o({"show-clear-only-hover":r.showClearOnlyHover},"".concat(g.value,"--clear-icon"),!0),V)})),_=(0,n.computed)((function(){var t;return(0,e.classes)((o(t={},ne("max-length"),!0),o(t,"is-over-limit",A.value-z.value<0),t))})),M=function(e){return"number"==typeof r.maxcharacter?e.split("").reduce((function(e,t,o){return e.len+=t.charCodeAt(0)>255?2:1,e.len>r.maxcharacter&&-1===e.pos&&(e.pos=o),e}),{len:0,pos:-1}):{len:e.length,pos:-1}},z=(0,n.computed)((function(){var e,t=null!==(e=r.modelValue)&&void 0!==e?e:"";return M(t).len})),D=(0,n.computed)((function(){return(0,e.classes)({"is-disabled":r.disabled||r.modelValue>=r.max})})),R=(0,n.computed)((function(){return(0,e.classes)({"is-disabled":r.disabled||r.modelValue<=r.min})})),F=(0,n.computed)((function(){return r.showOverflowTooltips&&N.value&&r.modelValue?{content:r.modelValue,sameWidth:!0}:{disabled:!0}})),G=(0,n.computed)((function(){return"number"==typeof r.maxlength||"number"==typeof r.maxcharacter})),H=new ResizeObserver((function(){L()}));function K(){var e,t;return(null===(e=P.value)||void 0===e?void 0:e.scrollWidth)>(null===(t=P.value)||void 0===t?void 0:t.clientWidth)+2}function Y(){if(!r.disabled){var e=I.value?r.min:"";i.emit(y.UPDATE,e,null),i.emit(y.CHANGE,e,null),i.emit(y.CLEAR)}}(0,n.watch)((function(){return r.type}),(function(){return e=u,t=void 0,r=void 0,o=a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.nextTick)();case 2:S();case 3:case"end":return e.stop()}}),e)})),new(r||(r=Promise))((function(n,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function u(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}l((o=o.apply(e,t||[])).next())}));var e,t,r,o})),(0,n.watch)((function(){return r.modelValue}),(function(e){var t;r.withValidate&&(null===(t=null==c?void 0:c.validate)||void 0===t||t.call(c,"change")),T.value={value:e},(0,n.nextTick)((function(){return S()}))})),(0,n.onMounted)((function(){N.value=K(),H.observe(P.value),(0,n.nextTick)((function(){return S()}))})),(0,n.onBeforeUnmount)((function(){H.disconnect()})),i.expose({focus:function(){P.value.focus()},clear:Y});var W,q,B=(W=[y.KEYUP,y.KEYDOWN,y.KEYPRESS,y.PASTE,y.CHANGE,y.INPUT].map((function(e){return function(t){if(r.stopPropagation&&t.stopPropagation(),G.value&&!r.overMaxLengthLimit){var o=M(t.target.value);if(o.len>=A.value&&(e===y.KEYDOWN||e===y.INPUT)&&!v.value){var n=o.pos>0?t.target.value.slice(0,o.pos):t.target.value;return T.value={value:n},i.emit(y.UPDATE,n,t),void i.emit(y.INPUT,n,t)}}if(e!==y.KEYDOWN||"Enter"!==t.code&&"Enter"!==t.key&&13!==t.keyCode||i.emit(y.ENTER,t.target.value,t),!v.value||![y.INPUT,y.CHANGE,y.KEYDOWN].some((function(t){return e===t}))){if(e===y.INPUT)i.emit(y.UPDATE,t.target.value,t);else if(e===y.CHANGE&&I.value&&""!==t.target.value){var a=te(t.target.value,0);return i.emit(y.UPDATE,a,t),void i.emit(e,a,t)}i.emit(e,t.target.value,t)}}})),q=6,function(e){if(Array.isArray(e))return e}(W)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,i,a,u=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(o=i.call(r)).done)&&(u.push(o.value),u.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return u}}(W,q)||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}}(W,q)||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.")}()),$=B[0],J=B[1],Q=B[2],X=B[3],Z=B[4],ee=B[5];function te(e,t){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=Number(t),i=Number.isInteger(r.precision)?r.precision:0,a=Number(e),u=Number.isInteger(n)?n:1,l=a+(o?u:-1*u);return Number.isInteger(r.max)&&(l=Math.min(l,r.max)),Number.isInteger(r.min)&&(l=Math.max(l,r.min)),+l.toFixed(i)}function re(e){if(!r.disabled){var t=te(r.modelValue,r.step);i.emit(y.UPDATE,t,e),i.emit(y.CHANGE,t,e)}}function oe(e){if(!r.disabled){var t=te(r.modelValue,r.step,!1);i.emit(y.UPDATE,t,e),i.emit(y.CHANGE,t,e)}}function ne(e){return"".concat(g.value,"--").concat(e)}function ie(){U.value=!U.value}var ae=(0,n.computed)((function(){return{maxlength:!r.overMaxLengthLimit&&r.maxlength,placeholder:r.placeholder||p.value.placeholder,readonly:r.readonly,disabled:r.disabled}})),ue={onInput:ee,onFocus:function(e){d.value=!0,i.emit(y.FOCUS,e)},onBlur:function(e){var t;d.value=!1,N.value=K(),i.emit(y.BLUR,e),r.withValidate&&(null===(t=null==c?void 0:c.validate)||void 0===t||t.call(c,"blur"))},onPaste:X,onChange:Z,onKeypress:Q,onKeydown:J,onKeyup:$,onCompositionstart:function(){v.value=!0},onCompositionend:function(e){v.value=!1,ee(e)}};return function(){var e,t,o,a,u,l;return(0,n.withDirectives)((0,n.createVNode)("div",{class:E.value,style:x},[null!==(o=null===(t=null===(e=i.slots)||void 0===e?void 0:e.prefix)||void 0===t?void 0:t.call(e))&&void 0!==o?o:r.prefix&&(0,n.createVNode)("div",{class:ne("prefix-area")},[(0,n.createVNode)("span",{class:ne("prefix-area--text")},[r.prefix])]),m.value?(0,n.createVNode)("textarea",(0,n.mergeProps)({ref:P,spellcheck:!1},w,ue,ae.value,{rows:r.rows,style:O.value},T.value),null):(0,n.createVNode)("input",(0,n.mergeProps)({spellcheck:!1},w,{ref:P,class:"".concat(g.value,"--text"),type:U.value&&"password"===r.type?"text":r.type,step:r.step,max:r.max,min:r.min},ue,ae.value,T.value),null),!m.value&&r.clearable&&!!r.modelValue&&(0,n.createVNode)("span",{class:k.value,onClick:Y},[(0,n.createVNode)(f.Close,null,null)]),j.value,G.value&&(r.showWordLimit||m.value)&&(0,n.createVNode)("p",{class:_.value},[r.overMaxLengthLimit?A.value-z.value:(0,n.createVNode)(n.Fragment,null,[z.value,(0,n.createTextVNode)(" / "),(0,n.createVNode)("span",null,[A.value])])]),I.value&&r.showControl&&(0,n.createVNode)("div",{class:ne("number-control")},[(0,n.createVNode)(f.DownSmall,{class:D.value,onClick:re},null),(0,n.createVNode)(f.DownSmall,{class:R.value,onClick:oe},null)]),null!==(l=null===(u=null===(a=i.slots)||void 0===a?void 0:a.suffix)||void 0===u?void 0:u.call(a))&&void 0!==l?l:r.suffix&&(0,n.createVNode)("div",{class:ne("suffix-area")},[(0,n.createVNode)("span",{class:ne("suffix-area--text")},[r.suffix])])]),[[(0,n.resolveDirective)("bk-tooltips"),F.value]])}}}),P=(0,e.withInstall)(w)})(),l})()));
|
@@ -0,0 +1 @@
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/lib/input/input.css
CHANGED
@@ -71,12 +71,12 @@
|
|
71
71
|
left: -4px;
|
72
72
|
}
|
73
73
|
.bk-textarea {
|
74
|
+
--textarea-line-height: 20px;
|
74
75
|
display: inline-flex;
|
75
76
|
width: 100%;
|
76
|
-
min-height: 70px;
|
77
77
|
overflow: hidden;
|
78
78
|
font-size: 12px;
|
79
|
-
line-height:
|
79
|
+
line-height: var(--textarea-line-height);
|
80
80
|
color: #63656e;
|
81
81
|
background-color: white;
|
82
82
|
border: 1px solid #c4c6cc;
|
@@ -86,8 +86,20 @@
|
|
86
86
|
flex-direction: column;
|
87
87
|
}
|
88
88
|
.bk-textarea ::placeholder {
|
89
|
+
font-size: 12px;
|
89
90
|
color: #c4c6cc;
|
90
91
|
}
|
92
|
+
.bk-textarea.resizable {
|
93
|
+
resize: both;
|
94
|
+
}
|
95
|
+
.bk-textarea ::-webkit-scrollbar {
|
96
|
+
-webkit-appearance: none;
|
97
|
+
width: 3px;
|
98
|
+
}
|
99
|
+
.bk-textarea ::-webkit-scrollbar-thumb {
|
100
|
+
border-radius: 4px;
|
101
|
+
background-color: #DCDEE5;
|
102
|
+
}
|
91
103
|
.bk-textarea.is-disabled,
|
92
104
|
.bk-textarea.is-readonly {
|
93
105
|
background-color: #fafbfd;
|
@@ -123,7 +135,6 @@
|
|
123
135
|
border-radius: 2px;
|
124
136
|
outline: none;
|
125
137
|
resize: none;
|
126
|
-
flex: 1;
|
127
138
|
}
|
128
139
|
.bk-textarea--max-length {
|
129
140
|
padding-right: 10px;
|
@@ -134,6 +145,9 @@
|
|
134
145
|
transform: scale(0.8);
|
135
146
|
justify-content: flex-end;
|
136
147
|
}
|
148
|
+
.bk-textarea--max-length.is-over-limit {
|
149
|
+
color: #ea3636;
|
150
|
+
}
|
137
151
|
.bk-textarea--max-length span {
|
138
152
|
color: #979ba5;
|
139
153
|
}
|
@@ -153,6 +167,7 @@
|
|
153
167
|
transition: all 0.3s;
|
154
168
|
}
|
155
169
|
.bk-input ::placeholder {
|
170
|
+
font-size: 12px;
|
156
171
|
color: #c4c6cc;
|
157
172
|
}
|
158
173
|
.bk-input.is-disabled,
|
@@ -211,12 +226,18 @@
|
|
211
226
|
background-color: white;
|
212
227
|
align-items: center;
|
213
228
|
align-self: center;
|
229
|
+
flex-shrink: 0;
|
230
|
+
cursor: pointer;
|
231
|
+
}
|
232
|
+
.bk-input--suffix-icon:hover {
|
233
|
+
color: #313238;
|
214
234
|
}
|
215
235
|
.bk-input--suffix-icon.show-clear-only-hover {
|
216
236
|
display: none;
|
217
237
|
}
|
218
238
|
.bk-input--clear-icon {
|
219
239
|
cursor: pointer;
|
240
|
+
flex-shrink: 0;
|
220
241
|
}
|
221
242
|
.bk-input--clear-icon:hover {
|
222
243
|
color: #979ba5;
|
@@ -225,6 +246,10 @@
|
|
225
246
|
height: 40px;
|
226
247
|
font-size: 14px;
|
227
248
|
}
|
249
|
+
.bk-input--large ::placeholder {
|
250
|
+
font-size: 14px;
|
251
|
+
color: #c4c6cc;
|
252
|
+
}
|
228
253
|
.bk-input--large .bk-input--max-length {
|
229
254
|
font-size: 16px;
|
230
255
|
}
|
@@ -277,14 +302,20 @@
|
|
277
302
|
font-size: 12px;
|
278
303
|
transform: scale(0.8);
|
279
304
|
}
|
305
|
+
.bk-input--max-length.is-over-limit {
|
306
|
+
color: #ea3636;
|
307
|
+
}
|
280
308
|
.bk-input--max-length span {
|
281
309
|
color: #979ba5;
|
282
310
|
}
|
283
311
|
.bk-input--text {
|
284
312
|
width: 100%;
|
285
313
|
padding: 0 10px;
|
314
|
+
overflow: hidden;
|
286
315
|
line-height: 1;
|
287
316
|
color: #63656e;
|
317
|
+
text-overflow: ellipsis;
|
318
|
+
white-space: nowrap;
|
288
319
|
background-color: white;
|
289
320
|
background-image: none;
|
290
321
|
border: none;
|
@@ -315,9 +346,6 @@
|
|
315
346
|
margin: 0;
|
316
347
|
appearance: none;
|
317
348
|
}
|
318
|
-
.bk-input--text::placeholder {
|
319
|
-
color: #c4c6cc;
|
320
|
-
}
|
321
349
|
.bk-input--number-control {
|
322
350
|
display: flex;
|
323
351
|
width: 26px;
|
package/lib/input/input.d.ts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
2
|
+
export type InputAutoSize = {
|
3
|
+
minRows?: number;
|
4
|
+
maxRows?: number;
|
5
|
+
};
|
2
6
|
export declare const inputType: {
|
3
7
|
type: import("vue-types").VueTypeValidableDef<string> & {
|
4
8
|
default: string;
|
@@ -43,6 +47,9 @@ export declare const inputType: {
|
|
43
47
|
maxlength: import("vue-types").VueTypeDef<number> & {
|
44
48
|
default: number;
|
45
49
|
};
|
50
|
+
maxcharacter: import("vue-types").VueTypeDef<number> & {
|
51
|
+
default: number;
|
52
|
+
};
|
46
53
|
behavior: import("vue-types").VueTypeDef<"normal" | "simplicity"> & {
|
47
54
|
default: "normal" | "simplicity";
|
48
55
|
};
|
@@ -81,6 +88,29 @@ export declare const inputType: {
|
|
81
88
|
} & {
|
82
89
|
default: boolean;
|
83
90
|
};
|
91
|
+
overMaxLengthLimit: import("vue-types").VueTypeValidableDef<boolean> & {
|
92
|
+
default: boolean;
|
93
|
+
} & {
|
94
|
+
default: boolean;
|
95
|
+
};
|
96
|
+
showOverflowTooltips: import("vue-types").VueTypeValidableDef<boolean> & {
|
97
|
+
default: boolean;
|
98
|
+
} & {
|
99
|
+
default: boolean;
|
100
|
+
};
|
101
|
+
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
102
|
+
default: boolean;
|
103
|
+
} & {
|
104
|
+
default: boolean;
|
105
|
+
};
|
106
|
+
autosize: import("vue-types").VueTypeDef<Boolean | InputAutoSize> & {
|
107
|
+
default: (() => Boolean) | (() => InputAutoSize);
|
108
|
+
};
|
109
|
+
stopPropagation: import("vue-types").VueTypeValidableDef<boolean> & {
|
110
|
+
default: boolean;
|
111
|
+
} & {
|
112
|
+
default: boolean;
|
113
|
+
};
|
84
114
|
};
|
85
115
|
export declare const enum EVENTS {
|
86
116
|
UPDATE = "update:modelValue",
|
@@ -98,7 +128,8 @@ export declare const enum EVENTS {
|
|
98
128
|
COMPOSITIONUPDATE = "compositionupdate",
|
99
129
|
COMPOSITIONEND = "compositionend"
|
100
130
|
}
|
101
|
-
declare function EventFunction(_value: any, _evt
|
131
|
+
declare function EventFunction(_value: any, _evt: KeyboardEvent): any;
|
132
|
+
declare function PastEventFunction(_value: any, _e: ClipboardEvent): boolean;
|
102
133
|
declare function CompositionEventFunction(evt: CompositionEvent): CompositionEvent;
|
103
134
|
export declare const inputEmitEventsType: {
|
104
135
|
"update:modelValue": typeof EventFunction;
|
@@ -111,7 +142,7 @@ export declare const inputEmitEventsType: {
|
|
111
142
|
keydown: typeof EventFunction;
|
112
143
|
keyup: typeof EventFunction;
|
113
144
|
enter: typeof EventFunction;
|
114
|
-
paste: typeof
|
145
|
+
paste: typeof PastEventFunction;
|
115
146
|
compositionstart: typeof CompositionEventFunction;
|
116
147
|
compositionupdate: typeof CompositionEventFunction;
|
117
148
|
compositionend: typeof CompositionEventFunction;
|
@@ -161,6 +192,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
161
192
|
maxlength: import("vue-types").VueTypeDef<number> & {
|
162
193
|
default: number;
|
163
194
|
};
|
195
|
+
maxcharacter: import("vue-types").VueTypeDef<number> & {
|
196
|
+
default: number;
|
197
|
+
};
|
164
198
|
behavior: import("vue-types").VueTypeDef<"normal" | "simplicity"> & {
|
165
199
|
default: "normal" | "simplicity";
|
166
200
|
};
|
@@ -199,6 +233,29 @@ declare const _default: import("vue").DefineComponent<{
|
|
199
233
|
} & {
|
200
234
|
default: boolean;
|
201
235
|
};
|
236
|
+
overMaxLengthLimit: import("vue-types").VueTypeValidableDef<boolean> & {
|
237
|
+
default: boolean;
|
238
|
+
} & {
|
239
|
+
default: boolean;
|
240
|
+
};
|
241
|
+
showOverflowTooltips: import("vue-types").VueTypeValidableDef<boolean> & {
|
242
|
+
default: boolean;
|
243
|
+
} & {
|
244
|
+
default: boolean;
|
245
|
+
};
|
246
|
+
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
247
|
+
default: boolean;
|
248
|
+
} & {
|
249
|
+
default: boolean;
|
250
|
+
};
|
251
|
+
autosize: import("vue-types").VueTypeDef<Boolean | InputAutoSize> & {
|
252
|
+
default: (() => Boolean) | (() => InputAutoSize);
|
253
|
+
};
|
254
|
+
stopPropagation: import("vue-types").VueTypeValidableDef<boolean> & {
|
255
|
+
default: boolean;
|
256
|
+
} & {
|
257
|
+
default: boolean;
|
258
|
+
};
|
202
259
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
203
260
|
"update:modelValue": typeof EventFunction;
|
204
261
|
focus: (evt: FocusEvent) => FocusEvent;
|
@@ -210,7 +267,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
210
267
|
keydown: typeof EventFunction;
|
211
268
|
keyup: typeof EventFunction;
|
212
269
|
enter: typeof EventFunction;
|
213
|
-
paste: typeof
|
270
|
+
paste: typeof PastEventFunction;
|
214
271
|
compositionstart: typeof CompositionEventFunction;
|
215
272
|
compositionupdate: typeof CompositionEventFunction;
|
216
273
|
compositionend: typeof CompositionEventFunction;
|
@@ -258,6 +315,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
258
315
|
maxlength: import("vue-types").VueTypeDef<number> & {
|
259
316
|
default: number;
|
260
317
|
};
|
318
|
+
maxcharacter: import("vue-types").VueTypeDef<number> & {
|
319
|
+
default: number;
|
320
|
+
};
|
261
321
|
behavior: import("vue-types").VueTypeDef<"normal" | "simplicity"> & {
|
262
322
|
default: "normal" | "simplicity";
|
263
323
|
};
|
@@ -296,24 +356,48 @@ declare const _default: import("vue").DefineComponent<{
|
|
296
356
|
} & {
|
297
357
|
default: boolean;
|
298
358
|
};
|
359
|
+
overMaxLengthLimit: import("vue-types").VueTypeValidableDef<boolean> & {
|
360
|
+
default: boolean;
|
361
|
+
} & {
|
362
|
+
default: boolean;
|
363
|
+
};
|
364
|
+
showOverflowTooltips: import("vue-types").VueTypeValidableDef<boolean> & {
|
365
|
+
default: boolean;
|
366
|
+
} & {
|
367
|
+
default: boolean;
|
368
|
+
};
|
369
|
+
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
370
|
+
default: boolean;
|
371
|
+
} & {
|
372
|
+
default: boolean;
|
373
|
+
};
|
374
|
+
autosize: import("vue-types").VueTypeDef<Boolean | InputAutoSize> & {
|
375
|
+
default: (() => Boolean) | (() => InputAutoSize);
|
376
|
+
};
|
377
|
+
stopPropagation: import("vue-types").VueTypeValidableDef<boolean> & {
|
378
|
+
default: boolean;
|
379
|
+
} & {
|
380
|
+
default: boolean;
|
381
|
+
};
|
299
382
|
}>> & {
|
300
|
-
onPaste?: (_value: any,
|
383
|
+
onPaste?: (_value: any, _e: ClipboardEvent) => any;
|
301
384
|
onCompositionend?: (evt: CompositionEvent) => any;
|
302
385
|
onCompositionstart?: (evt: CompositionEvent) => any;
|
303
386
|
onCompositionupdate?: (evt: CompositionEvent) => any;
|
304
387
|
onFocus?: (evt: FocusEvent) => any;
|
305
388
|
onBlur?: (evt: FocusEvent) => any;
|
306
|
-
onChange?: (_value: any, _evt
|
307
|
-
onInput?: (_value: any, _evt
|
308
|
-
onKeydown?: (_value: any, _evt
|
309
|
-
onKeypress?: (_value: any, _evt
|
310
|
-
onKeyup?: (_value: any, _evt
|
389
|
+
onChange?: (_value: any, _evt: KeyboardEvent) => any;
|
390
|
+
onInput?: (_value: any, _evt: KeyboardEvent) => any;
|
391
|
+
onKeydown?: (_value: any, _evt: KeyboardEvent) => any;
|
392
|
+
onKeypress?: (_value: any, _evt: KeyboardEvent) => any;
|
393
|
+
onKeyup?: (_value: any, _evt: KeyboardEvent) => any;
|
311
394
|
onClear?: () => any;
|
312
|
-
"onUpdate:modelValue"?: (_value: any, _evt
|
313
|
-
onEnter?: (_value: any, _evt
|
395
|
+
"onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
|
396
|
+
onEnter?: (_value: any, _evt: KeyboardEvent) => any;
|
314
397
|
}, {
|
315
398
|
type: string;
|
316
399
|
prefix: string;
|
400
|
+
resize: boolean;
|
317
401
|
disabled: boolean;
|
318
402
|
placeholder: string;
|
319
403
|
step: number;
|
@@ -326,6 +410,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
326
410
|
prefixIcon: string;
|
327
411
|
suffixIcon: string;
|
328
412
|
suffix: string;
|
413
|
+
maxcharacter: number;
|
329
414
|
showWordLimit: boolean;
|
330
415
|
showControl: boolean;
|
331
416
|
showClearOnlyHover: boolean;
|
@@ -333,5 +418,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
333
418
|
rows: number;
|
334
419
|
selectReadonly: boolean;
|
335
420
|
withValidate: boolean;
|
421
|
+
overMaxLengthLimit: boolean;
|
422
|
+
showOverflowTooltips: boolean;
|
423
|
+
autosize: Boolean | InputAutoSize;
|
424
|
+
stopPropagation: boolean;
|
336
425
|
}, {}>;
|
337
426
|
export default _default;
|
package/lib/input/input.less
CHANGED
@@ -8,10 +8,12 @@
|
|
8
8
|
}
|
9
9
|
|
10
10
|
.disabled() {
|
11
|
+
|
11
12
|
&.is-disabled,
|
12
13
|
&.is-readonly {
|
13
14
|
background-color: @input-disabled-bg;
|
14
15
|
border-color: @disable-color;
|
16
|
+
|
15
17
|
.@{bk-prefix}-input--prefix-area,
|
16
18
|
.@{bk-prefix}-input--suffix-area,
|
17
19
|
.@{bk-prefix}-input--suffix-icon {
|
@@ -36,20 +38,20 @@
|
|
36
38
|
|
37
39
|
}
|
38
40
|
|
39
|
-
.placeholder() {
|
41
|
+
.placeholder(@fontSize: @font-size-base) {
|
40
42
|
::placeholder {
|
43
|
+
font-size: @fontSize;
|
41
44
|
color: @light-gray;
|
42
45
|
}
|
43
46
|
}
|
44
47
|
|
45
48
|
.@{bk-prefix}-textarea {
|
46
|
-
|
49
|
+
--textarea-line-height: 20px;
|
47
50
|
display: inline-flex;
|
48
51
|
width: 100%;
|
49
|
-
min-height: 70px;
|
50
52
|
overflow: hidden;
|
51
53
|
font-size: @font-size-base;
|
52
|
-
line-height:
|
54
|
+
line-height: var(--textarea-line-height);
|
53
55
|
color: @input-color;
|
54
56
|
background-color: white;
|
55
57
|
border: @border-width-base @border-style-base @input-border-color;
|
@@ -57,9 +59,25 @@
|
|
57
59
|
box-sizing: border-box;
|
58
60
|
transition: all .3s;
|
59
61
|
flex-direction: column;
|
62
|
+
.placeholder();
|
63
|
+
|
64
|
+
&.resizable {
|
65
|
+
resize: both;
|
66
|
+
}
|
67
|
+
|
68
|
+
::-webkit-scrollbar {
|
69
|
+
-webkit-appearance: none;
|
70
|
+
width: 3px;
|
71
|
+
}
|
72
|
+
|
73
|
+
::-webkit-scrollbar-thumb {
|
74
|
+
border-radius: 4px;
|
75
|
+
background-color: #DCDEE5;
|
76
|
+
}
|
77
|
+
|
60
78
|
.disabled();
|
61
79
|
|
62
|
-
>
|
80
|
+
>textarea {
|
63
81
|
width: 100%;
|
64
82
|
padding: 5px 10px;
|
65
83
|
line-height: 1.5;
|
@@ -68,21 +86,23 @@
|
|
68
86
|
border-radius: @border-radius-base;
|
69
87
|
outline: none;
|
70
88
|
resize: none;
|
71
|
-
flex: 1;
|
72
89
|
}
|
73
90
|
|
74
91
|
&--max-length {
|
75
92
|
padding-right: @input-horizontal-padding;
|
76
93
|
margin: 0;
|
77
94
|
margin-left: auto;
|
78
|
-
font-size:
|
95
|
+
font-size: @font-size-base;
|
79
96
|
text-align: right;
|
80
97
|
transform: scale(.8);
|
81
98
|
justify-content: flex-end;
|
82
99
|
|
100
|
+
&.is-over-limit {
|
101
|
+
color: @danger-color;
|
102
|
+
}
|
103
|
+
|
83
104
|
span {
|
84
105
|
color: @input-maxlength-color;
|
85
|
-
|
86
106
|
}
|
87
107
|
}
|
88
108
|
|
@@ -121,7 +141,9 @@
|
|
121
141
|
border-color: transparent;
|
122
142
|
border-bottom-color: @light-gray;
|
123
143
|
box-shadow: none;
|
124
|
-
|
144
|
+
|
145
|
+
.@{bk-prefix}-input--text,
|
146
|
+
.@{bk-prefix}-input--suffix-icon {
|
125
147
|
background-color: @input-block-color;
|
126
148
|
}
|
127
149
|
}
|
@@ -136,6 +158,12 @@
|
|
136
158
|
background-color: @input-bg;
|
137
159
|
align-items: center;
|
138
160
|
align-self: center;
|
161
|
+
flex-shrink: 0;
|
162
|
+
cursor: pointer;
|
163
|
+
|
164
|
+
&:hover {
|
165
|
+
color: #313238;
|
166
|
+
}
|
139
167
|
|
140
168
|
&.show-clear-only-hover {
|
141
169
|
display: none;
|
@@ -144,6 +172,7 @@
|
|
144
172
|
|
145
173
|
&--clear-icon {
|
146
174
|
cursor: pointer;
|
175
|
+
flex-shrink: 0;
|
147
176
|
|
148
177
|
&:hover {
|
149
178
|
color: @gray-color;
|
@@ -153,10 +182,12 @@
|
|
153
182
|
|
154
183
|
&--large {
|
155
184
|
.component-size(@component-size-large, @font-size-medium);
|
185
|
+
.placeholder(@font-size-medium);
|
156
186
|
|
157
187
|
.@{bk-prefix}-input--max-length {
|
158
188
|
font-size: @font-size-large;
|
159
189
|
}
|
190
|
+
|
160
191
|
.@{bk-prefix}-input--number-control {
|
161
192
|
span:first-child {
|
162
193
|
margin-bottom: 4px;
|
@@ -187,7 +218,9 @@
|
|
187
218
|
border-color: transparent;
|
188
219
|
border-bottom-color: @primary-color;
|
189
220
|
box-shadow: none;
|
190
|
-
|
221
|
+
|
222
|
+
.@{bk-prefix}-input--text,
|
223
|
+
.@{bk-prefix}-input--suffix-icon {
|
191
224
|
background-color: @input-block-color;
|
192
225
|
}
|
193
226
|
}
|
@@ -216,6 +249,10 @@
|
|
216
249
|
font-size: 12px;
|
217
250
|
transform: scale(.8);
|
218
251
|
|
252
|
+
&.is-over-limit {
|
253
|
+
color: @danger-color;
|
254
|
+
}
|
255
|
+
|
219
256
|
span {
|
220
257
|
color: @input-maxlength-color;
|
221
258
|
}
|
@@ -224,8 +261,11 @@
|
|
224
261
|
&--text {
|
225
262
|
width: 100%;
|
226
263
|
padding: 0 @input-horizontal-padding;
|
264
|
+
overflow: hidden;
|
227
265
|
line-height: 1;
|
228
266
|
color: @input-color;
|
267
|
+
text-overflow: ellipsis;
|
268
|
+
white-space: nowrap;
|
229
269
|
background-color: @input-bg;
|
230
270
|
background-image: none;
|
231
271
|
border: none;
|
@@ -242,6 +282,7 @@
|
|
242
282
|
&[type='search']::-webkit-search-results-decoration {
|
243
283
|
appearance: none;
|
244
284
|
}
|
285
|
+
|
245
286
|
// IE
|
246
287
|
[type='search']::-ms-clear {
|
247
288
|
display: none;
|
@@ -261,9 +302,7 @@
|
|
261
302
|
appearance: none;
|
262
303
|
}
|
263
304
|
|
264
|
-
|
265
|
-
color: @light-gray;
|
266
|
-
}
|
305
|
+
|
267
306
|
}
|
268
307
|
|
269
308
|
&--number-control {
|
@@ -305,4 +344,4 @@
|
|
305
344
|
background-color: @input-block-hover-color;
|
306
345
|
}
|
307
346
|
}
|
308
|
-
}
|
347
|
+
}
|