@redvars/peacock 4.2.0 → 4.3.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.
- package/dist/{BaseField-_unSNU5x.js → BaseField-CHBcjVc2.js} +3 -3
- package/dist/{BaseField-_unSNU5x.js.map → BaseField-CHBcjVc2.js.map} +1 -1
- package/dist/{BaseInput-DtZH0fPJ.js → BaseInput-DZp2O8Gh.js} +2 -2
- package/dist/{BaseInput-DtZH0fPJ.js.map → BaseInput-DZp2O8Gh.js.map} +1 -1
- package/dist/ai-badge.js +2 -2
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-progress-D7Nmfh1s.js → base-progress-CKQ32Ruw.js} +2 -2
- package/dist/{base-progress-D7Nmfh1s.js.map → base-progress-CKQ32Ruw.js.map} +1 -1
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/calendar.js +2 -2
- package/dist/{canvas-base-CWQ4rQ2s.js → canvas-base-BoKef3yr.js} +2 -2
- package/dist/{canvas-base-CWQ4rQ2s.js.map → canvas-base-BoKef3yr.js.map} +1 -1
- package/dist/carousel.js +644 -0
- package/dist/carousel.js.map +1 -0
- package/dist/{cartesian-chart-CS5yRLfE.js → cartesian-chart-DqZxnoG1.js} +2 -2
- package/dist/{cartesian-chart-CS5yRLfE.js.map → cartesian-chart-DqZxnoG1.js.map} +1 -1
- package/dist/{cb-group-base-CO30uFQZ.js → cb-group-base-Bf7iOIGS.js} +2 -2
- package/dist/{cb-group-base-CO30uFQZ.js.map → cb-group-base-Bf7iOIGS.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +4 -4
- package/dist/chart-bar.js +4 -4
- package/dist/{chart-base-C_XKVyhf.js → chart-base-ByCJM_9C.js} +2 -2
- package/dist/{chart-base-C_XKVyhf.js.map → chart-base-ByCJM_9C.js.map} +1 -1
- package/dist/chart-doughnut.js +3 -3
- package/dist/chart-line.js +4 -4
- package/dist/chart-pie.js +3 -3
- package/dist/chat-event.js +2 -2
- package/dist/chat-message.js +2 -2
- package/dist/chat-thread.js +2 -2
- package/dist/checkbox-group.js +3 -3
- package/dist/checkbox.js +3 -3
- package/dist/chip-set.js +2 -2
- package/dist/chip.js +2 -2
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +3 -3
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +4 -4
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +24 -12
- package/dist/comment-composer.js.map +1 -1
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +4 -4
- package/dist/custom-elements-jsdocs.json +936 -56
- package/dist/custom-elements.json +3486 -554
- package/dist/date-field.js +5 -5
- package/dist/date-picker.js +2 -2
- package/dist/date-range-field.js +5 -5
- package/dist/datetime-field.js +5 -5
- package/dist/dependency-map.js +3 -3
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/{diagram-Va096vj9.js → diagram-Cnrj-4y3.js} +2 -2
- package/dist/{diagram-Va096vj9.js.map → diagram-Cnrj-4y3.js.map} +1 -1
- package/dist/diagram-controls.js +2 -2
- package/dist/diagram-minimap.js +2 -2
- package/dist/diagram.js +4 -4
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +2 -2
- package/dist/discussion-comment.js +2 -2
- package/dist/discussion.js +4 -4
- package/dist/{document-editor-Dc8JeFVB.js → document-editor-C8ThjDQ7.js} +22 -10
- package/dist/{document-editor-Dc8JeFVB.js.map → document-editor-C8ThjDQ7.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +2 -2
- package/dist/erd.js +3 -3
- package/dist/file-upload.js +3 -3
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +4 -4
- package/dist/form.js +2 -2
- package/dist/{generative-view-BKlcuujw.js → generative-view-CQ8-g1wY.js} +2 -2
- package/dist/{generative-view-BKlcuujw.js.map → generative-view-CQ8-g1wY.js.map} +1 -1
- package/dist/generative-view.js +3 -3
- package/dist/highlight-Be0wu7kh.js +252 -0
- package/dist/highlight-Be0wu7kh.js.map +1 -0
- package/dist/highlight.js +6 -0
- package/dist/highlight.js.map +1 -0
- package/dist/html-editor.js +29 -12
- package/dist/html-editor.js.map +1 -1
- package/dist/{i18n-controller-DJHsE1YH.js → i18n-controller-DLJcJ5gO.js} +2 -2
- package/dist/{i18n-controller-DJHsE1YH.js.map → i18n-controller-DLJcJ5gO.js.map} +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +3 -3
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/listbox.js +2 -2
- package/dist/loader-full.js +19 -9
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +46 -9
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +29 -12
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mention-input.js +4 -4
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +2 -2
- package/dist/number-field.js +4 -4
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +4 -4
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +4 -4
- package/dist/{picker-field-CUI05sWc.js → picker-field-B5xOFc3-.js} +3 -3
- package/dist/{picker-field-CUI05sWc.js.map → picker-field-B5xOFc3-.js.map} +1 -1
- package/dist/pin-input.js +4 -4
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +24 -12
- package/dist/prompt-input.js.map +1 -1
- package/dist/radio.js +3 -3
- package/dist/rating.js +3 -3
- package/dist/redvars-loader.js +2 -2
- package/dist/relative-time.js +2 -2
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-N_hqnXej.js → rich-text-input-C4B9D6oD.js} +21 -18
- package/dist/rich-text-input-C4B9D6oD.js.map +1 -0
- package/dist/{schema-Dy0z-80u.js → schema-CPhNrjrx.js} +2 -2
- package/dist/{schema-Dy0z-80u.js.map → schema-CPhNrjrx.js.map} +1 -1
- package/dist/search.js +3 -3
- package/dist/select.js +4 -4
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +3 -3
- package/dist/site-footer-group.js +142 -0
- package/dist/site-footer-group.js.map +1 -0
- package/dist/site-footer.js +338 -0
- package/dist/site-footer.js.map +1 -0
- package/dist/site-header.js +774 -0
- package/dist/site-header.js.map +1 -0
- package/dist/site-nav-group.js +123 -0
- package/dist/site-nav-group.js.map +1 -0
- package/dist/site-nav-link.js +321 -0
- package/dist/site-nav-link.js.map +1 -0
- package/dist/site-nav-menu.js +506 -0
- package/dist/site-nav-menu.js.map +1 -0
- package/dist/site-nav-shared-BDR2HG8e.js +23 -0
- package/dist/site-nav-shared-BDR2HG8e.js.map +1 -0
- package/dist/slider.js +3 -3
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +2 -2
- package/dist/src/__internal/i18n/strings.d.ts +24 -1
- package/dist/src/__internal/rich-text/rich-text-input.d.ts +6 -1
- package/dist/src/carousel/carousel.d.ts +135 -0
- package/dist/src/carousel/index.d.ts +1 -0
- package/dist/src/highlight/highlight.d.ts +56 -0
- package/dist/src/highlight/index.d.ts +2 -0
- package/dist/src/highlight/matches.d.ts +9 -0
- package/dist/src/html-editor/html-editor.d.ts +5 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/markdown-editor/markdown-editor.d.ts +5 -0
- package/dist/src/site-footer/index.d.ts +2 -0
- package/dist/src/site-footer/site-footer-group.d.ts +34 -0
- package/dist/src/site-footer/site-footer.d.ts +74 -0
- package/dist/src/site-header/index.d.ts +4 -0
- package/dist/src/site-header/site-header.d.ts +170 -0
- package/dist/src/site-header/site-nav-group.d.ts +32 -0
- package/dist/src/site-header/site-nav-link.d.ts +65 -0
- package/dist/src/site-header/site-nav-menu.d.ts +104 -0
- package/dist/src/site-header/site-nav-shared.d.ts +13 -0
- package/dist/src/video/index.d.ts +2 -0
- package/dist/src/video/video-source.d.ts +12 -0
- package/dist/src/video/video.d.ts +80 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-DnYjGbbc.js → strings-MXyrGrNs.js} +28 -2
- package/dist/strings-MXyrGrNs.js.map +1 -0
- package/dist/svg.js +2 -2
- package/dist/switch.js +3 -3
- package/dist/table.js +2 -2
- package/dist/test/carousel.test.d.ts +1 -0
- package/dist/test/highlight.test.d.ts +1 -0
- package/dist/test/site-footer.test.d.ts +1 -0
- package/dist/test/site-header.test.d.ts +1 -0
- package/dist/test/video.test.d.ts +1 -0
- package/dist/textarea.js +4 -4
- package/dist/time-field.js +5 -5
- package/dist/time-picker.js +2 -2
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-CXmFSp3b.js → toggle-base-I1wE_fVe.js} +2 -2
- package/dist/{toggle-base-CXmFSp3b.js.map → toggle-base-I1wE_fVe.js.map} +1 -1
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +3 -3
- package/dist/tree-chart.js +3 -3
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +4 -4
- package/dist/user-menu.js +2 -2
- package/dist/video-IwNmHyft.js +509 -0
- package/dist/video-IwNmHyft.js.map +1 -0
- package/dist/video.js +12 -0
- package/dist/video.js.map +1 -0
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-timeline.js +2 -2
- package/dist/workflow.js +3 -3
- package/dist/workspace-switcher.js +2 -2
- package/package.json +1 -1
- package/readme.md +5 -0
- package/src/__internal/i18n/strings.ts +31 -1
- package/src/__internal/rich-text/editor-chrome.scss +27 -10
- package/src/__internal/rich-text/rich-text-input.ts +17 -16
- package/src/carousel/carousel.scss +124 -0
- package/src/carousel/carousel.ts +547 -0
- package/src/carousel/index.ts +1 -0
- package/src/highlight/highlight.scss +25 -0
- package/src/highlight/highlight.ts +123 -0
- package/src/highlight/index.ts +2 -0
- package/src/highlight/matches.ts +94 -0
- package/src/html-editor/html-editor.ts +5 -0
- package/src/index.ts +18 -0
- package/src/loader.ts +36 -0
- package/src/markdown-editor/markdown-editor.ts +5 -0
- package/src/site-footer/index.ts +2 -0
- package/src/site-footer/site-footer-group.scss +53 -0
- package/src/site-footer/site-footer-group.ts +52 -0
- package/src/site-footer/site-footer.scss +171 -0
- package/src/site-footer/site-footer.ts +151 -0
- package/src/site-header/index.ts +8 -0
- package/src/site-header/site-header.scss +238 -0
- package/src/site-header/site-header.ts +565 -0
- package/src/site-header/site-nav-group.scss +29 -0
- package/src/site-header/site-nav-group.ts +57 -0
- package/src/site-header/site-nav-link.scss +154 -0
- package/src/site-header/site-nav-link.ts +140 -0
- package/src/site-header/site-nav-menu.scss +182 -0
- package/src/site-header/site-nav-menu.ts +336 -0
- package/src/site-header/site-nav-shared.ts +27 -0
- package/src/video/index.ts +2 -0
- package/src/video/video-source.ts +80 -0
- package/src/video/video.scss +183 -0
- package/src/video/video.ts +246 -0
- package/dist/rich-text-input-N_hqnXej.js.map +0 -1
- package/dist/strings-DnYjGbbc.js.map +0 -1
|
@@ -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><a></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
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
/** Why a menu's panel closed. */
|
|
3
|
+
export type SiteNavMenuCloseReason = 'action' | 'escape' | 'light-dismiss';
|
|
4
|
+
/** Detail of the `close` event. */
|
|
5
|
+
export interface SiteNavMenuCloseDetail {
|
|
6
|
+
/** Why the panel closed. */
|
|
7
|
+
reason: SiteNavMenuCloseReason;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @label Site Nav Menu
|
|
11
|
+
* @tag wc-site-nav-menu
|
|
12
|
+
* @rawTag site-nav-menu
|
|
13
|
+
*
|
|
14
|
+
* @summary A section of a site header that opens a panel of links.
|
|
15
|
+
* @overview
|
|
16
|
+
* <p>A disclosure button in a <code>wc-site-header</code> that shows a panel of
|
|
17
|
+
* <code>wc-site-nav-link</code> elements under the bar. The default <code>layout="list"</code> is a
|
|
18
|
+
* short list under the button. <code>layout="columns"</code> is a wide panel of
|
|
19
|
+
* <code>wc-site-nav-group</code> columns, with an optional featured card in the
|
|
20
|
+
* <code>feature</code> slot.</p>
|
|
21
|
+
* <p>It follows the disclosure navigation pattern, not the ARIA menu pattern: the button has
|
|
22
|
+
* <code>aria-expanded</code>, and the links follow it in the Tab order while the panel is open.
|
|
23
|
+
* Click, Enter or Space opens the panel; Escape closes it and returns focus to the button, and so
|
|
24
|
+
* does a click outside or moving focus out of it. Only one menu in a header is open at a time.
|
|
25
|
+
* Arrow Down on the button opens the panel at its first link, and the arrow keys, Home and End move
|
|
26
|
+
* between the links.</p>
|
|
27
|
+
* <p>The menu shows as current when one of its links is <code>current</code>. When the header is
|
|
28
|
+
* collapsed into its drawer, the menu becomes an expandable section of the drawer, expanded when it
|
|
29
|
+
* holds the current page.</p>
|
|
30
|
+
*
|
|
31
|
+
* @slot - The panel's `wc-site-nav-link` and `wc-site-nav-group` elements.
|
|
32
|
+
* @slot feature - A card shown at the end of a `columns` panel, such as a `wc-card` announcing news. Left out of the drawer.
|
|
33
|
+
*
|
|
34
|
+
* @fires {CustomEvent} open - Dispatched when the person opens the panel.
|
|
35
|
+
* @fires {CustomEvent<{reason: 'action' | 'escape' | 'light-dismiss'}>} close - Dispatched when the person closes the panel: the button, Escape, or a click or focus outside.
|
|
36
|
+
*
|
|
37
|
+
* @csspart trigger - The disclosure button.
|
|
38
|
+
* @csspart panel - The panel of links.
|
|
39
|
+
*
|
|
40
|
+
* @cssprop --site-nav-menu-panel-width - Width of a `list` panel. Defaults to 16rem.
|
|
41
|
+
* @cssprop --site-nav-menu-columns-max-width - Widest a `columns` panel grows. Defaults to 60rem.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```html
|
|
45
|
+
* <wc-site-nav-menu label="Product" layout="columns">
|
|
46
|
+
* <wc-site-nav-group label="Build">
|
|
47
|
+
* <wc-site-nav-link href="/tables" description="Describe data, get secured screens">
|
|
48
|
+
* <wc-icon slot="icon" name="table"></wc-icon>Tables and forms
|
|
49
|
+
* </wc-site-nav-link>
|
|
50
|
+
* </wc-site-nav-group>
|
|
51
|
+
* <wc-card slot="feature" href="/blog/1-0">…</wc-card>
|
|
52
|
+
* </wc-site-nav-menu>
|
|
53
|
+
* ```
|
|
54
|
+
* @tags navigation
|
|
55
|
+
*/
|
|
56
|
+
export declare class SiteNavMenu extends LitElement {
|
|
57
|
+
static shadowRootOptions: {
|
|
58
|
+
delegatesFocus: boolean;
|
|
59
|
+
clonable?: boolean;
|
|
60
|
+
customElementRegistry?: CustomElementRegistry;
|
|
61
|
+
mode: ShadowRootMode;
|
|
62
|
+
serializable?: boolean;
|
|
63
|
+
slotAssignment?: SlotAssignmentMode;
|
|
64
|
+
customElements?: CustomElementRegistry;
|
|
65
|
+
registry?: CustomElementRegistry;
|
|
66
|
+
};
|
|
67
|
+
static styles: import("lit").CSSResultGroup[];
|
|
68
|
+
static get observedAttributes(): string[];
|
|
69
|
+
/** The button's text. */
|
|
70
|
+
label: string;
|
|
71
|
+
/** Whether the panel is open. */
|
|
72
|
+
open: boolean;
|
|
73
|
+
/** `"list"`: a short list under the button; `"columns"`: a wide panel of groups. */
|
|
74
|
+
layout: 'list' | 'columns';
|
|
75
|
+
/** True when the `feature` slot has content. */
|
|
76
|
+
private hasFeature;
|
|
77
|
+
private triggerElement?;
|
|
78
|
+
/** Pending open or close from `open-on-hover`. */
|
|
79
|
+
private hoverTimer?;
|
|
80
|
+
connectedCallback(): void;
|
|
81
|
+
disconnectedCallback(): void;
|
|
82
|
+
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
83
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
84
|
+
focus(): void;
|
|
85
|
+
blur(): void;
|
|
86
|
+
/** Whether the header has moved the navigation into its drawer. */
|
|
87
|
+
private get collapsed();
|
|
88
|
+
private holdsCurrent;
|
|
89
|
+
private links;
|
|
90
|
+
private header;
|
|
91
|
+
/** Opens or closes as the person asked, and says so. */
|
|
92
|
+
private setOpen;
|
|
93
|
+
private listenOutside;
|
|
94
|
+
private stopListeningOutside;
|
|
95
|
+
private handleDocumentPointerDown;
|
|
96
|
+
private handleTriggerClick;
|
|
97
|
+
private handleKeydown;
|
|
98
|
+
/** Focus leaving the menu (to the next link in the bar, say) closes its panel. */
|
|
99
|
+
private handleFocusOut;
|
|
100
|
+
private handlePointerEnter;
|
|
101
|
+
private handlePointerLeave;
|
|
102
|
+
private handleFeatureSlotChange;
|
|
103
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Tags of the site header's navigation parts. */
|
|
2
|
+
export declare const NAV_PARTS: {
|
|
3
|
+
readonly header: "wc-site-header";
|
|
4
|
+
readonly menu: "wc-site-nav-menu";
|
|
5
|
+
readonly group: "wc-site-nav-group";
|
|
6
|
+
readonly link: "wc-site-nav-link";
|
|
7
|
+
};
|
|
8
|
+
/** Attribute a header sets on its navigation parts while it is collapsed into a drawer. */
|
|
9
|
+
export declare const COLLAPSED_ATTRIBUTE = "data-collapsed";
|
|
10
|
+
/** Marks every navigation part inside `header` as collapsed or not. */
|
|
11
|
+
export declare function syncCollapsed(header: Element, collapsed: boolean): void;
|
|
12
|
+
/** For a part connected after its header rendered: take the header's collapsed state. */
|
|
13
|
+
export declare function adoptCollapsed(part: Element): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Where a video plays from. */
|
|
2
|
+
export type VideoProvider = 'youtube' | 'vimeo' | 'file';
|
|
3
|
+
export interface VideoSource {
|
|
4
|
+
provider: VideoProvider;
|
|
5
|
+
/** The player URL to load on play, for YouTube and Vimeo; the file URL for a file. */
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reads a video URL. YouTube links play through youtube-nocookie.com and Vimeo links with
|
|
10
|
+
* `dnt=1`, so neither sets tracking cookies; any other URL is treated as a video file.
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseVideoSource(src: string): VideoSource;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
import { type VideoProvider } from './video-source.js';
|
|
3
|
+
export type { VideoProvider } from './video-source.js';
|
|
4
|
+
/**
|
|
5
|
+
* @label Video
|
|
6
|
+
* @tag wc-video
|
|
7
|
+
* @rawTag video
|
|
8
|
+
*
|
|
9
|
+
* @summary A video from YouTube, Vimeo or a file, that loads its player only when the person presses play.
|
|
10
|
+
* @overview
|
|
11
|
+
* <p>Video shows a poster with a play button. A YouTube or Vimeo player loads only on that click, so
|
|
12
|
+
* the page makes no request to the video site until the person asks for the video: no cookies, no
|
|
13
|
+
* tracking, and a faster page. YouTube plays through <code>youtube-nocookie.com</code> and Vimeo with
|
|
14
|
+
* Do Not Track, and a line on the poster says where the video plays from.</p>
|
|
15
|
+
* <p>Any other <code>src</code> is a video file, shown in the browser's own player with its
|
|
16
|
+
* controls. Put <code><track></code> elements in the video for captions and subtitles.</p>
|
|
17
|
+
* <p>The video keeps its <code>aspect-ratio</code> before and after it loads, so nothing on the page
|
|
18
|
+
* moves.</p>
|
|
19
|
+
*
|
|
20
|
+
* @slot - `<track>` elements for a video file's captions and subtitles.
|
|
21
|
+
*
|
|
22
|
+
* @csspart base - The frame that holds the poster or the player.
|
|
23
|
+
* @csspart play-button - The poster button that loads and plays the video.
|
|
24
|
+
* @csspart player - The `<iframe>` or `<video>`.
|
|
25
|
+
*
|
|
26
|
+
* @cssprop --video-shape - Corner radius of the frame. Defaults to `--shape-corner-large`.
|
|
27
|
+
*
|
|
28
|
+
* @fires {CustomEvent} play - Dispatched when the person starts the video: the player loads, or the file starts playing.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```html
|
|
32
|
+
* <wc-video
|
|
33
|
+
* src="https://www.youtube.com/watch?v=aqz-KE-bpKQ"
|
|
34
|
+
* label="Build a portal in ten minutes"
|
|
35
|
+
* duration="9:42"
|
|
36
|
+
* poster="/img/portal-video.webp"
|
|
37
|
+
* ></wc-video>
|
|
38
|
+
* ```
|
|
39
|
+
* @example
|
|
40
|
+
* ```html
|
|
41
|
+
* <wc-video src="/media/tour.mp4" poster="/media/tour.webp" label="Product tour">
|
|
42
|
+
* <track kind="captions" src="/media/tour.en.vtt" srclang="en" label="English" default />
|
|
43
|
+
* </wc-video>
|
|
44
|
+
* ```
|
|
45
|
+
* @tags media
|
|
46
|
+
*/
|
|
47
|
+
export declare class Video extends LitElement {
|
|
48
|
+
static styles: import("lit").CSSResultGroup[];
|
|
49
|
+
/** A YouTube or Vimeo link, or the URL of a video file. */
|
|
50
|
+
src: string;
|
|
51
|
+
/** An image shown before the video plays. Without one, the frame shows the label on a plain surface. */
|
|
52
|
+
poster: string;
|
|
53
|
+
/** The video's title: shown on the poster, and the name of the play button and the player. */
|
|
54
|
+
label: string;
|
|
55
|
+
/** The video's length as text, such as `9:42`, shown on the poster. */
|
|
56
|
+
duration: string;
|
|
57
|
+
/** The frame's width to height, as a CSS `aspect-ratio`. */
|
|
58
|
+
aspectRatio: string;
|
|
59
|
+
/** Whether the person pressed play, so the YouTube or Vimeo player is loaded. */
|
|
60
|
+
private loaded;
|
|
61
|
+
private readonly player?;
|
|
62
|
+
private readonly i18n;
|
|
63
|
+
/** Whether the next update moves focus to the player that just loaded. */
|
|
64
|
+
private focusPlayer;
|
|
65
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
66
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
67
|
+
/** Where the video plays from, read from `src`. */
|
|
68
|
+
get provider(): VideoProvider;
|
|
69
|
+
/** Loads the player and starts the video, as the play button does. */
|
|
70
|
+
play(): void;
|
|
71
|
+
private get source();
|
|
72
|
+
private get name();
|
|
73
|
+
/** Copies the light DOM `<track>` children into the shadow `<video>`, where tracks must be. */
|
|
74
|
+
private syncTracks;
|
|
75
|
+
private readonly handleSlotChange;
|
|
76
|
+
private readonly handleVideoPlay;
|
|
77
|
+
private renderFile;
|
|
78
|
+
private renderEmbed;
|
|
79
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
80
|
+
}
|
package/dist/stat.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { e } from './class-map-NDIkZErE.js';
|
|
4
|
-
import { I as I18nController } from './i18n-controller-
|
|
4
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
5
5
|
import './directive-ZPhl09Yt.js';
|
|
6
|
-
import './strings-
|
|
6
|
+
import './strings-MXyrGrNs.js';
|
|
7
7
|
import './locale-DEsJZCQG.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = i`* {
|
package/dist/status-indicator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i, w, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
|
-
import { I as I18nController } from './i18n-controller-
|
|
4
|
-
import './strings-
|
|
3
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
4
|
+
import './strings-MXyrGrNs.js';
|
|
5
5
|
import './locale-DEsJZCQG.js';
|
|
6
6
|
|
|
7
7
|
var css_248z = i`* {
|
package/dist/step.js
CHANGED
|
@@ -3,10 +3,10 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
7
7
|
import './base-Cl6v8-BZ.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
|
-
import './strings-
|
|
9
|
+
import './strings-MXyrGrNs.js';
|
|
10
10
|
import './locale-DEsJZCQG.js';
|
|
11
11
|
|
|
12
12
|
var css_248z = i`* {
|
package/dist/stepper.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { R as RovingFocusController } from './roving-focus-controller-fm95JkZJ.js';
|
|
4
|
-
import { I as I18nController } from './i18n-controller-
|
|
4
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
5
5
|
import { Step } from './step.js';
|
|
6
|
-
import './strings-
|
|
6
|
+
import './strings-MXyrGrNs.js';
|
|
7
7
|
import './locale-DEsJZCQG.js';
|
|
8
8
|
import './state-BCeDVCI9.js';
|
|
9
9
|
import './query-CHb9Ft_d.js';
|
|
@@ -15,7 +15,6 @@ const defaultStrings = {
|
|
|
15
15
|
disabled: 'Disabled',
|
|
16
16
|
readOnly: 'Read only',
|
|
17
17
|
dragToReorder: 'Drag to reorder',
|
|
18
|
-
readOnlyTag: 'Read Only',
|
|
19
18
|
// ── Intents (alert, notification) ────────────────────────────────────────
|
|
20
19
|
intentNote: 'Note',
|
|
21
20
|
intentInfo: 'Info',
|
|
@@ -110,6 +109,33 @@ const defaultStrings = {
|
|
|
110
109
|
/** Title of the svg preview dialog, for example "Preview: Logo". */
|
|
111
110
|
previewTitle: (title) => `Preview: ${title}`,
|
|
112
111
|
svgPreview: 'SVG preview',
|
|
112
|
+
// ── Carousel and video ───────────────────────────────────────────────────
|
|
113
|
+
/** Spoken role of a carousel, read as "Testimonials, carousel". */
|
|
114
|
+
carouselRole: 'carousel',
|
|
115
|
+
/** Spoken role of each slide, read as "2 of 5, slide". */
|
|
116
|
+
carouselSlideRole: 'slide',
|
|
117
|
+
/** Name of each slide, for example "2 of 5". */
|
|
118
|
+
carouselSlideLabel: (position, total) => `${position} of ${total}`,
|
|
119
|
+
previousSlide: 'Previous slide',
|
|
120
|
+
nextSlide: 'Next slide',
|
|
121
|
+
/** The autoplay button while slides rotate. */
|
|
122
|
+
stopSlideRotation: 'Stop slide rotation',
|
|
123
|
+
/** The autoplay button while slides are still. */
|
|
124
|
+
startSlideRotation: 'Start slide rotation',
|
|
125
|
+
/** Name of the group of picker buttons. */
|
|
126
|
+
chooseSlide: 'Choose slide',
|
|
127
|
+
/** A picker button, for example "Slide 2 of 5" or "Slides 4 to 6 of 9". */
|
|
128
|
+
carouselPicker: (first, last, total) => first === last
|
|
129
|
+
? `Slide ${first} of ${total}`
|
|
130
|
+
: `Slides ${first} to ${last} of ${total}`,
|
|
131
|
+
/** The counter shown instead of pickers when there are many pages, for example "3 of 9". */
|
|
132
|
+
carouselCounter: (page, total) => `${page} of ${total}`,
|
|
133
|
+
/** Name of a video without `label`. */
|
|
134
|
+
video: 'Video',
|
|
135
|
+
/** The play button of a video, for example "Play: Build a portal in ten minutes". */
|
|
136
|
+
playVideo: (label) => `Play: ${label}`,
|
|
137
|
+
videoFromYouTube: 'Plays from YouTube (no cookies)',
|
|
138
|
+
videoFromVimeo: 'Plays from Vimeo',
|
|
113
139
|
// ── Navigation ───────────────────────────────────────────────────────────
|
|
114
140
|
navigation: 'Navigation',
|
|
115
141
|
mainNavigation: 'Main navigation',
|
|
@@ -1074,4 +1100,4 @@ function onPeacockStringsChange(listener) {
|
|
|
1074
1100
|
}
|
|
1075
1101
|
|
|
1076
1102
|
export { defaultStrings as d, onPeacockStringsChange as o, peacockString as p, setPeacockStrings as s };
|
|
1077
|
-
//# sourceMappingURL=strings-
|
|
1103
|
+
//# sourceMappingURL=strings-MXyrGrNs.js.map
|