@vonage/vivid 3.9.0 → 3.10.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/alert/index.js +28 -0
- package/avatar/index.js +1 -1
- package/badge/index.js +1 -1
- package/banner/index.js +3 -3
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.js +2 -2
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +2 -2
- package/checkbox/index.js +1 -1
- package/combobox/index.js +6 -6
- package/custom-elements.json +269 -27
- package/data-grid/index.js +1 -1
- package/dialog/index.js +4 -4
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/fab/index.js +1 -1
- package/header/index.js +2 -2
- package/index.js +51 -50
- package/layout/index.js +1 -1
- package/lib/alert/alert.d.ts +24 -0
- package/lib/alert/alert.template.d.ts +4 -0
- package/lib/alert/definition.d.ts +2 -0
- package/lib/alert/index.d.ts +1 -0
- package/lib/components.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +2 -1
- package/lib/tooltip/tooltip.d.ts +1 -0
- package/listbox/index.js +2 -2
- package/menu/index.js +6 -6
- 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 +4 -4
- package/option/index.js +1 -1
- package/package.json +1 -1
- package/popup/index.js +4 -4
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.js +1 -1
- package/select/index.js +6 -6
- package/shared/definition.js +1 -1
- package/shared/definition10.js +46 -63
- package/shared/definition11.js +38 -92
- package/shared/definition12.js +96 -31
- package/shared/definition13.js +84 -757
- package/shared/definition14.js +32 -95
- package/shared/definition15.js +758 -100
- package/shared/definition16.js +103 -24
- package/shared/definition17.js +96 -154
- package/shared/definition18.js +108 -663
- package/shared/definition19.js +667 -1532
- package/shared/definition2.js +1 -1
- package/shared/definition20.js +1544 -223
- package/shared/definition21.js +183 -964
- package/shared/definition22.js +1037 -222
- package/shared/definition23.js +226 -67
- package/shared/definition24.js +68 -77
- package/shared/definition25.js +76 -47
- package/shared/definition26.js +46 -32
- package/shared/definition27.js +35 -49
- package/shared/definition28.js +48 -344
- package/shared/definition29.js +273 -282
- package/shared/definition30.js +356 -14
- package/shared/definition31.js +13 -67
- package/shared/definition32.js +65 -21
- package/shared/definition33.js +21 -39
- package/shared/definition34.js +31 -432
- package/shared/definition35.js +432 -76
- package/shared/definition36.js +82 -33
- package/shared/definition37.js +31 -422
- package/shared/definition38.js +357 -564
- package/shared/definition39.js +628 -75
- package/shared/definition4.js +1 -1
- package/shared/definition40.js +70 -573
- package/shared/definition41.js +538 -81
- package/shared/definition42.js +127 -47
- package/shared/definition43.js +51 -16
- package/shared/definition44.js +17 -425
- package/shared/definition45.js +421 -103
- package/shared/definition46.js +114 -19
- package/shared/definition47.js +19 -269
- package/shared/definition48.js +244 -86
- package/shared/definition49.js +110 -70
- package/shared/definition5.js +1 -1
- package/shared/definition50.js +80 -67
- package/shared/definition51.js +69 -295
- package/shared/definition52.js +305 -0
- package/shared/definition6.js +142 -45
- package/shared/definition7.js +95 -23
- package/shared/definition8.js +22 -103
- package/shared/definition9.js +62 -102
- package/shared/es.object.assign.js +1 -1
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.js +2 -2
- package/shared/index.js +1 -1
- package/shared/listbox.js +2 -2
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/repeat.js +1 -1
- package/shared/text-field.js +1 -1
- package/shared/text-field2.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/tooltip/index.js +5 -5
- package/tree-item/index.js +1 -1
- package/tree-view/index.js +1 -1
- package/vivid.api.json +91 -0
package/shared/definition11.js
CHANGED
|
@@ -1,99 +1,45 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { i as iconRegistries } from './definition3.js';
|
|
3
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
4
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
5
|
+
import { w as when } from './when.js';
|
|
6
|
+
import { c as classNames } from './class-names.js';
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
class Breadcrumb$1 extends FoundationElement {
|
|
13
|
-
slottedBreadcrumbItemsChanged() {
|
|
14
|
-
if (this.$fastController.isConnected) {
|
|
15
|
-
if (this.slottedBreadcrumbItems === undefined ||
|
|
16
|
-
this.slottedBreadcrumbItems.length === 0) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
20
|
-
this.slottedBreadcrumbItems.forEach((item) => {
|
|
21
|
-
const itemIsLastNode = item === lastNode;
|
|
22
|
-
this.setItemSeparator(item, itemIsLastNode);
|
|
23
|
-
this.setAriaCurrent(item, itemIsLastNode);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
setItemSeparator(item, isLastNode) {
|
|
28
|
-
if (item instanceof BreadcrumbItem) {
|
|
29
|
-
item.separator = !isLastNode;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
34
|
-
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
35
|
-
*/
|
|
36
|
-
findChildWithHref(node) {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
if (node.childElementCount > 0) {
|
|
39
|
-
return node.querySelector("a[href]");
|
|
40
|
-
}
|
|
41
|
-
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
42
|
-
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
43
|
-
}
|
|
44
|
-
else
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Sets ARIA Current for the current node
|
|
49
|
-
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
50
|
-
* otherwise apply aria-current to the host element, with an href
|
|
51
|
-
*/
|
|
52
|
-
setAriaCurrent(item, isLastNode) {
|
|
53
|
-
const childNodeWithHref = this.findChildWithHref(item);
|
|
54
|
-
if (childNodeWithHref === null &&
|
|
55
|
-
item.hasAttribute("href") &&
|
|
56
|
-
item instanceof BreadcrumbItem) {
|
|
57
|
-
isLastNode
|
|
58
|
-
? item.setAttribute("aria-current", "page")
|
|
59
|
-
: item.removeAttribute("aria-current");
|
|
60
|
-
}
|
|
61
|
-
else if (childNodeWithHref !== null) {
|
|
62
|
-
isLastNode
|
|
63
|
-
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
64
|
-
: childNodeWithHref.removeAttribute("aria-current");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
__decorate([
|
|
69
|
-
observable
|
|
70
|
-
], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
|
|
8
|
+
class Badge extends FoundationElement {}
|
|
9
|
+
__decorate([attr, __metadata("design:type", String)], Badge.prototype, "connotation", void 0);
|
|
10
|
+
__decorate([attr, __metadata("design:type", String)], Badge.prototype, "shape", void 0);
|
|
11
|
+
__decorate([attr, __metadata("design:type", String)], Badge.prototype, "appearance", void 0);
|
|
12
|
+
__decorate([attr, __metadata("design:type", String)], Badge.prototype, "text", void 0);
|
|
13
|
+
applyMixins(Badge, AffixIconWithTrailing);
|
|
71
14
|
|
|
72
|
-
|
|
73
|
-
_t;
|
|
74
|
-
const breadcrumbTemplate = () => html(_t || (_t = _`
|
|
75
|
-
<nav aria-label="breadcrumbs" class="base">
|
|
76
|
-
<div role="list" class="list">
|
|
77
|
-
<slot
|
|
78
|
-
${0}
|
|
79
|
-
></slot>
|
|
80
|
-
</div>
|
|
81
|
-
</nav>
|
|
82
|
-
`), slotted({
|
|
83
|
-
property: 'slottedBreadcrumbItems',
|
|
84
|
-
filter: elements()
|
|
85
|
-
}));
|
|
86
|
-
|
|
87
|
-
var css_248z = ".list {\n display: flex;\n}";
|
|
15
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 27 Apr 2023 09:20:45 GMT\n */\n.base {\n --_badge-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n block-size: var(--_badge-block-size);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n column-gap: 8px;\n font: var(--vvd-typography-base-condensed-bold);\n max-inline-size: 100%;\n padding-inline: 8px;\n vertical-align: middle;\n}\n.base.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-cta-500);\n --_connotation-color-soft: var(--vvd-color-cta-100);\n --_connotation-color-contrast: var(--vvd-color-cta-800);\n --_connotation-color-pale: var(--vvd-color-cta-300);\n --_connotation-color-fierce: var(--vvd-color-cta-700);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-success-500);\n --_connotation-color-soft: var(--vvd-color-success-100);\n --_connotation-color-contrast: var(--vvd-color-success-800);\n --_connotation-color-pale: var(--vvd-color-success-300);\n --_connotation-color-fierce: var(--vvd-color-success-700);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-alert-500);\n --_connotation-color-soft: var(--vvd-color-alert-100);\n --_connotation-color-contrast: var(--vvd-color-alert-800);\n --_connotation-color-pale: var(--vvd-color-alert-300);\n --_connotation-color-fierce: var(--vvd-color-alert-700);\n}\n.base.connotation-warning {\n --_connotation-color-primary: var(--vvd-color-warning-300);\n --_connotation-color-primary-text: var(--vvd-color-canvas-text);\n --_connotation-color-intermediate: var(--vvd-color-warning-300);\n --_connotation-color-soft: var(--vvd-color-warning-100);\n --_connotation-color-contrast: var(--vvd-color-warning-800);\n --_connotation-color-pale: var(--vvd-color-warning-300);\n --_connotation-color-fierce: var(--vvd-color-warning-700);\n}\n.base.connotation-information {\n --_connotation-color-primary: var(--vvd-color-information-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-information-500);\n --_connotation-color-soft: var(--vvd-color-information-100);\n --_connotation-color-contrast: var(--vvd-color-information-800);\n --_connotation-color-pale: var(--vvd-color-information-300);\n --_connotation-color-fierce: var(--vvd-color-information-700);\n}\n.base:not(.connotation-cta, .connotation-success, .connotation-alert, .connotation-warning, .connotation-information) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-neutral-500);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\n --_connotation-color-contrast: var(--vvd-color-neutral-800);\n --_connotation-color-pale: var(--vvd-color-neutral-300);\n --_connotation-color-fierce: var(--vvd-color-neutral-700);\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.base.appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-pale);\n}\n.base.appearance-subtle {\n --_appearance-color-text: var(--_connotation-color-contrast);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base.icon-only {\n contain: size;\n padding-inline: 0;\n place-content: center;\n}\n@supports (aspect-ratio: 1) {\n .base.icon-only {\n aspect-ratio: 1;\n }\n}\n@supports not (aspect-ratio: 1) {\n .base.icon-only {\n inline-size: var(--_badge-block-size);\n }\n}\n\n.text {\n overflow: hidden;\n max-inline-size: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Shape */\n.base:not(.shape-pill) {\n border-radius: 4px;\n}\n\n.base.shape-pill {\n border-radius: 14px;\n}\n\n/* Icon */\n.icon {\n font-size: calc(var(--_badge-block-size) / 1.6667);\n line-height: 1;\n}\n.icon-trailing .icon {\n order: 1;\n}";
|
|
88
16
|
|
|
89
|
-
|
|
17
|
+
let _ = t => t,
|
|
18
|
+
_t,
|
|
19
|
+
_t2;
|
|
20
|
+
const getClasses = ({
|
|
21
|
+
connotation,
|
|
22
|
+
appearance,
|
|
23
|
+
shape,
|
|
24
|
+
iconTrailing,
|
|
25
|
+
text,
|
|
26
|
+
icon
|
|
27
|
+
}) => classNames('base', [`connotation-${connotation}`, Boolean(connotation)], [`appearance-${appearance}`, Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], ['icon-trailing', iconTrailing], ['icon-only', !text && Boolean(icon)]);
|
|
28
|
+
const badgeTemplate = context => {
|
|
29
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
30
|
+
return html(_t || (_t = _`
|
|
31
|
+
<span class="${0}">
|
|
32
|
+
${0}
|
|
33
|
+
${0}
|
|
34
|
+
</span>`), getClasses, x => affixIconTemplate(x.icon), when(x => x.text, x => html(_t2 || (_t2 = _`<span class="text">${0}</span>`), x.text)));
|
|
35
|
+
};
|
|
90
36
|
|
|
91
|
-
const
|
|
92
|
-
baseName: '
|
|
93
|
-
template:
|
|
37
|
+
const badgeDefinition = Badge.compose({
|
|
38
|
+
baseName: 'badge',
|
|
39
|
+
template: badgeTemplate,
|
|
94
40
|
styles: css_248z
|
|
95
41
|
});
|
|
96
|
-
const
|
|
97
|
-
const
|
|
42
|
+
const badgeRegistries = [badgeDefinition(), ...iconRegistries];
|
|
43
|
+
const registerBadge = registerFactory(badgeRegistries);
|
|
98
44
|
|
|
99
|
-
export {
|
|
45
|
+
export { badgeDefinition as b, registerBadge as r };
|
package/shared/definition12.js
CHANGED
|
@@ -1,48 +1,113 @@
|
|
|
1
|
-
import { _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.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';
|
|
2
|
+
import { B as Button, b as buttonRegistries } from './definition7.js';
|
|
2
3
|
import { i as iconRegistries } from './definition3.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { I as Icon } from './icon.js';
|
|
4
|
+
import { C as Connotation } from './enums.js';
|
|
5
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
6
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
7
7
|
import { w as when } from './when.js';
|
|
8
8
|
import { c as classNames } from './class-names.js';
|
|
9
9
|
|
|
10
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
10
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 27 Apr 2023 09:20:45 GMT\n */\n.control {\n overflow: hidden;\n max-height: 160px;\n background-color: var(--_appearance-color-fill);\n color: var(--_appearance-color-text);\n transition: max-height var(--transition-delay, 200ms);\n}\n.control.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n}\n.control.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n}\n.control.connotation-announcement {\n --_connotation-color-primary: var(--vvd-color-announcement-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n}\n.control.connotation-warning {\n --_connotation-color-primary: var(--vvd-color-warning-300);\n --_connotation-color-primary-text: var(--vvd-color-canvas-text);\n}\n.control:not(.connotation-success, .connotation-alert, .connotation-announcement, .connotation-warning) {\n --_connotation-color-primary: var(--vvd-color-information-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.control.removing {\n max-height: 0;\n}\n.control > .header {\n display: flex;\n min-height: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n align-items: center;\n justify-content: flex-start;\n font: var(--vvd-typography-base-bold);\n}\n.control > .header > .user-content {\n display: flex;\n flex: 1 0;\n align-items: center;\n justify-content: center;\n padding-inline: 16px;\n}\n.control > .header > .user-content > .icon {\n flex: 0 0 auto;\n font-size: 20px;\n line-height: 1;\n margin-inline-end: 15px;\n}\n.control > .header > .user-content > .action-items {\n display: inline-block;\n flex: 0 0 auto;\n padding-inline-start: 15px;\n}\n.control > .header > .user-content > .message {\n padding: 20px 0;\n}\n.control > .header > .dismiss-button {\n --vvd-icon-button-color: inherit;\n flex: 0 0 auto;\n margin-inline-end: 8px;\n}";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var _Banner_handleRemoveEnd, _Banner_closeOnKeyDown;
|
|
13
|
+
const connotationIconMap = new Map([[Connotation.Information, 'info-solid'], [Connotation.Announcement, 'megaphone-solid'], [Connotation.Success, 'check-circle-solid'], [Connotation.Warning, 'warning-solid'], [Connotation.Alert, 'error-solid']]);
|
|
14
|
+
const defaultConnotation = (connotation = Connotation.Information) => connotationIconMap.get(connotation);
|
|
15
|
+
class Banner extends FoundationElement {
|
|
13
16
|
constructor() {
|
|
14
|
-
super();
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.removable = false;
|
|
19
|
+
_Banner_handleRemoveEnd.set(this, () => {
|
|
20
|
+
this.$emit('removed');
|
|
21
|
+
this.parentElement && this.parentElement.removeChild(this);
|
|
22
|
+
});
|
|
23
|
+
_Banner_closeOnKeyDown.set(this, e => {
|
|
24
|
+
if (e.key !== 'Escape' || !this.removable) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.remove();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
get conditionedIcon() {
|
|
31
|
+
var _a;
|
|
32
|
+
return (_a = this.icon) !== null && _a !== void 0 ? _a : defaultConnotation(this.connotation);
|
|
33
|
+
}
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
super.connectedCallback();
|
|
36
|
+
this.addEventListener('keydown', __classPrivateFieldGet(this, _Banner_closeOnKeyDown, "f"));
|
|
37
|
+
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
super.disconnectedCallback();
|
|
40
|
+
this.removeEventListener('keydown', __classPrivateFieldGet(this, _Banner_closeOnKeyDown, "f"));
|
|
41
|
+
}
|
|
42
|
+
remove() {
|
|
43
|
+
this.$emit('removing');
|
|
44
|
+
const banner = this.shadowRoot && this.shadowRoot.querySelector('.banner');
|
|
45
|
+
if (banner) {
|
|
46
|
+
banner.classList.add('removing');
|
|
47
|
+
banner.addEventListener('transitionend', __classPrivateFieldGet(this, _Banner_handleRemoveEnd, "f"));
|
|
48
|
+
}
|
|
15
49
|
}
|
|
16
50
|
}
|
|
17
|
-
|
|
51
|
+
_Banner_handleRemoveEnd = new WeakMap(), _Banner_closeOnKeyDown = new WeakMap();
|
|
52
|
+
__decorate([attr({
|
|
53
|
+
attribute: 'action-href'
|
|
54
|
+
}), __metadata("design:type", Object)], Banner.prototype, "actionHref", void 0);
|
|
55
|
+
__decorate([attr({
|
|
56
|
+
attribute: 'action-text'
|
|
57
|
+
}), __metadata("design:type", Object)], Banner.prototype, "actionText", void 0);
|
|
58
|
+
__decorate([attr({
|
|
59
|
+
mode: 'boolean'
|
|
60
|
+
}), __metadata("design:type", Object)], Banner.prototype, "removable", void 0);
|
|
61
|
+
__decorate([attr({
|
|
62
|
+
attribute: 'aria-live'
|
|
63
|
+
}), __metadata("design:type", Object)], Banner.prototype, "ariaLive", void 0);
|
|
64
|
+
__decorate([attr(), __metadata("design:type", Object)], Banner.prototype, "role", void 0);
|
|
65
|
+
__decorate([attr(), __metadata("design:type", Object)], Banner.prototype, "text", void 0);
|
|
66
|
+
__decorate([attr(), __metadata("design:type", Object)], Banner.prototype, "connotation", void 0);
|
|
67
|
+
applyMixins(Banner, AffixIcon);
|
|
18
68
|
|
|
19
69
|
let _2 = t => t,
|
|
20
70
|
_t,
|
|
21
|
-
_t2
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const getClasses = _ => classNames('base');
|
|
25
|
-
const BreadcrumbItemTemplate = (context, definition) => {
|
|
26
|
-
const iconTag = context.tagFor(Icon);
|
|
71
|
+
_t2;
|
|
72
|
+
const getClasses = _ => classNames('control', [`connotation-${_.connotation}`, !!_.connotation]);
|
|
73
|
+
function renderDismissButton(buttonTag) {
|
|
27
74
|
return html(_t || (_t = _2`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
75
|
+
<${0}
|
|
76
|
+
part="vvd-theme-alternate"
|
|
77
|
+
size="condensed"
|
|
78
|
+
class="dismiss-button"
|
|
79
|
+
icon="close-line"
|
|
80
|
+
@click="${0}">
|
|
81
|
+
</${0}>`), buttonTag, x => x.remove(), buttonTag);
|
|
82
|
+
}
|
|
83
|
+
const BannerTemplate = context => {
|
|
84
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
85
|
+
const buttonTag = context.tagFor(Button);
|
|
86
|
+
return html(_t2 || (_t2 = _2`
|
|
87
|
+
<div class="banner ${0}" tabindex="0">
|
|
88
|
+
<header class="header">
|
|
89
|
+
<div class="user-content">
|
|
90
|
+
${0}
|
|
91
|
+
<div class="banner--message"
|
|
92
|
+
role="${0}"
|
|
93
|
+
aria-live="${0}">
|
|
94
|
+
${0}
|
|
95
|
+
</div>
|
|
96
|
+
<slot class="action-items" name="action-items"></slot>
|
|
97
|
+
</div>
|
|
32
98
|
|
|
33
|
-
|
|
34
|
-
|
|
99
|
+
${0}
|
|
100
|
+
</header>
|
|
101
|
+
</div>
|
|
102
|
+
`), getClasses, x => affixIconTemplate(x.conditionedIcon), x => x.role ? x.role : 'status', x => x.ariaLive ? x.ariaLive : 'polite', x => x.text, when(x => x.removable, renderDismissButton(buttonTag)));
|
|
35
103
|
};
|
|
36
104
|
|
|
37
|
-
const
|
|
38
|
-
baseName: '
|
|
39
|
-
template:
|
|
40
|
-
styles: css_248z
|
|
41
|
-
shadowOptions: {
|
|
42
|
-
delegatesFocus: true
|
|
43
|
-
}
|
|
105
|
+
const bannerDefinition = Banner.compose({
|
|
106
|
+
baseName: 'banner',
|
|
107
|
+
template: BannerTemplate,
|
|
108
|
+
styles: css_248z
|
|
44
109
|
});
|
|
45
|
-
const
|
|
46
|
-
const
|
|
110
|
+
const bannerRegistries = [bannerDefinition(), ...iconRegistries, ...buttonRegistries];
|
|
111
|
+
const registerBanner = registerFactory(bannerRegistries);
|
|
47
112
|
|
|
48
|
-
export {
|
|
113
|
+
export { bannerRegistries as a, bannerDefinition as b, registerBanner as r };
|