@vonage/vivid 4.21.1 → 4.23.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 (231) hide show
  1. package/custom-elements.json +2055 -640
  2. package/index.cjs +1 -1
  3. package/index.js +2 -2
  4. package/lib/accordion-item/accordion-item.d.ts +11 -5
  5. package/lib/action-group/action-group.d.ts +8 -6
  6. package/lib/alert/alert.d.ts +21 -9
  7. package/lib/audio-player/audio-player.d.ts +13 -6
  8. package/lib/badge/badge.d.ts +11 -5
  9. package/lib/banner/banner.d.ts +26 -12
  10. package/lib/breadcrumb/breadcrumb.d.ts +333 -1
  11. package/lib/breadcrumb/breadcrumb.template.d.ts +2 -3
  12. package/lib/breadcrumb-item/breadcrumb-item.d.ts +8 -6
  13. package/lib/button/button.d.ts +11 -5
  14. package/lib/calendar/calendar.d.ts +3 -1
  15. package/lib/calendar-event/calendar-event.d.ts +333 -1
  16. package/lib/checkbox/checkbox.d.ts +8 -6
  17. package/lib/combobox/combobox.d.ts +11 -5
  18. package/lib/date-picker/date-picker.d.ts +74 -50
  19. package/lib/date-range-picker/date-range-picker.d.ts +38 -26
  20. package/lib/date-time-picker/date-time-picker.d.ts +76 -52
  21. package/lib/dial-pad/dial-pad.d.ts +11 -5
  22. package/lib/dialog/dialog.d.ts +16 -8
  23. package/lib/divider/divider.d.ts +8 -6
  24. package/lib/enums.d.ts +0 -4
  25. package/lib/fab/fab.d.ts +11 -5
  26. package/lib/file-picker/file-picker.d.ts +338 -1
  27. package/lib/header/header.d.ts +333 -1
  28. package/lib/menu/menu.d.ts +16 -8
  29. package/lib/menu-item/menu-item.d.ts +338 -2
  30. package/lib/nav/nav.d.ts +333 -1
  31. package/lib/nav-disclosure/nav-disclosure.d.ts +16 -8
  32. package/lib/nav-item/nav-item.d.ts +11 -5
  33. package/lib/note/note.d.ts +11 -5
  34. package/lib/number-field/number-field.d.ts +26 -12
  35. package/lib/option/option.d.ts +341 -3
  36. package/lib/progress/progress.d.ts +8 -6
  37. package/lib/progress-ring/progress-ring.d.ts +8 -6
  38. package/lib/radio-group/radio-group.d.ts +333 -1
  39. package/lib/range-slider/range-slider.d.ts +11 -5
  40. package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +1 -1
  41. package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +7 -1
  42. package/lib/rich-text-editor/menubar/consts.d.ts +18 -0
  43. package/lib/rich-text-editor/menubar/menubar.d.ts +3 -0
  44. package/lib/rich-text-editor/rich-text-editor.d.ts +14 -3
  45. package/lib/searchable-select/option-tag.d.ts +14 -6
  46. package/lib/searchable-select/searchable-select.d.ts +349 -7
  47. package/lib/select/select.d.ts +339 -3
  48. package/lib/selectable-box/selectable-box.d.ts +8 -6
  49. package/lib/slider/slider.d.ts +16 -8
  50. package/lib/split-button/split-button.d.ts +26 -12
  51. package/lib/switch/switch.d.ts +8 -6
  52. package/lib/tab/tab.d.ts +349 -7
  53. package/lib/tab-panel/tab-panel.d.ts +333 -1
  54. package/lib/tabs/definition.d.ts +1 -0
  55. package/lib/tabs/tabs.d.ts +6 -1
  56. package/lib/tag/tag.d.ts +338 -2
  57. package/lib/tag-group/tag-group.d.ts +8 -6
  58. package/lib/text-anchor/text-anchor.d.ts +16 -8
  59. package/lib/text-area/text-area.d.ts +8 -6
  60. package/lib/text-field/text-field.d.ts +16 -8
  61. package/lib/time-picker/time-picker.d.ts +38 -26
  62. package/lib/toggletip/toggletip.d.ts +9 -3
  63. package/lib/tooltip/tooltip.d.ts +9 -3
  64. package/lib/tree-item/tree-item.d.ts +338 -2
  65. package/lib/tree-view/tree-view.d.ts +333 -1
  66. package/lib/video-player/video-player.d.ts +14 -6
  67. package/package.json +1 -1
  68. package/shared/affix.js +1 -1
  69. package/shared/aria/aria-change-subscription.d.ts +6 -0
  70. package/shared/aria/aria-mixin.d.ts +338 -0
  71. package/shared/aria/delegate-aria-behavior.d.ts +31 -0
  72. package/shared/aria/delegates-aria.d.ts +14 -9
  73. package/shared/aria/host-semantics-behavior.d.ts +22 -0
  74. package/shared/aria/host-semantics.d.ts +337 -0
  75. package/shared/attribute-binding-behaviour.cjs +41 -0
  76. package/shared/attribute-binding-behaviour.js +39 -0
  77. package/shared/calendar-event.cjs +2 -1
  78. package/shared/calendar-event.js +2 -1
  79. package/shared/definition.js +1 -1
  80. package/shared/definition10.cjs +8 -2
  81. package/shared/definition10.js +9 -3
  82. package/shared/definition11.cjs +4 -28
  83. package/shared/definition11.js +5 -29
  84. package/shared/definition12.cjs +4 -1
  85. package/shared/definition12.js +5 -2
  86. package/shared/definition13.js +1 -1
  87. package/shared/definition14.js +1 -1
  88. package/shared/definition15.cjs +9 -8
  89. package/shared/definition15.js +11 -10
  90. package/shared/definition16.cjs +1 -1
  91. package/shared/definition16.js +2 -2
  92. package/shared/definition17.js +1 -1
  93. package/shared/definition18.js +1 -1
  94. package/shared/definition19.cjs +3 -0
  95. package/shared/definition19.js +4 -1
  96. package/shared/definition2.js +1 -1
  97. package/shared/definition20.js +1 -1
  98. package/shared/definition21.js +1 -1
  99. package/shared/definition22.cjs +3 -2
  100. package/shared/definition22.js +5 -4
  101. package/shared/definition23.cjs +4 -2
  102. package/shared/definition23.js +6 -4
  103. package/shared/definition24.js +1 -1
  104. package/shared/definition25.cjs +2 -14
  105. package/shared/definition25.js +3 -15
  106. package/shared/definition26.cjs +15 -2
  107. package/shared/definition26.js +16 -3
  108. package/shared/definition27.cjs +3 -2
  109. package/shared/definition27.js +4 -3
  110. package/shared/definition28.cjs +1 -1
  111. package/shared/definition28.js +2 -2
  112. package/shared/definition29.js +1 -1
  113. package/shared/definition3.cjs +4 -3
  114. package/shared/definition3.js +6 -5
  115. package/shared/definition30.cjs +34 -34
  116. package/shared/definition30.js +36 -36
  117. package/shared/definition31.cjs +6 -4
  118. package/shared/definition31.js +8 -6
  119. package/shared/definition32.js +1 -1
  120. package/shared/definition33.cjs +7 -2
  121. package/shared/definition33.js +8 -3
  122. package/shared/definition34.js +1 -1
  123. package/shared/definition35.cjs +3 -14
  124. package/shared/definition35.js +5 -16
  125. package/shared/definition36.cjs +8 -5
  126. package/shared/definition36.js +9 -6
  127. package/shared/definition37.js +1 -1
  128. package/shared/definition38.cjs +7 -8
  129. package/shared/definition38.js +9 -10
  130. package/shared/definition39.cjs +7 -8
  131. package/shared/definition39.js +9 -10
  132. package/shared/definition4.cjs +1 -1
  133. package/shared/definition4.js +2 -2
  134. package/shared/definition40.cjs +8 -5
  135. package/shared/definition40.js +9 -6
  136. package/shared/definition41.cjs +1 -1
  137. package/shared/definition41.js +2 -2
  138. package/shared/definition42.js +1 -1
  139. package/shared/definition43.cjs +506 -93
  140. package/shared/definition43.js +502 -89
  141. package/shared/definition44.cjs +27 -10
  142. package/shared/definition44.js +28 -11
  143. package/shared/definition45.cjs +12 -6
  144. package/shared/definition45.js +13 -7
  145. package/shared/definition46.cjs +18 -6
  146. package/shared/definition46.js +20 -8
  147. package/shared/definition47.js +1 -1
  148. package/shared/definition48.js +1 -1
  149. package/shared/definition49.cjs +10 -3
  150. package/shared/definition49.js +12 -5
  151. package/shared/definition5.cjs +7 -2
  152. package/shared/definition5.js +8 -3
  153. package/shared/definition50.cjs +8 -7
  154. package/shared/definition50.js +10 -9
  155. package/shared/definition51.cjs +3 -2
  156. package/shared/definition51.js +4 -3
  157. package/shared/definition52.cjs +8 -4
  158. package/shared/definition52.js +9 -5
  159. package/shared/definition53.cjs +5 -0
  160. package/shared/definition53.js +6 -2
  161. package/shared/definition54.cjs +4 -3
  162. package/shared/definition54.js +6 -5
  163. package/shared/definition55.cjs +7 -4
  164. package/shared/definition55.js +8 -5
  165. package/shared/definition56.cjs +69 -15
  166. package/shared/definition56.js +70 -16
  167. package/shared/definition57.cjs +163 -112
  168. package/shared/definition57.js +165 -114
  169. package/shared/definition58.js +1 -1
  170. package/shared/definition59.js +1 -1
  171. package/shared/definition6.js +1 -1
  172. package/shared/definition60.js +1 -1
  173. package/shared/definition61.cjs +8 -5
  174. package/shared/definition61.js +9 -6
  175. package/shared/definition62.cjs +5 -2
  176. package/shared/definition62.js +6 -3
  177. package/shared/definition63.js +1 -1
  178. package/shared/definition64.js +1 -1
  179. package/shared/definition65.js +1 -1
  180. package/shared/definition7.js +1 -1
  181. package/shared/definition8.cjs +4 -2
  182. package/shared/definition8.js +6 -4
  183. package/shared/definition9.js +1 -1
  184. package/shared/delegates-aria.cjs +106 -56
  185. package/shared/delegates-aria.js +107 -58
  186. package/shared/enums.cjs +0 -6
  187. package/shared/enums.js +1 -6
  188. package/shared/foundation/button/button.d.ts +8 -6
  189. package/shared/foundation/vivid-element/vivid-element.d.ts +339 -1
  190. package/shared/host-semantics.cjs +65 -0
  191. package/shared/host-semantics.js +62 -0
  192. package/shared/option.cjs +7 -1
  193. package/shared/option.js +7 -1
  194. package/shared/patterns/affix.d.ts +22 -10
  195. package/shared/patterns/anchored.d.ts +18 -6
  196. package/shared/patterns/localized.d.ts +11 -5
  197. package/shared/patterns/trapped-focus.d.ts +11 -5
  198. package/shared/picker-field/mixins/calendar-picker.d.ts +19 -13
  199. package/shared/picker-field/mixins/calendar-picker.template.d.ts +19 -13
  200. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +11 -5
  201. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +38 -26
  202. package/shared/picker-field/mixins/single-date-picker.d.ts +55 -37
  203. package/shared/picker-field/mixins/single-value-picker.d.ts +17 -11
  204. package/shared/picker-field/mixins/time-selection-picker.d.ts +38 -26
  205. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +38 -26
  206. package/shared/picker-field/picker-field.d.ts +21 -9
  207. package/shared/picker-field.template.js +1 -1
  208. package/shared/repeat.js +1 -1
  209. package/shared/single-value-picker.cjs +3 -0
  210. package/shared/single-value-picker.js +3 -0
  211. package/shared/slider.template.cjs +10 -9
  212. package/shared/slider.template.js +10 -9
  213. package/shared/templating/attribute-binding-behaviour.d.ts +15 -0
  214. package/shared/templating/render-in-light-dom.d.ts +22 -0
  215. package/shared/text-anchor.template.cjs +2 -13
  216. package/shared/text-anchor.template.js +2 -13
  217. package/shared/text-field.cjs +1 -1
  218. package/shared/text-field.js +1 -1
  219. package/shared/time-selection-picker.template.js +1 -1
  220. package/shared/vivid-element.cjs +96 -2
  221. package/shared/vivid-element.js +93 -3
  222. package/styles/core/all.css +1 -1
  223. package/styles/core/theme.css +1 -1
  224. package/styles/core/typography.css +1 -1
  225. package/styles/tokens/theme-dark.css +4 -4
  226. package/styles/tokens/theme-light.css +4 -4
  227. package/styles/tokens/vivid-2-compat.css +1 -1
  228. package/text-anchor/index.js +1 -1
  229. package/vivid.api.json +316 -70
  230. package/shared/Reflector.cjs +0 -71
  231. package/shared/Reflector.js +0 -69
@@ -0,0 +1,337 @@
1
+ import { type CaptureType } from '@microsoft/fast-element';
2
+ import type { Constructor, MixinType } from '../utils/mixins';
3
+ import type { VividElement } from '../foundation/vivid-element/vivid-element';
4
+ import { type BoundAriaProperties } from './host-semantics-behavior';
5
+ export declare function applyHostSemantics<T>(boundProperties?: BoundAriaProperties<T>): CaptureType<T>;
6
+ export declare const HostSemantics: <T extends Constructor<VividElement>>(Base: T) => {
7
+ new (...args: any[]): {
8
+ _vividAriaBehaviour: "host";
9
+ specialHandling: boolean;
10
+ readonly $fastController: import("@microsoft/fast-element").Controller;
11
+ $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail"> | undefined): boolean | void;
12
+ connectedCallback(): void;
13
+ disconnectedCallback(): void;
14
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
15
+ accessKey: string;
16
+ readonly accessKeyLabel: string;
17
+ autocapitalize: string;
18
+ dir: string;
19
+ draggable: boolean;
20
+ hidden: boolean;
21
+ inert: boolean;
22
+ innerText: string;
23
+ lang: string;
24
+ readonly offsetHeight: number;
25
+ readonly offsetLeft: number;
26
+ readonly offsetParent: Element | null;
27
+ readonly offsetTop: number;
28
+ readonly offsetWidth: number;
29
+ outerText: string;
30
+ spellcheck: boolean;
31
+ title: string;
32
+ translate: boolean;
33
+ attachInternals(): ElementInternals;
34
+ click(): void;
35
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
36
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
37
+ removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
38
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
39
+ dropzone: import("dropzone");
40
+ readonly attributes: NamedNodeMap;
41
+ readonly classList: DOMTokenList;
42
+ className: string;
43
+ readonly clientHeight: number;
44
+ readonly clientLeft: number;
45
+ readonly clientTop: number;
46
+ readonly clientWidth: number;
47
+ id: string;
48
+ readonly localName: string;
49
+ readonly namespaceURI: string | null;
50
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
51
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
52
+ outerHTML: string;
53
+ readonly ownerDocument: Document;
54
+ readonly part: DOMTokenList;
55
+ readonly prefix: string | null;
56
+ readonly scrollHeight: number;
57
+ scrollLeft: number;
58
+ scrollTop: number;
59
+ readonly scrollWidth: number;
60
+ readonly shadowRoot: ShadowRoot | null;
61
+ slot: string;
62
+ readonly tagName: string;
63
+ attachShadow(init: ShadowRootInit): ShadowRoot;
64
+ checkVisibility(options?: CheckVisibilityOptions | undefined): boolean;
65
+ closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
66
+ closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
67
+ closest<K_4 extends keyof MathMLElementTagNameMap>(selector: K_4): MathMLElementTagNameMap[K_4] | null;
68
+ closest<E extends Element = Element>(selectors: string): E | null;
69
+ getAttribute(qualifiedName: string): string | null;
70
+ getAttributeNS(namespace: string | null, localName: string): string | null;
71
+ getAttributeNames(): string[];
72
+ getAttributeNode(qualifiedName: string): Attr | null;
73
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
74
+ getBoundingClientRect(): DOMRect;
75
+ getClientRects(): DOMRectList;
76
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
77
+ getElementsByTagName<K_5 extends keyof HTMLElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<HTMLElementTagNameMap[K_5]>;
78
+ getElementsByTagName<K_6 extends keyof SVGElementTagNameMap>(qualifiedName: K_6): HTMLCollectionOf<SVGElementTagNameMap[K_6]>;
79
+ getElementsByTagName<K_7 extends keyof MathMLElementTagNameMap>(qualifiedName: K_7): HTMLCollectionOf<MathMLElementTagNameMap[K_7]>;
80
+ getElementsByTagName<K_8 extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K_8): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K_8]>;
81
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
82
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
83
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
84
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
85
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
86
+ hasAttribute(qualifiedName: string): boolean;
87
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
88
+ hasAttributes(): boolean;
89
+ hasPointerCapture(pointerId: number): boolean;
90
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
91
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
92
+ insertAdjacentText(where: InsertPosition, data: string): void;
93
+ matches(selectors: string): boolean;
94
+ releasePointerCapture(pointerId: number): void;
95
+ removeAttribute(qualifiedName: string): void;
96
+ removeAttributeNS(namespace: string | null, localName: string): void;
97
+ removeAttributeNode(attr: Attr): Attr;
98
+ requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
99
+ requestPointerLock(): void;
100
+ scroll(options?: ScrollToOptions | undefined): void;
101
+ scroll(x: number, y: number): void;
102
+ scrollBy(options?: ScrollToOptions | undefined): void;
103
+ scrollBy(x: number, y: number): void;
104
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
105
+ scrollTo(options?: ScrollToOptions | undefined): void;
106
+ scrollTo(x: number, y: number): void;
107
+ setAttribute(qualifiedName: string, value: string): void;
108
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
109
+ setAttributeNode(attr: Attr): Attr | null;
110
+ setAttributeNodeNS(attr: Attr): Attr | null;
111
+ setPointerCapture(pointerId: number): void;
112
+ toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
113
+ webkitMatchesSelector(selectors: string): boolean;
114
+ readonly baseURI: string;
115
+ readonly childNodes: NodeListOf<ChildNode>;
116
+ readonly firstChild: ChildNode | null;
117
+ readonly isConnected: boolean;
118
+ readonly lastChild: ChildNode | null;
119
+ readonly nextSibling: ChildNode | null;
120
+ readonly nodeName: string;
121
+ readonly nodeType: number;
122
+ nodeValue: string | null;
123
+ readonly parentElement: HTMLElement | null;
124
+ readonly parentNode: ParentNode | null;
125
+ readonly previousSibling: ChildNode | null;
126
+ textContent: string | null;
127
+ appendChild<T_1 extends Node>(node: T_1): T_1;
128
+ cloneNode(deep?: boolean | undefined): Node;
129
+ compareDocumentPosition(other: Node): number;
130
+ contains(other: Node | null): boolean;
131
+ getRootNode(options?: GetRootNodeOptions | undefined): Node;
132
+ hasChildNodes(): boolean;
133
+ insertBefore<T_2 extends Node>(node: T_2, child: Node | null): T_2;
134
+ isDefaultNamespace(namespace: string | null): boolean;
135
+ isEqualNode(otherNode: Node | null): boolean;
136
+ isSameNode(otherNode: Node | null): boolean;
137
+ lookupNamespaceURI(prefix: string | null): string | null;
138
+ lookupPrefix(namespace: string | null): string | null;
139
+ normalize(): void;
140
+ removeChild<T_3 extends Node>(child: T_3): T_3;
141
+ replaceChild<T_4 extends Node>(node: Node, child: T_4): T_4;
142
+ readonly ELEMENT_NODE: 1;
143
+ readonly ATTRIBUTE_NODE: 2;
144
+ readonly TEXT_NODE: 3;
145
+ readonly CDATA_SECTION_NODE: 4;
146
+ readonly ENTITY_REFERENCE_NODE: 5;
147
+ readonly ENTITY_NODE: 6;
148
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
149
+ readonly COMMENT_NODE: 8;
150
+ readonly DOCUMENT_NODE: 9;
151
+ readonly DOCUMENT_TYPE_NODE: 10;
152
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
153
+ readonly NOTATION_NODE: 12;
154
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
155
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
156
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
157
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
158
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
159
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
160
+ dispatchEvent(event: Event): boolean;
161
+ ariaAtomic: string | null;
162
+ ariaAutoComplete: string | null;
163
+ ariaBusy: string | null;
164
+ ariaChecked: string | null;
165
+ ariaColCount: string | null;
166
+ ariaColIndex: string | null;
167
+ ariaColSpan: string | null;
168
+ ariaCurrent: string | null;
169
+ ariaDisabled: string | null;
170
+ ariaExpanded: string | null;
171
+ ariaHasPopup: string | null;
172
+ ariaHidden: string | null;
173
+ ariaInvalid: string | null;
174
+ ariaKeyShortcuts: string | null;
175
+ ariaLabel: string | null;
176
+ ariaLevel: string | null;
177
+ ariaLive: string | null;
178
+ ariaModal: string | null;
179
+ ariaMultiLine: string | null;
180
+ ariaMultiSelectable: string | null;
181
+ ariaOrientation: string | null;
182
+ ariaPlaceholder: string | null;
183
+ ariaPosInSet: string | null;
184
+ ariaPressed: string | null;
185
+ ariaReadOnly: string | null;
186
+ ariaRequired: string | null;
187
+ ariaRoleDescription: string | null;
188
+ ariaRowCount: string | null;
189
+ ariaRowIndex: string | null;
190
+ ariaRowSpan: string | null;
191
+ ariaSelected: string | null;
192
+ ariaSetSize: string | null;
193
+ ariaSort: string | null;
194
+ ariaValueMax: string | null;
195
+ ariaValueMin: string | null;
196
+ ariaValueNow: string | null;
197
+ ariaValueText: string | null;
198
+ role: string | null;
199
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
200
+ getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
201
+ after(...nodes: (string | Node)[]): void;
202
+ before(...nodes: (string | Node)[]): void;
203
+ remove(): void;
204
+ replaceWith(...nodes: (string | Node)[]): void;
205
+ innerHTML: string;
206
+ readonly nextElementSibling: Element | null;
207
+ readonly previousElementSibling: Element | null;
208
+ readonly childElementCount: number;
209
+ readonly children: HTMLCollection;
210
+ readonly firstElementChild: Element | null;
211
+ readonly lastElementChild: Element | null;
212
+ append(...nodes: (string | Node)[]): void;
213
+ prepend(...nodes: (string | Node)[]): void;
214
+ querySelector<K_9 extends keyof HTMLElementTagNameMap>(selectors: K_9): HTMLElementTagNameMap[K_9] | null;
215
+ querySelector<K_10 extends keyof SVGElementTagNameMap>(selectors: K_10): SVGElementTagNameMap[K_10] | null;
216
+ querySelector<K_11 extends keyof MathMLElementTagNameMap>(selectors: K_11): MathMLElementTagNameMap[K_11] | null;
217
+ querySelector<K_12 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_12): HTMLElementDeprecatedTagNameMap[K_12] | null;
218
+ querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
219
+ querySelectorAll<K_13 extends keyof HTMLElementTagNameMap>(selectors: K_13): NodeListOf<HTMLElementTagNameMap[K_13]>;
220
+ querySelectorAll<K_14 extends keyof SVGElementTagNameMap>(selectors: K_14): NodeListOf<SVGElementTagNameMap[K_14]>;
221
+ querySelectorAll<K_15 extends keyof MathMLElementTagNameMap>(selectors: K_15): NodeListOf<MathMLElementTagNameMap[K_15]>;
222
+ querySelectorAll<K_16 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_16): NodeListOf<HTMLElementDeprecatedTagNameMap[K_16]>;
223
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
224
+ replaceChildren(...nodes: (string | Node)[]): void;
225
+ readonly assignedSlot: HTMLSlotElement | null;
226
+ readonly style: CSSStyleDeclaration;
227
+ contentEditable: string;
228
+ enterKeyHint: string;
229
+ inputMode: string;
230
+ readonly isContentEditable: boolean;
231
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
232
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
233
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
234
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
235
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
236
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
237
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
238
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
239
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
240
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
241
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
242
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
243
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
244
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
245
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
246
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
247
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
248
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
249
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
250
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
251
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
252
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
253
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
254
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
255
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
256
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
257
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
258
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
260
+ onerror: OnErrorEventHandler;
261
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
262
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
263
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
264
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
265
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
266
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
267
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
268
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
269
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
274
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
275
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
276
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
277
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
278
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
279
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
280
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
281
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
282
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
284
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
285
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
286
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
287
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
288
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
289
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
290
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
291
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
292
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
293
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
294
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
295
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
297
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
299
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
302
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
303
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
304
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
305
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
306
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
307
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
308
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
309
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
310
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
311
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
312
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
313
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
314
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
315
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
316
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
317
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
318
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
319
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
320
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
321
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
322
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
323
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
324
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
325
+ autofocus: boolean;
326
+ readonly dataset: DOMStringMap;
327
+ nonce?: string | undefined;
328
+ tabIndex: number;
329
+ blur(): void;
330
+ focus(options?: FocusOptions | undefined): void;
331
+ ariaColIndexText: string | null;
332
+ ariaDescription: string | null;
333
+ ariaRowIndexText: string | null;
334
+ ariaRelevant: string | null;
335
+ };
336
+ } & T;
337
+ export type HostSemanticsElement = MixinType<typeof HostSemantics>;
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ const vividElement = require('./vivid-element.cjs');
4
+
5
+ class AttributeBindingBehavior {
6
+ constructor(target, binding, isBindingVolatile, attributeName) {
7
+ this.target = target;
8
+ this.binding = binding;
9
+ this.isBindingVolatile = isBindingVolatile;
10
+ this.attributeName = attributeName;
11
+ this.source = null;
12
+ this.context = null;
13
+ }
14
+ bind(source, context) {
15
+ this.source = source;
16
+ this.context = context;
17
+ if (!this.bindingObserver) {
18
+ this.bindingObserver = vividElement.Observable.binding(
19
+ this.binding,
20
+ this,
21
+ this.isBindingVolatile
22
+ );
23
+ }
24
+ this.updateTarget(this.bindingObserver.observe(source, context));
25
+ }
26
+ unbind() {
27
+ this.bindingObserver.disconnect();
28
+ this.source = null;
29
+ this.context = null;
30
+ }
31
+ handleChange() {
32
+ this.updateTarget(
33
+ this.bindingObserver.observe(this.source, this.context)
34
+ );
35
+ }
36
+ updateTarget(value) {
37
+ vividElement.DOM.setAttribute(this.target, this.attributeName, value);
38
+ }
39
+ }
40
+
41
+ exports.AttributeBindingBehavior = AttributeBindingBehavior;
@@ -0,0 +1,39 @@
1
+ import { O as Observable, D as DOM } from './vivid-element.js';
2
+
3
+ class AttributeBindingBehavior {
4
+ constructor(target, binding, isBindingVolatile, attributeName) {
5
+ this.target = target;
6
+ this.binding = binding;
7
+ this.isBindingVolatile = isBindingVolatile;
8
+ this.attributeName = attributeName;
9
+ this.source = null;
10
+ this.context = null;
11
+ }
12
+ bind(source, context) {
13
+ this.source = source;
14
+ this.context = context;
15
+ if (!this.bindingObserver) {
16
+ this.bindingObserver = Observable.binding(
17
+ this.binding,
18
+ this,
19
+ this.isBindingVolatile
20
+ );
21
+ }
22
+ this.updateTarget(this.bindingObserver.observe(source, context));
23
+ }
24
+ unbind() {
25
+ this.bindingObserver.disconnect();
26
+ this.source = null;
27
+ this.context = null;
28
+ }
29
+ handleChange() {
30
+ this.updateTarget(
31
+ this.bindingObserver.observe(this.source, this.context)
32
+ );
33
+ }
34
+ updateTarget(value) {
35
+ DOM.setAttribute(this.target, this.attributeName, value);
36
+ }
37
+ }
38
+
39
+ export { AttributeBindingBehavior as A };
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const vividElement = require('./vivid-element.cjs');
4
+ const delegatesAria = require('./delegates-aria.cjs');
4
5
 
5
6
  var __defProp = Object.defineProperty;
6
7
  var __decorateClass = (decorators, target, key, kind) => {
@@ -11,7 +12,7 @@ var __decorateClass = (decorators, target, key, kind) => {
11
12
  if (result) __defProp(target, key, result);
12
13
  return result;
13
14
  };
14
- class CalendarEvent extends vividElement.VividElement {
15
+ class CalendarEvent extends delegatesAria.DelegatesAria(vividElement.VividElement) {
15
16
  // TODO should be converted to allowed range
16
17
  }
17
18
  __decorateClass([
@@ -1,4 +1,5 @@
1
1
  import { V as VividElement, a as attr, n as nullableNumberConverter } from './vivid-element.js';
2
+ import { D as DelegatesAria } from './delegates-aria.js';
2
3
 
3
4
  var __defProp = Object.defineProperty;
4
5
  var __decorateClass = (decorators, target, key, kind) => {
@@ -9,7 +10,7 @@ var __decorateClass = (decorators, target, key, kind) => {
9
10
  if (result) __defProp(target, key, result);
10
11
  return result;
11
12
  };
12
- class CalendarEvent extends VividElement {
13
+ class CalendarEvent extends DelegatesAria(VividElement) {
13
14
  // TODO should be converted to allowed range
14
15
  }
15
16
  __decorateClass([
@@ -1,4 +1,4 @@
1
- import { V as VividElement, a as attr, n as nullableNumberConverter, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
1
+ import { V as VividElement, a as attr, n as nullableNumberConverter, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
2
2
  import { i as iconDefinition } from './definition28.js';
3
3
  import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
4
4
  import { r as ref } from './ref.js';
@@ -1,11 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  const vividElement = require('./vivid-element.cjs');
4
+ const delegatesAria = require('./delegates-aria.cjs');
4
5
  const slotted = require('./slotted.cjs');
5
6
  const breadcrumbItem = require('./breadcrumb-item.cjs');
6
7
 
7
8
  const breadcrumbTemplate = vividElement.html`
8
- <nav aria-label="breadcrumbs" class="base">
9
+ <nav
10
+ class="base"
11
+ ${delegatesAria.delegateAria({
12
+ ariaLabel: (x) => x.ariaLabel || "breadcrumbs"
13
+ })}
14
+ >
9
15
  <div role="list" class="list">
10
16
  <slot
11
17
  ${slotted.slotted({
@@ -28,7 +34,7 @@ var __decorateClass = (decorators, target, key, kind) => {
28
34
  if (result) __defProp(target, key, result);
29
35
  return result;
30
36
  };
31
- class Breadcrumb extends vividElement.VividElement {
37
+ class Breadcrumb extends delegatesAria.DelegatesAria(vividElement.VividElement) {
32
38
  /**
33
39
  * @internal
34
40
  */
@@ -1,9 +1,15 @@
1
- import { h as html, V as VividElement, o as observable, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
1
+ import { h as html, V as VividElement, o as observable, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
2
+ import { d as delegateAria, D as DelegatesAria } from './delegates-aria.js';
2
3
  import { s as slotted, e as elements } from './slotted.js';
3
4
  import { B as BreadcrumbItem } from './breadcrumb-item.js';
4
5
 
5
6
  const breadcrumbTemplate = html`
6
- <nav aria-label="breadcrumbs" class="base">
7
+ <nav
8
+ class="base"
9
+ ${delegateAria({
10
+ ariaLabel: (x) => x.ariaLabel || "breadcrumbs"
11
+ })}
12
+ >
7
13
  <div role="list" class="list">
8
14
  <slot
9
15
  ${slotted({
@@ -26,7 +32,7 @@ var __decorateClass = (decorators, target, key, kind) => {
26
32
  if (result) __defProp(target, key, result);
27
33
  return result;
28
34
  };
29
- class Breadcrumb extends VividElement {
35
+ class Breadcrumb extends DelegatesAria(VividElement) {
30
36
  /**
31
37
  * @internal
32
38
  */
@@ -6,6 +6,7 @@ const vividElement = require('./vivid-element.cjs');
6
6
  const affix = require('./affix.cjs');
7
7
  const button = require('./button.cjs');
8
8
  const enums = require('./enums.cjs');
9
+ const delegatesAria = require('./delegates-aria.cjs');
9
10
  const when = require('./when.cjs');
10
11
  const classNames = require('./class-names.cjs');
11
12
  const ref = require('./ref.cjs');
@@ -185,21 +186,8 @@ function renderButtonContent(context) {
185
186
  name="${(x) => x.name}"
186
187
  type="${(x) => getButtonType(x.type)}"
187
188
  value="${(x) => x.value}"
188
- aria-atomic="${(x) => x.ariaAtomic}"
189
- aria-busy="${(x) => x.ariaBusy}"
190
- aria-current="${(x) => x.ariaCurrent}"
191
- aria-disabled="${(x) => x.ariaDisabled}"
192
- aria-expanded="${(x) => x.ariaExpanded}"
193
- aria-haspopup="${(x) => x.ariaHasPopup}"
194
- aria-hidden="${(x) => x.ariaHidden}"
195
- aria-invalid="${(x) => x.ariaInvalid}"
196
- aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
197
- aria-label="${(x) => x.ariaLabel}"
198
- aria-live="${(x) => x.ariaLive}"
199
- aria-pressed="${(x) => x.ariaPressed}"
200
- aria-relevant="${(x) => x.ariaRelevant}"
201
- aria-roledescription="${(x) => x.ariaRoleDescription}"
202
189
  title="${(x) => x.title}"
190
+ ${delegatesAria.delegateAria()}
203
191
  ${ref.ref("control")}
204
192
  >
205
193
  ${buttonContent(context)}
@@ -216,26 +204,14 @@ function renderAnchorContent(context) {
216
204
  rel="${(x) => x.rel}"
217
205
  target="${(x) => x.target}"
218
206
  type="${(x) => x.type}"
219
- aria-atomic="${(x) => x.ariaAtomic}"
220
- aria-busy="${(x) => x.ariaBusy}"
221
- aria-current="${(x) => x.ariaCurrent}"
222
- aria-disabled="${(x) => x.ariaDisabled}"
223
- aria-expanded="${(x) => x.ariaExpanded}"
224
- aria-haspopup="${(x) => x.ariaHasPopup}"
225
- aria-hidden="${(x) => x.ariaHidden}"
226
- aria-invalid="${(x) => x.ariaInvalid}"
227
- aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
228
- aria-label="${(x) => x.ariaLabel}"
229
- aria-live="${(x) => x.ariaLive}"
230
- aria-relevant="${(x) => x.ariaRelevant}"
231
- aria-roledescription="${(x) => x.ariaRoleDescription}"
207
+ ${delegatesAria.delegateAria()}
232
208
  ${ref.ref("control")}
233
209
  >
234
210
  ${buttonContent(context)}
235
211
  </a>`;
236
212
  }
237
213
  const buttonTemplate = (context) => {
238
- return vividElement.html` <template role="presentation">
214
+ return vividElement.html` <template>
239
215
  ${when.when((x) => !x.href, vividElement.html`${renderButtonContent(context)}`)}
240
216
  ${when.when((x) => x.href, vividElement.html`${renderAnchorContent(context)}`)}
241
217
  </template>`;
@@ -1,9 +1,10 @@
1
1
  import { I as Icon, i as iconDefinition } from './definition28.js';
2
2
  import { P as ProgressRing, p as progressRingDefinition } from './definition38.js';
3
- import { a as attr, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
3
+ import { a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
4
4
  import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
5
5
  import { V as VividFoundationButton } from './button.js';
6
6
  import { b as Size } from './enums.js';
7
+ import { d as delegateAria } from './delegates-aria.js';
7
8
  import { w as when } from './when.js';
8
9
  import { c as classNames } from './class-names.js';
9
10
  import { r as ref } from './ref.js';
@@ -183,21 +184,8 @@ function renderButtonContent(context) {
183
184
  name="${(x) => x.name}"
184
185
  type="${(x) => getButtonType(x.type)}"
185
186
  value="${(x) => x.value}"
186
- aria-atomic="${(x) => x.ariaAtomic}"
187
- aria-busy="${(x) => x.ariaBusy}"
188
- aria-current="${(x) => x.ariaCurrent}"
189
- aria-disabled="${(x) => x.ariaDisabled}"
190
- aria-expanded="${(x) => x.ariaExpanded}"
191
- aria-haspopup="${(x) => x.ariaHasPopup}"
192
- aria-hidden="${(x) => x.ariaHidden}"
193
- aria-invalid="${(x) => x.ariaInvalid}"
194
- aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
195
- aria-label="${(x) => x.ariaLabel}"
196
- aria-live="${(x) => x.ariaLive}"
197
- aria-pressed="${(x) => x.ariaPressed}"
198
- aria-relevant="${(x) => x.ariaRelevant}"
199
- aria-roledescription="${(x) => x.ariaRoleDescription}"
200
187
  title="${(x) => x.title}"
188
+ ${delegateAria()}
201
189
  ${ref("control")}
202
190
  >
203
191
  ${buttonContent(context)}
@@ -214,26 +202,14 @@ function renderAnchorContent(context) {
214
202
  rel="${(x) => x.rel}"
215
203
  target="${(x) => x.target}"
216
204
  type="${(x) => x.type}"
217
- aria-atomic="${(x) => x.ariaAtomic}"
218
- aria-busy="${(x) => x.ariaBusy}"
219
- aria-current="${(x) => x.ariaCurrent}"
220
- aria-disabled="${(x) => x.ariaDisabled}"
221
- aria-expanded="${(x) => x.ariaExpanded}"
222
- aria-haspopup="${(x) => x.ariaHasPopup}"
223
- aria-hidden="${(x) => x.ariaHidden}"
224
- aria-invalid="${(x) => x.ariaInvalid}"
225
- aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
226
- aria-label="${(x) => x.ariaLabel}"
227
- aria-live="${(x) => x.ariaLive}"
228
- aria-relevant="${(x) => x.ariaRelevant}"
229
- aria-roledescription="${(x) => x.ariaRoleDescription}"
205
+ ${delegateAria()}
230
206
  ${ref("control")}
231
207
  >
232
208
  ${buttonContent(context)}
233
209
  </a>`;
234
210
  }
235
211
  const buttonTemplate = (context) => {
236
- return html` <template role="presentation">
212
+ return html` <template>
237
213
  ${when((x) => !x.href, html`${renderButtonContent(context)}`)}
238
214
  ${when((x) => x.href, html`${renderAnchorContent(context)}`)}
239
215
  </template>`;
@@ -2,6 +2,7 @@
2
2
 
3
3
  const vividElement = require('./vivid-element.cjs');
4
4
  const calendarEvent = require('./calendar-event.cjs');
5
+ const delegatesAria = require('./delegates-aria.cjs');
5
6
  const classNames = require('./class-names.cjs');
6
7
  const when = require('./when.cjs');
7
8
 
@@ -25,8 +26,10 @@ const getStyles = ({ start, duration, overlapCount }) => {
25
26
  const CalendarEventTemplate = vividElement.html` <div
26
27
  style="${getStyles}"
27
28
  class="${getClasses}"
28
- role="button"
29
29
  tabindex="0"
30
+ ${delegatesAria.delegateAria({
31
+ role: "button"
32
+ })}
30
33
  >
31
34
  ${when.when((x) => x.heading, vividElement.html`<h2><strong>${(x) => x.heading}</strong></h2>`)}
32
35
  ${when.when((x) => x.description, vividElement.html`<p>${(x) => x.description}</p>`)}