@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.
Files changed (90) hide show
  1. package/custom-elements.json +9103 -6572
  2. package/lib/badge/badge.d.ts +1 -1
  3. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  4. package/lib/button/button.d.ts +1 -1
  5. package/lib/checkbox/checkbox.d.ts +5 -3
  6. package/lib/checkbox/checkbox.form-associated.d.ts +10 -0
  7. package/lib/enums.d.ts +1 -0
  8. package/lib/fab/fab.d.ts +1 -1
  9. package/lib/file-picker/file-picker.d.ts +3 -0
  10. package/lib/slider/slider.d.ts +30 -6
  11. package/lib/slider/slider.form-associated.d.ts +10 -0
  12. package/lib/split-button/split-button.d.ts +1 -1
  13. package/lib/tabs/tabs.d.ts +1 -0
  14. package/package.json +1 -1
  15. package/shared/aria-global2.cjs +93 -0
  16. package/shared/aria-global2.js +91 -0
  17. package/shared/breadcrumb-item.cjs +2 -89
  18. package/shared/breadcrumb-item.js +1 -88
  19. package/shared/definition11.cjs +200 -4
  20. package/shared/definition11.js +198 -3
  21. package/shared/definition15.cjs +34 -91
  22. package/shared/definition15.js +35 -92
  23. package/shared/definition16.cjs +9 -7
  24. package/shared/definition16.js +9 -7
  25. package/shared/definition20.cjs +1 -1
  26. package/shared/definition20.js +1 -1
  27. package/shared/definition21.cjs +1 -1
  28. package/shared/definition21.js +1 -1
  29. package/shared/definition24.cjs +156 -2
  30. package/shared/definition24.js +157 -3
  31. package/shared/definition25.cjs +106 -56
  32. package/shared/definition25.js +106 -56
  33. package/shared/definition35.cjs +2 -2
  34. package/shared/definition35.js +2 -2
  35. package/shared/definition37.cjs +1 -1
  36. package/shared/definition37.js +1 -1
  37. package/shared/definition4.cjs +5 -6
  38. package/shared/definition4.js +1 -2
  39. package/shared/definition40.cjs +11 -4
  40. package/shared/definition40.js +8 -1
  41. package/shared/definition42.cjs +3 -22
  42. package/shared/definition42.js +2 -21
  43. package/shared/definition43.cjs +1 -2
  44. package/shared/definition43.js +1 -2
  45. package/shared/definition44.js +1 -1
  46. package/shared/definition47.cjs +369 -502
  47. package/shared/definition47.js +370 -503
  48. package/shared/definition5.cjs +4 -4
  49. package/shared/definition5.js +1 -1
  50. package/shared/definition51.cjs +1 -1
  51. package/shared/definition51.js +1 -1
  52. package/shared/definition52.cjs +63 -26
  53. package/shared/definition52.js +63 -26
  54. package/shared/definition56.cjs +41 -43
  55. package/shared/definition56.js +41 -43
  56. package/shared/definition57.cjs +1 -1
  57. package/shared/definition57.js +1 -1
  58. package/shared/definition64.cjs +242 -79
  59. package/shared/definition64.js +242 -79
  60. package/shared/definition7.cjs +1 -1
  61. package/shared/definition7.js +1 -1
  62. package/shared/definition8.cjs +1 -1
  63. package/shared/definition8.js +1 -1
  64. package/shared/enums.cjs +1 -0
  65. package/shared/enums.js +1 -0
  66. package/shared/form-associated.js +1 -1
  67. package/shared/{patterns → foundation/anchor}/anchor.d.ts +1 -1
  68. package/shared/foundation/button/button.d.ts +27 -0
  69. package/shared/foundation/button/button.template.d.ts +4 -0
  70. package/shared/foundation/button/index.d.ts +2 -0
  71. package/shared/foundation/patterns/index.d.ts +1 -0
  72. package/shared/index.cjs +22 -2
  73. package/shared/index.js +22 -2
  74. package/shared/key-codes2.js +1 -1
  75. package/shared/presentationDate.cjs +4328 -4042
  76. package/shared/presentationDate.js +4327 -4041
  77. package/shared/slider.template.cjs +23 -1
  78. package/shared/slider.template.js +21 -2
  79. package/styles/core/all.css +1 -1
  80. package/styles/core/theme.css +1 -1
  81. package/styles/core/typography.css +1 -1
  82. package/styles/tokens/theme-dark.css +4 -4
  83. package/styles/tokens/theme-light.css +4 -4
  84. package/styles/tokens/vivid-2-compat.css +1 -1
  85. package/vivid.api.json +52 -4
  86. package/shared/aria2.cjs +0 -11
  87. package/shared/aria2.js +0 -9
  88. package/shared/button.cjs +0 -202
  89. package/shared/button.js +0 -200
  90. /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 };