@vonage/vivid 4.10.0 → 4.11.0
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/custom-elements.json +9103 -6572
- package/lib/badge/badge.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +5 -3
- package/lib/checkbox/checkbox.form-associated.d.ts +10 -0
- package/lib/enums.d.ts +1 -0
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +3 -0
- package/lib/slider/slider.d.ts +30 -6
- package/lib/slider/slider.form-associated.d.ts +10 -0
- package/lib/split-button/split-button.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +1 -0
- package/package.json +1 -1
- package/shared/aria-global2.cjs +93 -0
- package/shared/aria-global2.js +91 -0
- package/shared/breadcrumb-item.cjs +2 -89
- package/shared/breadcrumb-item.js +1 -88
- package/shared/definition11.cjs +200 -4
- package/shared/definition11.js +198 -3
- package/shared/definition15.cjs +34 -91
- package/shared/definition15.js +35 -92
- package/shared/definition16.cjs +9 -7
- package/shared/definition16.js +9 -7
- package/shared/definition20.cjs +1 -1
- package/shared/definition20.js +1 -1
- package/shared/definition21.cjs +1 -1
- package/shared/definition21.js +1 -1
- package/shared/definition24.cjs +156 -2
- package/shared/definition24.js +157 -3
- package/shared/definition25.cjs +106 -56
- package/shared/definition25.js +106 -56
- package/shared/definition35.cjs +2 -2
- package/shared/definition35.js +2 -2
- package/shared/definition37.cjs +1 -1
- package/shared/definition37.js +1 -1
- package/shared/definition4.cjs +5 -6
- package/shared/definition4.js +1 -2
- package/shared/definition40.cjs +11 -4
- package/shared/definition40.js +8 -1
- package/shared/definition42.cjs +3 -22
- package/shared/definition42.js +2 -21
- package/shared/definition43.cjs +1 -2
- package/shared/definition43.js +1 -2
- package/shared/definition44.js +1 -1
- package/shared/definition47.cjs +369 -502
- package/shared/definition47.js +370 -503
- package/shared/definition5.cjs +4 -4
- package/shared/definition5.js +1 -1
- package/shared/definition51.cjs +1 -1
- package/shared/definition51.js +1 -1
- package/shared/definition52.cjs +63 -26
- package/shared/definition52.js +63 -26
- package/shared/definition56.cjs +41 -43
- package/shared/definition56.js +41 -43
- package/shared/definition57.cjs +1 -1
- package/shared/definition57.js +1 -1
- package/shared/definition64.cjs +242 -79
- package/shared/definition64.js +242 -79
- package/shared/definition7.cjs +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.cjs +1 -1
- package/shared/definition8.js +1 -1
- package/shared/enums.cjs +1 -0
- package/shared/enums.js +1 -0
- package/shared/form-associated.js +1 -1
- package/shared/{patterns → foundation/anchor}/anchor.d.ts +1 -1
- package/shared/foundation/button/button.d.ts +27 -0
- package/shared/foundation/button/button.template.d.ts +4 -0
- package/shared/foundation/button/index.d.ts +2 -0
- package/shared/foundation/patterns/index.d.ts +1 -0
- package/shared/index.cjs +22 -2
- package/shared/index.js +22 -2
- package/shared/key-codes2.js +1 -1
- package/shared/presentationDate.cjs +4328 -4042
- package/shared/presentationDate.js +4327 -4041
- package/shared/slider.template.cjs +23 -1
- package/shared/slider.template.js +21 -2
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/vivid.api.json +52 -4
- package/shared/aria2.cjs +0 -11
- package/shared/aria2.js +0 -9
- package/shared/button.cjs +0 -202
- package/shared/button.js +0 -200
- /package/shared/{patterns → foundation/patterns}/aria-global.d.ts +0 -0
package/shared/button.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
|
|
2
|
-
import { a as applyMixins } from './apply-mixins.js';
|
|
3
|
-
import { F as FormAssociated } from './form-associated.js';
|
|
4
|
-
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
5
|
-
import { S as StartEnd } from './start-end.js';
|
|
6
|
-
|
|
7
|
-
class _Button extends FoundationElement {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(Button:class)} component.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
class FormAssociatedButton extends FormAssociated(_Button) {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.proxy = document.createElement("input");
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A Button Custom HTML Element.
|
|
23
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
|
|
24
|
-
*
|
|
25
|
-
* @slot start - Content which can be provided before the button content
|
|
26
|
-
* @slot end - Content which can be provided after the button content
|
|
27
|
-
* @slot - The default slot for button content
|
|
28
|
-
* @csspart control - The button element
|
|
29
|
-
* @csspart content - The element wrapping button content
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
let Button$1 = class Button extends FormAssociatedButton {
|
|
34
|
-
constructor() {
|
|
35
|
-
super(...arguments);
|
|
36
|
-
/**
|
|
37
|
-
* Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
this.handleClick = (e) => {
|
|
41
|
-
var _a;
|
|
42
|
-
if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
|
|
43
|
-
e.stopPropagation();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Submits the parent form
|
|
48
|
-
*/
|
|
49
|
-
this.handleSubmission = () => {
|
|
50
|
-
if (!this.form) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const attached = this.proxy.isConnected;
|
|
54
|
-
if (!attached) {
|
|
55
|
-
this.attachProxy();
|
|
56
|
-
}
|
|
57
|
-
// Browser support for requestSubmit is not comprehensive
|
|
58
|
-
// so click the proxy if it isn't supported
|
|
59
|
-
typeof this.form.requestSubmit === "function"
|
|
60
|
-
? this.form.requestSubmit(this.proxy)
|
|
61
|
-
: this.proxy.click();
|
|
62
|
-
if (!attached) {
|
|
63
|
-
this.detachProxy();
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Resets the parent form
|
|
68
|
-
*/
|
|
69
|
-
this.handleFormReset = () => {
|
|
70
|
-
var _a;
|
|
71
|
-
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Overrides the focus call for where delegatesFocus is unsupported.
|
|
75
|
-
* This check works for Chrome, Edge Chromium, FireFox, and Safari
|
|
76
|
-
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
77
|
-
*/
|
|
78
|
-
this.handleUnsupportedDelegatesFocus = () => {
|
|
79
|
-
var _a;
|
|
80
|
-
// Check to see if delegatesFocus is supported
|
|
81
|
-
if (window.ShadowRoot &&
|
|
82
|
-
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
|
|
83
|
-
((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
84
|
-
this.focus = () => {
|
|
85
|
-
this.control.focus();
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
formactionChanged() {
|
|
91
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
92
|
-
this.proxy.formAction = this.formaction;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
formenctypeChanged() {
|
|
96
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
97
|
-
this.proxy.formEnctype = this.formenctype;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
formmethodChanged() {
|
|
101
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
102
|
-
this.proxy.formMethod = this.formmethod;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
formnovalidateChanged() {
|
|
106
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
107
|
-
this.proxy.formNoValidate = this.formnovalidate;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
formtargetChanged() {
|
|
111
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
112
|
-
this.proxy.formTarget = this.formtarget;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
typeChanged(previous, next) {
|
|
116
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
117
|
-
this.proxy.type = this.type;
|
|
118
|
-
}
|
|
119
|
-
next === "submit" && this.addEventListener("click", this.handleSubmission);
|
|
120
|
-
previous === "submit" && this.removeEventListener("click", this.handleSubmission);
|
|
121
|
-
next === "reset" && this.addEventListener("click", this.handleFormReset);
|
|
122
|
-
previous === "reset" && this.removeEventListener("click", this.handleFormReset);
|
|
123
|
-
}
|
|
124
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
125
|
-
validate() {
|
|
126
|
-
super.validate(this.control);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @internal
|
|
130
|
-
*/
|
|
131
|
-
connectedCallback() {
|
|
132
|
-
var _a;
|
|
133
|
-
super.connectedCallback();
|
|
134
|
-
this.proxy.setAttribute("type", this.type);
|
|
135
|
-
this.handleUnsupportedDelegatesFocus();
|
|
136
|
-
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
137
|
-
if (elements) {
|
|
138
|
-
elements.forEach((span) => {
|
|
139
|
-
span.addEventListener("click", this.handleClick);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* @internal
|
|
145
|
-
*/
|
|
146
|
-
disconnectedCallback() {
|
|
147
|
-
var _a;
|
|
148
|
-
super.disconnectedCallback();
|
|
149
|
-
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
150
|
-
if (elements) {
|
|
151
|
-
elements.forEach((span) => {
|
|
152
|
-
span.removeEventListener("click", this.handleClick);
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
__decorate([
|
|
158
|
-
attr({ mode: "boolean" })
|
|
159
|
-
], Button$1.prototype, "autofocus", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
attr({ attribute: "form" })
|
|
162
|
-
], Button$1.prototype, "formId", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
attr
|
|
165
|
-
], Button$1.prototype, "formaction", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
attr
|
|
168
|
-
], Button$1.prototype, "formenctype", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
attr
|
|
171
|
-
], Button$1.prototype, "formmethod", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
attr({ mode: "boolean" })
|
|
174
|
-
], Button$1.prototype, "formnovalidate", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
attr
|
|
177
|
-
], Button$1.prototype, "formtarget", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
attr
|
|
180
|
-
], Button$1.prototype, "type", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
observable
|
|
183
|
-
], Button$1.prototype, "defaultSlottedContent", void 0);
|
|
184
|
-
/**
|
|
185
|
-
* Includes ARIA states and properties relating to the ARIA button role
|
|
186
|
-
*
|
|
187
|
-
* @public
|
|
188
|
-
*/
|
|
189
|
-
class DelegatesARIAButton {
|
|
190
|
-
}
|
|
191
|
-
__decorate([
|
|
192
|
-
attr({ attribute: "aria-expanded" })
|
|
193
|
-
], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
attr({ attribute: "aria-pressed" })
|
|
196
|
-
], DelegatesARIAButton.prototype, "ariaPressed", void 0);
|
|
197
|
-
applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
|
|
198
|
-
applyMixins(Button$1, StartEnd, DelegatesARIAButton);
|
|
199
|
-
|
|
200
|
-
export { Button$1 as B };
|
|
File without changes
|