@fluentui/web-components 3.0.0-beta.11 → 3.0.0-beta.13
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/button/button.d.ts +173 -90
- package/dist/dts/button/button.definition.d.ts +3 -1
- package/dist/dts/button/button.options.d.ts +16 -1
- package/dist/dts/button/button.styles.d.ts +5 -0
- package/dist/dts/button/button.template.d.ts +7 -1
- package/dist/dts/form-associated/form-associated.d.ts +0 -74
- package/dist/dts/toggle-button/toggle-button.d.ts +29 -26
- package/dist/dts/toggle-button/toggle-button.styles.d.ts +7 -0
- package/dist/esm/anchor-button/anchor-button.styles.js +254 -3
- package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -1
- package/dist/esm/button/button.definition.js +3 -4
- package/dist/esm/button/button.definition.js.map +1 -1
- package/dist/esm/button/button.js +233 -126
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.options.js +10 -0
- package/dist/esm/button/button.options.js.map +1 -1
- package/dist/esm/button/button.styles.js +52 -54
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/button/button.template.js +13 -39
- package/dist/esm/button/button.template.js.map +1 -1
- package/dist/esm/compound-button/compound-button.definition.js +0 -3
- package/dist/esm/compound-button/compound-button.definition.js.map +1 -1
- package/dist/esm/compound-button/compound-button.styles.js +7 -7
- package/dist/esm/compound-button/compound-button.template.js +3 -39
- package/dist/esm/compound-button/compound-button.template.js.map +1 -1
- package/dist/esm/form-associated/form-associated.js.map +1 -1
- package/dist/esm/menu-button/menu-button.definition.js +0 -3
- package/dist/esm/menu-button/menu-button.definition.js.map +1 -1
- package/dist/esm/menu-button/menu-button.template.js +5 -1
- package/dist/esm/menu-button/menu-button.template.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.definition.js +0 -3
- package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.js +42 -85
- package/dist/esm/toggle-button/toggle-button.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.styles.js +31 -26
- package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/fluent-web-components.api.json +342 -673
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/main.e73a6496.iframe.bundle.js +2 -0
- package/dist/storybook/project.json +1 -1
- package/dist/web-components.d.ts +250 -223
- package/dist/web-components.js +236 -229
- package/dist/web-components.min.js +51 -50
- package/docs/api-report.md +63 -79
- package/package.json +3 -2
- package/playwright.config.ts +2 -3
- package/dist/dts/button/button.form-associated.d.ts +0 -14
- package/dist/esm/button/button.form-associated.js +0 -14
- package/dist/esm/button/button.form-associated.js.map +0 -1
- package/dist/storybook/main.81e47c59.iframe.bundle.js +0 -2
- /package/dist/storybook/{main.81e47c59.iframe.bundle.js.LICENSE.txt → main.e73a6496.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -4,166 +4,290 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { attr, observable } from '@microsoft/fast-element';
|
|
8
|
-
import {
|
|
7
|
+
import { attr, FASTElement, observable } from '@microsoft/fast-element';
|
|
8
|
+
import { keyEnter, keySpace } from '@microsoft/fast-web-utilities';
|
|
9
|
+
import { StartEnd } from '../patterns/index.js';
|
|
9
10
|
import { applyMixins } from '../utils/apply-mixins.js';
|
|
10
|
-
import { FormAssociatedButton } from './button.form-associated.js';
|
|
11
11
|
import { ButtonType } from './button.options.js';
|
|
12
12
|
/**
|
|
13
13
|
* A Button Custom HTML Element.
|
|
14
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button |
|
|
14
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
15
15
|
*
|
|
16
16
|
* @slot start - Content which can be provided before the button content
|
|
17
17
|
* @slot end - Content which can be provided after the button content
|
|
18
18
|
* @slot - The default slot for button content
|
|
19
|
-
* @csspart
|
|
20
|
-
* @csspart content - The element wrapping button content
|
|
19
|
+
* @csspart content - The button content container
|
|
21
20
|
*
|
|
22
21
|
* @public
|
|
23
22
|
*/
|
|
24
|
-
export class Button extends
|
|
23
|
+
export class Button extends FASTElement {
|
|
25
24
|
constructor() {
|
|
26
|
-
super(
|
|
25
|
+
super();
|
|
27
26
|
/**
|
|
28
|
-
*
|
|
27
|
+
* Indicates that the button is focusable while disabled.
|
|
29
28
|
*
|
|
30
29
|
* @public
|
|
31
30
|
* @remarks
|
|
32
|
-
* HTML Attribute:
|
|
33
|
-
*/
|
|
34
|
-
this.iconOnly = false;
|
|
35
|
-
/**
|
|
36
|
-
* The button is disabled but focusable
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
* @remarks
|
|
40
|
-
* HTML Attribute: disabled-focusable
|
|
31
|
+
* HTML Attribute: `disabled-focusable`
|
|
41
32
|
*/
|
|
42
33
|
this.disabledFocusable = false;
|
|
43
34
|
/**
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (e && this.disabledFocusable) {
|
|
48
|
-
e.stopImmediatePropagation();
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Submits the parent form
|
|
35
|
+
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
54
38
|
*/
|
|
55
|
-
this.
|
|
56
|
-
if (!this.form) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const attached = this.proxy.isConnected;
|
|
60
|
-
if (!attached) {
|
|
61
|
-
this.attachProxy();
|
|
62
|
-
}
|
|
63
|
-
// Browser support for requestSubmit is not comprehensive
|
|
64
|
-
// so click the proxy if it isn't supported
|
|
65
|
-
typeof this.form.requestSubmit === 'function' ? this.form.requestSubmit(this.proxy) : this.proxy.click();
|
|
66
|
-
if (!attached) {
|
|
67
|
-
this.detachProxy();
|
|
68
|
-
}
|
|
69
|
-
};
|
|
39
|
+
this.elementInternals = this.attachInternals();
|
|
70
40
|
/**
|
|
71
|
-
*
|
|
41
|
+
* Indicates that the button should only display as an icon with no text content.
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
* @remarks
|
|
45
|
+
* HTML Attribute: `icon-only`
|
|
72
46
|
*/
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
76
|
-
};
|
|
47
|
+
this.iconOnly = false;
|
|
48
|
+
this.elementInternals.role = 'button';
|
|
77
49
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
52
|
+
*
|
|
53
|
+
* @param previous - the previous disabledFocusable value
|
|
54
|
+
* @param next - the current disabledFocusable value
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
disabledFocusableChanged(previous, next) {
|
|
58
|
+
if (this.$fastController.isConnected) {
|
|
59
|
+
this.elementInternals.ariaDisabled = `${!!next}`;
|
|
81
60
|
}
|
|
82
61
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
62
|
+
/**
|
|
63
|
+
* The associated form element.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
get form() {
|
|
68
|
+
return this.elementInternals.form;
|
|
87
69
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
70
|
+
/**
|
|
71
|
+
* A reference to all associated label elements.
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
get labels() {
|
|
76
|
+
return Object.freeze(Array.from(this.elementInternals.labels));
|
|
92
77
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Removes the form submission fallback control when the type changes.
|
|
80
|
+
*
|
|
81
|
+
* @param previous - the previous type value
|
|
82
|
+
* @param next - the new type value
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
typeChanged(previous, next) {
|
|
86
|
+
var _a, _b, _c;
|
|
87
|
+
if (next !== ButtonType.submit) {
|
|
88
|
+
(_a = this.formSubmissionFallbackControl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
89
|
+
(_c = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('slot[name="internal"]')) === null || _c === void 0 ? void 0 : _c.remove();
|
|
96
90
|
}
|
|
97
91
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Handles the button click event.
|
|
94
|
+
*
|
|
95
|
+
* @param e - The event object
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
clickHandler(e) {
|
|
99
|
+
if (e && this.disabledFocusable) {
|
|
100
|
+
e.stopImmediatePropagation();
|
|
101
|
+
return;
|
|
101
102
|
}
|
|
103
|
+
this.press();
|
|
104
|
+
return true;
|
|
102
105
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
connectedCallback() {
|
|
107
|
+
super.connectedCallback();
|
|
108
|
+
this.elementInternals.ariaDisabled = `${!!this.disabledFocusable}`;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
112
|
+
* properties. The submit button is then appended to the slot and the form is submitted.
|
|
113
|
+
*
|
|
114
|
+
* @internal
|
|
115
|
+
* @privateRemarks
|
|
116
|
+
* This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
|
|
117
|
+
*/
|
|
118
|
+
createAndInsertFormSubmissionFallbackControl() {
|
|
119
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
120
|
+
const internalSlot = (_a = this.formSubmissionFallbackControlSlot) !== null && _a !== void 0 ? _a : document.createElement('slot');
|
|
121
|
+
internalSlot.setAttribute('name', 'internal');
|
|
122
|
+
(_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.appendChild(internalSlot);
|
|
123
|
+
this.formSubmissionFallbackControlSlot = internalSlot;
|
|
124
|
+
const fallbackControl = (_c = this.formSubmissionFallbackControl) !== null && _c !== void 0 ? _c : document.createElement('button');
|
|
125
|
+
fallbackControl.style.display = 'none';
|
|
126
|
+
fallbackControl.setAttribute('type', 'submit');
|
|
127
|
+
fallbackControl.setAttribute('slot', 'internal');
|
|
128
|
+
if (this.formNoValidate) {
|
|
129
|
+
fallbackControl.toggleAttribute('formnovalidate', true);
|
|
130
|
+
}
|
|
131
|
+
if ((_d = this.elementInternals.form) === null || _d === void 0 ? void 0 : _d.id) {
|
|
132
|
+
fallbackControl.setAttribute('form', this.elementInternals.form.id);
|
|
133
|
+
}
|
|
134
|
+
if (this.name) {
|
|
135
|
+
fallbackControl.setAttribute('name', this.name);
|
|
136
|
+
}
|
|
137
|
+
if (this.value) {
|
|
138
|
+
fallbackControl.setAttribute('value', this.value);
|
|
106
139
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
140
|
+
if (this.formAction) {
|
|
141
|
+
fallbackControl.setAttribute('formaction', (_e = this.formAction) !== null && _e !== void 0 ? _e : '');
|
|
142
|
+
}
|
|
143
|
+
if (this.formEnctype) {
|
|
144
|
+
fallbackControl.setAttribute('formenctype', (_f = this.formEnctype) !== null && _f !== void 0 ? _f : '');
|
|
145
|
+
}
|
|
146
|
+
if (this.formMethod) {
|
|
147
|
+
fallbackControl.setAttribute('formmethod', (_g = this.formMethod) !== null && _g !== void 0 ? _g : '');
|
|
148
|
+
}
|
|
149
|
+
if (this.formTarget) {
|
|
150
|
+
fallbackControl.setAttribute('formtarget', (_h = this.formTarget) !== null && _h !== void 0 ? _h : '');
|
|
151
|
+
}
|
|
152
|
+
this.append(fallbackControl);
|
|
153
|
+
this.formSubmissionFallbackControl = fallbackControl;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Invoked when a connected component's form or fieldset has its disabled state changed.
|
|
157
|
+
*
|
|
158
|
+
* @param disabled - the disabled value of the form / fieldset
|
|
159
|
+
*
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
formDisabledCallback(disabled) {
|
|
163
|
+
this.disabled = disabled;
|
|
111
164
|
}
|
|
112
|
-
|
|
113
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Handles keypress events for the button.
|
|
167
|
+
*
|
|
168
|
+
* @param e - the keyboard event
|
|
169
|
+
* @returns - the return value of the click handler
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
keypressHandler(e) {
|
|
173
|
+
if (e && this.disabledFocusable) {
|
|
174
|
+
e.stopImmediatePropagation();
|
|
114
175
|
return;
|
|
115
176
|
}
|
|
116
|
-
if (
|
|
117
|
-
this.
|
|
177
|
+
if (e.key === keyEnter || e.key === keySpace) {
|
|
178
|
+
this.press();
|
|
179
|
+
return;
|
|
118
180
|
}
|
|
119
|
-
|
|
120
|
-
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Presses the button.
|
|
185
|
+
*
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
press() {
|
|
189
|
+
switch (this.type) {
|
|
190
|
+
case ButtonType.reset: {
|
|
191
|
+
this.resetForm();
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case ButtonType.submit: {
|
|
195
|
+
this.submitForm();
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
121
198
|
}
|
|
122
199
|
}
|
|
123
|
-
/**
|
|
124
|
-
|
|
125
|
-
|
|
200
|
+
/**
|
|
201
|
+
* Resets the associated form.
|
|
202
|
+
*
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
resetForm() {
|
|
206
|
+
var _a;
|
|
207
|
+
(_a = this.elementInternals.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
126
208
|
}
|
|
127
209
|
/**
|
|
210
|
+
* Submits the associated form.
|
|
211
|
+
*
|
|
128
212
|
* @internal
|
|
129
213
|
*/
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
this.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
214
|
+
submitForm() {
|
|
215
|
+
var _a;
|
|
216
|
+
if (!this.elementInternals.form || this.disabled || this.type !== ButtonType.submit) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
// workaround: if the button doesn't have any form overrides, the form can be submitted directly.
|
|
220
|
+
if (!this.name &&
|
|
221
|
+
!this.formAction &&
|
|
222
|
+
!this.formEnctype &&
|
|
223
|
+
!this.form &&
|
|
224
|
+
!this.formMethod &&
|
|
225
|
+
!this.formNoValidate &&
|
|
226
|
+
!this.formTarget) {
|
|
227
|
+
this.elementInternals.form.requestSubmit();
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
try {
|
|
231
|
+
this.elementInternals.setFormValue((_a = this.value) !== null && _a !== void 0 ? _a : '');
|
|
232
|
+
this.elementInternals.form.requestSubmit(this);
|
|
233
|
+
}
|
|
234
|
+
catch (e) {
|
|
235
|
+
// `requestSubmit` throws an error since custom elements may not be able to submit the form.
|
|
236
|
+
// This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
237
|
+
// properties. The submit button is then appended to the slot and the form is submitted.
|
|
238
|
+
this.createAndInsertFormSubmissionFallbackControl();
|
|
239
|
+
// workaround: the form value is reset since the fallback control will handle the form submission.
|
|
240
|
+
this.elementInternals.setFormValue(null);
|
|
241
|
+
this.elementInternals.form.requestSubmit(this.formSubmissionFallbackControl);
|
|
242
|
+
}
|
|
138
243
|
}
|
|
139
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* The form-associated flag.
|
|
247
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
Button.formAssociated = true;
|
|
252
|
+
__decorate([
|
|
253
|
+
attr
|
|
254
|
+
], Button.prototype, "appearance", void 0);
|
|
140
255
|
__decorate([
|
|
141
256
|
attr({ mode: 'boolean' })
|
|
142
257
|
], Button.prototype, "autofocus", void 0);
|
|
143
258
|
__decorate([
|
|
144
|
-
|
|
145
|
-
], Button.prototype, "
|
|
259
|
+
observable
|
|
260
|
+
], Button.prototype, "defaultSlottedContent", void 0);
|
|
146
261
|
__decorate([
|
|
147
|
-
attr
|
|
148
|
-
], Button.prototype, "
|
|
262
|
+
attr({ mode: 'boolean' })
|
|
263
|
+
], Button.prototype, "disabled", void 0);
|
|
149
264
|
__decorate([
|
|
150
|
-
attr
|
|
151
|
-
], Button.prototype, "
|
|
265
|
+
attr({ attribute: 'disabled-focusable', mode: 'boolean' })
|
|
266
|
+
], Button.prototype, "disabledFocusable", void 0);
|
|
152
267
|
__decorate([
|
|
153
|
-
attr
|
|
154
|
-
], Button.prototype, "
|
|
268
|
+
attr({ attribute: 'formaction' })
|
|
269
|
+
], Button.prototype, "formAction", void 0);
|
|
155
270
|
__decorate([
|
|
156
|
-
attr({
|
|
157
|
-
], Button.prototype, "
|
|
271
|
+
attr({ attribute: 'form' })
|
|
272
|
+
], Button.prototype, "formAttribute", void 0);
|
|
158
273
|
__decorate([
|
|
159
|
-
attr
|
|
160
|
-
], Button.prototype, "
|
|
274
|
+
attr({ attribute: 'formenctype' })
|
|
275
|
+
], Button.prototype, "formEnctype", void 0);
|
|
161
276
|
__decorate([
|
|
162
|
-
attr
|
|
163
|
-
], Button.prototype, "
|
|
277
|
+
attr({ attribute: 'formmethod' })
|
|
278
|
+
], Button.prototype, "formMethod", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
attr({ attribute: 'formnovalidate', mode: 'boolean' })
|
|
281
|
+
], Button.prototype, "formNoValidate", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
attr({ attribute: 'formtarget' })
|
|
284
|
+
], Button.prototype, "formTarget", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
attr({ attribute: 'icon-only', mode: 'boolean' })
|
|
287
|
+
], Button.prototype, "iconOnly", void 0);
|
|
164
288
|
__decorate([
|
|
165
289
|
attr
|
|
166
|
-
], Button.prototype, "
|
|
290
|
+
], Button.prototype, "name", void 0);
|
|
167
291
|
__decorate([
|
|
168
292
|
attr
|
|
169
293
|
], Button.prototype, "shape", void 0);
|
|
@@ -171,27 +295,10 @@ __decorate([
|
|
|
171
295
|
attr
|
|
172
296
|
], Button.prototype, "size", void 0);
|
|
173
297
|
__decorate([
|
|
174
|
-
attr
|
|
175
|
-
], Button.prototype, "
|
|
176
|
-
__decorate([
|
|
177
|
-
attr({ attribute: 'disabled-focusable', mode: 'boolean' })
|
|
178
|
-
], Button.prototype, "disabledFocusable", void 0);
|
|
179
|
-
__decorate([
|
|
180
|
-
observable
|
|
181
|
-
], Button.prototype, "defaultSlottedContent", void 0);
|
|
182
|
-
/**
|
|
183
|
-
* Includes ARIA states and properties relating to the ARIA button role
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
187
|
-
export class DelegatesARIAButton {
|
|
188
|
-
}
|
|
189
|
-
__decorate([
|
|
190
|
-
attr({ attribute: 'aria-expanded' })
|
|
191
|
-
], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
|
|
298
|
+
attr
|
|
299
|
+
], Button.prototype, "type", void 0);
|
|
192
300
|
__decorate([
|
|
193
|
-
attr
|
|
194
|
-
],
|
|
195
|
-
applyMixins(
|
|
196
|
-
applyMixins(Button, StartEnd, DelegatesARIAButton);
|
|
301
|
+
attr
|
|
302
|
+
], Button.prototype, "value", void 0);
|
|
303
|
+
applyMixins(Button, StartEnd);
|
|
197
304
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/button/button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/button/button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IAoRrC;QACE,KAAK,EAAE,CAAC;QA5OV;;;;;;WAMG;QAEI,sBAAiB,GAAY,KAAK,CAAC;QAe1C;;;;WAIG;QACO,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAmGtE;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;QAsG/B,IAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,QAAQ,CAAC;IACxC,CAAC;IApOD;;;;;;OAMG;IACI,wBAAwB,CAAC,QAAiB,EAAE,IAAa;QAC9D,IAAI,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE;YACpC,IAAI,CAAC,gBAAgB,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;SAClD;IACH,CAAC;IASD;;;;OAIG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,C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CAAC;0CACP;AAW3B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CACvB;AAyBhC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;0CACG;AAUrC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;wCACjB;AAoBjC;IADC,IAAI;oCACgB;AAUrB;IADC,IAAI;qCACsB;AAU3B;IADC,IAAI;oCACoB;AAWzB;IADC,IAAI;oCACoB;AA0BzB;IADC,IAAI;qCACiB;AAgMxB,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -37,4 +37,14 @@ export const ButtonType = {
|
|
|
37
37
|
reset: 'reset',
|
|
38
38
|
button: 'button',
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Button `formtarget` attribute values.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export const ButtonFormTarget = {
|
|
45
|
+
blank: '_blank',
|
|
46
|
+
self: '_self',
|
|
47
|
+
parent: '_parent',
|
|
48
|
+
top: '_top',
|
|
49
|
+
};
|
|
40
50
|
//# sourceMappingURL=button.options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.options.js","sourceRoot":"","sources":["../../../src/button/button.options.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;CAClB,CAAC;AAQX;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAQX;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAQX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC"}
|
|
1
|
+
{"version":3,"file":"button.options.js","sourceRoot":"","sources":["../../../src/button/button.options.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;CAClB,CAAC;AAQX;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAQX;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAQX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC;AAeX;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,SAAS;IACjB,GAAG,EAAE,MAAM;CACH,CAAC"}
|