Skip to content

Commit

Permalink
Merge pull request #701 from normano64/typings
Browse files Browse the repository at this point in the history
Fixes for typescript definitions
  • Loading branch information
javivelasco committed Aug 10, 2016
2 parents 519f659 + c016565 commit f518bc0
Show file tree
Hide file tree
Showing 34 changed files with 144 additions and 118 deletions.
2 changes: 1 addition & 1 deletion components/autocomplete/index.d.ts
Expand Up @@ -70,7 +70,7 @@ interface AutocompleteProps extends __ReactToolbox.Props {
* Callback function that is fired when the components's value changes.
* @default auto
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Determines if the selected list is shown above or below input. It can be above or below.
* @default above
Expand Down
16 changes: 0 additions & 16 deletions components/button/index.d.ts
Expand Up @@ -102,14 +102,6 @@ interface ButtonProps extends __ReactToolbox.Props {
* @default true
*/
neutral?: boolean;
/**
* Fires after the mouse leaves the Component.
*/
onMouseLeave?: __React.MouseEventHandler;
/**
* Fires after the mouse is released from the Component.
*/
OnMouseUp?: __React.MouseEventHandler;
/**
* Indicates if the button should have primary color.
* @default false
Expand Down Expand Up @@ -200,14 +192,6 @@ interface IconButtonProps extends __ReactToolbox.Props {
* @default true
*/
neutral?: boolean;
/**
* Fires after the mouse leaves the Component.
*/
onMouseLeave?: __React.MouseEventHandler;
/**
* Fires after the mouse is released from the Component.
*/
OnMouseUp?: __React.MouseEventHandler;
/**
* Indicates if the button should have primary color.
* @default false
Expand Down
4 changes: 2 additions & 2 deletions components/checkbox/index.d.ts
Expand Up @@ -53,11 +53,11 @@ interface CheckboxProps extends __ReactToolbox.Props {
/**
* Callback called when the checkbox is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback called when the checkbox value is changed.
*/
onChange?: __React.MouseEventHandler;
onChange?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
2 changes: 1 addition & 1 deletion components/chip/index.d.ts
Expand Up @@ -40,7 +40,7 @@ interface ChipProps extends __ReactToolbox.Props {
/**
* Callback to be invoked when the delete icon is clicked.
*/
onDeleteClick?: __React.MouseEventHandler;
onDeleteClick?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
6 changes: 3 additions & 3 deletions components/date_picker/index.d.ts
Expand Up @@ -124,15 +124,15 @@ interface DatePickerProps extends __ReactToolbox.Props {
/**
* Callback called when the picker value is changed.
*/
onChange?: __React.MouseEventHandler;
onChange?: Function;
/**
* Callback called when the ESC key is pressed with the overlay active.
*/
onEscKeyDown?: __React.KeyboardEventHandler;
onEscKeyDown?: Function;
/**
* Callback to be invoked when the dialog overlay is clicked.
*/
onOverlayClick?: __React.MouseEventHandler;
onOverlayClick?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
12 changes: 6 additions & 6 deletions components/dialog/index.d.ts
Expand Up @@ -35,7 +35,7 @@ interface DialogActionProps {
/**
* Callback called when the component is clicked.
*/
onClick?: __React.MouseEventHandler;
onClick?: Function;
}

interface DialogProps extends __ReactToolbox.Props {
Expand All @@ -55,23 +55,23 @@ interface DialogProps extends __ReactToolbox.Props {
/**
* Callback called when the ESC key is pressed with the overlay active.
*/
onEscKeyDown?: __React.KeyboardEventHandler;
onEscKeyDown?: Function;
/**
* Callback to be invoked when the dialog overlay is clicked.
*/
onOverlayClick?: __React.MouseEventHandler;
onOverlayClick?: Function;
/**
* Callback called when the mouse button is pressed on the overlay.
*/
onOverlayMouseDown?: __React.MouseEventHandler;
onOverlayMouseDown?: Function;
/**
* Callback called when the mouse is moving over the overlay.
*/
onOverlayMouseMove?: __React.MouseEventHandler;
onOverlayMouseMove?: Function;
/**
* Callback called when the mouse button is released over the overlay.
*/
onOverlayMouseUp?: __React.MouseEventHandler;
onOverlayMouseUp?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
2 changes: 1 addition & 1 deletion components/drawer/index.d.ts
Expand Up @@ -36,7 +36,7 @@ interface DrawerProps extends __ReactToolbox.Props {
/**
* Callback function to be invoked when the overlay is clicked.
*/
onOverlayClick?: __React.MouseEventHandler;
onOverlayClick?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
6 changes: 3 additions & 3 deletions components/dropdown/index.d.ts
Expand Up @@ -82,15 +82,15 @@ interface DropdownProps extends __ReactToolbox.Props {
/**
* Callback function that is fired when the component is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback function that is fired when the component's value changes.
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Callback function that is fired when the component is focused.
*/
onFocus?: __React.FocusEventHandler;
onFocus?: Function;
/**
* Array of data objects with the data to represent in the dropdown.
*/
Expand Down
35 changes: 34 additions & 1 deletion components/index.d.ts
Expand Up @@ -11,7 +11,40 @@ export declare namespace __ReactToolbox {
/**
* Callback called when the component is clicked.
*/
onClick?: __React.MouseEventHandler;
onClick?: Function;
/**
* Fires after the mouse is released from the Component.
*/
onMouseUp?: Function;
/**
* Callback called when the mouse enters the Component.
*/
onMouseEnter?: Function;
/**
* Callback called when the mouse leaves the Component.
*/
onMouseLeave?: Function;
/**
* Callback called when the mouse press the Component.
*/
onMouseDown?: Function;
onContextMenu?: Function;
onDoubleClick?: Function;
onDrag?: Function;
onDragEnd?: Function;
onDragEnter?: Function;
onDragExit?: Function;
onDragLeave?: Function;
onDragOver?: Function;
onDragStart?: Function;
onDrop?: Function;
onMouseMove?: Function;
onMouseOut?: Function;
onMouseOver?: Function;
onTouchCancel?: Function;
onTouchEnd?: Function;
uchMove?: Function;
onTouchStart?: Function;
/**
* Set inline style for the root component.
*/
Expand Down
10 changes: 5 additions & 5 deletions components/input/index.d.ts
Expand Up @@ -90,27 +90,27 @@ interface InputProps extends __ReactToolbox.Props {
* If true, a textarea element will be rendered. The textarea also grows and shrinks according to the number of lines.
* @default false
*/
multiLine?: boolean;
multiline?: boolean;
/**
* Name for the input field.
*/
name?: string;
/**
* Callback function that is fired when component is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback function that is fired when the component's value changes
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Callback function that is fired when component is focused.
*/
onFocus?: __React.FocusEventHandler;
onFocus?: Function;
/**
* Callback function that is fired when a key is pressed.
*/
onKeyPress?: __React.MouseEventHandler;
onKeyPress?: Function;
/**
* If true, the html input has a required attribute.
* @default false
Expand Down
2 changes: 1 addition & 1 deletion components/layout/index.d.ts
Expand Up @@ -88,7 +88,7 @@ interface NavDrawerProps extends __ReactToolbox.Props {
/**
* Callback function to be invoked when the overlay is clicked.
*/
onOverlayClick?: __React.MouseEventHandler;
onOverlayClick?: Function;
/**
* The breakpoint at which the drawer is automatically pinned.
*/
Expand Down
6 changes: 3 additions & 3 deletions components/list/index.d.ts
Expand Up @@ -91,15 +91,15 @@ interface ListCheckboxProps extends __ReactToolbox.Props {
/**
* Callback called when the input element is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback called when the input element is changed.
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Callback called when the input element is focused.
*/
onFocus?: __React.FocusEventHandler;
onFocus?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
8 changes: 4 additions & 4 deletions components/radio/index.d.ts
Expand Up @@ -21,7 +21,7 @@ interface RadioGroupProps extends __ReactToolbox.Props {
/**
* Default value selected in the radio group.
*/
value?: number;
value?: any;
}

export class RadioGroup extends __React.Component<RadioGroupProps, {}> { }
Expand Down Expand Up @@ -79,15 +79,15 @@ interface RadioButtonProps extends __ReactToolbox.Props {
/**
* Callback function that will be invoked when the input is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback function that will be invoked when the value changes.
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Callback function that will be invoked when the input is focused.
*/
onFocus?: __React.FocusEventHandler;
onFocus?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
6 changes: 3 additions & 3 deletions components/switch/index.d.ts
Expand Up @@ -57,15 +57,15 @@ interface SwitchProps extends __ReactToolbox.Props {
/**
* Callback function that is fired when when the switch is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback function that is fired when the component's value changes.
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Callback function that is fired when the switch is focused.
*/
onFocus?: __React.FocusEventHandler;
onFocus?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
2 changes: 1 addition & 1 deletion components/table/index.d.ts
Expand Up @@ -40,7 +40,7 @@ interface TableProps extends __ReactToolbox.Props {
/**
* Callback function invoked when the row selection changes.
*/
onSelect?: __React.FormEventHandler;
onSelect?: Function;
/**
* If true, each row will display a checkbox to allow the user to select that one row.
* @default true
Expand Down
4 changes: 4 additions & 0 deletions components/time_picker/index.d.ts
Expand Up @@ -100,6 +100,10 @@ interface TimePickerProps {
* Provide error text which will be displayed under the field.
*/
error?: string;
/**
* A key to identify an Icon from Material Design Icons or a custom Icon Element.
*/
icon?: __React.ReactNode | string;
/**
* This class will be applied to Input component of TimePicker.
*/
Expand Down
8 changes: 0 additions & 8 deletions components/tooltip/index.d.ts
Expand Up @@ -14,14 +14,6 @@ export interface TooltipTheme {
}

interface TooltipProps {
/**
* Callback called when the mouse enters the Component.
*/
onMouseEnter?: __React.MouseEventHandler;
/**
* Callback called when the mouse leaves the Component.
*/
onMouseLeave?: __React.MouseEventHandler;
/**
* Classnames object defining the component style.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/autocomplete/index.d.ts
Expand Up @@ -70,7 +70,7 @@ interface AutocompleteProps extends __ReactToolbox.Props {
* Callback function that is fired when the components's value changes.
* @default auto
*/
onChange?: __React.FormEventHandler;
onChange?: Function;
/**
* Determines if the selected list is shown above or below input. It can be above or below.
* @default above
Expand Down
16 changes: 0 additions & 16 deletions lib/button/index.d.ts
Expand Up @@ -102,14 +102,6 @@ interface ButtonProps extends __ReactToolbox.Props {
* @default true
*/
neutral?: boolean;
/**
* Fires after the mouse leaves the Component.
*/
onMouseLeave?: __React.MouseEventHandler;
/**
* Fires after the mouse is released from the Component.
*/
OnMouseUp?: __React.MouseEventHandler;
/**
* Indicates if the button should have primary color.
* @default false
Expand Down Expand Up @@ -200,14 +192,6 @@ interface IconButtonProps extends __ReactToolbox.Props {
* @default true
*/
neutral?: boolean;
/**
* Fires after the mouse leaves the Component.
*/
onMouseLeave?: __React.MouseEventHandler;
/**
* Fires after the mouse is released from the Component.
*/
OnMouseUp?: __React.MouseEventHandler;
/**
* Indicates if the button should have primary color.
* @default false
Expand Down
4 changes: 2 additions & 2 deletions lib/checkbox/index.d.ts
Expand Up @@ -53,11 +53,11 @@ interface CheckboxProps extends __ReactToolbox.Props {
/**
* Callback called when the checkbox is blurred.
*/
onBlur?: __React.FocusEventHandler;
onBlur?: Function;
/**
* Callback called when the checkbox value is changed.
*/
onChange?: __React.MouseEventHandler;
onChange?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/chip/index.d.ts
Expand Up @@ -40,7 +40,7 @@ interface ChipProps extends __ReactToolbox.Props {
/**
* Callback to be invoked when the delete icon is clicked.
*/
onDeleteClick?: __React.MouseEventHandler;
onDeleteClick?: Function;
/**
* Classnames object defining the component style.
*/
Expand Down

0 comments on commit f518bc0

Please sign in to comment.