@redvars/peacock 4.2.1 → 4.3.1

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 (254) hide show
  1. package/dist/{BaseField-D8ByB0l3.js → BaseField-CHBcjVc2.js} +3 -3
  2. package/dist/{BaseField-D8ByB0l3.js.map → BaseField-CHBcjVc2.js.map} +1 -1
  3. package/dist/{BaseInput-xCHvT4AN.js → BaseInput-DZp2O8Gh.js} +2 -2
  4. package/dist/{BaseInput-xCHvT4AN.js.map → BaseInput-DZp2O8Gh.js.map} +1 -1
  5. package/dist/ai-badge.js +2 -2
  6. package/dist/ai-summary.js +2 -2
  7. package/dist/alert.js +2 -2
  8. package/dist/anchor-nav.js +2 -2
  9. package/dist/app-shell.js +2 -2
  10. package/dist/assistant-panel.js +2 -2
  11. package/dist/assistant-step.js +2 -2
  12. package/dist/assistant-steps.js +2 -2
  13. package/dist/avatar-group.js +2 -2
  14. package/dist/banner.js +2 -2
  15. package/dist/{base-progress-DxNgAQtw.js → base-progress-CKQ32Ruw.js} +2 -2
  16. package/dist/{base-progress-DxNgAQtw.js.map → base-progress-CKQ32Ruw.js.map} +1 -1
  17. package/dist/bottom-sheet.js +2 -2
  18. package/dist/breadcrumb.js +2 -2
  19. package/dist/calendar.js +2 -2
  20. package/dist/{canvas-base-DHKf2CmA.js → canvas-base-BoKef3yr.js} +2 -2
  21. package/dist/{canvas-base-DHKf2CmA.js.map → canvas-base-BoKef3yr.js.map} +1 -1
  22. package/dist/carousel.js +644 -0
  23. package/dist/carousel.js.map +1 -0
  24. package/dist/{cartesian-chart-G6VX1aKk.js → cartesian-chart-DqZxnoG1.js} +2 -2
  25. package/dist/{cartesian-chart-G6VX1aKk.js.map → cartesian-chart-DqZxnoG1.js.map} +1 -1
  26. package/dist/{cb-group-base-BBDUgxne.js → cb-group-base-DHwx72Gt.js} +3 -1
  27. package/dist/{cb-group-base-BBDUgxne.js.map → cb-group-base-DHwx72Gt.js.map} +1 -1
  28. package/dist/{cb-group-base-CZLzCnXK.js → cb-group-base-DXnAJxEK.js} +3 -3
  29. package/dist/{cb-group-base-CZLzCnXK.js.map → cb-group-base-DXnAJxEK.js.map} +1 -1
  30. package/dist/cb-group.js +7 -4
  31. package/dist/cb-group.js.map +1 -1
  32. package/dist/cb-rule.js +3 -3
  33. package/dist/chart-area.js +4 -4
  34. package/dist/chart-bar.js +4 -4
  35. package/dist/{chart-base-DREru2P0.js → chart-base-ByCJM_9C.js} +2 -2
  36. package/dist/{chart-base-DREru2P0.js.map → chart-base-ByCJM_9C.js.map} +1 -1
  37. package/dist/chart-doughnut.js +3 -3
  38. package/dist/chart-line.js +4 -4
  39. package/dist/chart-pie.js +3 -3
  40. package/dist/chat-event.js +2 -2
  41. package/dist/chat-message.js +2 -2
  42. package/dist/chat-thread.js +2 -2
  43. package/dist/checkbox-group.js +3 -3
  44. package/dist/checkbox.js +3 -3
  45. package/dist/chip-set.js +2 -2
  46. package/dist/chip.js +2 -2
  47. package/dist/circular-progress.js +3 -3
  48. package/dist/citation.js +2 -2
  49. package/dist/code-editor.js +3 -3
  50. package/dist/code-highlighter.js +2 -2
  51. package/dist/color-field.js +4 -4
  52. package/dist/color-picker.js +2 -2
  53. package/dist/command-palette.js +2 -2
  54. package/dist/comment-composer.js +4 -4
  55. package/dist/condition-builder.js +4 -4
  56. package/dist/confirm-dialog.js +2 -2
  57. package/dist/copy-button.js +2 -2
  58. package/dist/currency-field.js +4 -4
  59. package/dist/custom-elements-jsdocs.json +902 -74
  60. package/dist/custom-elements.json +3301 -446
  61. package/dist/date-field.js +5 -5
  62. package/dist/date-picker.js +2 -2
  63. package/dist/date-range-field.js +5 -5
  64. package/dist/datetime-field.js +5 -5
  65. package/dist/dependency-map.js +3 -3
  66. package/dist/description-item.js +2 -2
  67. package/dist/description-list.js +2 -2
  68. package/dist/{diagram-CHF70xTL.js → diagram-Cnrj-4y3.js} +2 -2
  69. package/dist/{diagram-CHF70xTL.js.map → diagram-Cnrj-4y3.js.map} +1 -1
  70. package/dist/diagram-controls.js +2 -2
  71. package/dist/diagram-minimap.js +2 -2
  72. package/dist/diagram.js +4 -4
  73. package/dist/diff-viewer.js +2 -2
  74. package/dist/discussion-activity.js +2 -2
  75. package/dist/discussion-comment.js +2 -2
  76. package/dist/discussion.js +4 -4
  77. package/dist/{document-editor-Cb9fCxvA.js → document-editor-C8ThjDQ7.js} +2 -2
  78. package/dist/{document-editor-Cb9fCxvA.js.map → document-editor-C8ThjDQ7.js.map} +1 -1
  79. package/dist/document-editor.js +3 -3
  80. package/dist/draft-card.js +2 -2
  81. package/dist/erd.js +3 -3
  82. package/dist/file-upload.js +3 -3
  83. package/dist/filter-bar.js +2 -2
  84. package/dist/flow.js +4 -4
  85. package/dist/form.js +2 -2
  86. package/dist/{generative-view-C4fJ2zI7.js → generative-view-CQ8-g1wY.js} +2 -2
  87. package/dist/{generative-view-C4fJ2zI7.js.map → generative-view-CQ8-g1wY.js.map} +1 -1
  88. package/dist/generative-view.js +3 -3
  89. package/dist/highlight-Be0wu7kh.js +252 -0
  90. package/dist/highlight-Be0wu7kh.js.map +1 -0
  91. package/dist/highlight.js +6 -0
  92. package/dist/highlight.js.map +1 -0
  93. package/dist/html-editor.js +4 -4
  94. package/dist/{i18n-controller-CH4e9sju.js → i18n-controller-DLJcJ5gO.js} +2 -2
  95. package/dist/{i18n-controller-CH4e9sju.js.map → i18n-controller-DLJcJ5gO.js.map} +1 -1
  96. package/dist/image.js +2 -2
  97. package/dist/index.js +27 -17
  98. package/dist/index.js.map +1 -1
  99. package/dist/inline-edit.js +2 -2
  100. package/dist/input.js +3 -3
  101. package/dist/json-viewer.js +2 -2
  102. package/dist/kanban.js +2 -2
  103. package/dist/kbd.js +2 -2
  104. package/dist/linear-progress.js +3 -3
  105. package/dist/listbox.js +2 -2
  106. package/dist/loader-full.js +19 -9
  107. package/dist/loader-full.js.map +1 -1
  108. package/dist/loader.js +46 -9
  109. package/dist/loader.js.map +1 -1
  110. package/dist/markdown-editor.js +4 -4
  111. package/dist/mention-input.js +4 -4
  112. package/dist/modal.js +2 -2
  113. package/dist/navigation-bar.js +2 -2
  114. package/dist/navigation-drawer.js +2 -2
  115. package/dist/navigation-rail.js +2 -2
  116. package/dist/notification-center.js +2 -2
  117. package/dist/number-field.js +4 -4
  118. package/dist/page-header.js +2 -2
  119. package/dist/pagination.js +2 -2
  120. package/dist/password-field.js +4 -4
  121. package/dist/password-rules.js +2 -2
  122. package/dist/phone-field.js +4 -4
  123. package/dist/{picker-field-loXW-xrW.js → picker-field-B5xOFc3-.js} +3 -3
  124. package/dist/{picker-field-loXW-xrW.js.map → picker-field-B5xOFc3-.js.map} +1 -1
  125. package/dist/pin-input.js +4 -4
  126. package/dist/presence-indicator.js +2 -2
  127. package/dist/prompt-input.js +4 -4
  128. package/dist/radio.js +3 -3
  129. package/dist/rating.js +3 -3
  130. package/dist/redvars-loader.js +2 -2
  131. package/dist/relative-time.js +2 -2
  132. package/dist/resizable-panels.js +2 -2
  133. package/dist/{rich-text-input-B5j0eqCJ.js → rich-text-input-C4B9D6oD.js} +3 -3
  134. package/dist/{rich-text-input-B5j0eqCJ.js.map → rich-text-input-C4B9D6oD.js.map} +1 -1
  135. package/dist/{schema-BJzlGRP1.js → schema-CPhNrjrx.js} +2 -2
  136. package/dist/{schema-BJzlGRP1.js.map → schema-CPhNrjrx.js.map} +1 -1
  137. package/dist/search.js +3 -3
  138. package/dist/select.js +4 -4
  139. package/dist/side-sheet.js +2 -2
  140. package/dist/signature-pad.js +3 -3
  141. package/dist/site-footer-group.js +142 -0
  142. package/dist/site-footer-group.js.map +1 -0
  143. package/dist/site-footer.js +338 -0
  144. package/dist/site-footer.js.map +1 -0
  145. package/dist/site-header.js +774 -0
  146. package/dist/site-header.js.map +1 -0
  147. package/dist/site-nav-group.js +123 -0
  148. package/dist/site-nav-group.js.map +1 -0
  149. package/dist/site-nav-link.js +321 -0
  150. package/dist/site-nav-link.js.map +1 -0
  151. package/dist/site-nav-menu.js +506 -0
  152. package/dist/site-nav-menu.js.map +1 -0
  153. package/dist/site-nav-shared-BDR2HG8e.js +23 -0
  154. package/dist/site-nav-shared-BDR2HG8e.js.map +1 -0
  155. package/dist/slider.js +3 -3
  156. package/dist/snackbar.js +2 -2
  157. package/dist/sparkline.js +2 -2
  158. package/dist/split-button.js +2 -2
  159. package/dist/src/__internal/i18n/strings.d.ts +24 -0
  160. package/dist/src/carousel/carousel.d.ts +135 -0
  161. package/dist/src/carousel/index.d.ts +1 -0
  162. package/dist/src/highlight/highlight.d.ts +56 -0
  163. package/dist/src/highlight/index.d.ts +2 -0
  164. package/dist/src/highlight/matches.d.ts +9 -0
  165. package/dist/src/index.d.ts +9 -0
  166. package/dist/src/site-footer/index.d.ts +2 -0
  167. package/dist/src/site-footer/site-footer-group.d.ts +34 -0
  168. package/dist/src/site-footer/site-footer.d.ts +74 -0
  169. package/dist/src/site-header/index.d.ts +4 -0
  170. package/dist/src/site-header/site-header.d.ts +170 -0
  171. package/dist/src/site-header/site-nav-group.d.ts +32 -0
  172. package/dist/src/site-header/site-nav-link.d.ts +65 -0
  173. package/dist/src/site-header/site-nav-menu.d.ts +104 -0
  174. package/dist/src/site-header/site-nav-shared.d.ts +13 -0
  175. package/dist/src/table/table.d.ts +5 -0
  176. package/dist/src/video/index.d.ts +2 -0
  177. package/dist/src/video/video-source.d.ts +12 -0
  178. package/dist/src/video/video.d.ts +80 -0
  179. package/dist/stat.js +2 -2
  180. package/dist/status-indicator.js +2 -2
  181. package/dist/step.js +2 -2
  182. package/dist/stepper.js +2 -2
  183. package/dist/{strings-o6v6Hrmn.js → strings-MXyrGrNs.js} +28 -1
  184. package/dist/strings-MXyrGrNs.js.map +1 -0
  185. package/dist/svg.js +2 -2
  186. package/dist/switch.js +3 -3
  187. package/dist/table.js +53 -10
  188. package/dist/table.js.map +1 -1
  189. package/dist/test/carousel.test.d.ts +1 -0
  190. package/dist/test/highlight.test.d.ts +1 -0
  191. package/dist/test/site-footer.test.d.ts +1 -0
  192. package/dist/test/site-header.test.d.ts +1 -0
  193. package/dist/test/video.test.d.ts +1 -0
  194. package/dist/textarea.js +4 -4
  195. package/dist/time-field.js +5 -5
  196. package/dist/time-picker.js +2 -2
  197. package/dist/timeline-item.js +2 -2
  198. package/dist/timeline.js +2 -2
  199. package/dist/{toggle-base-BSzBnLZN.js → toggle-base-I1wE_fVe.js} +2 -2
  200. package/dist/{toggle-base-BSzBnLZN.js.map → toggle-base-I1wE_fVe.js.map} +1 -1
  201. package/dist/tour.js +2 -2
  202. package/dist/transfer-list.js +3 -3
  203. package/dist/tree-chart.js +3 -3
  204. package/dist/tree-item.js +2 -2
  205. package/dist/tree.js +2 -2
  206. package/dist/tsconfig.tsbuildinfo +1 -1
  207. package/dist/typing-indicator.js +2 -2
  208. package/dist/url-field.js +4 -4
  209. package/dist/user-menu.js +2 -2
  210. package/dist/video-IwNmHyft.js +509 -0
  211. package/dist/video-IwNmHyft.js.map +1 -0
  212. package/dist/video.js +12 -0
  213. package/dist/video.js.map +1 -0
  214. package/dist/virtual-list.js +2 -2
  215. package/dist/workflow-timeline.js +2 -2
  216. package/dist/workflow.js +3 -3
  217. package/dist/workspace-switcher.js +2 -2
  218. package/package.json +1 -1
  219. package/readme.md +5 -0
  220. package/src/__internal/i18n/strings.ts +31 -0
  221. package/src/carousel/carousel.scss +124 -0
  222. package/src/carousel/carousel.ts +547 -0
  223. package/src/carousel/index.ts +1 -0
  224. package/src/condition-builder/cb-group-base.scss +5 -1
  225. package/src/condition-builder/cb-group-base.ts +1 -1
  226. package/src/condition-builder/cb-group.scss +4 -0
  227. package/src/highlight/highlight.scss +25 -0
  228. package/src/highlight/highlight.ts +123 -0
  229. package/src/highlight/index.ts +2 -0
  230. package/src/highlight/matches.ts +94 -0
  231. package/src/index.ts +18 -0
  232. package/src/loader.ts +36 -0
  233. package/src/site-footer/index.ts +2 -0
  234. package/src/site-footer/site-footer-group.scss +53 -0
  235. package/src/site-footer/site-footer-group.ts +52 -0
  236. package/src/site-footer/site-footer.scss +171 -0
  237. package/src/site-footer/site-footer.ts +151 -0
  238. package/src/site-header/index.ts +8 -0
  239. package/src/site-header/site-header.scss +238 -0
  240. package/src/site-header/site-header.ts +565 -0
  241. package/src/site-header/site-nav-group.scss +29 -0
  242. package/src/site-header/site-nav-group.ts +57 -0
  243. package/src/site-header/site-nav-link.scss +154 -0
  244. package/src/site-header/site-nav-link.ts +140 -0
  245. package/src/site-header/site-nav-menu.scss +182 -0
  246. package/src/site-header/site-nav-menu.ts +336 -0
  247. package/src/site-header/site-nav-shared.ts +27 -0
  248. package/src/table/table.scss +52 -2
  249. package/src/table/table.ts +20 -6
  250. package/src/video/index.ts +2 -0
  251. package/src/video/video-source.ts +80 -0
  252. package/src/video/video.scss +183 -0
  253. package/src/video/video.ts +246 -0
  254. package/dist/strings-o6v6Hrmn.js.map +0 -1
@@ -0,0 +1,135 @@
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ /** Detail of the `change` event. */
3
+ export interface CarouselChangeDetail {
4
+ /** The first slide in view, from 0. */
5
+ index: number;
6
+ }
7
+ /**
8
+ * @label Carousel
9
+ * @tag wc-carousel
10
+ * @rawTag carousel
11
+ *
12
+ * @summary A row of slides shown one or a few at a time, with previous and next buttons and pickers.
13
+ * @overview
14
+ * <p>Carousel shows its children as slides, <code>per-view</code> at a time, for screenshots on a
15
+ * product page or a row of testimonials. The slides scroll with snap points, so touch swipe,
16
+ * trackpads and the scroll wheel work as they do anywhere else, and previous, next and picker
17
+ * buttons sit under them. With more than seven pages a "3 of 9" counter replaces the pickers.</p>
18
+ * <p>Each slide is never narrower than 15rem, so a carousel of three drops to two and then one as its
19
+ * container narrows. Slides out of view are <code>inert</code>, so Tab never reaches a link the
20
+ * person cannot see.</p>
21
+ * <p>Slides do not move on their own unless you set <code>autoplay</code>, and then a button to stop
22
+ * them comes first in the controls. Rotation pauses while the pointer rests on the carousel or focus
23
+ * is inside it, stops for good when the person uses any control, and does not start at all when the
24
+ * person asks for reduced motion.</p>
25
+ *
26
+ * @slot - The slides: any elements, one per slide. Give a slide an `aria-label` to name it; otherwise it is named "2 of 5".
27
+ *
28
+ * @csspart base - The carousel region.
29
+ * @csspart track - The scrolling row of slides.
30
+ * @csspart controls - The row of buttons under the slides.
31
+ *
32
+ * @cssprop --carousel-gap - Space between slides. Defaults to `--spacing-200`.
33
+ *
34
+ * @fires {CustomEvent<CarouselChangeDetail>} change - Dispatched when the slides in view change because the person used a control or scrolled, or autoplay moved on.
35
+ *
36
+ * @example
37
+ * ```html
38
+ * <wc-carousel label="Testimonials" per-view="3">
39
+ * <blockquote>We moved our incident process off spreadsheets in a week.</blockquote>
40
+ * <blockquote>Our customer portal runs on the same rules as the agents' workspace.</blockquote>
41
+ * <blockquote>Self-hosting took one command and a coffee.</blockquote>
42
+ * </wc-carousel>
43
+ * ```
44
+ * @example
45
+ * ```html
46
+ * <wc-carousel label="Product screenshots" autoplay loop>
47
+ * <img src="/img/workspace.webp" alt="The ITSM workspace" />
48
+ * <img src="/img/portal.webp" alt="The customer portal" />
49
+ * </wc-carousel>
50
+ * ```
51
+ * @tags media layout
52
+ */
53
+ export declare class Carousel extends LitElement {
54
+ static styles: import("lit").CSSResultGroup[];
55
+ /** What the slides are, such as "Testimonials": the name of the carousel region. */
56
+ label: string;
57
+ /** How many slides show at once. Fewer show when the carousel is too narrow for them. */
58
+ perView: number;
59
+ /** The first slide in view, from 0. */
60
+ index: number;
61
+ /** Whether previous and next wrap around from the last page to the first and back. */
62
+ loop: boolean;
63
+ /** Whether the slides move on by themselves. A stop button comes first in the controls. */
64
+ autoplay: boolean;
65
+ /** How long each page shows while `autoplay` runs, in milliseconds. */
66
+ interval: number;
67
+ private slideCount;
68
+ /** How many slides fit: `per-view`, or fewer when the carousel is narrow. */
69
+ private visible;
70
+ /** Whether autoplay rotates the slides: off once the person stops it or uses a control. */
71
+ private rotating;
72
+ /** Whether the pointer or focus is inside, which pauses rotation. */
73
+ private held;
74
+ private readonly track?;
75
+ private readonly i18n;
76
+ private slides;
77
+ /** Whether the person started rotation with the button, so hover and focus no longer pause it. */
78
+ private startedByPerson;
79
+ /** Whether the person stopped rotation or used a control, so autoplay never starts again. */
80
+ private stoppedByPerson;
81
+ /** Whether the next `index` update came from scrolling, so it needs no scroll of its own. */
82
+ private indexFromScroll;
83
+ /** Whether the next scroll to `index` is animated. */
84
+ private smoothScroll;
85
+ private timer?;
86
+ private settleTimer?;
87
+ private readonly resizeObserver;
88
+ private readonly reducedMotion;
89
+ connectedCallback(): void;
90
+ disconnectedCallback(): void;
91
+ protected willUpdate(changed: PropertyValues<this>): void;
92
+ protected firstUpdated(): void;
93
+ protected updated(changed: PropertyValues): void;
94
+ /** Shows the page after the current one, or the first after the last when `loop` is set. */
95
+ next(): void;
96
+ /** Shows the page before the current one, or the last before the first when `loop` is set. */
97
+ previous(): void;
98
+ /** Scrolls the slide at `index`, from 0, into the first place in view. */
99
+ goTo(index: number): void;
100
+ /** The first slide index that still fills the view. */
101
+ private get maxStart();
102
+ private get pageCount();
103
+ /** The page in view: the last one once the view reaches the end. */
104
+ private get page();
105
+ private pageStart;
106
+ private clamp;
107
+ private goToPage;
108
+ private moveTo;
109
+ private dispatchChange;
110
+ private syncVisible;
111
+ /** Names each slide and makes the ones out of view inert. */
112
+ private syncSlides;
113
+ private scrollToIndex;
114
+ /** The slide nearest the start edge of the track. */
115
+ private nearestIndex;
116
+ private get shouldRotate();
117
+ private syncTimer;
118
+ private stopTimer;
119
+ private advance;
120
+ /** The person took over: autoplay stops and does not start again. */
121
+ private stopRotation;
122
+ private readonly handleSlotChange;
123
+ private readonly handleScroll;
124
+ private readonly handlePrevious;
125
+ private readonly handleNext;
126
+ private handlePicker;
127
+ private readonly handleRotation;
128
+ private readonly handlePointerEnter;
129
+ private readonly handlePointerLeave;
130
+ private readonly handleFocusIn;
131
+ private readonly handleFocusOut;
132
+ private renderPickers;
133
+ private renderControls;
134
+ render(): import("lit-html").TemplateResult<1>;
135
+ }
@@ -0,0 +1 @@
1
+ export { Carousel, type CarouselChangeDetail } from './carousel.js';
@@ -0,0 +1,56 @@
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ import { type HighlightRange } from './matches.js';
3
+ export type { HighlightRange } from './matches.js';
4
+ /**
5
+ * @label Highlight
6
+ * @tag wc-highlight
7
+ * @rawTag highlight
8
+ *
9
+ * @summary Marks the words of a search query in a piece of text.
10
+ * @overview
11
+ * <p>Highlight shows its text with each word of <code>query</code> marked, for search results in a
12
+ * knowledge base, a site search or a filtered list. Words match on their own, in any order,
13
+ * ignoring case and accents, so "resume" marks "Résumé".</p>
14
+ * <p>It reads its children as plain text and never parses HTML, so text from records or a search
15
+ * index is safe to put in it. When the server already knows where the matches are, set
16
+ * <code>ranges</code> instead of <code>query</code>.</p>
17
+ * <p>Marks use the tertiary container colour, so they differ from links and from the selection.</p>
18
+ *
19
+ * @slot - The text. Only its text content is used; markup in it is not rendered.
20
+ *
21
+ * @csspart mark - Each marked run of text, a `<mark>` element.
22
+ *
23
+ * @cssprop --highlight-background - Background of the marks. Defaults to `--color-tertiary-container`.
24
+ * @cssprop --highlight-color - Text colour of the marks. Defaults to `--color-on-tertiary-container`.
25
+ *
26
+ * @example
27
+ * ```html
28
+ * <wc-highlight query="reset password">
29
+ * If you forgot your password, choose Forgot password and reset it from the link we email you.
30
+ * </wc-highlight>
31
+ * ```
32
+ * @tags display search
33
+ */
34
+ export declare class Highlight extends LitElement {
35
+ static styles: import("lit").CSSResultGroup[];
36
+ /** The search query whose words are marked. */
37
+ query: string;
38
+ /**
39
+ * Runs to mark, as `[start, end)` offsets in the element's `textContent`, for matches the server
40
+ * already found. When set, `query` is ignored.
41
+ */
42
+ ranges?: HighlightRange[];
43
+ /** The language to fold case in. Defaults to the nearest `lang`, else the browser's. */
44
+ locale?: string;
45
+ /** The element's text content. */
46
+ private text;
47
+ /** Watches the text, so the marks follow when it changes. */
48
+ private readonly textObserver;
49
+ connectedCallback(): void;
50
+ disconnectedCallback(): void;
51
+ protected willUpdate(changed: PropertyValues<this>): void;
52
+ /** The runs to mark, as `[start, end)` offsets in the text. */
53
+ private get marks();
54
+ private syncText;
55
+ render(): import("lit-html").TemplateResult<1>;
56
+ }
@@ -0,0 +1,2 @@
1
+ export { Highlight, type HighlightRange } from './highlight.js';
2
+ export { findMatches } from './matches.js';
@@ -0,0 +1,9 @@
1
+ /** A run of marked text: `[start, end)` in UTF-16 code units of the original text. */
2
+ export type HighlightRange = [start: number, end: number];
3
+ /** Sorts ranges and merges the ones that touch or overlap. */
4
+ export declare function mergeRanges(ranges: readonly HighlightRange[], length: number): HighlightRange[];
5
+ /**
6
+ * Where the words of `query` occur in `text`, each word on its own, ignoring case and accents.
7
+ * Ranges are sorted and do not overlap.
8
+ */
9
+ export declare function findMatches(text: string, query: string, locale?: string): HighlightRange[];
@@ -90,6 +90,15 @@ export { AppBar } from './app-bar/index.js';
90
90
  export { NavigationRail, NavigationRailItem } from './navigation-rail/index.js';
91
91
  export { NavigationBar, NavigationBarItem } from './navigation-bar/index.js';
92
92
  export { NavigationDrawer, NavigationDrawerItem, NavigationDrawerGroup, } from './navigation-drawer/index.js';
93
+ export { SiteHeader, SiteNavMenu, SiteNavGroup, SiteNavLink, } from './site-header/index.js';
94
+ export type { SiteHeaderCloseDetail, SiteNavMenuCloseDetail, SiteNavMenuCloseReason, } from './site-header/index.js';
95
+ export { SiteFooter, SiteFooterGroup } from './site-footer/index.js';
96
+ export { Carousel } from './carousel/index.js';
97
+ export type { CarouselChangeDetail } from './carousel/index.js';
98
+ export { Video, parseVideoSource } from './video/index.js';
99
+ export type { VideoProvider } from './video/index.js';
100
+ export { Highlight, findMatches } from './highlight/index.js';
101
+ export type { HighlightRange } from './highlight/index.js';
93
102
  export { Listbox, ListboxOption } from './listbox/index.js';
94
103
  export type { ListboxChangeDetail } from './listbox/index.js';
95
104
  export { PinInput } from './pin-input/index.js';
@@ -0,0 +1,2 @@
1
+ export { SiteFooter } from './site-footer.js';
2
+ export { SiteFooterGroup } from './site-footer-group.js';
@@ -0,0 +1,34 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Site Footer Group
4
+ * @tag wc-site-footer-group
5
+ * @rawTag site-footer-group
6
+ *
7
+ * @summary A titled column of links in a site footer.
8
+ * @overview
9
+ * <p>A column of a <code>wc-site-footer</code>: a title and a list of links. The column is a
10
+ * navigation landmark named by its <code>label</code>, so a screen reader lists "Product",
11
+ * "Company" and so on among the page's landmarks.</p>
12
+ * <p>Put plain <code>&lt;a&gt;</code> elements or <code>wc-link</code> in it; the group lays them
13
+ * out and styles plain links.</p>
14
+ *
15
+ * @slot - The column's links.
16
+ *
17
+ * @csspart nav - The `<nav>` element.
18
+ * @csspart title - The column's title.
19
+ *
20
+ * @example
21
+ * ```html
22
+ * <wc-site-footer-group label="Developers">
23
+ * <a href="/docs">Docs</a>
24
+ * <a href="https://peacock.redvars.com">Peacock</a>
25
+ * </wc-site-footer-group>
26
+ * ```
27
+ * @tags navigation
28
+ */
29
+ export declare class SiteFooterGroup extends LitElement {
30
+ static styles: import("lit").CSSResultGroup[];
31
+ /** The column's title, also the name of its navigation landmark. */
32
+ label: string;
33
+ render(): import("lit-html").TemplateResult<1>;
34
+ }
@@ -0,0 +1,74 @@
1
+ import { LitElement } from 'lit';
2
+ import { SiteFooterGroup } from './site-footer-group.js';
3
+ /**
4
+ * @label Site Footer
5
+ * @tag wc-site-footer
6
+ * @rawTag site-footer
7
+ *
8
+ * @summary The footer of a website or portal: brand, columns of links, legal links and social links.
9
+ * @overview
10
+ * <p>Site footer is the page's <code>contentinfo</code> landmark. The <code>brand</code> slot and
11
+ * the <code>wc-site-footer-group</code> columns sit at the top; a bottom row holds the
12
+ * <code>legal</code> slot (copyright and policy links) and the <code>social</code> slot (icon
13
+ * buttons that link to the site's profiles).</p>
14
+ * <p>Slots that are empty take no room, so the same component is a full website footer or a slim
15
+ * portal footer with one row of text and links.</p>
16
+ * <p>The footer responds to its own width, not the viewport's: narrower than 48rem the columns wrap
17
+ * two to a row, and narrower than 24rem they stack. Links stay visible at every width, one tap away,
18
+ * rather than folded into an accordion.</p>
19
+ *
20
+ * @slot brand - The site's logo and name, and an optional line of text under it.
21
+ * @slot - The footer's `wc-site-footer-group` columns.
22
+ * @slot legal - Copyright and policy links, in small type.
23
+ * @slot social - Links to the site's profiles, usually `wc-icon-button shape="round"` with an `aria-label` each.
24
+ *
25
+ * @csspart base - The `<footer>` element.
26
+ * @csspart top - The row of the brand and the columns.
27
+ * @csspart groups - The columns.
28
+ * @csspart bottom - The row of the legal and social slots.
29
+ *
30
+ * @cssprop --site-footer-background - Background of the footer. Defaults to `--color-surface-container-low`.
31
+ * @cssprop --site-footer-max-width - Width the footer's content is centred in. Defaults to `none`.
32
+ *
33
+ * @example
34
+ * ```html
35
+ * <wc-site-footer>
36
+ * <a slot="brand" href="/">Redvars</a>
37
+ * <p slot="brand">Code less. Scale everywhere. Build natively.</p>
38
+ * <wc-site-footer-group label="Product">
39
+ * <a href="/tables">Tables and forms</a>
40
+ * <a href="/pricing">Pricing</a>
41
+ * </wc-site-footer-group>
42
+ * <wc-site-footer-group label="Company">
43
+ * <a href="/about">About</a>
44
+ * <a href="/blog">Blog</a>
45
+ * </wc-site-footer-group>
46
+ * <span slot="legal">© 2026 Redvars</span>
47
+ * <a slot="legal" href="/privacy">Privacy</a>
48
+ * <wc-icon-button slot="social" variant="text" shape="round" href="https://github.com/redvars" aria-label="GitHub">
49
+ * <wc-icon name="code"></wc-icon>
50
+ * </wc-icon-button>
51
+ * </wc-site-footer>
52
+ * ```
53
+ * @example
54
+ * ```html
55
+ * <wc-site-footer>
56
+ * <span slot="legal">© Acme Corp. Support hours 08:00–18:00 CET.</span>
57
+ * <a slot="legal" href="/p/support/contact">Contact us</a>
58
+ * <a slot="legal" href="/p/support/privacy">Privacy</a>
59
+ * </wc-site-footer>
60
+ * ```
61
+ * @tags navigation layout
62
+ */
63
+ export declare class SiteFooter extends LitElement {
64
+ static styles: import("lit").CSSResultGroup[];
65
+ static Group: typeof SiteFooterGroup;
66
+ /** Which slots have content. */
67
+ private filled;
68
+ /** Watches the children, so the rows show and hide with their content. */
69
+ private readonly childObserver;
70
+ connectedCallback(): void;
71
+ disconnectedCallback(): void;
72
+ private syncSlots;
73
+ render(): import("lit-html").TemplateResult<1>;
74
+ }
@@ -0,0 +1,4 @@
1
+ export { SiteHeader, type SiteHeaderCloseDetail } from './site-header.js';
2
+ export { SiteNavMenu, type SiteNavMenuCloseDetail, type SiteNavMenuCloseReason, } from './site-nav-menu.js';
3
+ export { SiteNavGroup } from './site-nav-group.js';
4
+ export { SiteNavLink } from './site-nav-link.js';
@@ -0,0 +1,170 @@
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ import { type CloseReason } from '../__internal/controllers/overlay-controller.js';
3
+ import { SiteNavMenu } from './site-nav-menu.js';
4
+ import { SiteNavGroup } from './site-nav-group.js';
5
+ import { SiteNavLink } from './site-nav-link.js';
6
+ /** Detail of the `close` event. */
7
+ export interface SiteHeaderCloseDetail {
8
+ /** Why the navigation drawer closed. */
9
+ reason: CloseReason;
10
+ }
11
+ /**
12
+ * @label Site Header
13
+ * @tag wc-site-header
14
+ * @rawTag site-header
15
+ *
16
+ * @summary The top navigation bar of a website or portal: brand, links, menus and actions.
17
+ * @overview
18
+ * <p>Site header is the banner of a site: the brand at the start, the site's navigation, and actions
19
+ * such as Sign in or a call to action at the end. It is for websites and portals. For an
20
+ * application's own chrome use <code>wc-app-bar</code>, and for a bar at the bottom of a phone
21
+ * screen <code>wc-navigation-bar</code>.</p>
22
+ * <p>Put <code>wc-site-nav-link</code> elements in it for destinations and
23
+ * <code>wc-site-nav-menu</code> elements for sections with several pages. A menu is a disclosure
24
+ * button that opens a panel of links, as a list or, with <code>layout="columns"</code>, as columns
25
+ * of <code>wc-site-nav-group</code> with a featured card. These are links and disclosure buttons,
26
+ * not an ARIA menu, so Tab moves through them as through any links.</p>
27
+ * <p>When the header is narrower than <code>collapse-at</code> (720px by default), or too narrow
28
+ * for the bar's content to fit, the links and
29
+ * menus move into a drawer that slides in from the start edge, opened by a menu button. The
30
+ * <code>actions</code> slot moves to the bottom of the drawer; the <code>end</code> slot stays in
31
+ * the bar, for something that must always show, such as a user menu or one short button.</p>
32
+ * <p>A visually hidden <em>Skip to main content</em> link is the first focusable element. It moves
33
+ * focus to <code>skip-target</code> (<code>#main</code> by default).</p>
34
+ *
35
+ * @slot brand - The site's logo and name, usually a link to the home page.
36
+ * @slot - The navigation: `wc-site-nav-link` and `wc-site-nav-menu` elements.
37
+ * @slot actions - Buttons at the end of the bar, such as Sign in and a call to action. They move to the bottom of the drawer when the header is collapsed.
38
+ * @slot end - Content that always stays in the bar, such as a `wc-user-menu`, a search button or one short call to action.
39
+ *
40
+ * @fires {CustomEvent} open - Dispatched when the navigation drawer opens on a narrow header.
41
+ * @fires {CustomEvent<{reason: 'escape' | 'light-dismiss' | 'action' | 'api'}>} close - Dispatched when the navigation drawer closes: Escape, a click on the scrim, choosing a link, or `hideDrawer()` (and widening the header past `collapse-at`).
42
+ *
43
+ * @csspart bar - The `<header>` bar.
44
+ * @csspart nav - The navigation landmark in the bar.
45
+ * @csspart skip-link - The skip link.
46
+ * @csspart menu-button - The button that opens the drawer.
47
+ * @csspart drawer - The drawer `<dialog>` on a narrow header.
48
+ *
49
+ * @cssprop --site-header-height - Height of the bar. Defaults to 4rem.
50
+ * @cssprop --site-header-background - Background of the bar. Defaults to `--color-surface`.
51
+ * @cssprop --site-header-max-width - Width the bar's content is centred in, for a full-bleed background with a narrower content column. Defaults to `none`.
52
+ * @cssprop --site-header-z-index - Stacking order of the header and its panels. Defaults to 10.
53
+ * @cssprop --site-header-drawer-width - Width of the drawer. Defaults to 22.5rem.
54
+ *
55
+ * @example
56
+ * ```html
57
+ * <wc-site-header>
58
+ * <a slot="brand" href="/">Redvars</a>
59
+ * <wc-site-nav-menu label="Solutions">
60
+ * <wc-site-nav-link href="/itsm">IT service management</wc-site-nav-link>
61
+ * <wc-site-nav-link href="/support">Customer support</wc-site-nav-link>
62
+ * </wc-site-nav-menu>
63
+ * <wc-site-nav-link href="/docs" current>Docs</wc-site-nav-link>
64
+ * <wc-site-nav-link href="/pricing">Pricing</wc-site-nav-link>
65
+ * <wc-link-button slot="actions" variant="text" href="/sign-in">Sign in</wc-link-button>
66
+ * <wc-link-button slot="actions" href="/waitlist">Join the waitlist</wc-link-button>
67
+ * </wc-site-header>
68
+ * ```
69
+ * @example
70
+ * ```html
71
+ * <wc-site-header sticky hide-on-scroll>
72
+ * <a slot="brand" href="/p/support">Acme Support</a>
73
+ * <wc-site-nav-link href="/p/support" current>Home</wc-site-nav-link>
74
+ * <wc-site-nav-link href="/p/support/tickets">My tickets</wc-site-nav-link>
75
+ * <wc-user-menu slot="end" name="Ada Lovelace"></wc-user-menu>
76
+ * </wc-site-header>
77
+ * ```
78
+ * @tags navigation layout
79
+ */
80
+ export declare class SiteHeader extends LitElement {
81
+ static styles: import("lit").CSSResultGroup[];
82
+ static Menu: typeof SiteNavMenu;
83
+ static Group: typeof SiteNavGroup;
84
+ static Link: typeof SiteNavLink;
85
+ /** Accessible name of the navigation landmark. Defaults to Peacock's "Main navigation". */
86
+ label: string;
87
+ /** Header width in pixels below which the navigation moves into a drawer. The header also collapses whenever the bar's content does not fit. */
88
+ collapseAt: number;
89
+ /** Keeps the header at the top of the viewport while the page scrolls. */
90
+ sticky: boolean;
91
+ /** With `sticky`, slides the header away while scrolling down and back while scrolling up. */
92
+ hideOnScroll: boolean;
93
+ /** Selector of the element the skip link moves focus to. */
94
+ skipTarget: string;
95
+ /** Opens a menu's panel when a mouse rests on it, as well as on click. */
96
+ openOnHover: boolean;
97
+ /** Whether the navigation drawer is open. Only has an effect while the header is collapsed. */
98
+ drawerOpen: boolean;
99
+ /** Whether the header is narrower than `collapse-at`. */
100
+ private compact;
101
+ /** Whether the header has slid away while scrolling down. */
102
+ private scrolledAway;
103
+ /** Which slots have content. */
104
+ private filled;
105
+ private dialogElement?;
106
+ /** Peacock's strings for the skip link, the menu button and the landmark. */
107
+ private readonly i18n;
108
+ private readonly overlay;
109
+ /** Watches the header's width against `collapse-at`. */
110
+ private resizeObserver?;
111
+ /** Watches the children, since a slot that is not rendered fires no `slotchange`. */
112
+ private readonly childObserver;
113
+ /** The last measured width of the header. */
114
+ private width;
115
+ /** The header width the bar's content needs, measured while it was last shown wide. */
116
+ private neededWidth;
117
+ /** Watches the bar's parts, whose width changes as links render, fonts load or text changes. */
118
+ private contentObserver?;
119
+ /** Pending measurement after the bar's parts changed size. */
120
+ private fitTimer?;
121
+ /** Scroll position at the last scroll event, to tell the direction. */
122
+ private lastScrollY;
123
+ /** Why the drawer is closing, for the next `close` event. */
124
+ private closeReason;
125
+ /** Whether the drawer was open at the last `open`/`close` event, so each change fires once. */
126
+ private announcedOpen?;
127
+ connectedCallback(): void;
128
+ disconnectedCallback(): void;
129
+ protected willUpdate(changed: PropertyValues): void;
130
+ protected updated(changed: PropertyValues): void;
131
+ /** Whether the header is narrower than `collapse-at`, with its navigation in the drawer. */
132
+ get collapsed(): boolean;
133
+ /** Opens the navigation drawer (while collapsed). */
134
+ showDrawer(): void;
135
+ /** Closes the navigation drawer. */
136
+ hideDrawer(): void;
137
+ /** Closes every open menu panel in the bar. */
138
+ close(): void;
139
+ /** Whether the drawer is showing right now. */
140
+ private get drawerShown();
141
+ private closeDrawer;
142
+ private syncCompact;
143
+ /**
144
+ * Measures the width the wide bar's content needs: the brand, links, actions and end at their
145
+ * natural widths, with the gaps and padding. The header collapses below it, as below
146
+ * `collapse-at`, so links never run into the actions.
147
+ */
148
+ private measureFit;
149
+ /** Reads which slots have content from the light DOM, so it does not depend on what is rendered. */
150
+ private syncSlots;
151
+ private handleScroll;
152
+ /**
153
+ * Fragment links do not reach elements inside shadow roots, so move focus directly. The target is
154
+ * looked for beside the header first, for a header in an app's own shadow root, then in the page.
155
+ */
156
+ private handleSkipClick;
157
+ private handleMenuButtonClick;
158
+ private handleCloseButtonClick;
159
+ /** Choosing a link in the drawer closes it. */
160
+ private handleDrawerLinkClick;
161
+ /** The native Escape `cancel`: keep `drawer-open` in charge. */
162
+ private handleCancel;
163
+ /** The browser closed the dialog on its own: keep `drawer-open` in step. */
164
+ private handleNativeClose;
165
+ /** A click outside the drawer's box lands on its backdrop: a light dismiss. */
166
+ private handleDialogClick;
167
+ private renderMenuButton;
168
+ private renderDrawer;
169
+ render(): import("lit-html").TemplateResult<1>;
170
+ }
@@ -0,0 +1,32 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Site Nav Group
4
+ * @tag wc-site-nav-group
5
+ * @rawTag site-nav-group
6
+ *
7
+ * @summary A titled column of links in a site header menu.
8
+ * @overview
9
+ * <p>Groups <code>wc-site-nav-link</code> elements under a title inside a
10
+ * <code>wc-site-nav-menu</code>, usually one with <code>layout="columns"</code>, where each group is
11
+ * a column. The group is labelled by its title for assistive technology.</p>
12
+ *
13
+ * @slot - The group's `wc-site-nav-link` elements.
14
+ *
15
+ * @csspart title - The group's title.
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <wc-site-nav-group label="Build">
20
+ * <wc-site-nav-link href="/tables">Tables and forms</wc-site-nav-link>
21
+ * <wc-site-nav-link href="/rules">Rules</wc-site-nav-link>
22
+ * </wc-site-nav-group>
23
+ * ```
24
+ * @tags navigation
25
+ */
26
+ export declare class SiteNavGroup extends LitElement {
27
+ static styles: import("lit").CSSResultGroup[];
28
+ /** The group's title. */
29
+ label: string;
30
+ connectedCallback(): void;
31
+ render(): import("lit-html").TemplateResult<1>;
32
+ }
@@ -0,0 +1,65 @@
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ /**
3
+ * @label Site Nav Link
4
+ * @tag wc-site-nav-link
5
+ * @rawTag site-nav-link
6
+ *
7
+ * @summary A destination in a site header, in the bar or in a menu's panel.
8
+ * @overview
9
+ * <p>A link of a <code>wc-site-header</code>. In the bar it is a compact text link; inside a
10
+ * <code>wc-site-nav-menu</code> it is a row that can show an icon and a description. Mark the page
11
+ * the person is on with <code>current</code>, which sets <code>aria-current="page"</code>.</p>
12
+ * <p>It renders a real <code>&lt;a&gt;</code>, so middle-click, Open in new tab and a router that
13
+ * listens for clicks on links all work.</p>
14
+ *
15
+ * @slot - The link's text.
16
+ * @slot icon - An optional icon, shown in a menu's panel.
17
+ *
18
+ * @csspart link - The `<a>` element.
19
+ * @csspart description - The description text.
20
+ *
21
+ * @example
22
+ * ```html
23
+ * <wc-site-nav-link href="/docs" current>Docs</wc-site-nav-link>
24
+ * ```
25
+ * @example
26
+ * ```html
27
+ * <wc-site-nav-link href="/rules" description="Business logic without servers">
28
+ * <wc-icon slot="icon" name="rule"></wc-icon>
29
+ * Rules
30
+ * </wc-site-nav-link>
31
+ * ```
32
+ * @tags navigation
33
+ */
34
+ export declare class SiteNavLink extends LitElement {
35
+ static shadowRootOptions: {
36
+ delegatesFocus: boolean;
37
+ clonable?: boolean;
38
+ customElementRegistry?: CustomElementRegistry;
39
+ mode: ShadowRootMode;
40
+ serializable?: boolean;
41
+ slotAssignment?: SlotAssignmentMode;
42
+ customElements?: CustomElementRegistry;
43
+ registry?: CustomElementRegistry;
44
+ };
45
+ static styles: import("lit").CSSResultGroup[];
46
+ /** The link's address. */
47
+ href: string;
48
+ /** Where to open the link, as on `<a>`. */
49
+ target?: string;
50
+ /** Relationship to the linked page, as on `<a>`. */
51
+ rel?: string;
52
+ /** Marks the page the person is on (`aria-current="page"`). */
53
+ current: boolean;
54
+ /** A line under the label, shown in a menu's panel. */
55
+ description: string;
56
+ /** True when the `icon` slot has content. */
57
+ private hasIcon;
58
+ private linkElement?;
59
+ connectedCallback(): void;
60
+ protected updated(changed: PropertyValues<this>): void;
61
+ focus(): void;
62
+ blur(): void;
63
+ private handleIconSlotChange;
64
+ render(): import("lit-html").TemplateResult<1>;
65
+ }