001package react4j.dom.proptypes.html;
002
003import javax.annotation.Nonnull;
004import javax.annotation.Nullable;
005import jsinterop.annotations.JsOverlay;
006import jsinterop.annotations.JsPackage;
007import jsinterop.annotations.JsType;
008import react4j.dom.events.DragEventHandler;
009import react4j.dom.events.FocusEventHandler;
010import react4j.dom.events.FormEventHandler;
011import react4j.dom.events.KeyboardEventHandler;
012import react4j.dom.events.MouseEventHandler;
013import react4j.dom.events.TouchEventHandler;
014import react4j.dom.events.UIEventHandler;
015import react4j.dom.proptypes.html.attributeTypes.OnOff;
016
017/**
018 * Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
019 */
020@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" )
021public class TextAreaProps
022  extends HtmlGlobalFields<TextAreaProps>
023{
024  @JsOverlay
025  @Nonnull
026  public final TextAreaProps autoComplete( @Nonnull @OnOff final String value )
027  {
028    setAutoComplete( value );
029    return self();
030  }
031
032  @JsOverlay
033  @Nonnull
034  public final TextAreaProps autoFocus()
035  {
036    return autoFocus( true );
037  }
038
039  @JsOverlay
040  @Nonnull
041  public final TextAreaProps autoFocus( boolean b )
042  {
043    setAutoFocus( b );
044    return self();
045  }
046
047  @JsOverlay
048  @Nonnull
049  public final TextAreaProps cols( int b )
050  {
051    setCols( b );
052    return self();
053  }
054
055  @JsOverlay
056  @Nonnull
057  public final TextAreaProps disabled()
058  {
059    return disabled( true );
060  }
061
062  @JsOverlay
063  @Nonnull
064  public final TextAreaProps disabled( boolean b )
065  {
066    setDisabled( b );
067    return self();
068  }
069
070  @JsOverlay
071  @Nonnull
072  public final TextAreaProps form( String s )
073  {
074    setForm( s );
075    return self();
076  }
077
078  @JsOverlay
079  @Nonnull
080  public final TextAreaProps maxLength( int l )
081  {
082    setMaxLength( l );
083    return self();
084  }
085
086  @JsOverlay
087  @Nonnull
088  public final TextAreaProps minLength( int l )
089  {
090    setMinLength( l );
091    return self();
092  }
093
094  @JsOverlay
095  @Nonnull
096  public final TextAreaProps name( String s )
097  {
098    setName( s );
099    return self();
100  }
101
102  @JsOverlay
103  @Nonnull
104  public final TextAreaProps placeHolder( String s )
105  {
106    setPlaceholder( s );
107    return self();
108  }
109
110  @JsOverlay
111  @Nonnull
112  public final TextAreaProps readonly()
113  {
114    return readonly( true );
115  }
116
117  @JsOverlay
118  @Nonnull
119  public final TextAreaProps readonly( boolean b )
120  {
121    setReadOnly( b );
122    return self();
123  }
124
125  @JsOverlay
126  @Nonnull
127  public final TextAreaProps required()
128  {
129    return required( true );
130  }
131
132  @JsOverlay
133  @Nonnull
134  public final TextAreaProps required( boolean b )
135  {
136    setRequired( b );
137    return self();
138  }
139
140  @JsOverlay
141  @Nonnull
142  public final TextAreaProps rows( int l )
143  {
144    setRows( l );
145    return self();
146  }
147
148  @JsOverlay
149  @Nonnull
150  public final TextAreaProps value( String s )
151  {
152    setValue( s );
153    return self();
154  }
155
156  //React Specific
157
158  @JsOverlay
159  @Nonnull
160  public final TextAreaProps defaultValue( String s )
161  {
162    setDefaultValue( s );
163    return self();
164  }
165
166  //Applicable Event Handlers
167
168  // Focus Events
169  @JsOverlay
170  @Nonnull
171  public final TextAreaProps onBlur( @Nullable final FocusEventHandler handler )
172  {
173    setOnBlur( handler );
174    return self();
175  }
176
177  @JsOverlay
178  @Nonnull
179  public final TextAreaProps onFocus( @Nullable final FocusEventHandler handler )
180  {
181    setOnFocus( handler );
182    return self();
183  }
184
185  // Form Events
186  @JsOverlay
187  @Nonnull
188  public final TextAreaProps onChange( @Nullable final FormEventHandler handler )
189  {
190    setOnChange( handler );
191    return self();
192  }
193
194  // Keyboard Events
195  @JsOverlay
196  @Nonnull
197  public final TextAreaProps onKeyDown( @Nullable final KeyboardEventHandler handler )
198  {
199    setOnKeyDown( handler );
200    return self();
201  }
202
203  @JsOverlay
204  @Nonnull
205  public final TextAreaProps onKeyPress( @Nullable final KeyboardEventHandler handler )
206  {
207    setOnKeyPress( handler );
208    return self();
209  }
210
211  @JsOverlay
212  @Nonnull
213  public final TextAreaProps onKeyUp( @Nullable final KeyboardEventHandler handler )
214  {
215    setOnKeyUp( handler );
216    return self();
217  }
218
219  @JsOverlay
220  @Nonnull
221  public final TextAreaProps onClick( @Nullable final MouseEventHandler handler )
222  {
223    setOnClick( handler );
224    return self();
225  }
226
227  @JsOverlay
228  @Nonnull
229  public final TextAreaProps onContextMenu( @Nullable final MouseEventHandler handler )
230  {
231    setOnContextMenu( handler );
232    return self();
233  }
234
235  @JsOverlay
236  @Nonnull
237  public final TextAreaProps onDoubleClick( @Nullable final MouseEventHandler handler )
238  {
239    setOnDoubleClick( handler );
240    return self();
241  }
242
243  @JsOverlay
244  @Nonnull
245  public final TextAreaProps onDrag( @Nullable final DragEventHandler handler )
246  {
247    setOnDrag( handler );
248    return self();
249  }
250
251  @JsOverlay
252  @Nonnull
253  public final TextAreaProps onDragEnd( @Nullable final DragEventHandler handler )
254  {
255    setOnDragEnd( handler );
256    return self();
257  }
258
259  @JsOverlay
260  @Nonnull
261  public final TextAreaProps onDragEnter( @Nullable final DragEventHandler handler )
262  {
263    setOnDragEnter( handler );
264    return self();
265  }
266
267  @JsOverlay
268  @Nonnull
269  public final TextAreaProps onDragExit( @Nullable final DragEventHandler handler )
270  {
271    setOnDragExit( handler );
272    return self();
273  }
274
275  @JsOverlay
276  @Nonnull
277  public final TextAreaProps onDragLeave( @Nullable final DragEventHandler handler )
278  {
279    setOnDragLeave( handler );
280    return self();
281  }
282
283  @JsOverlay
284  @Nonnull
285  public final TextAreaProps onDragOver( @Nullable final DragEventHandler handler )
286  {
287    setOnDragOver( handler );
288    return self();
289  }
290
291  @JsOverlay
292  @Nonnull
293  public final TextAreaProps onDragStart( @Nullable final DragEventHandler handler )
294  {
295    setOnDragStart( handler );
296    return self();
297  }
298
299  @JsOverlay
300  @Nonnull
301  public final TextAreaProps onDrop( @Nullable final DragEventHandler handler )
302  {
303    setOnDrop( handler );
304    return self();
305  }
306
307  @JsOverlay
308  @Nonnull
309  public final TextAreaProps onMouseDown( @Nullable final MouseEventHandler handler )
310  {
311    setOnMouseDown( handler );
312    return self();
313  }
314
315  @JsOverlay
316  @Nonnull
317  public final TextAreaProps onMouseEnter( @Nullable final MouseEventHandler handler )
318  {
319    setOnMouseEnter( handler );
320    return self();
321  }
322
323  @JsOverlay
324  @Nonnull
325  public final TextAreaProps onMouseLeave( @Nullable final MouseEventHandler handler )
326  {
327    setOnMouseLeave( handler );
328    return self();
329  }
330
331  @JsOverlay
332  @Nonnull
333  public final TextAreaProps onMouseMove( @Nullable final MouseEventHandler handler )
334  {
335    setOnMouseMove( handler );
336    return self();
337  }
338
339  @JsOverlay
340  @Nonnull
341  public final TextAreaProps onMouseOut( @Nullable final MouseEventHandler handler )
342  {
343    setOnMouseOut( handler );
344    return self();
345  }
346
347  @JsOverlay
348  @Nonnull
349  public final TextAreaProps onMouseOver( @Nullable final MouseEventHandler handler )
350  {
351    setOnMouseOver( handler );
352    return self();
353  }
354
355  @JsOverlay
356  @Nonnull
357  public final TextAreaProps onMouseUp( @Nullable final MouseEventHandler handler )
358  {
359    setOnMouseUp( handler );
360    return self();
361  }
362
363  // Touch Events
364  @JsOverlay
365  @Nonnull
366  public final TextAreaProps onTouchCancel( @Nullable final TouchEventHandler handler )
367  {
368    setOnTouchCancel( handler );
369    return self();
370  }
371
372  @JsOverlay
373  @Nonnull
374  public final TextAreaProps onTouchEnd( @Nullable final TouchEventHandler handler )
375  {
376    setOnTouchEnd( handler );
377    return self();
378  }
379
380  @JsOverlay
381  @Nonnull
382  public final TextAreaProps onTouchMove( @Nullable final TouchEventHandler handler )
383  {
384    setOnTouchMove( handler );
385    return self();
386  }
387
388  @JsOverlay
389  @Nonnull
390  public final TextAreaProps onTouchStart( @Nullable final TouchEventHandler handler )
391  {
392    setOnTouchStart( handler );
393    return self();
394  }
395
396  @JsOverlay
397  @Nonnull
398  public final TextAreaProps onScroll( @Nullable final UIEventHandler onScroll )
399  {
400    setOnScroll( onScroll );
401    return self();
402  }
403}