@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/definition3.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
3
|
const vividElement = require('./vivid-element.cjs');
|
|
5
4
|
const classNames = require('./class-names.cjs');
|
|
6
5
|
|
|
@@ -24,21 +23,21 @@ class ActionGroup extends vividElement.VividElement {
|
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
__decorateClass([
|
|
27
|
-
|
|
26
|
+
vividElement.attr
|
|
28
27
|
], ActionGroup.prototype, "shape");
|
|
29
28
|
__decorateClass([
|
|
30
|
-
|
|
29
|
+
vividElement.attr
|
|
31
30
|
], ActionGroup.prototype, "appearance");
|
|
32
31
|
__decorateClass([
|
|
33
|
-
|
|
32
|
+
vividElement.attr({
|
|
34
33
|
mode: "boolean"
|
|
35
34
|
})
|
|
36
35
|
], ActionGroup.prototype, "tight");
|
|
37
36
|
__decorateClass([
|
|
38
|
-
|
|
37
|
+
vividElement.attr()
|
|
39
38
|
], ActionGroup.prototype, "role");
|
|
40
39
|
__decorateClass([
|
|
41
|
-
|
|
40
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
42
41
|
], ActionGroup.prototype, "ariaLabel");
|
|
43
42
|
|
|
44
43
|
const getClasses = ({ appearance, shape, tight }) => classNames.classNames(
|
|
@@ -47,7 +46,7 @@ const getClasses = ({ appearance, shape, tight }) => classNames.classNames(
|
|
|
47
46
|
[`shape-${shape}`, Boolean(shape)],
|
|
48
47
|
["tight", tight]
|
|
49
48
|
);
|
|
50
|
-
const ActionGroupTemplate =
|
|
49
|
+
const ActionGroupTemplate = vividElement.html`<div
|
|
51
50
|
class="${getClasses}"
|
|
52
51
|
role="${(x) => x.role ? x.role : "group"}"
|
|
53
52
|
aria-label="${(x) => x.ariaLabel}"
|
|
@@ -55,7 +54,7 @@ const ActionGroupTemplate = defineVividComponent.html`<div
|
|
|
55
54
|
<slot></slot>
|
|
56
55
|
</div>`;
|
|
57
56
|
|
|
58
|
-
const actionGroupDefinition =
|
|
57
|
+
const actionGroupDefinition = vividElement.defineVividComponent(
|
|
59
58
|
"action-group",
|
|
60
59
|
ActionGroup,
|
|
61
60
|
ActionGroupTemplate,
|
|
@@ -64,7 +63,7 @@ const actionGroupDefinition = defineVividComponent.defineVividComponent(
|
|
|
64
63
|
styles
|
|
65
64
|
}
|
|
66
65
|
);
|
|
67
|
-
const registerActionGroup =
|
|
66
|
+
const registerActionGroup = vividElement.createRegisterFunction(
|
|
68
67
|
actionGroupDefinition
|
|
69
68
|
);
|
|
70
69
|
|
package/shared/definition3.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
-
import { V as VividElement } from './vivid-element.js';
|
|
1
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
2
|
import { c as classNames } from './class-names.js';
|
|
4
3
|
|
|
5
4
|
const styles = ":host{display:inline-block}.base{--_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base{position:relative;display:flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);inline-size:inherit;vertical-align:middle}.base:before{position:absolute;z-index:1;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inset:0;pointer-events:none}.base:not(.tight){padding:4px;column-gap:4px}.base:not(.shape-pill){border-radius:8px}.base.shape-pill{border-radius:24px}::slotted([role=separator]){align-self:stretch;margin-block:4px}";
|
package/shared/definition30.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 ref = require('./ref.cjs');
|
|
9
8
|
const classNames = require('./class-names.cjs');
|
|
10
9
|
|
|
@@ -47,19 +46,19 @@ class NavDisclosure extends vividElement.VividElement {
|
|
|
47
46
|
#onToggle;
|
|
48
47
|
}
|
|
49
48
|
__decorateClass([
|
|
50
|
-
|
|
49
|
+
vividElement.attr
|
|
51
50
|
], NavDisclosure.prototype, "label");
|
|
52
51
|
__decorateClass([
|
|
53
|
-
|
|
52
|
+
vividElement.attr
|
|
54
53
|
], NavDisclosure.prototype, "appearance");
|
|
55
54
|
__decorateClass([
|
|
56
|
-
|
|
55
|
+
vividElement.attr
|
|
57
56
|
], NavDisclosure.prototype, "connotation");
|
|
58
57
|
__decorateClass([
|
|
59
|
-
|
|
58
|
+
vividElement.attr({ mode: "boolean" })
|
|
60
59
|
], NavDisclosure.prototype, "open");
|
|
61
60
|
__decorateClass([
|
|
62
|
-
|
|
61
|
+
vividElement.attr({ attribute: "aria-current" })
|
|
63
62
|
], NavDisclosure.prototype, "ariaCurrent");
|
|
64
63
|
applyMixins.applyMixins(NavDisclosure, affix.AffixIcon);
|
|
65
64
|
|
|
@@ -74,7 +73,7 @@ const getClasses = ({ appearance, connotation }) => classNames.classNames(
|
|
|
74
73
|
const NavDisclosureTemplate = (context) => {
|
|
75
74
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
76
75
|
const iconTag = context.tagFor(definition.Icon);
|
|
77
|
-
return
|
|
76
|
+
return vividElement.html`<details class="base" ${ref.ref("details")} ?open=${(x) => x.open}>
|
|
78
77
|
<summary class="${getClasses}"
|
|
79
78
|
role="button"
|
|
80
79
|
aria-controls="disclosure-content"
|
|
@@ -93,7 +92,7 @@ const NavDisclosureTemplate = (context) => {
|
|
|
93
92
|
`;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
|
-
const navDisclosureDefinition =
|
|
95
|
+
const navDisclosureDefinition = vividElement.defineVividComponent(
|
|
97
96
|
"nav-disclosure",
|
|
98
97
|
NavDisclosure,
|
|
99
98
|
NavDisclosureTemplate,
|
|
@@ -102,7 +101,7 @@ const navDisclosureDefinition = defineVividComponent.defineVividComponent(
|
|
|
102
101
|
styles
|
|
103
102
|
}
|
|
104
103
|
);
|
|
105
|
-
const registerNavDisclosure =
|
|
104
|
+
const registerNavDisclosure = vividElement.createRegisterFunction(
|
|
106
105
|
navDisclosureDefinition
|
|
107
106
|
);
|
|
108
107
|
|
package/shared/definition30.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { I as Icon, 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
4
|
import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
|
-
import { V as VividElement } from './vivid-element.js';
|
|
6
5
|
import { r as ref } from './ref.js';
|
|
7
6
|
import { c as classNames } from './class-names.js';
|
|
8
7
|
|
package/shared/definition31.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 affix = require('./affix.cjs');
|
|
6
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
7
7
|
const textAnchor = require('./text-anchor.cjs');
|
|
@@ -11,14 +11,14 @@ const styles = ".control{display:inline-flex;box-sizing:border-box;align-items:c
|
|
|
11
11
|
|
|
12
12
|
class NavItem extends textAnchor.TextAnchor {
|
|
13
13
|
getBodyTemplate() {
|
|
14
|
-
return
|
|
14
|
+
return vividElement.html`<slot name="meta"></slot>`;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
applyMixins.applyMixins(NavItem, affix.AffixIcon);
|
|
18
18
|
|
|
19
|
-
const NavItemTemplate = (context) =>
|
|
19
|
+
const NavItemTemplate = (context) => vividElement.html` ${textAnchor_template.textAnchorTemplate(context)} `;
|
|
20
20
|
|
|
21
|
-
const navItemDefinition =
|
|
21
|
+
const navItemDefinition = vividElement.defineVividComponent(
|
|
22
22
|
"nav-item",
|
|
23
23
|
NavItem,
|
|
24
24
|
NavItemTemplate,
|
|
@@ -30,7 +30,7 @@ const navItemDefinition = defineVividComponent.defineVividComponent(
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
const registerNavItem =
|
|
33
|
+
const registerNavItem = vividElement.createRegisterFunction(navItemDefinition);
|
|
34
34
|
|
|
35
35
|
exports.navItemDefinition = navItemDefinition;
|
|
36
36
|
exports.registerNavItem = registerNavItem;
|
package/shared/definition31.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { 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 { A as AffixIcon } from './affix.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { T as TextAnchor } from './text-anchor.js';
|
package/shared/definition32.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
3
|
const vividElement = require('./vivid-element.cjs');
|
|
5
4
|
|
|
6
5
|
const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
@@ -8,12 +7,12 @@ const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
|
8
7
|
class Nav extends vividElement.VividElement {
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
const NavTemplate =
|
|
10
|
+
const NavTemplate = vividElement.html` <nav><slot></slot></nav> `;
|
|
12
11
|
|
|
13
|
-
const navDefinition =
|
|
12
|
+
const navDefinition = vividElement.defineVividComponent("nav", Nav, NavTemplate, [], {
|
|
14
13
|
styles
|
|
15
14
|
});
|
|
16
|
-
const registerNav =
|
|
15
|
+
const registerNav = vividElement.createRegisterFunction(navDefinition);
|
|
17
16
|
|
|
18
17
|
exports.navDefinition = navDefinition;
|
|
19
18
|
exports.registerNav = registerNav;
|
package/shared/definition32.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
|
const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
5
4
|
|
package/shared/definition33.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
5
4
|
const vividElement = require('./vivid-element.cjs');
|
|
6
5
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
7
6
|
const affix = require('./affix.cjs');
|
|
@@ -22,20 +21,20 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
22
21
|
class Note extends vividElement.VividElement {
|
|
23
22
|
}
|
|
24
23
|
__decorateClass([
|
|
25
|
-
|
|
24
|
+
vividElement.attr
|
|
26
25
|
], Note.prototype, "headline");
|
|
27
26
|
__decorateClass([
|
|
28
|
-
|
|
27
|
+
vividElement.attr
|
|
29
28
|
], Note.prototype, "connotation");
|
|
30
29
|
applyMixins.applyMixins(Note, affix.AffixIcon);
|
|
31
30
|
|
|
32
31
|
const getClasses = ({ connotation }) => classNames.classNames("base", `connotation-${connotation}`);
|
|
33
32
|
function getHeaderTemplate() {
|
|
34
|
-
return
|
|
33
|
+
return vividElement.html`<div class="headline">${(x) => x.headline}</div>`;
|
|
35
34
|
}
|
|
36
35
|
const NoteTemplate = (context) => {
|
|
37
36
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
38
|
-
return
|
|
37
|
+
return vividElement.html`
|
|
39
38
|
<div class="${getClasses}">
|
|
40
39
|
${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
|
|
41
40
|
<div class="text">
|
|
@@ -46,7 +45,7 @@ const NoteTemplate = (context) => {
|
|
|
46
45
|
`;
|
|
47
46
|
};
|
|
48
47
|
|
|
49
|
-
const noteDefinition =
|
|
48
|
+
const noteDefinition = vividElement.defineVividComponent(
|
|
50
49
|
"note",
|
|
51
50
|
Note,
|
|
52
51
|
NoteTemplate,
|
|
@@ -55,7 +54,7 @@ const noteDefinition = defineVividComponent.defineVividComponent(
|
|
|
55
54
|
styles
|
|
56
55
|
}
|
|
57
56
|
);
|
|
58
|
-
const registerNote =
|
|
57
|
+
const registerNote = vividElement.createRegisterFunction(noteDefinition);
|
|
59
58
|
|
|
60
59
|
exports.noteDefinition = noteDefinition;
|
|
61
60
|
exports.registerNote = registerNote;
|
package/shared/definition33.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
-
import { V as VividElement } from './vivid-element.js';
|
|
2
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
3
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
5
4
|
import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
5
|
import { w as when } from './when.js';
|
package/shared/definition34.cjs
CHANGED
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition11.cjs');
|
|
4
4
|
const definition$1 = require('./definition22.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const definition$2 = require('./definition27.cjs');
|
|
7
7
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
8
8
|
const formAssociated$1 = require('./form-associated.cjs');
|
|
9
|
-
const
|
|
10
|
-
const foundationElement = require('./foundation-element.cjs');
|
|
9
|
+
const keyCodes = require('./key-codes2.cjs');
|
|
11
10
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
12
11
|
const formAssociated = require('./form-associated2.cjs');
|
|
13
12
|
const ariaGlobal = require('./aria-global2.cjs');
|
|
14
|
-
const keyCodes = require('./key-codes2.cjs');
|
|
15
13
|
const keyCodes$1 = require('./key-codes.cjs');
|
|
16
14
|
const formElements = require('./form-elements.cjs');
|
|
17
15
|
const affix = require('./affix.cjs');
|
|
@@ -21,7 +19,7 @@ const when = require('./when.cjs');
|
|
|
21
19
|
const ref = require('./ref.cjs');
|
|
22
20
|
const classNames = require('./class-names.cjs');
|
|
23
21
|
|
|
24
|
-
class _TextField extends
|
|
22
|
+
class _TextField extends keyCodes.FoundationElement {
|
|
25
23
|
}
|
|
26
24
|
/**
|
|
27
25
|
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
|
|
@@ -152,7 +150,7 @@ class TextField extends FormAssociatedTextField {
|
|
|
152
150
|
this.proxy.setAttribute("type", this.type);
|
|
153
151
|
this.validate();
|
|
154
152
|
if (this.autofocus) {
|
|
155
|
-
|
|
153
|
+
vividElement.DOM.queueUpdate(() => {
|
|
156
154
|
this.focus();
|
|
157
155
|
});
|
|
158
156
|
}
|
|
@@ -196,38 +194,38 @@ class TextField extends FormAssociatedTextField {
|
|
|
196
194
|
super.validate(this.control);
|
|
197
195
|
}
|
|
198
196
|
}
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
keyCodes.__decorate([
|
|
198
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
201
199
|
], TextField.prototype, "readOnly", void 0);
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
keyCodes.__decorate([
|
|
201
|
+
vividElement.attr({ mode: "boolean" })
|
|
204
202
|
], TextField.prototype, "autofocus", void 0);
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
keyCodes.__decorate([
|
|
204
|
+
vividElement.attr
|
|
207
205
|
], TextField.prototype, "placeholder", void 0);
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
keyCodes.__decorate([
|
|
207
|
+
vividElement.attr
|
|
210
208
|
], TextField.prototype, "type", void 0);
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
keyCodes.__decorate([
|
|
210
|
+
vividElement.attr
|
|
213
211
|
], TextField.prototype, "list", void 0);
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
keyCodes.__decorate([
|
|
213
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
216
214
|
], TextField.prototype, "maxlength", void 0);
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
keyCodes.__decorate([
|
|
216
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
219
217
|
], TextField.prototype, "minlength", void 0);
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
keyCodes.__decorate([
|
|
219
|
+
vividElement.attr
|
|
222
220
|
], TextField.prototype, "pattern", void 0);
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
keyCodes.__decorate([
|
|
222
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
225
223
|
], TextField.prototype, "size", void 0);
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
keyCodes.__decorate([
|
|
225
|
+
vividElement.attr({ mode: "boolean" })
|
|
228
226
|
], TextField.prototype, "spellcheck", void 0);
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
keyCodes.__decorate([
|
|
228
|
+
vividElement.observable
|
|
231
229
|
], TextField.prototype, "defaultSlottedNodes", void 0);
|
|
232
230
|
/**
|
|
233
231
|
* Includes ARIA states and properties relating to the ARIA textbox role
|
|
@@ -397,7 +395,7 @@ let NumberField = class extends FormAssociatedNumberField {
|
|
|
397
395
|
this.validate();
|
|
398
396
|
this._presentationValue = __privateMethod(this, _NumberField_instances, valueToPresentationValue_fn).call(this, this.value);
|
|
399
397
|
if (this.autofocus) {
|
|
400
|
-
|
|
398
|
+
vividElement.DOM.queueUpdate(() => {
|
|
401
399
|
this.focus();
|
|
402
400
|
});
|
|
403
401
|
}
|
|
@@ -468,58 +466,58 @@ presentationValueToValue_fn = function(presentationValue) {
|
|
|
468
466
|
return validNumber.test(candidate) ? candidate : "";
|
|
469
467
|
};
|
|
470
468
|
__decorateClass([
|
|
471
|
-
|
|
469
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
472
470
|
], NumberField.prototype, "readOnly", 2);
|
|
473
471
|
__decorateClass([
|
|
474
|
-
|
|
472
|
+
vividElement.attr({ mode: "boolean" })
|
|
475
473
|
], NumberField.prototype, "autofocus", 2);
|
|
476
474
|
__decorateClass([
|
|
477
|
-
|
|
475
|
+
vividElement.attr
|
|
478
476
|
], NumberField.prototype, "placeholder", 2);
|
|
479
477
|
__decorateClass([
|
|
480
|
-
|
|
478
|
+
vividElement.attr
|
|
481
479
|
], NumberField.prototype, "list", 2);
|
|
482
480
|
__decorateClass([
|
|
483
|
-
|
|
481
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
484
482
|
], NumberField.prototype, "maxlength", 2);
|
|
485
483
|
__decorateClass([
|
|
486
|
-
|
|
484
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
487
485
|
], NumberField.prototype, "minlength", 2);
|
|
488
486
|
__decorateClass([
|
|
489
|
-
|
|
487
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
490
488
|
], NumberField.prototype, "size", 2);
|
|
491
489
|
__decorateClass([
|
|
492
|
-
|
|
490
|
+
vividElement.attr()
|
|
493
491
|
], NumberField.prototype, "scale", 2);
|
|
494
492
|
__decorateClass([
|
|
495
|
-
|
|
493
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
496
494
|
], NumberField.prototype, "step", 2);
|
|
497
495
|
__decorateClass([
|
|
498
|
-
|
|
496
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
499
497
|
], NumberField.prototype, "max", 2);
|
|
500
498
|
__decorateClass([
|
|
501
|
-
|
|
499
|
+
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
502
500
|
], NumberField.prototype, "min", 2);
|
|
503
501
|
__decorateClass([
|
|
504
|
-
|
|
502
|
+
vividElement.observable
|
|
505
503
|
], NumberField.prototype, "defaultSlottedNodes", 2);
|
|
506
504
|
__decorateClass([
|
|
507
|
-
|
|
505
|
+
vividElement.observable
|
|
508
506
|
], NumberField.prototype, "_presentationValue", 2);
|
|
509
507
|
__decorateClass([
|
|
510
|
-
|
|
508
|
+
vividElement.attr({ attribute: "increment-button-aria-label" })
|
|
511
509
|
], NumberField.prototype, "incrementButtonAriaLabel", 2);
|
|
512
510
|
__decorateClass([
|
|
513
|
-
|
|
511
|
+
vividElement.attr({ attribute: "decrement-button-aria-label" })
|
|
514
512
|
], NumberField.prototype, "decrementButtonAriaLabel", 2);
|
|
515
513
|
__decorateClass([
|
|
516
|
-
|
|
514
|
+
vividElement.attr
|
|
517
515
|
], NumberField.prototype, "appearance", 2);
|
|
518
516
|
__decorateClass([
|
|
519
|
-
|
|
517
|
+
vividElement.attr
|
|
520
518
|
], NumberField.prototype, "shape", 2);
|
|
521
519
|
__decorateClass([
|
|
522
|
-
|
|
520
|
+
vividElement.attr
|
|
523
521
|
], NumberField.prototype, "autoComplete", 2);
|
|
524
522
|
NumberField = __decorateClass([
|
|
525
523
|
formElements.errorText,
|
|
@@ -559,7 +557,7 @@ const getStateClasses = ({
|
|
|
559
557
|
[`size-${scale}`, Boolean(scale)]
|
|
560
558
|
);
|
|
561
559
|
function renderLabel() {
|
|
562
|
-
return
|
|
560
|
+
return vividElement.html` <label for="control" class="label">
|
|
563
561
|
${(x) => x.label}
|
|
564
562
|
</label>`;
|
|
565
563
|
}
|
|
@@ -572,7 +570,7 @@ function getTabIndex(numberField) {
|
|
|
572
570
|
function numberControlButtons(context) {
|
|
573
571
|
const buttonTag = context.tagFor(definition.Button);
|
|
574
572
|
const dividerTag = context.tagFor(definition$1.Divider);
|
|
575
|
-
return
|
|
573
|
+
return vividElement.html`
|
|
576
574
|
<div class="control-buttons"
|
|
577
575
|
?inert="${(x) => x.disabled || x.readOnly}">
|
|
578
576
|
<${buttonTag} id="subtract" icon="minus-line"
|
|
@@ -596,7 +594,7 @@ function numberControlButtons(context) {
|
|
|
596
594
|
`;
|
|
597
595
|
}
|
|
598
596
|
const NumberFieldTemplate = (context) => {
|
|
599
|
-
return
|
|
597
|
+
return vividElement.html`
|
|
600
598
|
<div class="base ${getStateClasses}">
|
|
601
599
|
${when.when((x) => x.label, renderLabel())}
|
|
602
600
|
<div class="fieldset">
|
|
@@ -645,7 +643,7 @@ const NumberFieldTemplate = (context) => {
|
|
|
645
643
|
`;
|
|
646
644
|
};
|
|
647
645
|
|
|
648
|
-
const numberFieldDefinition =
|
|
646
|
+
const numberFieldDefinition = vividElement.defineVividComponent(
|
|
649
647
|
"number-field",
|
|
650
648
|
NumberField,
|
|
651
649
|
NumberFieldTemplate,
|
|
@@ -657,7 +655,7 @@ const numberFieldDefinition = defineVividComponent.defineVividComponent(
|
|
|
657
655
|
}
|
|
658
656
|
}
|
|
659
657
|
);
|
|
660
|
-
const registerNumberField =
|
|
658
|
+
const registerNumberField = vividElement.createRegisterFunction(
|
|
661
659
|
numberFieldDefinition
|
|
662
660
|
);
|
|
663
661
|
|
package/shared/definition34.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { D as Divider, d as dividerDefinition } from './definition22.js';
|
|
3
|
-
import { a as attr, n as nullableNumberConverter, o as observable, D as DOM, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
+
import { a as attr, n as nullableNumberConverter, o as observable, D as DOM, V as VividElement, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { i as iconDefinition } from './definition27.js';
|
|
5
5
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
6
6
|
import { F as FormAssociated$1 } from './form-associated.js';
|
|
7
|
-
import {
|
|
8
|
-
import { F as FoundationElement, _ as __decorate } from './foundation-element.js';
|
|
7
|
+
import { F as FoundationElement, _ as __decorate, S as StartEnd } from './key-codes2.js';
|
|
9
8
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
10
9
|
import { F as FormAssociated } from './form-associated2.js';
|
|
11
10
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global2.js';
|
|
12
|
-
import { S as StartEnd } from './key-codes2.js';
|
|
13
11
|
import { f as keyArrowDown, e as keyArrowUp } from './key-codes.js';
|
|
14
12
|
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './form-elements.js';
|
|
15
13
|
import { A as AffixIcon } from './affix.js';
|