@vonage/vivid 3.14.0 → 3.15.0
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/checkbox/index.js +3 -0
- package/custom-elements.json +203 -24
- package/empty-state/index.js +14 -0
- package/fab/index.js +1 -1
- package/header/index.js +1 -1
- package/index.js +31 -29
- package/layout/index.js +1 -1
- package/lib/checkbox/checkbox.d.ts +6 -3
- package/lib/components.d.ts +2 -0
- package/lib/data-grid/data-grid-row.d.ts +1 -0
- package/lib/empty-state/definition.d.ts +3 -0
- package/lib/empty-state/empty-state.d.ts +5 -0
- package/lib/empty-state/empty-state.template.d.ts +4 -0
- package/lib/empty-state/index.d.ts +1 -0
- package/listbox/index.js +1 -1
- package/menu/index.js +2 -2
- package/menu-item/index.js +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.js +1 -1
- package/number-field/index.js +1 -1
- package/package.json +1 -1
- package/pagination/index.js +14 -232
- package/progress/index.js +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.js +1 -1
- package/select/index.js +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition10.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition12.js +1 -1
- package/shared/definition14.js +1 -1
- package/shared/definition15.js +1 -1
- package/shared/definition16.js +1 -1
- package/shared/definition17.js +1 -1
- package/shared/definition18.js +23 -8
- package/shared/definition19.js +1 -1
- package/shared/definition2.js +1 -1
- package/shared/definition21.js +1 -1
- package/shared/definition22.js +73 -31
- package/shared/definition23.js +1 -1
- package/shared/definition24.js +1 -1
- package/shared/definition25.js +39 -76
- package/shared/definition26.js +76 -47
- package/shared/definition27.js +46 -36
- package/shared/definition28.js +39 -49
- package/shared/definition29.js +48 -344
- package/shared/definition30.js +272 -291
- package/shared/definition31.js +366 -14
- package/shared/definition32.js +13 -67
- package/shared/definition33.js +66 -21
- package/shared/definition34.js +21 -39
- package/shared/definition35.js +31 -432
- package/shared/definition36.js +432 -76
- package/shared/definition37.js +223 -34
- package/shared/definition38.js +82 -425
- package/shared/definition39.js +30 -635
- package/shared/definition4.js +1 -1
- package/shared/definition40.js +420 -73
- package/shared/definition41.js +530 -484
- package/shared/definition42.js +76 -133
- package/shared/definition43.js +577 -40
- package/shared/definition44.js +135 -20
- package/shared/definition45.js +42 -423
- package/shared/definition46.js +22 -112
- package/shared/definition47.js +440 -18
- package/shared/definition48.js +92 -247
- package/shared/definition49.js +20 -112
- package/shared/definition5.js +1 -1
- package/shared/definition50.js +259 -590
- package/shared/definition51.js +110 -91
- package/shared/definition52.js +602 -67
- package/shared/definition53.js +89 -294
- package/shared/definition54.js +80 -0
- package/shared/definition55.js +305 -0
- package/shared/definition6.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition9.js +1 -1
- package/shared/form-elements.js +1 -1
- package/shared/icon.js +1 -1
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/text-field.js +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.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/switch/index.js +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +3 -3
- package/tag/index.js +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.js +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.js +1 -1
- package/vivid.api.json +210 -0
package/shared/definition42.js
CHANGED
|
@@ -1,147 +1,90 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
2
|
-
import { i as iconRegistries } from './definition3.js';
|
|
3
|
-
import { f as focusRegistries } from './definition4.js';
|
|
4
|
-
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
5
|
-
import { e as keySpace, d as keyEnter } from './key-codes.js';
|
|
6
|
-
import './affix.js';
|
|
7
|
-
import { f as focusTemplateFactory } from './focus2.js';
|
|
8
|
-
import './form-elements.js';
|
|
1
|
+
import { F as FoundationElement, U as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
9
2
|
import { w as when } from './when.js';
|
|
10
3
|
import { c as classNames } from './class-names.js';
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#switch | ARIA switch }.
|
|
29
|
-
*
|
|
30
|
-
* @slot - The deafult slot for the label
|
|
31
|
-
* @slot checked-message - The message when in a checked state
|
|
32
|
-
* @slot unchecked-message - The message when in an unchecked state
|
|
33
|
-
* @csspart label - The label
|
|
34
|
-
* @csspart switch - The element representing the switch, which wraps the indicator
|
|
35
|
-
* @csspart status-message - The wrapper for the status messages
|
|
36
|
-
* @csspart checked-message - The checked message
|
|
37
|
-
* @csspart unchecked-message - The unchecked message
|
|
38
|
-
* @fires change - Emits a custom change event when the checked state changes
|
|
39
|
-
*
|
|
40
|
-
* @public
|
|
41
|
-
*/
|
|
42
|
-
class Switch$1 extends FormAssociatedSwitch {
|
|
43
|
-
constructor() {
|
|
44
|
-
super();
|
|
45
|
-
/**
|
|
46
|
-
* The element's value to be included in form submission when checked.
|
|
47
|
-
* Default to "on" to reach parity with input[type="checkbox"]
|
|
48
|
-
*
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
51
|
-
this.initialValue = "on";
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
this.keypressHandler = (e) => {
|
|
56
|
-
if (this.readOnly) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
switch (e.key) {
|
|
60
|
-
case keyEnter:
|
|
61
|
-
case keySpace:
|
|
62
|
-
this.checked = !this.checked;
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
this.clickHandler = (e) => {
|
|
70
|
-
if (!this.disabled && !this.readOnly) {
|
|
71
|
-
this.checked = !this.checked;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
this.proxy.setAttribute("type", "checkbox");
|
|
75
|
-
}
|
|
76
|
-
readOnlyChanged() {
|
|
77
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
78
|
-
this.proxy.readOnly = this.readOnly;
|
|
5
|
+
var _SideDrawer_instances, _SideDrawer_close, _SideDrawer_open;
|
|
6
|
+
class SideDrawer extends FoundationElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
_SideDrawer_instances.add(this);
|
|
10
|
+
this.alternate = false;
|
|
11
|
+
this.modal = false;
|
|
12
|
+
this.open = false;
|
|
13
|
+
this.trailing = false;
|
|
14
|
+
}
|
|
15
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
16
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
17
|
+
switch (name) {
|
|
18
|
+
case 'open':
|
|
19
|
+
{
|
|
20
|
+
this.open ? __classPrivateFieldGet(this, _SideDrawer_instances, "m", _SideDrawer_open).call(this) : __classPrivateFieldGet(this, _SideDrawer_instances, "m", _SideDrawer_close).call(this);
|
|
79
21
|
}
|
|
80
|
-
this.readOnly
|
|
81
|
-
? this.classList.add("readonly")
|
|
82
|
-
: this.classList.remove("readonly");
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
checkedChanged(prev, next) {
|
|
88
|
-
super.checkedChanged(prev, next);
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated - this behavior already exists in the template and should not exist in the class.
|
|
91
|
-
*/
|
|
92
|
-
this.checked ? this.classList.add("checked") : this.classList.remove("checked");
|
|
93
22
|
}
|
|
23
|
+
}
|
|
94
24
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
25
|
+
_SideDrawer_instances = new WeakSet(), _SideDrawer_close = function _SideDrawer_close() {
|
|
26
|
+
this.$emit('close', undefined, {
|
|
27
|
+
bubbles: false
|
|
28
|
+
});
|
|
29
|
+
}, _SideDrawer_open = function _SideDrawer_open() {
|
|
30
|
+
this.$emit('open', undefined, {
|
|
31
|
+
bubbles: false
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
__decorate([attr({
|
|
35
|
+
mode: 'boolean'
|
|
36
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "alternate", void 0);
|
|
37
|
+
__decorate([attr({
|
|
38
|
+
mode: 'boolean'
|
|
39
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "modal", void 0);
|
|
40
|
+
__decorate([attr({
|
|
41
|
+
mode: 'boolean'
|
|
42
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "open", void 0);
|
|
43
|
+
__decorate([attr({
|
|
44
|
+
mode: 'boolean'
|
|
45
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "trailing", void 0);
|
|
103
46
|
|
|
104
|
-
|
|
105
|
-
__decorate([attr, __metadata("design:type", String)], Switch.prototype, "label", void 0);
|
|
106
|
-
__decorate([attr, __metadata("design:type", String)], Switch.prototype, "connotation", void 0);
|
|
47
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 06 Jun 2023 10:38:32 GMT\n */\n.control {\n position: fixed;\n z-index: 1;\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n inline-size: 280px;\n inset-block: 0;\n overflow-y: auto;\n}\n.control[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n color-scheme: var(--vvd-color-scheme);\n}\n.control.trailing {\n inset-inline-end: 0;\n}\n.control:not(.open).trailing {\n transform: translateX(100%);\n}\n.control:not(.open):not(.trailing) {\n transform: translateX(-100%);\n}\n.control.open:not(.modal).trailing + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-app-content-offset, 280px);\n}\n.control.open:not(.modal):not(.trailing) + .side-drawer-app-content {\n margin-inline-start: var(--side-drawer-app-content-offset, 280px);\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.scrim {\n background-color: var(--vvd-color-canvas-text, currentColor);\n opacity: 0.5;\n position: fixed;\n inset: 0;\n}\n.scrim:not(.open) {\n display: none;\n}";
|
|
107
48
|
|
|
108
|
-
let
|
|
49
|
+
let _ = t => t,
|
|
109
50
|
_t,
|
|
110
51
|
_t2;
|
|
111
|
-
const getClasses =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
>
|
|
125
|
-
<div class="switch">
|
|
126
|
-
<span class="checked-indicator"></span>
|
|
127
|
-
${0}
|
|
128
|
-
</div>
|
|
129
|
-
${0}
|
|
130
|
-
</div>
|
|
131
|
-
`), getClasses, x => x.checked, x => x.disabled, x => x.readOnly, x => x.disabled ? null : 0, (x, c) => x.keypressHandler(c.event), (x, c) => x.clickHandler(c.event), () => focusTemplate, when(x => x.label, html(_t2 || (_t2 = _2`<div class="label">
|
|
132
|
-
${0}
|
|
133
|
-
</div>`), x => x.label)));
|
|
134
|
-
};
|
|
52
|
+
const getClasses = ({
|
|
53
|
+
modal,
|
|
54
|
+
open,
|
|
55
|
+
trailing
|
|
56
|
+
}) => classNames('control', ['modal', modal], ['open', open], ['trailing', trailing]);
|
|
57
|
+
const getScrimClasses = ({
|
|
58
|
+
open
|
|
59
|
+
}) => classNames('scrim', ['open', open]);
|
|
60
|
+
const sideDrawerTemplate = () => html(_t || (_t = _`
|
|
61
|
+
<aside class="${0}" part="base ${0}"
|
|
62
|
+
@keydown="${0}">
|
|
63
|
+
<slot></slot>
|
|
64
|
+
</aside>
|
|
135
65
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
66
|
+
<div class="side-drawer-app-content" ?inert="${0}">
|
|
67
|
+
<slot name="app-content"></slot>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
${0}
|
|
71
|
+
`), getClasses, x => x.alternate ? 'vvd-theme-alternate' : '', (x, c) => handleKeydown(x, c.event), x => x.open && x.modal, when(x => x.modal, html(_t2 || (_t2 = _`<div class="${0}" @click="${0}"></div>`), getScrimClasses, x => x.open = false)));
|
|
72
|
+
const handleKeydown = (x, {
|
|
73
|
+
key
|
|
74
|
+
}) => {
|
|
75
|
+
if (key === 'Escape') {
|
|
76
|
+
x.open = false;
|
|
77
|
+
} else {
|
|
78
|
+
return true;
|
|
142
79
|
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const sideDrawerDefinition = SideDrawer.compose({
|
|
83
|
+
baseName: 'side-drawer',
|
|
84
|
+
template: sideDrawerTemplate,
|
|
85
|
+
styles: css_248z
|
|
143
86
|
});
|
|
144
|
-
const
|
|
145
|
-
const
|
|
87
|
+
const sideDrawerRegistries = [sideDrawerDefinition()];
|
|
88
|
+
const registerSideDrawer = registerFactory(sideDrawerRegistries);
|
|
146
89
|
|
|
147
|
-
export {
|
|
90
|
+
export { sideDrawerRegistries as a, registerSideDrawer as r, sideDrawerDefinition as s };
|