0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
!function(r){function n(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var e=window.webpackJsonp;window.webpackJsonp=function(o,u,c){for(var f,i,p,a=0,l=[];a<o.length;a++)i=o[a],t[i]&&l.push(t[i][0]),t[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(e&&e(o,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=n(n.s=c[a]);return p};var o={},t={1:0};n.m=r,n.c=o,n.d=function(r,e,o){n.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,"a",e),e},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.p="/",n.oe=function(r){throw console.error(r),r}}([]);

View file

@ -0,0 +1 @@
body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;color:#333;margin:0;padding:0}a{color:#08c;text-decoration:none}a:hover{text-decoration:underline}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{margin:0;appearance:none}.container{margin-left:auto;margin-right:auto;max-width:400px;padding:1em}.footer{margin-top:50px;border-top:1px solid #eee;padding:20px 0;font-size:12px;color:#999}h1,h2,h3,h4,h5,h6{color:#222;font-weight:100;margin:.5em 0}label{color:#999;display:inline-block;font-size:.85em;font-weight:700;margin:1em 0;text-transform:uppercase}.hint{margin:15px 0;font-style:italic;color:#999}

View file

@ -0,0 +1 @@
<!doctype html> <head> <title>React-Autosize-Input Example</title> <link rel=stylesheet href=example.css> </head> <body> <div class=container> <h1>React Autosize Input</h1> <h2><a href=http://github.com/JedWatson/react-input-autosize>View project on GitHub</a></h2> <form><div id=app></div></form> <div class=hint> Type in the text fields above to test the auto-size input. </div> <div class=footer> Copyright &copy; Jed Watson 2018. MIT Licensed. </div> </div> <script src=common.js></script> <script src=app.js></script> </body>

View file

@ -0,0 +1,42 @@
<!doctype html>
<head>
<title>react-autosize-input umd example</title>
<link rel="stylesheet" href="example.css">
</head>
<body>
<div class="container">
<h1>React Autosize Input</h1>
<h2>Standalone example</h2>
<!-- the React application is loaded in the #example element -->
<div id="example"></div>
<div class="hint">
The component above is provided by the umd build, and React is loaded from <a href="https://unpkg.com/">unpkg</a>.
</div>
<div class="footer">
Copyright &copy; Jed Watson 2018. MIT Licensed.
</div>
</div>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js" charset="utf-8"></script>
<script src="https://unpkg.com/react@15.6.1/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15.6.1/dist/react-dom.js"></script>
<script src="https://unpkg.com/prop-types@15.5.10/prop-types.js"></script>
<script src="../../dist/react-input-autosize.js"></script>
<script type="text/babel">
var Example = React.createClass({
getInitialState: function() {
return {
inputValue: ''
};
},
updateValue: function(event) {
this.setState({
inputValue: event.target.value
});
},
render: function() {
return <AutosizeInput autoFocus value={this.state.inputValue} onChange={this.updateValue} />
}
});
ReactDOM.render(<Example />, document.getElementById('example'));
</script>
</body>

View file

@ -0,0 +1,69 @@
/* eslint-disable react/jsx-no-bind */
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import AutosizeInput from 'react-input-autosize';
import './example.less';
class App extends Component {
constructor (props) {
super(props);
this.state = {
value1: '',
value2: 'example',
value3: 3,
value4: '',
value5: '',
};
}
updateInputValue = (input, event) => {
const newState = {};
newState[input] = event.target.value;
this.setState(newState);
};
render () {
return (
<div>
<h3>Simple example:</h3>
<AutosizeInput
autoFocus
value={this.state.value1}
onChange={this.updateInputValue.bind(this, 'value1')}
/>
<h3>Styled example with default value:</h3>
<AutosizeInput
value={this.state.value2}
onChange={this.updateInputValue.bind(this, 'value2')}
style={{ background: '#eee', borderRadius: 5, padding: 5 }}
inputStyle={{ border: '1px solid #999', borderRadius: 3, padding: 3, fontSize: 14 }}
/>
<h3>Typed example with default value:</h3>
<AutosizeInput
value={this.state.value3}
type="number"
onChange={this.updateInputValue.bind(this, 'value3')}
/>
<h3>Input with placeholder:</h3>
<AutosizeInput
placeholder="Placeholder"
value={this.state.value4}
onChange={this.updateInputValue.bind(this, 'value4')}
style={{ background: '#eee', borderRadius: 5, padding: 5 }}
inputStyle={{ border: '1px solid #999', borderRadius: 3, padding: 3, fontSize: 14 }}
/>
<h3>Input with placeholder as minimum width:</h3>
<AutosizeInput
placeholder="Placeholder"
placeholderIsMinWidth
value={this.state.value5}
onChange={this.updateInputValue.bind(this, 'value5')}
style={{ background: '#eee', borderRadius: 5, padding: 5 }}
inputStyle={{ border: '1px solid #999', borderRadius: 3, padding: 3, fontSize: 14 }}
/>
</div>
);
}
};
ReactDOM.render(<App />, document.getElementById('app'));

View file

@ -0,0 +1,63 @@
/*
// Examples Stylesheet
// -------------------
*/
body {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color: #333;
margin: 0;
padding: 0;
}
a {
color: #08c;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
margin: 0;
appearance: none;
}
.container {
margin-left: auto;
margin-right: auto;
max-width: 400px;
padding: 1em;
}
.footer {
margin-top: 50px;
border-top: 1px solid #eee;
padding: 20px 0;
font-size: 12px;
color: #999;
}
h1, h2, h3, h4, h5, h6 {
color: #222;
font-weight: 100;
margin: 0.5em 0;
}
label {
color: #999;
display: inline-block;
font-size: 0.85em;
font-weight: bold;
margin: 1em 0;
text-transform: uppercase;
}
.hint {
margin: 15px 0;
font-style: italic;
color: #999;
}

View file

@ -0,0 +1,20 @@
<!doctype html>
<head>
<title>React-Autosize-Input Example</title>
<link rel="stylesheet" href="example.css">
</head>
<body>
<div class="container">
<h1>React Autosize Input</h1>
<h2><a href="http://github.com/JedWatson/react-input-autosize">View project on GitHub</a></h2>
<form><div id="app"></div></form>
<div class="hint">
Type in the text fields above to test the auto-size input.
</div>
<div class="footer">
Copyright &copy; Jed Watson 2018. MIT Licensed.
</div>
</div>
<script src="common.js"></script>
<script src="app.js"></script>
</body>

View file

@ -0,0 +1,42 @@
<!doctype html>
<head>
<title>react-autosize-input umd example</title>
<link rel="stylesheet" href="example.css">
</head>
<body>
<div class="container">
<h1>React Autosize Input</h1>
<h2>Standalone example</h2>
<!-- the React application is loaded in the #example element -->
<div id="example"></div>
<div class="hint">
The component above is provided by the umd build, and React is loaded from <a href="https://unpkg.com/">unpkg</a>.
</div>
<div class="footer">
Copyright &copy; Jed Watson 2018. MIT Licensed.
</div>
</div>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js" charset="utf-8"></script>
<script src="https://unpkg.com/react@15.6.1/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15.6.1/dist/react-dom.js"></script>
<script src="https://unpkg.com/prop-types@15.5.10/prop-types.js"></script>
<script src="../../dist/react-input-autosize.js"></script>
<script type="text/babel">
var Example = React.createClass({
getInitialState: function() {
return {
inputValue: ''
};
},
updateValue: function(event) {
this.setState({
inputValue: event.target.value
});
},
render: function() {
return <AutosizeInput autoFocus value={this.state.inputValue} onChange={this.updateValue} />
}
});
ReactDOM.render(<Example />, document.getElementById('example'));
</script>
</body>