@vonage/vivid 3.32.0 → 3.34.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 (218) hide show
  1. package/accordion/index.js +5 -5
  2. package/accordion-item/index.js +4 -4
  3. package/action-group/index.js +1 -1
  4. package/alert/index.js +6 -6
  5. package/avatar/index.js +2 -2
  6. package/badge/index.js +2 -2
  7. package/banner/index.js +5 -5
  8. package/breadcrumb/index.js +1 -1
  9. package/breadcrumb-item/index.js +3 -3
  10. package/button/index.js +4 -4
  11. package/calendar/index.js +1 -1
  12. package/calendar-event/index.js +1 -1
  13. package/card/index.js +3 -3
  14. package/checkbox/index.js +5 -3
  15. package/combobox/index.js +8 -8
  16. package/custom-elements.json +246 -16
  17. package/data-grid/index.js +2 -2
  18. package/date-picker/index.js +9 -9
  19. package/dialog/index.js +6 -6
  20. package/divider/index.js +1 -1
  21. package/elevation/index.js +1 -1
  22. package/empty-state/index.js +2 -2
  23. package/fab/index.js +4 -4
  24. package/file-picker/index.js +5 -5
  25. package/focus/index.js +1 -1
  26. package/header/index.js +2 -2
  27. package/icon/index.js +1 -1
  28. package/index.js +59 -59
  29. package/layout/index.js +1 -1
  30. package/lib/calendar/calendar.d.ts +1 -1
  31. package/lib/date-picker/calendar/dateStr.d.ts +1 -0
  32. package/lib/date-picker/calendar/month.d.ts +1 -0
  33. package/lib/date-picker/calendar/year.d.ts +2 -0
  34. package/lib/date-picker/date-picker.d.ts +2 -0
  35. package/lib/icon/icon.d.ts +0 -1
  36. package/lib/listbox/listbox.d.ts +9 -1
  37. package/lib/text-field/text-field.d.ts +1 -0
  38. package/listbox/index.js +20 -16
  39. package/locales/en-GB.js +48 -14
  40. package/locales/en-US.js +48 -14
  41. package/locales/ja-JP.js +48 -14
  42. package/locales/zh-CN.js +48 -14
  43. package/menu/index.js +8 -8
  44. package/menu-item/index.js +4 -4
  45. package/nav/index.js +1 -1
  46. package/nav-disclosure/index.js +3 -3
  47. package/nav-item/index.js +3 -3
  48. package/note/index.js +2 -3
  49. package/number-field/index.js +6 -6
  50. package/option/index.js +3 -3
  51. package/package.json +2 -16
  52. package/pagination/index.js +5 -5
  53. package/popup/index.js +6 -6
  54. package/progress/index.js +1 -1
  55. package/progress-ring/index.js +1 -1
  56. package/radio/index.js +2 -2
  57. package/radio-group/index.js +1 -1
  58. package/select/index.js +8 -8
  59. package/shared/affix.js +25 -9
  60. package/shared/apply-mixins.js +1 -1
  61. package/shared/breadcrumb-item.js +5 -5
  62. package/shared/button.js +13 -13
  63. package/shared/calendar-event.js +36 -16
  64. package/shared/definition.js +133 -194
  65. package/shared/definition10.js +225 -40
  66. package/shared/definition11.js +36 -32
  67. package/shared/definition12.js +763 -98
  68. package/shared/definition13.js +125 -89
  69. package/shared/definition14.js +207 -27
  70. package/shared/definition15.js +710 -731
  71. package/shared/definition16.js +1289 -47
  72. package/shared/definition17.js +6113 -93
  73. package/shared/definition18.js +242 -164
  74. package/shared/definition19.js +47 -692
  75. package/shared/definition2.js +199 -117
  76. package/shared/definition20.js +59 -1671
  77. package/shared/definition21.js +95 -255
  78. package/shared/definition22.js +2218 -1167
  79. package/shared/definition23.js +61 -5784
  80. package/shared/definition24.js +28 -117
  81. package/shared/definition25.js +52 -66
  82. package/shared/definition26.js +391 -214
  83. package/shared/definition27.js +441 -34
  84. package/shared/definition28.js +85 -73
  85. package/shared/definition29.js +21 -2283
  86. package/shared/definition3.js +61 -24
  87. package/shared/definition30.js +13 -49
  88. package/shared/definition31.js +54 -39
  89. package/shared/definition32.js +413 -375
  90. package/shared/definition33.js +223 -304
  91. package/shared/definition34.js +197 -13
  92. package/shared/definition35.js +88 -73
  93. package/shared/definition36.js +75 -25
  94. package/shared/definition37.js +434 -34
  95. package/shared/definition38.js +32 -432
  96. package/shared/definition39.js +677 -187
  97. package/shared/definition4.js +157 -12
  98. package/shared/definition40.js +95 -48
  99. package/shared/definition41.js +577 -31
  100. package/shared/definition42.js +126 -424
  101. package/shared/definition43.js +114 -618
  102. package/shared/definition44.js +24 -80
  103. package/shared/definition45.js +71 -543
  104. package/shared/definition46.js +499 -92
  105. package/shared/definition47.js +19 -133
  106. package/shared/definition48.js +129 -52
  107. package/shared/definition49.js +281 -17
  108. package/shared/definition5.js +71 -36
  109. package/shared/definition50.js +153 -484
  110. package/shared/definition51.js +131 -98
  111. package/shared/definition52.js +131 -16
  112. package/shared/definition53.js +80 -264
  113. package/shared/definition54.js +293 -118
  114. package/shared/definition55.js +12 -117
  115. package/shared/definition56.js +39 -68
  116. package/shared/definition57.js +166 -288
  117. package/shared/definition6.js +56 -111
  118. package/shared/definition7.js +120 -195
  119. package/shared/definition8.js +58 -23
  120. package/shared/definition9.js +92 -66
  121. package/shared/focus.js +2 -1
  122. package/shared/focus2.js +1 -1
  123. package/shared/form-associated.js +2 -2
  124. package/shared/icon.js +48 -27
  125. package/shared/index.js +7 -27
  126. package/shared/index2.js +108 -80
  127. package/shared/key-codes.js +1 -1
  128. package/shared/listbox.js +88 -11
  129. package/shared/patterns/form-elements/form-elements.d.ts +4 -4
  130. package/shared/radio.js +23 -7
  131. package/shared/repeat.js +1 -1
  132. package/shared/text-anchor.js +21 -4
  133. package/shared/text-anchor.template.js +37 -40
  134. package/shared/text-field.js +2 -2
  135. package/shared/text-field2.js +15 -15
  136. package/shared/tree-item.js +12 -12
  137. package/side-drawer/index.js +1 -1
  138. package/slider/index.js +2 -2
  139. package/split-button/index.js +3 -3
  140. package/style.css +6097 -0
  141. package/styles/core/all.css +1 -1
  142. package/styles/core/theme.css +1 -1
  143. package/styles/core/typography.css +1 -1
  144. package/styles/tokens/theme-dark.css +4 -4
  145. package/styles/tokens/theme-light.css +4 -4
  146. package/styles/tokens/vivid-2-compat.css +1 -1
  147. package/switch/index.js +3 -3
  148. package/tab/index.js +3 -3
  149. package/tab-panel/index.js +1 -1
  150. package/tabs/index.js +5 -5
  151. package/tag/index.js +3 -3
  152. package/tag-group/index.js +1 -1
  153. package/text-anchor/index.js +1 -1
  154. package/text-area/index.js +3 -3
  155. package/text-field/index.js +3 -3
  156. package/toggletip/index.js +7 -7
  157. package/tooltip/index.js +7 -7
  158. package/tree-item/index.js +3 -3
  159. package/tree-view/index.js +1 -1
  160. package/lib/accordion/index.d.ts +0 -1
  161. package/lib/accordion-item/index.d.ts +0 -1
  162. package/lib/action-group/index.d.ts +0 -1
  163. package/lib/alert/index.d.ts +0 -1
  164. package/lib/avatar/index.d.ts +0 -1
  165. package/lib/badge/index.d.ts +0 -1
  166. package/lib/banner/index.d.ts +0 -1
  167. package/lib/breadcrumb/index.d.ts +0 -1
  168. package/lib/breadcrumb-item/index.d.ts +0 -1
  169. package/lib/button/index.d.ts +0 -1
  170. package/lib/calendar/index.d.ts +0 -1
  171. package/lib/calendar-event/index.d.ts +0 -1
  172. package/lib/card/index.d.ts +0 -1
  173. package/lib/checkbox/index.d.ts +0 -1
  174. package/lib/combobox/index.d.ts +0 -1
  175. package/lib/data-grid/index.d.ts +0 -1
  176. package/lib/date-picker/index.d.ts +0 -1
  177. package/lib/dialog/index.d.ts +0 -1
  178. package/lib/divider/index.d.ts +0 -1
  179. package/lib/elevation/index.d.ts +0 -1
  180. package/lib/empty-state/index.d.ts +0 -1
  181. package/lib/fab/index.d.ts +0 -1
  182. package/lib/file-picker/index.d.ts +0 -1
  183. package/lib/focus/index.d.ts +0 -1
  184. package/lib/header/index.d.ts +0 -1
  185. package/lib/icon/index.d.ts +0 -1
  186. package/lib/layout/index.d.ts +0 -1
  187. package/lib/listbox/index.d.ts +0 -1
  188. package/lib/menu/index.d.ts +0 -1
  189. package/lib/menu-item/index.d.ts +0 -1
  190. package/lib/nav/index.d.ts +0 -1
  191. package/lib/nav-disclosure/index.d.ts +0 -1
  192. package/lib/nav-item/index.d.ts +0 -1
  193. package/lib/note/index.d.ts +0 -1
  194. package/lib/number-field/index.d.ts +0 -1
  195. package/lib/option/index.d.ts +0 -1
  196. package/lib/pagination/index.d.ts +0 -1
  197. package/lib/popup/index.d.ts +0 -1
  198. package/lib/progress/index.d.ts +0 -1
  199. package/lib/progress-ring/index.d.ts +0 -1
  200. package/lib/radio/index.d.ts +0 -1
  201. package/lib/radio-group/index.d.ts +0 -1
  202. package/lib/select/index.d.ts +0 -1
  203. package/lib/side-drawer/index.d.ts +0 -1
  204. package/lib/slider/index.d.ts +0 -1
  205. package/lib/split-button/index.d.ts +0 -1
  206. package/lib/switch/index.d.ts +0 -1
  207. package/lib/tab/index.d.ts +0 -1
  208. package/lib/tab-panel/index.d.ts +0 -1
  209. package/lib/tabs/index.d.ts +0 -1
  210. package/lib/tag/index.d.ts +0 -1
  211. package/lib/tag-group/index.d.ts +0 -1
  212. package/lib/text-anchor/index.d.ts +0 -1
  213. package/lib/text-area/index.d.ts +0 -1
  214. package/lib/text-field/index.d.ts +0 -1
  215. package/lib/toggletip/index.d.ts +0 -1
  216. package/lib/tooltip/index.d.ts +0 -1
  217. package/lib/tree-item/index.d.ts +0 -1
  218. package/lib/tree-view/index.d.ts +0 -1
@@ -1,30 +1,65 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
1
+ import { a as attr, h as html, r as registerFactory } from './index.js';
2
+ import { a as iconRegistries } from './definition24.js';
3
+ import { f as focusRegistries } from './definition55.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';
7
+ import { w as when } from './when.js';
2
8
  import { c as classNames } from './class-names.js';
3
9
 
4
- class Elevation extends FoundationElement {}
5
- __decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
6
- __decorate([attr({
7
- attribute: 'no-shadow',
8
- mode: 'boolean'
9
- }), __metadata("design:type", Boolean)], Elevation.prototype, "noShadow", void 0);
10
+ const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 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}";
10
11
 
11
- 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 position: relative;\n isolation: isolate;\n}\n.control ::slotted(*)::before {\n position: absolute;\n z-index: -1;\n background: var(--_elevation-fill);\n block-size: 100%;\n border-radius: inherit;\n content: \"\";\n filter: var(--_elevation-shadow);\n inline-size: 100%;\n inset-block-start: 0;\n inset-inline-start: 0;\n transition: background-color 0.15s linear, filter 0.15s linear;\n}\n.control.no-shadow ::slotted(*)::before {\n filter: none;\n}";
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;
22
+ };
23
+ class BreadcrumbItem extends BreadcrumbItem$1 {
24
+ constructor() {
25
+ super();
26
+ }
27
+ }
28
+ __decorateClass([
29
+ attr
30
+ ], BreadcrumbItem.prototype, "text", 2);
12
31
 
13
- const getClasses = ({
14
- dp,
15
- noShadow
16
- }) => classNames('control', [`dp-${dp}`, Boolean(dp)], ['no-shadow', Boolean(noShadow)]);
17
- const elevationTemplate = () => html`
18
- <div class="${getClasses}" part="base">
19
- <slot></slot>
20
- </div>`;
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
+ )}
21
41
 
22
- const elevationDefinition = Elevation.compose({
23
- baseName: 'elevation',
24
- template: elevationTemplate,
25
- styles: css_248z
42
+ ${when(
43
+ (x) => x.text && x.href && x.href.length > 0,
44
+ html`${textAnchorTemplate(context)}`
45
+ )}
46
+
47
+ ${when(
48
+ (x) => x.separator,
49
+ html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`
50
+ )}
51
+ </div>`;
52
+ };
53
+
54
+ const breadcrumbItemDefinition = BreadcrumbItem.compose({
55
+ baseName: "breadcrumb-item",
56
+ template: BreadcrumbItemTemplate,
57
+ styles,
58
+ shadowOptions: {
59
+ delegatesFocus: true
60
+ }
26
61
  });
27
- const elevationRegistries = [elevationDefinition()];
28
- const registerElevation = registerFactory(elevationRegistries);
62
+ const breadcrumbItemRegistries = [breadcrumbItemDefinition(), ...iconRegistries, ...focusRegistries];
63
+ const registerBreadcrumbItem = registerFactory(breadcrumbItemRegistries);
29
64
 
30
- export { Elevation as E, elevationRegistries as e, registerElevation as r };
65
+ export { breadcrumbItemRegistries as a, breadcrumbItemDefinition as b, registerBreadcrumbItem as r };
@@ -1,73 +1,99 @@
1
- import { _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
2
- import { B as BaseProgress } from './base-progress.js';
3
- import { w as when } from './when.js';
4
- import { c as classNames } from './class-names.js';
1
+ import { F as FoundationElement, _ as __decorate, o as observable, h as html, r as registerFactory } from './index.js';
2
+ import { e as elements } from './node-observation.js';
3
+ import { s as slotted } from './slotted.js';
4
+ import { B as BreadcrumbItem$1 } from './breadcrumb-item.js';
5
5
 
6
- var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 22 Aug 2023 13:37:39 GMT\n */\n.base {\n align-items: center;\n block-size: var(--_size);\n color: var(--_appearance-color-text);\n inline-size: var(--_size);\n outline: none;\n}\n.base.connotation-cta {\n /* @cssprop [--vvd-progress-ring-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-progress-ring-cta-primary, var(--vvd-color-cta-500));\n}\n.base.connotation-alert {\n /* @cssprop [--vvd-progress-ring-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-progress-ring-alert-primary, var(--vvd-color-alert-500));\n}\n.base.connotation-success {\n /* @cssprop [--vvd-progress-ring-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-progress-ring-success-primary, var(--vvd-color-success-500));\n}\n.base:not(.connotation-cta, .connotation-alert, .connotation-success) {\n /* @cssprop [--vvd-progress-ring-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-progress-ring-accent-primary, var(--vvd-color-canvas-text));\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base.size--6 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.base.size--5 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n}\n.base.size--4 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.base.size--3 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.base.size--2 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.base.size--1 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 4));\n}\n.base.size-1 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 4));\n}\n.base.size-2 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n}\n.base.size-3 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 12));\n}\n.base.size-4 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.base.size-5 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n}\n.base:not(.size--6, .size--5, .size--4, .size--3, .size--2, .size--1, .size-1, .size-2, .size-3, .size-4, .size-5) {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n\n.progress {\n width: 100%;\n height: 100%;\n}\n\n.background {\n fill: none;\n stroke: transparent;\n stroke-width: 1px;\n}\n\n.determinate {\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-width: 1px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.indeterminate-indicator-1 {\n animation: spin-infinite 2s linear infinite;\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-width: 1px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.base.paused .indeterminate-indicator-1 {\n animation-play-state: paused;\n}\n\n@keyframes spin-infinite {\n 0% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(0deg);\n }\n 50% {\n stroke-dasharray: 21.99px 21.99px;\n transform: rotate(450deg);\n }\n 100% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(1080deg);\n }\n}";
6
+ /**
7
+ * A Breadcrumb Custom HTML Element.
8
+ * @slot - The default slot for the breadcrumb items
9
+ * @csspart list - The element wrapping the slotted items
10
+ *
11
+ * @public
12
+ */
13
+ let Breadcrumb$1 = class Breadcrumb extends FoundationElement {
14
+ slottedBreadcrumbItemsChanged() {
15
+ if (this.$fastController.isConnected) {
16
+ if (this.slottedBreadcrumbItems === undefined ||
17
+ this.slottedBreadcrumbItems.length === 0) {
18
+ return;
19
+ }
20
+ const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
21
+ this.slottedBreadcrumbItems.forEach((item) => {
22
+ const itemIsLastNode = item === lastNode;
23
+ this.setItemSeparator(item, itemIsLastNode);
24
+ this.setAriaCurrent(item, itemIsLastNode);
25
+ });
26
+ }
27
+ }
28
+ setItemSeparator(item, isLastNode) {
29
+ if (item instanceof BreadcrumbItem$1) {
30
+ item.separator = !isLastNode;
31
+ }
32
+ }
33
+ /**
34
+ * Finds href on childnodes in the light DOM or shadow DOM.
35
+ * We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
36
+ */
37
+ findChildWithHref(node) {
38
+ var _a, _b;
39
+ if (node.childElementCount > 0) {
40
+ return node.querySelector("a[href]");
41
+ }
42
+ else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
43
+ return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
44
+ }
45
+ else
46
+ return null;
47
+ }
48
+ /**
49
+ * Sets ARIA Current for the current node
50
+ * If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
51
+ * otherwise apply aria-current to the host element, with an href
52
+ */
53
+ setAriaCurrent(item, isLastNode) {
54
+ const childNodeWithHref = this.findChildWithHref(item);
55
+ if (childNodeWithHref === null &&
56
+ item.hasAttribute("href") &&
57
+ item instanceof BreadcrumbItem$1) {
58
+ isLastNode
59
+ ? item.setAttribute("aria-current", "page")
60
+ : item.removeAttribute("aria-current");
61
+ }
62
+ else if (childNodeWithHref !== null) {
63
+ isLastNode
64
+ ? childNodeWithHref.setAttribute("aria-current", "page")
65
+ : childNodeWithHref.removeAttribute("aria-current");
66
+ }
67
+ }
68
+ };
69
+ __decorate([
70
+ observable
71
+ ], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
7
72
 
8
- class ProgressRing extends BaseProgress {}
9
- __decorate([attr, __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
10
- __decorate([attr, __metadata("design:type", Number)], ProgressRing.prototype, "size", void 0);
11
-
12
- const getClasses = ({
13
- connotation,
14
- size,
15
- paused
16
- }) => classNames('base', ['disabled', !!paused], [`connotation-${connotation}`, !!connotation], [`size-${size}`, !!size]);
17
- const progressSegments = 44;
18
- const ProgressRingTemplate = _ => html`
19
- <div
20
- role="progressbar"
21
- aria-valuenow="${x => x.value}"
22
- aria-valuemin="${x => x.min}"
23
- aria-valuemax="${x => x.max}"
24
- class="${x => x.paused ? 'paused' : ''} ${getClasses}"
25
- >
26
- ${when(x => typeof x.value === 'number', html`
27
- <svg
28
- class="progress"
29
- viewBox="0 0 16 16"
30
- >
31
- <circle
32
- class="background"
33
- cx="8px"
34
- cy="8px"
35
- r="7px"
36
- ></circle>
37
- <circle
38
- class="determinate"
39
- style="stroke-dasharray: ${x => progressSegments * x.percentComplete / 100}px ${progressSegments}px"
40
- cx="8px"
41
- cy="8px"
42
- r="7px"
43
- ></circle>
44
- </svg>
45
- `)}
46
- ${when(x => typeof x.value !== 'number', html`
47
- <svg class="progress" viewBox="0 0 16 16">
48
- <circle
49
- class="background"
50
- cx="8px"
51
- cy="8px"
52
- r="7px"
53
- ></circle>
54
- <circle
55
- class="indeterminate-indicator-1"
56
- cx="8px"
57
- cy="8px"
58
- r="7px"
59
- ></circle>
60
- </svg>
61
- `)}
73
+ const breadcrumbTemplate = () => html`
74
+ <nav aria-label="breadcrumbs" class="base">
75
+ <div role="list" class="list">
76
+ <slot
77
+ ${slotted({
78
+ property: "slottedBreadcrumbItems",
79
+ filter: elements()
80
+ })}
81
+ ></slot>
62
82
  </div>
83
+ </nav>
63
84
  `;
64
85
 
65
- const progressRingDefinition = ProgressRing.compose({
66
- baseName: 'progress-ring',
67
- template: ProgressRingTemplate,
68
- styles: css_248z
86
+ const styles = ".list {\n display: flex;\n}";
87
+
88
+ class Breadcrumb extends Breadcrumb$1 {
89
+ }
90
+
91
+ const breadcrumbDefinition = Breadcrumb.compose({
92
+ baseName: "breadcrumb",
93
+ template: breadcrumbTemplate,
94
+ styles
69
95
  });
70
- const progressRingRegistries = [progressRingDefinition()];
71
- const registerProgressRing = registerFactory(progressRingRegistries);
96
+ const breadcrumbRegistries = [breadcrumbDefinition()];
97
+ const registerBreadcrumb = registerFactory(breadcrumbRegistries);
72
98
 
73
- export { ProgressRing as P, progressRingDefinition as a, progressRingRegistries as p, registerProgressRing as r };
99
+ export { breadcrumbRegistries as a, breadcrumbDefinition as b, registerBreadcrumb as r };
package/shared/focus.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { F as FoundationElement } from './index.js';
2
2
 
3
- class Focus extends FoundationElement {}
3
+ class Focus extends FoundationElement {
4
+ }
4
5
 
5
6
  export { Focus as F };
package/shared/focus2.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { F as Focus } from './focus.js';
2
2
  import { h as html } from './index.js';
3
3
 
4
- const focusTemplateFactory = context => {
4
+ const focusTemplateFactory = (context) => {
5
5
  const focusTag = context.tagFor(Focus);
6
6
  return html`<${focusTag} class="focus-indicator"></${focusTag}>`;
7
7
  };
@@ -1,5 +1,5 @@
1
- import { a as attr, o as observable, g as booleanConverter, e as emptyArray, D as DOM } from './index.js';
2
- import { d as keyEnter } from './key-codes.js';
1
+ import { a as attr, o as observable, e as emptyArray, D as DOM, c as booleanConverter } from './index.js';
2
+ import { k as keyEnter } from './key-codes.js';
3
3
 
4
4
  const proxySlotName = "form-associated-proxy";
5
5
  const ElementInternalsKey = "ElementInternals";
package/shared/icon.js CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable, v as volatile } from './index.js';
2
1
  import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
2
+ import { F as FoundationElement, a as attr, o as observable, v as volatile } from './index.js';
3
3
 
4
4
  function _arity(n, fn) {
5
5
  /* eslint-disable no-unused-vars */
@@ -92,7 +92,7 @@ var identity =
92
92
  /*#__PURE__*/
93
93
  _curry1(_identity);
94
94
 
95
- var identity$1 = identity;
95
+ const identity$1 = identity;
96
96
 
97
97
  /**
98
98
  * Creates a new function that, when invoked, caches the result of calling `fn`
@@ -140,7 +140,10 @@ _curry2(function memoizeWith(mFn, fn) {
140
140
  });
141
141
  });
142
142
 
143
- var memoizeWith$1 = memoizeWith;
143
+ const memoizeWith$1 = memoizeWith;
144
+
145
+ const ICONS_BASE_URL = "https://icon.resources.vonage.com";
146
+ const ICONS_VERSION = "4.3.0";
144
147
 
145
148
  const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
146
149
  <g>
@@ -155,59 +158,77 @@ const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
155
158
  </g>
156
159
  </svg>`;
157
160
 
158
- const BASE_URL = 'https://icon.resources.vonage.com';
159
- const ICON_SET_VERSION = '4.2.3';
161
+ var __defProp = Object.defineProperty;
162
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
163
+ var __decorateClass = (decorators, target, key, kind) => {
164
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
165
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
166
+ if (decorator = decorators[i])
167
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
168
+ if (kind && result)
169
+ __defProp(target, key, result);
170
+ return result;
171
+ };
160
172
  const PLACEHOLDER_DELAY = 500;
161
- const PLACEHOLDER_TIMEOUT = 2000;
162
- const baseUrlTemplate = (resource, version) => [BASE_URL, `v${version}`, resource].join('/');
163
- const assertIsValidResponse = ({
164
- ok,
165
- headers
166
- }) => {
167
- if (!ok || headers.get('content-type') !== 'image/svg+xml') {
168
- throw new Error('Something went wrong');
173
+ const PLACEHOLDER_TIMEOUT = 2e3;
174
+ const baseUrlTemplate = (resource, version) => [ICONS_BASE_URL, `v${version}`, resource].join("/");
175
+ const assertIsValidResponse = ({ ok, headers }) => {
176
+ if (!ok || headers.get("content-type") !== "image/svg+xml") {
177
+ throw new Error("Something went wrong");
169
178
  }
170
179
  };
171
- const extractSvg = response => {
180
+ const extractSvg = (response) => {
172
181
  assertIsValidResponse(response);
173
182
  return response.text();
174
183
  };
175
- const loadSvg = iconId => fetch(baseUrlTemplate([iconId, 'svg'].join('.'), ICON_SET_VERSION)).then(extractSvg);
176
- const resolveIcon = memoizeWith$1(identity$1, (iconId = '') => iconId.trim() ? loadSvg(iconId) : Promise.resolve(''));
184
+ const loadSvg = (iconId) => fetch(baseUrlTemplate([iconId, "svg"].join("."), ICONS_VERSION)).then(extractSvg);
185
+ const resolveIcon = memoizeWith$1(identity$1, (iconId = "") => iconId.trim() ? loadSvg(iconId) : Promise.resolve(""));
177
186
  class Icon extends FoundationElement {
178
187
  constructor() {
179
188
  super(...arguments);
180
189
  this.iconLoaded = false;
181
190
  }
182
191
  get iconUrl() {
183
- return !this.name ? this._svg : baseUrlTemplate(`${this.name}.svg`, ICON_SET_VERSION);
192
+ return !this.name ? this._svg : baseUrlTemplate(`${this.name}.svg`, ICONS_VERSION);
184
193
  }
185
194
  async nameChanged() {
186
- this._svg = undefined;
195
+ this._svg = void 0;
187
196
  this.iconLoaded = false;
188
197
  let timeout = setTimeout(() => {
189
198
  this._svg = PLACEHOLDER_ICON;
190
199
  timeout = setTimeout(() => {
191
200
  if (this._svg === PLACEHOLDER_ICON) {
192
- this._svg = undefined;
201
+ this._svg = void 0;
193
202
  }
194
203
  }, PLACEHOLDER_TIMEOUT);
195
204
  }, PLACEHOLDER_DELAY);
196
- await resolveIcon(this.name).then(svg => {
205
+ await resolveIcon(this.name).then((svg) => {
197
206
  this._svg = svg;
198
207
  }).catch(() => {
199
- this._svg = undefined;
208
+ this._svg = void 0;
200
209
  }).finally(() => {
201
210
  clearTimeout(timeout);
202
211
  this.iconLoaded = true;
203
212
  });
204
213
  }
205
214
  }
206
- __decorate([attr, __metadata("design:type", String)], Icon.prototype, "connotation", void 0);
207
- __decorate([attr, __metadata("design:type", Number)], Icon.prototype, "size", void 0);
208
- __decorate([observable, __metadata("design:type", String)], Icon.prototype, "_svg", void 0);
209
- __decorate([observable, __metadata("design:type", Object)], Icon.prototype, "iconLoaded", void 0);
210
- __decorate([attr, __metadata("design:type", String)], Icon.prototype, "name", void 0);
211
- __decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], Icon.prototype, "iconUrl", null);
215
+ __decorateClass([
216
+ attr
217
+ ], Icon.prototype, "connotation", 2);
218
+ __decorateClass([
219
+ attr
220
+ ], Icon.prototype, "size", 2);
221
+ __decorateClass([
222
+ observable
223
+ ], Icon.prototype, "_svg", 2);
224
+ __decorateClass([
225
+ observable
226
+ ], Icon.prototype, "iconLoaded", 2);
227
+ __decorateClass([
228
+ attr
229
+ ], Icon.prototype, "name", 2);
230
+ __decorateClass([
231
+ volatile
232
+ ], Icon.prototype, "iconUrl", 1);
212
233
 
213
234
  export { Icon as I };
package/shared/index.js CHANGED
@@ -2533,7 +2533,7 @@ class CSSDirective {
2533
2533
  }
2534
2534
  }
2535
2535
 
2536
- /******************************************************************************
2536
+ /*! *****************************************************************************
2537
2537
  Copyright (c) Microsoft Corporation.
2538
2538
 
2539
2539
  Permission to use, copy, modify, and/or distribute this software for any
@@ -2547,35 +2547,15 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2547
2547
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2548
2548
  PERFORMANCE OF THIS SOFTWARE.
2549
2549
  ***************************************************************************** */
2550
+ /* global Reflect, Promise */
2551
+
2550
2552
 
2551
2553
  function __decorate(decorators, target, key, desc) {
2552
2554
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2553
2555
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2554
2556
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2555
2557
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2556
- }
2557
-
2558
- function __metadata(metadataKey, metadataValue) {
2559
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
2560
- }
2561
-
2562
- function __classPrivateFieldGet(receiver, state, kind, f) {
2563
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2564
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2565
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2566
- }
2567
-
2568
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
2569
- if (kind === "m") throw new TypeError("Private method is not writable");
2570
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2571
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2572
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
2573
- }
2574
-
2575
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2576
- var e = new Error(message);
2577
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2578
- };
2558
+ }
2579
2559
 
2580
2560
  /**
2581
2561
  * Big thanks to https://github.com/fkleuver and the https://github.com/aurelia/aurelia project
@@ -5055,8 +5035,8 @@ class ElementDefinitionEntry {
5055
5035
  }
5056
5036
  /* eslint-enable @typescript-eslint/no-non-null-assertion */
5057
5037
 
5058
- const defaultPrefix = 'vwc';
5038
+ const defaultPrefix = "vwc";
5059
5039
  const designSystem = DesignSystem.getOrCreate();
5060
- const registerFactory = registries => (prefix = defaultPrefix) => designSystem.withPrefix(prefix).register(...registries);
5040
+ const registerFactory = (registries) => (prefix = defaultPrefix) => designSystem.withPrefix(prefix).register(...registries);
5061
5041
 
5062
- export { AttachedBehaviorHTMLDirective as A, DOM as D, FoundationElement as F, HTMLDirective as H, Observable as O, SubscriberSet as S, __decorate as _, attr as a, __metadata as b, AttributeConfiguration as c, __classPrivateFieldGet as d, emptyArray as e, __classPrivateFieldSet as f, booleanConverter as g, html as h, HTMLView as i, designSystem as j, nullableNumberConverter as n, observable as o, registerFactory as r, volatile as v };
5042
+ export { AttachedBehaviorHTMLDirective as A, DOM as D, FoundationElement as F, HTMLDirective as H, Observable as O, SubscriberSet as S, __decorate as _, attr as a, AttributeConfiguration as b, booleanConverter as c, designSystem as d, emptyArray as e, HTMLView as f, html as h, nullableNumberConverter as n, observable as o, registerFactory as r, volatile as v };