boundless-input
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=require("boundless-utils-omit-keys")},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=n(2),u=n.n(p),i=n(1),a=n.n(i),l=n(0),c=n.n(l),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){return"function"==typeof e},y=function(e){function t(){var e,n,s,p;r(this,t);for(var u=arguments.length,i=Array(u),a=0;a<u;a++)i[a]=arguments[a];return n=s=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),s.state={input:"",isControlled:"string"==typeof s.props.inputProps.value,isFocused:!1},s.setInputValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return s.setState({input:e})},s.getValue=function(){return s.refs.field.value},s.handleBlur=function(e){s.setState({isFocused:!1}),d(s.props.inputProps.onBlur)===!0&&s.props.inputProps.onBlur(e)},s.handleFocus=function(e){s.setState({isFocused:!0}),d(s.props.inputProps.onFocus)===!0&&s.props.inputProps.onFocus(e)},s.handleChange=function(e){s.state.isControlled===!1&&s.setInputValue(e.target.value),d(s.props.inputProps.onChange)===!0&&s.props.inputProps.onChange(e)},p=n,o(s,p)}return s(t,e),h(t,[{key:"componentWillMount",value:function(){return this.state.isControlled===!0?this.setInputValue(this.props.inputProps.value):void this.setInputValue(this.props.inputProps.defaultValue)}},{key:"componentWillReceiveProps",value:function(e){e.inputProps.value!==this.props.inputProps.value&&this.setInputValue(e.inputProps.value)}},{key:"setValue",value:function(e){this.setInputValue(e),this.refs.field.value=e,this.state.isControlled===!0&&(this.refs.field.dispatchEvent(new Event("input",{bubbles:!0})),this.refs.field.dispatchEvent(new Event("change",{bubbles:!0})))}},{key:"getPlaceholderText",value:function(){var e=""!==this.state.input,t=this.props.hidePlaceholderOnFocus===!0?this.state.isFocused===!1&&e===!1:e===!1;return t?this.props.inputProps.placeholder:""}},{key:"render",value:function(){return u.a.createElement(this.props.component,f({},c()(this.props,t.internalKeys),{className:a()("b-input-wrapper",this.props.className),title:this.getPlaceholderText()}),u.a.createElement("input",f({},this.props.inputProps,{ref:"field",className:a()("b-input",this.props.inputProps.className),placeholder:null,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange})),u.a.createElement("div",{className:"b-input-placeholder b-input"},this.getPlaceholderText()))}}]),t}(u.a.PureComponent);y.propTypes={"*":p.PropTypes.any,component:p.PropTypes.string,hidePlaceholderOnFocus:p.PropTypes.bool,inputProps:p.PropTypes.shape({"*":p.PropTypes.any,defaultValue:p.PropTypes.string,onBlur:p.PropTypes.func,onFocus:p.PropTypes.func,onChange:p.PropTypes.func,placeholder:p.PropTypes.string,type:p.PropTypes.string,value:p.PropTypes.string})},y.defaultProps={component:"div",hidePlaceholderOnFocus:!0,inputProps:{type:"text"}},y.internalKeys=Object.keys(y.defaultProps),t.default=y}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGU3YTJkYjNkM2VhYWEwMDFjM2I4Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtaW5wdXQvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZmlndXJhYmxlIiwiZW51bWVyYWJsZSIsImdldCIsIm4iLCJfX2VzTW9kdWxlIiwib2JqZWN0IiwicHJvcGVydHkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsInAiLCJzIiwicmVxdWlyZSIsIl9fd2VicGFja19leHBvcnRzX18iLCJfY2xhc3NDYWxsQ2hlY2siL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VzLnN0cmluZyxcbiAgICAgICAgICAgIHZhbHVlOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgICB9KSxcbiAgICB9XG5cbiAgICBzdGF0aWMgZGVmYXVsdFByb3BzID0ge1xuICAgICAgICBjb21wb25lbnQ6ICdkaXYnLFxuICAgICAgICBoaWRlUGxhY2Vob2xkZXJPbkZvY3VzOiB0cnVlLFxuICAgICAgICBpbnB1dFByb3BzOiB7XG4gICAgICAgICAgICB0eXBlOiAndGV4dCcsXG4gICAgICAgIH0sXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVybmFsS2V5cyA9IE9iamVjdC5rZXlzKElucHV0LmRlZmF1bHRQcm9wcylcblxuICAgIHN0YXRlID0ge1xuICAgICAgICBpbnB1dDogJycsXG4gICAgICAgIGlzQ29udHJvbGxlZDogdHlwZW9mIHRoaXMucHJvcHMuaW5wdXRQcm9wcy52YWx1ZSA9PT0gJ3N0cmluZycsXG4gICAgICAgIGlzRm9jdXNlZDogZmFsc2UsXG4gICAgfVxuXG4gICAgY29tcG9uZW50V2lsbE1vdW50KCkge1xuICAgICAgICBpZiAodGhpcy5zdGF0ZS5pc0NvbnRyb2xsZWQgPT09IHRydWUpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNldElucHV0VmFsdWUodGhpcy5wcm9wcy5pbnB1dFByb3BzLnZhbHVlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuc2V0SW5wdXRWYWx1ZSh0aGlzLnByb3BzLmlucHV0UHJvcHMuZGVmYXVsdFZhbHVlKTtcbiAgICB9XG5cbiAgICBjb21wb25lbnRXaWxsUmVjZWl2ZVByb3BzKG5leHRQcm9wcykge1xuICAgICAgICBpZiAobmV4dFByb3BzLmlucHV0UHJvcHMudmFsdWUgIT09IHRoaXMucHJvcHMuaW5wdXRQcm9wcy52YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5zZXRJbnB1dFZhbHVlKG5leHRQcm9wcy5pbnB1dFByb3BzLnZ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gIT09ICcnO1xuICAgICAgICBjb25zdCBzaG91bGRTaG93UGxhY2Vob2xkZXIgPSB0aGlzLnByb3BzLmhpZGVQbGFjZWhvbGRlck9uRm9jdXMgPT09IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0aGlzLnN0YXRlLmlzRm9jdXNlZCA9PT0gZmFsc2UgJiYgaXNOb25FbXB0eSA9PT0gZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBpc05vbkVtcHR5ID09PSBmYWxzZTtcblxuICAgICAgICByZXR1cm4gc2hvdWxkU2hvd1BsYWNlaG9sZGVyID8gdGhpcy5wcm9wcy5pbnB1dFByb3BzLnBsYWNlaG9sZGVyIDogJyc7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRoaXMucHJvcHMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgSW5wdXQuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWlucHV0LXdyYXBwZXInLCB0aGlzLnByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgdGl0bGU9e3RoaXMuZ2V0UGxhY2Vob2xkZXJUZXh0KCl9PlxuICAgICAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5pbnB1dFByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2ZpZWxkJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWlucHV0JywgdGhpcy5wcm9wcy5pbnB1dFByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPXtudWxsfVxuICAgICAgICAgICAgICAgICAgICBvbkJsdXI9e3RoaXMuaGFuZGxlQmx1cn1cbiAgICAgICAgICAgICAgICAgICAgb25Gb2N1cz17dGhpcy5oYW5kbGVGb2N1c31cbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U9e3RoaXMuaGFuZGxlQ2hhbmdlfSAvPlxuXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2ItaW5wdXQtcGxhY2Vob2xkZXIgYi1pbnB1dCc+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLmdldFBsYWNlaG9sZGVyVGV4dCgpfVxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC90aGlzLnByb3BzLmNvbXBvbmVudD5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtaW5wdXQvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=require("boundless-utils-omit-keys")},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=n(2),u=(n.n(p),n(1)),i=n.n(u),l=n(0),a=n.n(l),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){return"function"==typeof e},d=function(e){function t(){var e,n,s,p;r(this,t);for(var u=arguments.length,i=Array(u),l=0;l<u;l++)i[l]=arguments[l];return n=s=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),s.state={input:"",isControlled:"string"==typeof s.props.inputProps.value,isFocused:!1},s.setInputValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return s.setState({input:e})},s.getValue=function(){return s.refs.field.value},s.handleBlur=function(e){s.setState({isFocused:!1}),h(s.props.inputProps.onBlur)===!0&&s.props.inputProps.onBlur(e)},s.handleFocus=function(e){s.setState({isFocused:!0}),h(s.props.inputProps.onFocus)===!0&&s.props.inputProps.onFocus(e)},s.handleChange=function(e){s.state.isControlled===!1&&s.setInputValue(e.target.value),h(s.props.inputProps.onChange)===!0&&s.props.inputProps.onChange(e)},p=n,o(s,p)}return s(t,e),f(t,[{key:"componentWillMount",value:function(){return this.state.isControlled===!0?this.setInputValue(this.props.inputProps.value):void this.setInputValue(this.props.inputProps.defaultValue)}},{key:"componentWillReceiveProps",value:function(e){e.inputProps.value!==this.props.inputProps.value&&this.setInputValue(e.inputProps.value)}},{key:"setValue",value:function(e){this.setInputValue(e),this.refs.field.value=e,this.state.isControlled===!0&&(this.refs.field.dispatchEvent(new Event("input",{bubbles:!0})),this.refs.field.dispatchEvent(new Event("change",{bubbles:!0})))}},{key:"getPlaceholderText",value:function(){var e=""!==this.state.input,t=this.props.hidePlaceholderOnFocus===!0?this.state.isFocused===!1&&e===!1:e===!1;return t?this.props.inputProps.placeholder:""}},{key:"render",value:function(){return n.i(p.createElement)(this.props.component,c({},a()(this.props,t.internalKeys),{className:i()("b-input-wrapper",this.props.className),title:this.getPlaceholderText()}),n.i(p.createElement)("input",c({},this.props.inputProps,{ref:"field",className:i()("b-input",this.props.inputProps.className),placeholder:null,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange})),n.i(p.createElement)("div",{className:"b-input-placeholder b-input"},this.getPlaceholderText()))}}]),t}(p.PureComponent);d.propTypes={"*":p.PropTypes.any,component:p.PropTypes.string,hidePlaceholderOnFocus:p.PropTypes.bool,inputProps:p.PropTypes.shape({"*":p.PropTypes.any,defaultValue:p.PropTypes.string,onBlur:p.PropTypes.func,onFocus:p.PropTypes.func,onChange:p.PropTypes.func,placeholder:p.PropTypes.string,type:p.PropTypes.string,value:p.PropTypes.string})},d.defaultProps={component:"div",hidePlaceholderOnFocus:!0,inputProps:{type:"text"}},d.internalKeys=Object.keys(d.defaultProps),t.default=d}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDI1MTkyMTY0OWMxZWQ1YzRmNmVhIiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGx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ic6IFByb3BUeXBlcy5hbnksXG5cbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICAgIG9uQmx1cjogUHJvcFR5cGVzLmZ1bmMsXG4gICAgICAgICAgICBvbkZvY3VzOiBQcm9wVHlwZXMuZnVuYyxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiBQcm9wVHlwZXMuZnVuYyxcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgICAgICAgdHlwZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICAgIHZhbHVlOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgICB9KSxcbiAgICB9XG5cbiAgICBzdGF0aWMgZGVmYXVsdFByb3BzID0ge1xuICAgICAgICBjb21wb25lbnQ6ICdkaXYnLFxuICAgICAgICBoaWRlUGxhY2Vob2xkZXJPbkZvY3VzOiB0cnVlLFxuICAgICAgICBpbnB1dFByb3BzOiB7XG4gICAgICAgICAgICB0eXBlOiAndGV4dCcsXG4gICAgICAgIH0sXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVybmFsS2V5cyA9IE9iamVjdC5rZXlzKElucHV0LmRlZmF1bHRQcm9wcylcblxuICAgIHN0YXRlID0ge1xuICAgICAgICBpbnB1dDogJycsXG4gICAgICAgIGlzQ29udHJvbGxlZDogdHlwZW9mIHRoaXMucHJvcHMuaW5wdXRQcm9wcy52YWx1ZSA9PT0gJ3N0cmluZycsXG4gICAgICAgIGlzRm9jdXNlZDogZmFsc2UsXG4gICAgfVxuXG4gICAgY29tcG9uZW50V2lsbE1vdW50KCkge1xuICAgICAgICBpZiAodGhpcy5zdGF0ZS5pc0NvbnRyb2xsZWQgPT09IHRydWUpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNldElucHV0VmFsdWUodGhpcy5wcm9wcy5pbnB1dFByb3BzLnZhbHVlKTtcbiAgICAgICAg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1ZShldmVudC50YXJnZXQudmFsdWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzRnVuY3Rpb24odGhpcy5wcm9wcy5pbnB1dFByb3BzLm9uQ2hhbmdlKSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgdGhpcy5wcm9wcy5pbnB1dFByb3BzLm9uQ2hhbmdlKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdldFBsYWNlaG9sZGVyVGV4dCgpIHtcbiAgICAgICAgY29uc3QgaXNOb25FbXB0eSA9IHRoaXMuc3RhdGUuaW5wdXQgIT09ICcnO1xuICAgICAgICBjb25zdCBzaG91bGRTaG93UGxhY2Vob2xkZXIgPSB0aGlzLnByb3BzLmhpZGVQbGFjZWhvbGRlck9uRm9jdXMgPT09IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0aGlzLnN0YXRlLmlzRm9jdXNlZCA9PT0gZmFsc2UgJiYgaXNOb25FbXB0eSA9PT0gZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBpc05vbkVtcHR5ID09PSBmYWxzZTtcblxuICAgICAgICByZXR1cm4gc2hvdWxkU2hvd1BsYWNlaG9sZGVyID8gdGhpcy5wcm9wcy5pbnB1dFByb3BzLnBsYWNlaG9sZGVyIDogJyc7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRoaXMucHJvcHMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgSW5wdXQuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWlucHV0LXdyYXBwZXInLCB0aGlzLnByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgdGl0bGU9e3RoaXMuZ2V0UGxhY2Vob2xkZXJUZXh0KCl9PlxuICAgICAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5pbnB1dFByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2ZpZWxkJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWlucHV0JywgdGhpcy5wcm9wcy5pbnB1dFByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPXtudWxsfVxuICAgICAgICAgICAgICAgICAgICBvbkJsdXI9e3RoaXMuaGFuZGxlQmx1cn1cbiAgICAgICAgICAgICAgICAgICAgb25Gb2N1cz17dGhpcy5oYW5kbGVGb2N1c31cbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U9e3RoaXMuaGFuZGxlQ2hhbmdlfSAvPlxuXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2ItaW5wdXQtcGxhY2Vob2xkZXIgYi1pbnB1dCc+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLmdldFBsYWNlaG9sZGVyVGV4dCgpfVxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC90aGlzLnByb3BzLmNvbXBvbmVudD5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtaW5wdXQvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
@@ -1,5 +0,5 @@ | ||
import React from 'react'; | ||
import Input from '../index'; | ||
import {createElement, PureComponent} from 'react'; | ||
import Input from '../'; | ||
export default class InputDemo extends React.PureComponent { | ||
export default class InputDemo extends PureComponent { | ||
state = { | ||
@@ -6,0 +6,0 @@ input: '', |
@@ -1,2 +0,2 @@ | ||
import React, {PropTypes} from 'react'; | ||
import {createElement, PropTypes, PureComponent} from 'react'; | ||
import cx from 'classnames'; | ||
@@ -9,4 +9,2 @@ | ||
/** | ||
__An input control with placeholder emulation for non-supporting platforms.__ | ||
Input abstracts away the cross-platform differences of placeholder styling and behaviors, for example: Internet Explorer dismisses native placeholders on input focus and other platforms do not. This component ensures that text input controls will feel and behave similarly on more devices. | ||
@@ -25,3 +23,3 @@ | ||
*/ | ||
export default class Input extends React.PureComponent { | ||
export default class Input extends PureComponent { | ||
static propTypes = { | ||
@@ -28,0 +26,0 @@ /** |
/* eslint no-unused-expressions:0 */ | ||
import React from 'react'; | ||
import {createElement} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
@@ -5,0 +5,0 @@ import sinon from 'sinon'; |
{ | ||
"name": "boundless-input", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "An input control with placeholder emulation for non-supporting platforms.", | ||
@@ -18,3 +18,3 @@ "main": "build/index.js", | ||
"contributors": [ | ||
"Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com)", | ||
"Evan Scott <probablyup@gmail.com> (http://yaycmyk.com)", | ||
"Abe Rubenstein <abe.rubenstein@enigma.io>", | ||
@@ -27,5 +27,5 @@ "Jenn Creighton <jenn.creighton@enigma.io>" | ||
}, | ||
"homepage": "http://boundless.js.org/Input", | ||
"homepage": "https://boundless.js.org/Input", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.3", | ||
"boundless-utils-omit-keys": "^1.0.4", | ||
"classnames": "^2.1.5" | ||
@@ -32,0 +32,0 @@ }, |
@@ -6,4 +6,2 @@ <!--- | ||
__An input control with placeholder emulation for non-supporting platforms.__ | ||
Input abstracts away the cross-platform differences of placeholder styling and behaviors, for example: Internet Explorer dismisses native placeholders on input focus and other platforms do not. This component ensures that text input controls will feel and behave similarly on more devices. | ||
@@ -31,6 +29,8 @@ | ||
```jsx | ||
import React from 'react'; | ||
/** @jsx createElement */ | ||
import {createElement, PureComponent} from 'react'; | ||
import Input from 'boundless-input'; | ||
export default class InputDemo extends React.PureComponent { | ||
export default class InputDemo extends PureComponent { | ||
state = { | ||
@@ -97,3 +97,3 @@ input: '', | ||
> Note: only top-level props are in the README, for the full list check out the [website](http://boundless.js.org/Input). | ||
> Note: only top-level props are in the README, for the full list check out the [website](https://boundless.js.org/Input). | ||
@@ -107,18 +107,18 @@ ### Required Props | ||
- __`*`__ ・ any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
- __`*`__ · any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`any` | `n/a` | ||
- __`component`__ ・ overrides the HTML container tag | ||
- __`component`__ · overrides the HTML container tag | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`string` | `'div'` | ||
- __`hidePlaceholderOnFocus`__ ・ triggers the placeholder to disappear when the input field is focused, reappears when the user has tabbed away or focus is moved | ||
- __`hidePlaceholderOnFocus`__ · triggers the placeholder to disappear when the input field is focused, reappears when the user has tabbed away or focus is moved | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`bool` | `true` | ||
@@ -129,6 +129,4 @@ | ||
Expects | Default Value | ||
- | - | ||
`object` | `{ | ||
type: 'text', | ||
}` | ||
--- | --- | ||
`object` | `{ type: 'text' }` | ||
@@ -138,7 +136,6 @@ | ||
### Stylus | ||
You can see what variables are available to override in [variables.styl](https://github.com/enigma-io/boundless/blob/master/variables.styl). | ||
```stylus | ||
// Bring in Boundless's base Stylus variables | ||
@require "node_modules/boundless-input/variables" | ||
// Redefine any variables as desired, e.g. | ||
// Redefine any variables as desired, e.g: | ||
color-accent = royalblue | ||
@@ -145,0 +142,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
68175
-0.25%445
-0.22%144
-2.04%1
Infinity%