@vonage/vivid 5.3.0 → 5.5.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/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/badge/definition.js +1 -1
- package/banner/definition.js +1 -1
- package/bundled/base-color-picker.cjs +18 -13
- package/bundled/base-color-picker.js +98 -81
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +102 -102
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +1 -1
- package/bundled/definition10.js +2 -2
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +87 -66
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +217 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +83 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +114 -71
- package/bundled/definition19.cjs +26 -27
- package/bundled/definition19.js +171 -180
- package/bundled/definition2.cjs +9 -9
- package/bundled/definition2.js +84 -129
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +19 -19
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +48 -31
- package/bundled/mixins.cjs +1 -1
- package/bundled/mixins.js +1 -1
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +35 -56
- package/bundled/time-selection-picker.template.cjs +12 -12
- package/bundled/time-selection-picker.template.js +13 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -0
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +401 -358
- package/calendar/index.cjs +13 -13
- package/calendar/index.js +171 -143
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/color-picker/definition.cjs +209 -113
- package/color-picker/definition.js +209 -113
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +412 -326
- package/combobox/definition.cjs +7 -27
- package/combobox/definition.js +8 -28
- package/combobox/index.cjs +6 -6
- package/combobox/index.js +57 -71
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +354 -2
- package/data-grid/index.cjs +1 -1
- package/data-grid/index.js +1 -1
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +139 -0
- package/dial-pad/definition.js +139 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +177 -100
- package/dialog/definition.cjs +2 -2
- package/dialog/definition.js +2 -2
- package/dialog/index.cjs +7 -7
- package/dialog/index.js +6 -6
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/fab/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/icon/definition.cjs +56 -22
- package/icon/definition.js +56 -22
- package/index.cjs +3 -4
- package/index.js +2 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- package/lib/combobox/combobox.d.ts +1 -0
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/dial-pad/dial-pad.d.ts +1 -0
- package/lib/divider/divider.d.ts +1 -1
- package/lib/icon/icon.d.ts +1 -0
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/popup/popup.d.ts +1 -1
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/searchable-select.d.ts +3 -0
- package/lib/select/select.d.ts +3 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -1
- package/lib/slider/slider.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/locales/de-DE.cjs +20 -3
- package/locales/de-DE.js +20 -3
- package/locales/en-GB.cjs +21 -4
- package/locales/en-GB.js +21 -4
- package/locales/en-US.cjs +21 -4
- package/locales/en-US.js +21 -4
- package/locales/ja-JP.cjs +20 -3
- package/locales/ja-JP.js +20 -3
- package/locales/zh-CN.cjs +19 -2
- package/locales/zh-CN.js +19 -2
- package/menu/definition.cjs +4 -4
- package/menu/definition.js +4 -4
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +3 -3
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +31 -5
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +2 -3
- package/rich-text-editor/definition.js +1 -2
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1209 -1199
- package/searchable-select/definition.cjs +103 -11
- package/searchable-select/definition.js +103 -11
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +359 -273
- package/select/definition.cjs +30 -44
- package/select/definition.js +30 -44
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +2 -2
- package/shared/aria/aria-mixin.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/simple-color-picker/definition.cjs +9 -7
- package/simple-color-picker/definition.js +9 -7
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +41 -39
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.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/tab/definition.js +1 -1
- package/tag/definition.cjs +34 -14
- package/tag/definition.js +35 -15
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +2 -2
- package/text-field/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +3 -3
- package/tooltip/definition.js +3 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/affix.js +1 -1
- package/unbundled/base-color-picker.cjs +36 -18
- package/unbundled/base-color-picker.js +36 -18
- package/unbundled/calendar-picker.template.cjs +2 -2
- package/unbundled/calendar-picker.template.js +2 -2
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition3.cjs +222 -141
- package/unbundled/definition3.js +220 -139
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/picker-field.template.cjs +3 -36
- package/unbundled/picker-field.template.js +3 -35
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +2 -1
- package/unbundled/time-selection-picker.template.js +2 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +56 -16
- package/video-player/definition.js +56 -16
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +2461 -2445
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +285 -38
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
package/bundled/listbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const p=require("./definition12.cjs"),o=require("./vivid-element.cjs"),d=require("./key-codes.cjs"),u=require("./strings.cjs");function f(r,e){let t=r.length;for(;t--;)if(e(r[t],t,r))return t;return-1}var x=Object.defineProperty,a=(r,e,t,i)=>{for(var s=void 0,n=r.length-1,c;n>=0;n--)(c=r[n])&&(s=c(e,t,s)||s);return s&&x(e,t,s),s};const l=class h extends o.VividElement{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1,this._activeDescendant=null}get firstSelectedOption(){return this.selectedOptions[0]??null}get length(){return this.options.length}get options(){return o.Observable.track(this,"options"),this._options}set options(e){const t=this._options;if(this._options=e,o.Observable.notify(this,"options"),this.$fastController.isConnected){const i=this._newDefaultSelectedIndex(t,e,this.selectedIndex);i!==null&&(this.selectedIndex=i)}}static{this.slottedOptionFilter=e=>p.isListboxOption(e)&&!e.hidden}static{this.TYPE_AHEAD_TIMEOUT_MS=1e3}clickHandler(e){const t=e.target.closest("option,[role=option],[data-vvd-component=option]");if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}focusinHandler(e){!this.shouldSkipFocus&&e.target===e.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^${e}`,"gi");return this.options.filter(i=>i.text.trim().match(t))}getNextSelectableIndex(e){const t=this.options.reduce((i,s,n)=>!i&&!s.disabled&&n>=e?s:i,null);return this.options.indexOf(t)}handleChange(e,t){switch(t){case"selected":{h.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions();break}}}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,h.TYPE_AHEAD_TIMEOUT_MS),this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${e}`}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;const t=e.key;switch(t){case d.keyHome:{e.shiftKey||(e.preventDefault(),this.selectFirstOption());break}case d.keyArrowDown:{e.shiftKey||(e.preventDefault(),this.selectNextOption());break}case d.keyArrowUp:{e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break}case d.keyEnd:{e.preventDefault(),this.selectLastOption();break}case d.keyTab:return this.focusAndScrollOptionIntoView(),!0;case d.keyEnter:case d.keyEscape:return!0;case d.keySpace:if(this.typeaheadExpired)return!0;default:return t.length===1&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}selectedIndexChanged(e,t){const i=this._validSelectedIndex(t);if(t!==i){this.selectedIndex=i;return}this.setSelectedOptions()}_validSelectedIndex(e){return e>this.options.length-1||e<-1?-1:e}selectedOptionsChanged(e,t){const i=t.filter(h.slottedOptionFilter);this.options.forEach(s=>{const n=o.Observable.getNotifier(s);n.unsubscribe(this,"selected"),s.selected=i.includes(s),n.subscribe(this,"selected")})}selectFirstOption(){this.disabled||(this.selectedIndex=this.options.findIndex(e=>!e.disabled))}selectLastOption(){this.disabled||(this.selectedIndex=f(this.options,e=>!e.disabled))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}_newDefaultSelectedIndex(e,t,i){for(const[s,n]of t.entries())if(this._isDefaultSelected(n)&&!e.includes(n))return s;return null}_isDefaultSelected(e){return e.defaultSelected}setSelectedOptions(){this.selectedOptions=this.selectedIndex!==-1?[this.options[this.selectedIndex]]:[],this._activeDescendant=this.firstSelectedOption?.id??"",this.focusAndScrollOptionIntoView()}slottedOptionsChanged(e,t){this.options=t.reduce((s,n)=>(p.isListboxOption(n)&&s.push(n),s),[]);const i=`${this.options.length}`;this.options.forEach((s,n)=>{s.id||(s.id=u.uniqueId("option-")),s.ariaPosInSet=`${n+1}`,s.ariaSetSize=i})}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){const i=this.getTypeaheadMatches();if(i.length){const s=this.options.indexOf(i[0]);s>-1&&(this.selectedIndex=s)}this.typeaheadExpired=!1}}};a([o.attr({mode:"boolean"})],l.prototype,"disabled");a([o.observable],l.prototype,"selectedIndex");a([o.observable],l.prototype,"selectedOptions");a([o.observable],l.prototype,"slottedOptions");a([o.observable],l.prototype,"typeaheadBuffer");a([o.observable],l.prototype,"_activeDescendant");let b=l;exports.Listbox=b;
|
package/bundled/listbox.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { V as
|
|
3
|
-
import { l as
|
|
4
|
-
import { u as
|
|
5
|
-
function
|
|
6
|
-
let t =
|
|
1
|
+
import { i as p } from "./definition12.js";
|
|
2
|
+
import { V as u, O as h, a as f, o as a } from "./vivid-element.js";
|
|
3
|
+
import { l as x, d as O, f as y, m as I, k as b, c as S, b as g, a as m } from "./key-codes.js";
|
|
4
|
+
import { u as _ } from "./strings.js";
|
|
5
|
+
function k(d, e) {
|
|
6
|
+
let t = d.length;
|
|
7
7
|
for (; t--; )
|
|
8
|
-
if (e(
|
|
8
|
+
if (e(d[t], t, d))
|
|
9
9
|
return t;
|
|
10
10
|
return -1;
|
|
11
11
|
}
|
|
12
|
-
var
|
|
13
|
-
for (var s = void 0,
|
|
14
|
-
(
|
|
15
|
-
return s &&
|
|
12
|
+
var v = Object.defineProperty, l = (d, e, t, i) => {
|
|
13
|
+
for (var s = void 0, n = d.length - 1, c; n >= 0; n--)
|
|
14
|
+
(c = d[n]) && (s = c(e, t, s) || s);
|
|
15
|
+
return s && v(e, t, s), s;
|
|
16
16
|
};
|
|
17
|
-
const
|
|
17
|
+
const o = class r extends u {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this._options = [], this.selectedIndex = -1, this.selectedOptions = [], this.shouldSkipFocus = !1, this.typeaheadBuffer = "", this.typeaheadExpired = !0, this.typeaheadTimeout = -1, this._activeDescendant = null;
|
|
20
20
|
}
|
|
@@ -26,14 +26,6 @@ const d = class c extends x {
|
|
|
26
26
|
get firstSelectedOption() {
|
|
27
27
|
return this.selectedOptions[0] ?? null;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Returns true if there is one or more selectable option.
|
|
31
|
-
*
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
get hasSelectableOptions() {
|
|
35
|
-
return this.options.length > 0 && !this.options.every((e) => e.disabled);
|
|
36
|
-
}
|
|
37
29
|
/**
|
|
38
30
|
* The number of options.
|
|
39
31
|
*
|
|
@@ -48,13 +40,21 @@ const d = class c extends x {
|
|
|
48
40
|
* @public
|
|
49
41
|
*/
|
|
50
42
|
get options() {
|
|
51
|
-
return
|
|
43
|
+
return h.track(this, "options"), this._options;
|
|
52
44
|
}
|
|
53
45
|
set options(e) {
|
|
54
|
-
|
|
46
|
+
const t = this._options;
|
|
47
|
+
if (this._options = e, h.notify(this, "options"), this.$fastController.isConnected) {
|
|
48
|
+
const i = this._newDefaultSelectedIndex(
|
|
49
|
+
t,
|
|
50
|
+
e,
|
|
51
|
+
this.selectedIndex
|
|
52
|
+
);
|
|
53
|
+
i !== null && (this.selectedIndex = i);
|
|
54
|
+
}
|
|
55
55
|
}
|
|
56
56
|
static {
|
|
57
|
-
this.slottedOptionFilter = (e) =>
|
|
57
|
+
this.slottedOptionFilter = (e) => p(e) && !e.hidden;
|
|
58
58
|
}
|
|
59
59
|
static {
|
|
60
60
|
this.TYPE_AHEAD_TIMEOUT_MS = 1e3;
|
|
@@ -102,36 +102,14 @@ const d = class c extends x {
|
|
|
102
102
|
/[.*+\-?^${}()|[\]\\]/g,
|
|
103
103
|
"\\$&"
|
|
104
104
|
), t = new RegExp(`^${e}`, "gi");
|
|
105
|
-
return this.options.filter((
|
|
105
|
+
return this.options.filter((i) => i.text.trim().match(t));
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
getSelectableIndex(e, t) {
|
|
116
|
-
const n = e > t ? -1 : 1, s = e + n;
|
|
117
|
-
let i = null;
|
|
118
|
-
switch (n) {
|
|
119
|
-
case -1: {
|
|
120
|
-
i = this.options.reduceRight(
|
|
121
|
-
(o, h, p) => !o && !h.disabled && p < s ? h : o,
|
|
122
|
-
i
|
|
123
|
-
);
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
case 1: {
|
|
127
|
-
i = this.options.reduce(
|
|
128
|
-
(o, h, p) => !o && !h.disabled && p > s ? h : o,
|
|
129
|
-
i
|
|
130
|
-
);
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return this.options.indexOf(i);
|
|
107
|
+
getNextSelectableIndex(e) {
|
|
108
|
+
const t = this.options.reduce(
|
|
109
|
+
(i, s, n) => !i && !s.disabled && n >= e ? s : i,
|
|
110
|
+
null
|
|
111
|
+
);
|
|
112
|
+
return this.options.indexOf(t);
|
|
135
113
|
}
|
|
136
114
|
/**
|
|
137
115
|
* Handles external changes to child options.
|
|
@@ -144,7 +122,7 @@ const d = class c extends x {
|
|
|
144
122
|
handleChange(e, t) {
|
|
145
123
|
switch (t) {
|
|
146
124
|
case "selected": {
|
|
147
|
-
|
|
125
|
+
r.slottedOptionFilter(e) && (this.selectedIndex = this.options.indexOf(e)), this.setSelectedOptions();
|
|
148
126
|
break;
|
|
149
127
|
}
|
|
150
128
|
}
|
|
@@ -162,7 +140,7 @@ const d = class c extends x {
|
|
|
162
140
|
handleTypeAhead(e) {
|
|
163
141
|
this.typeaheadTimeout && window.clearTimeout(this.typeaheadTimeout), this.typeaheadTimeout = window.setTimeout(
|
|
164
142
|
() => this.typeaheadExpired = !0,
|
|
165
|
-
|
|
143
|
+
r.TYPE_AHEAD_TIMEOUT_MS
|
|
166
144
|
), this.typeaheadBuffer = `${this.typeaheadExpired ? "" : this.typeaheadBuffer}${e}`;
|
|
167
145
|
}
|
|
168
146
|
/**
|
|
@@ -176,28 +154,28 @@ const d = class c extends x {
|
|
|
176
154
|
this.shouldSkipFocus = !1;
|
|
177
155
|
const t = e.key;
|
|
178
156
|
switch (t) {
|
|
179
|
-
case
|
|
157
|
+
case m: {
|
|
180
158
|
e.shiftKey || (e.preventDefault(), this.selectFirstOption());
|
|
181
159
|
break;
|
|
182
160
|
}
|
|
183
|
-
case
|
|
161
|
+
case g: {
|
|
184
162
|
e.shiftKey || (e.preventDefault(), this.selectNextOption());
|
|
185
163
|
break;
|
|
186
164
|
}
|
|
187
|
-
case
|
|
165
|
+
case S: {
|
|
188
166
|
e.shiftKey || (e.preventDefault(), this.selectPreviousOption());
|
|
189
167
|
break;
|
|
190
168
|
}
|
|
191
|
-
case
|
|
169
|
+
case b: {
|
|
192
170
|
e.preventDefault(), this.selectLastOption();
|
|
193
171
|
break;
|
|
194
172
|
}
|
|
195
|
-
case g:
|
|
196
|
-
return this.focusAndScrollOptionIntoView(), !0;
|
|
197
173
|
case I:
|
|
174
|
+
return this.focusAndScrollOptionIntoView(), !0;
|
|
175
|
+
case y:
|
|
198
176
|
case O:
|
|
199
177
|
return !0;
|
|
200
|
-
case
|
|
178
|
+
case x:
|
|
201
179
|
if (this.typeaheadExpired)
|
|
202
180
|
return !0;
|
|
203
181
|
default:
|
|
@@ -222,27 +200,26 @@ const d = class c extends x {
|
|
|
222
200
|
* @internal
|
|
223
201
|
*/
|
|
224
202
|
selectedIndexChanged(e, t) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
if (this.options[this.selectedIndex]?.disabled && typeof e == "number") {
|
|
230
|
-
const n = this.getSelectableIndex(e, t), s = n > -1 ? n : e;
|
|
231
|
-
this.selectedIndex = s;
|
|
203
|
+
const i = this._validSelectedIndex(t);
|
|
204
|
+
if (t !== i) {
|
|
205
|
+
this.selectedIndex = i;
|
|
232
206
|
return;
|
|
233
207
|
}
|
|
234
208
|
this.setSelectedOptions();
|
|
235
209
|
}
|
|
210
|
+
_validSelectedIndex(e) {
|
|
211
|
+
return e > this.options.length - 1 || e < -1 ? -1 : e;
|
|
212
|
+
}
|
|
236
213
|
/**
|
|
237
214
|
* Updates the selectedness of each option when the list of selected options changes.
|
|
238
215
|
*
|
|
239
216
|
* @internal
|
|
240
217
|
*/
|
|
241
218
|
selectedOptionsChanged(e, t) {
|
|
242
|
-
const
|
|
219
|
+
const i = t.filter(r.slottedOptionFilter);
|
|
243
220
|
this.options.forEach((s) => {
|
|
244
|
-
const
|
|
245
|
-
|
|
221
|
+
const n = h.getNotifier(s);
|
|
222
|
+
n.unsubscribe(this, "selected"), s.selected = i.includes(s), n.subscribe(this, "selected");
|
|
246
223
|
});
|
|
247
224
|
}
|
|
248
225
|
/**
|
|
@@ -259,7 +236,7 @@ const d = class c extends x {
|
|
|
259
236
|
* @internal
|
|
260
237
|
*/
|
|
261
238
|
selectLastOption() {
|
|
262
|
-
this.disabled || (this.selectedIndex =
|
|
239
|
+
this.disabled || (this.selectedIndex = k(this.options, (e) => !e.disabled));
|
|
263
240
|
}
|
|
264
241
|
/**
|
|
265
242
|
* Moves focus to the next selectable option.
|
|
@@ -277,13 +254,16 @@ const d = class c extends x {
|
|
|
277
254
|
selectPreviousOption() {
|
|
278
255
|
!this.disabled && this.selectedIndex > 0 && (this.selectedIndex = this.selectedIndex - 1);
|
|
279
256
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
257
|
+
/// For this options change, determine if selectedIndex should change based on defaultSelected. Otherwise, returns null.
|
|
258
|
+
_newDefaultSelectedIndex(e, t, i) {
|
|
259
|
+
for (const [s, n] of t.entries())
|
|
260
|
+
if (this._isDefaultSelected(n) && !e.includes(n))
|
|
261
|
+
return s;
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
/// Whether an option should be considered defaultSelected
|
|
265
|
+
_isDefaultSelected(e) {
|
|
266
|
+
return e.defaultSelected;
|
|
287
267
|
}
|
|
288
268
|
/**
|
|
289
269
|
* Sets an option as selected and gives it focus.
|
|
@@ -291,7 +271,7 @@ const d = class c extends x {
|
|
|
291
271
|
* @public
|
|
292
272
|
*/
|
|
293
273
|
setSelectedOptions() {
|
|
294
|
-
this.
|
|
274
|
+
this.selectedOptions = this.selectedIndex !== -1 ? [this.options[this.selectedIndex]] : [], this._activeDescendant = this.firstSelectedOption?.id ?? "", this.focusAndScrollOptionIntoView();
|
|
295
275
|
}
|
|
296
276
|
/**
|
|
297
277
|
* Updates the list of options and resets the selected option when the slotted option content changes.
|
|
@@ -299,11 +279,11 @@ const d = class c extends x {
|
|
|
299
279
|
* @internal
|
|
300
280
|
*/
|
|
301
281
|
slottedOptionsChanged(e, t) {
|
|
302
|
-
this.options = t.reduce((s,
|
|
303
|
-
const
|
|
304
|
-
this.options.forEach((s,
|
|
305
|
-
s.id || (s.id =
|
|
306
|
-
})
|
|
282
|
+
this.options = t.reduce((s, n) => (p(n) && s.push(n), s), []);
|
|
283
|
+
const i = `${this.options.length}`;
|
|
284
|
+
this.options.forEach((s, n) => {
|
|
285
|
+
s.id || (s.id = _("option-")), s.ariaPosInSet = `${n + 1}`, s.ariaSetSize = i;
|
|
286
|
+
});
|
|
307
287
|
}
|
|
308
288
|
/**
|
|
309
289
|
* Updates the filtered list of options when the typeahead buffer changes.
|
|
@@ -312,9 +292,9 @@ const d = class c extends x {
|
|
|
312
292
|
*/
|
|
313
293
|
typeaheadBufferChanged(e, t) {
|
|
314
294
|
if (this.$fastController.isConnected) {
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
const s = this.options.indexOf(
|
|
295
|
+
const i = this.getTypeaheadMatches();
|
|
296
|
+
if (i.length) {
|
|
297
|
+
const s = this.options.indexOf(i[0]);
|
|
318
298
|
s > -1 && (this.selectedIndex = s);
|
|
319
299
|
}
|
|
320
300
|
this.typeaheadExpired = !1;
|
|
@@ -322,24 +302,24 @@ const d = class c extends x {
|
|
|
322
302
|
}
|
|
323
303
|
};
|
|
324
304
|
l([
|
|
325
|
-
|
|
326
|
-
],
|
|
305
|
+
f({ mode: "boolean" })
|
|
306
|
+
], o.prototype, "disabled");
|
|
327
307
|
l([
|
|
328
|
-
|
|
329
|
-
],
|
|
308
|
+
a
|
|
309
|
+
], o.prototype, "selectedIndex");
|
|
330
310
|
l([
|
|
331
|
-
|
|
332
|
-
],
|
|
311
|
+
a
|
|
312
|
+
], o.prototype, "selectedOptions");
|
|
333
313
|
l([
|
|
334
|
-
|
|
335
|
-
],
|
|
314
|
+
a
|
|
315
|
+
], o.prototype, "slottedOptions");
|
|
336
316
|
l([
|
|
337
|
-
|
|
338
|
-
],
|
|
317
|
+
a
|
|
318
|
+
], o.prototype, "typeaheadBuffer");
|
|
339
319
|
l([
|
|
340
|
-
|
|
341
|
-
],
|
|
342
|
-
let
|
|
320
|
+
a
|
|
321
|
+
], o.prototype, "_activeDescendant");
|
|
322
|
+
let A = o;
|
|
343
323
|
export {
|
|
344
|
-
|
|
324
|
+
A as L
|
|
345
325
|
};
|
package/bundled/localized.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const J=require("./vivid-element.cjs"),s="Play",l="Pause",c="Replay",d="Duration",u="LIVE",p="Loaded",b="Progress",g="Fullscreen",m="Mute",h="Unmute",y="Subtitles",L="Captions",f="Chapters",S="Descriptions",P="Close",T="Text",k="White",w="Black",v="Red",C="Green",M="Blue",D="Yellow",B="Magenta",E="Cyan",x="Background",F="Window",$="Transparent",A="Opaque",O="None",R="Raised",I="Depressed",Y="Uniform",N="Casual",W="Script",z="Reset",U="Done",V="Color",G="Opacity",q={"Audio Player":"Audio Player","Video Player":"Video Player",Play:s,Pause:l,Replay:c,"Current Time":"Current Time",Duration:d,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:u,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:p,Progress:b,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:g,"Exit Fullscreen":"Exit Fullscreen",Mute:m,Unmute:h,"Playback Rate":"Playback Rate",Subtitles:y,"subtitles off":"subtitles off",Captions:L,"captions off":"captions off",Chapters:f,Descriptions:S,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:P,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:T,White:k,Black:w,Red:v,Green:C,Blue:M,Yellow:D,Magenta:B,Cyan:E,Background:x,Window:F,Transparent:$,"Semi-Transparent":"Semi-Transparent",Opaque:A,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:O,Raised:R,Depressed:I,Uniform:Y,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N,Script:W,"Small Caps":"Small Caps",Reset:z,"restore all settings to the default values":"restore all settings to the default values",Done:U,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V,Opacity:G,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},H=Object.freeze(Object.defineProperty({__proto__:null,Background:x,Black:w,Blue:M,Captions:L,Casual:N,Chapters:f,Close:P,Color:V,Cyan:E,Depressed:I,Descriptions:S,Done:U,Duration:d,Fullscreen:g,Green:C,LIVE:u,Loaded:p,Magenta:B,Mute:m,None:O,Opacity:G,Opaque:A,Pause:l,Play:s,Progress:b,Raised:R,Red:v,Replay:c,Reset:z,Script:W,Subtitles:y,Text:T,Transparent:$,Uniform:Y,Unmute:h,White:k,Window:F,Yellow:D,default:q},Symbol.toStringTag,{value:"Module"})),j={lang:"en-US",common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:"Clear",okLabel:"OK"},calendarPicker:{months:{name:["January","February","March","April","May","June","July","August","September","October","November","December"],shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},weekdays:{name:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},firstDayOfWeek:0,dateFormat:"MM/dd/yyyy",dateFormatPlaceholder:"MM/DD/YYYY",chooseDateLabel:"Choose date",changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:"Choose dates",changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:"Previous year",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",nextYearLabel:"Next year",todayLabel:"today",selectedLabel:"selected",currentLabel:"current",changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:"Please enter a valid date.",invalidDateRangeError:"Please enter a valid date range.",startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:"Choose time",changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:"hours",minutesLabel:"minutes",secondsLabel:"seconds",meridiesLabel:"AM/PM",invalidTimeError:"Please enter a valid time."},dateTimePicker:{chooseDateTimeLabel:"Choose date and time",changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:"Please enter a valid date and time.",dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:"You can't select files of this type.",maxFilesExceededError:"You can't select any more files.",fileTooBigError:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",removeFileLabel:"Remove file",invalidFilesError:"One or more selected files are invalid. Please, upload only valid file types under the size limit.",uploadFilesLabel:"Upload files"},audioPlayer:{playButtonLabel:"Play",pauseButtonLabel:"Pause",sliderLabel:"Audio progress bar",skipForwardButton:"Skip Forward",skipBackwardButton:"Skip Backward"},alert:{dismissButtonLabel:"Close"},dialog:{dismissButtonLabel:"Close"},banner:{dismissButtonLabel:"Close"},numberField:{incrementButtonLabel:e=>e===1?"Increase value":`Increase value by ${e}`,decrementButtonLabel:e=>e===1?"Decrease value":`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:"Show more actions"},videoPlayer:H,rangeSlider:{startThumbLabel:"min",endThumbLabel:"max"},dialPad:{inputLabel:"Phone number",deleteButtonLabel:"Delete last digit",callButtonLabel:"Call",endCallButtonLabel:"End call",digitOneLabel:"1",digitTwoLabel:"2 ABC",digitThreeLabel:"3 DEF",digitFourLabel:"4 GHI",digitFiveLabel:"5 JKL",digitSixLabel:"6 MNO",digitSevenLabel:"7 PQRS",digitEightLabel:"8 TUV",digitNineLabel:"9 WXYZ",digitAsteriskLabel:"*",digitZeroLabel:"0",digitHashtagLabel:"#",errorLabel:"Error:"},tab:{dismissButtonLabel:"Press the DELETE key to close this tab"},searchableSelect:{clearButtonLabel:"Clear selection",noOptionsMessage:"No options",noMatchesMessage:"No options found",loadingOptionsMessage:"Loading...",removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,o,a,r)=>`Option ${e} focused, ${r?"selected, ":""}${o} of ${a}.`,maxSelectedMessage:(e,o)=>`${e} of ${o} selected.`},richTextEditor:{textBlockType:"Text Block Type",textSize:"Text Size",bold:"Bold",italics:"Italics",underline:"Underline",strikethrough:"Strikethrough",monospace:"Monospace",dragAndDropFilesHere:"Drag&Drop files here"},button:{pendingLabel:"Loading..."},feedbackMessage:{errorIconText:"Error:",successIconText:"Success:"},connotationAnnoncement:{accentIcon:"Accent:",alertIcon:"Alert:",informationIcon:"Information:",successIcon:"Success:",warningIcon:"Warning:",announcementIcon:"Announcement:",ctaIcon:"Call to action:"},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:"Selected",button:"(button)"}},pagination:{previousPageLabel:"Go to previous page",nextPageLabel:"Go to next page",goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:"Show more information"},baseColorPicker:{colorSwatchLabel:(e,o,a)=>{let r=o?`Select ${o}, hex: ${e}`:`Select ${e}`;return a&&(r+=", selected."),r}},simpleColorPicker:{colorPaletteLabel:"Color palette"},colorPicker:{popupLabel:"Color Picker",swatchesLabel:"Saved colors:",pickerButtonLabel:"Open Color Picker",saveButtonLabel:"Save current color",closeButtonLabel:"Close Color Picker",copyButtonLabel:"Copy Color to Clipboard",copyErrorText:"Copy failed. Clipboard access was blocked. Try again."}};var K=Object.defineProperty,Z=(e,o,a,r)=>{for(var t=void 0,i=e.length-1,n;i>=0;i--)(n=e[i])&&(t=n(o,a,t)||t);return t&&K(o,a,t),t};class _{constructor(){this.locale=j}}Z([J.observable],_.prototype,"locale");const Q=new _,X=e=>{class o extends e{get locale(){return Q.locale}}return o};exports.Localized=X;
|
|
1
|
+
"use strict";const J=require("./vivid-element.cjs"),n="Play",l="Pause",c="Replay",d="Duration",u="LIVE",p="Loaded",b="Progress",g="Fullscreen",m="Mute",h="Unmute",y="Subtitles",L="Captions",f="Chapters",S="Descriptions",P="Close",T="Text",w="White",k="Black",v="Red",C="Green",M="Blue",D="Yellow",B="Magenta",E="Cyan",x="Background",$="Window",A="Transparent",F="Opaque",R="None",O="Raised",I="Depressed",Y="Uniform",N="Casual",W="Script",z="Reset",U="Done",V="Color",G="Opacity",H={"Audio Player":"Audio Player","Video Player":"Video Player",Play:n,Pause:l,Replay:c,"Current Time":"Current Time",Duration:d,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:u,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:p,Progress:b,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:g,"Exit Fullscreen":"Exit Fullscreen",Mute:m,Unmute:h,"Playback Rate":"Playback Rate",Subtitles:y,"subtitles off":"subtitles off",Captions:L,"captions off":"captions off",Chapters:f,Descriptions:S,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:P,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:T,White:w,Black:k,Red:v,Green:C,Blue:M,Yellow:D,Magenta:B,Cyan:E,Background:x,Window:$,Transparent:A,"Semi-Transparent":"Semi-Transparent",Opaque:F,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:R,Raised:O,Depressed:I,Uniform:Y,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N,Script:W,"Small Caps":"Small Caps",Reset:z,"restore all settings to the default values":"restore all settings to the default values",Done:U,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V,Opacity:G,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},q=Object.freeze(Object.defineProperty({__proto__:null,Background:x,Black:k,Blue:M,Captions:L,Casual:N,Chapters:f,Close:P,Color:V,Cyan:E,Depressed:I,Descriptions:S,Done:U,Duration:d,Fullscreen:g,Green:C,LIVE:u,Loaded:p,Magenta:B,Mute:m,None:R,Opacity:G,Opaque:F,Pause:l,Play:n,Progress:b,Raised:O,Red:v,Replay:c,Reset:z,Script:W,Subtitles:y,Text:T,Transparent:A,Uniform:Y,Unmute:h,White:w,Window:$,Yellow:D,default:H},Symbol.toStringTag,{value:"Module"})),j={lang:"en-US",common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:"Clear",okLabel:"OK"},calendarPicker:{months:{name:["January","February","March","April","May","June","July","August","September","October","November","December"],shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},weekdays:{name:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},firstDayOfWeek:0,dateFormat:"MM/dd/yyyy",dateFormatPlaceholder:"MM/DD/YYYY",chooseDateLabel:"Choose date",changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:"Choose dates",changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:"Previous year",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",nextYearLabel:"Next year",todayLabel:"today",selectedLabel:"selected",currentLabel:"current",changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:"Please enter a valid date.",invalidDateRangeError:"Please enter a valid date range.",startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:"Choose time",changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:"hours",minutesLabel:"minutes",secondsLabel:"seconds",meridiesLabel:"AM/PM",invalidTimeError:"Please enter a valid time."},dateTimePicker:{chooseDateTimeLabel:"Choose date and time",changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:"Please enter a valid date and time.",dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:"You can't select files of this type.",maxFilesExceededError:"You can't select any more files.",fileTooBigError:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",removeFileLabel:"Remove file",invalidFilesError:"One or more selected files are invalid. Please, upload only valid file types under the size limit.",uploadFilesLabel:"Upload files"},audioPlayer:{playButtonLabel:"Play",pauseButtonLabel:"Pause",sliderLabel:"Audio progress bar",skipForwardButton:"Skip Forward",skipBackwardButton:"Skip Backward"},alert:{dismissButtonLabel:"Close"},dialog:{dismissButtonLabel:"Close"},banner:{dismissButtonLabel:"Close"},numberField:{incrementButtonLabel:e=>e===1?"Increase value":`Increase value by ${e}`,decrementButtonLabel:e=>e===1?"Decrease value":`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:"Show more actions"},videoPlayer:q,rangeSlider:{startThumbLabel:"min",endThumbLabel:"max"},dialPad:{inputLabel:"Phone number",deleteButtonLabel:"Delete last digit",callButtonLabel:"Call",endCallButtonLabel:"End call",digitOneLabel:"1",digitTwoLabel:"2 ABC",digitThreeLabel:"3 DEF",digitFourLabel:"4 GHI",digitFiveLabel:"5 JKL",digitSixLabel:"6 MNO",digitSevenLabel:"7 PQRS",digitEightLabel:"8 TUV",digitNineLabel:"9 WXYZ",digitAsteriskLabel:"*",digitZeroLabel:"0",digitHashtagLabel:"#",errorLabel:"Error:"},tab:{dismissButtonLabel:"Press the DELETE key to close this tab"},searchableSelect:{clearButtonLabel:"Clear selection",noOptionsMessage:"No options",noMatchesMessage:"No options found",selectAllLabel:"Select All",deselectAllLabel:"Deselect All",selectedAllMessage:"All options selected",deselectedAllMessage:"All options deselected",loadingOptionsMessage:"Loading...",removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,o,t,r)=>`Option ${e} focused, ${r?"selected, ":""}${o} of ${t}.`,maxSelectedMessage:(e,o)=>`${e} of ${o} selected.`},richTextEditor:{textBlockType:"Text Block Type",textSize:"Text Size",bold:"Bold",italics:"Italics",underline:"Underline",strikethrough:"Strikethrough",monospace:"Monospace",dragAndDropFilesHere:"Drag&Drop files here"},button:{pendingLabel:"Loading..."},feedbackMessage:{errorIconText:"Error:",successIconText:"Success:"},connotationAnnoncement:{accentIcon:"Accent:",alertIcon:"Alert:",informationIcon:"Information:",successIcon:"Success:",warningIcon:"Warning:",announcementIcon:"Announcement:",ctaIcon:"Call to action:"},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:"Selected",button:"(button)"}},pagination:{previousPageLabel:"Go to previous page",nextPageLabel:"Go to next page",goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:"Show more information"},baseColorPicker:{colorSwatchLabel:(e,o,t)=>{let r=o?`Select ${o}, hex: ${e}`:`Select ${e}`;return t&&(r+=", selected."),r}},simpleColorPicker:{colorPaletteLabel:"Color palette"},colorPicker:{popupLabel:"Color Picker",swatchesLabel:"Saved colors",pickerButtonLabel:"Color Picker",hexInputLabel:"HEX color code",saveButtonLabel:"Save current color",closeButtonLabel:"Close Color Picker",copyButtonLabel:"Copy color to clipboard",copyErrorText:"Copy failed. Clipboard access was blocked. Try again.",copySuccessMessage:e=>`Color ${e} copied to clipboard.`,selectionSuccessMessage:e=>`Color ${e} selected.`,maxSwatchesMessage:(e,o)=>`${e} of ${o} colors saved.`}};var K=Object.defineProperty,X=(e,o,t,r)=>{for(var a=void 0,s=e.length-1,i;s>=0;s--)(i=e[s])&&(a=i(o,t,a)||a);return a&&K(o,t,a),a};class _{constructor(){this.locale=j}}X([J.observable],_.prototype,"locale");const Z=new _,Q=e=>{class o extends e{get locale(){return Z.locale}}return o};exports.Localized=Q;
|
package/bundled/localized.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as J } from "./vivid-element.js";
|
|
2
|
-
const
|
|
2
|
+
const n = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Loaded", b = "Progress", g = "Fullscreen", m = "Mute", h = "Unmute", y = "Subtitles", L = "Captions", f = "Chapters", S = "Descriptions", P = "Close", T = "Text", w = "White", k = "Black", v = "Red", C = "Green", M = "Blue", D = "Yellow", B = "Magenta", E = "Cyan", x = "Background", $ = "Window", A = "Transparent", F = "Opaque", R = "None", O = "Raised", I = "Depressed", Y = "Uniform", N = "Casual", W = "Script", U = "Reset", z = "Done", V = "Color", G = "Opacity", H = {
|
|
3
3
|
"Audio Player": "Audio Player",
|
|
4
4
|
"Video Player": "Video Player",
|
|
5
|
-
Play:
|
|
5
|
+
Play: n,
|
|
6
6
|
Pause: l,
|
|
7
7
|
Replay: c,
|
|
8
8
|
"Current Time": "Current Time",
|
|
@@ -50,23 +50,23 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
50
50
|
"subtitles settings": "subtitles settings",
|
|
51
51
|
"descriptions settings": "descriptions settings",
|
|
52
52
|
Text: T,
|
|
53
|
-
White:
|
|
54
|
-
Black:
|
|
55
|
-
Red:
|
|
56
|
-
Green:
|
|
53
|
+
White: w,
|
|
54
|
+
Black: k,
|
|
55
|
+
Red: v,
|
|
56
|
+
Green: C,
|
|
57
57
|
Blue: M,
|
|
58
58
|
Yellow: D,
|
|
59
59
|
Magenta: B,
|
|
60
60
|
Cyan: E,
|
|
61
61
|
Background: x,
|
|
62
|
-
Window:
|
|
63
|
-
Transparent:
|
|
62
|
+
Window: $,
|
|
63
|
+
Transparent: A,
|
|
64
64
|
"Semi-Transparent": "Semi-Transparent",
|
|
65
|
-
Opaque:
|
|
65
|
+
Opaque: F,
|
|
66
66
|
"Font Size": "Font Size",
|
|
67
67
|
"Text Edge Style": "Text Edge Style",
|
|
68
|
-
None:
|
|
69
|
-
Raised:
|
|
68
|
+
None: R,
|
|
69
|
+
Raised: O,
|
|
70
70
|
Depressed: I,
|
|
71
71
|
Uniform: Y,
|
|
72
72
|
"Drop shadow": "Drop shadow",
|
|
@@ -98,7 +98,7 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
98
98
|
}, j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
99
99
|
__proto__: null,
|
|
100
100
|
Background: x,
|
|
101
|
-
Black:
|
|
101
|
+
Black: k,
|
|
102
102
|
Blue: M,
|
|
103
103
|
Captions: L,
|
|
104
104
|
Casual: N,
|
|
@@ -111,29 +111,29 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
111
111
|
Done: z,
|
|
112
112
|
Duration: d,
|
|
113
113
|
Fullscreen: g,
|
|
114
|
-
Green:
|
|
114
|
+
Green: C,
|
|
115
115
|
LIVE: u,
|
|
116
116
|
Loaded: p,
|
|
117
117
|
Magenta: B,
|
|
118
118
|
Mute: m,
|
|
119
|
-
None:
|
|
119
|
+
None: R,
|
|
120
120
|
Opacity: G,
|
|
121
|
-
Opaque:
|
|
121
|
+
Opaque: F,
|
|
122
122
|
Pause: l,
|
|
123
|
-
Play:
|
|
123
|
+
Play: n,
|
|
124
124
|
Progress: b,
|
|
125
|
-
Raised:
|
|
126
|
-
Red:
|
|
125
|
+
Raised: O,
|
|
126
|
+
Red: v,
|
|
127
127
|
Replay: c,
|
|
128
128
|
Reset: U,
|
|
129
129
|
Script: W,
|
|
130
130
|
Subtitles: y,
|
|
131
131
|
Text: T,
|
|
132
|
-
Transparent:
|
|
132
|
+
Transparent: A,
|
|
133
133
|
Uniform: Y,
|
|
134
134
|
Unmute: h,
|
|
135
|
-
White:
|
|
136
|
-
Window:
|
|
135
|
+
White: w,
|
|
136
|
+
Window: $,
|
|
137
137
|
Yellow: D,
|
|
138
138
|
default: H
|
|
139
139
|
}, Symbol.toStringTag, { value: "Module" })), q = {
|
|
@@ -336,6 +336,10 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
336
336
|
clearButtonLabel: "Clear selection",
|
|
337
337
|
noOptionsMessage: "No options",
|
|
338
338
|
noMatchesMessage: "No options found",
|
|
339
|
+
selectAllLabel: "Select All",
|
|
340
|
+
deselectAllLabel: "Deselect All",
|
|
341
|
+
selectedAllMessage: "All options selected",
|
|
342
|
+
deselectedAllMessage: "All options deselected",
|
|
339
343
|
loadingOptionsMessage: "Loading...",
|
|
340
344
|
removeTagButtonLabel: (
|
|
341
345
|
/* istanbul ignore next */
|
|
@@ -434,17 +438,30 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
434
438
|
},
|
|
435
439
|
colorPicker: {
|
|
436
440
|
popupLabel: "Color Picker",
|
|
437
|
-
swatchesLabel: "Saved colors
|
|
438
|
-
pickerButtonLabel: "
|
|
441
|
+
swatchesLabel: "Saved colors",
|
|
442
|
+
pickerButtonLabel: "Color Picker",
|
|
443
|
+
hexInputLabel: "HEX color code",
|
|
439
444
|
saveButtonLabel: "Save current color",
|
|
440
445
|
closeButtonLabel: "Close Color Picker",
|
|
441
|
-
copyButtonLabel: "Copy
|
|
442
|
-
copyErrorText: "Copy failed. Clipboard access was blocked. Try again."
|
|
446
|
+
copyButtonLabel: "Copy color to clipboard",
|
|
447
|
+
copyErrorText: "Copy failed. Clipboard access was blocked. Try again.",
|
|
448
|
+
copySuccessMessage: (
|
|
449
|
+
/* istanbul ignore next */
|
|
450
|
+
(e) => `Color ${e} copied to clipboard.`
|
|
451
|
+
),
|
|
452
|
+
selectionSuccessMessage: (
|
|
453
|
+
/* istanbul ignore next */
|
|
454
|
+
(e) => `Color ${e} selected.`
|
|
455
|
+
),
|
|
456
|
+
maxSwatchesMessage: (
|
|
457
|
+
/* istanbul ignore next */
|
|
458
|
+
(e, o) => `${e} of ${o} colors saved.`
|
|
459
|
+
)
|
|
443
460
|
}
|
|
444
461
|
};
|
|
445
|
-
var K = Object.defineProperty,
|
|
446
|
-
for (var t = void 0,
|
|
447
|
-
(
|
|
462
|
+
var K = Object.defineProperty, X = (e, o, a, r) => {
|
|
463
|
+
for (var t = void 0, s = e.length - 1, i; s >= 0; s--)
|
|
464
|
+
(i = e[s]) && (t = i(o, a, t) || t);
|
|
448
465
|
return t && K(o, a, t), t;
|
|
449
466
|
};
|
|
450
467
|
class _ {
|
|
@@ -452,16 +469,16 @@ class _ {
|
|
|
452
469
|
this.locale = q;
|
|
453
470
|
}
|
|
454
471
|
}
|
|
455
|
-
|
|
472
|
+
X([
|
|
456
473
|
J
|
|
457
474
|
], _.prototype, "locale");
|
|
458
|
-
const
|
|
475
|
+
const Z = new _(), ee = (e) => {
|
|
459
476
|
class o extends e {
|
|
460
477
|
/**
|
|
461
478
|
* @internal
|
|
462
479
|
*/
|
|
463
480
|
get locale() {
|
|
464
|
-
return
|
|
481
|
+
return Z.locale;
|
|
465
482
|
}
|
|
466
483
|
}
|
|
467
484
|
return o;
|
package/bundled/mixins.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const _=require("./normalize.cjs"),a=require("./vivid-element.cjs"),y=require("./definition2.cjs"),$=require("./
|
|
1
|
+
"use strict";const _=require("./normalize.cjs"),a=require("./vivid-element.cjs"),y=require("./definition2.cjs"),$=require("./definition14.cjs"),m=require("./when.cjs"),F=require("./class-names.cjs"),I=require("./localized.cjs"),f=require("./slotted.cjs"),D=":host{display:contents}.message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message.none-message{display:none}.message.helper-message{color:var(--_low-ink-color)}.message.error-message,.message.success-message{color:var(--vvd-color-canvas-text)}slot{display:inline}.icon{font-size:16px}.error-message .icon{color:var(--vvd-color-alert-500)}.success-message .icon{color:var(--vvd-color-success-500)}.announcement{display:contents}";var w=Object.defineProperty,C=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,c;r>=0;r--)(c=t[r])&&(n=c(e,i,n)||n);return n&&w(e,i,n),n};class l extends I.Localized(a.VividElement){constructor(){super(...arguments),this.type="none"}}C([a.attr],l.prototype,"type");function g(t,e,i){const s=t.tagFor(y.Icon);return a.html`<${s} class="icon" name="${e}" label="${n=>n.locale.feedbackMessage[i]}"></${s}>`}function B(t){const e={none:"",helper:"",error:g(t,"info-line","errorIconText"),success:g(t,"check-circle-line","successIconText")};return a.html`${i=>e[i.type]}`}const b=t=>t==="error",M=t=>{const e=a.html`<div
|
|
2
2
|
class="${i=>F.classNames("message",`${i.type}-message`)}"
|
|
3
3
|
>
|
|
4
4
|
${B(t)}<slot></slot>
|
package/bundled/mixins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as k } from "./normalize.js";
|
|
2
2
|
import { d as _, h as d, V as $, a as y, M as F, H as I, o as f } from "./vivid-element.js";
|
|
3
3
|
import { i as w, I as D } from "./definition2.js";
|
|
4
|
-
import { v as C } from "./
|
|
4
|
+
import { v as C } from "./definition14.js";
|
|
5
5
|
import { w as m } from "./when.js";
|
|
6
6
|
import { c as B } from "./class-names.js";
|
|
7
7
|
import { L as H } from "./localized.js";
|