Added typings for iCheck v0.8

This commit is contained in:
qcz 2013-05-11 12:51:07 +02:00
parent 0a279c0e4b
commit 0e73e0ff68
2 changed files with 116 additions and 3 deletions

View File

@ -59,7 +59,7 @@ List of Definitions
* [Foundation](http://foundation.zurb.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [FPSMeter](http://darsa.in/fpsmeter/) (by [Aaron Lampros](https://github.com/alampros))
* [Gamepad](http://www.w3.org/TR/gamepad/) (by [Kon](http://phyzkit.net/))
* [glDatePicker](http://glad.github.com/glDatePicker/) (by [D<EFBFBD>niel Tar](https://github.com/qcz))
* [glDatePicker](http://glad.github.com/glDatePicker/) (by [Dániel Tar](https://github.com/qcz))
* [GreenSock Animation Platform (GSAP)](http://www.greensock.com/get-started-js/) (by [Robert S.](https://github.com/codeBelt))
* [Google App Engine Channel API](https://developers.google.com/appengine/docs/java/channel/javascript) (by [vvakame](https://github.com/vvakame))
* [GoogleMaps](https://developers.google.com/maps/) (by [Esben Nepper](https://github.com/eNepper))
@ -70,11 +70,12 @@ List of Definitions
* [History.js](https://github.com/balupton/History.js/) (by [Boris Yankov](https://github.com/borisyankov))
* [Humane.js](http://wavded.github.com/humane-js/) (by [John Vrbanac](https://github.com/jmvrbanac))
* [i18next](http://i18next.com/) (by [Maarten Docter](https://github.com/mdocter))
* [iCheck](http://damirfoy.com/iCheck/) (by [Dániel Tar](https://github.com/qcz))
* [Impress.js](https://github.com/bartaz/impress.js) (by [Boris Yankov](https://github.com/borisyankov))
* [iScroll](http://cubiq.org/iscroll-4) (by [Boris Yankov](https://github.com/borisyankov))
* [jake](https://github.com/mde/jake) (by [Kon](http://phyzkit.net/))
* [Jasmine](http://pivotal.github.com/jasmine/) (by [Boris Yankov](https://github.com/borisyankov))
* [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) (by [D<EFBFBD>niel Tar](https://github.com/qcz))
* [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) (by [Dániel Tar](https://github.com/qcz))
* [jQuery](http://jquery.com/) (from TypeScript samples)
* [jQuery Mobile](http://jquerymobile.com) (by [Boris Yankov](https://github.com/borisyankov))
* [jQuery UI](http://jqueryui.com/) (by [Boris Yankov](https://github.com/borisyankov))
@ -116,7 +117,7 @@ List of Definitions
* [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr))
* [Modernizr](http://modernizr.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [Moment.js](https://github.com/timrwood/moment) (by [Michael Lakerveld](https://github.com/Lakerfield))
* [Mousetrap](http://craig.is/killing/mice) (by [D<EFBFBD>niel Tar](https://github.com/qcz))
* [Mousetrap](http://craig.is/killing/mice) (by [Dániel Tar](https://github.com/qcz))
* [Mustache.js](https://github.com/janl/mustache.js) (by [Boris Yankov](https://github.com/borisyankov))
* [Node.js](http://nodejs.org/) (from TypeScript samples)
* [node_redis](https://github.com/mranney/node_redis) (by [Boris Yankov](https://github.com/borisyankov))

112
icheck/icheck.d.ts vendored Normal file
View File

@ -0,0 +1,112 @@
// Type definitions for iCheck v0.8
// Project: http://damirfoy.com/iCheck/
// Definitions by: Dániel Tar https://github.com/qcz
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare interface ICheckOptions {
/**
* 'checkbox' or 'radio' to style only checkboxes or radio buttons, both by default
*/
handle?: string;
/**
* Base class added to customized checkboxes
*/
checkboxClass?: string;
/**
* Base class added to customized radio buttons
*/
radioClass?: string;
/**
* Class added on checked state (input.checked = true)
*/
checkedClass?: string;
/**
* If not empty, used instead of 'checkedClass' option (checkbox input specific)
*/
checkedCheckboxClass?: string;
/**
* If not empty, used instead of 'checkedClass' option (radio button input specific)
*/
checkedRadioClass?: string;
/**
* If not empty, added as class name on unchecked state (input.checked = false)
*/
uncheckedClass?: string;
/**
* If not empty, used instead of 'uncheckedClass' option (checkbox input specific)
*/
uncheckedCheckboxClass?: string;
/**
* If not empty, used instead of 'uncheckedClass' option (radio button input specific)
*/
uncheckedRadioClass?: string;
/**
* Class added on disabled state (input.disabled = true)
*/
disabledClass?: string;
/**
* If not empty, used instead of 'disabledClass' option (checkbox input specific)
*/
disabledCheckboxClass?: string;
/**
* If not empty, used instead of 'disabledClass' option (radio button input specific)
*/
disabledRadioClass?: string;
/**
* If not empty, added as class name on enabled state (input.disabled = false)
*/
enabledClass?: string;
/**
* If not empty, used instead of 'enabledClass' option (checkbox input specific)
*/
enabledCheckboxClass?: string;
/**
* If not empty, used instead of 'enabledClass' option (radio button input specific)
*/
enabledRadioClass?: string;
/**
* Class added on hover state (pointer is moved onto an input)
*/
hoverClass?: string;
/**
* Class added on focus state (input has gained focus)
*/
focusClass?: string;
/**
* Class added on active state (mouse button is pressed on an input)
*/
activeClass?: string;
/**
* Adds hoverClass to customized input on label hover and labelHoverClass to label on input hover
*/
labelHover?: bool;
/**
* Class added to label if labelHover set to true
*/
labelHoverClass?: string;
/**
* Increase clickable area by given % (negative number to decrease)
*/
increaseArea?: string;
/**
* True to set 'pointer' CSS cursor over enabled inputs and 'default' over disabled
*/
cursor?: bool;
/**
* Set true to inherit original input's class name
*/
inheritClass?: bool;
/**
* If set to true, input's id is prefixed with 'iCheck-' and attached
*/
inheritID?: bool;
/**
* Add HTML code or text inside customized input
*/
insert?: string;
}
declare interface JQuery {
iCheck(options?: ICheckOptions): JQuery;
iCheck(command: string): void;
}