@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/definition8.cjs
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition11.cjs');
|
|
4
4
|
const definition$1 = require('./definition27.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
7
7
|
const enums = require('./enums.cjs');
|
|
8
8
|
const affix = require('./affix.cjs');
|
|
9
|
-
const vividElement = require('./vivid-element.cjs');
|
|
10
9
|
const localized = require('./localized.cjs');
|
|
11
10
|
const slotted = require('./slotted.cjs');
|
|
12
11
|
const when = require('./when.cjs');
|
|
@@ -71,38 +70,38 @@ class Banner extends vividElement.VividElement {
|
|
|
71
70
|
#closeOnKeyDown;
|
|
72
71
|
}
|
|
73
72
|
__decorateClass([
|
|
74
|
-
|
|
73
|
+
vividElement.attr({ attribute: "dismiss-aria-label" })
|
|
75
74
|
], Banner.prototype, "dismissButtonAriaLabel");
|
|
76
75
|
__decorateClass([
|
|
77
|
-
|
|
76
|
+
vividElement.attr
|
|
78
77
|
], Banner.prototype, "role");
|
|
79
78
|
__decorateClass([
|
|
80
|
-
|
|
79
|
+
vividElement.attr({ attribute: "action-href" })
|
|
81
80
|
], Banner.prototype, "actionHref");
|
|
82
81
|
__decorateClass([
|
|
83
|
-
|
|
82
|
+
vividElement.attr({ attribute: "action-text" })
|
|
84
83
|
], Banner.prototype, "actionText");
|
|
85
84
|
__decorateClass([
|
|
86
|
-
|
|
85
|
+
vividElement.attr({ mode: "boolean" })
|
|
87
86
|
], Banner.prototype, "removable");
|
|
88
87
|
__decorateClass([
|
|
89
|
-
|
|
88
|
+
vividElement.attr({ attribute: "aria-live" })
|
|
90
89
|
], Banner.prototype, "ariaLive");
|
|
91
90
|
__decorateClass([
|
|
92
|
-
|
|
91
|
+
vividElement.attr()
|
|
93
92
|
], Banner.prototype, "text");
|
|
94
93
|
__decorateClass([
|
|
95
|
-
|
|
94
|
+
vividElement.attr()
|
|
96
95
|
], Banner.prototype, "connotation");
|
|
97
96
|
__decorateClass([
|
|
98
|
-
|
|
97
|
+
vividElement.observable
|
|
99
98
|
], Banner.prototype, "actionItemsSlottedContent");
|
|
100
99
|
applyMixins.applyMixins(Banner, affix.AffixIcon);
|
|
101
100
|
applyMixins.applyMixins(Banner, localized.Localized);
|
|
102
101
|
|
|
103
102
|
const getClasses = (_) => classNames.classNames("control", [`connotation-${_.connotation}`, !!_.connotation]);
|
|
104
103
|
function renderDismissButton(buttonTag) {
|
|
105
|
-
return
|
|
104
|
+
return vividElement.html`
|
|
106
105
|
<${buttonTag}
|
|
107
106
|
aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.banner.dismissButtonLabel}"
|
|
108
107
|
part="${(x) => x.connotation === "warning" ? "" : "vvd-theme-alternate"}"
|
|
@@ -115,7 +114,7 @@ function renderDismissButton(buttonTag) {
|
|
|
115
114
|
const BannerTemplate = (context) => {
|
|
116
115
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
117
116
|
const buttonTag = context.tagFor(definition.Button);
|
|
118
|
-
return
|
|
117
|
+
return vividElement.html`
|
|
119
118
|
<div class="${getClasses}">
|
|
120
119
|
<header class="header">
|
|
121
120
|
<div class="content">
|
|
@@ -140,7 +139,7 @@ const BannerTemplate = (context) => {
|
|
|
140
139
|
`;
|
|
141
140
|
};
|
|
142
141
|
|
|
143
|
-
const bannerDefinition =
|
|
142
|
+
const bannerDefinition = vividElement.defineVividComponent(
|
|
144
143
|
"banner",
|
|
145
144
|
Banner,
|
|
146
145
|
BannerTemplate,
|
|
@@ -149,7 +148,7 @@ const bannerDefinition = defineVividComponent.defineVividComponent(
|
|
|
149
148
|
styles
|
|
150
149
|
}
|
|
151
150
|
);
|
|
152
|
-
const registerBanner =
|
|
151
|
+
const registerBanner = vividElement.createRegisterFunction(bannerDefinition);
|
|
153
152
|
|
|
154
153
|
exports.bannerDefinition = bannerDefinition;
|
|
155
154
|
exports.registerBanner = registerBanner;
|
package/shared/definition8.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { i as iconDefinition } from './definition27.js';
|
|
3
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { C as Connotation } from './enums.js';
|
|
6
|
-
import {
|
|
7
|
-
import { V as VividElement } from './vivid-element.js';
|
|
6
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
8
7
|
import { L as Localized } from './localized.js';
|
|
9
8
|
import { s as slotted } from './slotted.js';
|
|
10
9
|
import { w as when } from './when.js';
|
package/shared/definition9.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 breadcrumbItem = require('./breadcrumb-item.cjs');
|
|
6
6
|
const textAnchor_template = require('./text-anchor.template.cjs');
|
|
7
7
|
const when = require('./when.cjs');
|
|
@@ -12,20 +12,20 @@ const styles = ".base{display:flex;align-items:center;color:var(--vvd-color-canv
|
|
|
12
12
|
const getClasses = (_) => classNames.classNames("base");
|
|
13
13
|
const BreadcrumbItemTemplate = (context) => {
|
|
14
14
|
const iconTag = context.tagFor(definition.Icon);
|
|
15
|
-
return
|
|
16
|
-
${when.when((x) => x.text && !x.href,
|
|
15
|
+
return vividElement.html` <div role="listitem" class="${getClasses}">
|
|
16
|
+
${when.when((x) => x.text && !x.href, vividElement.html`${(x) => x.text}`)}
|
|
17
17
|
${when.when(
|
|
18
18
|
(x) => x.text && x.href && x.href.length > 0,
|
|
19
|
-
|
|
19
|
+
vividElement.html`${textAnchor_template.textAnchorTemplate(context)}`
|
|
20
20
|
)}
|
|
21
21
|
${when.when(
|
|
22
22
|
(x) => x.separator,
|
|
23
|
-
|
|
23
|
+
vividElement.html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`
|
|
24
24
|
)}
|
|
25
25
|
</div>`;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const breadcrumbItemDefinition =
|
|
28
|
+
const breadcrumbItemDefinition = vividElement.defineVividComponent(
|
|
29
29
|
"breadcrumb-item",
|
|
30
30
|
breadcrumbItem.BreadcrumbItem,
|
|
31
31
|
BreadcrumbItemTemplate,
|
|
@@ -37,7 +37,7 @@ const breadcrumbItemDefinition = defineVividComponent.defineVividComponent(
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
const registerBreadcrumbItem =
|
|
40
|
+
const registerBreadcrumbItem = vividElement.createRegisterFunction(
|
|
41
41
|
breadcrumbItemDefinition
|
|
42
42
|
);
|
|
43
43
|
|
package/shared/definition9.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { B as BreadcrumbItem } from './breadcrumb-item.js';
|
|
4
4
|
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
|
5
5
|
import { w as when } from './when.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
const keyCodes = require('./key-codes.cjs');
|
|
5
5
|
|
|
6
6
|
const proxySlotName = "form-associated-proxy";
|
|
@@ -92,7 +92,7 @@ function FormAssociated(BaseCtor) {
|
|
|
92
92
|
);
|
|
93
93
|
return Object.freeze(forLabels.concat(Array.from(parentLabels)));
|
|
94
94
|
} else {
|
|
95
|
-
return
|
|
95
|
+
return vividElement.emptyArray;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
@@ -141,7 +141,7 @@ function FormAssociated(BaseCtor) {
|
|
|
141
141
|
if (this.proxy instanceof HTMLElement) {
|
|
142
142
|
this.proxy.disabled = this.disabled;
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
vividElement.DOM.queueUpdate(() => this.classList.toggle("disabled", this.disabled));
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
147
|
* Invoked when the `name` property changes
|
|
@@ -168,7 +168,7 @@ function FormAssociated(BaseCtor) {
|
|
|
168
168
|
if (this.proxy instanceof HTMLElement) {
|
|
169
169
|
this.proxy.required = this.required;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
vividElement.DOM.queueUpdate(() => this.classList.toggle("required", this.required));
|
|
172
172
|
this.validate();
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
@@ -335,12 +335,12 @@ function FormAssociated(BaseCtor) {
|
|
|
335
335
|
e.stopPropagation();
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
338
|
+
vividElement.attr({ mode: "boolean" })(C.prototype, "disabled");
|
|
339
|
+
vividElement.attr({ mode: "fromView", attribute: "value" })(C.prototype, "initialValue");
|
|
340
|
+
vividElement.attr({ attribute: "current-value" })(C.prototype, "currentValue");
|
|
341
|
+
vividElement.attr(C.prototype, "name");
|
|
342
|
+
vividElement.attr({ mode: "boolean" })(C.prototype, "required");
|
|
343
|
+
vividElement.observable(C.prototype, "value");
|
|
344
344
|
return C;
|
|
345
345
|
}
|
|
346
346
|
function CheckableFormAssociated(BaseCtor) {
|
|
@@ -418,16 +418,16 @@ function CheckableFormAssociated(BaseCtor) {
|
|
|
418
418
|
this.dirtyChecked = false;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
|
|
421
|
+
vividElement.attr({ attribute: "checked", mode: "boolean" })(
|
|
422
422
|
D.prototype,
|
|
423
423
|
"checkedAttribute"
|
|
424
424
|
);
|
|
425
|
-
|
|
425
|
+
vividElement.attr({ attribute: "current-checked", converter: vividElement.booleanConverter })(
|
|
426
426
|
D.prototype,
|
|
427
427
|
"currentChecked"
|
|
428
428
|
);
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
vividElement.observable(D.prototype, "defaultChecked");
|
|
430
|
+
vividElement.observable(D.prototype, "checked");
|
|
431
431
|
return D;
|
|
432
432
|
}
|
|
433
433
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as attr, o as observable, c as booleanConverter, e as emptyArray, D as DOM } from './
|
|
1
|
+
import { a as attr, o as observable, c as booleanConverter, e as emptyArray, D as DOM } from './vivid-element.js';
|
|
2
2
|
import { k as keyEnter } from './key-codes.js';
|
|
3
3
|
|
|
4
4
|
const proxySlotName = "form-associated-proxy";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
const keyCodes = require('./key-codes2.cjs');
|
|
5
5
|
|
|
6
6
|
const proxySlotName = "form-associated-proxy";
|
|
@@ -117,7 +117,7 @@ function FormAssociated(BaseCtor) {
|
|
|
117
117
|
return Object.freeze(labels);
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
120
|
-
return
|
|
120
|
+
return vividElement.emptyArray;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
@@ -176,7 +176,7 @@ function FormAssociated(BaseCtor) {
|
|
|
176
176
|
if (this.proxy instanceof HTMLElement) {
|
|
177
177
|
this.proxy.disabled = this.disabled;
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
vividElement.DOM.queueUpdate(() => this.classList.toggle("disabled", this.disabled));
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* Invoked when the `name` property changes
|
|
@@ -209,7 +209,7 @@ function FormAssociated(BaseCtor) {
|
|
|
209
209
|
if (this.proxy instanceof HTMLElement) {
|
|
210
210
|
this.proxy.required = this.required;
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
vividElement.DOM.queueUpdate(() => this.classList.toggle("required", this.required));
|
|
213
213
|
this.validate();
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
@@ -371,12 +371,12 @@ function FormAssociated(BaseCtor) {
|
|
|
371
371
|
e.stopPropagation();
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
374
|
+
vividElement.attr({ mode: "boolean" })(C.prototype, "disabled");
|
|
375
|
+
vividElement.attr({ mode: "fromView", attribute: "value" })(C.prototype, "initialValue");
|
|
376
|
+
vividElement.attr({ attribute: "current-value" })(C.prototype, "currentValue");
|
|
377
|
+
vividElement.attr(C.prototype, "name");
|
|
378
|
+
vividElement.attr({ mode: "boolean" })(C.prototype, "required");
|
|
379
|
+
vividElement.observable(C.prototype, "value");
|
|
380
380
|
return C;
|
|
381
381
|
}
|
|
382
382
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as attr, o as observable, e as emptyArray, D as DOM } from './
|
|
1
|
+
import { a as attr, o as observable, e as emptyArray, D as DOM } from './vivid-element.js';
|
|
2
2
|
import { k as keyEnter } from './key-codes2.js';
|
|
3
3
|
|
|
4
4
|
const proxySlotName = "form-associated-proxy";
|
package/shared/form-elements.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 slotted = require('./slotted.cjs');
|
|
6
6
|
const classNames = require('./class-names.cjs');
|
|
7
7
|
const when = require('./when.cjs');
|
|
@@ -20,15 +20,15 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
20
20
|
class FormElementHelperText {
|
|
21
21
|
}
|
|
22
22
|
__decorateClass([
|
|
23
|
-
|
|
23
|
+
vividElement.attr({ attribute: "helper-text" })
|
|
24
24
|
], FormElementHelperText.prototype, "helperText");
|
|
25
25
|
__decorateClass([
|
|
26
|
-
|
|
26
|
+
vividElement.observable
|
|
27
27
|
], FormElementHelperText.prototype, "_helperTextSlottedContent");
|
|
28
28
|
class FormElementSuccessText {
|
|
29
29
|
}
|
|
30
30
|
__decorateClass([
|
|
31
|
-
|
|
31
|
+
vividElement.attr({ attribute: "success-text" })
|
|
32
32
|
], FormElementSuccessText.prototype, "successText");
|
|
33
33
|
class FormElementCharCount {
|
|
34
34
|
constructor() {
|
|
@@ -36,7 +36,7 @@ class FormElementCharCount {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
__decorateClass([
|
|
39
|
-
|
|
39
|
+
vividElement.attr({
|
|
40
40
|
attribute: "char-count",
|
|
41
41
|
mode: "boolean"
|
|
42
42
|
})
|
|
@@ -87,10 +87,10 @@ function formElements(constructor) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
__decorateClass([
|
|
90
|
-
|
|
90
|
+
vividElement.attr
|
|
91
91
|
], Decorated.prototype, "label");
|
|
92
92
|
__decorateClass([
|
|
93
|
-
|
|
93
|
+
vividElement.observable
|
|
94
94
|
], Decorated.prototype, "errorValidationMessage");
|
|
95
95
|
return Decorated;
|
|
96
96
|
}
|
|
@@ -121,7 +121,7 @@ const isFeedbackAvailable = (config, x) => Boolean(
|
|
|
121
121
|
x[config.messageProperty] || config.slot && x[config.slot.slottedContentProperty]?.length
|
|
122
122
|
);
|
|
123
123
|
function getFeedbackTemplate(context) {
|
|
124
|
-
return
|
|
124
|
+
return vividElement.html`
|
|
125
125
|
<style>
|
|
126
126
|
${messageStyles}
|
|
127
127
|
</style>
|
|
@@ -144,13 +144,13 @@ function getFeedbackTemplate(context) {
|
|
|
144
144
|
}
|
|
145
145
|
function getFeedbackTypeTemplate(context, config, shouldShow) {
|
|
146
146
|
const iconTag = context.tagFor(definition.Icon);
|
|
147
|
-
const messageTemplate =
|
|
148
|
-
const innerTemplate = config.slot ?
|
|
147
|
+
const messageTemplate = vividElement.html`${(x) => x[config.messageProperty]}`;
|
|
148
|
+
const innerTemplate = config.slot ? vividElement.html`<slot
|
|
149
149
|
name="${config.slot.name}"
|
|
150
150
|
${slotted.slotted(config.slot.slottedContentProperty)}
|
|
151
151
|
>${messageTemplate}</slot
|
|
152
152
|
>` : messageTemplate;
|
|
153
|
-
return
|
|
153
|
+
return vividElement.html`<div
|
|
154
154
|
class="${(x) => classNames.classNames(
|
|
155
155
|
"message",
|
|
156
156
|
`${config.className}-message`,
|
|
@@ -162,7 +162,7 @@ function getFeedbackTypeTemplate(context, config, shouldShow) {
|
|
|
162
162
|
>
|
|
163
163
|
${when.when(
|
|
164
164
|
(x) => shouldShow(x) && config.iconType,
|
|
165
|
-
|
|
165
|
+
vividElement.html`<${iconTag} class="message-icon" name="${config.iconType}"></${iconTag}>`
|
|
166
166
|
)}
|
|
167
167
|
<span class="message-text">${innerTemplate}</span>
|
|
168
168
|
</div>`;
|
|
@@ -196,7 +196,7 @@ function errorText(constructor) {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
__decorateClass([
|
|
199
|
-
|
|
199
|
+
vividElement.attr({ attribute: "error-text" })
|
|
200
200
|
], Decorated.prototype, "errorText");
|
|
201
201
|
return Decorated;
|
|
202
202
|
}
|
package/shared/form-elements.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I as Icon } from './definition27.js';
|
|
2
|
-
import { a as attr, o as observable, h as html } from './
|
|
2
|
+
import { a as attr, o as observable, h as html } from './vivid-element.js';
|
|
3
3
|
import { s as slotted } from './slotted.js';
|
|
4
4
|
import { c as classNames } from './class-names.js';
|
|
5
5
|
import { w as when } from './when.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class BaseProgress extends
|
|
1
|
+
import { VividElement } from '../vivid-element/vivid-element';
|
|
2
|
+
export declare class BaseProgress extends VividElement {
|
|
3
3
|
value: number | null;
|
|
4
4
|
min: number;
|
|
5
5
|
max: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
@@ -382,7 +382,7 @@ const DI = Object.freeze({
|
|
|
382
382
|
: DI.getOrCreateDOMContainer();
|
|
383
383
|
value = container.get(key);
|
|
384
384
|
this[diPropertyKey] = value;
|
|
385
|
-
if (respectConnection && this instanceof
|
|
385
|
+
if (respectConnection && this instanceof vividElement.FASTElement) {
|
|
386
386
|
const notifier = this.$fastController;
|
|
387
387
|
const handleChange = () => {
|
|
388
388
|
const newContainer = DI.findResponsibleContainer(this);
|
|
@@ -903,7 +903,7 @@ class ContainerImpl {
|
|
|
903
903
|
let current = requestor;
|
|
904
904
|
let resolver;
|
|
905
905
|
if (searchAncestors) {
|
|
906
|
-
let resolutions =
|
|
906
|
+
let resolutions = vividElement.emptyArray;
|
|
907
907
|
while (current != null) {
|
|
908
908
|
resolver = current.resolvers.get(key);
|
|
909
909
|
if (resolver != null) {
|
|
@@ -921,7 +921,7 @@ class ContainerImpl {
|
|
|
921
921
|
if (resolver == null) {
|
|
922
922
|
current = current.parent;
|
|
923
923
|
if (current == null) {
|
|
924
|
-
return
|
|
924
|
+
return vividElement.emptyArray;
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
else {
|
|
@@ -929,7 +929,7 @@ class ContainerImpl {
|
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
return
|
|
932
|
+
return vividElement.emptyArray;
|
|
933
933
|
}
|
|
934
934
|
getFactory(Type) {
|
|
935
935
|
let factory = factories.get(Type);
|
|
@@ -1262,10 +1262,10 @@ class DefaultComponentPresentation {
|
|
|
1262
1262
|
styles === void 0
|
|
1263
1263
|
? null
|
|
1264
1264
|
: Array.isArray(styles)
|
|
1265
|
-
?
|
|
1266
|
-
: styles instanceof
|
|
1265
|
+
? vividElement.ElementStyles.create(styles)
|
|
1266
|
+
: styles instanceof vividElement.ElementStyles
|
|
1267
1267
|
? styles
|
|
1268
|
-
:
|
|
1268
|
+
: vividElement.ElementStyles.create([styles]);
|
|
1269
1269
|
}
|
|
1270
1270
|
/**
|
|
1271
1271
|
* Applies the presentation details to the specified element.
|
|
@@ -1291,7 +1291,7 @@ class DefaultComponentPresentation {
|
|
|
1291
1291
|
*
|
|
1292
1292
|
* @public
|
|
1293
1293
|
*/
|
|
1294
|
-
class FoundationElement extends
|
|
1294
|
+
class FoundationElement extends vividElement.FASTElement {
|
|
1295
1295
|
constructor() {
|
|
1296
1296
|
super(...arguments);
|
|
1297
1297
|
this._presentation = void 0;
|
|
@@ -1344,10 +1344,10 @@ class FoundationElement extends defineVividComponent.FASTElement {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
__decorate([
|
|
1347
|
-
|
|
1347
|
+
vividElement.observable
|
|
1348
1348
|
], FoundationElement.prototype, "template", void 0);
|
|
1349
1349
|
__decorate([
|
|
1350
|
-
|
|
1350
|
+
vividElement.observable
|
|
1351
1351
|
], FoundationElement.prototype, "styles", void 0);
|
|
1352
1352
|
function resolveOption(option, context, definition) {
|
|
1353
1353
|
if (typeof option === "function") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FASTElement, e as emptyArray, E as ElementStyles, o as observable } from './
|
|
1
|
+
import { F as FASTElement, e as emptyArray, E as ElementStyles, o as observable } from './vivid-element.js';
|
|
2
2
|
|
|
3
3
|
/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
package/shared/key-codes2.cjs
CHANGED
|
@@ -1,54 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
|
-
const ref = require('./ref.cjs');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A mixin class implementing start and end elements.
|
|
8
|
-
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class StartEnd {
|
|
12
|
-
handleStartContentChange() {
|
|
13
|
-
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
14
|
-
}
|
|
15
|
-
handleEndContentChange() {
|
|
16
|
-
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The template for the end element.
|
|
21
|
-
* For use with {@link StartEnd}
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
* @deprecated - use endSlotTemplate
|
|
25
|
-
*/
|
|
26
|
-
defineVividComponent.html `
|
|
27
|
-
<span part="end" ${ref.ref("endContainer")}>
|
|
28
|
-
<slot
|
|
29
|
-
name="end"
|
|
30
|
-
${ref.ref("end")}
|
|
31
|
-
@slotchange="${x => x.handleEndContentChange()}"
|
|
32
|
-
></slot>
|
|
33
|
-
</span>
|
|
34
|
-
`;
|
|
35
|
-
/**
|
|
36
|
-
* The template for the start element.
|
|
37
|
-
* For use with {@link StartEnd}
|
|
38
|
-
*
|
|
39
|
-
* @public
|
|
40
|
-
* @deprecated - use startSlotTemplate
|
|
41
|
-
*/
|
|
42
|
-
defineVividComponent.html `
|
|
43
|
-
<span part="start" ${ref.ref("startContainer")}>
|
|
44
|
-
<slot
|
|
45
|
-
name="start"
|
|
46
|
-
${ref.ref("start")}
|
|
47
|
-
@slotchange="${x => x.handleStartContentChange()}"
|
|
48
|
-
></slot>
|
|
49
|
-
</span>
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
3
|
/**
|
|
53
4
|
* Key Code values
|
|
54
5
|
* @deprecated - KeyCodes are deprecated, use individual string key exports
|
|
@@ -133,20 +84,13 @@ const keyArrowLeft = "ArrowLeft";
|
|
|
133
84
|
const keyArrowRight = "ArrowRight";
|
|
134
85
|
const keyArrowUp = "ArrowUp";
|
|
135
86
|
const keyEnter = "Enter";
|
|
136
|
-
const keyEscape = "Escape";
|
|
137
87
|
const keyHome = "Home";
|
|
138
88
|
const keyEnd = "End";
|
|
139
|
-
const keySpace = " ";
|
|
140
|
-
const keyTab = "Tab";
|
|
141
89
|
|
|
142
|
-
exports.StartEnd = StartEnd;
|
|
143
90
|
exports.keyArrowDown = keyArrowDown;
|
|
144
91
|
exports.keyArrowLeft = keyArrowLeft;
|
|
145
92
|
exports.keyArrowRight = keyArrowRight;
|
|
146
93
|
exports.keyArrowUp = keyArrowUp;
|
|
147
94
|
exports.keyEnd = keyEnd;
|
|
148
95
|
exports.keyEnter = keyEnter;
|
|
149
|
-
exports.keyEscape = keyEscape;
|
|
150
96
|
exports.keyHome = keyHome;
|
|
151
|
-
exports.keySpace = keySpace;
|
|
152
|
-
exports.keyTab = keyTab;
|
package/shared/key-codes2.js
CHANGED
|
@@ -1,52 +1,3 @@
|
|
|
1
|
-
import { h as html } from './defineVividComponent.js';
|
|
2
|
-
import { r as ref } from './ref.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A mixin class implementing start and end elements.
|
|
6
|
-
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
class StartEnd {
|
|
10
|
-
handleStartContentChange() {
|
|
11
|
-
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
12
|
-
}
|
|
13
|
-
handleEndContentChange() {
|
|
14
|
-
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The template for the end element.
|
|
19
|
-
* For use with {@link StartEnd}
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
* @deprecated - use endSlotTemplate
|
|
23
|
-
*/
|
|
24
|
-
html `
|
|
25
|
-
<span part="end" ${ref("endContainer")}>
|
|
26
|
-
<slot
|
|
27
|
-
name="end"
|
|
28
|
-
${ref("end")}
|
|
29
|
-
@slotchange="${x => x.handleEndContentChange()}"
|
|
30
|
-
></slot>
|
|
31
|
-
</span>
|
|
32
|
-
`;
|
|
33
|
-
/**
|
|
34
|
-
* The template for the start element.
|
|
35
|
-
* For use with {@link StartEnd}
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
* @deprecated - use startSlotTemplate
|
|
39
|
-
*/
|
|
40
|
-
html `
|
|
41
|
-
<span part="start" ${ref("startContainer")}>
|
|
42
|
-
<slot
|
|
43
|
-
name="start"
|
|
44
|
-
${ref("start")}
|
|
45
|
-
@slotchange="${x => x.handleStartContentChange()}"
|
|
46
|
-
></slot>
|
|
47
|
-
</span>
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
1
|
/**
|
|
51
2
|
* Key Code values
|
|
52
3
|
* @deprecated - KeyCodes are deprecated, use individual string key exports
|
|
@@ -131,10 +82,7 @@ const keyArrowLeft = "ArrowLeft";
|
|
|
131
82
|
const keyArrowRight = "ArrowRight";
|
|
132
83
|
const keyArrowUp = "ArrowUp";
|
|
133
84
|
const keyEnter = "Enter";
|
|
134
|
-
const keyEscape = "Escape";
|
|
135
85
|
const keyHome = "Home";
|
|
136
86
|
const keyEnd = "End";
|
|
137
|
-
const keySpace = " ";
|
|
138
|
-
const keyTab = "Tab";
|
|
139
87
|
|
|
140
|
-
export {
|
|
88
|
+
export { keyArrowRight as a, keyArrowLeft as b, keyArrowDown as c, keyArrowUp as d, keyEnd as e, keyHome as f, keyEnter as k };
|