@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/ref.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The runtime behavior for template references.
|
|
@@ -37,7 +37,7 @@ class RefBehavior {
|
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
39
|
function ref(propertyName) {
|
|
40
|
-
return new
|
|
40
|
+
return new vividElement.AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
exports.ref = ref;
|
package/shared/ref.js
CHANGED
package/shared/repeat.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
function newSplice(index, removed, addedCount) {
|
|
@@ -188,7 +188,7 @@ function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {
|
|
|
188
188
|
currentEnd -= suffixCount;
|
|
189
189
|
oldEnd -= suffixCount;
|
|
190
190
|
if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {
|
|
191
|
-
return
|
|
191
|
+
return vividElement.emptyArray;
|
|
192
192
|
}
|
|
193
193
|
if (currentStart === currentEnd) {
|
|
194
194
|
const splice = newSplice(currentStart, [], 0);
|
|
@@ -345,7 +345,7 @@ function adjustIndex(changeRecord, array) {
|
|
|
345
345
|
changeRecord.index = index;
|
|
346
346
|
return changeRecord;
|
|
347
347
|
}
|
|
348
|
-
class ArrayObserver extends
|
|
348
|
+
class ArrayObserver extends vividElement.SubscriberSet {
|
|
349
349
|
constructor(source) {
|
|
350
350
|
super(source);
|
|
351
351
|
this.oldCollection = void 0;
|
|
@@ -370,14 +370,14 @@ class ArrayObserver extends defineVividComponent.SubscriberSet {
|
|
|
370
370
|
}
|
|
371
371
|
if (this.needsQueue) {
|
|
372
372
|
this.needsQueue = false;
|
|
373
|
-
|
|
373
|
+
vividElement.DOM.queueUpdate(this);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
reset(oldCollection) {
|
|
377
377
|
this.oldCollection = oldCollection;
|
|
378
378
|
if (this.needsQueue) {
|
|
379
379
|
this.needsQueue = false;
|
|
380
|
-
|
|
380
|
+
vividElement.DOM.queueUpdate(this);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
flush() {
|
|
@@ -410,7 +410,7 @@ function enableArrayObservation() {
|
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
412
|
arrayObservationEnabled = true;
|
|
413
|
-
|
|
413
|
+
vividElement.Observable.setArrayObserverFactory((collection) => {
|
|
414
414
|
return new ArrayObserver(collection);
|
|
415
415
|
});
|
|
416
416
|
const proto = Array.prototype;
|
|
@@ -541,8 +541,8 @@ class RepeatBehavior {
|
|
|
541
541
|
this.originalContext = void 0;
|
|
542
542
|
this.childContext = void 0;
|
|
543
543
|
this.bindView = bindWithoutPositioning;
|
|
544
|
-
this.itemsBindingObserver =
|
|
545
|
-
this.templateBindingObserver =
|
|
544
|
+
this.itemsBindingObserver = vividElement.Observable.binding(itemsBinding, this, isItemsBindingVolatile);
|
|
545
|
+
this.templateBindingObserver = vividElement.Observable.binding(templateBinding, this, isTemplateBindingVolatile);
|
|
546
546
|
if (options.positioning) {
|
|
547
547
|
this.bindView = bindWithPositioning;
|
|
548
548
|
}
|
|
@@ -594,11 +594,11 @@ class RepeatBehavior {
|
|
|
594
594
|
}
|
|
595
595
|
observeItems(force = false) {
|
|
596
596
|
if (!this.items) {
|
|
597
|
-
this.items =
|
|
597
|
+
this.items = vividElement.emptyArray;
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
600
|
const oldObserver = this.itemsObserver;
|
|
601
|
-
const newObserver = (this.itemsObserver =
|
|
601
|
+
const newObserver = (this.itemsObserver = vividElement.Observable.getNotifier(this.items));
|
|
602
602
|
const hasNewObserver = oldObserver !== newObserver;
|
|
603
603
|
if (hasNewObserver && oldObserver !== null) {
|
|
604
604
|
oldObserver.unsubscribe(this);
|
|
@@ -674,7 +674,7 @@ class RepeatBehavior {
|
|
|
674
674
|
let viewsLength = views.length;
|
|
675
675
|
if (itemsLength === 0 || templateChanged || !this.options.recycle) {
|
|
676
676
|
// all views need to be removed
|
|
677
|
-
|
|
677
|
+
vividElement.HTMLView.disposeContiguousBatch(views);
|
|
678
678
|
viewsLength = 0;
|
|
679
679
|
}
|
|
680
680
|
if (viewsLength === 0) {
|
|
@@ -719,7 +719,7 @@ class RepeatBehavior {
|
|
|
719
719
|
* A directive that configures list rendering.
|
|
720
720
|
* @public
|
|
721
721
|
*/
|
|
722
|
-
class RepeatDirective extends
|
|
722
|
+
class RepeatDirective extends vividElement.HTMLDirective {
|
|
723
723
|
/**
|
|
724
724
|
* Creates an instance of RepeatDirective.
|
|
725
725
|
* @param itemsBinding - The binding that provides the array to render.
|
|
@@ -735,10 +735,10 @@ class RepeatDirective extends defineVividComponent.HTMLDirective {
|
|
|
735
735
|
* Creates a placeholder string based on the directive's index within the template.
|
|
736
736
|
* @param index - The index of the directive within the template.
|
|
737
737
|
*/
|
|
738
|
-
this.createPlaceholder =
|
|
738
|
+
this.createPlaceholder = vividElement.DOM.createBlockPlaceholder;
|
|
739
739
|
enableArrayObservation();
|
|
740
|
-
this.isItemsBindingVolatile =
|
|
741
|
-
this.isTemplateBindingVolatile =
|
|
740
|
+
this.isItemsBindingVolatile = vividElement.Observable.isVolatileBinding(itemsBinding);
|
|
741
|
+
this.isTemplateBindingVolatile = vividElement.Observable.isVolatileBinding(templateBinding);
|
|
742
742
|
}
|
|
743
743
|
/**
|
|
744
744
|
* Creates a behavior for the provided target node.
|
package/shared/repeat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective, g as HTMLView } from './
|
|
1
|
+
import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective, g as HTMLView } from './vivid-element.js';
|
|
2
2
|
|
|
3
3
|
/** @internal */
|
|
4
4
|
function newSplice(index, removed, addedCount) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const numbers = require('./numbers.cjs');
|
|
4
4
|
const definition = require('./definition63.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const ref = require('./ref.cjs');
|
|
7
7
|
const aria = require('./aria.cjs');
|
|
8
8
|
const when = require('./when.cjs');
|
|
@@ -35,7 +35,7 @@ const getClasses = ({ disabled, connotation }) => classNames.classNames(
|
|
|
35
35
|
const getThumbClasses = ({ _focusVisible }) => classNames.classNames("thumb-container", ["focus-visible", _focusVisible]);
|
|
36
36
|
const getMarkersTemplate = (isHorizontal, numMarkers) => {
|
|
37
37
|
const placeholder = isHorizontal ? ["right", "center", "", "100% repeat-x"] : ["bottom", "top", "100%", "repeat-y"];
|
|
38
|
-
return
|
|
38
|
+
return vividElement.html` <div
|
|
39
39
|
class="mark"
|
|
40
40
|
style="
|
|
41
41
|
background: linear-gradient(to ${placeholder[0]}, currentcolor 1px, transparent 0px)
|
|
@@ -45,7 +45,7 @@ const getMarkersTemplate = (isHorizontal, numMarkers) => {
|
|
|
45
45
|
};
|
|
46
46
|
const SliderTemplate = (context) => {
|
|
47
47
|
const popupTag = context.tagFor(definition.Popup);
|
|
48
|
-
return
|
|
48
|
+
return vividElement.html`<template
|
|
49
49
|
role="${(x) => x.ariaLabel ? "presentation" : null}"
|
|
50
50
|
@focusin="${(x) => x._onFocusIn()}"
|
|
51
51
|
@focusout="${(x) => x._onFocusOut()}"
|
|
@@ -77,7 +77,7 @@ const SliderTemplate = (context) => {
|
|
|
77
77
|
></div>
|
|
78
78
|
${when.when(
|
|
79
79
|
(x) => x.pin,
|
|
80
|
-
|
|
80
|
+
vividElement.html`<${popupTag}
|
|
81
81
|
class="popup"
|
|
82
82
|
arrow
|
|
83
83
|
alternate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as limit } from './numbers.js';
|
|
2
2
|
import { P as Popup, a as PlacementStrategy } from './definition63.js';
|
|
3
|
-
import { h as html } from './
|
|
3
|
+
import { h as html } from './vivid-element.js';
|
|
4
4
|
import { r as ref } from './ref.js';
|
|
5
5
|
import { O as Orientation } from './aria.js';
|
|
6
6
|
import { w as when } from './when.js';
|
package/shared/slotted.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
|
@@ -39,7 +39,7 @@ class NodeObservationBehavior {
|
|
|
39
39
|
*/
|
|
40
40
|
bind(source) {
|
|
41
41
|
const name = this.options.property;
|
|
42
|
-
this.shouldUpdate =
|
|
42
|
+
this.shouldUpdate = vividElement.Observable.getAccessors(source).some((x) => x.name === name);
|
|
43
43
|
this.source = source;
|
|
44
44
|
this.updateTarget(this.computeNodes());
|
|
45
45
|
if (this.shouldUpdate) {
|
|
@@ -51,7 +51,7 @@ class NodeObservationBehavior {
|
|
|
51
51
|
* @param source - The source to unbind from.
|
|
52
52
|
*/
|
|
53
53
|
unbind() {
|
|
54
|
-
this.updateTarget(
|
|
54
|
+
this.updateTarget(vividElement.emptyArray);
|
|
55
55
|
this.source = null;
|
|
56
56
|
if (this.shouldUpdate) {
|
|
57
57
|
this.disconnect();
|
|
@@ -115,7 +115,7 @@ function slotted(propertyOrOptions) {
|
|
|
115
115
|
if (typeof propertyOrOptions === "string") {
|
|
116
116
|
propertyOrOptions = { property: propertyOrOptions };
|
|
117
117
|
}
|
|
118
|
-
return new
|
|
118
|
+
return new vividElement.AttachedBehaviorHTMLDirective("fast-slotted", SlottedBehavior, propertyOrOptions);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
exports.NodeObservationBehavior = NodeObservationBehavior;
|
package/shared/slotted.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as Observable, e as emptyArray, b as AttachedBehaviorHTMLDirective } from './
|
|
1
|
+
import { O as Observable, e as emptyArray, b as AttachedBehaviorHTMLDirective } from './vivid-element.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
package/shared/text-anchor.cjs
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
const affix = require('./affix.cjs');
|
|
4
4
|
const applyMixins = require('./apply-mixins.cjs');
|
|
5
5
|
const anchor = require('./anchor.cjs');
|
|
6
|
-
const
|
|
7
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
6
|
+
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
|
|
9
8
|
var __defProp = Object.defineProperty;
|
|
10
9
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -15,7 +14,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
14
|
if (result) __defProp(target, key, result);
|
|
16
15
|
return result;
|
|
17
16
|
};
|
|
18
|
-
class TextAnchor extends
|
|
17
|
+
class TextAnchor extends vividElement.VividElement {
|
|
19
18
|
/**
|
|
20
19
|
* Allows subclasses to provide a body template that will be rendered inside the anchor.
|
|
21
20
|
* @internal
|
|
@@ -25,13 +24,13 @@ class TextAnchor extends foundationElement.FoundationElement {
|
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
__decorateClass([
|
|
28
|
-
|
|
27
|
+
vividElement.attr
|
|
29
28
|
], TextAnchor.prototype, "text");
|
|
30
29
|
__decorateClass([
|
|
31
|
-
|
|
30
|
+
vividElement.attr
|
|
32
31
|
], TextAnchor.prototype, "connotation");
|
|
33
32
|
__decorateClass([
|
|
34
|
-
|
|
33
|
+
vividElement.attr
|
|
35
34
|
], TextAnchor.prototype, "appearance");
|
|
36
35
|
applyMixins.applyMixins(TextAnchor, affix.AffixIcon, anchor.Anchor);
|
|
37
36
|
|
package/shared/text-anchor.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { A as AffixIcon } from './affix.js';
|
|
2
2
|
import { a as applyMixins } from './apply-mixins.js';
|
|
3
3
|
import { A as Anchor } from './anchor.js';
|
|
4
|
-
import {
|
|
5
|
-
import { a as attr } from './defineVividComponent.js';
|
|
4
|
+
import { V as VividElement, a as attr } from './vivid-element.js';
|
|
6
5
|
|
|
7
6
|
var __defProp = Object.defineProperty;
|
|
8
7
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -13,7 +12,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
12
|
if (result) __defProp(target, key, result);
|
|
14
13
|
return result;
|
|
15
14
|
};
|
|
16
|
-
class TextAnchor extends
|
|
15
|
+
class TextAnchor extends VividElement {
|
|
17
16
|
/**
|
|
18
17
|
* Allows subclasses to provide a body template that will be rendered inside the anchor.
|
|
19
18
|
* @internal
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const affix = require('./affix.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const ref = require('./ref.cjs');
|
|
6
6
|
const classNames = require('./class-names.cjs');
|
|
7
7
|
|
|
@@ -13,7 +13,7 @@ const getClasses = ({ text, connotation, appearance }) => classNames.classNames(
|
|
|
13
13
|
);
|
|
14
14
|
const textAnchorTemplate = (context) => {
|
|
15
15
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
16
|
-
return
|
|
16
|
+
return vividElement.html`<a
|
|
17
17
|
class="${getClasses}"
|
|
18
18
|
download="${(x) => x.download}"
|
|
19
19
|
href="${(x) => x.href}"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
2
|
-
import { h as html } from './
|
|
2
|
+
import { h as html } from './vivid-element.js';
|
|
3
3
|
import { r as ref } from './ref.js';
|
|
4
4
|
import { c as classNames } from './class-names.js';
|
|
5
5
|
|
package/shared/text-field2.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const applyMixins = require('./apply-mixins.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
6
6
|
const formAssociated = require('./form-associated.cjs');
|
|
7
|
-
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
const definition = require('./definition27.cjs');
|
|
9
8
|
const formElements = require('./form-elements.cjs');
|
|
10
9
|
const ariaGlobal = require('./aria-global.cjs');
|
|
@@ -93,7 +92,7 @@ class Reflector {
|
|
|
93
92
|
});
|
|
94
93
|
}
|
|
95
94
|
destroy() {
|
|
96
|
-
const notifier =
|
|
95
|
+
const notifier = vividElement.Observable.getNotifier(this.#source);
|
|
97
96
|
for (const prop of this.#reflectedProperties.keys()) {
|
|
98
97
|
notifier.unsubscribe(this.#propertyChangeHandler, prop);
|
|
99
98
|
}
|
|
@@ -101,7 +100,7 @@ class Reflector {
|
|
|
101
100
|
}
|
|
102
101
|
#addReflectedProperty(name, reflected) {
|
|
103
102
|
this.#reflectedProperties.set(name, reflected);
|
|
104
|
-
const notifier =
|
|
103
|
+
const notifier = vividElement.Observable.getNotifier(this.#source);
|
|
105
104
|
notifier.subscribe(this.#propertyChangeHandler, name);
|
|
106
105
|
this.#propertyChangeHandler.handleChange(this.#source, name);
|
|
107
106
|
}
|
|
@@ -111,14 +110,14 @@ class Reflector {
|
|
|
111
110
|
const value = source[propertyName];
|
|
112
111
|
switch (reflectedProperty.type) {
|
|
113
112
|
case "boolean-attribute":
|
|
114
|
-
|
|
113
|
+
vividElement.DOM.setBooleanAttribute(
|
|
115
114
|
this.#target,
|
|
116
115
|
reflectedProperty.destination,
|
|
117
116
|
Boolean(value)
|
|
118
117
|
);
|
|
119
118
|
break;
|
|
120
119
|
case "attribute":
|
|
121
|
-
|
|
120
|
+
vividElement.DOM.setAttribute(this.#target, reflectedProperty.destination, value);
|
|
122
121
|
break;
|
|
123
122
|
case "property":
|
|
124
123
|
if (reflectedProperty.skipIfEqual && this.#target[reflectedProperty.destination] === value) {
|
|
@@ -356,7 +355,7 @@ exports.TextField = class TextField extends FormAssociatedTextField {
|
|
|
356
355
|
this.proxy.setAttribute("type", this.type);
|
|
357
356
|
this.validate();
|
|
358
357
|
if (this.autofocus) {
|
|
359
|
-
|
|
358
|
+
vividElement.DOM.queueUpdate(() => {
|
|
360
359
|
this.focus();
|
|
361
360
|
});
|
|
362
361
|
}
|
|
@@ -503,55 +502,55 @@ updateMirroredHelperText_fn = function() {
|
|
|
503
502
|
}
|
|
504
503
|
};
|
|
505
504
|
__decorateClass([
|
|
506
|
-
|
|
505
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
507
506
|
], exports.TextField.prototype, "readOnly", 2);
|
|
508
507
|
__decorateClass([
|
|
509
|
-
|
|
508
|
+
vividElement.attr({ mode: "boolean" })
|
|
510
509
|
], exports.TextField.prototype, "autofocus", 2);
|
|
511
510
|
__decorateClass([
|
|
512
|
-
|
|
511
|
+
vividElement.attr
|
|
513
512
|
], exports.TextField.prototype, "placeholder", 2);
|
|
514
513
|
__decorateClass([
|
|
515
|
-
|
|
514
|
+
vividElement.attr
|
|
516
515
|
], exports.TextField.prototype, "type", 2);
|
|
517
516
|
__decorateClass([
|
|
518
|
-
|
|
517
|
+
vividElement.attr
|
|
519
518
|
], exports.TextField.prototype, "list", 2);
|
|
520
519
|
__decorateClass([
|
|
521
|
-
|
|
520
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
522
521
|
], exports.TextField.prototype, "maxlength", 2);
|
|
523
522
|
__decorateClass([
|
|
524
|
-
|
|
523
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
525
524
|
], exports.TextField.prototype, "minlength", 2);
|
|
526
525
|
__decorateClass([
|
|
527
|
-
|
|
526
|
+
vividElement.attr
|
|
528
527
|
], exports.TextField.prototype, "pattern", 2);
|
|
529
528
|
__decorateClass([
|
|
530
|
-
|
|
529
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
531
530
|
], exports.TextField.prototype, "size", 2);
|
|
532
531
|
__decorateClass([
|
|
533
|
-
|
|
532
|
+
vividElement.attr({ mode: "boolean" })
|
|
534
533
|
], exports.TextField.prototype, "spellcheck", 2);
|
|
535
534
|
__decorateClass([
|
|
536
|
-
|
|
535
|
+
vividElement.attr
|
|
537
536
|
], exports.TextField.prototype, "appearance", 2);
|
|
538
537
|
__decorateClass([
|
|
539
|
-
|
|
538
|
+
vividElement.attr
|
|
540
539
|
], exports.TextField.prototype, "shape", 2);
|
|
541
540
|
__decorateClass([
|
|
542
|
-
|
|
541
|
+
vividElement.attr
|
|
543
542
|
], exports.TextField.prototype, "autoComplete", 2);
|
|
544
543
|
__decorateClass([
|
|
545
|
-
|
|
544
|
+
vividElement.attr()
|
|
546
545
|
], exports.TextField.prototype, "scale", 2);
|
|
547
546
|
__decorateClass([
|
|
548
|
-
|
|
547
|
+
vividElement.attr({ attribute: "inputmode" })
|
|
549
548
|
], exports.TextField.prototype, "inputMode", 2);
|
|
550
549
|
__decorateClass([
|
|
551
|
-
|
|
550
|
+
vividElement.observable
|
|
552
551
|
], exports.TextField.prototype, "actionItemsSlottedContent", 2);
|
|
553
552
|
__decorateClass([
|
|
554
|
-
|
|
553
|
+
vividElement.observable
|
|
555
554
|
], exports.TextField.prototype, "leadingActionItemsSlottedContent", 2);
|
|
556
555
|
exports.TextField = __decorateClass([
|
|
557
556
|
formElements.errorText,
|
package/shared/text-field2.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { a as applyMixins } from './apply-mixins.js';
|
|
2
|
-
import { O as Observable, D as DOM, a as attr, n as nullableNumberConverter, o as observable } from './
|
|
2
|
+
import { O as Observable, D as DOM, V as VividElement, a as attr, n as nullableNumberConverter, o as observable } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
4
4
|
import { F as FormAssociated } from './form-associated.js';
|
|
5
|
-
import { V as VividElement } from './vivid-element.js';
|
|
6
5
|
import { m as memoizeWith } from './definition27.js';
|
|
7
6
|
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount } from './form-elements.js';
|
|
8
7
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|