1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { Component } from 'react';
|
9 | import { GestureResponderEvent } from 'react-native';
|
10 | import { MeasureOnSuccessCallback } from 'react-native';
|
11 | import { ReactChild } from 'react';
|
12 | import { SFC } from 'react';
|
13 | import { StyleProp } from 'react-native';
|
14 | import { TextInputProps } from 'react-native';
|
15 | import { TextStyle } from 'react-native';
|
16 | import { TouchableWithoutFeedbackProps } from 'react-native';
|
17 | import { ViewProps } from 'react-native';
|
18 |
|
19 |
|
20 | export declare const AccentFab: SFC<ButtonProps>;
|
21 |
|
22 |
|
23 | export declare const AccentRaisedButton: SFC<ButtonProps>;
|
24 |
|
25 | declare class AttrReference {
|
26 | attr: string;
|
27 | constructor(attr: string);
|
28 | get value(): AttrValue;
|
29 | }
|
30 |
|
31 | export declare type AttrValue = string | number | Theme | AttrReference;
|
32 |
|
33 | /**
|
34 | * The `Button` component.
|
35 | *
|
36 | * @remarks
|
37 | * With configurable shadow, ripple effect, and FAB style. See {@link ButtonProps} for the available props.
|
38 | *
|
39 | * Refer to {@link https:
|
40 | */
|
41 | export declare class Button extends Component<ButtonProps, ButtonState> {
|
42 |
|
43 | static defaultProps: ButtonProps;
|
44 |
|
45 | private theme;
|
46 | constructor(props: ButtonProps);
|
47 | /** {@inheritDoc @types/react#Component.render} */
|
48 | render(): JSX.Element;
|
49 |
|
50 | private _onLayout;
|
51 | }
|
52 |
|
53 |
|
54 | export declare interface ButtonProps extends TouchableWithoutFeedbackProps, RippleProps {
|
55 | |
56 |
|
57 |
|
58 |
|
59 | fab?: boolean;
|
60 | |
61 |
|
62 |
|
63 |
|
64 | enabled?: boolean;
|
65 | }
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | declare interface ButtonState {
|
72 | width: number;
|
73 | height: number;
|
74 | }
|
75 |
|
76 |
|
77 | export declare const ButtonStyles: {
|
78 | buttonText: typeof buttonText;
|
79 | buttonTextAccent: typeof buttonTextAccent;
|
80 | buttonTextPrimary: typeof buttonTextPrimary;
|
81 | coloredButtonText: typeof coloredButtonText;
|
82 | };
|
83 |
|
84 |
|
85 | declare function buttonText(theme?: Theme, color?: AttrValue): TextStyle;
|
86 |
|
87 |
|
88 | declare function buttonTextAccent(theme?: Theme): TextStyle;
|
89 |
|
90 |
|
91 | declare function buttonTextPrimary(theme?: Theme): TextStyle;
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | export declare class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
100 |
|
101 | static defaultProps: CheckboxProps;
|
102 | private theme;
|
103 | private animatedTickAlpha;
|
104 | constructor(props: CheckboxProps);
|
105 | UNSAFE_componentWillMount(): void;
|
106 | /**
|
107 | * TODO using controlled components.
|
108 | * @see https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html?#preferred-solutions
|
109 | */
|
110 | UNSAFE_componentWillReceiveProps(nextProps: CheckboxProps): void;
|
111 | render(): JSX.Element;
|
112 | private initView;
|
113 | /** Layout event handler */
|
114 | private onLayout;
|
115 | /** Touch event handler */
|
116 | private onTouch;
|
117 | /** animate the checked state, by scaling the inner circle */
|
118 | private aniToggle;
|
119 | /** When a toggle action (from the given state) is confirmed. */
|
120 | private confirmToggle;
|
121 | }
|
122 |
|
123 | /** Props of {@link Checkbox} */
|
124 | export declare type CheckboxProps = {
|
125 |
|
126 | borderOnColor?: string;
|
127 |
|
128 | borderOffColor?: string;
|
129 |
|
130 | checked?: boolean;
|
131 |
|
132 | onCheckedChange?: CheckedListener;
|
133 |
|
134 | extraRippleRadius?: number;
|
135 |
|
136 | editable?: boolean;
|
137 | } & TickProps & RippleProps & TouchableWithoutFeedbackProps;
|
138 |
|
139 |
|
140 | declare interface CheckboxState {
|
141 | checked: boolean;
|
142 | width: number;
|
143 | height: number;
|
144 | rippleRadii: number;
|
145 | }
|
146 |
|
147 | export declare interface CheckedEvent {
|
148 | checked: boolean;
|
149 | }
|
150 |
|
151 | export declare type CheckedListener = (event: CheckedEvent) => void;
|
152 |
|
153 |
|
154 | declare function coloredButtonText(theme?: Theme): TextStyle;
|
155 |
|
156 |
|
157 | export declare const ColoredFab: SFC<ButtonProps>;
|
158 |
|
159 |
|
160 | export declare const ColoredRaisedButton: SFC<ButtonProps>;
|
161 |
|
162 | export declare interface Dimension {
|
163 | width: number;
|
164 | height: number;
|
165 | }
|
166 |
|
167 |
|
168 | export declare const Fab: SFC<ButtonProps>;
|
169 |
|
170 |
|
171 | export declare const FlatButton: SFC<ButtonProps>;
|
172 |
|
173 |
|
174 | declare interface FloatingLabelPublicProps {
|
175 |
|
176 | floatingLabelEnabled?: boolean;
|
177 |
|
178 | floatingLabelAniDuration?: number;
|
179 |
|
180 | floatingLabelBottomMargin?: number;
|
181 |
|
182 | floatingLabelFont?: TextStyle;
|
183 | }
|
184 |
|
185 |
|
186 | export declare function getTheme(): Theme;
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 | export declare class IconToggle extends Component<IconToggleProps, IconToggleState> {
|
194 |
|
195 | static defaultProps: IconToggleProps;
|
196 | private theme;
|
197 | constructor(props: IconToggleProps);
|
198 | UNSAFE_componentWillMount(): void;
|
199 | UNSAFE_componentWillReceiveProps(nextProps: IconToggleProps): void;
|
200 | render(): JSX.Element;
|
201 | /**
|
202 | * Select a child element to show for the current toggle status.
|
203 | * @see [State List](http:
|
204 | */
|
205 | private renderChildren;
|
206 |
|
207 | private onTouch;
|
208 |
|
209 | private confirmToggle;
|
210 | }
|
211 |
|
212 |
|
213 | export declare interface IconToggleProps extends RippleProps, TouchableWithoutFeedbackProps {
|
214 | enabled?: boolean;
|
215 |
|
216 | checked?: boolean;
|
217 |
|
218 | onCheckedChange?: CheckedListener;
|
219 | }
|
220 |
|
221 |
|
222 | declare interface IconToggleState {
|
223 | checked: boolean;
|
224 | }
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 | export declare class IndeterminateProgress extends Component<SimpleProgressProps> {
|
235 |
|
236 | static defaultProps: SimpleProgressProps;
|
237 |
|
238 | private theme;
|
239 |
|
240 | private _totalLength;
|
241 |
|
242 | private _height;
|
243 |
|
244 | private _animatedBlock1;
|
245 |
|
246 | private _animatedBlock2;
|
247 | constructor(props: SimpleProgressProps);
|
248 |
|
249 | render(): JSX.Element;
|
250 | private _onLayout;
|
251 | private _aniUpdateProgress;
|
252 | private _getBlock2Ani;
|
253 | }
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 | export declare const MKColor: {
|
261 | Amber: string;
|
262 | Blue: string;
|
263 | BlueGrey: string;
|
264 | Brown: string;
|
265 | Cyan: string;
|
266 | DeepOrange: string;
|
267 | DeepPurple: string;
|
268 | Green: string;
|
269 | Grey: string;
|
270 | Indigo: string;
|
271 | LightBlue: string;
|
272 | LightGreen: string;
|
273 | Lime: string;
|
274 | Orange: string;
|
275 | Pink: string;
|
276 | Purple: string;
|
277 | Red: string;
|
278 | Silver: string;
|
279 | Teal: string;
|
280 | Yellow: string;
|
281 | Transparent: string;
|
282 | RGBAmber: string;
|
283 | RGBIndigo: string;
|
284 | RGBPink: string;
|
285 | RGBPurple: string;
|
286 | RGBTeal: string;
|
287 | palette_blue_400: string;
|
288 | palette_green_500: string;
|
289 | palette_red_500: string;
|
290 | palette_yellow_600: string;
|
291 | };
|
292 |
|
293 |
|
294 | declare interface MKTouchableProps extends ViewProps {
|
295 |
|
296 | onTouch?: (event: TouchEvent) => void;
|
297 | }
|
298 |
|
299 | export declare type NullableAttrValue = AttrValue | null | undefined;
|
300 |
|
301 | export declare type NullableReactChild = ReactChild | null | undefined;
|
302 |
|
303 | export declare type NullableString = string | null | undefined;
|
304 |
|
305 | export declare type NullableStyle = object | any[] | null | undefined;
|
306 |
|
307 |
|
308 | export declare interface NumRange {
|
309 | min: number;
|
310 | max: number;
|
311 | }
|
312 |
|
313 | declare type Pred = Prediction<RadioButton>;
|
314 |
|
315 | export declare type Prediction<T> = (obj?: T) => boolean;
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 | export declare class Progress extends Component<ProgressProps> {
|
325 |
|
326 | static Indeterminate: typeof IndeterminateProgress;
|
327 |
|
328 | static defaultProps: ProgressProps;
|
329 |
|
330 | private theme;
|
331 |
|
332 | private _progress;
|
333 |
|
334 | private _buffer;
|
335 |
|
336 | private _totalLength;
|
337 |
|
338 | private _height;
|
339 | private _animatedLength;
|
340 | private _animatedBufferLength;
|
341 | constructor(props: ProgressProps);
|
342 |
|
343 | set progress(value: number);
|
344 |
|
345 | get progress(): number;
|
346 |
|
347 | set buffer(value: number);
|
348 |
|
349 | get buffer(): number;
|
350 | UNSAFE_componentWillMount(): void;
|
351 | UNSAFE_componentWillReceiveProps(nextProps: ProgressProps): void;
|
352 |
|
353 | render(): JSX.Element;
|
354 | private _onLayout;
|
355 | private _aniUpdateProgress;
|
356 | private _aniUpdateBuffer;
|
357 | }
|
358 |
|
359 |
|
360 | export declare interface ProgressProps extends SimpleProgressProps {
|
361 | |
362 |
|
363 |
|
364 |
|
365 | progress?: number;
|
366 |
|
367 | buffer?: number;
|
368 |
|
369 | bufferColor?: string;
|
370 |
|
371 | bufferAniDuration?: number;
|
372 | }
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 | export declare class RadioButton extends Component<RadioButtonProps, RadioButtonState> {
|
381 |
|
382 | static defaultProps: RadioButtonProps;
|
383 | private theme;
|
384 | private animatedSize;
|
385 | private animatedRadius;
|
386 | private group?;
|
387 | constructor(props: RadioButtonProps);
|
388 | UNSAFE_componentWillMount(): void;
|
389 | UNSAFE_componentWillReceiveProps(nextProps: RadioButtonProps): void;
|
390 | componentWillUnmount(): void;
|
391 | confirmToggle(): void;
|
392 | confirmUncheck(): void;
|
393 | render(): JSX.Element;
|
394 | private initView;
|
395 | private emitCheckedChange;
|
396 |
|
397 | private aniChecked;
|
398 |
|
399 | private onLayout;
|
400 |
|
401 | private onTouch;
|
402 | }
|
403 |
|
404 |
|
405 |
|
406 |
|
407 | export declare class RadioButtonGroup {
|
408 | private readonly onAdd?;
|
409 | private readonly onRemove?;
|
410 | private buttons;
|
411 | constructor(onAdd?: Pred, onRemove?: Pred);
|
412 | add(btn: RadioButton): void;
|
413 | remove(btn: RadioButton): void;
|
414 | onChecked(btn: RadioButton, checked: boolean): void;
|
415 | private canAdd;
|
416 | private canRemove;
|
417 | }
|
418 |
|
419 |
|
420 | export declare interface RadioButtonProps extends RippleProps, TouchableWithoutFeedbackProps {
|
421 | borderOnColor?: string;
|
422 | borderOffColor?: string;
|
423 | fillColor?: string;
|
424 | checked?: boolean;
|
425 | group?: RadioButtonGroup;
|
426 | onCheckedChange?: CheckedListener;
|
427 | extraRippleRadius?: number;
|
428 | }
|
429 |
|
430 |
|
431 | declare interface RadioButtonState {
|
432 | checked: boolean;
|
433 | height: number;
|
434 | width: number;
|
435 | }
|
436 |
|
437 |
|
438 | export declare const RaisedButton: SFC<ButtonProps>;
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 | export declare class RangeSlider extends Component<RangeSliderProps> {
|
448 |
|
449 | static defaultProps: RangeSliderProps;
|
450 |
|
451 | private theme;
|
452 | private minThumbRef;
|
453 | private maxThumbRef;
|
454 | private trackRef;
|
455 | private overrideThumb;
|
456 | private _range;
|
457 | private _trackTotalLength;
|
458 | private _trackMarginH;
|
459 | private _trackMarginV;
|
460 | private _thumbRadiiWithBorder;
|
461 | private readonly _lowerTrackLength;
|
462 | private readonly _lowerTrackMin;
|
463 | constructor(props: RangeSliderProps);
|
464 |
|
465 | set minValue(value: number);
|
466 |
|
467 | get minValue(): number;
|
468 |
|
469 | set maxValue(value: number);
|
470 |
|
471 | get maxValue(): number;
|
472 | private get minThumb();
|
473 | private get maxThumb();
|
474 | UNSAFE_componentWillMount(): void;
|
475 | UNSAFE_componentWillReceiveProps(nextProps: RangeSliderProps): void;
|
476 | render(): JSX.Element;
|
477 |
|
478 | private _onTrackLayout;
|
479 | private _beginMove;
|
480 | private _endMove;
|
481 | private _updateValueByTouch;
|
482 | private _snap;
|
483 | private _defaultStepIncrement;
|
484 | private _setRange;
|
485 | private _toSliderScale;
|
486 | private _toPixelScale;
|
487 | private _internalSetValue;
|
488 | private _emitChange;
|
489 | private _emitConfirm;
|
490 | private _updateValue;
|
491 | private _validateMove;
|
492 | private _moveThumb;
|
493 | private _onThumbRadiiUpdate;
|
494 | private _verifyStep;
|
495 | }
|
496 |
|
497 |
|
498 | export declare interface RangeSliderProps extends ViewProps {
|
499 | |
500 |
|
501 |
|
502 |
|
503 | min: number;
|
504 | |
505 |
|
506 |
|
507 |
|
508 | max: number;
|
509 |
|
510 | range?: NumRange;
|
511 |
|
512 | trackSize?: number;
|
513 |
|
514 | thumbRadius?: number;
|
515 |
|
516 | thumbPadding?: number;
|
517 |
|
518 | lowerTrackColor?: any;
|
519 |
|
520 | upperTrackColor?: any;
|
521 |
|
522 | onStart?: ThumbGestureCallback;
|
523 |
|
524 | onChange?: (range: NumRange) => void;
|
525 |
|
526 | onConfirm?: (range: NumRange) => void;
|
527 |
|
528 | step?: number;
|
529 | }
|
530 |
|
531 |
|
532 |
|
533 |
|
534 | export declare class Ripple extends Component<RippleProps, RippleState> {
|
535 |
|
536 | static defaultProps: RippleProps;
|
537 | private containerRef;
|
538 | private maskRef;
|
539 | private rippleRef;
|
540 | private _animatedAlpha;
|
541 | private _animatedRippleScale;
|
542 | private _rippleAni?;
|
543 | private _pendingRippleAni?;
|
544 | constructor(props: RippleProps);
|
545 | |
546 |
|
547 |
|
548 |
|
549 | measure(cb: MeasureOnSuccessCallback): any;
|
550 |
|
551 | showRipple(): void;
|
552 |
|
553 | hideRipple(): void;
|
554 |
|
555 | render(): JSX.Element;
|
556 | private _onLayout;
|
557 | private _onLayoutChange;
|
558 | private _calcMaskLayer;
|
559 | private _calcRippleLayer;
|
560 | private _onTouchEvent;
|
561 | private _onPointerDown;
|
562 | private _onPointerUp;
|
563 | }
|
564 |
|
565 | export declare type RippleLocation = 'tapLocation' | 'center';
|
566 |
|
567 |
|
568 | export declare type RippleProps = {
|
569 |
|
570 | rippleColor?: string;
|
571 |
|
572 | rippleDuration?: number;
|
573 |
|
574 | rippleLocation?: RippleLocation;
|
575 | |
576 |
|
577 |
|
578 |
|
579 | maskEnabled?: boolean;
|
580 |
|
581 | maskColor?: string;
|
582 |
|
583 | borderWidth?: number;
|
584 |
|
585 | maskBorderRadius?: number;
|
586 |
|
587 | maskBorderRadiusInPercent?: number;
|
588 |
|
589 | maskDuration?: number;
|
590 |
|
591 | shadowAniEnabled?: boolean;
|
592 |
|
593 | disabled?: boolean;
|
594 | } & MKTouchableProps;
|
595 |
|
596 |
|
597 | declare interface RippleState {
|
598 | width: number;
|
599 | height: number;
|
600 | maskBorderRadius: number;
|
601 | shadowOffsetY: number;
|
602 | ripple: {
|
603 | radii: number;
|
604 | dia: number;
|
605 | offset: {
|
606 | top: number;
|
607 | left: number;
|
608 | };
|
609 | };
|
610 | }
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 | export declare function setTheme(aTheme: Theme): void;
|
619 |
|
620 |
|
621 | export declare interface SimpleProgressProps extends ViewProps {
|
622 |
|
623 | progressColor?: string;
|
624 |
|
625 | progressAniDuration?: number;
|
626 | }
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 | export declare class Slider extends Component<SliderProps> {
|
636 |
|
637 | static defaultProps: SliderProps;
|
638 |
|
639 | private theme;
|
640 | private thumbRef;
|
641 | private _value;
|
642 | private _trackMarginH;
|
643 | private _trackMarginV;
|
644 | private _trackTotalLength;
|
645 | private _thumbRadiiWithBorder;
|
646 | private _prevPointerX;
|
647 | private _animatedTrackLength;
|
648 | private _panResponder;
|
649 | constructor(props: SliderProps);
|
650 | set value(value: number);
|
651 | get value(): number;
|
652 | UNSAFE_componentWillMount(): void;
|
653 | UNSAFE_componentWillReceiveProps(nextProps: SliderProps): void;
|
654 | render(): JSX.Element;
|
655 | private _onTrackLayout;
|
656 | private _snap;
|
657 | private _defaultStepIncrement;
|
658 | private _internalSetValue;
|
659 | private _emitChange;
|
660 | private _emitOnPressIn;
|
661 | private _emitOnPressOut;
|
662 | private _emitConfirm;
|
663 | private _aniUpdateValue;
|
664 | private _onPanResponderEnd;
|
665 | private _onTouchEvent;
|
666 | private _getTouchOnTrack;
|
667 | private _updateValueByTouch;
|
668 | private _toSliderScale;
|
669 | private _toPixelScale;
|
670 | private _confirmUpdateValueByTouch;
|
671 | private _moveThumb;
|
672 | private _confirmMoveThumb;
|
673 | private _onThumbRadiiUpdate;
|
674 | private _verifyStep;
|
675 | }
|
676 |
|
677 |
|
678 | export declare interface SliderProps extends ViewProps {
|
679 | |
680 |
|
681 |
|
682 |
|
683 | min: number;
|
684 | |
685 |
|
686 |
|
687 |
|
688 | max: number;
|
689 | |
690 |
|
691 |
|
692 |
|
693 | value: number;
|
694 |
|
695 | trackSize?: number;
|
696 |
|
697 | thumbRadius?: number;
|
698 |
|
699 | thumbPadding?: number;
|
700 |
|
701 | lowerTrackColor?: any;
|
702 |
|
703 | upperTrackColor?: any;
|
704 |
|
705 | onChange?: (value: number) => void;
|
706 |
|
707 | onPressIn?: () => void;
|
708 |
|
709 | onPressOut?: () => void;
|
710 |
|
711 | onConfirm?: (value: number) => void;
|
712 |
|
713 | step?: number;
|
714 | }
|
715 |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 |
|
721 |
|
722 |
|
723 |
|
724 | export declare class Spinner extends Component<SpinnerProps, SpinnerState> {
|
725 |
|
726 | static defaultProps: SpinnerProps;
|
727 |
|
728 | private theme;
|
729 | private _nextStrokeColorIndex;
|
730 | private _animatedContainerAngle;
|
731 | private _animatedArcAngle;
|
732 | constructor(props: SpinnerProps);
|
733 |
|
734 | render(): JSX.Element;
|
735 | private _onLayout;
|
736 | private _aniUpdateSpinner;
|
737 | private _renderSpinnerLayer;
|
738 | private _updateStrokeColor;
|
739 | }
|
740 |
|
741 |
|
742 | export declare interface SpinnerProps extends ViewProps {
|
743 | |
744 |
|
745 |
|
746 |
|
747 |
|
748 | strokeColor?: any;
|
749 |
|
750 | strokeWidth?: number;
|
751 |
|
752 | spinnerAniDuration?: number;
|
753 | }
|
754 |
|
755 |
|
756 | declare interface SpinnerState {
|
757 | dimen: Dimension;
|
758 | strokeColor: any;
|
759 | }
|
760 |
|
761 | export declare type Style = object | any[];
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
769 |
|
770 |
|
771 | export declare class Switch extends Component<SwitchProps, SwitchState> {
|
772 |
|
773 | static defaultProps: SwitchProps;
|
774 | private theme;
|
775 | private thumbRef;
|
776 | private animatedThumbLeft;
|
777 | constructor(props: SwitchProps);
|
778 | UNSAFE_componentWillMount(): void;
|
779 | UNSAFE_componentWillReceiveProps(nextProps: SwitchProps): void;
|
780 |
|
781 | render(): JSX.Element;
|
782 | |
783 |
|
784 |
|
785 |
|
786 | private get thumb();
|
787 | private getBgColor;
|
788 | private onPress;
|
789 | private onPressIn;
|
790 | private onPressOut;
|
791 |
|
792 | private layoutThumb;
|
793 |
|
794 | private initLayout;
|
795 |
|
796 | private translateThumb;
|
797 |
|
798 | private computeThumbX;
|
799 |
|
800 | private startToggle;
|
801 |
|
802 | private confirmToggle;
|
803 |
|
804 | private endToggle;
|
805 | }
|
806 |
|
807 |
|
808 | export declare interface SwitchProps extends TouchableWithoutFeedbackProps {
|
809 |
|
810 | checked?: boolean;
|
811 |
|
812 | onCheckedChange?: CheckedListener;
|
813 |
|
814 | onColor?: string;
|
815 |
|
816 | offColor?: string;
|
817 |
|
818 | trackSize?: number;
|
819 |
|
820 | trackLength?: number;
|
821 |
|
822 | thumbRadius?: number;
|
823 |
|
824 | thumbOnColor?: string;
|
825 |
|
826 | thumbOffColor?: string;
|
827 |
|
828 | thumbAniDuration?: number;
|
829 |
|
830 | rippleColor?: string;
|
831 |
|
832 | rippleAniDuration?: number;
|
833 | }
|
834 |
|
835 |
|
836 | declare interface SwitchState {
|
837 | checked: boolean;
|
838 | thumbFrame: {
|
839 | padding: number;
|
840 | r: number;
|
841 | rippleRadii: number;
|
842 | x: number;
|
843 | };
|
844 | trackLength: number;
|
845 | trackMargin: number;
|
846 | trackRadii: number;
|
847 | trackSize: number;
|
848 | }
|
849 |
|
850 |
|
851 |
|
852 |
|
853 |
|
854 | export declare class Textfield extends Component<TextfieldProps, TextfieldState> {
|
855 |
|
856 | static defaultProps: Partial<TextfieldProps>;
|
857 | private theme;
|
858 | private readonly inputFrame;
|
859 | private inputRef;
|
860 | private labelRef;
|
861 | private underlineRef;
|
862 | private anim?;
|
863 | private _bufferedValue;
|
864 | constructor(props: TextfieldProps);
|
865 | private set bufferedValue(value);
|
866 | private get bufferedValue();
|
867 | private set placeholder(value);
|
868 | |
869 |
|
870 |
|
871 |
|
872 | focus(): void;
|
873 | |
874 |
|
875 |
|
876 | isFocused(): boolean;
|
877 | |
878 |
|
879 |
|
880 | blur(): void;
|
881 | UNSAFE_componentWillMount(): void;
|
882 | UNSAFE_componentWillReceiveProps(nextProps: TextfieldProps): void;
|
883 | componentDidMount(): void;
|
884 | render(): JSX.Element;
|
885 | private _onTextChange;
|
886 | private _onFocus;
|
887 | private _onBlur;
|
888 | private startAnimations;
|
889 | private _doMeasurement;
|
890 | private _onLabelMeasured;
|
891 | private _onInputMeasured;
|
892 | private _aniFloatLabel;
|
893 | private _aniStartHighlight;
|
894 | private _aniStopHighlight;
|
895 | private _callback;
|
896 | }
|
897 |
|
898 |
|
899 | export declare interface TextfieldProps extends TextInputProps, FloatingLabelPublicProps, UnderlinePublicProps {
|
900 |
|
901 | onTextChange?: (text: string) => void;
|
902 |
|
903 | password?: boolean;
|
904 | |
905 |
|
906 |
|
907 |
|
908 | tint?: any;
|
909 |
|
910 | highlightColor?: any;
|
911 |
|
912 | textInputStyle?: StyleProp<TextStyle>;
|
913 |
|
914 | additionalInputProps?: TextInputProps;
|
915 | }
|
916 |
|
917 |
|
918 | declare interface TextfieldState {
|
919 | inputMarginTop: number;
|
920 | }
|
921 |
|
922 | export declare interface Theme {
|
923 | [name: string]: AttrValue;
|
924 | }
|
925 |
|
926 |
|
927 | declare class Thumb extends Component<ThumbProps, ThumbState> {
|
928 |
|
929 | static defaultProps: ThumbProps;
|
930 |
|
931 | x: number;
|
932 | private _radii;
|
933 | private _dia;
|
934 | private _containerRadii;
|
935 | private _containerDia;
|
936 | private readonly _trackMarginH;
|
937 | private _panResponder;
|
938 | private _animatedLeft;
|
939 | private _animatedScale;
|
940 | constructor(props: ThumbProps);
|
941 | UNSAFE_componentWillMount(): void;
|
942 | componentDidMount(): void;
|
943 | UNSAFE_componentWillReceiveProps(nextProps: ThumbProps): void;
|
944 | componentWillUnmount(): void;
|
945 | |
946 |
|
947 |
|
948 |
|
949 | moveTo(x: number): void;
|
950 |
|
951 | confirmMoveTo(): void;
|
952 |
|
953 | render(): JSX.Element;
|
954 | private _onRadiiUpdate;
|
955 | private _getOnSliding;
|
956 | private _onExplode;
|
957 | private _onCollapse;
|
958 | }
|
959 |
|
960 |
|
961 | declare type ThumbGestureCallback = (thumb: Thumb, event: GestureResponderEvent) => void;
|
962 |
|
963 |
|
964 | declare interface ThumbProps extends ViewProps {
|
965 |
|
966 | onGrant?: ThumbGestureCallback;
|
967 |
|
968 | onMove?: ThumbGestureCallback;
|
969 |
|
970 | onEnd?: ThumbGestureCallback;
|
971 |
|
972 | disabledColor?: string;
|
973 |
|
974 | enabledColor?: string;
|
975 |
|
976 | radius?: number;
|
977 |
|
978 | touchPadding?: number;
|
979 | }
|
980 |
|
981 |
|
982 | declare interface ThumbState {
|
983 | color: any;
|
984 | borderColor: any;
|
985 | }
|
986 |
|
987 | declare interface TickProps extends ViewProps {
|
988 |
|
989 | fillColor?: string;
|
990 |
|
991 | inset?: number;
|
992 | }
|
993 |
|
994 |
|
995 | declare interface TouchEvent {
|
996 | type: 'TOUCH_DOWN' | 'TOUCH_UP' | 'TOUCH_MOVE' | 'TOUCH_CANCEL';
|
997 | x: number;
|
998 | y: number;
|
999 | }
|
1000 |
|
1001 |
|
1002 | declare interface UnderlinePublicProps {
|
1003 |
|
1004 | underlineEnabled?: boolean;
|
1005 |
|
1006 | underlineSize?: number;
|
1007 | }
|
1008 |
|
1009 | export { }
|
1010 |
|
\ | No newline at end of file |