@@ -37,6 +37,7 @@ const digits = (num) => {
37
37
38
38
/**
39
39
* A picker component that lets the user select a number in between `min` and `max` numbers.
40
+ *
40
41
* This component is not spottable. Developers are encouraged to use
41
42
* {@link moonstone/EditableIntegerPicker.EditableIntegerPicker}.
42
43
*
@@ -52,6 +53,9 @@ const EditableIntegerPickerBase = kind({
52
53
/**
53
54
* The maximum value selectable by the picker (inclusive).
54
55
*
56
+ * The range between `min` and `max` should be evenly divisible by
57
+ * [step]{@link moonstone/EditableIntegerPicker.EditableIntegerPickerBase.step}.
58
+ *
55
59
* @type {Number }
56
60
* @required
57
61
* @public
@@ -61,15 +65,19 @@ const EditableIntegerPickerBase = kind({
61
65
/**
62
66
* The minimum value selectable by the picker (inclusive).
63
67
*
68
+ * The range between `min` and `max` should be evenly divisible by
69
+ * [step]{@link moonstone/EditableIntegerPicker.EditableIntegerPickerBase.step}.
70
+ *
64
71
* @type {Number }
65
72
* @required
66
73
* @public
67
74
*/
68
75
min : PropTypes . number . isRequired ,
69
76
70
77
/**
71
- * Overrides the `aria-valuetext` for the picker. By default, `aria-valuetext` is set
72
- * to the current selected child value.
78
+ * The value for the picker for accessibility read out.
79
+ *
80
+ * By default, `aria-valuetext` is set to the current selected child value.
73
81
*
74
82
* @type {String }
75
83
* @memberof moonstone/EditableIntegerPicker.EditableIntegerPickerBase.prototype
@@ -78,50 +86,54 @@ const EditableIntegerPickerBase = kind({
78
86
'aria-valuetext' : PropTypes . string ,
79
87
80
88
/**
81
- * Assign a custom icon for the decrementer. All strings supported by [Icon]{@link moonstone/Icon.Icon} are
82
- * supported. Without a custom icon, the default is used.
89
+ * The icon for the decrementer.
90
+ *
91
+ * All strings supported by [Icon]{@link moonstone/Icon.Icon} are supported. Without a
92
+ * custom icon, the default is used.
83
93
*
84
94
* @type {String }
85
95
* @public
86
96
*/
87
97
decrementIcon : PropTypes . string ,
88
98
89
99
/**
90
- * Disables the picker and prevents events from firing.
91
- * [events]{ @link /docs/developer-guide/glossary/#event} .
100
+ * Disables the picker and prevents [ events]{ @link /docs/developer-guide/glossary/#event}
101
+ * from firing .
92
102
*
93
103
* @type {Boolean }
94
104
* @public
95
105
*/
96
106
disabled : PropTypes . bool ,
97
107
98
108
/**
99
- * When `true`, an input will be displayed instead of the picker components.
109
+ * Displays the input field instead of the picker components.
100
110
*
101
111
* @type {Boolean }
102
112
* @public
103
113
*/
104
114
editMode : PropTypes . bool ,
105
115
106
116
/**
107
- * Assign a custom icon for the incrementer. All strings supported by [Icon]{@link moonstone/Icon.Icon} are
108
- * supported. Without a custom icon, the default is used.
117
+ * The icon for the incrementer.
118
+ *
119
+ * All strings supported by [Icon]{@link moonstone/Icon.Icon} are supported. Without a
120
+ * custom icon, the default is used.
109
121
*
110
122
* @type {String }
111
123
* @public
112
124
*/
113
125
incrementIcon : PropTypes . string ,
114
126
115
127
/**
116
- * The method to run when the input mounts, giving a reference to the DOM.
128
+ * Called when the input mounts witha reference to the DOM node .
117
129
*
118
130
* @type {Function }
119
131
* @private
120
132
*/
121
133
inputRef : PropTypes . func ,
122
134
123
135
/**
124
- * Called when there is a blur in the input.
136
+ * Called when there the input is blurred .
125
137
*
126
138
* @type {Function }
127
139
* @public
@@ -140,35 +152,40 @@ const EditableIntegerPickerBase = kind({
140
152
onPickerItemClick : PropTypes . func ,
141
153
142
154
/**
143
- * Sets the orientation of the picker, whether the buttons are above and below or on the
144
- * sides of the value. Must be either `'horizontal'` or `'vertical'`.
155
+ * The orientation of the picker.
145
156
*
146
- * @type {String }
157
+ * @type {('horizontal'|'vertical') }
147
158
* @default 'horizontal'
148
159
* @public
149
160
*/
150
161
orientation : PropTypes . oneOf ( [ 'horizontal' , 'vertical' ] ) ,
151
162
152
163
/**
153
- * When `true`, pads the display value with zeros up to the number of digits of the value of
154
- * `min` or max`, whichever is greater.
164
+ * Pads the display value with zeros.
165
+ *
166
+ * The number of zeros used is the number of digits of the value of
167
+ * [min]{@link moonstone/EditableIntegerPicker.EditableIntegerPickerBase.min} or
168
+ * [max]{@link moonstone/EditableIntegerPicker.EditableIntegerPickerBase.max}, whichever is
169
+ * greater.
155
170
*
156
171
* @type {Boolean }
157
172
* @public
158
173
*/
159
174
padded : PropTypes . bool ,
160
175
161
176
/**
162
- * The method to run when the picker mounts, giving a reference to the DOM.
177
+ * Called when the picker mounts with a reference to the picker DOM node .
163
178
*
164
179
* @type {Function }
165
180
* @private
166
181
*/
167
182
pickerRef : PropTypes . func ,
168
183
169
184
/**
170
- * Allow the picker to only increment or decrement by a given value. A step of `2` would
171
- * cause a picker to increment from 10 to 12 to 14, etc.
185
+ * Allow the picker to only increment or decrement by a given value.
186
+ *
187
+ * For example, a step of `2` would cause a picker to increment from 10 to 12 to 14, etc.
188
+ * It must evenly divide into the range designated by `min` and `max`.
172
189
*
173
190
* @type {Number }
174
191
* @default 1
@@ -186,7 +203,7 @@ const EditableIntegerPickerBase = kind({
186
203
unit : PropTypes . string ,
187
204
188
205
/**
189
- * The current value of the Picker to be displayed .
206
+ * The current value of the Picker.
190
207
*
191
208
* @type {Number }
192
209
* @default 0
@@ -195,15 +212,17 @@ const EditableIntegerPickerBase = kind({
195
212
value : PropTypes . number ,
196
213
197
214
/**
198
- * Choose a specific size for your picker. `'small'`, `'medium'`, `'large'`, or set to `null` to
199
- * assume auto-sizing. `'small'` is good for numeric pickers, `'medium'` for single or short
200
- * word pickers, `'large'` for maximum-sized pickers.
215
+ * The size of the picker.
216
+ *
217
+ * `'small'`, `'medium'`, `'large'`, or set to `null` to assume auto-sizing. `'small'` is
218
+ * good for numeric pickers, `'medium'` for single or short word pickers, `'large'` for
219
+ * maximum-sized pickers.
201
220
*
202
- * You may also supply a number. This number will determine the minumum size of the Picker.
221
+ * You may also supply a number which will determine the minumum size of the Picker.
203
222
* Setting a number to less than the number of characters in your longest value may produce
204
223
* unexpected results.
205
224
*
206
- * @type {String |Number }
225
+ * @type {('small'|'medium'|'large') |Number }
207
226
* @default 'medium'
208
227
* @public
209
228
*/
@@ -213,8 +232,7 @@ const EditableIntegerPickerBase = kind({
213
232
] ) ,
214
233
215
234
/**
216
- * Should the picker stop incrementing when the picker reaches the last element? Set `wrap`
217
- * to true to allow the picker to continue from the opposite end of the list of options.
235
+ * Allows the picker to increment from the max to min value and vice versa.
218
236
*
219
237
* @type {Boolean }
220
238
* @public
@@ -304,9 +322,10 @@ const EditableIntegerPickerBase = kind({
304
322
/**
305
323
* A component that lets the user select a number from a range of numbers.
306
324
*
307
- * By default, `EditableIntegerPicker` maintains the state of its `value` property. Supply the `defaultValue`
308
- * property to control its initial value. If you wish to directly control updates to the component,
309
- * supply a value to `value` at creation time and update it in response to `onChange` events.
325
+ * By default, `EditableIntegerPicker` maintains the state of its `value` property. Supply the
326
+ * `defaultValue` property to control its initial value. If you wish to directly control updates to
327
+ * the component, supply a value to `value` at creation time and update it in response to `onChange`
328
+ * events.
310
329
*
311
330
* @class EditableIntegerPicker
312
331
* @memberof moonstone/EditableIntegerPicker
0 commit comments