This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TypeScript declarations to iron-dropdown. (#150)
* Generate minimal package.json from bower.json * Update and/or configure type declarations. * Add manual declaration for deprecated IronDropdownScrollManager.
- Loading branch information
Showing
8 changed files
with
1,184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
bower_components* | ||
bower-*.json | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"addReferences": { | ||
"iron-dropdown-scroll-manager.d.ts": [ | ||
"iron-dropdown-scroll-manager-extra.d.ts" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare namespace Polymer { | ||
/** | ||
* IronDropdownScrollManager is deprecated, use IronScrollManager instead. | ||
*/ | ||
const IronDropdownScrollManager: typeof Polymer.IronScrollManager; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* DO NOT EDIT | ||
* | ||
* This file was automatically generated by | ||
* https://github.com/Polymer/gen-typescript-declarations | ||
* | ||
* To modify these typings, edit the source file(s): | ||
* iron-dropdown-scroll-manager.html | ||
*/ | ||
|
||
/// <reference path="../iron-overlay-behavior/iron-scroll-manager.d.ts" /> | ||
/// <reference path="iron-dropdown-scroll-manager-extra.d.ts" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/** | ||
* DO NOT EDIT | ||
* | ||
* This file was automatically generated by | ||
* https://github.com/Polymer/gen-typescript-declarations | ||
* | ||
* To modify these typings, edit the source file(s): | ||
* iron-dropdown.html | ||
*/ | ||
|
||
/// <reference path="../polymer/types/polymer.d.ts" /> | ||
/// <reference path="../iron-behaviors/iron-control-state.d.ts" /> | ||
/// <reference path="../iron-overlay-behavior/iron-overlay-behavior.d.ts" /> | ||
/// <reference path="../neon-animation/neon-animation-runner-behavior.d.ts" /> | ||
/// <reference path="iron-dropdown-scroll-manager.d.ts" /> | ||
|
||
/** | ||
* `<iron-dropdown>` is a generalized element that is useful when you have | ||
* hidden content (`dropdown-content`) that is revealed due to some change in | ||
* state that should cause it to do so. | ||
* | ||
* Note that this is a low-level element intended to be used as part of other | ||
* composite elements that cause dropdowns to be revealed. | ||
* | ||
* Examples of elements that might be implemented using an `iron-dropdown` | ||
* include comboboxes, menubuttons, selects. The list goes on. | ||
* | ||
* The `<iron-dropdown>` element exposes attributes that allow the position | ||
* of the `dropdown-content` relative to the `dropdown-trigger` to be | ||
* configured. | ||
* | ||
* <iron-dropdown horizontal-align="right" vertical-align="top"> | ||
* <div slot="dropdown-content">Hello!</div> | ||
* </iron-dropdown> | ||
* | ||
* In the above example, the `<div>` assigned to the `dropdown-content` slot will be | ||
* hidden until the dropdown element has `opened` set to true, or when the `open` | ||
* method is called on the element. | ||
*/ | ||
interface IronDropdownElement extends Polymer.Element, Polymer.IronControlState, Polymer.IronA11yKeysBehavior, Polymer.IronOverlayBehavior, Polymer.NeonAnimationRunnerBehavior { | ||
|
||
/** | ||
* The orientation against which to align the dropdown content | ||
* horizontally relative to the dropdown trigger. | ||
* Overridden from `Polymer.IronFitBehavior`. | ||
*/ | ||
horizontalAlign: string|null|undefined; | ||
|
||
/** | ||
* The orientation against which to align the dropdown content | ||
* vertically relative to the dropdown trigger. | ||
* Overridden from `Polymer.IronFitBehavior`. | ||
*/ | ||
verticalAlign: string|null|undefined; | ||
|
||
/** | ||
* An animation config. If provided, this will be used to animate the | ||
* opening of the dropdown. Pass an Array for multiple animations. | ||
* See `neon-animation` documentation for more animation configuration | ||
* details. | ||
*/ | ||
openAnimationConfig: object|null|undefined; | ||
|
||
/** | ||
* An animation config. If provided, this will be used to animate the | ||
* closing of the dropdown. Pass an Array for multiple animations. | ||
* See `neon-animation` documentation for more animation configuration | ||
* details. | ||
*/ | ||
closeAnimationConfig: object|null|undefined; | ||
|
||
/** | ||
* If provided, this will be the element that will be focused when | ||
* the dropdown opens. | ||
*/ | ||
focusTarget: object|null|undefined; | ||
|
||
/** | ||
* Set to true to disable animations when opening and closing the | ||
* dropdown. | ||
*/ | ||
noAnimations: boolean|null|undefined; | ||
|
||
/** | ||
* By default, the dropdown will constrain scrolling on the page | ||
* to itself when opened. | ||
* Set to true in order to prevent scroll from being constrained | ||
* to the dropdown when it opens. | ||
* This property is a shortcut to set `scrollAction` to lock or refit. | ||
* Prefer directly setting the `scrollAction` property. | ||
*/ | ||
allowOutsideScroll: boolean|null|undefined; | ||
|
||
/** | ||
* The element that is contained by the dropdown, if any. | ||
*/ | ||
containedElement: object|null; | ||
ready(): any; | ||
attached(): any; | ||
detached(): any; | ||
|
||
/** | ||
* Called when the value of `opened` changes. | ||
* Overridden from `IronOverlayBehavior` | ||
*/ | ||
_openedChanged(): any; | ||
|
||
/** | ||
* Overridden from `IronOverlayBehavior`. | ||
*/ | ||
_renderOpened(): any; | ||
|
||
/** | ||
* Overridden from `IronOverlayBehavior`. | ||
*/ | ||
_renderClosed(): any; | ||
|
||
/** | ||
* Apply focus to focusTarget or containedElement | ||
*/ | ||
_applyFocus(): any; | ||
|
||
/** | ||
* Called when animation finishes on the dropdown (when opening or | ||
* closing). Responsible for "completing" the process of opening or | ||
* closing the dropdown by positioning it or setting its display to | ||
* none. | ||
*/ | ||
_onNeonAnimationFinish(): any; | ||
|
||
/** | ||
* Constructs the final animation config from different properties used | ||
* to configure specific parts of the opening and closing animations. | ||
*/ | ||
_updateAnimationConfig(): any; | ||
|
||
/** | ||
* Updates the overlay position based on configured horizontal | ||
* and vertical alignment. | ||
*/ | ||
_updateOverlayPosition(): any; | ||
|
||
/** | ||
* Sets scrollAction according to the value of allowOutsideScroll. | ||
* Prefer setting directly scrollAction. | ||
*/ | ||
_allowOutsideScrollChanged(allowOutsideScroll: any): any; | ||
} | ||
|
||
interface HTMLElementTagNameMap { | ||
"iron-dropdown": IronDropdownElement; | ||
} |
Oops, something went wrong.