@vonage/vivid 4.14.1 → 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 +22 -174
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- package/package.json +1 -1
- package/shared/affix.js +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition16.cjs +1 -2
- package/shared/definition16.js +2 -3
- package/shared/definition17.cjs +9 -7
- package/shared/definition17.js +9 -7
- package/shared/definition22.cjs +2 -1
- package/shared/definition22.js +2 -1
- package/shared/definition24.js +1 -1
- package/shared/definition27.cjs +1 -1
- package/shared/definition27.js +1 -1
- package/shared/definition29.js +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition31.js +1 -1
- package/shared/definition33.js +1 -1
- package/shared/definition34.cjs +88 -19
- package/shared/definition34.js +72 -3
- package/shared/definition35.cjs +2 -201
- package/shared/definition35.js +4 -201
- package/shared/definition4.js +1 -1
- package/shared/definition42.cjs +3 -3
- package/shared/definition42.js +3 -3
- package/shared/definition43.cjs +9 -9
- package/shared/definition43.js +5 -5
- package/shared/definition47.js +1 -1
- package/shared/definition50.js +1 -1
- package/shared/definition51.cjs +39 -17
- package/shared/definition51.js +24 -2
- package/shared/definition53.js +1 -1
- package/shared/definition59.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/foundation-element.cjs +1417 -0
- package/shared/foundation-element.js +1414 -0
- package/shared/key-codes2.cjs +0 -1469
- package/shared/key-codes2.js +1 -1464
- package/shared/listbox.cjs +3 -3
- package/shared/listbox.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- package/shared/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.js +1 -1
- package/shared/text-field2.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +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/listbox2.cjs +0 -1267
- package/shared/listbox2.js +0 -1264
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/listbox/index.cjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const definition = require('../shared/definition35.cjs');
|
|
4
|
-
const vividElement = require('../shared/vivid-element.cjs');
|
|
5
|
-
const listbox = require('../shared/listbox2.cjs');
|
|
6
|
-
const slotted = require('../shared/slotted.cjs');
|
|
7
|
-
const classNames = require('../shared/class-names.cjs');
|
|
8
|
-
|
|
9
|
-
const getClasses = ({ appearance, shape, disabled, orientation }) => classNames.classNames(
|
|
10
|
-
"base",
|
|
11
|
-
["disabled", disabled],
|
|
12
|
-
[`appearance-${appearance}`, Boolean(appearance)],
|
|
13
|
-
[`shape-${shape}`, Boolean(shape) && orientation === "horizontal"],
|
|
14
|
-
[`orientation-${orientation}`, Boolean(orientation)]
|
|
15
|
-
);
|
|
16
|
-
const ListboxTemplate = vividElement.html`
|
|
17
|
-
<template
|
|
18
|
-
aria-activedescendant="${(x) => x.ariaActiveDescendant}"
|
|
19
|
-
aria-multiselectable="${(x) => x.ariaMultiSelectable}"
|
|
20
|
-
aria-orientation="${(x) => x.ariaOrientation}"
|
|
21
|
-
aria-label="listbox"
|
|
22
|
-
role="listbox"
|
|
23
|
-
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
24
|
-
@focusin="${(x, c) => x.focusinHandler(c.event)}"
|
|
25
|
-
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
26
|
-
@mousedown="${(x, c) => x.mousedownHandler(c.event)}"
|
|
27
|
-
tabindex="${(x) => !x.disabled ? "0" : null}"
|
|
28
|
-
>
|
|
29
|
-
<div class="${getClasses}">
|
|
30
|
-
<slot
|
|
31
|
-
${slotted.slotted({
|
|
32
|
-
filter: listbox.ListboxElement.slottedOptionFilter,
|
|
33
|
-
flatten: true,
|
|
34
|
-
property: "slottedOptions"
|
|
35
|
-
})}
|
|
36
|
-
></slot>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const styles = ":host{display:inline-block;inline-size:fit-content}:host(:focus-within){outline:none}:host([disabled]){cursor:not-allowed}.base{--_connotation-color-intermediate: var(--vvd-listbox-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-primary: var(--vvd-listbox-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-soft: var(--vvd-listbox-accent-soft, var(--vvd-color-neutral-100))}.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:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base{display:inline-flex;box-sizing:border-box;padding:4px;border-radius:var(--_listbox-border-radius);background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);contain:paint;gap:4px;inline-size:100%}.base:not(.orientation-horizontal){flex-direction:column}.base:not(.shape-pill){--_listbox-border-radius: 8px}.base.shape-pill{--_listbox-border-radius: 24px}:host(:focus-within) .base{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}::slotted([role=option]){border-radius:var(--_listbox-border-radius);contain:content}.base.disabled ::slotted([role=option]){--_option-appearance-color-text: var(--_appearance-color-outline);pointer-events:none}";
|
|
42
|
-
|
|
43
|
-
const listboxDefinition = vividElement.defineVividComponent(
|
|
44
|
-
"listbox",
|
|
45
|
-
listbox.Listbox,
|
|
46
|
-
ListboxTemplate,
|
|
47
|
-
[definition.listboxOptionDefinition],
|
|
48
|
-
{
|
|
49
|
-
styles
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
const registerListbox = vividElement.createRegisterFunction(listboxDefinition);
|
|
53
|
-
|
|
54
|
-
registerListbox();
|
package/listbox/index.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { l as listboxOptionDefinition } from '../shared/definition35.js';
|
|
2
|
-
import { h as html, f as createRegisterFunction, d as defineVividComponent } from '../shared/vivid-element.js';
|
|
3
|
-
import { L as ListboxElement, a as Listbox } from '../shared/listbox2.js';
|
|
4
|
-
import { s as slotted } from '../shared/slotted.js';
|
|
5
|
-
import { c as classNames } from '../shared/class-names.js';
|
|
6
|
-
|
|
7
|
-
const getClasses = ({ appearance, shape, disabled, orientation }) => classNames(
|
|
8
|
-
"base",
|
|
9
|
-
["disabled", disabled],
|
|
10
|
-
[`appearance-${appearance}`, Boolean(appearance)],
|
|
11
|
-
[`shape-${shape}`, Boolean(shape) && orientation === "horizontal"],
|
|
12
|
-
[`orientation-${orientation}`, Boolean(orientation)]
|
|
13
|
-
);
|
|
14
|
-
const ListboxTemplate = html`
|
|
15
|
-
<template
|
|
16
|
-
aria-activedescendant="${(x) => x.ariaActiveDescendant}"
|
|
17
|
-
aria-multiselectable="${(x) => x.ariaMultiSelectable}"
|
|
18
|
-
aria-orientation="${(x) => x.ariaOrientation}"
|
|
19
|
-
aria-label="listbox"
|
|
20
|
-
role="listbox"
|
|
21
|
-
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
22
|
-
@focusin="${(x, c) => x.focusinHandler(c.event)}"
|
|
23
|
-
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
24
|
-
@mousedown="${(x, c) => x.mousedownHandler(c.event)}"
|
|
25
|
-
tabindex="${(x) => !x.disabled ? "0" : null}"
|
|
26
|
-
>
|
|
27
|
-
<div class="${getClasses}">
|
|
28
|
-
<slot
|
|
29
|
-
${slotted({
|
|
30
|
-
filter: ListboxElement.slottedOptionFilter,
|
|
31
|
-
flatten: true,
|
|
32
|
-
property: "slottedOptions"
|
|
33
|
-
})}
|
|
34
|
-
></slot>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
const styles = ":host{display:inline-block;inline-size:fit-content}:host(:focus-within){outline:none}:host([disabled]){cursor:not-allowed}.base{--_connotation-color-intermediate: var(--vvd-listbox-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-primary: var(--vvd-listbox-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-soft: var(--vvd-listbox-accent-soft, var(--vvd-color-neutral-100))}.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:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base{display:inline-flex;box-sizing:border-box;padding:4px;border-radius:var(--_listbox-border-radius);background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);contain:paint;gap:4px;inline-size:100%}.base:not(.orientation-horizontal){flex-direction:column}.base:not(.shape-pill){--_listbox-border-radius: 8px}.base.shape-pill{--_listbox-border-radius: 24px}:host(:focus-within) .base{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}::slotted([role=option]){border-radius:var(--_listbox-border-radius);contain:content}.base.disabled ::slotted([role=option]){--_option-appearance-color-text: var(--_appearance-color-outline);pointer-events:none}";
|
|
40
|
-
|
|
41
|
-
const listboxDefinition = defineVividComponent(
|
|
42
|
-
"listbox",
|
|
43
|
-
Listbox,
|
|
44
|
-
ListboxTemplate,
|
|
45
|
-
[listboxOptionDefinition],
|
|
46
|
-
{
|
|
47
|
-
styles
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
const registerListbox = createRegisterFunction(listboxDefinition);
|
|
51
|
-
|
|
52
|
-
registerListbox();
|
package/shared/aria-global2.cjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const keyCodes = require('./key-codes2.cjs');
|
|
4
|
-
const vividElement = require('./vivid-element.cjs');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
8
|
-
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
9
|
-
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
10
|
-
*
|
|
11
|
-
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
class ARIAGlobalStatesAndProperties {
|
|
16
|
-
}
|
|
17
|
-
keyCodes.__decorate([
|
|
18
|
-
vividElement.attr({ attribute: "aria-atomic" })
|
|
19
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
20
|
-
keyCodes.__decorate([
|
|
21
|
-
vividElement.attr({ attribute: "aria-busy" })
|
|
22
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
23
|
-
keyCodes.__decorate([
|
|
24
|
-
vividElement.attr({ attribute: "aria-controls" })
|
|
25
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
26
|
-
keyCodes.__decorate([
|
|
27
|
-
vividElement.attr({ attribute: "aria-current" })
|
|
28
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
29
|
-
keyCodes.__decorate([
|
|
30
|
-
vividElement.attr({ attribute: "aria-describedby" })
|
|
31
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
32
|
-
keyCodes.__decorate([
|
|
33
|
-
vividElement.attr({ attribute: "aria-details" })
|
|
34
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
35
|
-
keyCodes.__decorate([
|
|
36
|
-
vividElement.attr({ attribute: "aria-disabled" })
|
|
37
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
38
|
-
keyCodes.__decorate([
|
|
39
|
-
vividElement.attr({ attribute: "aria-errormessage" })
|
|
40
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
41
|
-
keyCodes.__decorate([
|
|
42
|
-
vividElement.attr({ attribute: "aria-flowto" })
|
|
43
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
44
|
-
keyCodes.__decorate([
|
|
45
|
-
vividElement.attr({ attribute: "aria-haspopup" })
|
|
46
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
47
|
-
keyCodes.__decorate([
|
|
48
|
-
vividElement.attr({ attribute: "aria-hidden" })
|
|
49
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
50
|
-
keyCodes.__decorate([
|
|
51
|
-
vividElement.attr({ attribute: "aria-invalid" })
|
|
52
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
53
|
-
keyCodes.__decorate([
|
|
54
|
-
vividElement.attr({ attribute: "aria-keyshortcuts" })
|
|
55
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
56
|
-
keyCodes.__decorate([
|
|
57
|
-
vividElement.attr({ attribute: "aria-label" })
|
|
58
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
59
|
-
keyCodes.__decorate([
|
|
60
|
-
vividElement.attr({ attribute: "aria-labelledby" })
|
|
61
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
62
|
-
keyCodes.__decorate([
|
|
63
|
-
vividElement.attr({ attribute: "aria-live" })
|
|
64
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
65
|
-
keyCodes.__decorate([
|
|
66
|
-
vividElement.attr({ attribute: "aria-owns" })
|
|
67
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
68
|
-
keyCodes.__decorate([
|
|
69
|
-
vividElement.attr({ attribute: "aria-relevant" })
|
|
70
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
71
|
-
keyCodes.__decorate([
|
|
72
|
-
vividElement.attr({ attribute: "aria-roledescription" })
|
|
73
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
74
|
-
|
|
75
|
-
exports.ARIAGlobalStatesAndProperties = ARIAGlobalStatesAndProperties;
|
package/shared/aria-global2.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate } from './key-codes2.js';
|
|
2
|
-
import { a as attr } from './vivid-element.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
6
|
-
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
7
|
-
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
8
|
-
*
|
|
9
|
-
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
class ARIAGlobalStatesAndProperties {
|
|
14
|
-
}
|
|
15
|
-
__decorate([
|
|
16
|
-
attr({ attribute: "aria-atomic" })
|
|
17
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
18
|
-
__decorate([
|
|
19
|
-
attr({ attribute: "aria-busy" })
|
|
20
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
attr({ attribute: "aria-controls" })
|
|
23
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
attr({ attribute: "aria-current" })
|
|
26
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
attr({ attribute: "aria-describedby" })
|
|
29
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
attr({ attribute: "aria-details" })
|
|
32
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
attr({ attribute: "aria-disabled" })
|
|
35
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
attr({ attribute: "aria-errormessage" })
|
|
38
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
attr({ attribute: "aria-flowto" })
|
|
41
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
attr({ attribute: "aria-haspopup" })
|
|
44
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
attr({ attribute: "aria-hidden" })
|
|
47
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
attr({ attribute: "aria-invalid" })
|
|
50
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
attr({ attribute: "aria-keyshortcuts" })
|
|
53
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
attr({ attribute: "aria-label" })
|
|
56
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
attr({ attribute: "aria-labelledby" })
|
|
59
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
attr({ attribute: "aria-live" })
|
|
62
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
attr({ attribute: "aria-owns" })
|
|
65
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
attr({ attribute: "aria-relevant" })
|
|
68
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
attr({ attribute: "aria-roledescription" })
|
|
71
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
72
|
-
|
|
73
|
-
export { ARIAGlobalStatesAndProperties as A };
|