@vonage/vivid 3.0.0-next.16 → 3.0.0-next.17

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/shared/focus.js CHANGED
@@ -1,652 +1,5 @@
1
- import { e as emptyArray, D as DOM, a as attr, o as observable, F as FoundationElement, _ as __decorate, h as html } from './index.js';
2
- import { a as applyMixins } from './apply-mixins.js';
3
- import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global.js';
4
- import { F as Focus } from './focus2.js';
1
+ import { F as FoundationElement } from './index.js';
5
2
 
6
- /**
7
- * Key Code values
8
- * @deprecated - KeyCodes are deprecated, use individual string key exports
9
- */
10
- var KeyCodes;
11
- (function (KeyCodes) {
12
- KeyCodes[KeyCodes["alt"] = 18] = "alt";
13
- KeyCodes[KeyCodes["arrowDown"] = 40] = "arrowDown";
14
- KeyCodes[KeyCodes["arrowLeft"] = 37] = "arrowLeft";
15
- KeyCodes[KeyCodes["arrowRight"] = 39] = "arrowRight";
16
- KeyCodes[KeyCodes["arrowUp"] = 38] = "arrowUp";
17
- KeyCodes[KeyCodes["back"] = 8] = "back";
18
- KeyCodes[KeyCodes["backSlash"] = 220] = "backSlash";
19
- KeyCodes[KeyCodes["break"] = 19] = "break";
20
- KeyCodes[KeyCodes["capsLock"] = 20] = "capsLock";
21
- KeyCodes[KeyCodes["closeBracket"] = 221] = "closeBracket";
22
- KeyCodes[KeyCodes["colon"] = 186] = "colon";
23
- KeyCodes[KeyCodes["colon2"] = 59] = "colon2";
24
- KeyCodes[KeyCodes["comma"] = 188] = "comma";
25
- KeyCodes[KeyCodes["ctrl"] = 17] = "ctrl";
26
- KeyCodes[KeyCodes["delete"] = 46] = "delete";
27
- KeyCodes[KeyCodes["end"] = 35] = "end";
28
- KeyCodes[KeyCodes["enter"] = 13] = "enter";
29
- KeyCodes[KeyCodes["equals"] = 187] = "equals";
30
- KeyCodes[KeyCodes["equals2"] = 61] = "equals2";
31
- KeyCodes[KeyCodes["equals3"] = 107] = "equals3";
32
- KeyCodes[KeyCodes["escape"] = 27] = "escape";
33
- KeyCodes[KeyCodes["forwardSlash"] = 191] = "forwardSlash";
34
- KeyCodes[KeyCodes["function1"] = 112] = "function1";
35
- KeyCodes[KeyCodes["function10"] = 121] = "function10";
36
- KeyCodes[KeyCodes["function11"] = 122] = "function11";
37
- KeyCodes[KeyCodes["function12"] = 123] = "function12";
38
- KeyCodes[KeyCodes["function2"] = 113] = "function2";
39
- KeyCodes[KeyCodes["function3"] = 114] = "function3";
40
- KeyCodes[KeyCodes["function4"] = 115] = "function4";
41
- KeyCodes[KeyCodes["function5"] = 116] = "function5";
42
- KeyCodes[KeyCodes["function6"] = 117] = "function6";
43
- KeyCodes[KeyCodes["function7"] = 118] = "function7";
44
- KeyCodes[KeyCodes["function8"] = 119] = "function8";
45
- KeyCodes[KeyCodes["function9"] = 120] = "function9";
46
- KeyCodes[KeyCodes["home"] = 36] = "home";
47
- KeyCodes[KeyCodes["insert"] = 45] = "insert";
48
- KeyCodes[KeyCodes["menu"] = 93] = "menu";
49
- KeyCodes[KeyCodes["minus"] = 189] = "minus";
50
- KeyCodes[KeyCodes["minus2"] = 109] = "minus2";
51
- KeyCodes[KeyCodes["numLock"] = 144] = "numLock";
52
- KeyCodes[KeyCodes["numPad0"] = 96] = "numPad0";
53
- KeyCodes[KeyCodes["numPad1"] = 97] = "numPad1";
54
- KeyCodes[KeyCodes["numPad2"] = 98] = "numPad2";
55
- KeyCodes[KeyCodes["numPad3"] = 99] = "numPad3";
56
- KeyCodes[KeyCodes["numPad4"] = 100] = "numPad4";
57
- KeyCodes[KeyCodes["numPad5"] = 101] = "numPad5";
58
- KeyCodes[KeyCodes["numPad6"] = 102] = "numPad6";
59
- KeyCodes[KeyCodes["numPad7"] = 103] = "numPad7";
60
- KeyCodes[KeyCodes["numPad8"] = 104] = "numPad8";
61
- KeyCodes[KeyCodes["numPad9"] = 105] = "numPad9";
62
- KeyCodes[KeyCodes["numPadDivide"] = 111] = "numPadDivide";
63
- KeyCodes[KeyCodes["numPadDot"] = 110] = "numPadDot";
64
- KeyCodes[KeyCodes["numPadMinus"] = 109] = "numPadMinus";
65
- KeyCodes[KeyCodes["numPadMultiply"] = 106] = "numPadMultiply";
66
- KeyCodes[KeyCodes["numPadPlus"] = 107] = "numPadPlus";
67
- KeyCodes[KeyCodes["openBracket"] = 219] = "openBracket";
68
- KeyCodes[KeyCodes["pageDown"] = 34] = "pageDown";
69
- KeyCodes[KeyCodes["pageUp"] = 33] = "pageUp";
70
- KeyCodes[KeyCodes["period"] = 190] = "period";
71
- KeyCodes[KeyCodes["print"] = 44] = "print";
72
- KeyCodes[KeyCodes["quote"] = 222] = "quote";
73
- KeyCodes[KeyCodes["scrollLock"] = 145] = "scrollLock";
74
- KeyCodes[KeyCodes["shift"] = 16] = "shift";
75
- KeyCodes[KeyCodes["space"] = 32] = "space";
76
- KeyCodes[KeyCodes["tab"] = 9] = "tab";
77
- KeyCodes[KeyCodes["tilde"] = 192] = "tilde";
78
- KeyCodes[KeyCodes["windowsLeft"] = 91] = "windowsLeft";
79
- KeyCodes[KeyCodes["windowsOpera"] = 219] = "windowsOpera";
80
- KeyCodes[KeyCodes["windowsRight"] = 92] = "windowsRight";
81
- })(KeyCodes || (KeyCodes = {}));
82
- const keyEnter = "Enter";
3
+ class Focus extends FoundationElement {}
83
4
 
84
- const proxySlotName = "form-associated-proxy";
85
- const ElementInternalsKey = "ElementInternals";
86
- /**
87
- * @alpha
88
- */
89
- const supportsElementInternals = ElementInternalsKey in window &&
90
- "setFormValue" in window[ElementInternalsKey].prototype;
91
- const InternalsMap = new WeakMap();
92
- /**
93
- * Base function for providing Custom Element Form Association.
94
- *
95
- * @alpha
96
- */
97
- function FormAssociated(BaseCtor) {
98
- const C = class extends BaseCtor {
99
- constructor(...args) {
100
- super(...args);
101
- /**
102
- * Track whether the value has been changed from the initial value
103
- */
104
- this.dirtyValue = false;
105
- /**
106
- * Sets the element's disabled state. A disabled element will not be included during form submission.
107
- *
108
- * @remarks
109
- * HTML Attribute: disabled
110
- */
111
- this.disabled = false;
112
- /**
113
- * These are events that are still fired by the proxy
114
- * element based on user / programmatic interaction.
115
- *
116
- * The proxy implementation should be transparent to
117
- * the app author, so block these events from emitting.
118
- */
119
- this.proxyEventsToBlock = ["change", "click"];
120
- this.proxyInitialized = false;
121
- this.required = false;
122
- this.initialValue = this.initialValue || "";
123
- if (!this.elementInternals) {
124
- // When elementInternals is not supported, formResetCallback is
125
- // bound to an event listener, so ensure the handler's `this`
126
- // context is correct.
127
- this.formResetCallback = this.formResetCallback.bind(this);
128
- }
129
- }
130
- /**
131
- * Must evaluate to true to enable elementInternals.
132
- * Feature detects API support and resolve respectively
133
- *
134
- * @internal
135
- */
136
- static get formAssociated() {
137
- return supportsElementInternals;
138
- }
139
- /**
140
- * Returns the validity state of the element
141
- *
142
- * @alpha
143
- */
144
- get validity() {
145
- return this.elementInternals
146
- ? this.elementInternals.validity
147
- : this.proxy.validity;
148
- }
149
- /**
150
- * Retrieve a reference to the associated form.
151
- * Returns null if not associated to any form.
152
- *
153
- * @alpha
154
- */
155
- get form() {
156
- return this.elementInternals ? this.elementInternals.form : this.proxy.form;
157
- }
158
- /**
159
- * Retrieve the localized validation message,
160
- * or custom validation message if set.
161
- *
162
- * @alpha
163
- */
164
- get validationMessage() {
165
- return this.elementInternals
166
- ? this.elementInternals.validationMessage
167
- : this.proxy.validationMessage;
168
- }
169
- /**
170
- * Whether the element will be validated when the
171
- * form is submitted
172
- */
173
- get willValidate() {
174
- return this.elementInternals
175
- ? this.elementInternals.willValidate
176
- : this.proxy.willValidate;
177
- }
178
- /**
179
- * A reference to all associated label elements
180
- */
181
- get labels() {
182
- if (this.elementInternals) {
183
- return Object.freeze(Array.from(this.elementInternals.labels));
184
- }
185
- else if (this.proxy instanceof HTMLElement &&
186
- this.proxy.ownerDocument &&
187
- this.id) {
188
- // Labels associated by wrapping the element: <label><custom-element></custom-element></label>
189
- const parentLabels = this.proxy.labels;
190
- // Labels associated using the `for` attribute
191
- const forLabels = Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`));
192
- const labels = parentLabels
193
- ? forLabels.concat(Array.from(parentLabels))
194
- : forLabels;
195
- return Object.freeze(labels);
196
- }
197
- else {
198
- return emptyArray;
199
- }
200
- }
201
- /**
202
- * Invoked when the `value` property changes
203
- * @param previous - the previous value
204
- * @param next - the new value
205
- *
206
- * @remarks
207
- * If elements extending `FormAssociated` implement a `valueChanged` method
208
- * They must be sure to invoke `super.valueChanged(previous, next)` to ensure
209
- * proper functioning of `FormAssociated`
210
- */
211
- valueChanged(previous, next) {
212
- this.dirtyValue = true;
213
- if (this.proxy instanceof HTMLElement) {
214
- this.proxy.value = this.value;
215
- }
216
- this.currentValue = this.value;
217
- this.setFormValue(this.value);
218
- this.validate();
219
- }
220
- currentValueChanged() {
221
- this.value = this.currentValue;
222
- }
223
- /**
224
- * Invoked when the `initialValue` property changes
225
- *
226
- * @param previous - the previous value
227
- * @param next - the new value
228
- *
229
- * @remarks
230
- * If elements extending `FormAssociated` implement a `initialValueChanged` method
231
- * They must be sure to invoke `super.initialValueChanged(previous, next)` to ensure
232
- * proper functioning of `FormAssociated`
233
- */
234
- initialValueChanged(previous, next) {
235
- // If the value is clean and the component is connected to the DOM
236
- // then set value equal to the attribute value.
237
- if (!this.dirtyValue) {
238
- this.value = this.initialValue;
239
- this.dirtyValue = false;
240
- }
241
- }
242
- /**
243
- * Invoked when the `disabled` property changes
244
- *
245
- * @param previous - the previous value
246
- * @param next - the new value
247
- *
248
- * @remarks
249
- * If elements extending `FormAssociated` implement a `disabledChanged` method
250
- * They must be sure to invoke `super.disabledChanged(previous, next)` to ensure
251
- * proper functioning of `FormAssociated`
252
- */
253
- disabledChanged(previous, next) {
254
- if (this.proxy instanceof HTMLElement) {
255
- this.proxy.disabled = this.disabled;
256
- }
257
- DOM.queueUpdate(() => this.classList.toggle("disabled", this.disabled));
258
- }
259
- /**
260
- * Invoked when the `name` property changes
261
- *
262
- * @param previous - the previous value
263
- * @param next - the new value
264
- *
265
- * @remarks
266
- * If elements extending `FormAssociated` implement a `nameChanged` method
267
- * They must be sure to invoke `super.nameChanged(previous, next)` to ensure
268
- * proper functioning of `FormAssociated`
269
- */
270
- nameChanged(previous, next) {
271
- if (this.proxy instanceof HTMLElement) {
272
- this.proxy.name = this.name;
273
- }
274
- }
275
- /**
276
- * Invoked when the `required` property changes
277
- *
278
- * @param previous - the previous value
279
- * @param next - the new value
280
- *
281
- * @remarks
282
- * If elements extending `FormAssociated` implement a `requiredChanged` method
283
- * They must be sure to invoke `super.requiredChanged(previous, next)` to ensure
284
- * proper functioning of `FormAssociated`
285
- */
286
- requiredChanged(prev, next) {
287
- if (this.proxy instanceof HTMLElement) {
288
- this.proxy.required = this.required;
289
- }
290
- DOM.queueUpdate(() => this.classList.toggle("required", this.required));
291
- this.validate();
292
- }
293
- /**
294
- * The element internals object. Will only exist
295
- * in browsers supporting the attachInternals API
296
- */
297
- get elementInternals() {
298
- if (!supportsElementInternals) {
299
- return null;
300
- }
301
- let internals = InternalsMap.get(this);
302
- if (!internals) {
303
- internals = this.attachInternals();
304
- InternalsMap.set(this, internals);
305
- }
306
- return internals;
307
- }
308
- /**
309
- * @internal
310
- */
311
- connectedCallback() {
312
- super.connectedCallback();
313
- this.addEventListener("keypress", this._keypressHandler);
314
- if (!this.value) {
315
- this.value = this.initialValue;
316
- this.dirtyValue = false;
317
- }
318
- if (!this.elementInternals) {
319
- this.attachProxy();
320
- if (this.form) {
321
- this.form.addEventListener("reset", this.formResetCallback);
322
- }
323
- }
324
- }
325
- /**
326
- * @internal
327
- */
328
- disconnectedCallback() {
329
- this.proxyEventsToBlock.forEach(name => this.proxy.removeEventListener(name, this.stopPropagation));
330
- if (!this.elementInternals && this.form) {
331
- this.form.removeEventListener("reset", this.formResetCallback);
332
- }
333
- }
334
- /**
335
- * Return the current validity of the element.
336
- */
337
- checkValidity() {
338
- return this.elementInternals
339
- ? this.elementInternals.checkValidity()
340
- : this.proxy.checkValidity();
341
- }
342
- /**
343
- * Return the current validity of the element.
344
- * If false, fires an invalid event at the element.
345
- */
346
- reportValidity() {
347
- return this.elementInternals
348
- ? this.elementInternals.reportValidity()
349
- : this.proxy.reportValidity();
350
- }
351
- /**
352
- * Set the validity of the control. In cases when the elementInternals object is not
353
- * available (and the proxy element is used to report validity), this function will
354
- * do nothing unless a message is provided, at which point the setCustomValidity method
355
- * of the proxy element will be invoked with the provided message.
356
- * @param flags - Validity flags
357
- * @param message - Optional message to supply
358
- * @param anchor - Optional element used by UA to display an interactive validation UI
359
- */
360
- setValidity(flags, message, anchor) {
361
- if (this.elementInternals) {
362
- this.elementInternals.setValidity(flags, message, anchor);
363
- }
364
- else if (typeof message === "string") {
365
- this.proxy.setCustomValidity(message);
366
- }
367
- }
368
- /**
369
- * Invoked when a connected component's form or fieldset has its disabled
370
- * state changed.
371
- * @param disabled - the disabled value of the form / fieldset
372
- */
373
- formDisabledCallback(disabled) {
374
- this.disabled = disabled;
375
- }
376
- formResetCallback() {
377
- this.value = this.initialValue;
378
- this.dirtyValue = false;
379
- }
380
- /**
381
- * Attach the proxy element to the DOM
382
- */
383
- attachProxy() {
384
- var _a;
385
- if (!this.proxyInitialized) {
386
- this.proxyInitialized = true;
387
- this.proxy.style.display = "none";
388
- this.proxyEventsToBlock.forEach(name => this.proxy.addEventListener(name, this.stopPropagation));
389
- // These are typically mapped to the proxy during
390
- // property change callbacks, but during initialization
391
- // on the initial call of the callback, the proxy is
392
- // still undefined. We should find a better way to address this.
393
- this.proxy.disabled = this.disabled;
394
- this.proxy.required = this.required;
395
- if (typeof this.name === "string") {
396
- this.proxy.name = this.name;
397
- }
398
- if (typeof this.value === "string") {
399
- this.proxy.value = this.value;
400
- }
401
- this.proxy.setAttribute("slot", proxySlotName);
402
- this.proxySlot = document.createElement("slot");
403
- this.proxySlot.setAttribute("name", proxySlotName);
404
- }
405
- (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(this.proxySlot);
406
- this.appendChild(this.proxy);
407
- }
408
- /**
409
- * Detach the proxy element from the DOM
410
- */
411
- detachProxy() {
412
- var _a;
413
- this.removeChild(this.proxy);
414
- (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeChild(this.proxySlot);
415
- }
416
- /**
417
- * Sets the validity of the custom element. By default this uses the proxy element to determine
418
- * validity, but this can be extended or replaced in implementation.
419
- */
420
- validate() {
421
- if (this.proxy instanceof HTMLElement) {
422
- this.setValidity(this.proxy.validity, this.proxy.validationMessage);
423
- }
424
- }
425
- /**
426
- * Associates the provided value (and optional state) with the parent form.
427
- * @param value - The value to set
428
- * @param state - The state object provided to during session restores and when autofilling.
429
- */
430
- setFormValue(value, state) {
431
- if (this.elementInternals) {
432
- this.elementInternals.setFormValue(value, state || value);
433
- }
434
- }
435
- _keypressHandler(e) {
436
- switch (e.key) {
437
- case keyEnter:
438
- if (this.form instanceof HTMLFormElement) {
439
- // Implicit submission
440
- const defaultButton = this.form.querySelector("[type=submit]");
441
- defaultButton === null || defaultButton === void 0 ? void 0 : defaultButton.click();
442
- }
443
- break;
444
- }
445
- }
446
- /**
447
- * Used to stop propagation of proxy element events
448
- * @param e - Event object
449
- */
450
- stopPropagation(e) {
451
- e.stopPropagation();
452
- }
453
- };
454
- attr({ mode: "boolean" })(C.prototype, "disabled");
455
- attr({ mode: "fromView", attribute: "value" })(C.prototype, "initialValue");
456
- attr({ attribute: "current-value" })(C.prototype, "currentValue");
457
- attr(C.prototype, "name");
458
- attr({ mode: "boolean" })(C.prototype, "required");
459
- observable(C.prototype, "value");
460
- return C;
461
- }
462
-
463
- class _Button extends FoundationElement {
464
- }
465
- /**
466
- * A form-associated base class for the {@link @microsoft/fast-foundation#(Button:class)} component.
467
- *
468
- * @internal
469
- */
470
- class FormAssociatedButton extends FormAssociated(_Button) {
471
- constructor() {
472
- super(...arguments);
473
- this.proxy = document.createElement("input");
474
- }
475
- }
476
-
477
- /**
478
- * A Button Custom HTML Element.
479
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
480
- *
481
- * @public
482
- */
483
- class Button extends FormAssociatedButton {
484
- constructor() {
485
- super(...arguments);
486
- /**
487
- * Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
488
- * @internal
489
- */
490
- this.handleClick = (e) => {
491
- var _a;
492
- if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
493
- e.stopPropagation();
494
- }
495
- };
496
- /**
497
- * Submits the parent form
498
- */
499
- this.handleSubmission = () => {
500
- if (!this.form) {
501
- return;
502
- }
503
- const attached = this.proxy.isConnected;
504
- if (!attached) {
505
- this.attachProxy();
506
- }
507
- // Browser support for requestSubmit is not comprehensive
508
- // so click the proxy if it isn't supported
509
- typeof this.form.requestSubmit === "function"
510
- ? this.form.requestSubmit(this.proxy)
511
- : this.proxy.click();
512
- if (!attached) {
513
- this.detachProxy();
514
- }
515
- };
516
- /**
517
- * Resets the parent form
518
- */
519
- this.handleFormReset = () => {
520
- var _a;
521
- (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
522
- };
523
- /**
524
- * Overrides the focus call for where delegatesFocus is unsupported.
525
- * This check works for Chrome, Edge Chromium, FireFox, and Safari
526
- * Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
527
- */
528
- this.handleUnsupportedDelegatesFocus = () => {
529
- var _a;
530
- // Check to see if delegatesFocus is supported
531
- if (window.ShadowRoot &&
532
- !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
533
- this.focus = () => {
534
- this.control.focus();
535
- };
536
- }
537
- };
538
- }
539
- formactionChanged() {
540
- if (this.proxy instanceof HTMLInputElement) {
541
- this.proxy.formAction = this.formaction;
542
- }
543
- }
544
- formenctypeChanged() {
545
- if (this.proxy instanceof HTMLInputElement) {
546
- this.proxy.formEnctype = this.formenctype;
547
- }
548
- }
549
- formmethodChanged() {
550
- if (this.proxy instanceof HTMLInputElement) {
551
- this.proxy.formMethod = this.formmethod;
552
- }
553
- }
554
- formnovalidateChanged() {
555
- if (this.proxy instanceof HTMLInputElement) {
556
- this.proxy.formNoValidate = this.formnovalidate;
557
- }
558
- }
559
- formtargetChanged() {
560
- if (this.proxy instanceof HTMLInputElement) {
561
- this.proxy.formTarget = this.formtarget;
562
- }
563
- }
564
- typeChanged(previous, next) {
565
- if (this.proxy instanceof HTMLInputElement) {
566
- this.proxy.type = this.type;
567
- }
568
- next === "submit" && this.addEventListener("click", this.handleSubmission);
569
- previous === "submit" && this.removeEventListener("click", this.handleSubmission);
570
- next === "reset" && this.addEventListener("click", this.handleFormReset);
571
- previous === "reset" && this.removeEventListener("click", this.handleFormReset);
572
- }
573
- /**
574
- * @internal
575
- */
576
- connectedCallback() {
577
- var _a;
578
- super.connectedCallback();
579
- this.proxy.setAttribute("type", this.type);
580
- this.handleUnsupportedDelegatesFocus();
581
- const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
582
- if (elements) {
583
- elements.forEach((span) => {
584
- span.addEventListener("click", this.handleClick);
585
- });
586
- }
587
- }
588
- /**
589
- * @internal
590
- */
591
- disconnectedCallback() {
592
- var _a;
593
- super.disconnectedCallback();
594
- const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
595
- if (elements) {
596
- elements.forEach((span) => {
597
- span.removeEventListener("click", this.handleClick);
598
- });
599
- }
600
- }
601
- }
602
- __decorate([
603
- attr({ mode: "boolean" })
604
- ], Button.prototype, "autofocus", void 0);
605
- __decorate([
606
- attr({ attribute: "form" })
607
- ], Button.prototype, "formId", void 0);
608
- __decorate([
609
- attr
610
- ], Button.prototype, "formaction", void 0);
611
- __decorate([
612
- attr
613
- ], Button.prototype, "formenctype", void 0);
614
- __decorate([
615
- attr
616
- ], Button.prototype, "formmethod", void 0);
617
- __decorate([
618
- attr({ mode: "boolean" })
619
- ], Button.prototype, "formnovalidate", void 0);
620
- __decorate([
621
- attr
622
- ], Button.prototype, "formtarget", void 0);
623
- __decorate([
624
- attr
625
- ], Button.prototype, "type", void 0);
626
- __decorate([
627
- observable
628
- ], Button.prototype, "defaultSlottedContent", void 0);
629
- /**
630
- * Includes ARIA states and properties relating to the ARIA button role
631
- *
632
- * @public
633
- */
634
- class DelegatesARIAButton {
635
- }
636
- __decorate([
637
- attr({ attribute: "aria-expanded" })
638
- ], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
639
- __decorate([
640
- attr({ attribute: "aria-pressed" })
641
- ], DelegatesARIAButton.prototype, "ariaPressed", void 0);
642
- applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
643
- applyMixins(Button, StartEnd, DelegatesARIAButton);
644
-
645
- let _ = t => t,
646
- _t;
647
- const focusTemplateFactory = context => {
648
- const focusTag = context.tagFor(Focus);
649
- return html(_t || (_t = _`<${0} class="focus-indicator"></${0}>`), focusTag, focusTag);
650
- };
651
-
652
- export { Button as B, focusTemplateFactory as f };
5
+ export { Focus as F };