@vonage/vivid 3.0.0-next.29 → 3.0.0-next.31
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/accordion-item/index.js +2 -2
- package/action-group/index.js +1 -1
- package/banner/index.js +0 -1
- package/breadcrumb/index.js +0 -1
- package/breadcrumb-item/index.js +1 -5
- package/button/index.js +1 -2
- package/divider/index.js +88 -0
- package/fab/index.js +1 -2
- package/header/index.js +1 -1
- package/index.js +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +2 -0
- package/lib/side-drawer/side-drawer.d.ts +0 -7
- package/lib/sidenav/index.d.ts +2 -0
- package/lib/sidenav/sidenav.d.ts +3 -0
- package/lib/sidenav/sidenav.template.d.ts +4 -0
- package/package.json +5 -6
- package/popup/index.js +15 -8
- package/shared/aria-global.js +40 -3
- package/shared/export.js +1 -1
- package/shared/form-associated.js +2 -1
- package/shared/text-anchor.template.js +1 -1
- package/side-drawer/index.js +7 -8576
- package/sidenav/index.js +17 -0
- package/sidenav-item/index.js +2 -6
- package/text-anchor/index.js +0 -1
- package/text-field/index.js +1 -2
- package/tooltip/index.js +2 -3
- package/shared/ref.js +0 -41
package/accordion-item/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import '../shared/_has.js';
|
|
|
16
16
|
import '../shared/focus.js';
|
|
17
17
|
import '../shared/object-keys.js';
|
|
18
18
|
|
|
19
|
-
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.body {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n padding: 8px 32px 24px 16px;\n}\n.icon:not(.icon-trailing) .body {\n padding-left: 48px;\n}\n\n.base {\n display: flex;\n flex-direction: column;\n}\n.base:not(.open) .body {\n display: none;\n}\n\n.header {\n padding: 0;\n margin: 0;\n}\n\n.button {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n padding: 16px;\n border: 0 none;\n margin: 0;\n background:
|
|
19
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.body {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n padding: 8px 32px 24px 16px;\n}\n.icon:not(.icon-trailing) .body {\n padding-left: 48px;\n}\n\n.base {\n display: flex;\n flex-direction: column;\n}\n.base:not(.open) .body {\n display: none;\n}\n\n.header {\n padding: 0;\n margin: 0;\n}\n\n.button {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n padding: 16px;\n border: 0 none;\n margin: 0;\n background-color: var(--_appearance-color-fill);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n cursor: pointer;\n}\n.button {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.button: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.button: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.button {\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 .button:focus {\n outline: none;\n }\n}\n.button .heading-text {\n flex-grow: 1;\n margin-inline-end: auto;\n text-align: left;\n}\n.button .meta {\n font: 600 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n overflow: hidden;\n max-width: 20%;\n flex-shrink: 0;\n color: var(--vvd-color-neutral-70);\n margin-inline-start: 16px;\n text-align: end;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.button .indicator {\n display: flex;\n}\n.button .indicator vwc-icon,\n.button .indicator slot[name=indicator i]::slotted(vwc-icon) {\n margin-inline-start: 16px;\n}\n.button .icon {\n margin-inline-end: 16px;\n}\n\n/* Icon */\n.icon-trailing .icon {\n order: 1;\n}\n\n.button:not(:focus-visible) > .focus-indicator {\n display: none;\n}";
|
|
20
20
|
styleInject(css_248z);
|
|
21
21
|
|
|
22
22
|
class AccordionItem extends FoundationElement {
|
|
@@ -116,7 +116,7 @@ const renderHeaderButton = context => {
|
|
|
116
116
|
</button>
|
|
117
117
|
`), x => x.open = !x.open, x => x.open, PANEL, () => focusTemplate, x => affixIconTemplate(x.icon), x => x.heading, when(x => x.meta, html(_t4 || (_t4 = _`<span class="meta">${0}</span>`), x => x.meta)), when(x => !x.noIndicator && !x.iconTrailing, html(_t5 || (_t5 = _`
|
|
118
118
|
${0}
|
|
119
|
-
${0}
|
|
119
|
+
${0}
|
|
120
120
|
`), when(x => !x.open, html(_t6 || (_t6 = _`<vwc-icon type='chevron-down-solid'></vwc-icon>`))), when(x => x.open, html(_t7 || (_t7 = _`<vwc-icon type='chevron-up-solid'></vwc-icon>`))))));
|
|
121
121
|
};
|
|
122
122
|
|
package/action-group/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import '../shared/export.js';
|
|
|
6
6
|
import '../shared/object-keys.js';
|
|
7
7
|
import '../shared/iterators.js';
|
|
8
8
|
|
|
9
|
-
var css_248z = ":host {\n display: inline-block;\n}\n\n.base {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n color: var(--_appearance-color-text);\n inline-size: inherit;\n vertical-align: middle;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-on-canvas);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-50);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base::before {\n position: absolute;\n z-index: 1;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n content: \"\";\n inset: 0;\n pointer-events: none;\n}\n.base:not(.tight) {\n padding: 4px;\n column-gap: 4px;\n}\n\n/* Shape */\n.base:not(.shape-pill) {\n border-radius: 6px;\n}\n\n.base.shape-pill {\n border-radius: 24px;\n}\n\n::slotted([role=separator]) {\n width: 1px;\n align-self: stretch;\n background-color: var(--vvd-color-neutral-30);\n margin-block: 4px;\n}";
|
|
9
|
+
var css_248z = ":host {\n display: inline-block;\n}\n\n.base {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n color: var(--_appearance-color-text);\n inline-size: inherit;\n vertical-align: middle;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-on-canvas);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-50);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base::before {\n position: absolute;\n z-index: 1;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n content: \"\";\n inset: 0;\n pointer-events: none;\n}\n.base:not(.tight) {\n padding: 4px;\n column-gap: 4px;\n}\n\n/* Shape */\n.base:not(.shape-pill) {\n border-radius: 6px;\n}\n\n.base.shape-pill {\n border-radius: 24px;\n}\n\n::slotted([role=separator]) {\n width: 1px;\n align-self: stretch;\n background-color: var(--vvd-color-neutral-30);\n margin-block: 4px;\n}\n\n::slotted([vwc-divider]) {\n align-self: stretch;\n margin-block: 4px;\n}";
|
|
10
10
|
styleInject(css_248z);
|
|
11
11
|
|
|
12
12
|
class ActionGroup extends FoundationElement {
|
package/banner/index.js
CHANGED
package/breadcrumb/index.js
CHANGED
package/breadcrumb-item/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import '../shared/focus.js';
|
|
|
15
15
|
import '../shared/anchor.js';
|
|
16
16
|
import '../shared/apply-mixins.js';
|
|
17
17
|
import '../shared/aria-global.js';
|
|
18
|
-
import '../shared/ref.js';
|
|
19
18
|
import '../shared/affix.js';
|
|
20
19
|
import '../shared/web.dom-collections.iterator.js';
|
|
21
20
|
import '../shared/object-keys.js';
|
|
@@ -53,10 +52,7 @@ const BreadcrumbItemTemplate = (context, definition) => html(_t || (_t = _2`
|
|
|
53
52
|
const vividBreadcrumbItem = BreadcrumbItem.compose({
|
|
54
53
|
baseName: 'breadcrumb-item',
|
|
55
54
|
template: BreadcrumbItemTemplate,
|
|
56
|
-
styles: css_248z
|
|
57
|
-
shadowOptions: {
|
|
58
|
-
delegatesFocus: true
|
|
59
|
-
}
|
|
55
|
+
styles: css_248z
|
|
60
56
|
});
|
|
61
57
|
designSystem.register(vividBreadcrumbItem());
|
|
62
58
|
|
package/button/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { B as Button$1 } from '../shared/button.js';
|
|
|
7
7
|
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
8
8
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
9
9
|
import { f as focusTemplateFactory } from '../shared/focus2.js';
|
|
10
|
-
import { r as ref } from '../shared/
|
|
10
|
+
import { r as ref } from '../shared/aria-global.js';
|
|
11
11
|
import { c as classNames } from '../shared/class-names.js';
|
|
12
12
|
import '../shared/icon.js';
|
|
13
13
|
import '../shared/export.js';
|
|
@@ -18,7 +18,6 @@ import '../shared/when.js';
|
|
|
18
18
|
import '../shared/focus.js';
|
|
19
19
|
import '../shared/object-keys.js';
|
|
20
20
|
import '../shared/form-associated.js';
|
|
21
|
-
import '../shared/aria-global.js';
|
|
22
21
|
|
|
23
22
|
class Button extends Button$1 {
|
|
24
23
|
constructor() {
|
package/divider/index.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, h as html, d as designSystem } from '../shared/index.js';
|
|
2
|
+
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
3
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Standard orientation values
|
|
7
|
+
*/
|
|
8
|
+
const Orientation = {
|
|
9
|
+
horizontal: "horizontal",
|
|
10
|
+
vertical: "vertical",
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Divider roles
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
const DividerRole = {
|
|
18
|
+
/**
|
|
19
|
+
* The divider semantically separates content
|
|
20
|
+
*/
|
|
21
|
+
separator: "separator",
|
|
22
|
+
/**
|
|
23
|
+
* The divider has no semantic value and is for visual presentation only.
|
|
24
|
+
*/
|
|
25
|
+
presentation: "presentation",
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A Divider Custom HTML Element.
|
|
30
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
class Divider$1 extends FoundationElement {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
/**
|
|
38
|
+
* The role of the element.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
* @remarks
|
|
42
|
+
* HTML Attribute: role
|
|
43
|
+
*/
|
|
44
|
+
this.role = DividerRole.separator;
|
|
45
|
+
/**
|
|
46
|
+
* The orientation of the divider.
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
* @remarks
|
|
50
|
+
* HTML Attribute: orientation
|
|
51
|
+
*/
|
|
52
|
+
this.orientation = Orientation.horizontal;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
__decorate([
|
|
56
|
+
attr
|
|
57
|
+
], Divider$1.prototype, "role", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
attr
|
|
60
|
+
], Divider$1.prototype, "orientation", void 0);
|
|
61
|
+
|
|
62
|
+
var css_248z = ":host {\n display: block;\n}\n\n.base {\n display: block;\n background-color: var(--vvd-color-neutral-30);\n}\n.base:not(.vertical) {\n block-size: 1px;\n inline-size: 100%;\n}\n.base.vertical {\n block-size: 100%;\n inline-size: 1px;\n}";
|
|
63
|
+
styleInject(css_248z);
|
|
64
|
+
|
|
65
|
+
class Divider extends Divider$1 {}
|
|
66
|
+
|
|
67
|
+
let _ = t => t,
|
|
68
|
+
_t;
|
|
69
|
+
|
|
70
|
+
const getClasses = ({
|
|
71
|
+
orientation
|
|
72
|
+
}) => classNames('base', [`${orientation}`, Boolean(orientation)]);
|
|
73
|
+
|
|
74
|
+
const DividerTemplate = () => html(_t || (_t = _`
|
|
75
|
+
<span
|
|
76
|
+
class="${0}"
|
|
77
|
+
orientation="${0}"
|
|
78
|
+
role="${0}"
|
|
79
|
+
></span>`), getClasses, x => x.orientation, x => x.role);
|
|
80
|
+
|
|
81
|
+
const vividDivider = Divider.compose({
|
|
82
|
+
baseName: 'divider',
|
|
83
|
+
template: DividerTemplate,
|
|
84
|
+
styles: css_248z
|
|
85
|
+
});
|
|
86
|
+
designSystem.register(vividDivider());
|
|
87
|
+
|
|
88
|
+
export { vividDivider };
|
package/fab/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from '../sh
|
|
|
6
6
|
import { B as Button } from '../shared/button.js';
|
|
7
7
|
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
8
8
|
import { f as focusTemplateFactory } from '../shared/focus2.js';
|
|
9
|
-
import { r as ref } from '../shared/
|
|
9
|
+
import { r as ref } from '../shared/aria-global.js';
|
|
10
10
|
import { c as classNames } from '../shared/class-names.js';
|
|
11
11
|
import '../shared/icon.js';
|
|
12
12
|
import '../shared/export.js';
|
|
@@ -18,7 +18,6 @@ import '../shared/focus.js';
|
|
|
18
18
|
import '../shared/web.dom-collections.iterator.js';
|
|
19
19
|
import '../shared/object-keys.js';
|
|
20
20
|
import '../shared/form-associated.js';
|
|
21
|
-
import '../shared/aria-global.js';
|
|
22
21
|
|
|
23
22
|
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.control {\n font: 600 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 border: 0 none;\n background-color: var(--_appearance-color-fill, var(--_elevation-fill));\n block-size: var(--_fab-block-size);\n border-radius: var(--_fab-border-radius);\n color: var(--_appearance-color-text, var(--vvd-color-on-canvas));\n column-gap: var(--fab-icon-gap);\n filter: var(--_elevation-shadow);\n transition: background-color 0.15s linear, filter 0.15s linear;\n vertical-align: middle;\n /* Size */\n}\n.control.connotation-accent {\n --_connotation-color-primary: var(--vvd-color-on-canvas);\n --_connotation-color-on-primary: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-neutral-90);\n --_connotation-color-contrast: var(--vvd-color-neutral-90);\n --_connotation-color-fierce: var(--vvd-color-neutral-80);\n --_connotation-color-firm: var(--vvd-color-on-canvas);\n}\n.control.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta);\n --_connotation-color-on-primary: var(--vvd-color-on-cta);\n --_connotation-color-primary-increment: var(--vvd-color-cta-70);\n --_connotation-color-contrast: var(--vvd-color-cta-90);\n --_connotation-color-fierce: var(--vvd-color-cta-80);\n --_connotation-color-firm: var(--vvd-color-cta-70);\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-on-primary);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transaprent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-on-primary);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transaprent;\n}\n.control:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-50);\n --_appearance-color-fill: var(--vvd-color-neutral-30);\n --_appearance-color-outline: transaprent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-on-primary);\n --_appearance-color-fill: var(--_connotation-color-fierce);\n --_appearance-color-outline: transaprent;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control.density-extended {\n --_fab-border-radius: 30px;\n --_fab-block-size: 56px;\n}\n.control:not(.density-extended) {\n --_fab-border-radius: 24px;\n --_fab-block-size: 40px;\n}\n.control.icon-only {\n border-radius: 50%;\n padding-inline: 0;\n place-content: center;\n}\n@supports (aspect-ratio: 1) {\n .control.icon-only {\n aspect-ratio: 1;\n }\n}\n@supports not (aspect-ratio: 1) {\n .control.icon-only {\n inline-size: var(--_fab-block-size);\n }\n}\n.control:not(.icon-only) {\n --fab-icon-gap: 10px;\n padding-inline: 20px;\n}\n.control:disabled {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n cursor: not-allowed;\n}\n.control:not(:disabled) {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n cursor: pointer;\n}\n.control:not(:disabled):hover {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control:not(:disabled):active {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n\n/* Icon */\n.icon {\n font-size: 20px;\n}\n.icon-trailing .icon {\n order: 1;\n}\n\n:not(:focus-visible) .focus-indicator {\n display: none;\n}";
|
|
24
23
|
styleInject(css_248z);
|
package/header/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import '../shared/export.js';
|
|
|
7
7
|
import '../shared/object-keys.js';
|
|
8
8
|
import '../shared/iterators.js';
|
|
9
9
|
|
|
10
|
-
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.base {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n --_header-block-size: 64px;\n block-size: var(--_header-block-size);\n inline-size: 100%;\n}\n.base .header-content {\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.container {\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n block-size: inherit;\n color: var(--vvd-color-on-canvas);\n column-gap: 12px;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.container[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n}\n\n.app-content {\n --_header-block-size: 64px;\n}";
|
|
10
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.base {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n --_header-block-size: 64px;\n z-index: 1;\n block-size: var(--_header-block-size);\n inline-size: 100%;\n}\n.base .header-content {\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.container {\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n block-size: inherit;\n color: var(--vvd-color-on-canvas);\n column-gap: 12px;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.container[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n}\n\n.app-content {\n --_header-block-size: 64px;\n}";
|
|
11
11
|
styleInject(css_248z);
|
|
12
12
|
|
|
13
13
|
class Header extends FoundationElement {
|
package/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { vividPopup } from './popup/index.js';
|
|
|
18
18
|
export { vividProgress } from './progress/index.js';
|
|
19
19
|
export { vividProgressRing } from './progress-ring/index.js';
|
|
20
20
|
export { vividSideDrawer } from './side-drawer/index.js';
|
|
21
|
+
export { vividSidenav } from './sidenav/index.js';
|
|
21
22
|
export { vividSidenavItem } from './sidenav-item/index.js';
|
|
22
23
|
export { vividText } from './text/index.js';
|
|
23
24
|
export { vividTextfield } from './text-field/index.js';
|
|
@@ -44,7 +45,6 @@ import './shared/enums.js';
|
|
|
44
45
|
import './shared/button.js';
|
|
45
46
|
import './shared/form-associated.js';
|
|
46
47
|
import './shared/aria-global.js';
|
|
47
|
-
import './shared/ref.js';
|
|
48
48
|
import './shared/slotted.js';
|
|
49
49
|
import './shared/breadcrumb-item.js';
|
|
50
50
|
import './shared/anchor.js';
|
package/lib/components.d.ts
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { Divider } from './divider';
|
|
4
|
+
export declare const DividerTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Divider>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare const vividDivider: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import 'blocking-elements';
|
|
2
|
-
import 'wicg-inert';
|
|
3
|
-
import 'babel-polyfill';
|
|
4
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
5
2
|
export declare class SideDrawer extends FoundationElement {
|
|
6
|
-
#private;
|
|
7
|
-
asideEl: HTMLElement;
|
|
8
|
-
scrimEl: any;
|
|
9
3
|
alternate: boolean;
|
|
10
4
|
modal: boolean;
|
|
11
5
|
open: boolean;
|
|
12
6
|
position?: 'start' | 'end';
|
|
13
|
-
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
14
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare const vividSidenav: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { Sidenav } from './sidenav';
|
|
4
|
+
export declare const SidenavTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Sidenav>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/vivid",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./index.esm.js",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -25,11 +25,13 @@
|
|
|
25
25
|
"./progress": "./progress",
|
|
26
26
|
"./progress-ring": "./progress-ring",
|
|
27
27
|
"./side-drawer": "./side-drawer",
|
|
28
|
+
"./sidenav": "./sidenav",
|
|
28
29
|
"./sidenav-item": "./sidenav-item",
|
|
29
30
|
"./text": "./text",
|
|
30
31
|
"./text-field": "./text-field",
|
|
31
32
|
"./tooltip": "./tooltip",
|
|
32
|
-
"./checkbox": "./checkbox"
|
|
33
|
+
"./checkbox": "./checkbox",
|
|
34
|
+
"./divider": "./divider"
|
|
33
35
|
},
|
|
34
36
|
"typings": "./index.d.ts",
|
|
35
37
|
"dependencies": {
|
|
@@ -37,10 +39,7 @@
|
|
|
37
39
|
"@microsoft/fast-foundation": "^2.46.9",
|
|
38
40
|
"@microsoft/fast-web-utilities": "^5.4.1",
|
|
39
41
|
"ramda": "^0.27.2",
|
|
40
|
-
"@floating-ui/dom": "^0.5.2"
|
|
41
|
-
"blocking-elements": "^0.1.1",
|
|
42
|
-
"wicg-inert": "^3.1.2",
|
|
43
|
-
"babel-polyfill": "^6.26.0"
|
|
42
|
+
"@floating-ui/dom": "^0.5.2"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {}
|
|
46
45
|
}
|
package/popup/index.js
CHANGED
|
@@ -6,9 +6,10 @@ import { o as objectCreate } from '../shared/web.dom-collections.iterator.js';
|
|
|
6
6
|
import '../shared/es.object.assign.js';
|
|
7
7
|
import { j as anObject$3, e as fails$5, g as global$3, v as functionCall, f as functionUncurryThis, Q as shared$1, y as internalState, _ as _export, w as wellKnownSymbol$2, u as defineBuiltIn$1, K as createNonEnumerableProperty$1, x as isObject$1, c as classofRaw, B as requireObjectCoercible$2, R as toIntegerOrInfinity$1, S as toPropertyKey$1, o as objectDefineProperty, J as createPropertyDescriptor$1, A as lengthOfArrayLike$1, T as toAbsoluteIndex$1, i as isCallable$1, U as toLength$1, z as getMethod$1 } from '../shared/export.js';
|
|
8
8
|
import { t as toString$3 } from '../shared/to-string.js';
|
|
9
|
+
import { a as keyEscape } from '../shared/form-associated.js';
|
|
9
10
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
10
11
|
import { w as when } from '../shared/when.js';
|
|
11
|
-
import { r as ref } from '../shared/
|
|
12
|
+
import { r as ref } from '../shared/aria-global.js';
|
|
12
13
|
import { c as classNames } from '../shared/class-names.js';
|
|
13
14
|
import '../icon/index.js';
|
|
14
15
|
import '../shared/iterators.js';
|
|
@@ -18,8 +19,6 @@ import '../shared/focus.js';
|
|
|
18
19
|
import '../shared/affix.js';
|
|
19
20
|
import '../shared/button.js';
|
|
20
21
|
import '../shared/apply-mixins.js';
|
|
21
|
-
import '../shared/form-associated.js';
|
|
22
|
-
import '../shared/aria-global.js';
|
|
23
22
|
import '../shared/focus2.js';
|
|
24
23
|
import '../shared/object-keys.js';
|
|
25
24
|
|
|
@@ -1928,7 +1927,7 @@ const computePosition = (reference, floating, options) => computePosition$1(refe
|
|
|
1928
1927
|
...options
|
|
1929
1928
|
});
|
|
1930
1929
|
|
|
1931
|
-
var _Popup_instances, _Popup_arrowPosition_get, _Popup_padding_get, _Popup_distance_get, _Popup_strategy_get, _Popup_middleware_get, _Popup_cleanup, _Popup_anchorEl, _Popup_assignPopupPosition, _Popup_assignArrowPosition, _Popup_getAnchorById;
|
|
1930
|
+
var _Popup_instances, _Popup_arrowPosition_get, _Popup_padding_get, _Popup_distance_get, _Popup_strategy_get, _Popup_middleware_get, _Popup_cleanup, _Popup_anchorEl, _Popup_assignPopupPosition, _Popup_assignArrowPosition, _Popup_getAnchorById, _Popup_handleKeydown;
|
|
1932
1931
|
class Popup extends FoundationElement {
|
|
1933
1932
|
constructor() {
|
|
1934
1933
|
super();
|
|
@@ -1947,14 +1946,15 @@ class Popup extends FoundationElement {
|
|
|
1947
1946
|
}
|
|
1948
1947
|
|
|
1949
1948
|
disconnectedCallback() {
|
|
1950
|
-
var _a;
|
|
1949
|
+
var _a, _b;
|
|
1951
1950
|
|
|
1952
1951
|
super.disconnectedCallback();
|
|
1953
|
-
(_a = __classPrivateFieldGet(this,
|
|
1952
|
+
(_a = __classPrivateFieldGet(this, _Popup_anchorEl, "f")) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', e => __classPrivateFieldGet(this, _Popup_instances, "m", _Popup_handleKeydown).call(this, e));
|
|
1953
|
+
(_b = __classPrivateFieldGet(this, _Popup_cleanup, "f")) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
1954
1954
|
}
|
|
1955
1955
|
|
|
1956
1956
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
1957
|
-
var _a;
|
|
1957
|
+
var _a, _b;
|
|
1958
1958
|
|
|
1959
1959
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
1960
1960
|
|
|
@@ -1963,6 +1963,7 @@ class Popup extends FoundationElement {
|
|
|
1963
1963
|
{
|
|
1964
1964
|
__classPrivateFieldSet(this, _Popup_anchorEl, __classPrivateFieldGet(this, _Popup_instances, "m", _Popup_getAnchorById).call(this), "f");
|
|
1965
1965
|
|
|
1966
|
+
(_a = __classPrivateFieldGet(this, _Popup_anchorEl, "f")) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', e => __classPrivateFieldGet(this, _Popup_instances, "m", _Popup_handleKeydown).call(this, e));
|
|
1966
1967
|
break;
|
|
1967
1968
|
}
|
|
1968
1969
|
}
|
|
@@ -1970,7 +1971,7 @@ class Popup extends FoundationElement {
|
|
|
1970
1971
|
if (__classPrivateFieldGet(this, _Popup_anchorEl, "f") && this.popupEl) {
|
|
1971
1972
|
__classPrivateFieldSet(this, _Popup_cleanup, autoUpdate(__classPrivateFieldGet(this, _Popup_anchorEl, "f"), this.popupEl, () => this.updatePosition()), "f");
|
|
1972
1973
|
} else {
|
|
1973
|
-
(
|
|
1974
|
+
(_b = __classPrivateFieldGet(this, _Popup_cleanup, "f")) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
1974
1975
|
}
|
|
1975
1976
|
}
|
|
1976
1977
|
|
|
@@ -2047,6 +2048,12 @@ _Popup_cleanup = new WeakMap(), _Popup_anchorEl = new WeakMap(), _Popup_instance
|
|
|
2047
2048
|
});
|
|
2048
2049
|
}, _Popup_getAnchorById = function _Popup_getAnchorById() {
|
|
2049
2050
|
return document.getElementById(this.anchor);
|
|
2051
|
+
}, _Popup_handleKeydown = function _Popup_handleKeydown({
|
|
2052
|
+
key
|
|
2053
|
+
}) {
|
|
2054
|
+
if (key === keyEscape) {
|
|
2055
|
+
this.open = false;
|
|
2056
|
+
}
|
|
2050
2057
|
};
|
|
2051
2058
|
|
|
2052
2059
|
__decorate([attr({
|
package/shared/aria-global.js
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
|
-
import { h as html, _ as __decorate, a as attr } from './index.js';
|
|
2
|
-
|
|
1
|
+
import { A as AttachedBehaviorHTMLDirective, h as html, _ as __decorate, a as attr } from './index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The runtime behavior for template references.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
class RefBehavior {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of RefBehavior.
|
|
10
|
+
* @param target - The element to reference.
|
|
11
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
12
|
+
*/
|
|
13
|
+
constructor(target, propertyName) {
|
|
14
|
+
this.target = target;
|
|
15
|
+
this.propertyName = propertyName;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Bind this behavior to the source.
|
|
19
|
+
* @param source - The source to bind to.
|
|
20
|
+
* @param context - The execution context that the binding is operating within.
|
|
21
|
+
*/
|
|
22
|
+
bind(source) {
|
|
23
|
+
source[this.propertyName] = this.target;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unbinds this behavior from the source.
|
|
27
|
+
* @param source - The source to unbind from.
|
|
28
|
+
*/
|
|
29
|
+
/* eslint-disable-next-line @typescript-eslint/no-empty-function */
|
|
30
|
+
unbind() { }
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A directive that observes the updates a property with a reference to the element.
|
|
34
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
function ref(propertyName) {
|
|
38
|
+
return new AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
|
|
39
|
+
}
|
|
3
40
|
|
|
4
41
|
/**
|
|
5
42
|
* A mixin class implementing start and end elements.
|
|
@@ -116,4 +153,4 @@ __decorate([
|
|
|
116
153
|
attr({ attribute: "aria-roledescription" })
|
|
117
154
|
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
118
155
|
|
|
119
|
-
export { ARIAGlobalStatesAndProperties as A, StartEnd as S };
|
|
156
|
+
export { ARIAGlobalStatesAndProperties as A, StartEnd as S, ref as r };
|
package/shared/export.js
CHANGED
|
@@ -969,4 +969,4 @@ var _export = function (options, source) {
|
|
|
969
969
|
}
|
|
970
970
|
};
|
|
971
971
|
|
|
972
|
-
export { lengthOfArrayLike$1 as A, requireObjectCoercible$2 as B, functionName as C, v8PrototypeDefineBug as D, toIndexedObject$3 as E, hiddenKeys$3 as F, sharedKey$1 as G, enumBugKeys$1 as H, toObject$1 as I, createPropertyDescriptor$2 as J, createNonEnumerableProperty$3 as K, objectKeysInternal as L, indexedObject as M, objectGetOwnPropertySymbols as N, objectPropertyIsEnumerable as O, copyConstructorProperties$1 as P, shared$3 as Q, toIntegerOrInfinity$2 as R, toPropertyKey$2 as S, toAbsoluteIndex$1 as T, toLength$1 as U,
|
|
972
|
+
export { lengthOfArrayLike$1 as A, requireObjectCoercible$2 as B, functionName as C, v8PrototypeDefineBug as D, toIndexedObject$3 as E, hiddenKeys$3 as F, sharedKey$1 as G, enumBugKeys$1 as H, toObject$1 as I, createPropertyDescriptor$2 as J, createNonEnumerableProperty$3 as K, objectKeysInternal as L, indexedObject as M, objectGetOwnPropertySymbols as N, objectPropertyIsEnumerable as O, copyConstructorProperties$1 as P, shared$3 as Q, toIntegerOrInfinity$2 as R, toPropertyKey$2 as S, toAbsoluteIndex$1 as T, toLength$1 as U, _export as _, getBuiltIn$3 as a, objectIsPrototypeOf as b, classofRaw as c, descriptors as d, fails$8 as e, functionUncurryThis as f, global$a as g, inspectSource$2 as h, isCallable$a as i, anObject$2 as j, functionBindNative as k, aCallable$1 as l, engineUserAgent as m, documentCreateElement as n, objectDefineProperty as o, hasOwnProperty_1 as p, objectGetOwnPropertyDescriptor as q, isForced_1 as r, engineV8Version as s, tryToString$1 as t, defineBuiltIn$1 as u, functionCall as v, wellKnownSymbol$1 as w, isObject$5 as x, internalState as y, getMethod$1 as z };
|
|
@@ -77,6 +77,7 @@ var KeyCodes;
|
|
|
77
77
|
KeyCodes[KeyCodes["windowsRight"] = 92] = "windowsRight";
|
|
78
78
|
})(KeyCodes || (KeyCodes = {}));
|
|
79
79
|
const keyEnter = "Enter";
|
|
80
|
+
const keyEscape = "Escape";
|
|
80
81
|
const keySpace = " ";
|
|
81
82
|
|
|
82
83
|
const proxySlotName = "form-associated-proxy";
|
|
@@ -544,4 +545,4 @@ function CheckableFormAssociated(BaseCtor) {
|
|
|
544
545
|
return D;
|
|
545
546
|
}
|
|
546
547
|
|
|
547
|
-
export { CheckableFormAssociated as C, FormAssociated as F, keySpace as k };
|
|
548
|
+
export { CheckableFormAssociated as C, FormAssociated as F, keyEscape as a, keySpace as k };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as affixIconTemplateFactory } from './affix.js';
|
|
2
2
|
import { f as focusTemplateFactory } from './focus2.js';
|
|
3
3
|
import { h as html } from './index.js';
|
|
4
|
-
import { r as ref } from './
|
|
4
|
+
import { r as ref } from './aria-global.js';
|
|
5
5
|
import { c as classNames } from './class-names.js';
|
|
6
6
|
|
|
7
7
|
let _ = t => t,
|