@f-ewald/components 1.28.0 → 1.29.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/README.md +2 -0
- package/custom-elements.json +434 -3
- package/dist/fullscreen-button.d.ts +43 -0
- package/dist/fullscreen-button.d.ts.map +1 -0
- package/dist/fullscreen-button.js +172 -0
- package/dist/fullscreen-button.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/scroll-dots.d.ts +54 -0
- package/dist/scroll-dots.d.ts.map +1 -0
- package/dist/scroll-dots.js +178 -0
- package/dist/scroll-dots.js.map +1 -0
- package/dist/timeline-container.d.ts +21 -5
- package/dist/timeline-container.d.ts.map +1 -1
- package/dist/timeline-container.js +35 -7
- package/dist/timeline-container.js.map +1 -1
- package/dist/timeline-entry.d.ts +32 -0
- package/dist/timeline-entry.d.ts.map +1 -1
- package/dist/timeline-entry.js +130 -3
- package/dist/timeline-entry.js.map +1 -1
- package/docs/fullscreen-button.md +70 -0
- package/docs/scroll-dots.md +65 -0
- package/docs/timeline-container.md +30 -6
- package/docs/timeline-entry.md +18 -0
- package/llms.txt +112 -8
- package/package.json +1 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, css, html } from "lit";
|
|
8
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
9
|
+
import { iconArrowsPointingIn, iconArrowsPointingOut } from "./icons.js";
|
|
10
|
+
import { tokens } from "./tokens.js";
|
|
11
|
+
const ICON_SIZE = 18;
|
|
12
|
+
/**
|
|
13
|
+
* Toggles fullscreen presentation of the page, or of a given `target` element.
|
|
14
|
+
*
|
|
15
|
+
* The icon and accessible name track the *actual* fullscreen state rather than
|
|
16
|
+
* this button's own clicks, because fullscreen can be left without touching it
|
|
17
|
+
* — Escape, or the browser's own chrome — which would otherwise leave the
|
|
18
|
+
* button showing the wrong affordance.
|
|
19
|
+
*
|
|
20
|
+
* The control is styled as a square icon-sized `ui-button` `secondary` variant
|
|
21
|
+
* (2rem, `--ui-radius-sm` corners, the `--ui-button-secondary-*` background and
|
|
22
|
+
* border tokens, so a gradient theme carries over) layered over an opaque
|
|
23
|
+
* `--ui-surface` base and an elevation shadow, since it normally floats above
|
|
24
|
+
* the content it expands.
|
|
25
|
+
*
|
|
26
|
+
* @element fullscreen-button
|
|
27
|
+
* @fires fullscreen-change - The fullscreen state changed, from this button or
|
|
28
|
+
* otherwise (`detail: { active }`).
|
|
29
|
+
*/
|
|
30
|
+
let FullscreenButton = class FullscreenButton extends LitElement {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
/** Element to present fullscreen; `null` (default) presents the whole page. */
|
|
34
|
+
this.target = null;
|
|
35
|
+
/** Accessible name while not fullscreen. */
|
|
36
|
+
this.enterLabel = "Enter full screen";
|
|
37
|
+
/** Accessible name while fullscreen. */
|
|
38
|
+
this.exitLabel = "Exit full screen";
|
|
39
|
+
this._active = false;
|
|
40
|
+
this.#onChange = () => {
|
|
41
|
+
this._active = isFullscreen();
|
|
42
|
+
this.dispatchEvent(new CustomEvent("fullscreen-change", {
|
|
43
|
+
detail: { active: this._active },
|
|
44
|
+
bubbles: true,
|
|
45
|
+
composed: true,
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Rejections are swallowed: browsers refuse the request outside a user
|
|
50
|
+
* gesture or under a permissions policy, and there is nothing useful to tell
|
|
51
|
+
* the user about it.
|
|
52
|
+
*/
|
|
53
|
+
this.#toggle = async () => {
|
|
54
|
+
const doc = document;
|
|
55
|
+
try {
|
|
56
|
+
if (isFullscreen()) {
|
|
57
|
+
await (doc.exitFullscreen?.() ?? doc.webkitExitFullscreen?.());
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const element = (this.target ?? document.documentElement);
|
|
61
|
+
await (element.requestFullscreen?.() ?? element.webkitRequestFullscreen?.());
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Ignored — see doc comment.
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static { this.styles = [
|
|
69
|
+
tokens,
|
|
70
|
+
css `
|
|
71
|
+
:host {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
}
|
|
74
|
+
button {
|
|
75
|
+
display: inline-flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
width: 2rem;
|
|
80
|
+
height: 2rem;
|
|
81
|
+
padding: 0;
|
|
82
|
+
color: var(--ui-text, #0f172a);
|
|
83
|
+
/* ui-button's secondary variant, over an opaque --ui-surface base: a
|
|
84
|
+
floating control can't let the content behind it show through the
|
|
85
|
+
way a secondary button's transparent flat background does. */
|
|
86
|
+
background:
|
|
87
|
+
var(--ui-button-secondary-background, none),
|
|
88
|
+
var(--ui-surface, #ffffff);
|
|
89
|
+
border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));
|
|
90
|
+
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
91
|
+
box-shadow:
|
|
92
|
+
var(--ui-button-highlight, 0 0 0 0 transparent),
|
|
93
|
+
var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
line-height: var(--ui-line-height-glyph, 1);
|
|
96
|
+
}
|
|
97
|
+
button:hover {
|
|
98
|
+
background:
|
|
99
|
+
var(--ui-button-secondary-background-hover, none),
|
|
100
|
+
var(--ui-surface-muted, #f8fafc);
|
|
101
|
+
border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));
|
|
102
|
+
}
|
|
103
|
+
button:active {
|
|
104
|
+
background:
|
|
105
|
+
var(--ui-button-secondary-background-active, var(--ui-button-secondary-background, none)),
|
|
106
|
+
var(--ui-surface-muted, #f8fafc);
|
|
107
|
+
box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
|
|
108
|
+
}
|
|
109
|
+
button:focus-visible {
|
|
110
|
+
outline: none;
|
|
111
|
+
box-shadow:
|
|
112
|
+
var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)),
|
|
113
|
+
var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
|
|
114
|
+
}
|
|
115
|
+
@media (forced-colors: active) {
|
|
116
|
+
button:focus-visible {
|
|
117
|
+
outline: 2px solid CanvasText;
|
|
118
|
+
outline-offset: 2px;
|
|
119
|
+
box-shadow: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`,
|
|
123
|
+
]; }
|
|
124
|
+
connectedCallback() {
|
|
125
|
+
super.connectedCallback();
|
|
126
|
+
document.addEventListener("fullscreenchange", this.#onChange);
|
|
127
|
+
document.addEventListener("webkitfullscreenchange", this.#onChange);
|
|
128
|
+
this._active = isFullscreen();
|
|
129
|
+
}
|
|
130
|
+
disconnectedCallback() {
|
|
131
|
+
super.disconnectedCallback();
|
|
132
|
+
document.removeEventListener("fullscreenchange", this.#onChange);
|
|
133
|
+
document.removeEventListener("webkitfullscreenchange", this.#onChange);
|
|
134
|
+
}
|
|
135
|
+
render() {
|
|
136
|
+
const label = this._active ? this.exitLabel : this.enterLabel;
|
|
137
|
+
return html `
|
|
138
|
+
<button type="button" aria-label=${label} title=${label} @click=${this.#toggle}>
|
|
139
|
+
${this._active ? iconArrowsPointingIn(ICON_SIZE) : iconArrowsPointingOut(ICON_SIZE)}
|
|
140
|
+
</button>
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
#onChange;
|
|
144
|
+
/**
|
|
145
|
+
* Rejections are swallowed: browsers refuse the request outside a user
|
|
146
|
+
* gesture or under a permissions policy, and there is nothing useful to tell
|
|
147
|
+
* the user about it.
|
|
148
|
+
*/
|
|
149
|
+
#toggle;
|
|
150
|
+
};
|
|
151
|
+
__decorate([
|
|
152
|
+
property({ attribute: false })
|
|
153
|
+
], FullscreenButton.prototype, "target", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
property({ attribute: "enter-label" })
|
|
156
|
+
], FullscreenButton.prototype, "enterLabel", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
property({ attribute: "exit-label" })
|
|
159
|
+
], FullscreenButton.prototype, "exitLabel", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
state()
|
|
162
|
+
], FullscreenButton.prototype, "_active", void 0);
|
|
163
|
+
FullscreenButton = __decorate([
|
|
164
|
+
customElement("fullscreen-button")
|
|
165
|
+
], FullscreenButton);
|
|
166
|
+
export { FullscreenButton };
|
|
167
|
+
/** Whether any element is currently presented fullscreen. */
|
|
168
|
+
function isFullscreen() {
|
|
169
|
+
const doc = document;
|
|
170
|
+
return Boolean(doc.fullscreenElement ?? doc.webkitFullscreenElement);
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=fullscreen-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen-button.js","sourceRoot":"","sources":["../src/fullscreen-button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,M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;gDAAmC;AAG1B;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;oDAAkC;AAGlC;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;mDAAgC;AAErD;IAAhB,KAAK,EAAE;iDAAyB;AAVtB,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAwH5B;;AAED,6DAA6D;AAC7D,SAAS,YAAY;IACnB,MAAM,GAAG,GAAG,QAA0B,CAAC;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,uBAAuB,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconArrowsPointingIn, iconArrowsPointingOut } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\n\n/** Fired after the fullscreen state changes. `detail.active` is the new state. */\nexport interface FullscreenChangeDetail {\n active: boolean;\n}\n\nconst ICON_SIZE = 18;\n\n/**\n * Vendor-prefixed Fullscreen API members still needed by Safari, which has no\n * unprefixed support on the document.\n */\ninterface WebkitDocument extends Document {\n webkitFullscreenElement?: Element | null;\n webkitExitFullscreen?: () => Promise<void> | void;\n}\n\ninterface WebkitElement extends HTMLElement {\n webkitRequestFullscreen?: () => Promise<void> | void;\n}\n\n/**\n * Toggles fullscreen presentation of the page, or of a given `target` element.\n *\n * The icon and accessible name track the *actual* fullscreen state rather than\n * this button's own clicks, because fullscreen can be left without touching it\n * — Escape, or the browser's own chrome — which would otherwise leave the\n * button showing the wrong affordance.\n *\n * The control is styled as a square icon-sized `ui-button` `secondary` variant\n * (2rem, `--ui-radius-sm` corners, the `--ui-button-secondary-*` background and\n * border tokens, so a gradient theme carries over) layered over an opaque\n * `--ui-surface` base and an elevation shadow, since it normally floats above\n * the content it expands.\n *\n * @element fullscreen-button\n * @fires fullscreen-change - The fullscreen state changed, from this button or\n * otherwise (`detail: { active }`).\n */\n@customElement(\"fullscreen-button\")\nexport class FullscreenButton extends LitElement {\n /** Element to present fullscreen; `null` (default) presents the whole page. */\n @property({ attribute: false }) target: HTMLElement | null = null;\n\n /** Accessible name while not fullscreen. */\n @property({ attribute: \"enter-label\" }) enterLabel = \"Enter full screen\";\n\n /** Accessible name while fullscreen. */\n @property({ attribute: \"exit-label\" }) exitLabel = \"Exit full screen\";\n\n @state() private _active = false;\n\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-flex;\n }\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 2rem;\n height: 2rem;\n padding: 0;\n color: var(--ui-text, #0f172a);\n /* ui-button's secondary variant, over an opaque --ui-surface base: a\n floating control can't let the content behind it show through the\n way a secondary button's transparent flat background does. */\n background:\n var(--ui-button-secondary-background, none),\n var(--ui-surface, #ffffff);\n border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow:\n var(--ui-button-highlight, 0 0 0 0 transparent),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n cursor: pointer;\n line-height: var(--ui-line-height-glyph, 1);\n }\n button:hover {\n background:\n var(--ui-button-secondary-background-hover, none),\n var(--ui-surface-muted, #f8fafc);\n border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));\n }\n button:active {\n background:\n var(--ui-button-secondary-background-active, var(--ui-button-secondary-background, none)),\n var(--ui-surface-muted, #f8fafc);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n button:focus-visible {\n outline: none;\n box-shadow:\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n @media (forced-colors: active) {\n button:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n `,\n ];\n\n override connectedCallback(): void {\n super.connectedCallback();\n document.addEventListener(\"fullscreenchange\", this.#onChange);\n document.addEventListener(\"webkitfullscreenchange\", this.#onChange);\n this._active = isFullscreen();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n document.removeEventListener(\"fullscreenchange\", this.#onChange);\n document.removeEventListener(\"webkitfullscreenchange\", this.#onChange);\n }\n\n override render() {\n const label = this._active ? this.exitLabel : this.enterLabel;\n return html`\n <button type=\"button\" aria-label=${label} title=${label} @click=${this.#toggle}>\n ${this._active ? iconArrowsPointingIn(ICON_SIZE) : iconArrowsPointingOut(ICON_SIZE)}\n </button>\n `;\n }\n\n #onChange = (): void => {\n this._active = isFullscreen();\n this.dispatchEvent(\n new CustomEvent<FullscreenChangeDetail>(\"fullscreen-change\", {\n detail: { active: this._active },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n /**\n * Rejections are swallowed: browsers refuse the request outside a user\n * gesture or under a permissions policy, and there is nothing useful to tell\n * the user about it.\n */\n #toggle = async (): Promise<void> => {\n const doc = document as WebkitDocument;\n try {\n if (isFullscreen()) {\n await (doc.exitFullscreen?.() ?? doc.webkitExitFullscreen?.());\n return;\n }\n const element = (this.target ?? document.documentElement) as WebkitElement;\n await (element.requestFullscreen?.() ?? element.webkitRequestFullscreen?.());\n } catch {\n // Ignored — see doc comment.\n }\n };\n}\n\n/** Whether any element is currently presented fullscreen. */\nfunction isFullscreen(): boolean {\n const doc = document as WebkitDocument;\n return Boolean(doc.fullscreenElement ?? doc.webkitFullscreenElement);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"fullscreen-button\": FullscreenButton;\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export { ModalDialog, type ModalDialogSize } from "./modal-dialog.js";
|
|
|
9
9
|
export { ContentDivider } from "./content-divider.js";
|
|
10
10
|
export { ToastNotification, notifySuccess, notifyError, notifyInfo, notifyWarning, type ToastVariant, } from "./toast-notification.js";
|
|
11
11
|
export { ScrollToBottom } from "./scroll-to-bottom.js";
|
|
12
|
+
export { ScrollDots, type DotSelectDetail, type ScrollDotItem, type ScrollDotsItem, } from "./scroll-dots.js";
|
|
12
13
|
export { ScrollToTop } from "./scroll-to-top.js";
|
|
14
|
+
export { FullscreenButton, type FullscreenChangeDetail } from "./fullscreen-button.js";
|
|
13
15
|
export { SlidePanel } from "./slide-panel.js";
|
|
14
16
|
export { CopyLinkButton } from "./copy-link-button.js";
|
|
15
17
|
export { RelativeTime } from "./relative-time.js";
|
|
@@ -56,7 +58,7 @@ export { ActionBar } from "./action-bar.js";
|
|
|
56
58
|
export { PageHeader } from "./page-header.js";
|
|
57
59
|
export { PaginationNav, type PageChangeDetail } from "./pagination-nav.js";
|
|
58
60
|
export { FormActions } from "./form-actions.js";
|
|
59
|
-
export { TimelineContainer } from "./timeline-container.js";
|
|
61
|
+
export { TimelineContainer, type TimelineLayout } from "./timeline-container.js";
|
|
60
62
|
export { TimelineEntry } from "./timeline-entry.js";
|
|
61
63
|
export { CalendarDay } from "./calendar-day.js";
|
|
62
64
|
export { CalendarEntry } from "./calendar-entry.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAA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AC;AACnE,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,9 @@ export { ModalDialog } from "./modal-dialog.js";
|
|
|
9
9
|
export { ContentDivider } from "./content-divider.js";
|
|
10
10
|
export { ToastNotification, notifySuccess, notifyError, notifyInfo, notifyWarning, } from "./toast-notification.js";
|
|
11
11
|
export { ScrollToBottom } from "./scroll-to-bottom.js";
|
|
12
|
+
export { ScrollDots, } from "./scroll-dots.js";
|
|
12
13
|
export { ScrollToTop } from "./scroll-to-top.js";
|
|
14
|
+
export { FullscreenButton } from "./fullscreen-button.js";
|
|
13
15
|
export { SlidePanel } from "./slide-panel.js";
|
|
14
16
|
export { CopyLinkButton } from "./copy-link-button.js";
|
|
15
17
|
export { RelativeTime } from "./relative-time.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,YAAY,GAIb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,aAAa,GAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAA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C9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAuB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAwB,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,mBAAmB,GAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnE,cAAc,YAAY,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { GalleryItem } from \"./gallery-item.js\";\nexport { GalleryItemVariant } from \"./gallery-item-variant.js\";\nexport {\n PhotoGallery,\n type PhotoGalleryChangeReason,\n type PhotoGalleryObjectFit,\n type PhotoGallerySlideChangeDetail,\n} from \"./photo-gallery.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport { ModalDialog, type ModalDialogSize } from \"./modal-dialog.js\";\nexport { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n notifyWarning,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { ScrollToBottom } from \"./scroll-to-bottom.js\";\nexport {\n ScrollDots,\n type DotSelectDetail,\n type ScrollDotItem,\n type ScrollDotsItem,\n} from \"./scroll-dots.js\";\nexport { ScrollToTop } from \"./scroll-to-top.js\";\nexport { FullscreenButton, type FullscreenChangeDetail } from \"./fullscreen-button.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { UserAvatar } from \"./user-avatar.js\";\nexport { MapPin } from \"./map-pin.js\";\nexport { MapCircle } from \"./map-circle.js\";\nexport { MapboxMap } from \"./mapbox-map.js\";\nexport { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { RangeSlider } from \"./range-slider.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { StatusBanner, type StatusBannerVariant } from \"./status-banner.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport { LoadMore } from \"./load-more.js\";\nexport { LoadingSpinner } from \"./loading-spinner.js\";\nexport { LoadingDots } from \"./loading-dots.js\";\nexport {\n ChatMessage,\n type ChatMessageRole,\n type ChatMessageVariant,\n} from \"./chat-message.js\";\nexport { UiCheckbox } from \"./ui-checkbox.js\";\nexport { FormField } from \"./form-field.js\";\nexport { FormSelect, type SelectOption } from \"./form-select.js\";\nexport {\n MultiSelect,\n type MultiSelectOption,\n type MultiSelectVariant,\n} from \"./multi-select.js\";\nexport { DataTable, type DataTableColumn } from \"./data-table.js\";\nexport { TileGrid } from \"./tile-grid.js\";\nexport { TreeView, type TreeNode } from \"./tree-view.js\";\nexport { PopoverPanel } from \"./popover-panel.js\";\nexport {\n DropdownButton,\n type DropdownButtonVariant,\n type DropdownOption,\n} from \"./dropdown-button.js\";\nexport { IconButton } from \"./icon-button.js\";\nexport { KbdHint, type KbdPlatform } from \"./kbd-hint.js\";\nexport { FrameBox } from \"./frame-box.js\";\nexport { AppShell, type SidebarToggleDetail } from \"./app-shell.js\";\nexport { AppSidebar } from \"./app-sidebar.js\";\nexport { ActionBar } from \"./action-bar.js\";\nexport { PageHeader } from \"./page-header.js\";\nexport { PaginationNav, type PageChangeDetail } from \"./pagination-nav.js\";\nexport { FormActions } from \"./form-actions.js\";\nexport { TimelineContainer, type TimelineLayout } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarDay } from \"./calendar-day.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.js\";\nexport { CalendarWeek } from \"./calendar-week.js\";\nexport { CalendarYear } from \"./calendar-year.js\";\nexport {\n KanbanBoard,\n type KanbanCardData,\n type KanbanColumnData,\n type KanbanCardMoveDetail,\n type KanbanCardOpenDetail,\n} from \"./kanban-board.js\";\nexport { KanbanColumn } from \"./kanban-column.js\";\nexport { KanbanCard } from \"./kanban-card.js\";\nexport { TextArea } from \"./text-area.js\";\nexport { LinkCard, type LinkCardStatus } from \"./link-card.js\";\nexport { CardGrid } from \"./card-grid.js\";\nexport { MarkdownView } from \"./markdown-view.js\";\nexport { AutoScroll } from \"./auto-scroll.js\";\nexport { SplitHero } from \"./split-hero.js\";\nexport { TabBar, type TabChangeDetail } from \"./tab-bar.js\";\nexport { TabItem } from \"./tab-item.js\";\nexport { MarkdownEditor } from \"./markdown-editor.js\";\nexport {\n parseFrontMatter,\n formatFrontMatterValue,\n type FrontMatterResult,\n} from \"./utils/front-matter.js\";\nexport {\n formatDuration,\n formatClockDuration,\n type DurationFormat,\n} from \"./utils/duration.js\";\nexport { AudioPlayer } from \"./audio-player.js\";\nexport { VideoPlayer } from \"./video-player.js\";\nexport { CommentComposer } from \"./comment-composer.js\";\nexport { tokens, tokenValues, darkTokenValues } from \"./tokens.js\";\nexport * from \"./icons.js\";\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/** One dot on a `scroll-dots` rail. */
|
|
3
|
+
export interface ScrollDotItem {
|
|
4
|
+
/** Accessible name for the dot's button — the section or slide title. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Renders the dot smaller and quieter, for a section subordinate to its neighbours. */
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** A dot, or a bare string as shorthand for `{ label }`. */
|
|
10
|
+
export type ScrollDotsItem = string | ScrollDotItem;
|
|
11
|
+
/** Fired when the user picks a dot. `detail.index` is the 0-based target. */
|
|
12
|
+
export interface DotSelectDetail {
|
|
13
|
+
index: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Vertical section navigator for a long scrolled page or a slide deck: one dot
|
|
17
|
+
* per section, the active one drawn as an elongated rounded bar rather than a
|
|
18
|
+
* dot, which is the only cue needed to read position at a glance.
|
|
19
|
+
*
|
|
20
|
+
* Controlled, like `pagination-nav`: it owns no scroll behavior and never
|
|
21
|
+
* reads the scroll position. The consumer sets `active` and moves the page in
|
|
22
|
+
* response to `dot-select` — what counts as the active section differs too much
|
|
23
|
+
* between a snapped deck and an ordinary long page to bake in.
|
|
24
|
+
*
|
|
25
|
+
* Positioning is also the consumer's, since a rail is normally fixed into a
|
|
26
|
+
* reserved gutter that only the page knows the width of.
|
|
27
|
+
*
|
|
28
|
+
* The dots use the same lighter-on-top gradient as `map-circle`/`map-pin`,
|
|
29
|
+
* derived from a single base `color` — a rail beside a map reads as the same
|
|
30
|
+
* family of marks as the pins on it.
|
|
31
|
+
*
|
|
32
|
+
* @element scroll-dots
|
|
33
|
+
* @fires dot-select - The user picked a dot (`detail: { index }`).
|
|
34
|
+
*/
|
|
35
|
+
export declare class ScrollDots extends LitElement {
|
|
36
|
+
/** Dots to render, in document order. A bare string is shorthand for `{ label }`. */
|
|
37
|
+
items: ScrollDotsItem[];
|
|
38
|
+
/** 0-based index of the active dot. Out-of-range values simply match no dot. */
|
|
39
|
+
active: number;
|
|
40
|
+
/** Base color the dot gradient is derived from. Empty uses `--ui-primary`. */
|
|
41
|
+
color: string;
|
|
42
|
+
/** Accessible name for the rail, e.g. "Journey stops". */
|
|
43
|
+
label: string;
|
|
44
|
+
static styles: import("lit").CSSResult[];
|
|
45
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
private _renderDot;
|
|
47
|
+
private _select;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
"scroll-dots": ScrollDots;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=scroll-dots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-dots.d.ts","sourceRoot":"","sources":["../src/scroll-dots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,4DAA4D;AAC5D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,aAAa,CAAC;AAEpD,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC,qFAAqF;IACrD,KAAK,EAAE,cAAc,EAAE,CAAM;IAE7D,gFAAgF;IACpD,MAAM,SAAK;IAEvC,8EAA8E;IAClE,KAAK,SAAM;IAEvB,0DAA0D;IAC9C,KAAK,SAAM;IAEvB,OAAgB,MAAM,4BAiFpB;IAEO,MAAM,yCAUd;IAED,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,OAAO;CAShB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, css, html } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { tokens } from "./tokens.js";
|
|
10
|
+
/**
|
|
11
|
+
* Vertical section navigator for a long scrolled page or a slide deck: one dot
|
|
12
|
+
* per section, the active one drawn as an elongated rounded bar rather than a
|
|
13
|
+
* dot, which is the only cue needed to read position at a glance.
|
|
14
|
+
*
|
|
15
|
+
* Controlled, like `pagination-nav`: it owns no scroll behavior and never
|
|
16
|
+
* reads the scroll position. The consumer sets `active` and moves the page in
|
|
17
|
+
* response to `dot-select` — what counts as the active section differs too much
|
|
18
|
+
* between a snapped deck and an ordinary long page to bake in.
|
|
19
|
+
*
|
|
20
|
+
* Positioning is also the consumer's, since a rail is normally fixed into a
|
|
21
|
+
* reserved gutter that only the page knows the width of.
|
|
22
|
+
*
|
|
23
|
+
* The dots use the same lighter-on-top gradient as `map-circle`/`map-pin`,
|
|
24
|
+
* derived from a single base `color` — a rail beside a map reads as the same
|
|
25
|
+
* family of marks as the pins on it.
|
|
26
|
+
*
|
|
27
|
+
* @element scroll-dots
|
|
28
|
+
* @fires dot-select - The user picked a dot (`detail: { index }`).
|
|
29
|
+
*/
|
|
30
|
+
let ScrollDots = class ScrollDots extends LitElement {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
/** Dots to render, in document order. A bare string is shorthand for `{ label }`. */
|
|
34
|
+
this.items = [];
|
|
35
|
+
/** 0-based index of the active dot. Out-of-range values simply match no dot. */
|
|
36
|
+
this.active = 0;
|
|
37
|
+
/** Base color the dot gradient is derived from. Empty uses `--ui-primary`. */
|
|
38
|
+
this.color = "";
|
|
39
|
+
/** Accessible name for the rail, e.g. "Journey stops". */
|
|
40
|
+
this.label = "";
|
|
41
|
+
}
|
|
42
|
+
static { this.styles = [
|
|
43
|
+
tokens,
|
|
44
|
+
css `
|
|
45
|
+
/*
|
|
46
|
+
* will-change promotes the rail to its own compositor layer. A rail is
|
|
47
|
+
* typically fixed over the page's main content — for a map deck, over a
|
|
48
|
+
* WebGL canvas — and without it the browser repaints the dots on the main
|
|
49
|
+
* thread, which flickers and squares off their rounded edges whenever a
|
|
50
|
+
* scroll and an animation are competing for that thread.
|
|
51
|
+
*/
|
|
52
|
+
:host {
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
will-change: transform;
|
|
55
|
+
backface-visibility: hidden;
|
|
56
|
+
}
|
|
57
|
+
nav {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 0.75rem;
|
|
62
|
+
}
|
|
63
|
+
button {
|
|
64
|
+
width: 0.625rem;
|
|
65
|
+
height: 0.625rem;
|
|
66
|
+
padding: 0;
|
|
67
|
+
border: none;
|
|
68
|
+
border-radius: 9999px;
|
|
69
|
+
/* Same lighter-on-top token gradient as map-circle/timeline-entry's
|
|
70
|
+
dot; the base color is swapped via the private --_dot var. */
|
|
71
|
+
background: linear-gradient(
|
|
72
|
+
to bottom,
|
|
73
|
+
color-mix(in srgb, var(--_dot, var(--ui-text-muted, #64748b)) 70%, #ffffff) 0%,
|
|
74
|
+
color-mix(in srgb, var(--_dot, var(--ui-text-muted, #64748b)) 70%, #000000) 100%
|
|
75
|
+
);
|
|
76
|
+
opacity: 0.45;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
/*
|
|
79
|
+
* Size is deliberately absent: height is a layout property, so
|
|
80
|
+
* transitioning it animates on the main thread, where a concurrent
|
|
81
|
+
* animation elsewhere on the page can starve it down to a couple of
|
|
82
|
+
* frames and render the bar with squared-off edges. The size change
|
|
83
|
+
* snaps; only the compositable properties ease.
|
|
84
|
+
*/
|
|
85
|
+
transition: opacity 0.25s ease;
|
|
86
|
+
}
|
|
87
|
+
button.muted {
|
|
88
|
+
width: 0.4rem;
|
|
89
|
+
height: 0.4rem;
|
|
90
|
+
}
|
|
91
|
+
button:hover {
|
|
92
|
+
opacity: 0.8;
|
|
93
|
+
}
|
|
94
|
+
button:focus-visible {
|
|
95
|
+
outline: none;
|
|
96
|
+
box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));
|
|
97
|
+
}
|
|
98
|
+
button.active {
|
|
99
|
+
height: 2.25rem;
|
|
100
|
+
--_dot: var(--_color, var(--ui-primary, #4f46e5));
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
@media (forced-colors: active) {
|
|
104
|
+
button {
|
|
105
|
+
background: GrayText;
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
108
|
+
button.active {
|
|
109
|
+
background: Highlight;
|
|
110
|
+
}
|
|
111
|
+
button:focus-visible {
|
|
112
|
+
outline: 2px solid CanvasText;
|
|
113
|
+
outline-offset: 2px;
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
@media (prefers-reduced-motion: reduce) {
|
|
118
|
+
button {
|
|
119
|
+
transition: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`,
|
|
123
|
+
]; }
|
|
124
|
+
render() {
|
|
125
|
+
const dots = this.items.map((item, index) => this._renderDot(normalize(item), index));
|
|
126
|
+
return html `
|
|
127
|
+
<nav
|
|
128
|
+
aria-label=${this.label}
|
|
129
|
+
style=${this.color === "" ? "" : `--_color: ${this.color}`}
|
|
130
|
+
>
|
|
131
|
+
${dots}
|
|
132
|
+
</nav>
|
|
133
|
+
`;
|
|
134
|
+
}
|
|
135
|
+
_renderDot(item, index) {
|
|
136
|
+
const isActive = index === this.active;
|
|
137
|
+
const classes = [item.muted ? "muted" : "", isActive ? "active" : ""]
|
|
138
|
+
.filter(Boolean)
|
|
139
|
+
.join(" ");
|
|
140
|
+
return html `
|
|
141
|
+
<button
|
|
142
|
+
type="button"
|
|
143
|
+
class=${classes}
|
|
144
|
+
aria-label=${item.label}
|
|
145
|
+
title=${item.label}
|
|
146
|
+
aria-current=${String(isActive)}
|
|
147
|
+
@click=${() => this._select(index)}
|
|
148
|
+
></button>
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
_select(index) {
|
|
152
|
+
this.dispatchEvent(new CustomEvent("dot-select", {
|
|
153
|
+
detail: { index },
|
|
154
|
+
bubbles: true,
|
|
155
|
+
composed: true,
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ attribute: false })
|
|
161
|
+
], ScrollDots.prototype, "items", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: Number })
|
|
164
|
+
], ScrollDots.prototype, "active", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property()
|
|
167
|
+
], ScrollDots.prototype, "color", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property()
|
|
170
|
+
], ScrollDots.prototype, "label", void 0);
|
|
171
|
+
ScrollDots = __decorate([
|
|
172
|
+
customElement("scroll-dots")
|
|
173
|
+
], ScrollDots);
|
|
174
|
+
export { ScrollDots };
|
|
175
|
+
function normalize(item) {
|
|
176
|
+
return typeof item === "string" ? { label: item } : item;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=scroll-dots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-dots.js","sourceRoot":"","sources":["../src/scroll-dots.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAkBrC;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QACL,qFAAqF;QACrD,UAAK,GAAqB,EAAE,CAAC;QAE7D,gFAAgF;QACpD,WAAM,GAAG,CAAC,CAAC;QAEvC,8EAA8E;QAClE,UAAK,GAAG,EAAE,CAAC;QAEvB,0DAA0D;QAC9C,UAAK,GAAG,EAAE,CAAC;IA2HzB,CAAC;aAzHiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EF;KACF,AAjFqB,CAiFpB;IAEO,MAAM;QACb,MAAM,IAAI,GAAG,IAA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C;0CAAY;AAG3B;IAAX,QAAQ,EAAE;yCAAY;AAGX;IAAX,QAAQ,EAAE;yCAAY;AAXZ,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAsItB;;AAED,SAAS,SAAS,CAAC,IAAoB;IACrC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/** One dot on a `scroll-dots` rail. */\nexport interface ScrollDotItem {\n /** Accessible name for the dot's button — the section or slide title. */\n label: string;\n /** Renders the dot smaller and quieter, for a section subordinate to its neighbours. */\n muted?: boolean;\n}\n\n/** A dot, or a bare string as shorthand for `{ label }`. */\nexport type ScrollDotsItem = string | ScrollDotItem;\n\n/** Fired when the user picks a dot. `detail.index` is the 0-based target. */\nexport interface DotSelectDetail {\n index: number;\n}\n\n/**\n * Vertical section navigator for a long scrolled page or a slide deck: one dot\n * per section, the active one drawn as an elongated rounded bar rather than a\n * dot, which is the only cue needed to read position at a glance.\n *\n * Controlled, like `pagination-nav`: it owns no scroll behavior and never\n * reads the scroll position. The consumer sets `active` and moves the page in\n * response to `dot-select` — what counts as the active section differs too much\n * between a snapped deck and an ordinary long page to bake in.\n *\n * Positioning is also the consumer's, since a rail is normally fixed into a\n * reserved gutter that only the page knows the width of.\n *\n * The dots use the same lighter-on-top gradient as `map-circle`/`map-pin`,\n * derived from a single base `color` — a rail beside a map reads as the same\n * family of marks as the pins on it.\n *\n * @element scroll-dots\n * @fires dot-select - The user picked a dot (`detail: { index }`).\n */\n@customElement(\"scroll-dots\")\nexport class ScrollDots extends LitElement {\n /** Dots to render, in document order. A bare string is shorthand for `{ label }`. */\n @property({ attribute: false }) items: ScrollDotsItem[] = [];\n\n /** 0-based index of the active dot. Out-of-range values simply match no dot. */\n @property({ type: Number }) active = 0;\n\n /** Base color the dot gradient is derived from. Empty uses `--ui-primary`. */\n @property() color = \"\";\n\n /** Accessible name for the rail, e.g. \"Journey stops\". */\n @property() label = \"\";\n\n static override styles = [\n tokens,\n css`\n /*\n * will-change promotes the rail to its own compositor layer. A rail is\n * typically fixed over the page's main content — for a map deck, over a\n * WebGL canvas — and without it the browser repaints the dots on the main\n * thread, which flickers and squares off their rounded edges whenever a\n * scroll and an animation are competing for that thread.\n */\n :host {\n display: inline-flex;\n will-change: transform;\n backface-visibility: hidden;\n }\n nav {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n }\n button {\n width: 0.625rem;\n height: 0.625rem;\n padding: 0;\n border: none;\n border-radius: 9999px;\n /* Same lighter-on-top token gradient as map-circle/timeline-entry's\n dot; the base color is swapped via the private --_dot var. */\n background: linear-gradient(\n to bottom,\n color-mix(in srgb, var(--_dot, var(--ui-text-muted, #64748b)) 70%, #ffffff) 0%,\n color-mix(in srgb, var(--_dot, var(--ui-text-muted, #64748b)) 70%, #000000) 100%\n );\n opacity: 0.45;\n cursor: pointer;\n /*\n * Size is deliberately absent: height is a layout property, so\n * transitioning it animates on the main thread, where a concurrent\n * animation elsewhere on the page can starve it down to a couple of\n * frames and render the bar with squared-off edges. The size change\n * snaps; only the compositable properties ease.\n */\n transition: opacity 0.25s ease;\n }\n button.muted {\n width: 0.4rem;\n height: 0.4rem;\n }\n button:hover {\n opacity: 0.8;\n }\n button:focus-visible {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n button.active {\n height: 2.25rem;\n --_dot: var(--_color, var(--ui-primary, #4f46e5));\n opacity: 1;\n }\n @media (forced-colors: active) {\n button {\n background: GrayText;\n opacity: 1;\n }\n button.active {\n background: Highlight;\n }\n button:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n button {\n transition: none;\n }\n }\n `,\n ];\n\n override render() {\n const dots = this.items.map((item, index) => this._renderDot(normalize(item), index));\n return html`\n <nav\n aria-label=${this.label}\n style=${this.color === \"\" ? \"\" : `--_color: ${this.color}`}\n >\n ${dots}\n </nav>\n `;\n }\n\n private _renderDot(item: ScrollDotItem, index: number) {\n const isActive = index === this.active;\n const classes = [item.muted ? \"muted\" : \"\", isActive ? \"active\" : \"\"]\n .filter(Boolean)\n .join(\" \");\n return html`\n <button\n type=\"button\"\n class=${classes}\n aria-label=${item.label}\n title=${item.label}\n aria-current=${String(isActive)}\n @click=${() => this._select(index)}\n ></button>\n `;\n }\n\n private _select(index: number): void {\n this.dispatchEvent(\n new CustomEvent<DotSelectDetail>(\"dot-select\", {\n detail: { index },\n bubbles: true,\n composed: true,\n }),\n );\n }\n}\n\nfunction normalize(item: ScrollDotsItem): ScrollDotItem {\n return typeof item === \"string\" ? { label: item } : item;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"scroll-dots\": ScrollDots;\n }\n}\n"]}
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/** How a `timeline-container` arranges its entries. */
|
|
3
|
+
export type TimelineLayout = "left" | "alternating";
|
|
2
4
|
/**
|
|
3
|
-
* Vertical timeline: a
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Vertical timeline: a connecting line runs down the entries and each slotted
|
|
6
|
+
* `timeline-entry` places a dot on it. This is a thin layout and semantics
|
|
7
|
+
* wrapper — the entries draw the line segments and dots themselves, so the
|
|
8
|
+
* container adds no gap between them (a gap would break the line). Exposed to
|
|
9
|
+
* assistive technology as a list of events.
|
|
10
|
+
*
|
|
11
|
+
* `layout` chooses where the line runs. `left` (the default) puts it down the
|
|
12
|
+
* left edge with each entry's label inline beside its headline. `alternating`
|
|
13
|
+
* centers it and gives each entry three columns — label, line, body — with the
|
|
14
|
+
* two sides swapping on every second entry, for a presentation timeline rather
|
|
15
|
+
* than an event log.
|
|
16
|
+
*
|
|
17
|
+
* The layout is pushed onto each entry rather than read from here, because a
|
|
18
|
+
* shadow-DOM child cannot style itself against an ancestor portably —
|
|
19
|
+
* `:host-context()` is Chromium-only.
|
|
8
20
|
*
|
|
9
21
|
* @element timeline-container
|
|
10
22
|
* @slot - `timeline-entry` elements, in chronological order.
|
|
11
23
|
*/
|
|
12
24
|
export declare class TimelineContainer extends LitElement {
|
|
25
|
+
#private;
|
|
26
|
+
/** Arrangement of the entries: a left-edge line, or a centered alternating one. */
|
|
27
|
+
layout: TimelineLayout;
|
|
13
28
|
static styles: import("lit").CSSResult[];
|
|
14
29
|
connectedCallback(): void;
|
|
30
|
+
protected updated(): void;
|
|
15
31
|
render(): import("lit-html").TemplateResult<1>;
|
|
16
32
|
}
|
|
17
33
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-container.d.ts","sourceRoot":"","sources":["../src/timeline-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"timeline-container.d.ts","sourceRoot":"","sources":["../src/timeline-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAK5C,uDAAuD;AACvD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,aAAa,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,iBAAkB,SAAQ,UAAU;;IAC/C,mFAAmF;IACtD,MAAM,EAAE,cAAc,CAAU;IAE7D,OAAgB,MAAM,4BAOpB;IAEO,iBAAiB,IAAI,IAAI,CAGjC;IAED,UAAmB,OAAO,IAAI,IAAI,CAEjC;IAUQ,MAAM,yCAEd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,iBAAiB,CAAC;KACzC;CACF"}
|