@vonage/vivid 4.19.0-preview.0 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +922 -742
- package/index.cjs +5 -0
- package/index.d.ts +1 -0
- package/index.js +2 -2
- package/lib/action-group/action-group.d.ts +0 -118
- package/lib/banner/banner.d.ts +0 -118
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +0 -118
- package/lib/checkbox/checkbox.d.ts +0 -118
- package/lib/date-picker/date-picker.d.ts +0 -472
- package/lib/date-range-picker/date-range-picker.d.ts +0 -236
- package/lib/date-time-picker/date-time-picker.d.ts +0 -472
- package/lib/date-time-picker/definition.d.ts +2 -0
- package/lib/dialog/dialog.d.ts +0 -118
- package/lib/divider/divider.d.ts +0 -118
- package/lib/menu/menu.d.ts +0 -236
- package/lib/nav-disclosure/nav-disclosure.d.ts +0 -118
- package/lib/number-field/number-field.d.ts +0 -118
- package/lib/option/option.d.ts +2 -3
- package/lib/pagination/pagination.d.ts +1 -0
- package/lib/progress/progress.d.ts +0 -118
- package/lib/progress-ring/progress-ring.d.ts +0 -118
- package/lib/rich-text-editor/definition.d.ts +2 -0
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +1 -0
- package/lib/rich-text-editor/menubar/definition.d.ts +2 -0
- package/lib/rich-text-editor/menubar/menubar.d.ts +4 -0
- package/lib/rich-text-editor/menubar/menubar.template.d.ts +4 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +7 -0
- package/lib/searchable-select/locale.d.ts +1 -0
- package/lib/searchable-select/searchable-select.d.ts +1 -1
- package/lib/selectable-box/selectable-box.d.ts +0 -118
- package/lib/slider/slider.d.ts +0 -118
- package/lib/split-button/split-button.d.ts +0 -118
- package/lib/switch/switch.d.ts +0 -118
- package/lib/tag-group/tag-group.d.ts +0 -118
- package/lib/tag-name-map.d.ts +73 -0
- package/lib/text-anchor/text-anchor.d.ts +0 -118
- package/lib/text-area/text-area.d.ts +0 -118
- package/lib/text-field/text-field.d.ts +0 -118
- package/lib/time-picker/time-picker.d.ts +0 -236
- package/lib/toggletip/toggletip.d.ts +0 -118
- package/lib/tooltip/tooltip.d.ts +0 -118
- package/locales/de-DE.cjs +1 -0
- package/locales/de-DE.js +1 -0
- package/locales/en-GB.cjs +1 -0
- package/locales/en-GB.js +1 -0
- package/locales/en-US.cjs +1 -0
- package/locales/en-US.js +1 -0
- package/locales/ja-JP.cjs +1 -0
- package/locales/ja-JP.js +1 -0
- package/locales/zh-CN.cjs +1 -0
- package/locales/zh-CN.js +1 -0
- package/package.json +1 -1
- package/shared/aria/delegates-aria.d.ts +0 -118
- package/shared/definition20.cjs +10 -10
- package/shared/definition20.js +1 -1
- package/shared/definition30.cjs +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition36.cjs +7 -7
- package/shared/definition36.js +7 -7
- package/shared/definition37.cjs +15 -1
- package/shared/definition37.js +15 -1
- package/shared/definition4.cjs +13 -12
- package/shared/definition4.js +13 -12
- package/shared/definition43.cjs +221 -12
- package/shared/definition43.js +222 -14
- package/shared/definition44.cjs +35 -39
- package/shared/definition44.js +35 -39
- package/shared/definition63.cjs +232 -157
- package/shared/definition63.js +232 -157
- package/shared/foundation/button/button.d.ts +0 -118
- package/shared/option.cjs +16 -19
- package/shared/option.js +16 -19
- package/shared/patterns/anchored.d.ts +0 -236
- package/shared/picker-field/mixins/calendar-picker.d.ts +0 -118
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +0 -118
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +0 -236
- package/shared/picker-field/mixins/single-date-picker.d.ts +0 -354
- package/shared/picker-field/mixins/single-value-picker.d.ts +0 -118
- package/shared/picker-field/mixins/time-selection-picker.d.ts +0 -236
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +0 -236
- package/shared/picker-field.template.js +1 -1
- package/shared/vivid-element.cjs +1 -1
- package/shared/vivid-element.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/vivid.api.json +1260 -556
package/shared/definition44.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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 './definition65.js';
|
|
3
3
|
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
4
|
+
import { P as ProgressRing, p as progressRingDefinition } from './definition38.js';
|
|
4
5
|
import { V as VividElement, O as Observable, D as DOM, a as attr, n as nullableNumberConverter, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
5
6
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
6
7
|
import { s as scrollIntoView } from './scrollIntoView.js';
|
|
@@ -8,9 +9,8 @@ import { F as FormAssociated } from './form-associated.js';
|
|
|
8
9
|
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
9
10
|
import { L as Localized } from './localized.js';
|
|
10
11
|
import { F as FormElementSuccessText, a as FormElementHelperText, e as errorText, f as formElements, g as getFeedbackTemplate } from './form-elements.js';
|
|
11
|
-
import { a as applyMixins } from './apply-mixins.js';
|
|
12
12
|
import { i as isListboxOption } from './option.js';
|
|
13
|
-
import {
|
|
13
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
14
14
|
import { w as when } from './when.js';
|
|
15
15
|
import { r as ref } from './ref.js';
|
|
16
16
|
import { s as slotted } from './slotted.js';
|
|
@@ -65,7 +65,7 @@ let SearchableSelect = class extends FormAssociatedSearchableSelect {
|
|
|
65
65
|
this.maxLines = null;
|
|
66
66
|
this.values = [];
|
|
67
67
|
this.initialValues = [];
|
|
68
|
-
this.
|
|
68
|
+
this._currentSearchText = null;
|
|
69
69
|
// --- Slotted options ---
|
|
70
70
|
/**
|
|
71
71
|
* @internal
|
|
@@ -179,29 +179,30 @@ let SearchableSelect = class extends FormAssociatedSearchableSelect {
|
|
|
179
179
|
/**
|
|
180
180
|
* @internal
|
|
181
181
|
*/
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
});
|
|
189
|
-
}
|
|
182
|
+
_currentSearchTextChanged() {
|
|
183
|
+
__privateMethod(this, _SearchableSelect_instances, updateFilteredOptions_fn).call(this);
|
|
184
|
+
this.$emit("search-text-change", void 0, {
|
|
185
|
+
bubbles: false,
|
|
186
|
+
composed: false
|
|
187
|
+
});
|
|
190
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* The current search text of the component.
|
|
191
|
+
*/
|
|
191
192
|
get searchText() {
|
|
192
|
-
return this.
|
|
193
|
+
return this._currentSearchText ?? "";
|
|
193
194
|
}
|
|
194
195
|
/**
|
|
195
196
|
* @internal
|
|
196
197
|
*/
|
|
197
198
|
get _inputValue() {
|
|
198
|
-
return this.
|
|
199
|
+
return this._currentSearchText ?? (!this.multiple && this.value !== "" ? __privateMethod(this, _SearchableSelect_instances, textForValue_fn).call(this, this.value) ?? "" : "");
|
|
199
200
|
}
|
|
200
201
|
/**
|
|
201
202
|
* @internal
|
|
202
203
|
*/
|
|
203
204
|
_onInputInput(event) {
|
|
204
|
-
this.
|
|
205
|
+
this._currentSearchText = event.target.value;
|
|
205
206
|
}
|
|
206
207
|
/**
|
|
207
208
|
* @internal
|
|
@@ -215,7 +216,7 @@ let SearchableSelect = class extends FormAssociatedSearchableSelect {
|
|
|
215
216
|
*/
|
|
216
217
|
_onInputBlur(_) {
|
|
217
218
|
this.open = false;
|
|
218
|
-
this.
|
|
219
|
+
this._currentSearchText = null;
|
|
219
220
|
this._changeDescription = "";
|
|
220
221
|
}
|
|
221
222
|
/**
|
|
@@ -333,6 +334,12 @@ let SearchableSelect = class extends FormAssociatedSearchableSelect {
|
|
|
333
334
|
_tagIconSlotName(value) {
|
|
334
335
|
return `_tag-icon-${this.values.indexOf(value)}`;
|
|
335
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* @internal
|
|
339
|
+
*/
|
|
340
|
+
optionFilterChanged() {
|
|
341
|
+
__privateMethod(this, _SearchableSelect_instances, updateFilteredOptions_fn).call(this);
|
|
342
|
+
}
|
|
336
343
|
// --- Tags ---
|
|
337
344
|
/**
|
|
338
345
|
* @internal
|
|
@@ -492,9 +499,6 @@ updateValuesThroughUserInteraction_fn = function(newValues) {
|
|
|
492
499
|
updateValuesWhileMaintainingOrder_fn = function(newValues) {
|
|
493
500
|
const oldSet = new Set(this.values);
|
|
494
501
|
const newSet = new Set(newValues);
|
|
495
|
-
if (oldSet.size === newSet.size && [...oldSet].every((v) => newSet.has(v))) {
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
502
|
this.values = [...this.values].filter((v) => newSet.has(v)).concat([...newValues].filter((v) => !oldSet.has(v)));
|
|
499
503
|
};
|
|
500
504
|
isValidValue_fn = function(value) {
|
|
@@ -531,7 +535,7 @@ handleOptionInteraction_fn = function(option) {
|
|
|
531
535
|
this._changeDescription = isSelection ? this.locale.searchableSelect.optionSelectedMessage(option.text) : this.locale.searchableSelect.optionDeselectedMessage(option.text);
|
|
532
536
|
__privateMethod(this, _SearchableSelect_instances, updateValuesThroughUserInteraction_fn).call(this, newValues);
|
|
533
537
|
if (shouldClearSearchText) {
|
|
534
|
-
this.
|
|
538
|
+
this._currentSearchText = null;
|
|
535
539
|
}
|
|
536
540
|
};
|
|
537
541
|
_clonedTagIcons = new WeakMap();
|
|
@@ -557,17 +561,12 @@ updateClonedTagIconOfOption_fn = function(option) {
|
|
|
557
561
|
};
|
|
558
562
|
updateFilteredOptions_fn = function() {
|
|
559
563
|
const newFilteredOptions = [];
|
|
560
|
-
const
|
|
564
|
+
const optionFilter = this.optionFilter ?? ((option, searchText) => option.text.toLowerCase().includes(searchText.toLowerCase()));
|
|
561
565
|
for (const option of this._slottedOptions ?? []) {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
const matches = filterOption(option, this.searchText);
|
|
567
|
-
option._hidden = !matches;
|
|
568
|
-
option._internalHighlightText = matches ? this.searchText : "";
|
|
569
|
-
}
|
|
570
|
-
if (!option.hidden && !option._hidden) {
|
|
566
|
+
option._vvdSearchText = this.searchText;
|
|
567
|
+
const matches = !this.searchText || optionFilter(option, this.searchText);
|
|
568
|
+
option._isNotMatching = !matches;
|
|
569
|
+
if (!option.hidden && matches) {
|
|
571
570
|
newFilteredOptions.push(option);
|
|
572
571
|
}
|
|
573
572
|
}
|
|
@@ -628,10 +627,7 @@ highlightNextOption_fn = function() {
|
|
|
628
627
|
__privateMethod(this, _SearchableSelect_instances, transitionHighlightedOptionTo_fn).call(this, (this._highlightedOptionIndex ?? -1) + 1);
|
|
629
628
|
};
|
|
630
629
|
textForValue_fn = function(value) {
|
|
631
|
-
|
|
632
|
-
(option2) => option2.value === value
|
|
633
|
-
);
|
|
634
|
-
return option.text;
|
|
630
|
+
return this._slottedOptions?.find((option) => option.value === value)?.text;
|
|
635
631
|
};
|
|
636
632
|
/**
|
|
637
633
|
* @internal
|
|
@@ -799,19 +795,19 @@ __decorateClass$1([
|
|
|
799
795
|
], SearchableSelect.prototype, "_input", 2);
|
|
800
796
|
__decorateClass$1([
|
|
801
797
|
observable
|
|
802
|
-
], SearchableSelect.prototype, "
|
|
798
|
+
], SearchableSelect.prototype, "_currentSearchText", 2);
|
|
803
799
|
__decorateClass$1([
|
|
804
800
|
observable
|
|
805
801
|
], SearchableSelect.prototype, "_slottedOptions", 2);
|
|
806
802
|
__decorateClass$1([
|
|
807
803
|
observable
|
|
808
|
-
], SearchableSelect.prototype, "
|
|
804
|
+
], SearchableSelect.prototype, "optionFilter", 2);
|
|
809
805
|
__decorateClass$1([
|
|
810
806
|
observable
|
|
811
|
-
], SearchableSelect.prototype, "
|
|
807
|
+
], SearchableSelect.prototype, "_filteredOptions", 2);
|
|
812
808
|
__decorateClass$1([
|
|
813
809
|
observable
|
|
814
|
-
], SearchableSelect.prototype, "
|
|
810
|
+
], SearchableSelect.prototype, "_filteredEnabledOptions", 2);
|
|
815
811
|
__decorateClass$1([
|
|
816
812
|
attr({
|
|
817
813
|
mode: "boolean"
|
|
@@ -1082,8 +1078,8 @@ function renderControl(context) {
|
|
|
1082
1078
|
html`<div class="empty-message">
|
|
1083
1079
|
${when(
|
|
1084
1080
|
(x) => x.loading,
|
|
1085
|
-
html
|
|
1086
|
-
|
|
1081
|
+
html`<slot name="loading-options">
|
|
1082
|
+
${(x) => x.locale.searchableSelect.loadingOptionsMessage}
|
|
1087
1083
|
</slot>`
|
|
1088
1084
|
)}
|
|
1089
1085
|
${when(
|