@vonage/vivid 4.14.0 → 4.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +130 -23
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/radio/radio.form-associated.d.ts +2 -0
- package/lib/tabs/tabs.d.ts +0 -5
- package/lib/text-anchor/text-anchor.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/listbox/index.cjs +4 -4
- package/listbox/index.js +1 -1
- package/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +1 -1
- package/shared/anchor.cjs +10 -10
- package/shared/anchor.js +1 -1
- package/shared/anchored.cjs +6 -6
- package/shared/anchored.js +1 -1
- package/shared/apply-mixins.cjs +3 -3
- package/shared/apply-mixins.js +1 -1
- package/shared/apply-mixins2.cjs +3 -3
- package/shared/apply-mixins2.js +1 -1
- package/shared/applyMixinsWithObservables.cjs +3 -3
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/aria-global.cjs +20 -20
- package/shared/aria-global.js +1 -1
- package/shared/aria-global2.cjs +40 -40
- package/shared/aria-global2.js +2 -2
- package/shared/base-progress.cjs +7 -8
- package/shared/base-progress.js +2 -3
- package/shared/breadcrumb-item.cjs +2 -3
- package/shared/breadcrumb-item.js +1 -2
- package/shared/button.cjs +10 -11
- package/shared/button.js +1 -2
- package/shared/calendar-event.cjs +7 -8
- package/shared/calendar-event.js +1 -2
- package/shared/children.cjs +2 -2
- package/shared/children.js +1 -1
- package/shared/definition.cjs +14 -15
- package/shared/definition.js +1 -2
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +1 -1
- package/shared/definition12.cjs +6 -6
- package/shared/definition12.js +1 -1
- package/shared/definition13.cjs +13 -14
- package/shared/definition13.js +1 -2
- package/shared/definition14.cjs +23 -24
- package/shared/definition14.js +1 -2
- package/shared/definition15.cjs +15 -16
- package/shared/definition15.js +1 -2
- package/shared/definition16.cjs +20 -19
- package/shared/definition16.js +3 -2
- package/shared/definition17.cjs +53 -54
- package/shared/definition17.js +1 -2
- package/shared/definition18.cjs +4 -4
- package/shared/definition18.js +1 -1
- package/shared/definition19.cjs +12 -12
- package/shared/definition19.js +1 -1
- package/shared/definition2.cjs +6 -7
- package/shared/definition2.js +1 -2
- package/shared/definition20.cjs +20 -21
- package/shared/definition20.js +1 -2
- package/shared/definition21.cjs +27 -28
- package/shared/definition21.js +3 -4
- package/shared/definition22.cjs +5 -6
- package/shared/definition22.js +1 -2
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +2 -2
- package/shared/definition25.cjs +13 -14
- package/shared/definition25.js +1 -2
- package/shared/definition26.cjs +5 -6
- package/shared/definition26.js +1 -2
- package/shared/definition27.cjs +11 -12
- package/shared/definition27.js +1 -2
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +2 -3
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +1 -2
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +1 -1
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +1 -2
- package/shared/definition34.cjs +50 -52
- package/shared/definition34.js +2 -4
- package/shared/definition35.cjs +24 -25
- package/shared/definition35.js +1 -2
- package/shared/definition36.cjs +15 -16
- package/shared/definition36.js +1 -2
- package/shared/definition37.cjs +9 -9
- package/shared/definition37.js +1 -1
- package/shared/definition38.cjs +10 -10
- package/shared/definition38.js +1 -1
- package/shared/definition39.cjs +12 -13
- package/shared/definition39.js +1 -2
- package/shared/definition4.cjs +19 -20
- package/shared/definition4.js +1 -2
- package/shared/definition40.cjs +61 -13
- package/shared/definition40.js +52 -4
- package/shared/definition41.cjs +29 -30
- package/shared/definition41.js +1 -2
- package/shared/definition42.cjs +53 -54
- package/shared/definition42.js +2 -3
- package/shared/definition43.cjs +31 -31
- package/shared/definition43.js +1 -1
- package/shared/definition44.cjs +14 -15
- package/shared/definition44.js +1 -2
- package/shared/definition45.cjs +9 -10
- package/shared/definition45.js +1 -2
- package/shared/definition46.cjs +26 -27
- package/shared/definition46.js +1 -2
- package/shared/definition47.cjs +17 -18
- package/shared/definition47.js +1 -2
- package/shared/definition48.cjs +9 -10
- package/shared/definition48.js +1 -2
- package/shared/definition49.cjs +3 -4
- package/shared/definition49.js +1 -2
- package/shared/definition5.cjs +30 -31
- package/shared/definition5.js +1 -2
- package/shared/definition50.cjs +12 -13
- package/shared/definition50.js +1 -2
- package/shared/definition51.cjs +87 -72
- package/shared/definition51.js +56 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +1 -2
- package/shared/definition54.cjs +20 -21
- package/shared/definition54.js +1 -2
- package/shared/definition55.cjs +5 -5
- package/shared/definition55.js +1 -1
- package/shared/definition56.cjs +18 -19
- package/shared/definition56.js +1 -2
- package/shared/definition57.cjs +10 -11
- package/shared/definition57.js +1 -2
- package/shared/definition58.cjs +7 -8
- package/shared/definition58.js +1 -2
- package/shared/definition59.cjs +16 -17
- package/shared/definition59.js +2 -3
- package/shared/definition6.cjs +11 -12
- package/shared/definition6.js +1 -2
- package/shared/definition60.cjs +9 -10
- package/shared/definition60.js +2 -3
- package/shared/definition61.cjs +27 -30
- package/shared/definition61.js +17 -20
- package/shared/definition62.cjs +12 -9
- package/shared/definition62.js +8 -5
- package/shared/definition63.cjs +13 -14
- package/shared/definition63.js +1 -2
- package/shared/definition7.cjs +9 -10
- package/shared/definition7.js +1 -2
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +1 -2
- package/shared/definition9.cjs +7 -7
- package/shared/definition9.js +1 -1
- package/shared/form-associated.cjs +14 -14
- package/shared/form-associated.js +1 -1
- package/shared/form-associated2.cjs +10 -10
- package/shared/form-associated2.js +1 -1
- package/shared/form-elements.cjs +13 -13
- package/shared/form-elements.js +1 -1
- package/shared/foundation/progress/base-progress.d.ts +2 -2
- package/shared/key-codes2.cjs +1416 -3
- package/shared/key-codes2.js +1413 -2
- package/shared/listbox.cjs +12 -13
- package/shared/listbox.js +1 -2
- package/shared/listbox2.cjs +59 -60
- package/shared/listbox2.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/presentationDate.cjs +42 -43
- package/shared/presentationDate.js +1 -2
- package/shared/ref.cjs +2 -2
- package/shared/ref.js +1 -1
- package/shared/repeat.cjs +15 -15
- package/shared/repeat.js +1 -1
- package/shared/slider.template.cjs +4 -4
- package/shared/slider.template.js +1 -1
- package/shared/slotted.cjs +4 -4
- package/shared/slotted.js +1 -1
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +2 -3
- package/shared/text-anchor.template.cjs +2 -2
- package/shared/text-anchor.template.js +1 -1
- package/shared/text-field2.cjs +23 -24
- package/shared/text-field2.js +1 -2
- package/shared/vivid-element.cjs +2610 -2
- package/shared/vivid-element.js +2591 -2
- package/styles/core/all.css +40 -1
- package/styles/core/theme.css +40 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +25 -4
- package/styles/tokens/theme-light.css +25 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/text-anchor/index.cjs +3 -3
- package/text-anchor/index.js +1 -1
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/foundation-element.cjs +0 -1417
- package/shared/foundation-element.js +0 -1414
package/shared/definition40.cjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
|
-
const formAssociated = require('./form-associated.cjs');
|
|
5
3
|
const vividElement = require('./vivid-element.cjs');
|
|
4
|
+
const formAssociated = require('./form-associated.cjs');
|
|
6
5
|
const keyCodes = require('./key-codes.cjs');
|
|
7
6
|
const when = require('./when.cjs');
|
|
8
7
|
const classNames = require('./class-names.cjs');
|
|
@@ -15,7 +14,45 @@ class FormAssociatedRadio extends formAssociated.CheckableFormAssociated(_Radio)
|
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
17
16
|
this.proxy = document.createElement("input");
|
|
17
|
+
this.#validateValueMissingWithSiblings = () => {
|
|
18
|
+
const siblings = this.#radioSiblings;
|
|
19
|
+
if (siblings && siblings.length > 1) {
|
|
20
|
+
const isSiblingChecked = siblings.some((x) => x.checked);
|
|
21
|
+
if (isSiblingChecked) {
|
|
22
|
+
this.setValidity({ valueMissing: false });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.#syncSiblingsRequiredValidationStatus = () => {
|
|
27
|
+
if (this.elementInternals && !this.validity.valueMissing) {
|
|
28
|
+
const siblings = this.#radioSiblings;
|
|
29
|
+
if (siblings && siblings.length > 1) {
|
|
30
|
+
siblings.forEach((x) => {
|
|
31
|
+
x.elementInternals.setValidity({ valueMissing: false });
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
this.validate = (anchor) => {
|
|
37
|
+
super.validate(anchor);
|
|
38
|
+
if (this.validity.valueMissing) {
|
|
39
|
+
this.#validateValueMissingWithSiblings();
|
|
40
|
+
} else {
|
|
41
|
+
this.#syncSiblingsRequiredValidationStatus();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
18
44
|
}
|
|
45
|
+
get #radioSiblings() {
|
|
46
|
+
const siblings = this.parentElement?.querySelectorAll(
|
|
47
|
+
`${this.tagName.toLocaleLowerCase()}[name="${this.name}"]`
|
|
48
|
+
);
|
|
49
|
+
if (siblings) {
|
|
50
|
+
return Array.from(siblings);
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
#validateValueMissingWithSiblings;
|
|
55
|
+
#syncSiblingsRequiredValidationStatus;
|
|
19
56
|
}
|
|
20
57
|
|
|
21
58
|
var __defProp = Object.defineProperty;
|
|
@@ -53,6 +90,7 @@ class Radio extends FormAssociatedRadio {
|
|
|
53
90
|
return true;
|
|
54
91
|
};
|
|
55
92
|
this.proxy.setAttribute("type", "radio");
|
|
93
|
+
this.proxy.setAttribute("name", this.name);
|
|
56
94
|
}
|
|
57
95
|
// Map to proxy element
|
|
58
96
|
/**
|
|
@@ -74,12 +112,22 @@ class Radio extends FormAssociatedRadio {
|
|
|
74
112
|
}
|
|
75
113
|
}
|
|
76
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
nameChanged(previous, next) {
|
|
119
|
+
if (super.nameChanged) {
|
|
120
|
+
super.nameChanged(previous, next);
|
|
121
|
+
}
|
|
122
|
+
next !== null ? this.proxy.setAttribute("name", this.name) : this.proxy.removeAttribute("name");
|
|
123
|
+
vividElement.DOM.queueUpdate(this.validate);
|
|
124
|
+
}
|
|
77
125
|
/**
|
|
78
126
|
* @internal
|
|
79
127
|
*/
|
|
80
128
|
connectedCallback() {
|
|
81
129
|
super.connectedCallback();
|
|
82
|
-
this.validate
|
|
130
|
+
vividElement.DOM.queueUpdate(this.validate);
|
|
83
131
|
if (this.parentElement.getAttribute("role") !== "radiogroup" && this.getAttribute("tabindex") === null) {
|
|
84
132
|
if (!this.disabled) {
|
|
85
133
|
this.setAttribute("tabindex", "0");
|
|
@@ -110,22 +158,22 @@ class Radio extends FormAssociatedRadio {
|
|
|
110
158
|
}
|
|
111
159
|
}
|
|
112
160
|
__decorateClass([
|
|
113
|
-
|
|
161
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
114
162
|
], Radio.prototype, "ariaLabel");
|
|
115
163
|
__decorateClass([
|
|
116
|
-
|
|
164
|
+
vividElement.attr
|
|
117
165
|
], Radio.prototype, "label");
|
|
118
166
|
__decorateClass([
|
|
119
|
-
|
|
167
|
+
vividElement.attr
|
|
120
168
|
], Radio.prototype, "connotation");
|
|
121
169
|
__decorateClass([
|
|
122
|
-
|
|
170
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
123
171
|
], Radio.prototype, "readOnly");
|
|
124
172
|
__decorateClass([
|
|
125
|
-
|
|
173
|
+
vividElement.attr
|
|
126
174
|
], Radio.prototype, "name");
|
|
127
175
|
__decorateClass([
|
|
128
|
-
|
|
176
|
+
vividElement.observable
|
|
129
177
|
], Radio.prototype, "defaultSlottedNodes");
|
|
130
178
|
|
|
131
179
|
const getClasses = ({ connotation, checked, readOnly, disabled }) => classNames.classNames(
|
|
@@ -135,7 +183,7 @@ const getClasses = ({ connotation, checked, readOnly, disabled }) => classNames.
|
|
|
135
183
|
["readonly", Boolean(readOnly)],
|
|
136
184
|
["disabled", Boolean(disabled)]
|
|
137
185
|
);
|
|
138
|
-
const RadioTemplate =
|
|
186
|
+
const RadioTemplate = vividElement.html`<template
|
|
139
187
|
role="${(x) => x.ariaLabel ? "presentation" : null}"
|
|
140
188
|
>
|
|
141
189
|
<div
|
|
@@ -151,12 +199,12 @@ const RadioTemplate = defineVividComponent.html`<template
|
|
|
151
199
|
<div class="control"></div>
|
|
152
200
|
${when.when(
|
|
153
201
|
(x) => x.label,
|
|
154
|
-
|
|
202
|
+
vividElement.html`<label class="label">${(x) => x.label}</label>`
|
|
155
203
|
)}
|
|
156
204
|
</div>
|
|
157
205
|
</template>`;
|
|
158
206
|
|
|
159
|
-
const radioDefinition =
|
|
207
|
+
const radioDefinition = vividElement.defineVividComponent(
|
|
160
208
|
"radio",
|
|
161
209
|
Radio,
|
|
162
210
|
RadioTemplate,
|
|
@@ -165,7 +213,7 @@ const radioDefinition = defineVividComponent.defineVividComponent(
|
|
|
165
213
|
styles
|
|
166
214
|
}
|
|
167
215
|
);
|
|
168
|
-
const registerRadio =
|
|
216
|
+
const registerRadio = vividElement.createRegisterFunction(radioDefinition);
|
|
169
217
|
|
|
170
218
|
exports.Radio = Radio;
|
|
171
219
|
exports.radioDefinition = radioDefinition;
|
package/shared/definition40.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
1
|
+
import { V as VividElement, D as DOM, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
2
2
|
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
3
|
-
import { V as VividElement } from './vivid-element.js';
|
|
4
3
|
import { a as keySpace } from './key-codes.js';
|
|
5
4
|
import { w as when } from './when.js';
|
|
6
5
|
import { c as classNames } from './class-names.js';
|
|
@@ -13,7 +12,45 @@ class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
|
|
|
13
12
|
constructor() {
|
|
14
13
|
super(...arguments);
|
|
15
14
|
this.proxy = document.createElement("input");
|
|
15
|
+
this.#validateValueMissingWithSiblings = () => {
|
|
16
|
+
const siblings = this.#radioSiblings;
|
|
17
|
+
if (siblings && siblings.length > 1) {
|
|
18
|
+
const isSiblingChecked = siblings.some((x) => x.checked);
|
|
19
|
+
if (isSiblingChecked) {
|
|
20
|
+
this.setValidity({ valueMissing: false });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
this.#syncSiblingsRequiredValidationStatus = () => {
|
|
25
|
+
if (this.elementInternals && !this.validity.valueMissing) {
|
|
26
|
+
const siblings = this.#radioSiblings;
|
|
27
|
+
if (siblings && siblings.length > 1) {
|
|
28
|
+
siblings.forEach((x) => {
|
|
29
|
+
x.elementInternals.setValidity({ valueMissing: false });
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
this.validate = (anchor) => {
|
|
35
|
+
super.validate(anchor);
|
|
36
|
+
if (this.validity.valueMissing) {
|
|
37
|
+
this.#validateValueMissingWithSiblings();
|
|
38
|
+
} else {
|
|
39
|
+
this.#syncSiblingsRequiredValidationStatus();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
get #radioSiblings() {
|
|
44
|
+
const siblings = this.parentElement?.querySelectorAll(
|
|
45
|
+
`${this.tagName.toLocaleLowerCase()}[name="${this.name}"]`
|
|
46
|
+
);
|
|
47
|
+
if (siblings) {
|
|
48
|
+
return Array.from(siblings);
|
|
49
|
+
}
|
|
50
|
+
return [];
|
|
16
51
|
}
|
|
52
|
+
#validateValueMissingWithSiblings;
|
|
53
|
+
#syncSiblingsRequiredValidationStatus;
|
|
17
54
|
}
|
|
18
55
|
|
|
19
56
|
var __defProp = Object.defineProperty;
|
|
@@ -51,6 +88,7 @@ class Radio extends FormAssociatedRadio {
|
|
|
51
88
|
return true;
|
|
52
89
|
};
|
|
53
90
|
this.proxy.setAttribute("type", "radio");
|
|
91
|
+
this.proxy.setAttribute("name", this.name);
|
|
54
92
|
}
|
|
55
93
|
// Map to proxy element
|
|
56
94
|
/**
|
|
@@ -72,12 +110,22 @@ class Radio extends FormAssociatedRadio {
|
|
|
72
110
|
}
|
|
73
111
|
}
|
|
74
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
nameChanged(previous, next) {
|
|
117
|
+
if (super.nameChanged) {
|
|
118
|
+
super.nameChanged(previous, next);
|
|
119
|
+
}
|
|
120
|
+
next !== null ? this.proxy.setAttribute("name", this.name) : this.proxy.removeAttribute("name");
|
|
121
|
+
DOM.queueUpdate(this.validate);
|
|
122
|
+
}
|
|
75
123
|
/**
|
|
76
124
|
* @internal
|
|
77
125
|
*/
|
|
78
126
|
connectedCallback() {
|
|
79
127
|
super.connectedCallback();
|
|
80
|
-
this.validate
|
|
128
|
+
DOM.queueUpdate(this.validate);
|
|
81
129
|
if (this.parentElement.getAttribute("role") !== "radiogroup" && this.getAttribute("tabindex") === null) {
|
|
82
130
|
if (!this.disabled) {
|
|
83
131
|
this.setAttribute("tabindex", "0");
|
|
@@ -120,7 +168,7 @@ __decorateClass([
|
|
|
120
168
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
121
169
|
], Radio.prototype, "readOnly");
|
|
122
170
|
__decorateClass([
|
|
123
|
-
|
|
171
|
+
attr
|
|
124
172
|
], Radio.prototype, "name");
|
|
125
173
|
__decorateClass([
|
|
126
174
|
observable
|
package/shared/definition41.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition63.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const keyCodes = require('./key-codes.cjs');
|
|
6
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
7
7
|
const formAssociated = require('./form-associated.cjs');
|
|
8
|
-
const vividElement = require('./vivid-element.cjs');
|
|
9
8
|
const slider_template = require('./slider.template.cjs');
|
|
10
9
|
const aria = require('./aria.cjs');
|
|
11
10
|
const numbers = require('./numbers.cjs');
|
|
@@ -460,70 +459,70 @@ unregisterDragListeners_fn = function() {
|
|
|
460
459
|
_onDragMove = new WeakMap();
|
|
461
460
|
_onDragEnd = new WeakMap();
|
|
462
461
|
__decorateClass([
|
|
463
|
-
|
|
462
|
+
vividElement.observable
|
|
464
463
|
], RangeSlider.prototype, "start", 2);
|
|
465
464
|
__decorateClass([
|
|
466
|
-
|
|
465
|
+
vividElement.attr({ mode: "fromView", attribute: "start" })
|
|
467
466
|
], RangeSlider.prototype, "initialStart", 2);
|
|
468
467
|
__decorateClass([
|
|
469
|
-
|
|
468
|
+
vividElement.attr({ attribute: "current-start" })
|
|
470
469
|
], RangeSlider.prototype, "currentStart", 2);
|
|
471
470
|
__decorateClass([
|
|
472
|
-
|
|
471
|
+
vividElement.observable
|
|
473
472
|
], RangeSlider.prototype, "end", 2);
|
|
474
473
|
__decorateClass([
|
|
475
|
-
|
|
474
|
+
vividElement.attr({ mode: "fromView", attribute: "end" })
|
|
476
475
|
], RangeSlider.prototype, "initialEnd", 2);
|
|
477
476
|
__decorateClass([
|
|
478
|
-
|
|
477
|
+
vividElement.attr({ attribute: "current-end" })
|
|
479
478
|
], RangeSlider.prototype, "currentEnd", 2);
|
|
480
479
|
__decorateClass([
|
|
481
|
-
|
|
480
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
482
481
|
], RangeSlider.prototype, "min", 2);
|
|
483
482
|
__decorateClass([
|
|
484
|
-
|
|
483
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
485
484
|
], RangeSlider.prototype, "max", 2);
|
|
486
485
|
__decorateClass([
|
|
487
|
-
|
|
486
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
488
487
|
], RangeSlider.prototype, "step", 2);
|
|
489
488
|
__decorateClass([
|
|
490
|
-
|
|
489
|
+
vividElement.attr
|
|
491
490
|
], RangeSlider.prototype, "orientation", 2);
|
|
492
491
|
__decorateClass([
|
|
493
|
-
|
|
492
|
+
vividElement.attr({ attribute: "aria-start-label" })
|
|
494
493
|
], RangeSlider.prototype, "ariaStartLabel", 2);
|
|
495
494
|
__decorateClass([
|
|
496
|
-
|
|
495
|
+
vividElement.attr({ attribute: "aria-end-label" })
|
|
497
496
|
], RangeSlider.prototype, "ariaEndLabel", 2);
|
|
498
497
|
__decorateClass([
|
|
499
|
-
|
|
498
|
+
vividElement.attr({ mode: "boolean" })
|
|
500
499
|
], RangeSlider.prototype, "markers", 2);
|
|
501
500
|
__decorateClass([
|
|
502
|
-
|
|
501
|
+
vividElement.attr
|
|
503
502
|
], RangeSlider.prototype, "connotation", 2);
|
|
504
503
|
__decorateClass([
|
|
505
|
-
|
|
504
|
+
vividElement.attr({ mode: "boolean" })
|
|
506
505
|
], RangeSlider.prototype, "pin", 2);
|
|
507
506
|
__decorateClass([
|
|
508
|
-
|
|
507
|
+
vividElement.observable
|
|
509
508
|
], RangeSlider.prototype, "valueTextFormatter", 2);
|
|
510
509
|
__decorateClass([
|
|
511
|
-
|
|
510
|
+
vividElement.observable
|
|
512
511
|
], RangeSlider.prototype, "_draggingThumb", 2);
|
|
513
512
|
__decorateClass([
|
|
514
|
-
|
|
513
|
+
vividElement.observable
|
|
515
514
|
], RangeSlider.prototype, "_visiblyFocusedThumb", 2);
|
|
516
515
|
__decorateClass([
|
|
517
|
-
|
|
516
|
+
vividElement.observable
|
|
518
517
|
], RangeSlider.prototype, "_hoveredThumb", 2);
|
|
519
518
|
__decorateClass([
|
|
520
|
-
|
|
519
|
+
vividElement.observable
|
|
521
520
|
], RangeSlider.prototype, "_startThumbCss", 2);
|
|
522
521
|
__decorateClass([
|
|
523
|
-
|
|
522
|
+
vividElement.observable
|
|
524
523
|
], RangeSlider.prototype, "_endThumbCss", 2);
|
|
525
524
|
__decorateClass([
|
|
526
|
-
|
|
525
|
+
vividElement.observable
|
|
527
526
|
], RangeSlider.prototype, "_selectedRangeCss", 2);
|
|
528
527
|
RangeSlider = __decorateClass([
|
|
529
528
|
formElements.formElements
|
|
@@ -541,7 +540,7 @@ const getThumbClassesFor = (thumb) => ({ _visiblyFocusedThumb }) => classNames.c
|
|
|
541
540
|
]);
|
|
542
541
|
const RangeSliderTemplate = (context) => {
|
|
543
542
|
const popupTag = context.tagFor(definition.Popup);
|
|
544
|
-
return
|
|
543
|
+
return vividElement.html` <template
|
|
545
544
|
@mousedown="${(x, c) => x._onMouseDown(c.event)}"
|
|
546
545
|
>
|
|
547
546
|
<div class="${getClasses} ${(x) => x.orientation}">
|
|
@@ -550,7 +549,7 @@ const RangeSliderTemplate = (context) => {
|
|
|
550
549
|
<div class="track-start" style="${(x) => x._selectedRangeCss}"></div>
|
|
551
550
|
${when.when(
|
|
552
551
|
(x) => x.markers,
|
|
553
|
-
|
|
552
|
+
vividElement.html`${(x) => slider_template.getMarkersTemplate(
|
|
554
553
|
x.orientation === aria.Orientation.horizontal,
|
|
555
554
|
Math.floor((x.max - x.min) / x.step)
|
|
556
555
|
)}`
|
|
@@ -572,7 +571,7 @@ const RangeSliderTemplate = (context) => {
|
|
|
572
571
|
></div>
|
|
573
572
|
${when.when(
|
|
574
573
|
(x) => x.pin,
|
|
575
|
-
|
|
574
|
+
vividElement.html`<${popupTag}
|
|
576
575
|
class="popup"
|
|
577
576
|
arrow
|
|
578
577
|
alternate
|
|
@@ -602,7 +601,7 @@ const RangeSliderTemplate = (context) => {
|
|
|
602
601
|
></div>
|
|
603
602
|
${when.when(
|
|
604
603
|
(x) => x.pin,
|
|
605
|
-
|
|
604
|
+
vividElement.html`<${popupTag}
|
|
606
605
|
class="popup"
|
|
607
606
|
arrow
|
|
608
607
|
alternate
|
|
@@ -621,7 +620,7 @@ const RangeSliderTemplate = (context) => {
|
|
|
621
620
|
</template>`;
|
|
622
621
|
};
|
|
623
622
|
|
|
624
|
-
const rangeSliderDefinition =
|
|
623
|
+
const rangeSliderDefinition = vividElement.defineVividComponent(
|
|
625
624
|
"range-slider",
|
|
626
625
|
RangeSlider,
|
|
627
626
|
RangeSliderTemplate,
|
|
@@ -633,7 +632,7 @@ const rangeSliderDefinition = defineVividComponent.defineVividComponent(
|
|
|
633
632
|
}
|
|
634
633
|
}
|
|
635
634
|
);
|
|
636
|
-
const registerRangeSlider =
|
|
635
|
+
const registerRangeSlider = vividElement.createRegisterFunction(
|
|
637
636
|
rangeSliderDefinition
|
|
638
637
|
);
|
|
639
638
|
|
package/shared/definition41.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { P as Popup, a as PlacementStrategy, p as popupDefinition } from './definition63.js';
|
|
2
|
-
import { o as observable, a as attr, n as nullableNumberConverter, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { V as VividElement, o as observable, a as attr, n as nullableNumberConverter, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { g as keyHome, d as keyEnd, e as keyArrowUp, h as keyArrowLeft, f as keyArrowDown, i as keyArrowRight } from './key-codes.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { F as FormAssociated } from './form-associated.js';
|
|
6
|
-
import { V as VividElement } from './vivid-element.js';
|
|
7
6
|
import { i as inverseLerp, l as lerp, r as roundToStepValue, g as getMarkersTemplate } from './slider.template.js';
|
|
8
7
|
import { O as Orientation } from './aria.js';
|
|
9
8
|
import { l as limit } from './numbers.js';
|