This repository was archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathpaper-menu-button.d.ts
More file actions
178 lines (156 loc) · 5.71 KB
/
Copy pathpaper-menu-button.d.ts
File metadata and controls
178 lines (156 loc) · 5.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/**
* 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):
* paper-menu-button.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.d.ts" />
/// <reference path="../iron-behaviors/iron-control-state.d.ts" />
/// <reference path="../iron-dropdown/iron-dropdown.d.ts" />
/// <reference path="../paper-styles/default-theme.d.ts" />
/// <reference path="../paper-styles/shadow.d.ts" />
/**
* Material design: [Dropdown buttons](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
*
* `paper-menu-button` allows one to compose a designated "trigger" element with
* another element that represents "content", to create a dropdown menu that
* displays the "content" when the "trigger" is clicked.
*
* The child element assigned to the `dropdown-trigger` slot will be used as the
* "trigger" element. The child element assigned to the `dropdown-content` slot will be
* used as the "content" element.
*
* The `paper-menu-button` is sensitive to its content's `iron-select` events. If
* the "content" element triggers an `iron-select` event, the `paper-menu-button`
* will close automatically.
*
* Example:
*
* <paper-menu-button>
* <paper-icon-button icon="menu" slot="dropdown-trigger"></paper-icon-button>
* <paper-listbox slot="dropdown-content">
* <paper-item>Share</paper-item>
* <paper-item>Settings</paper-item>
* <paper-item>Help</paper-item>
* </paper-listbox>
* </paper-menu-button>
*
* ### Styling
*
* The following custom properties and mixins are also available for styling:
*
* Custom property | Description | Default
* ----------------|-------------|----------
* `--paper-menu-button-dropdown-background` | Background color of the paper-menu-button dropdown | `--primary-background-color`
* `--paper-menu-button` | Mixin applied to the paper-menu-button | `{}`
* `--paper-menu-button-disabled` | Mixin applied to the paper-menu-button when disabled | `{}`
* `--paper-menu-button-dropdown` | Mixin applied to the paper-menu-button dropdown | `{}`
* `--paper-menu-button-content` | Mixin applied to the paper-menu-button content | `{}`
*/
declare class PaperMenuButton extends Polymer.Element {
/**
* True if the content is currently displayed.
*/
opened: boolean|null|undefined;
/**
* The orientation against which to align the menu dropdown
* horizontally relative to the dropdown trigger.
*/
horizontalAlign: string|null|undefined;
/**
* The orientation against which to align the menu dropdown
* vertically relative to the dropdown trigger.
*/
verticalAlign: string|null|undefined;
/**
* If true, the `horizontalAlign` and `verticalAlign` properties will
* be considered preferences instead of strict requirements when
* positioning the dropdown and may be changed if doing so reduces
* the area of the dropdown falling outside of `fitInto`.
*/
dynamicAlign: boolean|null|undefined;
/**
* A pixel value that will be added to the position calculated for the
* given `horizontalAlign`. Use a negative value to offset to the
* left, or a positive value to offset to the right.
*/
horizontalOffset: number|null|undefined;
/**
* A pixel value that will be added to the position calculated for the
* given `verticalAlign`. Use a negative value to offset towards the
* top, or a positive value to offset towards the bottom.
*/
verticalOffset: number|null|undefined;
/**
* If true, the dropdown will be positioned so that it doesn't overlap
* the button.
*/
noOverlap: boolean|null|undefined;
/**
* Set to true to disable animations when opening and closing the
* dropdown.
*/
noAnimations: boolean|null|undefined;
/**
* Set to true to disable automatically closing the dropdown after
* a selection has been made.
*/
ignoreSelect: boolean|null|undefined;
/**
* Set to true to enable automatically closing the dropdown after an
* item has been activated, even if the selection did not change.
*/
closeOnActivate: boolean|null|undefined;
/**
* Deprecated, setting it won't have effects on the animation.
* `iron-dropdown` doesn't depend anymore on `neon-animation`, and this property is kept
* here to not break bindings.
*/
openAnimationConfig: object|null|undefined;
/**
* Deprecated, setting it won't have effects on the animation.
* `iron-dropdown` doesn't depend anymore on `neon-animation`, and this property is kept
* here to not break bindings.
*/
closeAnimationConfig: object|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.
*/
allowOutsideScroll: boolean|null|undefined;
/**
* Whether focus should be restored to the button when the menu closes.
*/
restoreFocusOnClose: boolean|null|undefined;
hostAttributes: object|null;
/**
* The content element that is contained by the menu button, if any.
*
*/
readonly contentElement: any;
ready(): void;
/**
* Toggles the drowpdown content between opened and closed.
*/
toggle(): void;
/**
* Make the dropdown content appear as an overlay positioned relative
* to the dropdown trigger.
*/
open(): void;
/**
* Hide the dropdown content.
*/
close(): void;
}
interface PaperMenuButton extends Polymer.IronA11yKeysBehavior, Polymer.IronControlState {
}
interface HTMLElementTagNameMap {
"paper-menu-button": PaperMenuButton;
}