@vonage/vivid 3.0.0-next.43 → 3.0.0-next.46
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/README.md +113 -34
- package/checkbox/index.js +1 -4
- package/index.js +5 -3
- package/lib/components.d.ts +4 -2
- package/lib/menu/index.d.ts +11 -0
- package/lib/menu/menu.d.ts +7 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/nav/index.d.ts +2 -0
- package/lib/{sidenav/sidenav.d.ts → nav/nav.d.ts} +1 -1
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +4 -0
- package/lib/{sidenav-disclosure/sidenav-disclosure.d.ts → nav-disclosure/nav-disclosure.d.ts} +2 -2
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/{sidenav → nav-item}/index.d.ts +3 -1
- package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/{sidenav/sidenav.template.d.ts → nav-item/nav-item.template.d.ts} +2 -2
- package/menu/index.js +661 -0
- package/nav/index.js +17 -0
- package/{sidenav-disclosure → nav-disclosure}/index.js +15 -15
- package/{sidenav-item → nav-item}/index.js +8 -8
- package/package.json +16 -5
- package/popup/index.js +13 -2107
- package/progress-ring/index.js +1 -1
- package/shared/form-associated.js +10 -1
- package/shared/icon.js +1 -1
- package/shared/index3.js +2109 -0
- package/tooltip/index.js +1 -1
- package/lib/sidenav-disclosure/index.d.ts +0 -4
- package/lib/sidenav-disclosure/sidenav-disclosure.template.d.ts +0 -4
- package/lib/sidenav-item/index.d.ts +0 -4
- package/lib/sidenav-item/sidenav-item.template.d.ts +0 -4
- package/sidenav/index.js +0 -17
|
@@ -20,13 +20,13 @@ import '../shared/object-keys.js';
|
|
|
20
20
|
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.control {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n cursor: pointer;\n gap: 8px;\n -webkit-hyphens: auto;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: 40px;\n padding-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transaprent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transaprent;\n}\n.control:where(.selected, [aria-current]):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transaprent;\n}\n.control {\n --_connotation-color-primary: var(--vvd-color-on-canvas);\n --_connotation-color-faint: var(--vvd-color-neutral-10);\n --_connotation-color-soft: var(--vvd-color-neutral-20);\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n@supports ((-webkit-user-select: none) or (user-select: none)) {\n .control {\n -webkit-user-select: none;\n user-select: none;\n }\n}\n.control .toggleIcon {\n margin-inline-start: auto;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}\n\n.content {\n border-inline-start: 1px solid var(--vvd-color-neutral-30);\n margin-inline-start: 20px;\n padding-inline-start: 12px;\n}\n\ndetails > summary {\n list-style: none;\n}\n\ndetails > summary::-webkit-details-marker {\n display: none;\n}";
|
|
21
21
|
styleInject(css_248z);
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
class
|
|
23
|
+
var _NavDisclosure_onToggle;
|
|
24
|
+
class NavDisclosure extends FoundationElement {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
this.open = false;
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
_NavDisclosure_onToggle.set(this, () => {
|
|
30
30
|
this.open = this.details.open;
|
|
31
31
|
this.$emit('toggle');
|
|
32
32
|
});
|
|
@@ -34,31 +34,31 @@ class SidenavDisclosure extends FoundationElement {
|
|
|
34
34
|
|
|
35
35
|
connectedCallback() {
|
|
36
36
|
super.connectedCallback();
|
|
37
|
-
this.details.addEventListener('toggle', __classPrivateFieldGet(this,
|
|
37
|
+
this.details.addEventListener('toggle', __classPrivateFieldGet(this, _NavDisclosure_onToggle, "f"));
|
|
38
38
|
this.details.open = this.open;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
disconnectedCallback() {
|
|
42
42
|
super.disconnectedCallback();
|
|
43
|
-
this.details.removeEventListener('toggle', __classPrivateFieldGet(this,
|
|
43
|
+
this.details.removeEventListener('toggle', __classPrivateFieldGet(this, _NavDisclosure_onToggle, "f"));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
_NavDisclosure_onToggle = new WeakMap();
|
|
48
48
|
|
|
49
|
-
__decorate([attr, __metadata("design:type", String)],
|
|
49
|
+
__decorate([attr, __metadata("design:type", String)], NavDisclosure.prototype, "label", void 0);
|
|
50
50
|
|
|
51
51
|
__decorate([attr({
|
|
52
52
|
mode: 'boolean'
|
|
53
|
-
}), __metadata("design:type", Object)],
|
|
53
|
+
}), __metadata("design:type", Object)], NavDisclosure.prototype, "open", void 0);
|
|
54
54
|
|
|
55
|
-
applyMixins(
|
|
55
|
+
applyMixins(NavDisclosure, AffixIcon);
|
|
56
56
|
|
|
57
57
|
let _ = t => t,
|
|
58
58
|
_t,
|
|
59
59
|
_t2,
|
|
60
60
|
_t3;
|
|
61
|
-
const
|
|
61
|
+
const NavDisclosureTemplate = context => {
|
|
62
62
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
63
63
|
const focusTemplate = focusTemplateFactory(context);
|
|
64
64
|
return html(_t || (_t = _`<details class="base" ${0} ?open=${0}>
|
|
@@ -80,11 +80,11 @@ const SidenavDisclosureTemplate = context => {
|
|
|
80
80
|
`), ref('details'), x => x.open, x => x.open, x => affixIconTemplate(x.icon), x => x.label, when(x => x.open, html(_t2 || (_t2 = _`<vwc-icon class="toggleIcon" type='chevron-up-solid'></vwc-icon>`))), when(x => !x.open, html(_t3 || (_t3 = _`<vwc-icon class="toggleIcon" type='chevron-down-solid'></vwc-icon>`))), () => focusTemplate);
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const
|
|
84
|
-
baseName: '
|
|
85
|
-
template:
|
|
83
|
+
const vividNavDisclosure = NavDisclosure.compose({
|
|
84
|
+
baseName: 'nav-disclosure',
|
|
85
|
+
template: NavDisclosureTemplate,
|
|
86
86
|
styles: css_248z
|
|
87
87
|
});
|
|
88
|
-
designSystem.register(
|
|
88
|
+
designSystem.register(vividNavDisclosure());
|
|
89
89
|
|
|
90
|
-
export {
|
|
90
|
+
export { vividNavDisclosure };
|
|
@@ -24,20 +24,20 @@ import '../shared/focus2.js';
|
|
|
24
24
|
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.control {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n gap: 8px;\n -webkit-hyphens: auto;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: 40px;\n padding-block: 10px;\n padding-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transaprent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transaprent;\n}\n.control:where(.selected, [aria-current]):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transaprent;\n}\n.control {\n --_connotation-color-primary: var(--vvd-color-on-canvas);\n --_connotation-color-faint: var(--vvd-color-neutral-10);\n --_connotation-color-soft: var(--vvd-color-neutral-20);\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control.icon-only {\n display: flex;\n block-size: 40px;\n inline-size: 40px;\n place-content: center;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}";
|
|
25
25
|
styleInject(css_248z);
|
|
26
26
|
|
|
27
|
-
class
|
|
28
|
-
applyMixins(
|
|
27
|
+
class NavItem extends TextAnchor {}
|
|
28
|
+
applyMixins(NavItem, AffixIcon);
|
|
29
29
|
|
|
30
30
|
let _ = t => t,
|
|
31
31
|
_t;
|
|
32
|
-
const
|
|
32
|
+
const NavItemTemplate = (context, definition) => html(_t || (_t = _`
|
|
33
33
|
${0}
|
|
34
34
|
`), textAnchorTemplate(context));
|
|
35
35
|
|
|
36
|
-
const
|
|
37
|
-
baseName: '
|
|
38
|
-
template:
|
|
36
|
+
const vividNavItem = NavItem.compose({
|
|
37
|
+
baseName: 'nav-item',
|
|
38
|
+
template: NavItemTemplate,
|
|
39
39
|
styles: css_248z
|
|
40
40
|
});
|
|
41
|
-
designSystem.register(
|
|
41
|
+
designSystem.register(vividNavItem());
|
|
42
42
|
|
|
43
|
-
export {
|
|
43
|
+
export { vividNavItem };
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/vivid",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.46",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./index.esm.js",
|
|
6
6
|
"main": "./index.js",
|
|
7
|
+
"homepage": "https://vivid.deno.dev",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/vonage/vivid-3",
|
|
11
|
+
"directory": "libs/components"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Vonage/vivid-3/issues"
|
|
15
|
+
},
|
|
16
|
+
"license": "Apache-2.0",
|
|
7
17
|
"exports": {
|
|
8
18
|
"./accordion": "./accordion",
|
|
9
19
|
"./accordion-item": "./accordion-item",
|
|
@@ -25,15 +35,16 @@
|
|
|
25
35
|
"./progress": "./progress",
|
|
26
36
|
"./progress-ring": "./progress-ring",
|
|
27
37
|
"./side-drawer": "./side-drawer",
|
|
28
|
-
"./
|
|
29
|
-
"./
|
|
30
|
-
"./
|
|
38
|
+
"./nav": "./nav",
|
|
39
|
+
"./nav-item": "./nav-item",
|
|
40
|
+
"./nav-disclosure": "./nav-disclosure",
|
|
31
41
|
"./text": "./text",
|
|
32
42
|
"./text-field": "./text-field",
|
|
33
43
|
"./tooltip": "./tooltip",
|
|
34
44
|
"./checkbox": "./checkbox",
|
|
35
45
|
"./dialog": "./dialog",
|
|
36
|
-
"./divider": "./divider"
|
|
46
|
+
"./divider": "./divider",
|
|
47
|
+
"./menu": "./menu"
|
|
37
48
|
},
|
|
38
49
|
"typings": "./index.d.ts",
|
|
39
50
|
"dependencies": {
|