@vonage/vivid 3.39.0 → 3.41.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 (182) hide show
  1. package/accordion/index.js +2 -2
  2. package/accordion-item/index.js +2 -2
  3. package/alert/index.js +7 -5
  4. package/audio-player/index.js +33 -0
  5. package/avatar/index.js +2 -2
  6. package/badge/index.js +2 -2
  7. package/banner/index.js +9 -5
  8. package/breadcrumb/index.js +1 -1
  9. package/breadcrumb-item/index.js +3 -3
  10. package/button/index.js +5 -4
  11. package/calendar/index.js +1 -1
  12. package/calendar-event/index.js +1 -1
  13. package/card/index.js +4 -3
  14. package/checkbox/index.js +3 -3
  15. package/combobox/index.js +9 -7
  16. package/custom-elements.json +809 -5
  17. package/data-grid/index.js +3 -2
  18. package/date-picker/index.js +11 -9
  19. package/date-range-picker/index.js +11 -9
  20. package/dialog/index.js +10 -6
  21. package/divider/index.js +1 -1
  22. package/elevation/index.js +1 -1
  23. package/empty-state/index.js +2 -2
  24. package/fab/index.js +3 -3
  25. package/file-picker/index.js +6 -5
  26. package/focus/index.js +1 -1
  27. package/header/index.js +2 -2
  28. package/icon/index.js +1 -1
  29. package/index.js +60 -55
  30. package/layout/index.js +1 -1
  31. package/lib/alert/alert.d.ts +3 -1
  32. package/lib/alert/locale.d.ts +3 -0
  33. package/lib/audio-player/audio-player.d.ts +17 -0
  34. package/lib/audio-player/audio-player.template.d.ts +4 -0
  35. package/lib/audio-player/definition.d.ts +4 -0
  36. package/lib/audio-player/locale.d.ts +5 -0
  37. package/lib/banner/banner.d.ts +3 -1
  38. package/lib/banner/locale.d.ts +3 -0
  39. package/lib/card/card.d.ts +3 -0
  40. package/lib/card/card.template.d.ts +1 -1
  41. package/lib/card/definition.d.ts +1 -0
  42. package/lib/checkbox/checkbox.d.ts +2 -0
  43. package/lib/components.d.ts +2 -0
  44. package/lib/dialog/dialog.d.ts +4 -0
  45. package/lib/dialog/locale.d.ts +3 -0
  46. package/lib/enums.d.ts +2 -1
  47. package/lib/menu/menu.d.ts +1 -0
  48. package/lib/number-field/locale.d.ts +4 -0
  49. package/lib/number-field/number-field.d.ts +4 -2
  50. package/lib/progress/progress.d.ts +1 -0
  51. package/lib/progress-ring/progress-ring.d.ts +1 -0
  52. package/lib/radio/radio.d.ts +1 -0
  53. package/lib/selectable-box/definition.d.ts +3 -0
  54. package/lib/selectable-box/selectable-box.d.ts +12 -0
  55. package/lib/selectable-box/selectable-box.template.d.ts +4 -0
  56. package/lib/slider/definition.d.ts +1 -0
  57. package/lib/slider/slider.d.ts +5 -0
  58. package/lib/split-button/locale.d.ts +3 -0
  59. package/lib/split-button/split-button.d.ts +3 -1
  60. package/lib/text-area/text-area.d.ts +3 -0
  61. package/lib/text-field/text-field.d.ts +5 -2
  62. package/listbox/index.js +5 -4
  63. package/locales/en-GB.js +21 -0
  64. package/locales/en-US.js +21 -0
  65. package/locales/ja-JP.js +21 -0
  66. package/locales/zh-CN.js +21 -0
  67. package/menu/index.js +9 -8
  68. package/menu-item/index.js +3 -3
  69. package/nav/index.js +1 -1
  70. package/nav-disclosure/index.js +3 -3
  71. package/nav-item/index.js +3 -3
  72. package/note/index.js +2 -2
  73. package/number-field/index.js +8 -6
  74. package/option/index.js +3 -3
  75. package/package.json +1 -1
  76. package/pagination/index.js +6 -5
  77. package/popup/index.js +7 -6
  78. package/progress/index.js +1 -1
  79. package/progress-ring/index.js +1 -1
  80. package/radio/index.js +2 -2
  81. package/radio-group/index.js +2 -2
  82. package/select/index.js +10 -8
  83. package/selectable-box/index.js +23 -0
  84. package/shared/Reflector.js +65 -0
  85. package/shared/date-picker/calendar/segment.d.ts +21 -0
  86. package/shared/date-picker/date-picker-base.d.ts +1 -0
  87. package/shared/definition.js +3 -3
  88. package/shared/definition10.js +89 -227
  89. package/shared/definition11.js +151 -29
  90. package/shared/definition12.js +37 -766
  91. package/shared/definition13.js +747 -106
  92. package/shared/definition14.js +122 -192
  93. package/shared/definition15.js +156 -664
  94. package/shared/definition16.js +576 -1123
  95. package/shared/definition17.js +1278 -143
  96. package/shared/definition18.js +64 -298
  97. package/shared/definition19.js +358 -211
  98. package/shared/definition2.js +2 -2
  99. package/shared/definition20.js +259 -67
  100. package/shared/definition21.js +66 -58
  101. package/shared/definition22.js +43 -84
  102. package/shared/definition23.js +76 -2352
  103. package/shared/definition24.js +2362 -45
  104. package/shared/definition25.js +63 -27
  105. package/shared/definition26.js +24 -51
  106. package/shared/definition27.js +36 -813
  107. package/shared/definition28.js +837 -49
  108. package/shared/definition29.js +52 -89
  109. package/shared/definition3.js +1 -1
  110. package/shared/definition30.js +88 -24
  111. package/shared/definition31.js +25 -12
  112. package/shared/definition32.js +12 -52
  113. package/shared/definition33.js +28 -487
  114. package/shared/definition34.js +442 -197
  115. package/shared/definition35.js +260 -185
  116. package/shared/definition36.js +188 -69
  117. package/shared/definition37.js +72 -52
  118. package/shared/definition38.js +65 -421
  119. package/shared/definition39.js +435 -35
  120. package/shared/definition4.js +44 -16
  121. package/shared/definition40.js +32 -680
  122. package/shared/definition41.js +661 -77
  123. package/shared/definition42.js +103 -555
  124. package/shared/definition43.js +76 -103
  125. package/shared/definition44.js +522 -87
  126. package/shared/definition45.js +133 -22
  127. package/shared/definition46.js +131 -58
  128. package/shared/definition47.js +16 -501
  129. package/shared/definition48.js +69 -23
  130. package/shared/definition49.js +477 -108
  131. package/shared/definition5.js +160 -44
  132. package/shared/definition50.js +25 -271
  133. package/shared/definition51.js +103 -122
  134. package/shared/definition52.js +277 -122
  135. package/shared/definition53.js +274 -103
  136. package/shared/definition54.js +126 -71
  137. package/shared/definition55.js +128 -294
  138. package/shared/definition56.js +91 -13
  139. package/shared/definition57.js +298 -39
  140. package/shared/definition58.js +11 -175
  141. package/shared/definition59.js +47 -0
  142. package/shared/definition6.js +43 -33
  143. package/shared/definition60.js +181 -0
  144. package/shared/definition7.js +39 -105
  145. package/shared/definition8.js +122 -38
  146. package/shared/definition9.js +56 -89
  147. package/shared/enums.js +72 -0
  148. package/shared/icon.js +2 -2
  149. package/shared/index2.js +28 -1
  150. package/shared/key-codes.js +1 -1
  151. package/shared/key-codes2.js +9 -0
  152. package/shared/listbox.js +3 -8
  153. package/shared/localization/Locale.d.ts +12 -0
  154. package/shared/patterns/form-elements/form-elements.d.ts +6 -6
  155. package/shared/presentationDate.js +196 -143
  156. package/shared/radio.js +7 -0
  157. package/shared/text-field.js +1 -1
  158. package/shared/utils/Reflector.d.ts +8 -0
  159. package/shared/utils/randomId.d.ts +1 -0
  160. package/side-drawer/index.js +1 -1
  161. package/slider/index.js +3 -3
  162. package/split-button/index.js +6 -3
  163. package/style.css +889 -722
  164. package/styles/core/all.css +1 -1
  165. package/styles/core/theme.css +1 -1
  166. package/styles/core/typography.css +1 -1
  167. package/styles/tokens/theme-dark.css +4 -4
  168. package/styles/tokens/theme-light.css +4 -4
  169. package/styles/tokens/vivid-2-compat.css +1 -1
  170. package/switch/index.js +3 -3
  171. package/tab/index.js +3 -3
  172. package/tab-panel/index.js +1 -1
  173. package/tabs/index.js +5 -5
  174. package/tag/index.js +3 -3
  175. package/tag-group/index.js +1 -1
  176. package/text-area/index.js +4 -3
  177. package/text-field/index.js +4 -3
  178. package/toggletip/index.js +8 -7
  179. package/tooltip/index.js +8 -7
  180. package/tree-item/index.js +3 -3
  181. package/tree-view/index.js +1 -1
  182. package/vivid.api.json +392 -0
@@ -1,13 +1,16 @@
1
- import { a as attr, h as html, r as registerFactory } from './index.js';
2
- import { a as iconRegistries } from './definition25.js';
3
- import { f as focusRegistries } from './definition56.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';
1
+ import { a as attr, F as FoundationElement, o as observable, h as html, r as registerFactory } from './index.js';
2
+ import { B as Button, a as buttonRegistries } from './definition11.js';
3
+ import { a as iconRegistries } from './definition26.js';
4
+ import { C as Connotation } from './enums.js';
5
+ import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
6
+ import './index2.js';
7
+ import { L as Localized } from './localized.js';
8
+ import { a as applyMixins } from './apply-mixins.js';
9
+ import { s as slotted } from './slotted.js';
7
10
  import { w as when } from './when.js';
8
11
  import { c as classNames } from './class-names.js';
9
12
 
10
- const styles = "/**\n * Do not edit directly\n * Generated on Tue, 17 Oct 2023 15:27:52 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-visible {\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}";
13
+ const styles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 GMT\n */\n:host {\n display: block;\n}\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 /* @cssprop [--vvd-banner-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-banner-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-banner-success-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-success-primary-text, var(--vvd-color-canvas));\n}\n.control.connotation-alert {\n /* @cssprop [--vvd-banner-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-banner-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-banner-alert-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-alert-primary-text, var(--vvd-color-canvas));\n}\n.control.connotation-announcement {\n /* @cssprop [--vvd-banner-announcement-primary=var(--vvd-color-announcement-500)] */\n --_connotation-color-primary: var(--vvd-banner-announcement-primary, var(--vvd-color-announcement-500));\n /* @cssprop [--vvd-banner-announcement-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-announcement-primary-text, var(--vvd-color-canvas));\n}\n.control.connotation-warning {\n /* @cssprop [--vvd-banner-warning-primary=var(--vvd-color-warning-300)] */\n --_connotation-color-primary: var(--vvd-banner-warning-primary, var(--vvd-color-warning-300));\n /* @cssprop [--vvd-banner-warning-primary-text=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary-text: var(--vvd-banner-warning-primary-text, var(--vvd-color-canvas-text));\n}\n.control:not(.connotation-success, .connotation-alert, .connotation-announcement, .connotation-warning) {\n /* @cssprop [--vvd-banner-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-banner-information-primary, var(--vvd-color-information-500));\n /* @cssprop [--vvd-banner-information-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-information-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 slot[name=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
14
 
12
15
  var __defProp = Object.defineProperty;
13
16
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -20,46 +23,127 @@ var __decorateClass = (decorators, target, key, kind) => {
20
23
  __defProp(target, key, result);
21
24
  return result;
22
25
  };
23
- class BreadcrumbItem extends BreadcrumbItem$1 {
26
+ const connotationIconMap = /* @__PURE__ */ new Map([
27
+ [Connotation.Information, "info-solid"],
28
+ [Connotation.Announcement, "megaphone-solid"],
29
+ [Connotation.Success, "check-circle-solid"],
30
+ [Connotation.Warning, "warning-solid"],
31
+ [Connotation.Alert, "error-solid"]
32
+ ]);
33
+ const defaultConnotation = (connotation = Connotation.Information) => connotationIconMap.get(connotation);
34
+ class Banner extends FoundationElement {
24
35
  constructor() {
25
- super();
36
+ super(...arguments);
37
+ this.dismissButtonAriaLabel = null;
38
+ this.role = null;
39
+ this.removable = false;
40
+ this.#handleRemoveEnd = () => {
41
+ this.$emit("removed");
42
+ this.parentElement && this.parentElement.removeChild(this);
43
+ };
44
+ this.#closeOnKeyDown = (e) => {
45
+ if (e.key !== "Escape" || !this.removable) {
46
+ return;
47
+ }
48
+ this.remove();
49
+ };
26
50
  }
51
+ get conditionedIcon() {
52
+ return this.icon ?? defaultConnotation(this.connotation);
53
+ }
54
+ connectedCallback() {
55
+ super.connectedCallback();
56
+ this.addEventListener("keydown", this.#closeOnKeyDown);
57
+ }
58
+ disconnectedCallback() {
59
+ super.disconnectedCallback();
60
+ this.removeEventListener("keydown", this.#closeOnKeyDown);
61
+ }
62
+ remove() {
63
+ this.$emit("removing");
64
+ const banner = this.shadowRoot && this.shadowRoot.querySelector(".control");
65
+ if (banner) {
66
+ banner.classList.add("removing");
67
+ banner.addEventListener("transitionend", this.#handleRemoveEnd);
68
+ }
69
+ }
70
+ #handleRemoveEnd;
71
+ #closeOnKeyDown;
27
72
  }
73
+ __decorateClass([
74
+ attr({ attribute: "dismiss-aria-label" })
75
+ ], Banner.prototype, "dismissButtonAriaLabel", 2);
28
76
  __decorateClass([
29
77
  attr
30
- ], BreadcrumbItem.prototype, "text", 2);
78
+ ], Banner.prototype, "role", 2);
79
+ __decorateClass([
80
+ attr({ attribute: "action-href" })
81
+ ], Banner.prototype, "actionHref", 2);
82
+ __decorateClass([
83
+ attr({ attribute: "action-text" })
84
+ ], Banner.prototype, "actionText", 2);
85
+ __decorateClass([
86
+ attr({ mode: "boolean" })
87
+ ], Banner.prototype, "removable", 2);
88
+ __decorateClass([
89
+ attr({ attribute: "aria-live" })
90
+ ], Banner.prototype, "ariaLive", 2);
91
+ __decorateClass([
92
+ attr()
93
+ ], Banner.prototype, "text", 2);
94
+ __decorateClass([
95
+ attr()
96
+ ], Banner.prototype, "connotation", 2);
97
+ __decorateClass([
98
+ observable
99
+ ], Banner.prototype, "actionItemsSlottedContent", 2);
100
+ applyMixins(Banner, AffixIcon);
101
+ applyMixins(Banner, Localized);
31
102
 
32
- const getClasses = (_) => classNames("base");
33
- const BreadcrumbItemTemplate = (context, definition) => {
34
- const iconTag = context.tagFor(Icon);
103
+ const getClasses = (_) => classNames(
104
+ "control",
105
+ [`connotation-${_.connotation}`, !!_.connotation]
106
+ );
107
+ function renderDismissButton(buttonTag) {
35
108
  return html`
36
- <div role="listitem" class="${getClasses}">
37
- ${when(
38
- (x) => x.text && !x.href,
39
- html`${(x) => x.text}`
40
- )}
41
-
42
- ${when(
43
- (x) => x.text && x.href && x.href.length > 0,
44
- html`${textAnchorTemplate(context)}`
45
- )}
109
+ <${buttonTag}
110
+ aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.banner.dismissButtonLabel}"
111
+ part="vvd-theme-alternate"
112
+ size="condensed"
113
+ class="dismiss-button"
114
+ icon="close-line"
115
+ @click="${(x) => x.remove()}">
116
+ </${buttonTag}>`;
117
+ }
118
+ const BannerTemplate = (context) => {
119
+ const affixIconTemplate = affixIconTemplateFactory(context);
120
+ const buttonTag = context.tagFor(Button);
121
+ return html`
122
+ <div class="${getClasses}"
123
+ tabindex="${(x) => x.removable || x.actionItemsSlottedContent && x.actionItemsSlottedContent.length ? "0" : null}">
124
+ <header class="header">
125
+ <div class="content">
126
+ ${(x) => affixIconTemplate(x.conditionedIcon, IconWrapper.Slot)}
127
+ <div class="banner-message"
128
+ role="${(x) => x.role ? x.role : "status"}"
129
+ aria-live="${(x) => x.ariaLive ? x.ariaLive : "polite"}">
130
+ ${(x) => x.text}
131
+ </div>
132
+ <slot class="action-items" ${slotted("actionItemsSlottedContent")} name="action-items"></slot>
133
+ </div>
46
134
 
47
- ${when(
48
- (x) => x.separator,
49
- html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`
50
- )}
51
- </div>`;
135
+ ${when((x) => x.removable, renderDismissButton(buttonTag))}
136
+ </header>
137
+ </div>
138
+ `;
52
139
  };
53
140
 
54
- const breadcrumbItemDefinition = BreadcrumbItem.compose({
55
- baseName: "breadcrumb-item",
56
- template: BreadcrumbItemTemplate,
57
- styles,
58
- shadowOptions: {
59
- delegatesFocus: true
60
- }
141
+ const bannerDefinition = Banner.compose({
142
+ baseName: "banner",
143
+ template: BannerTemplate,
144
+ styles
61
145
  });
62
- const breadcrumbItemRegistries = [breadcrumbItemDefinition(), ...iconRegistries, ...focusRegistries];
63
- const registerBreadcrumbItem = registerFactory(breadcrumbItemRegistries);
146
+ const bannerRegistries = [bannerDefinition(), ...iconRegistries, ...buttonRegistries];
147
+ const registerBanner = registerFactory(bannerRegistries);
64
148
 
65
- export { breadcrumbItemRegistries as a, breadcrumbItemDefinition as b, registerBreadcrumbItem as r };
149
+ export { bannerRegistries as a, bannerDefinition as b, registerBanner as r };
@@ -1,98 +1,65 @@
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';
1
+ import { a as attr, h as html, r as registerFactory } from './index.js';
2
+ import { a as iconRegistries } from './definition26.js';
3
+ import { f as focusRegistries } from './definition58.js';
3
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';
7
+ import { w as when } from './when.js';
8
+ import { c as classNames } from './class-names.js';
4
9
 
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
- let Breadcrumb$1 = class Breadcrumb 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$1) {
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$1) {
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
- }
10
+ const styles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 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-visible {\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}";
11
+
12
+ var __defProp = Object.defineProperty;
13
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
+ var __decorateClass = (decorators, target, key, kind) => {
15
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
16
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
17
+ if (decorator = decorators[i])
18
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
19
+ if (kind && result)
20
+ __defProp(target, key, result);
21
+ return result;
67
22
  };
68
- __decorate([
69
- observable
70
- ], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
23
+ class BreadcrumbItem extends BreadcrumbItem$1 {
24
+ constructor() {
25
+ super();
26
+ }
27
+ }
28
+ __decorateClass([
29
+ attr
30
+ ], BreadcrumbItem.prototype, "text", 2);
71
31
 
72
- const breadcrumbTemplate = () => html`
73
- <nav aria-label="breadcrumbs" class="base">
74
- <div role="list" class="list">
75
- <slot
76
- ${slotted({
77
- property: "slottedBreadcrumbItems",
78
- filter: elements()
79
- })}
80
- ></slot>
81
- </div>
82
- </nav>
83
- `;
32
+ const getClasses = (_) => classNames("base");
33
+ const BreadcrumbItemTemplate = (context, definition) => {
34
+ const iconTag = context.tagFor(Icon);
35
+ return html`
36
+ <div role="listitem" class="${getClasses}">
37
+ ${when(
38
+ (x) => x.text && !x.href,
39
+ html`${(x) => x.text}`
40
+ )}
84
41
 
85
- const styles = ".list {\n display: flex;\n}";
42
+ ${when(
43
+ (x) => x.text && x.href && x.href.length > 0,
44
+ html`${textAnchorTemplate(context)}`
45
+ )}
86
46
 
87
- class Breadcrumb extends Breadcrumb$1 {
88
- }
47
+ ${when(
48
+ (x) => x.separator,
49
+ html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`
50
+ )}
51
+ </div>`;
52
+ };
89
53
 
90
- const breadcrumbDefinition = Breadcrumb.compose({
91
- baseName: "breadcrumb",
92
- template: breadcrumbTemplate,
93
- styles
54
+ const breadcrumbItemDefinition = BreadcrumbItem.compose({
55
+ baseName: "breadcrumb-item",
56
+ template: BreadcrumbItemTemplate,
57
+ styles,
58
+ shadowOptions: {
59
+ delegatesFocus: true
60
+ }
94
61
  });
95
- const breadcrumbRegistries = [breadcrumbDefinition()];
96
- const registerBreadcrumb = registerFactory(breadcrumbRegistries);
62
+ const breadcrumbItemRegistries = [breadcrumbItemDefinition(), ...iconRegistries, ...focusRegistries];
63
+ const registerBreadcrumbItem = registerFactory(breadcrumbItemRegistries);
97
64
 
98
- export { breadcrumbRegistries as a, breadcrumbDefinition as b, registerBreadcrumb as r };
65
+ export { breadcrumbItemRegistries as a, breadcrumbItemDefinition as b, registerBreadcrumbItem as r };
@@ -0,0 +1,72 @@
1
+ var Connotation = /* @__PURE__ */ ((Connotation2) => {
2
+ Connotation2["Accent"] = "accent";
3
+ Connotation2["CTA"] = "cta";
4
+ Connotation2["Success"] = "success";
5
+ Connotation2["Alert"] = "alert";
6
+ Connotation2["Warning"] = "warning";
7
+ Connotation2["Information"] = "information";
8
+ Connotation2["Announcement"] = "announcement";
9
+ return Connotation2;
10
+ })(Connotation || {});
11
+ var ConnotationDecorative = /* @__PURE__ */ ((ConnotationDecorative2) => {
12
+ ConnotationDecorative2["Pacific"] = "pacific";
13
+ return ConnotationDecorative2;
14
+ })(ConnotationDecorative || {});
15
+ var Shape = /* @__PURE__ */ ((Shape2) => {
16
+ Shape2["Rounded"] = "rounded";
17
+ Shape2["Pill"] = "pill";
18
+ Shape2["Circled"] = "circled";
19
+ Shape2["Sharp"] = "sharp";
20
+ return Shape2;
21
+ })(Shape || {});
22
+ var Appearance = /* @__PURE__ */ ((Appearance2) => {
23
+ Appearance2["Filled"] = "filled";
24
+ Appearance2["Outlined"] = "outlined";
25
+ Appearance2["Duotone"] = "duotone";
26
+ Appearance2["Fieldset"] = "fieldset";
27
+ Appearance2["Subtle"] = "subtle";
28
+ Appearance2["Ghost"] = "ghost";
29
+ Appearance2["Listitem"] = "listitem";
30
+ Appearance2["Elevated"] = "elevated";
31
+ return Appearance2;
32
+ })(Appearance || {});
33
+ var Size = /* @__PURE__ */ ((Size2) => {
34
+ Size2["UltraCondensed"] = "ultra-condensed";
35
+ Size2["SuperCondensed"] = "super-condensed";
36
+ Size2["ExtraCondensed"] = "extra-condensed";
37
+ Size2["SemiCondensed"] = "semi-condensed";
38
+ Size2["Condensed"] = "condensed";
39
+ Size2["Normal"] = "normal";
40
+ Size2["SemiExpanded"] = "semi-expanded";
41
+ Size2["Expanded"] = "expanded";
42
+ Size2["ExtraExpanded"] = "extra-expanded";
43
+ Size2["SuperExpanded"] = "super-expanded";
44
+ Size2["UltraExpanded"] = "ultra-expanded";
45
+ return Size2;
46
+ })(Size || {});
47
+ var LayoutSize = /* @__PURE__ */ ((LayoutSize2) => {
48
+ LayoutSize2["Small"] = "small";
49
+ LayoutSize2["Medium"] = "medium";
50
+ LayoutSize2["Large"] = "large";
51
+ return LayoutSize2;
52
+ })(LayoutSize || {});
53
+ var Position = /* @__PURE__ */ ((Position2) => {
54
+ Position2["Top"] = "TOP";
55
+ Position2["Bottom"] = "BOTTOM";
56
+ Position2["Start"] = "START";
57
+ Position2["Center"] = "CENTER";
58
+ Position2["End"] = "END";
59
+ return Position2;
60
+ })(Position || {});
61
+ var Role = /* @__PURE__ */ ((Role2) => {
62
+ Role2["Status"] = "status";
63
+ Role2["Alert"] = "alert";
64
+ return Role2;
65
+ })(Role || {});
66
+ var AriaLive = /* @__PURE__ */ ((AriaLive2) => {
67
+ AriaLive2["Polite"] = "polite";
68
+ AriaLive2["Assertive"] = "assertive";
69
+ return AriaLive2;
70
+ })(AriaLive || {});
71
+
72
+ export { Appearance as A, Connotation as C, LayoutSize as L, Position as P, Role as R, Shape as S, ConnotationDecorative as a, Size as b, AriaLive as c };
package/shared/icon.js CHANGED
@@ -143,7 +143,7 @@ _curry2(function memoizeWith(mFn, fn) {
143
143
  const memoizeWith$1 = memoizeWith;
144
144
 
145
145
  const ICONS_BASE_URL = "https://icon.resources.vonage.com";
146
- const ICONS_VERSION = "4.4.0";
146
+ const ICONS_VERSION = "4.5.1";
147
147
 
148
148
  const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
149
149
  <g>
@@ -231,4 +231,4 @@ __decorateClass([
231
231
  volatile
232
232
  ], Icon.prototype, "iconUrl", 1);
233
233
 
234
- export { Icon as I };
234
+ export { Icon as I, memoizeWith$1 as m };
package/shared/index2.js CHANGED
@@ -3,7 +3,7 @@ import { a as attr, o as observable, h as html } from './index.js';
3
3
  import { w as when } from './when.js';
4
4
  import enUS from '../locales/en-US.js';
5
5
 
6
- const messageStyles = "/**\n * Do not edit directly\n * Generated on Tue, 17 Oct 2023 15:27:52 GMT\n */\n.message {\n display: flex;\n contain: inline-size;\n font: var(--vvd-typography-base-condensed);\n gap: 4px;\n grid-column: 1/-1;\n}\n.message-text {\n color: var(--vvd-color-canvas-text);\n}\n.helper-message .message-text {\n color: var(--_low-ink-color);\n}\n.message-icon {\n font-size: 16px;\n}\n.success-message .message-icon {\n color: var(--vvd-color-success-500);\n}\n.error-message .message-icon {\n color: var(--vvd-color-alert-500);\n}";
6
+ const messageStyles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 GMT\n */\n.message {\n display: flex;\n contain: inline-size;\n font: var(--vvd-typography-base-condensed);\n gap: 4px;\n grid-column: 1/-1;\n}\n.message-text {\n color: var(--vvd-color-canvas-text);\n}\n.helper-message .message-text {\n color: var(--_low-ink-color);\n}\n.message-icon {\n font-size: 16px;\n}\n.success-message .message-icon {\n color: var(--vvd-color-success-500);\n}\n.error-message .message-icon {\n color: var(--vvd-color-alert-500);\n}";
7
7
 
8
8
  var __defProp$1 = Object.defineProperty;
9
9
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
@@ -38,6 +38,33 @@ __decorateClass$1([
38
38
  })
39
39
  ], FormElementCharCount.prototype, "charCount", 2);
40
40
  function formElements(constructor) {
41
+ let currentPrototype = constructor.prototype;
42
+ while (currentPrototype) {
43
+ const parentPrototype = Object.getPrototypeOf(currentPrototype);
44
+ if (currentPrototype.validate && !parentPrototype.validate) {
45
+ currentPrototype.validate = function(anchor) {
46
+ if (this.proxy instanceof HTMLElement) {
47
+ const isValid = this.proxy.validity.valid;
48
+ const controlIsInvalidDueToMinOrMaxLength = this.control && this.control.validity && !this.control.validity.valid && (this.control.validity.tooShort || this.control.validity.tooLong);
49
+ if (isValid && controlIsInvalidDueToMinOrMaxLength) {
50
+ this.setValidity(
51
+ this.control.validity,
52
+ this.control.validationMessage,
53
+ anchor
54
+ );
55
+ } else {
56
+ this.setValidity(
57
+ this.proxy.validity,
58
+ this.proxy.validationMessage,
59
+ anchor
60
+ );
61
+ }
62
+ }
63
+ };
64
+ break;
65
+ }
66
+ currentPrototype = parentPrototype;
67
+ }
41
68
  class Decorated extends constructor {
42
69
  constructor(...args) {
43
70
  super(...args);
@@ -97,4 +97,4 @@ const ArrowKeys = {
97
97
  ArrowUp: keyArrowUp,
98
98
  };
99
99
 
100
- export { ArrowKeys as A, keySpace as a, keyEnd as b, keyHome as c, keyArrowDown as d, keyArrowUp as e, keyEscape as f, keyTab as g, keyArrowRight as h, keyArrowLeft as i, keyPageDown as j, keyEnter as k, keyPageUp as l, keyFunction2 as m };
100
+ export { ArrowKeys as A, keySpace as a, keyEscape as b, keyTab as c, keyEnd as d, keyArrowUp as e, keyArrowDown as f, keyHome as g, keyArrowRight as h, keyArrowLeft as i, keyPageDown as j, keyEnter as k, keyPageUp as l, keyFunction2 as m };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * String values for use with KeyboardEvent.key
3
+ */
4
+ const keyArrowLeft = "ArrowLeft";
5
+ const keyArrowRight = "ArrowRight";
6
+ const keyEnter = "Enter";
7
+ const keySpace = " ";
8
+
9
+ export { keyArrowRight as a, keyEnter as b, keySpace as c, keyArrowLeft as k };
package/shared/listbox.js CHANGED
@@ -1,8 +1,9 @@
1
+ import { k as keyArrowLeft, a as keyArrowRight } from './key-codes2.js';
1
2
  import { F as FoundationElement, O as Observable, _ as __decorate, a as attr, o as observable, D as DOM, n as nullableNumberConverter } from './index.js';
2
- import { i as isListboxOption } from './definition34.js';
3
+ import { i as isListboxOption } from './definition35.js';
3
4
  import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
4
5
  import { a as applyMixins } from './apply-mixins.js';
5
- import { a as keySpace, f as keyEscape, k as keyEnter, g as keyTab, b as keyEnd, e as keyArrowUp, d as keyArrowDown, c as keyHome } from './key-codes.js';
6
+ import { a as keySpace, b as keyEscape, k as keyEnter, c as keyTab, d as keyEnd, e as keyArrowUp, f as keyArrowDown, g as keyHome } from './key-codes.js';
6
7
  import { u as uniqueId } from './strings.js';
7
8
  import { i as inRange } from './numbers.js';
8
9
 
@@ -989,12 +990,6 @@ __decorate([
989
990
  attr({ converter: nullableNumberConverter })
990
991
  ], ListboxElement.prototype, "size", void 0);
991
992
 
992
- /**
993
- * String values for use with KeyboardEvent.key
994
- */
995
- const keyArrowLeft = "ArrowLeft";
996
- const keyArrowRight = "ArrowRight";
997
-
998
993
  var __defProp = Object.defineProperty;
999
994
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1000
995
  var __decorateClass = (decorators, target, key, kind) => {
@@ -1,6 +1,18 @@
1
1
  import type { DatePickerLocale } from '../date-picker/locale';
2
2
  import type { FilePickerLocale } from '../../lib/file-picker/locale';
3
+ import type { AudioPlayerLocale } from '../../lib/audio-player/locale';
4
+ import type { AlertLocale } from '../../lib/alert/locale';
5
+ import type { DialogLocale } from '../../lib/dialog/locale';
6
+ import type { BannerLocale } from '../../lib/banner/locale';
7
+ import type { NumberFieldLocale } from '../../lib/number-field/locale';
8
+ import type { SplitButtonLocale } from '../../lib/split-button/locale';
3
9
  export interface Locale {
4
10
  datePicker: DatePickerLocale;
5
11
  filePicker: FilePickerLocale;
12
+ audioPlayer: AudioPlayerLocale;
13
+ alert: AlertLocale;
14
+ dialog: DialogLocale;
15
+ banner: BannerLocale;
16
+ numberField: NumberFieldLocale;
17
+ splitButton: SplitButtonLocale;
6
18
  }
@@ -33,10 +33,10 @@ export declare function formElements<T extends {
33
33
  [x: string]: any;
34
34
  label?: string | undefined;
35
35
  errorValidationMessage: string;
36
- "__#2@#forceErrorDisplay": boolean;
37
- "__#2@#hasBeenTouched": boolean;
36
+ "__#1@#forceErrorDisplay": boolean;
37
+ "__#1@#hasBeenTouched": boolean;
38
38
  connectedCallback(): void;
39
- "__#2@#handleInvalidEvent": () => void;
39
+ "__#1@#handleInvalidEvent": () => void;
40
40
  disconnectedCallback(): void;
41
41
  formResetCallback(): void;
42
42
  validate: () => void;
@@ -50,10 +50,10 @@ export declare function errorText<T extends {
50
50
  new (...args: any[]): {
51
51
  [x: string]: any;
52
52
  errorText?: string | undefined;
53
- "__#3@#blockValidateCalls": boolean;
53
+ "__#2@#blockValidateCalls": boolean;
54
54
  errorTextChanged(_: string, newErrorText: string | undefined): void;
55
- "__#3@#forceCustomError"(errorMessage: string): void;
56
- "__#3@#clearCustomErrorAndRevalidate"(): void;
55
+ "__#2@#forceCustomError"(errorMessage: string): void;
56
+ "__#2@#clearCustomErrorAndRevalidate"(): void;
57
57
  };
58
58
  } & T;
59
59
  export {};