@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/definition42.cjs
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
const definition$1 = require('./definition11.cjs');
|
|
4
4
|
const definition = require('./definition63.cjs');
|
|
5
5
|
const definition$2 = require('./definition27.cjs');
|
|
6
|
-
const
|
|
6
|
+
const vividElement = require('./vivid-element.cjs');
|
|
7
7
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
8
8
|
const scrollIntoView = require('./scrollIntoView.cjs');
|
|
9
9
|
const formAssociated = require('./form-associated.cjs');
|
|
10
|
-
const vividElement = require('./vivid-element.cjs');
|
|
11
10
|
const affix = require('./affix.cjs');
|
|
12
11
|
const localized = require('./localized.cjs');
|
|
13
12
|
const formElements = require('./form-elements.cjs');
|
|
14
13
|
const listbox = require('./listbox2.cjs');
|
|
15
14
|
const applyMixins = require('./apply-mixins.cjs');
|
|
16
|
-
const
|
|
15
|
+
const keyCodes = require('./key-codes2.cjs');
|
|
17
16
|
const when = require('./when.cjs');
|
|
18
17
|
const ref = require('./ref.cjs');
|
|
19
18
|
const slotted = require('./slotted.cjs');
|
|
@@ -314,14 +313,14 @@ let SearchableSelect = class extends FormAssociatedSearchableSelect {
|
|
|
314
313
|
this._areOptionsInitialized = true;
|
|
315
314
|
if (oldValue) {
|
|
316
315
|
for (const option of oldValue) {
|
|
317
|
-
const notifier =
|
|
316
|
+
const notifier = vividElement.Observable.getNotifier(option);
|
|
318
317
|
notifier.unsubscribe(__privateGet(this, _slottedOptionsChangeHandler), "selected");
|
|
319
318
|
}
|
|
320
319
|
}
|
|
321
320
|
if (newValue) {
|
|
322
321
|
for (const option of newValue) {
|
|
323
322
|
option._displayCheckmark = true;
|
|
324
|
-
const notifier =
|
|
323
|
+
const notifier = vividElement.Observable.getNotifier(option);
|
|
325
324
|
notifier.subscribe(__privateGet(this, _slottedOptionsChangeHandler), "selected");
|
|
326
325
|
}
|
|
327
326
|
}
|
|
@@ -377,7 +376,7 @@ let SearchableSelect = class extends FormAssociatedSearchableSelect {
|
|
|
377
376
|
case "Enter":
|
|
378
377
|
case " ": {
|
|
379
378
|
this._onTagRemoved(this.values[tagIndex]);
|
|
380
|
-
|
|
379
|
+
vividElement.DOM.processUpdates();
|
|
381
380
|
__privateMethod(this, _SearchableSelect_instances, moveTagFocusTo_fn).call(this, __privateMethod(this, _SearchableSelect_instances, nextTagIndexForRemoved_fn).call(this, tagIndex));
|
|
382
381
|
break;
|
|
383
382
|
}
|
|
@@ -740,76 +739,76 @@ updateFormValue_fn = function() {
|
|
|
740
739
|
};
|
|
741
740
|
_resizeObserver = new WeakMap();
|
|
742
741
|
__decorateClass$1([
|
|
743
|
-
|
|
742
|
+
vividElement.attr
|
|
744
743
|
], SearchableSelect.prototype, "appearance", 2);
|
|
745
744
|
__decorateClass$1([
|
|
746
|
-
|
|
745
|
+
vividElement.attr
|
|
747
746
|
], SearchableSelect.prototype, "shape", 2);
|
|
748
747
|
__decorateClass$1([
|
|
749
|
-
|
|
748
|
+
vividElement.attr({ mode: "boolean", attribute: "fixed-dropdown" })
|
|
750
749
|
], SearchableSelect.prototype, "fixedDropdown", 2);
|
|
751
750
|
__decorateClass$1([
|
|
752
|
-
|
|
751
|
+
vividElement.attr
|
|
753
752
|
], SearchableSelect.prototype, "placeholder", 2);
|
|
754
753
|
__decorateClass$1([
|
|
755
|
-
|
|
754
|
+
vividElement.attr({ mode: "boolean" })
|
|
756
755
|
], SearchableSelect.prototype, "open", 2);
|
|
757
756
|
__decorateClass$1([
|
|
758
|
-
|
|
757
|
+
vividElement.attr({ mode: "boolean" })
|
|
759
758
|
], SearchableSelect.prototype, "multiple", 2);
|
|
760
759
|
__decorateClass$1([
|
|
761
|
-
|
|
760
|
+
vividElement.attr({ attribute: "external-tags", mode: "boolean" })
|
|
762
761
|
], SearchableSelect.prototype, "externalTags", 2);
|
|
763
762
|
__decorateClass$1([
|
|
764
|
-
|
|
763
|
+
vividElement.attr({ attribute: "max-lines", converter: vividElement.nullableNumberConverter })
|
|
765
764
|
], SearchableSelect.prototype, "maxLines", 2);
|
|
766
765
|
__decorateClass$1([
|
|
767
|
-
|
|
766
|
+
vividElement.observable
|
|
768
767
|
], SearchableSelect.prototype, "values", 2);
|
|
769
768
|
__decorateClass$1([
|
|
770
|
-
|
|
769
|
+
vividElement.observable
|
|
771
770
|
], SearchableSelect.prototype, "initialValues", 2);
|
|
772
771
|
__decorateClass$1([
|
|
773
|
-
|
|
772
|
+
vividElement.observable
|
|
774
773
|
], SearchableSelect.prototype, "_input", 2);
|
|
775
774
|
__decorateClass$1([
|
|
776
|
-
|
|
775
|
+
vividElement.observable
|
|
777
776
|
], SearchableSelect.prototype, "_inputValue", 2);
|
|
778
777
|
__decorateClass$1([
|
|
779
|
-
|
|
778
|
+
vividElement.observable
|
|
780
779
|
], SearchableSelect.prototype, "_slottedOptions", 2);
|
|
781
780
|
__decorateClass$1([
|
|
782
|
-
|
|
781
|
+
vividElement.observable
|
|
783
782
|
], SearchableSelect.prototype, "_filteredOptions", 2);
|
|
784
783
|
__decorateClass$1([
|
|
785
|
-
|
|
784
|
+
vividElement.observable
|
|
786
785
|
], SearchableSelect.prototype, "_filteredEnabledOptions", 2);
|
|
787
786
|
__decorateClass$1([
|
|
788
|
-
|
|
787
|
+
vividElement.observable
|
|
789
788
|
], SearchableSelect.prototype, "_highlightedOptionIndex", 2);
|
|
790
789
|
__decorateClass$1([
|
|
791
|
-
|
|
790
|
+
vividElement.observable
|
|
792
791
|
], SearchableSelect.prototype, "_contentArea", 2);
|
|
793
792
|
__decorateClass$1([
|
|
794
|
-
|
|
793
|
+
vividElement.observable
|
|
795
794
|
], SearchableSelect.prototype, "_numElidedTags", 2);
|
|
796
795
|
__decorateClass$1([
|
|
797
|
-
|
|
796
|
+
vividElement.observable
|
|
798
797
|
], SearchableSelect.prototype, "_tagRows", 2);
|
|
799
798
|
__decorateClass$1([
|
|
800
|
-
|
|
799
|
+
vividElement.observable
|
|
801
800
|
], SearchableSelect.prototype, "_lastTagRow", 2);
|
|
802
801
|
__decorateClass$1([
|
|
803
|
-
|
|
802
|
+
vividElement.observable
|
|
804
803
|
], SearchableSelect.prototype, "_listbox", 2);
|
|
805
804
|
__decorateClass$1([
|
|
806
|
-
|
|
805
|
+
vividElement.attr({ mode: "boolean" })
|
|
807
806
|
], SearchableSelect.prototype, "clearable", 2);
|
|
808
807
|
__decorateClass$1([
|
|
809
|
-
|
|
808
|
+
vividElement.observable
|
|
810
809
|
], SearchableSelect.prototype, "_changeDescription", 2);
|
|
811
810
|
__decorateClass$1([
|
|
812
|
-
|
|
811
|
+
vividElement.observable
|
|
813
812
|
], SearchableSelect.prototype, "_anchor", 2);
|
|
814
813
|
SearchableSelect = __decorateClass$1([
|
|
815
814
|
formElements.errorText,
|
|
@@ -832,7 +831,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
832
831
|
if (result) __defProp(target, key, result);
|
|
833
832
|
return result;
|
|
834
833
|
};
|
|
835
|
-
class OptionTag extends
|
|
834
|
+
class OptionTag extends keyCodes.FoundationElement {
|
|
836
835
|
constructor() {
|
|
837
836
|
super(...arguments);
|
|
838
837
|
this.removable = false;
|
|
@@ -846,19 +845,19 @@ class OptionTag extends foundationElement.FoundationElement {
|
|
|
846
845
|
}
|
|
847
846
|
}
|
|
848
847
|
__decorateClass([
|
|
849
|
-
|
|
848
|
+
vividElement.attr
|
|
850
849
|
], OptionTag.prototype, "shape");
|
|
851
850
|
__decorateClass([
|
|
852
|
-
|
|
851
|
+
vividElement.attr
|
|
853
852
|
], OptionTag.prototype, "label");
|
|
854
853
|
__decorateClass([
|
|
855
|
-
|
|
854
|
+
vividElement.attr({ mode: "boolean" })
|
|
856
855
|
], OptionTag.prototype, "removable");
|
|
857
856
|
__decorateClass([
|
|
858
|
-
|
|
857
|
+
vividElement.attr({ mode: "boolean" })
|
|
859
858
|
], OptionTag.prototype, "disabled");
|
|
860
859
|
__decorateClass([
|
|
861
|
-
|
|
860
|
+
vividElement.observable
|
|
862
861
|
], OptionTag.prototype, "hasIconPlaceholder");
|
|
863
862
|
applyMixins.applyMixins(OptionTag, localized.Localized);
|
|
864
863
|
|
|
@@ -870,13 +869,13 @@ const getStateClasses = (x) => classNames.classNames(
|
|
|
870
869
|
["success", !!x.successText]
|
|
871
870
|
);
|
|
872
871
|
function renderLabel() {
|
|
873
|
-
return
|
|
872
|
+
return vividElement.html`
|
|
874
873
|
<label for="control" class="label" id="label"> ${(x) => x.label} </label>
|
|
875
874
|
`;
|
|
876
875
|
}
|
|
877
876
|
const tagTemplateFactory = (context, getComponent) => {
|
|
878
877
|
const optionTagTag = context.tagFor(OptionTag);
|
|
879
|
-
return
|
|
878
|
+
return vividElement.html`
|
|
880
879
|
<div class="tag-wrapper">
|
|
881
880
|
<${optionTagTag}
|
|
882
881
|
class="tag"
|
|
@@ -896,7 +895,7 @@ const tagTemplateFactory = (context, getComponent) => {
|
|
|
896
895
|
};
|
|
897
896
|
const elidedTagTemplateFactory = (context, getComponent) => {
|
|
898
897
|
const optionTagTag = context.tagFor(OptionTag);
|
|
899
|
-
return
|
|
898
|
+
return vividElement.html`
|
|
900
899
|
<${optionTagTag}
|
|
901
900
|
class="tag"
|
|
902
901
|
tabindex="-1"
|
|
@@ -921,7 +920,7 @@ function renderFieldset(context) {
|
|
|
921
920
|
context,
|
|
922
921
|
(_, c) => c.parent
|
|
923
922
|
);
|
|
924
|
-
return
|
|
923
|
+
return vividElement.html`
|
|
925
924
|
<div
|
|
926
925
|
class="fieldset ${getStateClasses}"
|
|
927
926
|
@click="${(x, c) => x._onFieldsetClick(c.event)}"
|
|
@@ -931,7 +930,7 @@ function renderFieldset(context) {
|
|
|
931
930
|
<div class="content-area" ${ref.ref("_contentArea")}>
|
|
932
931
|
${repeat.repeat(
|
|
933
932
|
(x) => x._tagRows,
|
|
934
|
-
|
|
933
|
+
vividElement.html`
|
|
935
934
|
<div class="tag-row">
|
|
936
935
|
${when.when(
|
|
937
936
|
(_, c) => c.isFirst && c.parent._numElidedTags,
|
|
@@ -978,7 +977,7 @@ function renderFieldset(context) {
|
|
|
978
977
|
<slot name="meta"></slot>
|
|
979
978
|
${when.when(
|
|
980
979
|
(x) => x._shouldShowClearButton,
|
|
981
|
-
|
|
980
|
+
vividElement.html`<${buttonTag}
|
|
982
981
|
aria-label="${(x) => x.locale.searchableSelect.clearButtonLabel}"
|
|
983
982
|
@click="${(x) => x._onClearButtonClick()}"
|
|
984
983
|
@mousedown="${() => false}"
|
|
@@ -996,7 +995,7 @@ function renderFieldset(context) {
|
|
|
996
995
|
}
|
|
997
996
|
function renderControl(context) {
|
|
998
997
|
const popupTag = context.tagFor(definition.Popup);
|
|
999
|
-
return
|
|
998
|
+
return vividElement.html`
|
|
1000
999
|
${when.when((x) => x.label, renderLabel())}
|
|
1001
1000
|
<span aria-live="assertive" aria-relevant="text" class="visually-hidden">
|
|
1002
1001
|
${(x) => x._changeDescription}
|
|
@@ -1028,16 +1027,16 @@ function renderControl(context) {
|
|
|
1028
1027
|
</slot>
|
|
1029
1028
|
${when.when(
|
|
1030
1029
|
(x) => x._filteredOptions.length === 0,
|
|
1031
|
-
|
|
1030
|
+
vividElement.html`<div class="empty-message">
|
|
1032
1031
|
${when.when(
|
|
1033
1032
|
(x) => x._inputValue === "",
|
|
1034
|
-
|
|
1033
|
+
vividElement.html`<slot name="no-options">
|
|
1035
1034
|
${(x) => x.locale.searchableSelect.noOptionsMessage}
|
|
1036
1035
|
</slot>`
|
|
1037
1036
|
)}
|
|
1038
1037
|
${when.when(
|
|
1039
1038
|
(x) => x._inputValue !== "",
|
|
1040
|
-
|
|
1039
|
+
vividElement.html`<slot name="no-matches">
|
|
1041
1040
|
${(x) => x.locale.searchableSelect.noMatchesMessage}
|
|
1042
1041
|
</slot>`
|
|
1043
1042
|
)}
|
|
@@ -1051,7 +1050,7 @@ function renderControl(context) {
|
|
|
1051
1050
|
}
|
|
1052
1051
|
const SearchableSelectTemplate = (context) => {
|
|
1053
1052
|
const optionTagTag = context.tagFor(OptionTag);
|
|
1054
|
-
return
|
|
1053
|
+
return vividElement.html`
|
|
1055
1054
|
<template :_optionTagTagName="${() => optionTagTag}">
|
|
1056
1055
|
<div class="control-wrapper">
|
|
1057
1056
|
${renderControl(context)} ${formElements.getFeedbackTemplate(context)}
|
|
@@ -1067,7 +1066,7 @@ const getClasses = ({ shape, disabled, removable }) => classNames.classNames(
|
|
|
1067
1066
|
[`shape-${shape}`, Boolean(shape)]
|
|
1068
1067
|
);
|
|
1069
1068
|
function renderRemoveButton(iconTag) {
|
|
1070
|
-
return
|
|
1069
|
+
return vividElement.html`
|
|
1071
1070
|
<span
|
|
1072
1071
|
class="remove-button"
|
|
1073
1072
|
aria-label="${(x) => x.locale.searchableSelect.removeTagButtonLabel(x.label)}"
|
|
@@ -1081,22 +1080,22 @@ function renderRemoveButton(iconTag) {
|
|
|
1081
1080
|
}
|
|
1082
1081
|
const optionTagTemplate = (context) => {
|
|
1083
1082
|
const iconTag = context.tagFor(definition$2.Icon);
|
|
1084
|
-
return
|
|
1083
|
+
return vividElement.html`<span class="${getClasses}" aria-disabled="${(x) => x.disabled}">
|
|
1085
1084
|
<slot name="icon" aria-hidden="true">
|
|
1086
1085
|
${when.when(
|
|
1087
1086
|
(x) => x.hasIconPlaceholder,
|
|
1088
|
-
|
|
1087
|
+
vividElement.html`<div class="icon-placeholder"></div>`
|
|
1089
1088
|
)}
|
|
1090
1089
|
</slot>
|
|
1091
1090
|
${when.when(
|
|
1092
1091
|
(x) => x.label,
|
|
1093
|
-
(x) =>
|
|
1092
|
+
(x) => vividElement.html`<span class="label">${x.label}</span>`
|
|
1094
1093
|
)}
|
|
1095
1094
|
${when.when((x) => x.removable, renderRemoveButton(iconTag))}
|
|
1096
1095
|
</span>`;
|
|
1097
1096
|
};
|
|
1098
1097
|
|
|
1099
|
-
const optionTagDefinition =
|
|
1098
|
+
const optionTagDefinition = vividElement.defineVividComponent(
|
|
1100
1099
|
"option-tag",
|
|
1101
1100
|
OptionTag,
|
|
1102
1101
|
optionTagTemplate,
|
|
@@ -1108,7 +1107,7 @@ const optionTagDefinition = defineVividComponent.defineVividComponent(
|
|
|
1108
1107
|
}
|
|
1109
1108
|
}
|
|
1110
1109
|
);
|
|
1111
|
-
const searchableSelectDefinition =
|
|
1110
|
+
const searchableSelectDefinition = vividElement.defineVividComponent(
|
|
1112
1111
|
"searchable-select",
|
|
1113
1112
|
SearchableSelect,
|
|
1114
1113
|
SearchableSelectTemplate,
|
|
@@ -1120,7 +1119,7 @@ const searchableSelectDefinition = defineVividComponent.defineVividComponent(
|
|
|
1120
1119
|
}
|
|
1121
1120
|
}
|
|
1122
1121
|
);
|
|
1123
|
-
const registerSearchableSelect =
|
|
1122
|
+
const registerSearchableSelect = vividElement.createRegisterFunction(
|
|
1124
1123
|
searchableSelectDefinition
|
|
1125
1124
|
);
|
|
1126
1125
|
|
package/shared/definition42.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { B as Button, c as chevronTemplateFactory, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { P as Popup, p as popupDefinition } from './definition63.js';
|
|
3
3
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
4
|
-
import { O as Observable, D as DOM, a as attr, n as nullableNumberConverter, o as observable, h as html, f as createRegisterFunction, d as defineVividComponent } from './
|
|
4
|
+
import { V as VividElement, O as Observable, D as DOM, a as attr, n as nullableNumberConverter, o as observable, h as html, f as createRegisterFunction, d as defineVividComponent } from './vivid-element.js';
|
|
5
5
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
6
6
|
import { s as scrollIntoView } from './scrollIntoView.js';
|
|
7
7
|
import { F as FormAssociated } from './form-associated.js';
|
|
8
|
-
import { V as VividElement } from './vivid-element.js';
|
|
9
8
|
import { b as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
10
9
|
import { L as Localized } from './localized.js';
|
|
11
10
|
import { F as FormElementSuccessText, a as FormElementHelperText, e as errorText, f as formElements, g as getFeedbackTemplate } from './form-elements.js';
|
|
12
11
|
import { a as Listbox } from './listbox2.js';
|
|
13
12
|
import { a as applyMixins } from './apply-mixins.js';
|
|
14
|
-
import { F as FoundationElement } from './
|
|
13
|
+
import { F as FoundationElement } from './key-codes2.js';
|
|
15
14
|
import { w as when } from './when.js';
|
|
16
15
|
import { r as ref } from './ref.js';
|
|
17
16
|
import { s as slotted } from './slotted.js';
|
package/shared/definition43.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const definition = require('./definition63.cjs');
|
|
4
4
|
const definition$3 = require('./definition27.cjs');
|
|
5
5
|
const definition$1 = require('./definition35.cjs');
|
|
6
|
-
const
|
|
6
|
+
const vividElement = require('./vivid-element.cjs');
|
|
7
7
|
const listbox$1 = require('./listbox2.cjs');
|
|
8
8
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
9
9
|
const listbox = require('./listbox.cjs');
|
|
@@ -321,7 +321,7 @@ let Select = class extends FormAssociatedSelect {
|
|
|
321
321
|
this.ariaExpanded = "true";
|
|
322
322
|
this.focusAndScrollOptionIntoView();
|
|
323
323
|
this.indexWhenOpened = this.selectedIndex;
|
|
324
|
-
|
|
324
|
+
vividElement.DOM.queueUpdate(() => this.focus());
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
const didClose = prev === true && next === false;
|
|
@@ -341,7 +341,7 @@ let Select = class extends FormAssociatedSelect {
|
|
|
341
341
|
* @public
|
|
342
342
|
*/
|
|
343
343
|
get value() {
|
|
344
|
-
|
|
344
|
+
vividElement.Observable.track(this, "value");
|
|
345
345
|
return this._value;
|
|
346
346
|
}
|
|
347
347
|
set value(next) {
|
|
@@ -359,7 +359,7 @@ let Select = class extends FormAssociatedSelect {
|
|
|
359
359
|
if (prev !== next) {
|
|
360
360
|
this._value = next;
|
|
361
361
|
super.valueChanged(prev, next);
|
|
362
|
-
|
|
362
|
+
vividElement.Observable.notify(this, "value");
|
|
363
363
|
this.updateDisplayValue();
|
|
364
364
|
}
|
|
365
365
|
}
|
|
@@ -652,7 +652,7 @@ let Select = class extends FormAssociatedSelect {
|
|
|
652
652
|
*/
|
|
653
653
|
updateDisplayValue() {
|
|
654
654
|
if (this.collapsible) {
|
|
655
|
-
|
|
655
|
+
vividElement.Observable.notify(this, "displayValue");
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
labelChanged() {
|
|
@@ -661,7 +661,7 @@ let Select = class extends FormAssociatedSelect {
|
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
get displayValue() {
|
|
664
|
-
|
|
664
|
+
vividElement.Observable.track(this, "displayValue");
|
|
665
665
|
return this.firstSelectedOption?.getAttribute("label") ?? this.firstSelectedOption?.text ?? this.placeholder ?? "";
|
|
666
666
|
}
|
|
667
667
|
setDefaultSelectedOption() {
|
|
@@ -685,12 +685,12 @@ let Select = class extends FormAssociatedSelect {
|
|
|
685
685
|
*/
|
|
686
686
|
slottedOptionsChanged(prev, next) {
|
|
687
687
|
this.options.forEach((o) => {
|
|
688
|
-
const notifier =
|
|
688
|
+
const notifier = vividElement.Observable.getNotifier(o);
|
|
689
689
|
notifier.unsubscribe(this, "value");
|
|
690
690
|
});
|
|
691
691
|
super.slottedOptionsChanged(prev, next);
|
|
692
692
|
this.options.forEach((o) => {
|
|
693
|
-
const notifier =
|
|
693
|
+
const notifier = vividElement.Observable.getNotifier(o);
|
|
694
694
|
notifier.subscribe(this, "value");
|
|
695
695
|
});
|
|
696
696
|
this.setProxyOptions();
|
|
@@ -717,50 +717,50 @@ let Select = class extends FormAssociatedSelect {
|
|
|
717
717
|
}
|
|
718
718
|
};
|
|
719
719
|
__decorateClass([
|
|
720
|
-
|
|
720
|
+
vividElement.observable
|
|
721
721
|
], Select.prototype, "activeIndex", 2);
|
|
722
722
|
// @ts-expect-error Type is incorrectly non-optional
|
|
723
723
|
__decorateClass([
|
|
724
|
-
|
|
724
|
+
vividElement.attr({ mode: "boolean" })
|
|
725
725
|
], Select.prototype, "multiple", 2);
|
|
726
726
|
__decorateClass([
|
|
727
|
-
|
|
727
|
+
vividElement.attr({ attribute: "open", mode: "boolean" })
|
|
728
728
|
], Select.prototype, "open", 2);
|
|
729
729
|
__decorateClass([
|
|
730
|
-
|
|
730
|
+
vividElement.volatile
|
|
731
731
|
], Select.prototype, "collapsible", 1);
|
|
732
732
|
__decorateClass([
|
|
733
|
-
|
|
733
|
+
vividElement.observable
|
|
734
734
|
], Select.prototype, "control", 2);
|
|
735
735
|
__decorateClass([
|
|
736
|
-
|
|
736
|
+
vividElement.observable
|
|
737
737
|
], Select.prototype, "maxHeight", 2);
|
|
738
738
|
__decorateClass([
|
|
739
|
-
|
|
739
|
+
vividElement.observable
|
|
740
740
|
], Select.prototype, "_anchor", 2);
|
|
741
741
|
__decorateClass([
|
|
742
|
-
|
|
742
|
+
vividElement.attr()
|
|
743
743
|
], Select.prototype, "scale", 2);
|
|
744
744
|
__decorateClass([
|
|
745
|
-
|
|
745
|
+
vividElement.attr
|
|
746
746
|
], Select.prototype, "appearance", 2);
|
|
747
747
|
__decorateClass([
|
|
748
|
-
|
|
748
|
+
vividElement.attr
|
|
749
749
|
], Select.prototype, "shape", 2);
|
|
750
750
|
__decorateClass([
|
|
751
|
-
|
|
751
|
+
vividElement.attr({ mode: "boolean", attribute: "fixed-dropdown" })
|
|
752
752
|
], Select.prototype, "fixedDropdown", 2);
|
|
753
753
|
__decorateClass([
|
|
754
|
-
|
|
754
|
+
vividElement.attr
|
|
755
755
|
], Select.prototype, "placeholder", 2);
|
|
756
756
|
__decorateClass([
|
|
757
|
-
|
|
757
|
+
vividElement.observable
|
|
758
758
|
], Select.prototype, "placeholderOption", 2);
|
|
759
759
|
__decorateClass([
|
|
760
|
-
|
|
760
|
+
vividElement.observable
|
|
761
761
|
], Select.prototype, "_feedbackWrapper", 2);
|
|
762
762
|
__decorateClass([
|
|
763
|
-
|
|
763
|
+
vividElement.observable
|
|
764
764
|
], Select.prototype, "metaSlottedContent", 2);
|
|
765
765
|
Select = __decorateClass([
|
|
766
766
|
formElements.errorText,
|
|
@@ -770,7 +770,7 @@ class DelegatesARIASelect {
|
|
|
770
770
|
}
|
|
771
771
|
// @ts-expect-error Type is incorrectly non-optional
|
|
772
772
|
__decorateClass([
|
|
773
|
-
|
|
773
|
+
vividElement.observable
|
|
774
774
|
], DelegatesARIASelect.prototype, "ariaControls", 2);
|
|
775
775
|
applyMixinsWithObservables.applyMixinsWithObservables(
|
|
776
776
|
Select,
|
|
@@ -802,13 +802,13 @@ const getStateClasses = ({
|
|
|
802
802
|
[`size-${scale}`, Boolean(scale)]
|
|
803
803
|
);
|
|
804
804
|
function renderLabel() {
|
|
805
|
-
return
|
|
805
|
+
return vividElement.html` <label for="control" class="label" id="label">
|
|
806
806
|
${(x) => x.label}
|
|
807
807
|
</label>`;
|
|
808
808
|
}
|
|
809
809
|
function renderPlaceholder(context) {
|
|
810
810
|
const optionTag = context.tagFor(definition$1.ListboxOption);
|
|
811
|
-
return
|
|
811
|
+
return vividElement.html`
|
|
812
812
|
<${optionTag} ${ref.ref("placeholderOption")}
|
|
813
813
|
text="${(x) => x.placeholder}" hidden disabled>
|
|
814
814
|
</${optionTag}>`;
|
|
@@ -816,7 +816,7 @@ function renderPlaceholder(context) {
|
|
|
816
816
|
function selectValue(context) {
|
|
817
817
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
818
818
|
const chevronTemplate = definition$2.chevronTemplateFactory(context);
|
|
819
|
-
return
|
|
819
|
+
return vividElement.html` <div
|
|
820
820
|
class="control ${getStateClasses}"
|
|
821
821
|
${ref.ref("_anchor")}
|
|
822
822
|
id="control"
|
|
@@ -835,7 +835,7 @@ function setFixedDropdownVarWidth(x) {
|
|
|
835
835
|
}
|
|
836
836
|
function renderControl(context) {
|
|
837
837
|
const popupTag = context.tagFor(definition.Popup);
|
|
838
|
-
return
|
|
838
|
+
return vividElement.html`
|
|
839
839
|
${when.when((x) => x.label, renderLabel())}
|
|
840
840
|
<div class="control-wrapper">
|
|
841
841
|
${when.when((x) => !x.multiple, selectValue(context))}
|
|
@@ -873,7 +873,7 @@ function ifNotFromFeedback(handler) {
|
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
875
|
const SelectTemplate = (context) => {
|
|
876
|
-
return
|
|
876
|
+
return vividElement.html`
|
|
877
877
|
<template
|
|
878
878
|
class="base"
|
|
879
879
|
aria-label="${(x) => x.ariaLabel}"
|
|
@@ -906,7 +906,7 @@ const SelectTemplate = (context) => {
|
|
|
906
906
|
`;
|
|
907
907
|
};
|
|
908
908
|
|
|
909
|
-
const selectDefinition =
|
|
909
|
+
const selectDefinition = vividElement.defineVividComponent(
|
|
910
910
|
"select",
|
|
911
911
|
Select,
|
|
912
912
|
SelectTemplate,
|
|
@@ -915,7 +915,7 @@ const selectDefinition = defineVividComponent.defineVividComponent(
|
|
|
915
915
|
styles
|
|
916
916
|
}
|
|
917
917
|
);
|
|
918
|
-
const registerSelect =
|
|
918
|
+
const registerSelect = vividElement.createRegisterFunction(selectDefinition);
|
|
919
919
|
|
|
920
920
|
exports.registerSelect = registerSelect;
|
|
921
921
|
exports.selectDefinition = selectDefinition;
|
package/shared/definition43.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as Popup, p as popupDefinition } from './definition63.js';
|
|
2
2
|
import { i as iconDefinition } from './definition27.js';
|
|
3
3
|
import { L as ListboxOption, l as listboxOptionDefinition } from './definition35.js';
|
|
4
|
-
import { D as DOM, O as Observable, o as observable, a as attr, v as volatile, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
4
|
+
import { D as DOM, O as Observable, o as observable, a as attr, v as volatile, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
5
5
|
import { a as Listbox$1 } from './listbox2.js';
|
|
6
6
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
7
7
|
import { L as Listbox } from './listbox.js';
|
package/shared/definition44.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition15.cjs');
|
|
4
4
|
const definition$1 = require('./definition40.cjs');
|
|
5
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
6
5
|
const vividElement = require('./vivid-element.cjs');
|
|
7
6
|
const enums = require('./enums.cjs');
|
|
8
7
|
const classNames = require('./class-names.cjs');
|
|
@@ -46,25 +45,25 @@ class SelectableBox extends vividElement.VividElement {
|
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
__decorateClass([
|
|
49
|
-
|
|
48
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
50
49
|
], SelectableBox.prototype, "ariaLabel");
|
|
51
50
|
__decorateClass([
|
|
52
|
-
|
|
51
|
+
vividElement.attr({ mode: "boolean" })
|
|
53
52
|
], SelectableBox.prototype, "checked");
|
|
54
53
|
__decorateClass([
|
|
55
|
-
|
|
54
|
+
vividElement.attr({ mode: "boolean" })
|
|
56
55
|
], SelectableBox.prototype, "clickable");
|
|
57
56
|
__decorateClass([
|
|
58
|
-
|
|
57
|
+
vividElement.attr({ attribute: "clickable-box", mode: "boolean" })
|
|
59
58
|
], SelectableBox.prototype, "clickableBox");
|
|
60
59
|
__decorateClass([
|
|
61
|
-
|
|
60
|
+
vividElement.attr
|
|
62
61
|
], SelectableBox.prototype, "connotation");
|
|
63
62
|
__decorateClass([
|
|
64
|
-
|
|
63
|
+
vividElement.attr({ attribute: "control-type" })
|
|
65
64
|
], SelectableBox.prototype, "controlType");
|
|
66
65
|
__decorateClass([
|
|
67
|
-
|
|
66
|
+
vividElement.attr({ mode: "boolean" })
|
|
68
67
|
], SelectableBox.prototype, "tight");
|
|
69
68
|
|
|
70
69
|
const getClasses = ({
|
|
@@ -86,9 +85,9 @@ function handleControlChange(x) {
|
|
|
86
85
|
}
|
|
87
86
|
function checkbox(context) {
|
|
88
87
|
const checkboxTag = context.tagFor(definition.Checkbox);
|
|
89
|
-
return
|
|
88
|
+
return vividElement.html`${when.when(
|
|
90
89
|
(x) => x.controlType !== "radio",
|
|
91
|
-
|
|
90
|
+
vividElement.html`
|
|
92
91
|
<${checkboxTag}
|
|
93
92
|
aria-label="${(x) => !x.clickableBox && !x.clickable && x.ariaLabel ? x.ariaLabel : null}"
|
|
94
93
|
@change="${(x) => handleControlChange(x)}"
|
|
@@ -101,9 +100,9 @@ function checkbox(context) {
|
|
|
101
100
|
}
|
|
102
101
|
function radio(context) {
|
|
103
102
|
const radioTag = context.tagFor(definition$1.Radio);
|
|
104
|
-
return
|
|
103
|
+
return vividElement.html`${when.when(
|
|
105
104
|
(x) => x.controlType === "radio",
|
|
106
|
-
|
|
105
|
+
vividElement.html`
|
|
107
106
|
<${radioTag}
|
|
108
107
|
aria-label="${(x) => !x.clickableBox && !x.clickable && x.ariaLabel ? x.ariaLabel : null}"
|
|
109
108
|
@change="${(x) => handleControlChange(x)}"
|
|
@@ -115,7 +114,7 @@ function radio(context) {
|
|
|
115
114
|
)} `;
|
|
116
115
|
}
|
|
117
116
|
const SelectableBoxTemplate = (context) => {
|
|
118
|
-
return
|
|
117
|
+
return vividElement.html`<template role="presentation">
|
|
119
118
|
<div
|
|
120
119
|
class="${getClasses}"
|
|
121
120
|
tabindex="${(x) => x.clickableBox || x.clickable ? "0" : null}"
|
|
@@ -131,7 +130,7 @@ const SelectableBoxTemplate = (context) => {
|
|
|
131
130
|
</template>`;
|
|
132
131
|
};
|
|
133
132
|
|
|
134
|
-
const selectableBoxDefinition =
|
|
133
|
+
const selectableBoxDefinition = vividElement.defineVividComponent(
|
|
135
134
|
"selectable-box",
|
|
136
135
|
SelectableBox,
|
|
137
136
|
SelectableBoxTemplate,
|
|
@@ -143,7 +142,7 @@ const selectableBoxDefinition = defineVividComponent.defineVividComponent(
|
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
);
|
|
146
|
-
const registerSelectableBox =
|
|
145
|
+
const registerSelectableBox = vividElement.createRegisterFunction(
|
|
147
146
|
selectableBoxDefinition
|
|
148
147
|
);
|
|
149
148
|
|
package/shared/definition44.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { C as Checkbox, c as checkboxDefinition } from './definition15.js';
|
|
2
2
|
import { R as Radio, r as radioDefinition } from './definition40.js';
|
|
3
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
4
|
-
import { V as VividElement } from './vivid-element.js';
|
|
3
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
5
4
|
import { C as Connotation } from './enums.js';
|
|
6
5
|
import { c as classNames } from './class-names.js';
|
|
7
6
|
import { w as when } from './when.js';
|