@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/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
6
|
import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
7
|
-
import { V as VividElement } from './vivid-element.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;
|