@vonage/vivid 3.0.0-next.28 → 3.0.0-next.30
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/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/card/index.js +1 -1
- package/elevation/index.js +4 -31
- package/fab/index.js +1 -2
- package/header/index.js +29 -52
- package/index.js +2 -2
- package/lib/components.d.ts +1 -0
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/header/header.d.ts +1 -7
- package/lib/header/index.d.ts +1 -0
- package/lib/side-drawer/side-drawer.d.ts +0 -8
- 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 +3 -5
- package/popup/index.js +2 -3
- package/shared/aria-global.js +40 -3
- package/shared/export.js +1 -1
- package/shared/index2.js +37 -0
- package/shared/text-anchor.template.js +1 -1
- package/side-drawer/index.js +11 -8589
- 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 +1 -2
- 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/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/card/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../
|
|
1
|
+
import '../shared/index2.js';
|
|
2
2
|
import '../icon/index.js';
|
|
3
3
|
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable, h as html, d as designSystem } from '../shared/index.js';
|
|
4
4
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
package/elevation/index.js
CHANGED
|
@@ -1,31 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
class Elevation extends FoundationElement {}
|
|
6
|
-
|
|
7
|
-
__decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
|
|
8
|
-
|
|
9
|
-
var css_248z = ":host {\n display: contents;\n}\n\n.control {\n display: contents;\n}\n.control.dp-0 {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n}\n.control.dp-4 {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n}\n.control.dp-8 {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n.control.dp-12 {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control.dp-16 {\n --_elevation-fill: var(--vvd-color-surface-16dp);\n --_elevation-shadow: var(--vvd-shadow-surface-16dp);\n}\n.control.dp-24 {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n.control:not(.dp-0, .dp-4, .dp-8, .dp-12, .dp-16, .dp-24) {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control ::slotted(*) {\n background-color: var(--_elevation-fill);\n filter: var(--_elevation-shadow);\n}";
|
|
10
|
-
styleInject(css_248z);
|
|
11
|
-
|
|
12
|
-
let _ = t => t,
|
|
13
|
-
_t;
|
|
14
|
-
|
|
15
|
-
const getClasses = ({
|
|
16
|
-
dp
|
|
17
|
-
}) => classNames('control', [`dp-${dp}`, Boolean(dp)]);
|
|
18
|
-
|
|
19
|
-
const elevationTemplate = () => html(_t || (_t = _`
|
|
20
|
-
<div class="${0}" part="base">
|
|
21
|
-
<slot></slot>
|
|
22
|
-
</div>`), getClasses);
|
|
23
|
-
|
|
24
|
-
const vividElevation = Elevation.compose({
|
|
25
|
-
baseName: 'elevation',
|
|
26
|
-
template: elevationTemplate,
|
|
27
|
-
styles: css_248z
|
|
28
|
-
});
|
|
29
|
-
designSystem.register(vividElevation());
|
|
30
|
-
|
|
31
|
-
export { vividElevation };
|
|
1
|
+
import '../shared/index.js';
|
|
2
|
+
export { v as vividElevation } from '../shared/index2.js';
|
|
3
|
+
import '../shared/style-inject.es.js';
|
|
4
|
+
import '../shared/class-names.js';
|
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
|
@@ -1,84 +1,61 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Elevation } from '../shared/index2.js';
|
|
2
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
2
3
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
3
4
|
import '../shared/web.dom-collections.iterator.js';
|
|
4
|
-
import { w as when } from '../shared/when.js';
|
|
5
5
|
import { c as classNames } from '../shared/class-names.js';
|
|
6
6
|
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
|
|
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
|
-
var _Header_updateElevatedState;
|
|
14
13
|
class Header extends FoundationElement {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
17
|
-
this.
|
|
16
|
+
this.elevationShadow = false;
|
|
18
17
|
this.alternate = false;
|
|
19
|
-
this._elevated = false;
|
|
20
|
-
|
|
21
|
-
_Header_updateElevatedState.set(this, () => {
|
|
22
|
-
this._elevated = !this._elevated;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
connectedCallback() {
|
|
27
|
-
super.connectedCallback();
|
|
28
|
-
window.addEventListener('scroll', __classPrivateFieldGet(this, _Header_updateElevatedState, "f"));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
disconnectedCallback() {
|
|
32
|
-
super.disconnectedCallback();
|
|
33
|
-
window.removeEventListener('scroll', __classPrivateFieldGet(this, _Header_updateElevatedState, "f"));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
get elevated() {
|
|
37
|
-
return this._elevated && false || this.fixed && window.pageYOffset > 0;
|
|
38
18
|
}
|
|
39
19
|
|
|
40
20
|
}
|
|
41
|
-
_Header_updateElevatedState = new WeakMap();
|
|
42
|
-
|
|
43
|
-
__decorate([attr, __metadata("design:type", String)], Header.prototype, "heading", void 0);
|
|
44
21
|
|
|
45
22
|
__decorate([attr({
|
|
23
|
+
attribute: 'elevation-shadow',
|
|
46
24
|
mode: 'boolean'
|
|
47
|
-
}), __metadata("design:type", Object)], Header.prototype, "
|
|
25
|
+
}), __metadata("design:type", Object)], Header.prototype, "elevationShadow", void 0);
|
|
48
26
|
|
|
49
27
|
__decorate([attr({
|
|
50
28
|
mode: 'boolean'
|
|
51
29
|
}), __metadata("design:type", Object)], Header.prototype, "alternate", void 0);
|
|
52
30
|
|
|
53
|
-
__decorate([observable, __metadata("design:type", Object)], Header.prototype, "_elevated", void 0);
|
|
54
|
-
|
|
55
|
-
__decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], Header.prototype, "elevated", null);
|
|
56
|
-
|
|
57
31
|
let _ = t => t,
|
|
58
|
-
_t
|
|
59
|
-
_t2;
|
|
32
|
+
_t;
|
|
60
33
|
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
elevated
|
|
65
|
-
}) => classNames('control', ['fixed', Boolean(fixed)], ['alternate', Boolean(alternate)], ['elevated', Boolean(elevated)]);
|
|
34
|
+
const getPartAlternate = ({
|
|
35
|
+
alternate
|
|
36
|
+
}) => classNames(['vvd-theme-alternate', Boolean(alternate)]);
|
|
66
37
|
|
|
67
|
-
const headerTemplate =
|
|
38
|
+
const headerTemplate = context => {
|
|
39
|
+
const elevationTag = context.tagFor(Elevation);
|
|
68
40
|
return html(_t || (_t = _`
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
41
|
+
<${0} dp="4" ?no-shadow=${0}>
|
|
42
|
+
<header class="base" part="base">
|
|
43
|
+
<!-- a container is needed to distinguish the surface background color of the
|
|
44
|
+
element from its shadow when applying elevation with alternate -->
|
|
45
|
+
<div class="container" part="${0}">
|
|
46
|
+
<section class="header-content">
|
|
47
|
+
<slot></slot>
|
|
48
|
+
</section>
|
|
49
|
+
<section class="header-content" role="toolbar">
|
|
50
|
+
<slot name="actionItems"></slot>
|
|
51
|
+
</section>
|
|
52
|
+
</div>
|
|
53
|
+
</header>
|
|
54
|
+
</${0}>
|
|
78
55
|
<div class="app-content">
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`),
|
|
56
|
+
<slot name="app-content"></slot>
|
|
57
|
+
</div>
|
|
58
|
+
`), elevationTag, x => !x.elevationShadow, getPartAlternate, elevationTag);
|
|
82
59
|
};
|
|
83
60
|
|
|
84
61
|
const vividHeader = Header.compose({
|
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export { vividButton } from './button/index.js';
|
|
|
9
9
|
export { vividCalendar } from './calendar/index.js';
|
|
10
10
|
export { vividCalendarEvent } from './calendar-event/index.js';
|
|
11
11
|
export { vividCard } from './card/index.js';
|
|
12
|
-
export { vividElevation } from './
|
|
12
|
+
export { v as vividElevation } from './shared/index2.js';
|
|
13
13
|
export { vividFab } from './fab/index.js';
|
|
14
14
|
export { vividIcon } from './icon/index.js';
|
|
15
15
|
export { vividLayout } from './layout/index.js';
|
|
@@ -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
package/lib/header/header.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
export declare class Header extends FoundationElement {
|
|
3
|
-
|
|
4
|
-
heading?: string;
|
|
5
|
-
fixed: boolean;
|
|
3
|
+
elevationShadow: boolean;
|
|
6
4
|
alternate: boolean;
|
|
7
|
-
_elevated: boolean;
|
|
8
|
-
connectedCallback(): void;
|
|
9
|
-
disconnectedCallback(): void;
|
|
10
|
-
get elevated(): boolean;
|
|
11
5
|
}
|
package/lib/header/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import '../elevation';
|
|
1
2
|
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
3
|
export declare const vividHeader: (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,15 +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
|
-
headerSlottedContent?: HTMLElement[];
|
|
14
|
-
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
15
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.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./index.esm.js",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
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",
|
|
@@ -37,10 +38,7 @@
|
|
|
37
38
|
"@microsoft/fast-foundation": "^2.46.9",
|
|
38
39
|
"@microsoft/fast-web-utilities": "^5.4.1",
|
|
39
40
|
"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"
|
|
41
|
+
"@floating-ui/dom": "^0.5.2"
|
|
44
42
|
},
|
|
45
43
|
"peerDependencies": {}
|
|
46
44
|
}
|
package/popup/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../
|
|
1
|
+
import '../shared/index2.js';
|
|
2
2
|
import '../button/index.js';
|
|
3
3
|
import { F as FoundationElement, c as __classPrivateFieldGet, i as __classPrivateFieldSet, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
4
4
|
import { s as speciesConstructor$1, f as functionApply } from '../shared/icon.js';
|
|
@@ -8,7 +8,7 @@ import { j as anObject$3, e as fails$5, g as global$3, v as functionCall, f as f
|
|
|
8
8
|
import { t as toString$3 } from '../shared/to-string.js';
|
|
9
9
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
10
10
|
import { w as when } from '../shared/when.js';
|
|
11
|
-
import { r as ref } from '../shared/
|
|
11
|
+
import { r as ref } from '../shared/aria-global.js';
|
|
12
12
|
import { c as classNames } from '../shared/class-names.js';
|
|
13
13
|
import '../icon/index.js';
|
|
14
14
|
import '../shared/iterators.js';
|
|
@@ -19,7 +19,6 @@ import '../shared/affix.js';
|
|
|
19
19
|
import '../shared/button.js';
|
|
20
20
|
import '../shared/apply-mixins.js';
|
|
21
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
|
|
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 };
|
package/shared/index2.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
2
|
+
import { s as styleInject } from './style-inject.es.js';
|
|
3
|
+
import { c as classNames } from './class-names.js';
|
|
4
|
+
|
|
5
|
+
class Elevation extends FoundationElement {}
|
|
6
|
+
|
|
7
|
+
__decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
|
|
8
|
+
|
|
9
|
+
__decorate([attr({
|
|
10
|
+
attribute: 'no-shadow',
|
|
11
|
+
mode: 'boolean'
|
|
12
|
+
}), __metadata("design:type", Boolean)], Elevation.prototype, "noShadow", void 0);
|
|
13
|
+
|
|
14
|
+
var css_248z = ":host {\n display: contents;\n}\n\n.control {\n display: contents;\n}\n.control.dp-0 {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n}\n.control.dp-4 {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n}\n.control.dp-8 {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n.control.dp-12 {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control.dp-16 {\n --_elevation-fill: var(--vvd-color-surface-16dp);\n --_elevation-shadow: var(--vvd-shadow-surface-16dp);\n}\n.control.dp-24 {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n.control:not(.dp-0, .dp-4, .dp-8, .dp-12, .dp-16, .dp-24) {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control ::slotted(*) {\n background-color: var(--_elevation-fill);\n filter: var(--_elevation-shadow);\n transition: background-color 0.15s linear, filter 0.15s linear;\n}\n.control.no-shadow ::slotted(*) {\n filter: none;\n}";
|
|
15
|
+
styleInject(css_248z);
|
|
16
|
+
|
|
17
|
+
let _ = t => t,
|
|
18
|
+
_t;
|
|
19
|
+
|
|
20
|
+
const getClasses = ({
|
|
21
|
+
dp,
|
|
22
|
+
noShadow
|
|
23
|
+
}) => classNames('control', [`dp-${dp}`, Boolean(dp)], ['no-shadow', Boolean(noShadow)]);
|
|
24
|
+
|
|
25
|
+
const elevationTemplate = () => html(_t || (_t = _`
|
|
26
|
+
<div class="${0}" part="base">
|
|
27
|
+
<slot></slot>
|
|
28
|
+
</div>`), getClasses);
|
|
29
|
+
|
|
30
|
+
const vividElevation = Elevation.compose({
|
|
31
|
+
baseName: 'elevation',
|
|
32
|
+
template: elevationTemplate,
|
|
33
|
+
styles: css_248z
|
|
34
|
+
});
|
|
35
|
+
designSystem.register(vividElevation());
|
|
36
|
+
|
|
37
|
+
export { Elevation as E, vividElevation as v };
|
|
@@ -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,
|