@vonage/vivid 4.12.0 → 4.13.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 (124) hide show
  1. package/custom-elements.json +2339 -288
  2. package/lib/accordion/accordion.d.ts +21 -2
  3. package/lib/accordion-item/accordion-item.d.ts +6 -2
  4. package/lib/calendar/calendar.d.ts +1 -1
  5. package/lib/date-picker/date-picker.d.ts +1 -0
  6. package/lib/file-picker/file-picker.d.ts +6 -0
  7. package/lib/menu/menu.d.ts +16 -3
  8. package/lib/menu-item/menu-item.d.ts +10 -2
  9. package/lib/option/option.d.ts +27 -7
  10. package/lib/radio/radio.d.ts +12 -2
  11. package/lib/radio/radio.form-associated.d.ts +10 -0
  12. package/lib/radio-group/radio-group.d.ts +20 -2
  13. package/lib/switch/switch.d.ts +5 -2
  14. package/lib/switch/switch.form-associated.d.ts +10 -0
  15. package/lib/tab/tab.d.ts +3 -2
  16. package/lib/tab-panel/tab-panel.d.ts +2 -2
  17. package/lib/tabs/tabs.d.ts +33 -11
  18. package/lib/text-area/text-area.d.ts +25 -3
  19. package/lib/text-area/text-field.form-associated.d.ts +10 -0
  20. package/lib/text-field/text-field.d.ts +28 -3
  21. package/lib/text-field/text-field.form-associated.d.ts +10 -0
  22. package/package.json +1 -1
  23. package/shared/date-picker/date-picker-base.d.ts +1 -0
  24. package/shared/definition.cjs +29 -72
  25. package/shared/definition.js +30 -73
  26. package/shared/definition11.cjs +1 -1
  27. package/shared/definition11.js +1 -1
  28. package/shared/definition16.cjs +1 -2
  29. package/shared/definition16.js +1 -2
  30. package/shared/definition17.cjs +3 -3
  31. package/shared/definition17.js +3 -3
  32. package/shared/definition18.cjs +6 -1
  33. package/shared/definition18.js +6 -1
  34. package/shared/definition19.cjs +17 -8
  35. package/shared/definition19.js +17 -8
  36. package/shared/definition2.cjs +154 -187
  37. package/shared/definition2.js +157 -190
  38. package/shared/definition20.cjs +3 -2
  39. package/shared/definition20.js +3 -2
  40. package/shared/definition21.cjs +1 -1
  41. package/shared/definition21.js +1 -1
  42. package/shared/definition24.cjs +1 -1
  43. package/shared/definition24.js +1 -1
  44. package/shared/definition25.cjs +24 -3
  45. package/shared/definition25.js +24 -3
  46. package/shared/definition29.cjs +358 -559
  47. package/shared/definition29.js +359 -560
  48. package/shared/definition30.cjs +2 -0
  49. package/shared/definition30.js +2 -0
  50. package/shared/definition35.cjs +223 -3
  51. package/shared/definition35.js +223 -3
  52. package/shared/definition36.cjs +149 -14
  53. package/shared/definition36.js +150 -15
  54. package/shared/definition40.cjs +226 -399
  55. package/shared/definition40.js +229 -402
  56. package/shared/definition42.cjs +3 -2
  57. package/shared/definition42.js +3 -2
  58. package/shared/definition43.cjs +1 -0
  59. package/shared/definition43.js +1 -0
  60. package/shared/definition44.cjs +1 -1
  61. package/shared/definition44.js +1 -1
  62. package/shared/definition46.cjs +1 -1
  63. package/shared/definition46.js +1 -1
  64. package/shared/definition47.cjs +8 -16
  65. package/shared/definition47.js +4 -12
  66. package/shared/definition49.cjs +64 -89
  67. package/shared/definition49.js +66 -91
  68. package/shared/definition5.cjs +1 -1
  69. package/shared/definition5.js +1 -1
  70. package/shared/definition50.cjs +1 -11
  71. package/shared/definition50.js +1 -11
  72. package/shared/definition51.cjs +5 -15
  73. package/shared/definition51.js +6 -16
  74. package/shared/definition52.cjs +284 -20
  75. package/shared/definition52.js +288 -24
  76. package/shared/definition55.cjs +160 -180
  77. package/shared/definition55.js +160 -180
  78. package/shared/definition56.cjs +3 -307
  79. package/shared/definition56.js +5 -309
  80. package/shared/definition57.cjs +34 -11
  81. package/shared/definition57.js +30 -7
  82. package/shared/definition61.cjs +1 -1
  83. package/shared/definition61.js +1 -1
  84. package/shared/definition62.cjs +17 -8
  85. package/shared/definition62.js +17 -8
  86. package/shared/definition64.cjs +18 -7
  87. package/shared/definition64.js +19 -8
  88. package/shared/form-associated.cjs +1 -1
  89. package/shared/form-associated.js +1 -1
  90. package/shared/icon.cjs +1 -1
  91. package/shared/icon.js +1 -1
  92. package/shared/index.cjs +1 -0
  93. package/shared/index.js +1 -1
  94. package/shared/key-codes.cjs +1 -94
  95. package/shared/key-codes.js +2 -89
  96. package/shared/key-codes2.cjs +87 -1
  97. package/shared/key-codes2.js +83 -2
  98. package/shared/listbox.cjs +204 -10
  99. package/shared/listbox.js +200 -6
  100. package/shared/{direction.cjs → localization.cjs} +12 -3
  101. package/shared/{direction.js → localization.js} +12 -3
  102. package/shared/numbers.cjs +0 -12
  103. package/shared/numbers.js +1 -12
  104. package/shared/presentationDate.cjs +22 -8
  105. package/shared/presentationDate.js +16 -2
  106. package/shared/radio.cjs +92 -117
  107. package/shared/radio.js +93 -118
  108. package/shared/slider.template.cjs +2 -15
  109. package/shared/slider.template.js +2 -14
  110. package/shared/strings.cjs +26 -0
  111. package/shared/strings.js +25 -1
  112. package/shared/text-field2.cjs +538 -194
  113. package/shared/text-field2.js +539 -195
  114. package/styles/core/all.css +21 -1
  115. package/styles/core/theme.css +21 -1
  116. package/styles/core/typography.css +1 -1
  117. package/styles/tokens/theme-dark.css +4 -4
  118. package/styles/tokens/theme-light.css +4 -4
  119. package/styles/tokens/vivid-2-compat.css +1 -1
  120. package/vivid.api.json +44 -0
  121. package/shared/Reflector.cjs +0 -71
  122. package/shared/Reflector.js +0 -69
  123. package/shared/listbox-option.cjs +0 -204
  124. package/shared/listbox-option.js +0 -201
@@ -1,201 +0,0 @@
1
- import { F as FoundationElement, O as Observable, _ as __decorate, o as observable, a as attr } from './index.js';
2
- import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
3
- import { S as StartEnd } from './start-end.js';
4
- import { a as applyMixins } from './apply-mixins.js';
5
- import { i as isHTMLElement } from './dom.js';
6
-
7
- /**
8
- * Determines if the element is a {@link (ListboxOption:class)}
9
- *
10
- * @param element - the element to test.
11
- * @public
12
- */
13
- function isListboxOption(el) {
14
- return (isHTMLElement(el) &&
15
- (el.getAttribute("role") === "option" ||
16
- el instanceof HTMLOptionElement));
17
- }
18
- /**
19
- * An Option Custom HTML Element.
20
- * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
21
- *
22
- * @slot start - Content which can be provided before the listbox option content
23
- * @slot end - Content which can be provided after the listbox option content
24
- * @slot - The default slot for listbox option content
25
- * @csspart content - Wraps the listbox option content
26
- *
27
- * @public
28
- */
29
- let ListboxOption$1 = class ListboxOption extends FoundationElement {
30
- constructor(text, value, defaultSelected, selected) {
31
- super();
32
- /**
33
- * The defaultSelected state of the option.
34
- * @public
35
- */
36
- this.defaultSelected = false;
37
- /**
38
- * Tracks whether the "selected" property has been changed.
39
- * @internal
40
- */
41
- this.dirtySelected = false;
42
- /**
43
- * The checked state of the control.
44
- *
45
- * @public
46
- */
47
- this.selected = this.defaultSelected;
48
- /**
49
- * Track whether the value has been changed from the initial value
50
- */
51
- this.dirtyValue = false;
52
- if (text) {
53
- this.textContent = text;
54
- }
55
- if (value) {
56
- this.initialValue = value;
57
- }
58
- if (defaultSelected) {
59
- this.defaultSelected = defaultSelected;
60
- }
61
- if (selected) {
62
- this.selected = selected;
63
- }
64
- this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
65
- this.proxy.disabled = this.disabled;
66
- }
67
- /**
68
- * Updates the ariaChecked property when the checked property changes.
69
- *
70
- * @param prev - the previous checked value
71
- * @param next - the current checked value
72
- *
73
- * @public
74
- */
75
- checkedChanged(prev, next) {
76
- if (typeof next === "boolean") {
77
- this.ariaChecked = next ? "true" : "false";
78
- return;
79
- }
80
- this.ariaChecked = null;
81
- }
82
- /**
83
- * Updates the proxy's text content when the default slot changes.
84
- * @param prev - the previous content value
85
- * @param next - the current content value
86
- *
87
- * @internal
88
- */
89
- contentChanged(prev, next) {
90
- if (this.proxy instanceof HTMLOptionElement) {
91
- this.proxy.textContent = this.textContent;
92
- }
93
- this.$emit("contentchange", null, { bubbles: true });
94
- }
95
- defaultSelectedChanged() {
96
- if (!this.dirtySelected) {
97
- this.selected = this.defaultSelected;
98
- if (this.proxy instanceof HTMLOptionElement) {
99
- this.proxy.selected = this.defaultSelected;
100
- }
101
- }
102
- }
103
- disabledChanged(prev, next) {
104
- this.ariaDisabled = this.disabled ? "true" : "false";
105
- if (this.proxy instanceof HTMLOptionElement) {
106
- this.proxy.disabled = this.disabled;
107
- }
108
- }
109
- selectedAttributeChanged() {
110
- this.defaultSelected = this.selectedAttribute;
111
- if (this.proxy instanceof HTMLOptionElement) {
112
- this.proxy.defaultSelected = this.defaultSelected;
113
- }
114
- }
115
- selectedChanged() {
116
- this.ariaSelected = this.selected ? "true" : "false";
117
- if (!this.dirtySelected) {
118
- this.dirtySelected = true;
119
- }
120
- if (this.proxy instanceof HTMLOptionElement) {
121
- this.proxy.selected = this.selected;
122
- }
123
- }
124
- initialValueChanged(previous, next) {
125
- // If the value is clean and the component is connected to the DOM
126
- // then set value equal to the attribute value.
127
- if (!this.dirtyValue) {
128
- this.value = this.initialValue;
129
- this.dirtyValue = false;
130
- }
131
- }
132
- get label() {
133
- var _a;
134
- return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
135
- }
136
- get text() {
137
- var _a, _b;
138
- return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
139
- }
140
- set value(next) {
141
- const newValue = `${next !== null && next !== void 0 ? next : ""}`;
142
- this._value = newValue;
143
- this.dirtyValue = true;
144
- if (this.proxy instanceof HTMLOptionElement) {
145
- this.proxy.value = newValue;
146
- }
147
- Observable.notify(this, "value");
148
- }
149
- get value() {
150
- var _a;
151
- Observable.track(this, "value");
152
- return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
153
- }
154
- get form() {
155
- return this.proxy ? this.proxy.form : null;
156
- }
157
- };
158
- __decorate([
159
- observable
160
- ], ListboxOption$1.prototype, "checked", void 0);
161
- __decorate([
162
- observable
163
- ], ListboxOption$1.prototype, "content", void 0);
164
- __decorate([
165
- observable
166
- ], ListboxOption$1.prototype, "defaultSelected", void 0);
167
- __decorate([
168
- attr({ mode: "boolean" })
169
- ], ListboxOption$1.prototype, "disabled", void 0);
170
- __decorate([
171
- attr({ attribute: "selected", mode: "boolean" })
172
- ], ListboxOption$1.prototype, "selectedAttribute", void 0);
173
- __decorate([
174
- observable
175
- ], ListboxOption$1.prototype, "selected", void 0);
176
- __decorate([
177
- attr({ attribute: "value", mode: "fromView" })
178
- ], ListboxOption$1.prototype, "initialValue", void 0);
179
- /**
180
- * States and properties relating to the ARIA `option` role.
181
- *
182
- * @public
183
- */
184
- class DelegatesARIAListboxOption {
185
- }
186
- __decorate([
187
- observable
188
- ], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
189
- __decorate([
190
- observable
191
- ], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
192
- __decorate([
193
- observable
194
- ], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
195
- __decorate([
196
- observable
197
- ], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
198
- applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
199
- applyMixins(ListboxOption$1, StartEnd, DelegatesARIAListboxOption);
200
-
201
- export { ListboxOption$1 as L, isListboxOption as i };