@vonage/vivid 4.14.0 → 4.14.1
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 +130 -23
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/radio/radio.form-associated.d.ts +2 -0
- package/lib/tabs/tabs.d.ts +0 -5
- package/lib/text-anchor/text-anchor.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/listbox/index.cjs +4 -4
- package/listbox/index.js +1 -1
- package/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +1 -1
- package/shared/anchor.cjs +10 -10
- package/shared/anchor.js +1 -1
- package/shared/anchored.cjs +6 -6
- package/shared/anchored.js +1 -1
- package/shared/apply-mixins.cjs +3 -3
- package/shared/apply-mixins.js +1 -1
- package/shared/apply-mixins2.cjs +3 -3
- package/shared/apply-mixins2.js +1 -1
- package/shared/applyMixinsWithObservables.cjs +3 -3
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/aria-global.cjs +20 -20
- package/shared/aria-global.js +1 -1
- package/shared/aria-global2.cjs +40 -40
- package/shared/aria-global2.js +2 -2
- package/shared/base-progress.cjs +7 -8
- package/shared/base-progress.js +2 -3
- package/shared/breadcrumb-item.cjs +2 -3
- package/shared/breadcrumb-item.js +1 -2
- package/shared/button.cjs +10 -11
- package/shared/button.js +1 -2
- package/shared/calendar-event.cjs +7 -8
- package/shared/calendar-event.js +1 -2
- package/shared/children.cjs +2 -2
- package/shared/children.js +1 -1
- package/shared/definition.cjs +14 -15
- package/shared/definition.js +1 -2
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +1 -1
- package/shared/definition12.cjs +6 -6
- package/shared/definition12.js +1 -1
- package/shared/definition13.cjs +13 -14
- package/shared/definition13.js +1 -2
- package/shared/definition14.cjs +23 -24
- package/shared/definition14.js +1 -2
- package/shared/definition15.cjs +15 -16
- package/shared/definition15.js +1 -2
- package/shared/definition16.cjs +20 -19
- package/shared/definition16.js +3 -2
- package/shared/definition17.cjs +53 -54
- package/shared/definition17.js +1 -2
- package/shared/definition18.cjs +4 -4
- package/shared/definition18.js +1 -1
- package/shared/definition19.cjs +12 -12
- package/shared/definition19.js +1 -1
- package/shared/definition2.cjs +6 -7
- package/shared/definition2.js +1 -2
- package/shared/definition20.cjs +20 -21
- package/shared/definition20.js +1 -2
- package/shared/definition21.cjs +27 -28
- package/shared/definition21.js +3 -4
- package/shared/definition22.cjs +5 -6
- package/shared/definition22.js +1 -2
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +2 -2
- package/shared/definition25.cjs +13 -14
- package/shared/definition25.js +1 -2
- package/shared/definition26.cjs +5 -6
- package/shared/definition26.js +1 -2
- package/shared/definition27.cjs +11 -12
- package/shared/definition27.js +1 -2
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +2 -3
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +1 -2
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +1 -1
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +1 -2
- package/shared/definition34.cjs +50 -52
- package/shared/definition34.js +2 -4
- package/shared/definition35.cjs +24 -25
- package/shared/definition35.js +1 -2
- package/shared/definition36.cjs +15 -16
- package/shared/definition36.js +1 -2
- package/shared/definition37.cjs +9 -9
- package/shared/definition37.js +1 -1
- package/shared/definition38.cjs +10 -10
- package/shared/definition38.js +1 -1
- package/shared/definition39.cjs +12 -13
- package/shared/definition39.js +1 -2
- package/shared/definition4.cjs +19 -20
- package/shared/definition4.js +1 -2
- package/shared/definition40.cjs +61 -13
- package/shared/definition40.js +52 -4
- package/shared/definition41.cjs +29 -30
- package/shared/definition41.js +1 -2
- package/shared/definition42.cjs +53 -54
- package/shared/definition42.js +2 -3
- package/shared/definition43.cjs +31 -31
- package/shared/definition43.js +1 -1
- package/shared/definition44.cjs +14 -15
- package/shared/definition44.js +1 -2
- package/shared/definition45.cjs +9 -10
- package/shared/definition45.js +1 -2
- package/shared/definition46.cjs +26 -27
- package/shared/definition46.js +1 -2
- package/shared/definition47.cjs +17 -18
- package/shared/definition47.js +1 -2
- package/shared/definition48.cjs +9 -10
- package/shared/definition48.js +1 -2
- package/shared/definition49.cjs +3 -4
- package/shared/definition49.js +1 -2
- package/shared/definition5.cjs +30 -31
- package/shared/definition5.js +1 -2
- package/shared/definition50.cjs +12 -13
- package/shared/definition50.js +1 -2
- package/shared/definition51.cjs +87 -72
- package/shared/definition51.js +56 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +1 -2
- package/shared/definition54.cjs +20 -21
- package/shared/definition54.js +1 -2
- package/shared/definition55.cjs +5 -5
- package/shared/definition55.js +1 -1
- package/shared/definition56.cjs +18 -19
- package/shared/definition56.js +1 -2
- package/shared/definition57.cjs +10 -11
- package/shared/definition57.js +1 -2
- package/shared/definition58.cjs +7 -8
- package/shared/definition58.js +1 -2
- package/shared/definition59.cjs +16 -17
- package/shared/definition59.js +2 -3
- package/shared/definition6.cjs +11 -12
- package/shared/definition6.js +1 -2
- package/shared/definition60.cjs +9 -10
- package/shared/definition60.js +2 -3
- package/shared/definition61.cjs +27 -30
- package/shared/definition61.js +17 -20
- package/shared/definition62.cjs +12 -9
- package/shared/definition62.js +8 -5
- package/shared/definition63.cjs +13 -14
- package/shared/definition63.js +1 -2
- package/shared/definition7.cjs +9 -10
- package/shared/definition7.js +1 -2
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +1 -2
- package/shared/definition9.cjs +7 -7
- package/shared/definition9.js +1 -1
- package/shared/form-associated.cjs +14 -14
- package/shared/form-associated.js +1 -1
- package/shared/form-associated2.cjs +10 -10
- package/shared/form-associated2.js +1 -1
- package/shared/form-elements.cjs +13 -13
- package/shared/form-elements.js +1 -1
- package/shared/foundation/progress/base-progress.d.ts +2 -2
- package/shared/key-codes2.cjs +1416 -3
- package/shared/key-codes2.js +1413 -2
- package/shared/listbox.cjs +12 -13
- package/shared/listbox.js +1 -2
- package/shared/listbox2.cjs +59 -60
- package/shared/listbox2.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/presentationDate.cjs +42 -43
- package/shared/presentationDate.js +1 -2
- package/shared/ref.cjs +2 -2
- package/shared/ref.js +1 -1
- package/shared/repeat.cjs +15 -15
- package/shared/repeat.js +1 -1
- package/shared/slider.template.cjs +4 -4
- package/shared/slider.template.js +1 -1
- package/shared/slotted.cjs +4 -4
- package/shared/slotted.js +1 -1
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +2 -3
- package/shared/text-anchor.template.cjs +2 -2
- package/shared/text-anchor.template.js +1 -1
- package/shared/text-field2.cjs +23 -24
- package/shared/text-field2.js +1 -2
- package/shared/vivid-element.cjs +2610 -2
- package/shared/vivid-element.js +2591 -2
- package/styles/core/all.css +40 -1
- package/styles/core/theme.css +40 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +25 -4
- package/styles/tokens/theme-light.css +25 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/text-anchor/index.cjs +3 -3
- package/text-anchor/index.js +1 -1
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/foundation-element.cjs +0 -1417
- package/shared/foundation-element.js +0 -1414
package/shared/listbox.cjs
CHANGED
|
@@ -4,7 +4,6 @@ const definition = require('./definition35.cjs');
|
|
|
4
4
|
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const keyCodes = require('./key-codes.cjs');
|
|
6
6
|
const strings = require('./strings.cjs');
|
|
7
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
8
7
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
9
8
|
const ariaGlobal = require('./aria-global.cjs');
|
|
10
9
|
|
|
@@ -95,12 +94,12 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
95
94
|
* @public
|
|
96
95
|
*/
|
|
97
96
|
get options() {
|
|
98
|
-
|
|
97
|
+
vividElement.Observable.track(this, "options");
|
|
99
98
|
return this._options;
|
|
100
99
|
}
|
|
101
100
|
set options(value) {
|
|
102
101
|
this._options = value;
|
|
103
|
-
|
|
102
|
+
vividElement.Observable.notify(this, "options");
|
|
104
103
|
}
|
|
105
104
|
static {
|
|
106
105
|
/**
|
|
@@ -347,7 +346,7 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
347
346
|
selectedOptionsChanged(_, next) {
|
|
348
347
|
const filteredNext = next.filter(_Listbox.slottedOptionFilter);
|
|
349
348
|
this.options.forEach((o) => {
|
|
350
|
-
const notifier =
|
|
349
|
+
const notifier = vividElement.Observable.getNotifier(o);
|
|
351
350
|
notifier.unsubscribe(this, "selected");
|
|
352
351
|
o.selected = filteredNext.includes(o);
|
|
353
352
|
notifier.subscribe(this, "selected");
|
|
@@ -458,38 +457,38 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
458
457
|
};
|
|
459
458
|
// @ts-expect-error Type is incorrectly non-optional
|
|
460
459
|
__decorateClass([
|
|
461
|
-
|
|
460
|
+
vividElement.attr({ mode: "boolean" })
|
|
462
461
|
], _Listbox.prototype, "disabled");
|
|
463
462
|
__decorateClass([
|
|
464
|
-
|
|
463
|
+
vividElement.observable
|
|
465
464
|
], _Listbox.prototype, "selectedIndex");
|
|
466
465
|
__decorateClass([
|
|
467
|
-
|
|
466
|
+
vividElement.observable
|
|
468
467
|
], _Listbox.prototype, "selectedOptions");
|
|
469
468
|
__decorateClass([
|
|
470
|
-
|
|
469
|
+
vividElement.observable
|
|
471
470
|
], _Listbox.prototype, "slottedOptions");
|
|
472
471
|
__decorateClass([
|
|
473
|
-
|
|
472
|
+
vividElement.observable
|
|
474
473
|
], _Listbox.prototype, "typeaheadBuffer");
|
|
475
474
|
let Listbox = _Listbox;
|
|
476
475
|
class DelegatesARIAListbox {
|
|
477
476
|
}
|
|
478
477
|
// @ts-expect-error Type is incorrectly non-optional
|
|
479
478
|
__decorateClass([
|
|
480
|
-
|
|
479
|
+
vividElement.observable
|
|
481
480
|
], DelegatesARIAListbox.prototype, "ariaActiveDescendant");
|
|
482
481
|
// @ts-expect-error Type is incorrectly non-optional
|
|
483
482
|
__decorateClass([
|
|
484
|
-
|
|
483
|
+
vividElement.observable
|
|
485
484
|
], DelegatesARIAListbox.prototype, "ariaDisabled");
|
|
486
485
|
// @ts-expect-error Type is incorrectly non-optional
|
|
487
486
|
__decorateClass([
|
|
488
|
-
|
|
487
|
+
vividElement.observable
|
|
489
488
|
], DelegatesARIAListbox.prototype, "ariaExpanded");
|
|
490
489
|
// @ts-expect-error Type is incorrectly non-optional
|
|
491
490
|
__decorateClass([
|
|
492
|
-
|
|
491
|
+
vividElement.observable
|
|
493
492
|
], DelegatesARIAListbox.prototype, "ariaMultiSelectable");
|
|
494
493
|
applyMixins.applyMixins(DelegatesARIAListbox, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
495
494
|
applyMixins.applyMixins(Listbox, DelegatesARIAListbox);
|
package/shared/listbox.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { i as isListboxOption } from './definition35.js';
|
|
2
|
-
import { V as VividElement } from './vivid-element.js';
|
|
2
|
+
import { V as VividElement, O as Observable, a as attr, o as observable } from './vivid-element.js';
|
|
3
3
|
import { a as keySpace, b as keyEscape, k as keyEnter, c as keyTab, d as keyEnd, e as keyArrowUp, f as keyArrowDown, g as keyHome } from './key-codes.js';
|
|
4
4
|
import { u as uniqueId } from './strings.js';
|
|
5
|
-
import { O as Observable, a as attr, o as observable } from './defineVividComponent.js';
|
|
6
5
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
7
6
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
8
7
|
|
package/shared/listbox2.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const keyCodes$1 = require('./key-codes.cjs');
|
|
4
|
-
const foundationElement = require('./foundation-element.cjs');
|
|
5
|
-
const ariaGlobal = require('./aria-global2.cjs');
|
|
6
4
|
const keyCodes = require('./key-codes2.cjs');
|
|
5
|
+
const ariaGlobal = require('./aria-global2.cjs');
|
|
7
6
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
8
|
-
const
|
|
7
|
+
const vividElement = require('./vivid-element.cjs');
|
|
9
8
|
const strings = require('./strings2.cjs');
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -53,7 +52,7 @@ function isListboxOption(el) {
|
|
|
53
52
|
*
|
|
54
53
|
* @public
|
|
55
54
|
*/
|
|
56
|
-
class ListboxOption extends
|
|
55
|
+
class ListboxOption extends keyCodes.FoundationElement {
|
|
57
56
|
constructor(text, value, defaultSelected, selected) {
|
|
58
57
|
super();
|
|
59
58
|
/**
|
|
@@ -171,37 +170,37 @@ class ListboxOption extends foundationElement.FoundationElement {
|
|
|
171
170
|
if (this.proxy instanceof HTMLOptionElement) {
|
|
172
171
|
this.proxy.value = newValue;
|
|
173
172
|
}
|
|
174
|
-
|
|
173
|
+
vividElement.Observable.notify(this, "value");
|
|
175
174
|
}
|
|
176
175
|
get value() {
|
|
177
176
|
var _a;
|
|
178
|
-
|
|
177
|
+
vividElement.Observable.track(this, "value");
|
|
179
178
|
return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
|
|
180
179
|
}
|
|
181
180
|
get form() {
|
|
182
181
|
return this.proxy ? this.proxy.form : null;
|
|
183
182
|
}
|
|
184
183
|
}
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
keyCodes.__decorate([
|
|
185
|
+
vividElement.observable
|
|
187
186
|
], ListboxOption.prototype, "checked", void 0);
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
keyCodes.__decorate([
|
|
188
|
+
vividElement.observable
|
|
190
189
|
], ListboxOption.prototype, "content", void 0);
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
keyCodes.__decorate([
|
|
191
|
+
vividElement.observable
|
|
193
192
|
], ListboxOption.prototype, "defaultSelected", void 0);
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
keyCodes.__decorate([
|
|
194
|
+
vividElement.attr({ mode: "boolean" })
|
|
196
195
|
], ListboxOption.prototype, "disabled", void 0);
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
keyCodes.__decorate([
|
|
197
|
+
vividElement.attr({ attribute: "selected", mode: "boolean" })
|
|
199
198
|
], ListboxOption.prototype, "selectedAttribute", void 0);
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
keyCodes.__decorate([
|
|
200
|
+
vividElement.observable
|
|
202
201
|
], ListboxOption.prototype, "selected", void 0);
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
keyCodes.__decorate([
|
|
203
|
+
vividElement.attr({ attribute: "value", mode: "fromView" })
|
|
205
204
|
], ListboxOption.prototype, "initialValue", void 0);
|
|
206
205
|
/**
|
|
207
206
|
* States and properties relating to the ARIA `option` role.
|
|
@@ -210,17 +209,17 @@ foundationElement.__decorate([
|
|
|
210
209
|
*/
|
|
211
210
|
class DelegatesARIAListboxOption {
|
|
212
211
|
}
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
keyCodes.__decorate([
|
|
213
|
+
vividElement.observable
|
|
215
214
|
], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
keyCodes.__decorate([
|
|
216
|
+
vividElement.observable
|
|
218
217
|
], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
keyCodes.__decorate([
|
|
219
|
+
vividElement.observable
|
|
221
220
|
], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
keyCodes.__decorate([
|
|
222
|
+
vividElement.observable
|
|
224
223
|
], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
|
|
225
224
|
applyMixins.applyMixins(DelegatesARIAListboxOption, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
226
225
|
applyMixins.applyMixins(ListboxOption, keyCodes.StartEnd, DelegatesARIAListboxOption);
|
|
@@ -233,7 +232,7 @@ applyMixins.applyMixins(ListboxOption, keyCodes.StartEnd, DelegatesARIAListboxOp
|
|
|
233
232
|
*
|
|
234
233
|
* @public
|
|
235
234
|
*/
|
|
236
|
-
let Listbox$1 = class Listbox extends
|
|
235
|
+
let Listbox$1 = class Listbox extends keyCodes.FoundationElement {
|
|
237
236
|
constructor() {
|
|
238
237
|
super(...arguments);
|
|
239
238
|
/**
|
|
@@ -312,12 +311,12 @@ let Listbox$1 = class Listbox extends foundationElement.FoundationElement {
|
|
|
312
311
|
* @public
|
|
313
312
|
*/
|
|
314
313
|
get options() {
|
|
315
|
-
|
|
314
|
+
vividElement.Observable.track(this, "options");
|
|
316
315
|
return this._options;
|
|
317
316
|
}
|
|
318
317
|
set options(value) {
|
|
319
318
|
this._options = value;
|
|
320
|
-
|
|
319
|
+
vividElement.Observable.notify(this, "options");
|
|
321
320
|
}
|
|
322
321
|
/**
|
|
323
322
|
* Flag for the typeahead timeout expiration.
|
|
@@ -579,7 +578,7 @@ let Listbox$1 = class Listbox extends foundationElement.FoundationElement {
|
|
|
579
578
|
var _a;
|
|
580
579
|
const filteredNext = next.filter(Listbox.slottedOptionFilter);
|
|
581
580
|
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {
|
|
582
|
-
const notifier =
|
|
581
|
+
const notifier = vividElement.Observable.getNotifier(o);
|
|
583
582
|
notifier.unsubscribe(this, "selected");
|
|
584
583
|
o.selected = filteredNext.includes(o);
|
|
585
584
|
notifier.subscribe(this, "selected");
|
|
@@ -710,20 +709,20 @@ Listbox$1.slottedOptionFilter = (n) => isListboxOption(n) && !n.hidden;
|
|
|
710
709
|
* @internal
|
|
711
710
|
*/
|
|
712
711
|
Listbox$1.TYPE_AHEAD_TIMEOUT_MS = 1000;
|
|
713
|
-
|
|
714
|
-
|
|
712
|
+
keyCodes.__decorate([
|
|
713
|
+
vividElement.attr({ mode: "boolean" })
|
|
715
714
|
], Listbox$1.prototype, "disabled", void 0);
|
|
716
|
-
|
|
717
|
-
|
|
715
|
+
keyCodes.__decorate([
|
|
716
|
+
vividElement.observable
|
|
718
717
|
], Listbox$1.prototype, "selectedIndex", void 0);
|
|
719
|
-
|
|
720
|
-
|
|
718
|
+
keyCodes.__decorate([
|
|
719
|
+
vividElement.observable
|
|
721
720
|
], Listbox$1.prototype, "selectedOptions", void 0);
|
|
722
|
-
|
|
723
|
-
|
|
721
|
+
keyCodes.__decorate([
|
|
722
|
+
vividElement.observable
|
|
724
723
|
], Listbox$1.prototype, "slottedOptions", void 0);
|
|
725
|
-
|
|
726
|
-
|
|
724
|
+
keyCodes.__decorate([
|
|
725
|
+
vividElement.observable
|
|
727
726
|
], Listbox$1.prototype, "typeaheadBuffer", void 0);
|
|
728
727
|
/**
|
|
729
728
|
* Includes ARIA states and properties relating to the ARIA listbox role
|
|
@@ -732,17 +731,17 @@ foundationElement.__decorate([
|
|
|
732
731
|
*/
|
|
733
732
|
class DelegatesARIAListbox {
|
|
734
733
|
}
|
|
735
|
-
|
|
736
|
-
|
|
734
|
+
keyCodes.__decorate([
|
|
735
|
+
vividElement.observable
|
|
737
736
|
], DelegatesARIAListbox.prototype, "ariaActiveDescendant", void 0);
|
|
738
|
-
|
|
739
|
-
|
|
737
|
+
keyCodes.__decorate([
|
|
738
|
+
vividElement.observable
|
|
740
739
|
], DelegatesARIAListbox.prototype, "ariaDisabled", void 0);
|
|
741
|
-
|
|
742
|
-
|
|
740
|
+
keyCodes.__decorate([
|
|
741
|
+
vividElement.observable
|
|
743
742
|
], DelegatesARIAListbox.prototype, "ariaExpanded", void 0);
|
|
744
|
-
|
|
745
|
-
|
|
743
|
+
keyCodes.__decorate([
|
|
744
|
+
vividElement.observable
|
|
746
745
|
], DelegatesARIAListbox.prototype, "ariaMultiSelectable", void 0);
|
|
747
746
|
applyMixins.applyMixins(DelegatesARIAListbox, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
748
747
|
applyMixins.applyMixins(Listbox$1, DelegatesARIAListbox);
|
|
@@ -1126,7 +1125,7 @@ class ListboxElement extends Listbox$1 {
|
|
|
1126
1125
|
var _a;
|
|
1127
1126
|
const size = Math.max(0, parseInt((_a = next === null || next === void 0 ? void 0 : next.toFixed()) !== null && _a !== void 0 ? _a : "", 10));
|
|
1128
1127
|
if (size !== next) {
|
|
1129
|
-
|
|
1128
|
+
vividElement.DOM.queueUpdate(() => {
|
|
1130
1129
|
this.size = size;
|
|
1131
1130
|
});
|
|
1132
1131
|
}
|
|
@@ -1182,14 +1181,14 @@ class ListboxElement extends Listbox$1 {
|
|
|
1182
1181
|
}
|
|
1183
1182
|
}
|
|
1184
1183
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1184
|
+
keyCodes.__decorate([
|
|
1185
|
+
vividElement.observable
|
|
1187
1186
|
], ListboxElement.prototype, "activeIndex", void 0);
|
|
1188
|
-
|
|
1189
|
-
|
|
1187
|
+
keyCodes.__decorate([
|
|
1188
|
+
vividElement.attr({ mode: "boolean" })
|
|
1190
1189
|
], ListboxElement.prototype, "multiple", void 0);
|
|
1191
|
-
|
|
1192
|
-
|
|
1190
|
+
keyCodes.__decorate([
|
|
1191
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
1193
1192
|
], ListboxElement.prototype, "size", void 0);
|
|
1194
1193
|
|
|
1195
1194
|
var __defProp = Object.defineProperty;
|
|
@@ -1255,13 +1254,13 @@ class Listbox extends ListboxElement {
|
|
|
1255
1254
|
}
|
|
1256
1255
|
}
|
|
1257
1256
|
__decorateClass([
|
|
1258
|
-
|
|
1257
|
+
vividElement.attr
|
|
1259
1258
|
], Listbox.prototype, "appearance");
|
|
1260
1259
|
__decorateClass([
|
|
1261
|
-
|
|
1260
|
+
vividElement.attr
|
|
1262
1261
|
], Listbox.prototype, "orientation");
|
|
1263
1262
|
__decorateClass([
|
|
1264
|
-
|
|
1263
|
+
vividElement.attr
|
|
1265
1264
|
], Listbox.prototype, "shape");
|
|
1266
1265
|
|
|
1267
1266
|
exports.Listbox = Listbox;
|
package/shared/listbox2.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { h as keyArrowLeft, i as keyArrowRight } from './key-codes.js';
|
|
2
|
-
import { _ as __decorate, F as FoundationElement } from './
|
|
2
|
+
import { _ as __decorate, S as StartEnd, F as FoundationElement, g as keySpace, h as keyEscape, k as keyEnter, i as keyTab, e as keyEnd, d as keyArrowUp, c as keyArrowDown, f as keyHome } from './key-codes2.js';
|
|
3
3
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global2.js';
|
|
4
|
-
import { S as StartEnd, g as keySpace, h as keyEscape, k as keyEnter, i as keyTab, e as keyEnd, d as keyArrowUp, c as keyArrowDown, f as keyHome } from './key-codes2.js';
|
|
5
4
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
6
|
-
import { o as observable, a as attr, O as Observable, D as DOM, n as nullableNumberConverter } from './
|
|
5
|
+
import { o as observable, a as attr, O as Observable, D as DOM, n as nullableNumberConverter } from './vivid-element.js';
|
|
7
6
|
import { u as uniqueId, i as inRange } from './strings2.js';
|
|
8
7
|
|
|
9
8
|
/**
|
package/shared/localized.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const locales_enUS = require('../locales/en-US.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -18,7 +18,7 @@ class CurrentLocale {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
__decorateClass([
|
|
21
|
-
|
|
21
|
+
vividElement.observable
|
|
22
22
|
], CurrentLocale.prototype, "locale");
|
|
23
23
|
const currentLocale = new CurrentLocale();
|
|
24
24
|
const setLocale = (locale) => {
|
package/shared/localized.js
CHANGED
|
@@ -4,7 +4,7 @@ const definition$1 = require('./definition11.cjs');
|
|
|
4
4
|
const definition = require('./definition63.cjs');
|
|
5
5
|
const textField = require('./text-field2.cjs');
|
|
6
6
|
const definition$2 = require('./definition22.cjs');
|
|
7
|
-
const
|
|
7
|
+
const vividElement = require('./vivid-element.cjs');
|
|
8
8
|
const ref = require('./ref.cjs');
|
|
9
9
|
const slotted = require('./slotted.cjs');
|
|
10
10
|
const repeat = require('./repeat.cjs');
|
|
@@ -13,7 +13,6 @@ const classNames = require('./class-names.cjs');
|
|
|
13
13
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
14
14
|
const index = require('./index.cjs');
|
|
15
15
|
const formAssociated = require('./form-associated.cjs');
|
|
16
|
-
const vividElement = require('./vivid-element.cjs');
|
|
17
16
|
const trappedFocus = require('./trapped-focus.cjs');
|
|
18
17
|
const formElements = require('./form-elements.cjs');
|
|
19
18
|
const localized = require('./localized.cjs');
|
|
@@ -5527,10 +5526,10 @@ const monthToStr = ({ month, year }) => `${year.toString().padStart(4, "0")}-${(
|
|
|
5527
5526
|
|
|
5528
5527
|
function renderDialogHeader(context) {
|
|
5529
5528
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
5530
|
-
return
|
|
5529
|
+
return vividElement.html`<div class="header">
|
|
5531
5530
|
${when.when(
|
|
5532
5531
|
(x) => x.prevYearButton,
|
|
5533
|
-
|
|
5532
|
+
vividElement.html`
|
|
5534
5533
|
<${buttonTag}
|
|
5535
5534
|
tabindex="1"
|
|
5536
5535
|
class="vwc-button"
|
|
@@ -5544,7 +5543,7 @@ function renderDialogHeader(context) {
|
|
|
5544
5543
|
)}
|
|
5545
5544
|
${when.when(
|
|
5546
5545
|
(x) => x.prevMonthButton,
|
|
5547
|
-
|
|
5546
|
+
vividElement.html`
|
|
5548
5547
|
<${buttonTag}
|
|
5549
5548
|
tabindex="1"
|
|
5550
5549
|
class="vwc-button"
|
|
@@ -5559,7 +5558,7 @@ function renderDialogHeader(context) {
|
|
|
5559
5558
|
<div class="title">
|
|
5560
5559
|
${when.when(
|
|
5561
5560
|
(x) => x.titleClickable,
|
|
5562
|
-
|
|
5561
|
+
vividElement.html`
|
|
5563
5562
|
<button
|
|
5564
5563
|
tabindex="1"
|
|
5565
5564
|
id="${(x) => `grid-label-${x.id}`}"
|
|
@@ -5573,7 +5572,7 @@ function renderDialogHeader(context) {
|
|
|
5573
5572
|
)}
|
|
5574
5573
|
${when.when(
|
|
5575
5574
|
(x) => !x.titleClickable,
|
|
5576
|
-
|
|
5575
|
+
vividElement.html`
|
|
5577
5576
|
<div
|
|
5578
5577
|
id="${(x) => `grid-label-${x.id}`}"
|
|
5579
5578
|
class="title-action"
|
|
@@ -5587,7 +5586,7 @@ function renderDialogHeader(context) {
|
|
|
5587
5586
|
|
|
5588
5587
|
${when.when(
|
|
5589
5588
|
(x) => x.nextMonthButton,
|
|
5590
|
-
|
|
5589
|
+
vividElement.html`
|
|
5591
5590
|
<${buttonTag}
|
|
5592
5591
|
tabindex="1"
|
|
5593
5592
|
class="vwc-button"
|
|
@@ -5601,7 +5600,7 @@ function renderDialogHeader(context) {
|
|
|
5601
5600
|
)}
|
|
5602
5601
|
${when.when(
|
|
5603
5602
|
(x) => x.nextYearButton,
|
|
5604
|
-
|
|
5603
|
+
vividElement.html`
|
|
5605
5604
|
<${buttonTag}
|
|
5606
5605
|
tabindex="1"
|
|
5607
5606
|
class="vwc-button"
|
|
@@ -5617,7 +5616,7 @@ function renderDialogHeader(context) {
|
|
|
5617
5616
|
}
|
|
5618
5617
|
function renderCalendarGrid(context) {
|
|
5619
5618
|
const dividerTag = context.tagFor(definition$2.Divider);
|
|
5620
|
-
return
|
|
5619
|
+
return vividElement.html`<div
|
|
5621
5620
|
class="calendar"
|
|
5622
5621
|
role="grid"
|
|
5623
5622
|
aria-labelledby="${(x) => `grid-label-${x.id}`}"
|
|
@@ -5625,7 +5624,7 @@ function renderCalendarGrid(context) {
|
|
|
5625
5624
|
<div class="calendar-weekdays" role="row">
|
|
5626
5625
|
${repeat.repeat(
|
|
5627
5626
|
(x) => x.calendar.weekdays,
|
|
5628
|
-
|
|
5627
|
+
vividElement.html`
|
|
5629
5628
|
<div
|
|
5630
5629
|
class="calendar-weekday"
|
|
5631
5630
|
role="columnheader"
|
|
@@ -5639,17 +5638,17 @@ function renderCalendarGrid(context) {
|
|
|
5639
5638
|
<${dividerTag} class="calendar-separator" role="presentation"></${dividerTag}>
|
|
5640
5639
|
${repeat.repeat(
|
|
5641
5640
|
(x) => x.calendar.grid,
|
|
5642
|
-
|
|
5641
|
+
vividElement.html` <div class="calendar-week" role="row">
|
|
5643
5642
|
${repeat.repeat(
|
|
5644
5643
|
(x) => x,
|
|
5645
|
-
|
|
5644
|
+
vividElement.html`
|
|
5646
5645
|
${when.when(
|
|
5647
5646
|
(x, c) => c.parentContext.parentContext.parent._hideDatesOutsideMonth && x.isOutsideMonth,
|
|
5648
|
-
|
|
5647
|
+
vividElement.html`<div class="calendar-day"></div>`
|
|
5649
5648
|
)}
|
|
5650
5649
|
${when.when(
|
|
5651
5650
|
(x, c) => !c.parentContext.parentContext.parent._hideDatesOutsideMonth || !x.isOutsideMonth,
|
|
5652
|
-
|
|
5651
|
+
vividElement.html` <span role="gridcell">
|
|
5653
5652
|
<button
|
|
5654
5653
|
class="${(x, c) => classNames.classNames(
|
|
5655
5654
|
"calendar-day",
|
|
@@ -5707,7 +5706,7 @@ function renderCalendarGrid(context) {
|
|
|
5707
5706
|
}
|
|
5708
5707
|
function renderMonthPickerGrid(context) {
|
|
5709
5708
|
const dividerTag = context.tagFor(definition$2.Divider);
|
|
5710
|
-
return
|
|
5709
|
+
return vividElement.html`
|
|
5711
5710
|
<${dividerTag}
|
|
5712
5711
|
class="months-separator"
|
|
5713
5712
|
role="presentation"
|
|
@@ -5719,11 +5718,11 @@ function renderMonthPickerGrid(context) {
|
|
|
5719
5718
|
>
|
|
5720
5719
|
${repeat.repeat(
|
|
5721
5720
|
(x) => x.months,
|
|
5722
|
-
|
|
5721
|
+
vividElement.html`
|
|
5723
5722
|
<div class="months-row" role="row">
|
|
5724
5723
|
${repeat.repeat(
|
|
5725
5724
|
(x) => x,
|
|
5726
|
-
|
|
5725
|
+
vividElement.html`
|
|
5727
5726
|
<span role="gridcell">
|
|
5728
5727
|
<button
|
|
5729
5728
|
class="${(x, c) => classNames.classNames(
|
|
@@ -5782,7 +5781,7 @@ const DatePickerBaseTemplate = (context) => {
|
|
|
5782
5781
|
const popupTag = context.tagFor(definition.Popup);
|
|
5783
5782
|
const textFieldTag = context.tagFor(textField.TextField);
|
|
5784
5783
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
5785
|
-
return
|
|
5784
|
+
return vividElement.html`<div class="base" @keydown="${(x, { event }) => x._onBaseKeyDown(event)}">
|
|
5786
5785
|
<${textFieldTag} id="text-field"
|
|
5787
5786
|
${ref.ref("_textFieldEl")}
|
|
5788
5787
|
class="control"
|
|
@@ -5825,15 +5824,15 @@ const DatePickerBaseTemplate = (context) => {
|
|
|
5825
5824
|
<div class="segments">
|
|
5826
5825
|
${repeat.repeat(
|
|
5827
5826
|
(x) => x._segments,
|
|
5828
|
-
|
|
5827
|
+
vividElement.html` <div class="segment">
|
|
5829
5828
|
${renderDialogHeader(context)}
|
|
5830
5829
|
${when.when(
|
|
5831
5830
|
(x) => x.type === "month-picker",
|
|
5832
|
-
|
|
5831
|
+
vividElement.html`${renderMonthPickerGrid(context)}`
|
|
5833
5832
|
)}
|
|
5834
5833
|
${when.when(
|
|
5835
5834
|
(x) => x.type === "calendar",
|
|
5836
|
-
|
|
5835
|
+
vividElement.html`${renderCalendarGrid(context)}`
|
|
5837
5836
|
)}
|
|
5838
5837
|
</div>`
|
|
5839
5838
|
)}
|
|
@@ -6088,11 +6087,11 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6088
6087
|
document.addEventListener("click", this.#dismissOnClickOutside);
|
|
6089
6088
|
this.addEventListener("focusin", this.#onFocusIn);
|
|
6090
6089
|
this.addEventListener("focusout", this.#onFocusOut);
|
|
6091
|
-
this.#localeChangeObserver =
|
|
6090
|
+
this.#localeChangeObserver = vividElement.Observable.binding(
|
|
6092
6091
|
() => this.locale,
|
|
6093
6092
|
this.#localeChangeHandler
|
|
6094
6093
|
);
|
|
6095
|
-
this.#localeChangeObserver.observe(this,
|
|
6094
|
+
this.#localeChangeObserver.observe(this, vividElement.defaultExecutionContext);
|
|
6096
6095
|
}
|
|
6097
6096
|
disconnectedCallback() {
|
|
6098
6097
|
super.disconnectedCallback();
|
|
@@ -6172,7 +6171,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6172
6171
|
this._closePopup();
|
|
6173
6172
|
} else {
|
|
6174
6173
|
this.#openPopupIfPossible();
|
|
6175
|
-
|
|
6174
|
+
vividElement.DOM.processUpdates();
|
|
6176
6175
|
const tabbableDate = this.shadowRoot.querySelector(
|
|
6177
6176
|
`[data-date="${this._tabbableDate}"]`
|
|
6178
6177
|
);
|
|
@@ -6340,7 +6339,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6340
6339
|
}
|
|
6341
6340
|
if (newDate && this._isDateInValidRange(newDate)) {
|
|
6342
6341
|
if (this._adjustSelectedMonthToEnsureVisibilityOf(newDate)) {
|
|
6343
|
-
|
|
6342
|
+
vividElement.DOM.processUpdates();
|
|
6344
6343
|
}
|
|
6345
6344
|
this._dialogEl.querySelector(
|
|
6346
6345
|
`[data-date="${newDate}"]`
|
|
@@ -6406,7 +6405,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6406
6405
|
if (newMonth && this._isMonthInValidRange(newMonth)) {
|
|
6407
6406
|
if (newMonth.year !== this._monthPickerYear) {
|
|
6408
6407
|
this._monthPickerYear = newMonth.year;
|
|
6409
|
-
|
|
6408
|
+
vividElement.DOM.processUpdates();
|
|
6410
6409
|
}
|
|
6411
6410
|
this._dialogEl.querySelector(
|
|
6412
6411
|
`[data-month="${monthToStr(newMonth)}"]`
|
|
@@ -6450,52 +6449,52 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6450
6449
|
}
|
|
6451
6450
|
}
|
|
6452
6451
|
__decorateClass([
|
|
6453
|
-
|
|
6452
|
+
vividElement.attr({ converter: ValidDateFilter })
|
|
6454
6453
|
], DatePickerBase.prototype, "min", 2);
|
|
6455
6454
|
__decorateClass([
|
|
6456
|
-
|
|
6455
|
+
vividElement.attr({ converter: ValidDateFilter })
|
|
6457
6456
|
], DatePickerBase.prototype, "max", 2);
|
|
6458
6457
|
__decorateClass([
|
|
6459
|
-
|
|
6458
|
+
vividElement.attr({ attribute: "value" })
|
|
6460
6459
|
], DatePickerBase.prototype, "initialValue", 2);
|
|
6461
6460
|
__decorateClass([
|
|
6462
|
-
|
|
6461
|
+
vividElement.attr({ attribute: "current-value" })
|
|
6463
6462
|
], DatePickerBase.prototype, "currentValue", 2);
|
|
6464
6463
|
__decorateClass([
|
|
6465
|
-
|
|
6464
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
6466
6465
|
], DatePickerBase.prototype, "readOnly", 2);
|
|
6467
6466
|
__decorateClass([
|
|
6468
|
-
|
|
6467
|
+
vividElement.observable
|
|
6469
6468
|
], DatePickerBase.prototype, "_selectedMonth", 2);
|
|
6470
6469
|
__decorateClass([
|
|
6471
|
-
|
|
6470
|
+
vividElement.observable
|
|
6472
6471
|
], DatePickerBase.prototype, "_popupOpen", 2);
|
|
6473
6472
|
__decorateClass([
|
|
6474
|
-
|
|
6473
|
+
vividElement.observable
|
|
6475
6474
|
], DatePickerBase.prototype, "_presentationValue", 2);
|
|
6476
6475
|
__decorateClass([
|
|
6477
|
-
|
|
6476
|
+
vividElement.volatile
|
|
6478
6477
|
], DatePickerBase.prototype, "_isPrevYearDisabled", 1);
|
|
6479
6478
|
__decorateClass([
|
|
6480
|
-
|
|
6479
|
+
vividElement.volatile
|
|
6481
6480
|
], DatePickerBase.prototype, "_isNextYearDisabled", 1);
|
|
6482
6481
|
__decorateClass([
|
|
6483
|
-
|
|
6482
|
+
vividElement.observable
|
|
6484
6483
|
], DatePickerBase.prototype, "_numCalendars", 2);
|
|
6485
6484
|
__decorateClass([
|
|
6486
|
-
|
|
6485
|
+
vividElement.observable
|
|
6487
6486
|
], DatePickerBase.prototype, "_lastFocussedDate", 2);
|
|
6488
6487
|
__decorateClass([
|
|
6489
|
-
|
|
6488
|
+
vividElement.volatile
|
|
6490
6489
|
], DatePickerBase.prototype, "_tabbableDate", 1);
|
|
6491
6490
|
__decorateClass([
|
|
6492
|
-
|
|
6491
|
+
vividElement.observable
|
|
6493
6492
|
], DatePickerBase.prototype, "_monthPickerYear", 2);
|
|
6494
6493
|
__decorateClass([
|
|
6495
|
-
|
|
6494
|
+
vividElement.observable
|
|
6496
6495
|
], DatePickerBase.prototype, "_lastFocussedMonth", 2);
|
|
6497
6496
|
__decorateClass([
|
|
6498
|
-
|
|
6497
|
+
vividElement.volatile
|
|
6499
6498
|
], DatePickerBase.prototype, "_tabbableMonth", 1);
|
|
6500
6499
|
applyMixinsWithObservables.applyMixinsWithObservables(
|
|
6501
6500
|
DatePickerBase,
|
|
@@ -2,7 +2,7 @@ import { B as Button } from './definition11.js';
|
|
|
2
2
|
import { P as Popup } from './definition63.js';
|
|
3
3
|
import { T as TextField } from './text-field2.js';
|
|
4
4
|
import { D as Divider } from './definition22.js';
|
|
5
|
-
import { h as html, O as Observable, i as defaultExecutionContext, D as DOM, a as attr, o as observable, v as volatile } from './
|
|
5
|
+
import { h as html, V as VividElement, O as Observable, i as defaultExecutionContext, D as DOM, a as attr, o as observable, v as volatile } from './vivid-element.js';
|
|
6
6
|
import { r as ref } from './ref.js';
|
|
7
7
|
import { s as slotted } from './slotted.js';
|
|
8
8
|
import { r as repeat } from './repeat.js';
|
|
@@ -11,7 +11,6 @@ import { c as classNames } from './class-names.js';
|
|
|
11
11
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
12
12
|
import { h as handleEscapeKeyAndStopPropogation } from './index.js';
|
|
13
13
|
import { F as FormAssociated } from './form-associated.js';
|
|
14
|
-
import { V as VividElement } from './vivid-element.js';
|
|
15
14
|
import { T as TrappedFocus } from './trapped-focus.js';
|
|
16
15
|
import { a as FormElementHelperText } from './form-elements.js';
|
|
17
16
|
import { L as Localized } from './localized.js';
|