forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-touchspin.d.ts
130 lines (106 loc) · 2.61 KB
/
bootstrap-touchspin.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Type definitions for Bootstrap TouchSpin
// Project: http://www.virtuosoft.eu/code/bootstrap-touchspin/
// Definitions by: Albin Sunnanbo <https://github.com/albinsunnanbo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
/**
* TouchSpinOptions. All options are optional
*/
interface TouchSpinOptions {
/**
* Applied when no explicit value is set on the input with the value attribute.
* Empty string means that the value remains empty on initialization.
*/
initval?: number | string;
/**
* Minimum value.
*/
min?: number;
/**
* Maximum value.
*/
max?: number;
/**
* Incremental/decremental step on up/down change.
*/
step?: number;
/**
* How to force the value to be divisible by step value: 'none' | 'round' | 'floor' | 'ceil'
*/
forcestepdivisibility?: string;
/**
* Number of decimal points.
*/
decimals?: number;
/**
* Refresh rate of the spinner in milliseconds.
*/
stepinterval?: number;
/**
* Time in milliseconds before the spinner starts to spin.
*/
stepintervaldelay?: number;
/**
* Enables the traditional up/down buttons.
*/
verticalbuttons?: boolean;
/**
* Class of the up button with vertical buttons mode enabled.
*/
verticalupclass?: string;
/**
* Class of the down button with vertical buttons mode enabled.
*/
verticaldownclass?: string;
/**
* Text before the input.
*/
prefix?: string;
/**
* Text after the input.
*/
postfix?: string;
/**
* Extra class(es) for prefix.
*/
prefix_extraclass?: string;
/**
* Extra class(es) for postfix.
*/
postfix_extraclass?: string;
/**
* If enabled, the the spinner is continually becoming faster as holding the button.
*/
booster?: boolean;
/**
* Boost at every nth step.
*/
boostat?: number;
/**
* Maximum step when boosted.
*/
maxboostedstep?: number | boolean;
/**
* Enables the mouse wheel to change the value of the input.
*/
mousewheel?: boolean;
/**
* Class(es) of down button.
*/
buttondown_class?: string;
/**
* Class(es) of up button.
*/
buttonup_class?: string;
}
interface JQuery {
/**
* Initialize TouchSpin
*/
TouchSpin(): JQuery;
/**
* Inialize TouchSpin with options
* @param options a TouchSpinOptions object with one or more options
*/
TouchSpin(options: TouchSpinOptions): JQuery;
}