mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Update MaterializeCSS to include Component
This commit is contained in:
Vendored
+104
-13
@@ -1,9 +1,10 @@
|
||||
// Type definitions for materialize-css
|
||||
// Type definitions for materialize-css v0.97.5
|
||||
// Project: http://materializecss.com/
|
||||
// Definitions by: Erik Lieben <https://github.com/eriklieben>
|
||||
// Definitions by: Erik Lieben <https://github.com/eriklieben>, Leon Yu <https://github.com/leonyu>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="../pickadate/pickadate.d.ts" />
|
||||
|
||||
declare module Materialize {
|
||||
|
||||
@@ -102,6 +103,41 @@ declare module Materialize {
|
||||
interval?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The carousel options
|
||||
*/
|
||||
interface CarouselOptions {
|
||||
/**
|
||||
* Transition time.
|
||||
* Default: 200
|
||||
*/
|
||||
time_constant?: number;
|
||||
|
||||
/**
|
||||
* Perspective zoom. If 0, all items are the same size.
|
||||
* Default: -100
|
||||
*/
|
||||
dist?: number;
|
||||
|
||||
/**
|
||||
* Set the duration of the transition animation in ms.
|
||||
* Default: 500
|
||||
*/
|
||||
shift?: number;
|
||||
|
||||
/**
|
||||
* Set the duration between transitions in ms.
|
||||
* Default: 6000
|
||||
*/
|
||||
padding?: number;
|
||||
|
||||
/**
|
||||
* Set the duration between transitions in ms.
|
||||
* Default: 6000
|
||||
*/
|
||||
full_width?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The lean modal options
|
||||
*/
|
||||
@@ -261,7 +297,7 @@ declare module Materialize {
|
||||
* @name className The className to use to format the message to display
|
||||
* @name completeCallback Callback function to call when the messages completes/hides.
|
||||
*/
|
||||
toast(message:string, displayLength:number, className?:string, completeCallback?:Function): void;
|
||||
toast(message:string|JQuery, displayLength:number, className?:string, completeCallback?:Function): void;
|
||||
|
||||
/**
|
||||
* Fires an event when the page is scrolled to a certain area
|
||||
@@ -289,6 +325,34 @@ declare module Materialize {
|
||||
declare var Materialize : Materialize.Materialize;
|
||||
|
||||
interface JQuery {
|
||||
|
||||
/**
|
||||
* open Fixed Action Button
|
||||
*/
|
||||
openFAB(): void;
|
||||
/**
|
||||
* close Fixed Action Button
|
||||
*/
|
||||
closeFAB(): void;
|
||||
|
||||
/**
|
||||
* Select allows user input through specified options.
|
||||
* Initialization
|
||||
*/
|
||||
material_select(): void;
|
||||
|
||||
/**
|
||||
* Select allows user input through specified options.
|
||||
* Updating/Destroying Select
|
||||
*
|
||||
* @name method "destroy" destroy the material select
|
||||
*/
|
||||
material_select(method: string): void;
|
||||
|
||||
/**
|
||||
* Use a character counter in fields where a character restriction is in place.
|
||||
*/
|
||||
characterCounter(): JQuery;
|
||||
|
||||
/**
|
||||
* Collapsibles are accordion elements that expand when clicked on.
|
||||
@@ -296,7 +360,7 @@ interface JQuery {
|
||||
*
|
||||
* @name options the collapsible options
|
||||
*/
|
||||
collapsible(options?: Materialize.CollapsibleOptions): void;
|
||||
collapsible(options?: Materialize.CollapsibleOptions): JQuery;
|
||||
|
||||
/**
|
||||
* Tooltips are small, interactive, textual hints for mainly graphical elements.
|
||||
@@ -304,7 +368,7 @@ interface JQuery {
|
||||
*
|
||||
* @name options the tooltip options or the string "remove" to remove the tooltip function
|
||||
*/
|
||||
tooltip(options?: Materialize.TooltipOptions|string): void;
|
||||
tooltip(options?: Materialize.TooltipOptions|string): JQuery;
|
||||
|
||||
/**
|
||||
* Add a dropdown list to any button.
|
||||
@@ -317,23 +381,50 @@ interface JQuery {
|
||||
/**
|
||||
* Material box is a material design implementation of the Lightbox plugin.
|
||||
*/
|
||||
materialbox(): void;
|
||||
materialbox(): JQuery;
|
||||
|
||||
/**
|
||||
* slider is a simple and elegant image carousel.
|
||||
* You can also have captions that will be transitioned on their own depending on their alignment.
|
||||
* You can also have indicators that show up on the bottom of the slider.
|
||||
*
|
||||
* @name options the slider options
|
||||
*/
|
||||
slider(options?: Materialize.SliderOptions): JQuery;
|
||||
|
||||
/**
|
||||
* slider is a simple and elegant image carousel.
|
||||
* You can also have captions that will be transitioned on their own depending on their alignment.
|
||||
* You can also have indicators that show up on the bottom of the slider.
|
||||
*
|
||||
* @name method the string "start" to start the animation or "pauze" to pauze the animation
|
||||
*/
|
||||
slider(method: string): JQuery;
|
||||
|
||||
/**
|
||||
* Our slider is a simple and elegant image carousel.
|
||||
* You can also have captions that will be transitioned on their own depending on their alignment.
|
||||
* You can also have indicators that show up on the bottom of the slider.
|
||||
*
|
||||
* @name options the slider options or the string "start" to start the animation or "pauze" to pauze the animation
|
||||
*/
|
||||
slider(options?: Materialize.SliderOptions|string): void;
|
||||
carousel(options?: Materialize.CarouselOptions): JQuery;
|
||||
|
||||
/**
|
||||
* Our slider is a simple and elegant image carousel.
|
||||
* You can also have captions that will be transitioned on their own depending on their alignment.
|
||||
* You can also have indicators that show up on the bottom of the slider.
|
||||
*
|
||||
* @name method the methods to pause, start, move to next and move to previous slide.
|
||||
*/
|
||||
carousel(method: string, count: [number]): JQuery;
|
||||
|
||||
/**
|
||||
* Modal for dialog boxes, confirmation messages, or other content that can be called up.
|
||||
*
|
||||
* @name options the lean modal options
|
||||
*/
|
||||
leanModal(options?: Materialize.LeanModalOptions): void;
|
||||
leanModal(options?: Materialize.LeanModalOptions): JQuery;
|
||||
|
||||
/**
|
||||
* Open a modal programatically
|
||||
@@ -348,21 +439,21 @@ interface JQuery {
|
||||
/**
|
||||
* Parallax is an effect where the background content or image in this case, is moved at a different speed than the foreground content while scrolling.
|
||||
*/
|
||||
parallax(): void;
|
||||
parallax(): JQuery;
|
||||
|
||||
/**
|
||||
* Pushpin is a fixed positioning plugin.
|
||||
*
|
||||
* @name options the push pin options
|
||||
*/
|
||||
pushpin(options?: Materialize.PushpinOptions): void;
|
||||
pushpin(options?: Materialize.PushpinOptions): JQuery;
|
||||
|
||||
/**
|
||||
* Scrollspy is a jQuery plugin that tracks certain elements and which element the user's screen is currently centered on.
|
||||
*
|
||||
* @name options the scroll spy options
|
||||
*/
|
||||
scrollSpy(options?: Materialize.ScrollSpyOptions): void;
|
||||
scrollSpy(options?: Materialize.ScrollSpyOptions): JQuery;
|
||||
|
||||
/**
|
||||
* A slide out menu. You can add a dropdown to your sidebar by using our collapsible component.
|
||||
@@ -376,5 +467,5 @@ interface JQuery {
|
||||
*
|
||||
* @name method, the method to call (always "select_tab") and a param containing the id of the tab to open
|
||||
*/
|
||||
tabs(method?:string, tab?:string): void;
|
||||
}
|
||||
tabs(method?:string, tab?:string): JQuery;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user