@vonage/vivid 4.14.0 → 4.14.2
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 +152 -197
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- 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/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +2 -2
- 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/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 +2 -3
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +2 -2
- 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 +21 -21
- package/shared/definition16.js +5 -5
- package/shared/definition17.cjs +62 -61
- package/shared/definition17.js +10 -9
- 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 +7 -7
- package/shared/definition22.js +3 -3
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +3 -3
- 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 +12 -13
- package/shared/definition27.js +2 -3
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +3 -4
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +2 -3
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +2 -2
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +2 -3
- package/shared/definition34.cjs +112 -45
- package/shared/definition34.js +73 -6
- package/shared/definition35.cjs +9 -209
- package/shared/definition35.js +4 -202
- 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 +2 -3
- 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 +52 -53
- package/shared/definition42.js +3 -4
- package/shared/definition43.cjs +40 -40
- package/shared/definition43.js +6 -6
- 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 +2 -3
- 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 +2 -3
- package/shared/definition51.cjs +109 -72
- package/shared/definition51.js +78 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +2 -3
- 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 +3 -4
- 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 +2 -3
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +2 -3
- 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/foundation-element.cjs +11 -11
- package/shared/foundation-element.js +1 -1
- package/shared/key-codes2.cjs +0 -56
- package/shared/key-codes2.js +1 -53
- package/shared/listbox.cjs +15 -16
- package/shared/listbox.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- 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/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +3 -4
- 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 +2 -3
- 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/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/listbox2.cjs +0 -1268
- package/shared/listbox2.js +0 -1265
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/shared/definition47.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const applyMixins = require('./apply-mixins.cjs');
|
|
6
6
|
const affix = require('./affix.cjs');
|
|
7
|
-
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
const localized = require('./localized.cjs');
|
|
9
8
|
const ref = require('./ref.cjs');
|
|
10
9
|
const classNames = require('./class-names.cjs');
|
|
@@ -35,37 +34,37 @@ class SplitButton extends vividElement.VividElement {
|
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
__decorateClass([
|
|
38
|
-
|
|
37
|
+
vividElement.attr
|
|
39
38
|
], SplitButton.prototype, "connotation");
|
|
40
39
|
__decorateClass([
|
|
41
|
-
|
|
40
|
+
vividElement.attr
|
|
42
41
|
], SplitButton.prototype, "shape");
|
|
43
42
|
__decorateClass([
|
|
44
|
-
|
|
43
|
+
vividElement.attr
|
|
45
44
|
], SplitButton.prototype, "appearance");
|
|
46
45
|
__decorateClass([
|
|
47
|
-
|
|
46
|
+
vividElement.attr
|
|
48
47
|
], SplitButton.prototype, "size");
|
|
49
48
|
__decorateClass([
|
|
50
|
-
|
|
49
|
+
vividElement.attr
|
|
51
50
|
], SplitButton.prototype, "label");
|
|
52
51
|
__decorateClass([
|
|
53
|
-
|
|
52
|
+
vividElement.attr
|
|
54
53
|
], SplitButton.prototype, "icon");
|
|
55
54
|
__decorateClass([
|
|
56
|
-
|
|
55
|
+
vividElement.attr({ attribute: "split-indicator", mode: "fromView" })
|
|
57
56
|
], SplitButton.prototype, "splitIndicator");
|
|
58
57
|
__decorateClass([
|
|
59
|
-
|
|
58
|
+
vividElement.attr({ attribute: "disabled", mode: "boolean" })
|
|
60
59
|
], SplitButton.prototype, "disabled");
|
|
61
60
|
__decorateClass([
|
|
62
|
-
|
|
61
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
63
62
|
], SplitButton.prototype, "ariaLabel");
|
|
64
63
|
__decorateClass([
|
|
65
|
-
|
|
64
|
+
vividElement.attr({ attribute: "aria-expanded" })
|
|
66
65
|
], SplitButton.prototype, "ariaExpanded");
|
|
67
66
|
__decorateClass([
|
|
68
|
-
|
|
67
|
+
vividElement.attr({ attribute: "indicator-aria-label" })
|
|
69
68
|
], SplitButton.prototype, "indicatorAriaLabel");
|
|
70
69
|
applyMixins.applyMixins(SplitButton, affix.AffixIcon, localized.Localized);
|
|
71
70
|
|
|
@@ -90,7 +89,7 @@ const getClasses = ({
|
|
|
90
89
|
);
|
|
91
90
|
function actionButton(context) {
|
|
92
91
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
93
|
-
return
|
|
92
|
+
return vividElement.html`
|
|
94
93
|
<button
|
|
95
94
|
${ref.ref("_action")}
|
|
96
95
|
class="control ${getClasses}"
|
|
@@ -107,7 +106,7 @@ function actionButton(context) {
|
|
|
107
106
|
}
|
|
108
107
|
function indicatorButton(context) {
|
|
109
108
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
110
|
-
return
|
|
109
|
+
return vividElement.html`
|
|
111
110
|
<button
|
|
112
111
|
${ref.ref("_indicator")}
|
|
113
112
|
class="indicator ${getClasses}"
|
|
@@ -123,7 +122,7 @@ function indicatorButton(context) {
|
|
|
123
122
|
`;
|
|
124
123
|
}
|
|
125
124
|
const SplitButtonTemplate = (context) => {
|
|
126
|
-
return
|
|
125
|
+
return vividElement.html` <template role="presentation">
|
|
127
126
|
<div class="base" role="group">
|
|
128
127
|
${actionButton(context)} ${indicatorButton(context)}
|
|
129
128
|
<slot></slot>
|
|
@@ -131,7 +130,7 @@ const SplitButtonTemplate = (context) => {
|
|
|
131
130
|
</template>`;
|
|
132
131
|
};
|
|
133
132
|
|
|
134
|
-
const splitButtonDefinition =
|
|
133
|
+
const splitButtonDefinition = vividElement.defineVividComponent(
|
|
135
134
|
"split-button",
|
|
136
135
|
SplitButton,
|
|
137
136
|
SplitButtonTemplate,
|
|
@@ -143,7 +142,7 @@ const splitButtonDefinition = defineVividComponent.defineVividComponent(
|
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
);
|
|
146
|
-
const registerSplitButton =
|
|
145
|
+
const registerSplitButton = vividElement.createRegisterFunction(
|
|
147
146
|
splitButtonDefinition
|
|
148
147
|
);
|
|
149
148
|
|
package/shared/definition47.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
5
|
-
import { V as VividElement } from './vivid-element.js';
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
5
|
import { L as Localized } from './localized.js';
|
|
7
6
|
import { r as ref } from './ref.js';
|
|
8
7
|
import { c as classNames } from './class-names.js';
|
package/shared/definition48.cjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
5
|
-
const formAssociated = require('./form-associated.cjs');
|
|
6
4
|
const vividElement = require('./vivid-element.cjs');
|
|
5
|
+
const formAssociated = require('./form-associated.cjs');
|
|
7
6
|
const keyCodes = require('./key-codes.cjs');
|
|
8
7
|
const when = require('./when.cjs');
|
|
9
8
|
const classNames = require('./class-names.cjs');
|
|
@@ -81,16 +80,16 @@ class Switch extends FormAssociatedSwitch {
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
__decorateClass([
|
|
84
|
-
|
|
83
|
+
vividElement.attr
|
|
85
84
|
], Switch.prototype, "label");
|
|
86
85
|
__decorateClass([
|
|
87
|
-
|
|
86
|
+
vividElement.attr
|
|
88
87
|
], Switch.prototype, "connotation");
|
|
89
88
|
__decorateClass([
|
|
90
|
-
|
|
89
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
91
90
|
], Switch.prototype, "readOnly");
|
|
92
91
|
__decorateClass([
|
|
93
|
-
|
|
92
|
+
vividElement.observable
|
|
94
93
|
], Switch.prototype, "defaultSlottedNodes");
|
|
95
94
|
|
|
96
95
|
const getClasses = (_) => classNames.classNames(
|
|
@@ -104,7 +103,7 @@ const getClasses = (_) => classNames.classNames(
|
|
|
104
103
|
Boolean(_.checked) && Boolean(_.connotation)
|
|
105
104
|
]
|
|
106
105
|
);
|
|
107
|
-
const SwitchTemplate =
|
|
106
|
+
const SwitchTemplate = vividElement.html`
|
|
108
107
|
<div
|
|
109
108
|
class="${getClasses}"
|
|
110
109
|
role="switch"
|
|
@@ -120,12 +119,12 @@ const SwitchTemplate = defineVividComponent.html`
|
|
|
120
119
|
</div>
|
|
121
120
|
${when.when(
|
|
122
121
|
(x) => x.label,
|
|
123
|
-
|
|
122
|
+
vividElement.html`<div class="label">${(x) => x.label}</div>`
|
|
124
123
|
)}
|
|
125
124
|
</div>
|
|
126
125
|
`;
|
|
127
126
|
|
|
128
|
-
const switchDefinition =
|
|
127
|
+
const switchDefinition = vividElement.defineVividComponent(
|
|
129
128
|
"switch",
|
|
130
129
|
Switch,
|
|
131
130
|
SwitchTemplate,
|
|
@@ -137,7 +136,7 @@ const switchDefinition = defineVividComponent.defineVividComponent(
|
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
);
|
|
140
|
-
const registerSwitch =
|
|
139
|
+
const registerSwitch = vividElement.createRegisterFunction(switchDefinition);
|
|
141
140
|
|
|
142
141
|
exports.registerSwitch = registerSwitch;
|
|
143
142
|
exports.switchDefinition = switchDefinition;
|
package/shared/definition48.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
4
|
-
import { V as VividElement } from './vivid-element.js';
|
|
5
4
|
import { a as keySpace, k as keyEnter } from './key-codes.js';
|
|
6
5
|
import { w as when } from './when.js';
|
|
7
6
|
import { c as classNames } from './class-names.js';
|
package/shared/definition49.cjs
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
3
|
const vividElement = require('./vivid-element.cjs');
|
|
5
4
|
|
|
6
5
|
class TabPanel extends vividElement.VividElement {
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
const TabPanelTemplate =
|
|
8
|
+
const TabPanelTemplate = vividElement.html`
|
|
10
9
|
<template slot="tabpanel" role="tabpanel">
|
|
11
10
|
<slot></slot>
|
|
12
11
|
</template>
|
|
13
12
|
`;
|
|
14
13
|
|
|
15
|
-
const tabPanelDefinition =
|
|
14
|
+
const tabPanelDefinition = vividElement.defineVividComponent(
|
|
16
15
|
"tab-panel",
|
|
17
16
|
TabPanel,
|
|
18
17
|
TabPanelTemplate,
|
|
19
18
|
[],
|
|
20
19
|
{}
|
|
21
20
|
);
|
|
22
|
-
const registerTabPanel =
|
|
21
|
+
const registerTabPanel = vividElement.createRegisterFunction(tabPanelDefinition);
|
|
23
22
|
|
|
24
23
|
exports.registerTabPanel = registerTabPanel;
|
|
25
24
|
exports.tabPanelDefinition = tabPanelDefinition;
|
package/shared/definition49.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
-
import { V as VividElement } from './vivid-element.js';
|
|
1
|
+
import { V as VividElement, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
2
|
|
|
4
3
|
class TabPanel extends VividElement {
|
|
5
4
|
}
|
package/shared/definition5.cjs
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
const definition$1 = require('./definition11.cjs');
|
|
4
4
|
const definition$2 = require('./definition46.cjs');
|
|
5
5
|
const definition = require('./definition29.cjs');
|
|
6
|
-
const
|
|
6
|
+
const vividElement = require('./vivid-element.cjs');
|
|
7
7
|
const enums = require('./enums.cjs');
|
|
8
8
|
const applyMixins = require('./apply-mixins.cjs');
|
|
9
|
-
const vividElement = require('./vivid-element.cjs');
|
|
10
9
|
const localized = require('./localized.cjs');
|
|
11
10
|
const playbackRates = require('./playbackRates.cjs');
|
|
12
11
|
const when = require('./when.cjs');
|
|
@@ -74,7 +73,7 @@ class AudioPlayer extends vividElement.VividElement {
|
|
|
74
73
|
this.#currentTimeChanged = false;
|
|
75
74
|
this.#updateProgress = () => {
|
|
76
75
|
this.#currentTimeChanged = true;
|
|
77
|
-
|
|
76
|
+
vividElement.Observable.notify(this, "currentTime");
|
|
78
77
|
const percent = this.currentTime / this.duration * 100;
|
|
79
78
|
this.#sliderEl.currentValue = percent.toString();
|
|
80
79
|
if (percent === 100) {
|
|
@@ -82,7 +81,7 @@ class AudioPlayer extends vividElement.VividElement {
|
|
|
82
81
|
}
|
|
83
82
|
};
|
|
84
83
|
this.#updateTotalTime = () => {
|
|
85
|
-
|
|
84
|
+
vividElement.Observable.notify(this, "duration");
|
|
86
85
|
};
|
|
87
86
|
this.#updateCurrentTimeOnSliderChange = () => {
|
|
88
87
|
if (!this.paused && this.#sliderEl.isDragging) {
|
|
@@ -100,18 +99,18 @@ class AudioPlayer extends vividElement.VividElement {
|
|
|
100
99
|
this.#currentTimeChanged = false;
|
|
101
100
|
};
|
|
102
101
|
this.#setPausedState = () => {
|
|
103
|
-
|
|
102
|
+
vividElement.Observable.notify(this, "paused");
|
|
104
103
|
};
|
|
105
104
|
this.#playerEl.addEventListener("timeupdate", this.#updateProgress);
|
|
106
105
|
this.#playerEl.addEventListener("loadedmetadata", this.#updateTotalTime);
|
|
107
106
|
}
|
|
108
107
|
get playbackRate() {
|
|
109
|
-
|
|
108
|
+
vividElement.Observable.track(this, "playbackRate");
|
|
110
109
|
return this.#playerEl.playbackRate;
|
|
111
110
|
}
|
|
112
111
|
set playbackRate(value) {
|
|
113
112
|
this.#playerEl.playbackRate = value;
|
|
114
|
-
|
|
113
|
+
vividElement.Observable.notify(this, "playbackRate");
|
|
115
114
|
}
|
|
116
115
|
srcChanged() {
|
|
117
116
|
if (this.src === void 0) {
|
|
@@ -121,19 +120,19 @@ class AudioPlayer extends vividElement.VividElement {
|
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
122
|
get paused() {
|
|
124
|
-
|
|
123
|
+
vividElement.Observable.track(this, "paused");
|
|
125
124
|
return this.#playerEl.paused;
|
|
126
125
|
}
|
|
127
126
|
set paused(_) {
|
|
128
127
|
}
|
|
129
128
|
get duration() {
|
|
130
|
-
|
|
129
|
+
vividElement.Observable.track(this, "duration");
|
|
131
130
|
return this.#playerEl.duration;
|
|
132
131
|
}
|
|
133
132
|
set duration(_) {
|
|
134
133
|
}
|
|
135
134
|
get currentTime() {
|
|
136
|
-
|
|
135
|
+
vividElement.Observable.track(this, "currentTime");
|
|
137
136
|
return this.#playerEl.currentTime;
|
|
138
137
|
}
|
|
139
138
|
set currentTime(value) {
|
|
@@ -174,40 +173,40 @@ class AudioPlayer extends vividElement.VividElement {
|
|
|
174
173
|
#setPausedState;
|
|
175
174
|
}
|
|
176
175
|
__decorateClass([
|
|
177
|
-
|
|
176
|
+
vividElement.attr({ attribute: "play-button-aria-label" })
|
|
178
177
|
], AudioPlayer.prototype, "playButtonAriaLabel");
|
|
179
178
|
__decorateClass([
|
|
180
|
-
|
|
179
|
+
vividElement.attr({ attribute: "pause-button-aria-label" })
|
|
181
180
|
], AudioPlayer.prototype, "pauseButtonAriaLabel");
|
|
182
181
|
__decorateClass([
|
|
183
|
-
|
|
182
|
+
vividElement.attr({ attribute: "slider-aria-label" })
|
|
184
183
|
], AudioPlayer.prototype, "sliderAriaLabel");
|
|
185
184
|
__decorateClass([
|
|
186
|
-
|
|
185
|
+
vividElement.attr({ attribute: "skip-forward-aria-label" })
|
|
187
186
|
], AudioPlayer.prototype, "skipForwardButtonAriaLabel");
|
|
188
187
|
__decorateClass([
|
|
189
|
-
|
|
188
|
+
vividElement.attr({ attribute: "skip-backward-aria-label" })
|
|
190
189
|
], AudioPlayer.prototype, "skipBackwardButtonAriaLabel");
|
|
191
190
|
__decorateClass([
|
|
192
|
-
|
|
191
|
+
vividElement.attr
|
|
193
192
|
], AudioPlayer.prototype, "connotation");
|
|
194
193
|
__decorateClass([
|
|
195
|
-
|
|
194
|
+
vividElement.attr
|
|
196
195
|
], AudioPlayer.prototype, "src");
|
|
197
196
|
__decorateClass([
|
|
198
|
-
|
|
197
|
+
vividElement.attr({ mode: "boolean" })
|
|
199
198
|
], AudioPlayer.prototype, "disabled");
|
|
200
199
|
__decorateClass([
|
|
201
|
-
|
|
200
|
+
vividElement.attr({ mode: "boolean" })
|
|
202
201
|
], AudioPlayer.prototype, "notime");
|
|
203
202
|
__decorateClass([
|
|
204
|
-
|
|
203
|
+
vividElement.attr({
|
|
205
204
|
attribute: "skip-by",
|
|
206
205
|
converter: validSkipByConverter
|
|
207
206
|
})
|
|
208
207
|
], AudioPlayer.prototype, "skipBy");
|
|
209
208
|
__decorateClass([
|
|
210
|
-
|
|
209
|
+
vividElement.attr({ attribute: "playback-rates" })
|
|
211
210
|
], AudioPlayer.prototype, "playbackRates");
|
|
212
211
|
applyMixins.applyMixins(AudioPlayer, localized.Localized);
|
|
213
212
|
|
|
@@ -239,7 +238,7 @@ const isMenuItemChekced = (playbackRate, { parent }) => {
|
|
|
239
238
|
};
|
|
240
239
|
function renderButton(context) {
|
|
241
240
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
242
|
-
return
|
|
241
|
+
return vividElement.html`<${buttonTag} class="pause" @click="${(x) => x.paused ? x.play() : x.pause()}"
|
|
243
242
|
icon="${(x) => x.paused ? "play-solid" : "pause-solid"}"
|
|
244
243
|
aria-label="${(x) => x.paused ? x.playButtonAriaLabel || x.locale.audioPlayer.playButtonLabel : x.pauseButtonAriaLabel || x.locale.audioPlayer.pauseButtonLabel}"
|
|
245
244
|
size='condensed'
|
|
@@ -249,7 +248,7 @@ function renderButton(context) {
|
|
|
249
248
|
}
|
|
250
249
|
function renderBackwardSkipButtons(context) {
|
|
251
250
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
252
|
-
return
|
|
251
|
+
return vividElement.html`
|
|
253
252
|
<${buttonTag} class="skip backward"
|
|
254
253
|
@click="${(element) => skip(element, SKIP_DIRECTIONS.BACKWARD)}"
|
|
255
254
|
icon="${(x) => x.skipBy == enums.MediaSkipBy.Five ? "5-sec-backward-line" : x.skipBy == enums.MediaSkipBy.Thirty ? "30-sec-backward-line" : "10-sec-backward-line"}"
|
|
@@ -262,7 +261,7 @@ function renderBackwardSkipButtons(context) {
|
|
|
262
261
|
}
|
|
263
262
|
function renderForwardSkipButtons(context) {
|
|
264
263
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
265
|
-
return
|
|
264
|
+
return vividElement.html`
|
|
266
265
|
<${buttonTag} class="skip forward"
|
|
267
266
|
@click="${(element) => skip(element, SKIP_DIRECTIONS.FORWARD)}"
|
|
268
267
|
icon="${(x) => x.skipBy == enums.MediaSkipBy.Five ? "5-sec-forward-line" : x.skipBy == enums.MediaSkipBy.Thirty ? "30-sec-forward-line" : "10-sec-forward-line"}"
|
|
@@ -275,7 +274,7 @@ function renderForwardSkipButtons(context) {
|
|
|
275
274
|
}
|
|
276
275
|
function renderSlider(context) {
|
|
277
276
|
const sliderTag = context.tagFor(definition$2.Slider);
|
|
278
|
-
return
|
|
277
|
+
return vividElement.html`
|
|
279
278
|
<${sliderTag}
|
|
280
279
|
class="slider"
|
|
281
280
|
value="0"
|
|
@@ -287,7 +286,7 @@ function renderSlider(context) {
|
|
|
287
286
|
</${sliderTag}>`;
|
|
288
287
|
}
|
|
289
288
|
function renderTimestamp() {
|
|
290
|
-
return
|
|
289
|
+
return vividElement.html` <div class="time-stamp">
|
|
291
290
|
<span class="current-time">${(x) => formatTime(x.currentTime)}</span>
|
|
292
291
|
<span>/</span>
|
|
293
292
|
<span class="total-time">${(x) => formatTime(x.duration)}</span>
|
|
@@ -301,7 +300,7 @@ const AudioPlayerTemplate = (context) => {
|
|
|
301
300
|
const menuTag = context.tagFor(definition.Menu);
|
|
302
301
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
303
302
|
const menuItemTag = context.tagFor(definition.MenuItem);
|
|
304
|
-
return
|
|
303
|
+
return vividElement.html` <div class="wrapper">
|
|
305
304
|
<div class="base ${getClasses}">
|
|
306
305
|
<div class="controls">
|
|
307
306
|
${when.when(
|
|
@@ -318,7 +317,7 @@ const AudioPlayerTemplate = (context) => {
|
|
|
318
317
|
${renderSlider(context)}
|
|
319
318
|
${when.when(
|
|
320
319
|
(x) => Boolean(x.playbackRates),
|
|
321
|
-
|
|
320
|
+
vividElement.html`
|
|
322
321
|
<${menuTag} class="playback-rates" trigger="auto" placement="top-start" auto-dismiss id="playback-menu" position-strategy="absolute">
|
|
323
322
|
<${buttonTag} id="playback-open-button"
|
|
324
323
|
class="playback-button"
|
|
@@ -332,7 +331,7 @@ const AudioPlayerTemplate = (context) => {
|
|
|
332
331
|
|
|
333
332
|
${repeat.repeat(
|
|
334
333
|
(x) => playbackRates.getPlaybackRatesArray(x.playbackRates),
|
|
335
|
-
|
|
334
|
+
vividElement.html`<${menuItemTag} @click="${handlePlaybackRateClick}"
|
|
336
335
|
role="menuitemradio"
|
|
337
336
|
class="playback-rate"
|
|
338
337
|
text="${(x) => x}"
|
|
@@ -345,7 +344,7 @@ const AudioPlayerTemplate = (context) => {
|
|
|
345
344
|
</div>`;
|
|
346
345
|
};
|
|
347
346
|
|
|
348
|
-
const audioPlayerDefinition =
|
|
347
|
+
const audioPlayerDefinition = vividElement.defineVividComponent(
|
|
349
348
|
"audio-player",
|
|
350
349
|
AudioPlayer,
|
|
351
350
|
AudioPlayerTemplate,
|
|
@@ -354,7 +353,7 @@ const audioPlayerDefinition = defineVividComponent.defineVividComponent(
|
|
|
354
353
|
styles
|
|
355
354
|
}
|
|
356
355
|
);
|
|
357
|
-
const registerAudioPlayer =
|
|
356
|
+
const registerAudioPlayer = vividElement.createRegisterFunction(
|
|
358
357
|
audioPlayerDefinition
|
|
359
358
|
);
|
|
360
359
|
|
package/shared/definition5.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { S as Slider, s as sliderDefinition } from './definition46.js';
|
|
3
3
|
import { d as Menu, e as MenuItem, b as menuDefinition, m as menuItemDefinition } from './definition29.js';
|
|
4
|
-
import { O as Observable, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
4
|
+
import { V as VividElement, O as Observable, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
5
5
|
import { M as MediaSkipBy } from './enums.js';
|
|
6
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
7
|
-
import { V as VividElement } from './vivid-element.js';
|
|
8
7
|
import { L as Localized } from './localized.js';
|
|
9
8
|
import { g as getPlaybackRatesArray } from './playbackRates.js';
|
|
10
9
|
import { w as when } from './when.js';
|
package/shared/definition50.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const applyMixins = require('./apply-mixins.cjs');
|
|
6
6
|
const affix = require('./affix.cjs');
|
|
7
|
-
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
const localized = require('./localized.cjs');
|
|
9
8
|
const classNames = require('./class-names.cjs');
|
|
10
9
|
|
|
@@ -38,25 +37,25 @@ class Tab extends vividElement.VividElement {
|
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
__decorateClass([
|
|
41
|
-
|
|
40
|
+
vividElement.attr({ mode: "boolean" })
|
|
42
41
|
], Tab.prototype, "disabled");
|
|
43
42
|
__decorateClass([
|
|
44
|
-
|
|
43
|
+
vividElement.attr
|
|
45
44
|
], Tab.prototype, "connotation");
|
|
46
45
|
__decorateClass([
|
|
47
|
-
|
|
46
|
+
vividElement.attr
|
|
48
47
|
], Tab.prototype, "shape");
|
|
49
48
|
__decorateClass([
|
|
50
|
-
|
|
49
|
+
vividElement.attr
|
|
51
50
|
], Tab.prototype, "label");
|
|
52
51
|
__decorateClass([
|
|
53
|
-
|
|
52
|
+
vividElement.attr({ mode: "boolean" })
|
|
54
53
|
], Tab.prototype, "removable");
|
|
55
54
|
__decorateClass([
|
|
56
|
-
|
|
55
|
+
vividElement.attr({ mode: "fromView" })
|
|
57
56
|
], Tab.prototype, "tabIndex");
|
|
58
57
|
__decorateClass([
|
|
59
|
-
|
|
58
|
+
vividElement.attr({ attribute: "aria-selected" })
|
|
60
59
|
], Tab.prototype, "ariaSelected");
|
|
61
60
|
applyMixins.applyMixins(Tab, affix.AffixIconWithTrailing);
|
|
62
61
|
applyMixins.applyMixins(Tab, localized.Localized);
|
|
@@ -82,7 +81,7 @@ const getClasses = ({
|
|
|
82
81
|
);
|
|
83
82
|
function renderDismissButton(context) {
|
|
84
83
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
85
|
-
return
|
|
84
|
+
return vividElement.html` <span
|
|
86
85
|
aria-label="${(x) => x.locale.tab.dismissButtonLabel}"
|
|
87
86
|
class="close"
|
|
88
87
|
id="close-btn"
|
|
@@ -93,7 +92,7 @@ function renderDismissButton(context) {
|
|
|
93
92
|
}
|
|
94
93
|
const TabTemplate = (context) => {
|
|
95
94
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
96
|
-
return
|
|
95
|
+
return vividElement.html`
|
|
97
96
|
<template
|
|
98
97
|
slot="tab"
|
|
99
98
|
role="tab"
|
|
@@ -109,7 +108,7 @@ const TabTemplate = (context) => {
|
|
|
109
108
|
`;
|
|
110
109
|
};
|
|
111
110
|
|
|
112
|
-
const tabDefinition =
|
|
111
|
+
const tabDefinition = vividElement.defineVividComponent(
|
|
113
112
|
"tab",
|
|
114
113
|
Tab,
|
|
115
114
|
TabTemplate,
|
|
@@ -118,7 +117,7 @@ const tabDefinition = defineVividComponent.defineVividComponent(
|
|
|
118
117
|
styles
|
|
119
118
|
}
|
|
120
119
|
);
|
|
121
|
-
const registerTab =
|
|
120
|
+
const registerTab = vividElement.createRegisterFunction(tabDefinition);
|
|
122
121
|
|
|
123
122
|
exports.registerTab = registerTab;
|
|
124
123
|
exports.tabDefinition = tabDefinition;
|
package/shared/definition50.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
5
|
-
import { V as VividElement } from './vivid-element.js';
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
5
|
import { L as Localized } from './localized.js';
|
|
7
6
|
import { c as classNames } from './class-names.js';
|
|
8
7
|
|