@vonage/vivid 3.9.0 → 3.11.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.
Files changed (136) hide show
  1. package/accordion/index.js +1 -0
  2. package/alert/index.js +28 -0
  3. package/avatar/index.js +1 -1
  4. package/badge/index.js +1 -1
  5. package/banner/index.js +3 -3
  6. package/breadcrumb/index.js +2 -1
  7. package/breadcrumb-item/index.js +1 -1
  8. package/button/index.js +2 -2
  9. package/calendar/index.js +1 -1
  10. package/calendar-event/index.js +1 -1
  11. package/card/index.js +3 -2
  12. package/checkbox/index.js +1 -1
  13. package/combobox/index.js +7 -6
  14. package/custom-elements.json +589 -377
  15. package/data-grid/index.js +3 -2
  16. package/dialog/index.js +5 -4
  17. package/divider/index.js +1 -1
  18. package/elevation/index.js +1 -1
  19. package/fab/index.js +1 -1
  20. package/header/index.js +2 -2
  21. package/index.js +54 -52
  22. package/layout/index.js +1 -1
  23. package/lib/alert/alert.d.ts +24 -0
  24. package/lib/alert/alert.template.d.ts +4 -0
  25. package/lib/alert/definition.d.ts +2 -0
  26. package/lib/alert/index.d.ts +1 -0
  27. package/lib/components.d.ts +1 -0
  28. package/lib/enums.d.ts +10 -9
  29. package/lib/layout/layout.d.ts +2 -0
  30. package/lib/pagination/definition.d.ts +3 -0
  31. package/lib/pagination/index.d.ts +1 -0
  32. package/lib/pagination/pagination.d.ts +18 -0
  33. package/lib/pagination/pagination.template.d.ts +4 -0
  34. package/lib/popup/popup.d.ts +2 -2
  35. package/lib/text-area/text-area.d.ts +2 -1
  36. package/lib/tooltip/tooltip.d.ts +10 -4
  37. package/listbox/index.js +3 -2
  38. package/menu/index.js +7 -6
  39. package/menu-item/index.js +1 -1
  40. package/nav/index.js +1 -1
  41. package/nav-disclosure/index.js +1 -1
  42. package/nav-item/index.js +1 -1
  43. package/note/index.js +1 -1
  44. package/number-field/index.js +4 -4
  45. package/option/index.js +1 -1
  46. package/package.json +1 -1
  47. package/pagination/index.js +329 -0
  48. package/popup/index.js +4 -4
  49. package/progress/index.js +1 -1
  50. package/progress-ring/index.js +1 -1
  51. package/radio/index.js +1 -1
  52. package/radio-group/index.js +3 -2
  53. package/select/index.js +7 -6
  54. package/shared/children.js +1 -1
  55. package/shared/definition.js +3 -2
  56. package/shared/definition10.js +46 -63
  57. package/shared/definition11.js +38 -92
  58. package/shared/definition12.js +96 -31
  59. package/shared/definition13.js +85 -757
  60. package/shared/definition14.js +32 -95
  61. package/shared/definition15.js +758 -100
  62. package/shared/definition16.js +103 -24
  63. package/shared/definition17.js +96 -154
  64. package/shared/definition18.js +108 -663
  65. package/shared/definition19.js +667 -1532
  66. package/shared/definition2.js +1 -1
  67. package/shared/definition20.js +1532 -223
  68. package/shared/definition21.js +183 -964
  69. package/shared/definition22.js +1034 -218
  70. package/shared/definition23.js +226 -67
  71. package/shared/definition24.js +68 -77
  72. package/shared/definition25.js +76 -47
  73. package/shared/definition26.js +46 -32
  74. package/shared/definition27.js +39 -49
  75. package/shared/definition28.js +48 -344
  76. package/shared/definition29.js +273 -282
  77. package/shared/definition30.js +356 -14
  78. package/shared/definition31.js +13 -67
  79. package/shared/definition32.js +65 -21
  80. package/shared/definition33.js +21 -39
  81. package/shared/definition34.js +31 -432
  82. package/shared/definition35.js +432 -76
  83. package/shared/definition36.js +82 -33
  84. package/shared/definition37.js +31 -422
  85. package/shared/definition38.js +358 -564
  86. package/shared/definition39.js +628 -75
  87. package/shared/definition4.js +1 -1
  88. package/shared/definition40.js +70 -573
  89. package/shared/definition41.js +538 -81
  90. package/shared/definition42.js +127 -47
  91. package/shared/definition43.js +51 -16
  92. package/shared/definition44.js +17 -425
  93. package/shared/definition45.js +421 -103
  94. package/shared/definition46.js +114 -19
  95. package/shared/definition47.js +19 -269
  96. package/shared/definition48.js +244 -86
  97. package/shared/definition49.js +110 -70
  98. package/shared/definition5.js +1 -1
  99. package/shared/definition50.js +88 -67
  100. package/shared/definition51.js +69 -294
  101. package/shared/definition52.js +305 -0
  102. package/shared/definition6.js +142 -45
  103. package/shared/definition7.js +97 -24
  104. package/shared/definition8.js +22 -103
  105. package/shared/definition9.js +62 -102
  106. package/shared/enums.js +10 -9
  107. package/shared/es.object.assign.js +1 -1
  108. package/shared/form-associated.js +1 -1
  109. package/shared/form-elements.js +2 -2
  110. package/shared/index.js +1 -1
  111. package/shared/listbox.js +2 -2
  112. package/shared/node-observation.js +74 -0
  113. package/shared/patterns/form-elements/form-elements.d.ts +4 -4
  114. package/shared/repeat.js +1 -1
  115. package/shared/slotted.js +3 -73
  116. package/shared/text-field.js +1 -1
  117. package/shared/text-field2.js +1 -1
  118. package/side-drawer/index.js +1 -1
  119. package/slider/index.js +1 -1
  120. package/styles/core/all.css +1 -1
  121. package/styles/core/theme.css +1 -1
  122. package/styles/core/typography.css +1 -1
  123. package/styles/tokens/theme-dark.css +4 -4
  124. package/styles/tokens/theme-light.css +4 -4
  125. package/switch/index.js +1 -1
  126. package/tab/index.js +1 -1
  127. package/tab-panel/index.js +1 -1
  128. package/tabs/index.js +4 -3
  129. package/tag/index.js +1 -1
  130. package/tag-group/index.js +1 -1
  131. package/text-area/index.js +1 -1
  132. package/text-field/index.js +1 -1
  133. package/tooltip/index.js +5 -5
  134. package/tree-item/index.js +2 -1
  135. package/tree-view/index.js +2 -1
  136. package/vivid.api.json +128 -16
@@ -1,99 +1,45 @@
1
- import { F as FoundationElement, _ as __decorate, o as observable, h as html, r as registerFactory } from './index.js';
2
- import { s as slotted, e as elements } from './slotted.js';
3
- import { B as BreadcrumbItem } from './breadcrumb-item.js';
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
- * A Breadcrumb Custom HTML Element.
7
- * @slot - The default slot for the breadcrumb items
8
- * @csspart list - The element wrapping the slotted items
9
- *
10
- * @public
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
- let _ = t => t,
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 Mon, 08 May 2023 11:40:49 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
- class Breadcrumb extends Breadcrumb$1 {}
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 breadcrumbDefinition = Breadcrumb.compose({
92
- baseName: 'breadcrumb',
93
- template: breadcrumbTemplate,
37
+ const badgeDefinition = Badge.compose({
38
+ baseName: 'badge',
39
+ template: badgeTemplate,
94
40
  styles: css_248z
95
41
  });
96
- const breadcrumbRegistries = [breadcrumbDefinition()];
97
- const registerBreadcrumb = registerFactory(breadcrumbRegistries);
42
+ const badgeRegistries = [badgeDefinition(), ...iconRegistries];
43
+ const registerBadge = registerFactory(badgeRegistries);
98
44
 
99
- export { breadcrumbRegistries as a, breadcrumbDefinition as b, registerBreadcrumb as r };
45
+ export { badgeDefinition as b, registerBadge as r };
@@ -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 { f as focusRegistries } from './definition4.js';
4
- import { B as BreadcrumbItem$1 } from './breadcrumb-item.js';
5
- import { t as textAnchorTemplate } from './text-anchor.template.js';
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 Mon, 24 Apr 2023 10:27:51 GMT\n */\n.base {\n display: flex;\n align-items: center;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base);\n}\n.base .separator {\n margin: 0 16px;\n color: var(--vvd-color-neutral-600);\n font-size: 12px;\n}\n\n.control {\n position: relative;\n font: inherit;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control:any-link {\n color: var(--vvd-color-cta-600);\n text-decoration: none;\n}\n.control:any-link:hover {\n text-decoration: underline;\n}\n\n.focus-indicator {\n --focus-inset: -4px -8px;\n --focus-stroke-gap-color: transparent;\n border-radius: 6px;\n}\n.control:not(:focus-visible) > .focus-indicator {\n display: none;\n}";
10
+ var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 08 May 2023 11:40:49 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\n.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 font: var(--vvd-typography-base-bold);\n inline-size: 100%;\n}\n.header .content {\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n column-gap: 16px;\n inline-size: 100%;\n padding-inline: 16px;\n}\n.header .content .icon {\n flex-shrink: 0;\n font-size: 20px;\n line-height: 1;\n}\n.header .content .action-items {\n flex-shrink: 0;\n}\n.header .dismiss-button {\n flex-shrink: 0;\n margin-inline-end: 8px;\n}";
11
11
 
12
- class BreadcrumbItem extends BreadcrumbItem$1 {
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('.control');
45
+ if (banner) {
46
+ banner.classList.add('removing');
47
+ banner.addEventListener('transitionend', __classPrivateFieldGet(this, _Banner_handleRemoveEnd, "f"));
48
+ }
15
49
  }
16
50
  }
17
- __decorate([attr, __metadata("design:type", String)], BreadcrumbItem.prototype, "text", void 0);
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
- _t3,
23
- _t4;
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
- <div role="listitem" class="${0}">
29
- ${0}
30
-
31
- ${0}
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="${0}" tabindex="0">
88
+ <header class="header">
89
+ <div class="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
- ${0}
34
- </div>`), getClasses, when(x => x.text && !x.href, html(_t2 || (_t2 = _2`${0}`), x => x.text)), when(x => x.text && x.href && x.href.length > 0, html(_t3 || (_t3 = _2`${0}`), textAnchorTemplate(context))), when(x => x.separator, html(_t4 || (_t4 = _2`<${0} class="separator" name="chevron-right-solid"></${0}>`), iconTag, iconTag)));
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 breadcrumbItemDefinition = BreadcrumbItem.compose({
38
- baseName: 'breadcrumb-item',
39
- template: BreadcrumbItemTemplate,
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 breadcrumbItemRegistries = [breadcrumbItemDefinition(), ...iconRegistries, ...focusRegistries];
46
- const registerBreadcrumbItem = registerFactory(breadcrumbItemRegistries);
110
+ const bannerRegistries = [bannerDefinition(), ...iconRegistries, ...buttonRegistries];
111
+ const registerBanner = registerFactory(bannerRegistries);
47
112
 
48
- export { breadcrumbItemRegistries as a, breadcrumbItemDefinition as b, registerBreadcrumbItem as r };
113
+ export { bannerRegistries as a, bannerDefinition as b, registerBanner as r };