@fluentui/web-components 3.0.0-beta.82 → 3.0.0-beta.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -2
- package/dist/dts/accordion-item/accordion-item.base.d.ts +71 -0
- package/dist/dts/accordion-item/accordion-item.d.ts +1 -71
- package/dist/dts/accordion-item/index.d.ts +2 -1
- package/dist/dts/anchor-button/anchor-button.base.d.ts +144 -0
- package/dist/dts/anchor-button/anchor-button.d.ts +2 -144
- package/dist/dts/anchor-button/index.d.ts +2 -1
- package/dist/dts/avatar/avatar.base.d.ts +42 -0
- package/dist/dts/avatar/avatar.d.ts +2 -42
- package/dist/dts/avatar/index.d.ts +2 -1
- package/dist/dts/button/button.base.d.ts +242 -0
- package/dist/dts/button/button.d.ts +2 -242
- package/dist/dts/button/index.d.ts +2 -1
- package/dist/dts/checkbox/checkbox.base.d.ts +288 -0
- package/dist/dts/checkbox/checkbox.d.ts +1 -288
- package/dist/dts/checkbox/index.d.ts +2 -1
- package/dist/dts/divider/divider.base.d.ts +49 -0
- package/dist/dts/divider/divider.d.ts +2 -49
- package/dist/dts/divider/index.d.ts +2 -1
- package/dist/dts/dropdown/dropdown.base.d.ts +418 -0
- package/dist/dts/dropdown/dropdown.d.ts +2 -418
- package/dist/dts/dropdown/dropdown.options.d.ts +1 -1
- package/dist/dts/dropdown/dropdown.template.d.ts +1 -1
- package/dist/dts/dropdown/index.d.ts +2 -1
- package/dist/dts/field/field.base.d.ts +120 -0
- package/dist/dts/field/field.d.ts +2 -120
- package/dist/dts/field/index.d.ts +2 -1
- package/dist/dts/link/link.d.ts +1 -1
- package/dist/dts/listbox/listbox.d.ts +1 -1
- package/dist/dts/progress-bar/index.d.ts +2 -1
- package/dist/dts/progress-bar/progress-bar.base.d.ts +73 -0
- package/dist/dts/progress-bar/progress-bar.d.ts +2 -73
- package/dist/dts/radio/radio.d.ts +1 -1
- package/dist/dts/rating-display/index.d.ts +2 -1
- package/dist/dts/rating-display/rating-display.base.d.ts +89 -0
- package/dist/dts/rating-display/rating-display.d.ts +1 -89
- package/dist/dts/spinner/index.d.ts +2 -1
- package/dist/dts/spinner/spinner.base.d.ts +14 -0
- package/dist/dts/spinner/spinner.d.ts +1 -14
- package/dist/dts/switch/switch.d.ts +1 -1
- package/dist/dts/tablist/index.d.ts +2 -1
- package/dist/dts/tablist/tablist.base.d.ts +95 -0
- package/dist/dts/tablist/tablist.d.ts +2 -94
- package/dist/dts/tabs/tabs.base.d.ts +90 -0
- package/dist/dts/tabs/tabs.d.ts +2 -90
- package/dist/dts/text-input/index.d.ts +2 -1
- package/dist/dts/text-input/text-input.base.d.ts +393 -0
- package/dist/dts/text-input/text-input.d.ts +2 -393
- package/dist/dts/textarea/index.d.ts +2 -1
- package/dist/dts/textarea/textarea.base.d.ts +347 -0
- package/dist/dts/textarea/textarea.d.ts +2 -347
- package/dist/esm/accordion/accordion.js +1 -1
- package/dist/esm/accordion/accordion.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.base.js +94 -0
- package/dist/esm/accordion-item/accordion-item.base.js.map +1 -0
- package/dist/esm/accordion-item/accordion-item.js +2 -91
- package/dist/esm/accordion-item/accordion-item.js.map +1 -1
- package/dist/esm/accordion-item/index.js +2 -1
- package/dist/esm/accordion-item/index.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.base.js +147 -0
- package/dist/esm/anchor-button/anchor-button.base.js.map +1 -0
- package/dist/esm/anchor-button/anchor-button.js +3 -145
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/anchor-button/index.js +2 -1
- package/dist/esm/anchor-button/index.js.map +1 -1
- package/dist/esm/avatar/avatar.base.js +28 -0
- package/dist/esm/avatar/avatar.base.js.map +1 -0
- package/dist/esm/avatar/avatar.js +2 -26
- package/dist/esm/avatar/avatar.js.map +1 -1
- package/dist/esm/avatar/index.js +2 -1
- package/dist/esm/avatar/index.js.map +1 -1
- package/dist/esm/button/button.base.js +283 -0
- package/dist/esm/button/button.base.js.map +1 -0
- package/dist/esm/button/button.js +3 -281
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.styles.js +2 -1
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/button/index.js +2 -1
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/checkbox/checkbox.base.js +366 -0
- package/dist/esm/checkbox/checkbox.base.js.map +1 -0
- package/dist/esm/checkbox/checkbox.js +2 -363
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/checkbox/index.js +2 -1
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/divider/divider.base.js +61 -0
- package/dist/esm/divider/divider.base.js.map +1 -0
- package/dist/esm/divider/divider.js +3 -58
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/divider/index.js +2 -1
- package/dist/esm/divider/index.js.map +1 -1
- package/dist/esm/dropdown/dropdown.base.js +677 -0
- package/dist/esm/dropdown/dropdown.base.js.map +1 -0
- package/dist/esm/dropdown/dropdown.js +3 -674
- package/dist/esm/dropdown/dropdown.js.map +1 -1
- package/dist/esm/dropdown/index.js +2 -1
- package/dist/esm/dropdown/index.js.map +1 -1
- package/dist/esm/field/field.base.js +189 -0
- package/dist/esm/field/field.base.js.map +1 -0
- package/dist/esm/field/field.js +3 -187
- package/dist/esm/field/field.js.map +1 -1
- package/dist/esm/field/index.js +2 -1
- package/dist/esm/field/index.js.map +1 -1
- package/dist/esm/link/link.js +1 -1
- package/dist/esm/link/link.js.map +1 -1
- package/dist/esm/progress-bar/index.js +2 -1
- package/dist/esm/progress-bar/index.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.base.js +90 -0
- package/dist/esm/progress-bar/progress-bar.base.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.js +3 -87
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/radio/radio.js +1 -1
- package/dist/esm/radio/radio.js.map +1 -1
- package/dist/esm/rating-display/index.js +2 -1
- package/dist/esm/rating-display/index.js.map +1 -1
- package/dist/esm/rating-display/rating-display.base.js +94 -0
- package/dist/esm/rating-display/rating-display.base.js.map +1 -0
- package/dist/esm/rating-display/rating-display.js +2 -92
- package/dist/esm/rating-display/rating-display.js.map +1 -1
- package/dist/esm/spinner/index.js +2 -1
- package/dist/esm/spinner/index.js.map +1 -1
- package/dist/esm/spinner/spinner.base.js +18 -0
- package/dist/esm/spinner/spinner.base.js.map +1 -0
- package/dist/esm/spinner/spinner.js +2 -17
- package/dist/esm/spinner/spinner.js.map +1 -1
- package/dist/esm/switch/switch.js +1 -1
- package/dist/esm/switch/switch.js.map +1 -1
- package/dist/esm/tablist/index.js +2 -1
- package/dist/esm/tablist/index.js.map +1 -1
- package/dist/esm/tablist/tablist.base.js +248 -0
- package/dist/esm/tablist/tablist.base.js.map +1 -0
- package/dist/esm/tablist/tablist.js +3 -221
- package/dist/esm/tablist/tablist.js.map +1 -1
- package/dist/esm/tabs/tabs.base.js +279 -0
- package/dist/esm/tabs/tabs.base.js.map +1 -0
- package/dist/esm/tabs/tabs.js +2 -276
- package/dist/esm/tabs/tabs.js.map +1 -1
- package/dist/esm/text-input/index.js +2 -1
- package/dist/esm/text-input/index.js.map +1 -1
- package/dist/esm/text-input/text-input.base.js +409 -0
- package/dist/esm/text-input/text-input.base.js.map +1 -0
- package/dist/esm/text-input/text-input.js +3 -407
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/textarea/index.js +2 -1
- package/dist/esm/textarea/index.js.map +1 -1
- package/dist/esm/textarea/textarea.base.js +494 -0
- package/dist/esm/textarea/textarea.base.js.map +1 -0
- package/dist/esm/textarea/textarea.js +3 -491
- package/dist/esm/textarea/textarea.js.map +1 -1
- package/dist/web-components.d.ts +1 -0
- package/dist/web-components.js +707 -556
- package/dist/web-components.min.js +265 -265
- package/package.json +5 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { ButtonFormTarget, ButtonType } from './button.options.js';
|
|
3
|
+
/**
|
|
4
|
+
* A Button Custom HTML Element.
|
|
5
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
6
|
+
*
|
|
7
|
+
* @slot start - Content which can be provided before the button content
|
|
8
|
+
* @slot end - Content which can be provided after the button content
|
|
9
|
+
* @slot - The default slot for button content
|
|
10
|
+
* @csspart content - The button content container
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare class BaseButton extends FASTElement {
|
|
15
|
+
/**
|
|
16
|
+
* Indicates the button should be focused when the page is loaded.
|
|
17
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
* @remarks
|
|
21
|
+
* HTML Attribute: `autofocus`
|
|
22
|
+
*/
|
|
23
|
+
autofocus: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Default slotted content.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
defaultSlottedContent: HTMLElement[];
|
|
30
|
+
/**
|
|
31
|
+
* Sets the element's disabled state.
|
|
32
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
* @remarks
|
|
36
|
+
* HTML Attribute: `disabled`
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Indicates that the button is focusable while disabled.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
* @remarks
|
|
44
|
+
* HTML Attribute: `disabled-focusable`
|
|
45
|
+
*/
|
|
46
|
+
disabledFocusable: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Sets that the button tabindex attribute
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
* @remarks
|
|
52
|
+
* HTML Attribute: `tabindex`
|
|
53
|
+
*/
|
|
54
|
+
tabIndex: number;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
57
|
+
*
|
|
58
|
+
* @param previous - the previous disabledFocusable value
|
|
59
|
+
* @param next - the current disabledFocusable value
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
disabledFocusableChanged(previous: boolean, next: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
elementInternals: ElementInternals;
|
|
69
|
+
/**
|
|
70
|
+
* The associated form element.
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
get form(): HTMLFormElement | null;
|
|
75
|
+
/**
|
|
76
|
+
* The URL that processes the form submission.
|
|
77
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
* @remarks
|
|
81
|
+
* HTML Attribute: `formaction`
|
|
82
|
+
*/
|
|
83
|
+
formAction?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The form-associated flag.
|
|
86
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
static readonly formAssociated = true;
|
|
91
|
+
/**
|
|
92
|
+
* The id of a form to associate the element to.
|
|
93
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
|
|
94
|
+
*
|
|
95
|
+
* @public
|
|
96
|
+
* @remarks
|
|
97
|
+
* HTML Attribute: `form`
|
|
98
|
+
*/
|
|
99
|
+
formAttribute?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The encoding type for the form submission.
|
|
102
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
* @remarks
|
|
106
|
+
* HTML Attribute: `formenctype`
|
|
107
|
+
*/
|
|
108
|
+
formEnctype?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The HTTP method that the browser uses to submit the form.
|
|
111
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
* @remarks
|
|
115
|
+
* HTML Attribute: `formmethod`
|
|
116
|
+
*/
|
|
117
|
+
formMethod?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Indicates that the form will not be validated when submitted.
|
|
120
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
|
|
121
|
+
*
|
|
122
|
+
* @public
|
|
123
|
+
* @remarks
|
|
124
|
+
* HTML Attribute: `formnovalidate`
|
|
125
|
+
*/
|
|
126
|
+
formNoValidate?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* The internal form submission fallback control.
|
|
129
|
+
*
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
private formSubmissionFallbackControl?;
|
|
133
|
+
/**
|
|
134
|
+
* The internal slot for the form submission fallback control.
|
|
135
|
+
*
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
private formSubmissionFallbackControlSlot?;
|
|
139
|
+
/**
|
|
140
|
+
* The target frame or window to open the form submission in.
|
|
141
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
|
|
142
|
+
*
|
|
143
|
+
* @public
|
|
144
|
+
* @remarks
|
|
145
|
+
* HTML Attribute: `formtarget`
|
|
146
|
+
*/
|
|
147
|
+
formTarget?: ButtonFormTarget;
|
|
148
|
+
/**
|
|
149
|
+
* A reference to all associated label elements.
|
|
150
|
+
*
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
get labels(): ReadonlyArray<Node>;
|
|
154
|
+
/**
|
|
155
|
+
* The name of the element. This element's value will be surfaced during form submission under the provided name.
|
|
156
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name | `name`} attribute
|
|
157
|
+
*
|
|
158
|
+
* @public
|
|
159
|
+
* @remarks
|
|
160
|
+
* HTML Attribute: `name`
|
|
161
|
+
*/
|
|
162
|
+
name?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The button type.
|
|
165
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
|
|
166
|
+
*
|
|
167
|
+
* @public
|
|
168
|
+
* @remarks
|
|
169
|
+
* HTML Attribute: `type`
|
|
170
|
+
*/
|
|
171
|
+
type: ButtonType;
|
|
172
|
+
/**
|
|
173
|
+
* Removes the form submission fallback control when the type changes.
|
|
174
|
+
*
|
|
175
|
+
* @param previous - the previous type value
|
|
176
|
+
* @param next - the new type value
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
typeChanged(previous: ButtonType, next: ButtonType): void;
|
|
180
|
+
/**
|
|
181
|
+
* The value attribute.
|
|
182
|
+
*
|
|
183
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
|
|
184
|
+
*
|
|
185
|
+
* @public
|
|
186
|
+
* @remarks
|
|
187
|
+
* HTML Attribute: `value`
|
|
188
|
+
*/
|
|
189
|
+
value?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Handles the button click event.
|
|
192
|
+
*
|
|
193
|
+
* @param e - The event object
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
clickHandler(e: Event): boolean | void;
|
|
197
|
+
connectedCallback(): void;
|
|
198
|
+
constructor();
|
|
199
|
+
/**
|
|
200
|
+
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
201
|
+
* properties. The submit button is then appended to the slot and the form is submitted.
|
|
202
|
+
*
|
|
203
|
+
* @internal
|
|
204
|
+
* @privateRemarks
|
|
205
|
+
* This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
|
|
206
|
+
*/
|
|
207
|
+
private createAndInsertFormSubmissionFallbackControl;
|
|
208
|
+
/**
|
|
209
|
+
* Invoked when a connected component's form or fieldset has its disabled state changed.
|
|
210
|
+
*
|
|
211
|
+
* @param disabled - the disabled value of the form / fieldset
|
|
212
|
+
*
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
formDisabledCallback(disabled: boolean): void;
|
|
216
|
+
/**
|
|
217
|
+
* Handles keypress events for the button.
|
|
218
|
+
*
|
|
219
|
+
* @param e - the keyboard event
|
|
220
|
+
* @returns - the return value of the click handler
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
224
|
+
/**
|
|
225
|
+
* Presses the button.
|
|
226
|
+
*
|
|
227
|
+
* @public
|
|
228
|
+
*/
|
|
229
|
+
protected press(): void;
|
|
230
|
+
/**
|
|
231
|
+
* Resets the associated form.
|
|
232
|
+
*
|
|
233
|
+
* @public
|
|
234
|
+
*/
|
|
235
|
+
resetForm(): void;
|
|
236
|
+
/**
|
|
237
|
+
* Submits the associated form.
|
|
238
|
+
*
|
|
239
|
+
* @internal
|
|
240
|
+
*/
|
|
241
|
+
private submitForm;
|
|
242
|
+
}
|
|
@@ -1,246 +1,6 @@
|
|
|
1
|
-
import { FASTElement } from '@microsoft/fast-element';
|
|
2
1
|
import { StartEnd } from '../patterns/index.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
* A Button Custom HTML Element.
|
|
6
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
7
|
-
*
|
|
8
|
-
* @slot start - Content which can be provided before the button content
|
|
9
|
-
* @slot end - Content which can be provided after the button content
|
|
10
|
-
* @slot - The default slot for button content
|
|
11
|
-
* @csspart content - The button content container
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare class BaseButton extends FASTElement {
|
|
16
|
-
/**
|
|
17
|
-
* Indicates the button should be focused when the page is loaded.
|
|
18
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
* @remarks
|
|
22
|
-
* HTML Attribute: `autofocus`
|
|
23
|
-
*/
|
|
24
|
-
autofocus: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Default slotted content.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
defaultSlottedContent: HTMLElement[];
|
|
31
|
-
/**
|
|
32
|
-
* Sets the element's disabled state.
|
|
33
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
|
|
34
|
-
*
|
|
35
|
-
* @public
|
|
36
|
-
* @remarks
|
|
37
|
-
* HTML Attribute: `disabled`
|
|
38
|
-
*/
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Indicates that the button is focusable while disabled.
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
* @remarks
|
|
45
|
-
* HTML Attribute: `disabled-focusable`
|
|
46
|
-
*/
|
|
47
|
-
disabledFocusable: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Sets that the button tabindex attribute
|
|
50
|
-
*
|
|
51
|
-
* @public
|
|
52
|
-
* @remarks
|
|
53
|
-
* HTML Attribute: `tabindex`
|
|
54
|
-
*/
|
|
55
|
-
tabIndex: number;
|
|
56
|
-
/**
|
|
57
|
-
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
58
|
-
*
|
|
59
|
-
* @param previous - the previous disabledFocusable value
|
|
60
|
-
* @param next - the current disabledFocusable value
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
disabledFocusableChanged(previous: boolean, next: boolean): void;
|
|
64
|
-
/**
|
|
65
|
-
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
66
|
-
*
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
elementInternals: ElementInternals;
|
|
70
|
-
/**
|
|
71
|
-
* The associated form element.
|
|
72
|
-
*
|
|
73
|
-
* @public
|
|
74
|
-
*/
|
|
75
|
-
get form(): HTMLFormElement | null;
|
|
76
|
-
/**
|
|
77
|
-
* The URL that processes the form submission.
|
|
78
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
|
|
79
|
-
*
|
|
80
|
-
* @public
|
|
81
|
-
* @remarks
|
|
82
|
-
* HTML Attribute: `formaction`
|
|
83
|
-
*/
|
|
84
|
-
formAction?: string;
|
|
85
|
-
/**
|
|
86
|
-
* The form-associated flag.
|
|
87
|
-
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
88
|
-
*
|
|
89
|
-
* @public
|
|
90
|
-
*/
|
|
91
|
-
static readonly formAssociated = true;
|
|
92
|
-
/**
|
|
93
|
-
* The id of a form to associate the element to.
|
|
94
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
|
|
95
|
-
*
|
|
96
|
-
* @public
|
|
97
|
-
* @remarks
|
|
98
|
-
* HTML Attribute: `form`
|
|
99
|
-
*/
|
|
100
|
-
formAttribute?: string;
|
|
101
|
-
/**
|
|
102
|
-
* The encoding type for the form submission.
|
|
103
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
|
|
104
|
-
*
|
|
105
|
-
* @public
|
|
106
|
-
* @remarks
|
|
107
|
-
* HTML Attribute: `formenctype`
|
|
108
|
-
*/
|
|
109
|
-
formEnctype?: string;
|
|
110
|
-
/**
|
|
111
|
-
* The HTTP method that the browser uses to submit the form.
|
|
112
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
|
|
113
|
-
*
|
|
114
|
-
* @public
|
|
115
|
-
* @remarks
|
|
116
|
-
* HTML Attribute: `formmethod`
|
|
117
|
-
*/
|
|
118
|
-
formMethod?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Indicates that the form will not be validated when submitted.
|
|
121
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
|
|
122
|
-
*
|
|
123
|
-
* @public
|
|
124
|
-
* @remarks
|
|
125
|
-
* HTML Attribute: `formnovalidate`
|
|
126
|
-
*/
|
|
127
|
-
formNoValidate?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* The internal form submission fallback control.
|
|
130
|
-
*
|
|
131
|
-
* @internal
|
|
132
|
-
*/
|
|
133
|
-
private formSubmissionFallbackControl?;
|
|
134
|
-
/**
|
|
135
|
-
* The internal slot for the form submission fallback control.
|
|
136
|
-
*
|
|
137
|
-
* @internal
|
|
138
|
-
*/
|
|
139
|
-
private formSubmissionFallbackControlSlot?;
|
|
140
|
-
/**
|
|
141
|
-
* The target frame or window to open the form submission in.
|
|
142
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
|
|
143
|
-
*
|
|
144
|
-
* @public
|
|
145
|
-
* @remarks
|
|
146
|
-
* HTML Attribute: `formtarget`
|
|
147
|
-
*/
|
|
148
|
-
formTarget?: ButtonFormTarget;
|
|
149
|
-
/**
|
|
150
|
-
* A reference to all associated label elements.
|
|
151
|
-
*
|
|
152
|
-
* @public
|
|
153
|
-
*/
|
|
154
|
-
get labels(): ReadonlyArray<Node>;
|
|
155
|
-
/**
|
|
156
|
-
* The name of the element. This element's value will be surfaced during form submission under the provided name.
|
|
157
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name | `name`} attribute
|
|
158
|
-
*
|
|
159
|
-
* @public
|
|
160
|
-
* @remarks
|
|
161
|
-
* HTML Attribute: `name`
|
|
162
|
-
*/
|
|
163
|
-
name?: string;
|
|
164
|
-
/**
|
|
165
|
-
* The button type.
|
|
166
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
|
|
167
|
-
*
|
|
168
|
-
* @public
|
|
169
|
-
* @remarks
|
|
170
|
-
* HTML Attribute: `type`
|
|
171
|
-
*/
|
|
172
|
-
type: ButtonType;
|
|
173
|
-
/**
|
|
174
|
-
* Removes the form submission fallback control when the type changes.
|
|
175
|
-
*
|
|
176
|
-
* @param previous - the previous type value
|
|
177
|
-
* @param next - the new type value
|
|
178
|
-
* @internal
|
|
179
|
-
*/
|
|
180
|
-
typeChanged(previous: ButtonType, next: ButtonType): void;
|
|
181
|
-
/**
|
|
182
|
-
* The value attribute.
|
|
183
|
-
*
|
|
184
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
|
|
185
|
-
*
|
|
186
|
-
* @public
|
|
187
|
-
* @remarks
|
|
188
|
-
* HTML Attribute: `value`
|
|
189
|
-
*/
|
|
190
|
-
value?: string;
|
|
191
|
-
/**
|
|
192
|
-
* Handles the button click event.
|
|
193
|
-
*
|
|
194
|
-
* @param e - The event object
|
|
195
|
-
* @internal
|
|
196
|
-
*/
|
|
197
|
-
clickHandler(e: Event): boolean | void;
|
|
198
|
-
connectedCallback(): void;
|
|
199
|
-
constructor();
|
|
200
|
-
/**
|
|
201
|
-
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
202
|
-
* properties. The submit button is then appended to the slot and the form is submitted.
|
|
203
|
-
*
|
|
204
|
-
* @internal
|
|
205
|
-
* @privateRemarks
|
|
206
|
-
* This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
|
|
207
|
-
*/
|
|
208
|
-
private createAndInsertFormSubmissionFallbackControl;
|
|
209
|
-
/**
|
|
210
|
-
* Invoked when a connected component's form or fieldset has its disabled state changed.
|
|
211
|
-
*
|
|
212
|
-
* @param disabled - the disabled value of the form / fieldset
|
|
213
|
-
*
|
|
214
|
-
* @internal
|
|
215
|
-
*/
|
|
216
|
-
formDisabledCallback(disabled: boolean): void;
|
|
217
|
-
/**
|
|
218
|
-
* Handles keypress events for the button.
|
|
219
|
-
*
|
|
220
|
-
* @param e - the keyboard event
|
|
221
|
-
* @returns - the return value of the click handler
|
|
222
|
-
* @public
|
|
223
|
-
*/
|
|
224
|
-
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
225
|
-
/**
|
|
226
|
-
* Presses the button.
|
|
227
|
-
*
|
|
228
|
-
* @public
|
|
229
|
-
*/
|
|
230
|
-
protected press(): void;
|
|
231
|
-
/**
|
|
232
|
-
* Resets the associated form.
|
|
233
|
-
*
|
|
234
|
-
* @public
|
|
235
|
-
*/
|
|
236
|
-
resetForm(): void;
|
|
237
|
-
/**
|
|
238
|
-
* Submits the associated form.
|
|
239
|
-
*
|
|
240
|
-
* @internal
|
|
241
|
-
*/
|
|
242
|
-
private submitForm;
|
|
243
|
-
}
|
|
2
|
+
import { BaseButton } from './button.base.js';
|
|
3
|
+
import { ButtonAppearance, ButtonShape, ButtonSize } from './button.options.js';
|
|
244
4
|
/**
|
|
245
5
|
* A Button Custom HTML Element.
|
|
246
6
|
* Based on BaseButton and includes style and layout specific attributes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { definition as ButtonDefinition } from './button.definition.js';
|
|
2
|
-
export { BaseButton
|
|
2
|
+
export { BaseButton } from './button.base.js';
|
|
3
|
+
export { Button } from './button.js';
|
|
3
4
|
export { ButtonAppearance, ButtonFormTarget, ButtonShape, ButtonSize, ButtonType } from './button.options.js';
|
|
4
5
|
export type { ButtonOptions } from './button.options.js';
|
|
5
6
|
export { styles as ButtonStyles } from './button.styles.js';
|