@brad-frost-web/eddie-web-components 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/components/badge/badge.js +38 -19
- package/cdn/components/dot/dot.js +1 -1
- package/cdn/components/header/header.js +24 -20
- package/cdn/components/icon/icon.js +32 -17
- package/cdn/components/logo/logo.js +3 -3
- package/cdn/components/media-scrubber/media-scrubber.js +16 -16
- package/cdn/components/primary-nav/primary-nav.js +25 -16
- package/cdn/components/primary-nav-item/primary-nav-item.js +17 -17
- package/cdn/components/timeline/timeline.js +41 -0
- package/cdn/components/timeline-node/timeline-node.js +76 -0
- package/components/badge/badge.d.ts +47 -19
- package/components/badge/badge.d.ts.map +1 -1
- package/components/badge/badge.js +39 -20
- package/components/dot/dot.js +1 -1
- package/components/header/header.d.ts +12 -2
- package/components/header/header.d.ts.map +1 -1
- package/components/header/header.js +28 -24
- package/components/icon/icon.js +37 -22
- package/components/logo/logo.js +3 -3
- package/components/media-scrubber/media-scrubber.js +5 -5
- package/components/primary-nav/primary-nav.d.ts +14 -0
- package/components/primary-nav/primary-nav.d.ts.map +1 -1
- package/components/primary-nav/primary-nav.js +26 -17
- package/components/primary-nav-item/primary-nav-item.js +18 -18
- package/components/timeline/timeline.d.ts +51 -0
- package/components/timeline/timeline.d.ts.map +1 -0
- package/components/timeline/timeline.js +42 -0
- package/components/timeline-node/timeline-node.d.ts +129 -0
- package/components/timeline-node/timeline-node.d.ts.map +1 -0
- package/components/timeline-node/timeline-node.js +77 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/timeline/timeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,UAAW,SAAQ,SAAS;IACvC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAc;IAEpD;;;;OAIG;IAEH,QAAQ,EAAE,SAAS,GAAG,aAAa,CAAa;IAEhD,iBAAiB;IAOjB,MAAM;CAaP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { unsafeCSS as m, html as c } from "lit";
|
|
2
|
+
import { property as o } from "lit/decorators.js";
|
|
3
|
+
import { EdElement as s } from "../EdElement.js";
|
|
4
|
+
const h = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-timeline{position:relative;padding-inline-start:3rem;--ed-c-timeline-node-marker-block-start: .25rem ;--ed-c-timeline-node-marker-inline-start: -2.1875rem ;--ed-c-timeline-node-marker-inline-end: auto;--ed-c-timeline-node-marker-block-end: auto;--ed-c-timeline-node-marker-highlight-inline-start: -2.25rem ;--ed-c-timeline-node-body-padding-inline-start: 0;--ed-c-timeline-node-body-padding-inline-end: 0}.ed-c-timeline__line{position:absolute;top:0;bottom:0;left:1rem;border-inline-start:var(--ed-theme-border-width-md) solid var(--ed-theme-color-border-default)}.ed-c-timeline--alternating:not(.ed-c-timeline--horizontal){padding-inline-start:0;--ed-c-timeline-node-marker-size: 3.25rem ;--ed-c-timeline-node-marker-highlight-size: 4rem ;--ed-c-timeline-node-marker-block-start: .25rem }.ed-c-timeline--alternating:not(.ed-c-timeline--horizontal) .ed-c-timeline__line{left:50%;transform:translate(-50%)}.ed-c-timeline--alternating:not(.ed-c-timeline--horizontal) ::slotted(ed-timeline-node:nth-child(odd)){display:block;width:50%;margin-inline-start:auto;--ed-c-timeline-node-body-padding-inline-start: 3rem ;--ed-c-timeline-node-marker-inline-start: -1.625rem ;--ed-c-timeline-node-marker-inline-end: auto;--ed-c-timeline-node-marker-highlight-inline-start: -2rem }.ed-c-timeline--alternating:not(.ed-c-timeline--horizontal) ::slotted(ed-timeline-node:nth-child(even)){display:block;width:50%;text-align:right;--ed-c-timeline-node-body-padding-inline-end: 3rem ;--ed-c-timeline-node-marker-inline-start: auto;--ed-c-timeline-node-marker-inline-end: -1.625rem ;--ed-c-timeline-node-marker-highlight-inline-start: auto;--ed-c-timeline-node-marker-highlight-inline-end: -2rem }.ed-c-timeline--horizontal{display:flex;flex-direction:row;gap:2rem;padding-inline-start:0;padding-block-start:3rem;--ed-c-timeline-node-marker-inline-start: calc(50% - .1875rem) ;--ed-c-timeline-node-marker-inline-end: auto;--ed-c-timeline-node-marker-block-start: -2.1875rem ;--ed-c-timeline-node-marker-block-end: auto;--ed-c-timeline-node-marker-highlight-inline-start: calc(50% - .25rem) ;--ed-c-timeline-node-marker-highlight-block-start: -2.25rem }.ed-c-timeline--horizontal .ed-c-timeline__line{top:1rem;bottom:auto;left:0;right:0;border-inline-start:0;border-block-start:var(--ed-theme-border-width-md) solid var(--ed-theme-color-border-default)}.ed-c-timeline--horizontal ::slotted(ed-timeline-node){flex:1;position:relative}.ed-c-timeline--horizontal.ed-c-timeline--alternating{padding-block-start:0;align-items:stretch;--ed-c-timeline-node-marker-size: 3.25rem ;--ed-c-timeline-node-marker-highlight-size: 4rem }.ed-c-timeline--horizontal.ed-c-timeline--alternating .ed-c-timeline__line{top:50%;transform:translateY(-50%)}.ed-c-timeline--horizontal.ed-c-timeline--alternating ::slotted(ed-timeline-node:nth-child(odd)){align-self:flex-start;padding-block-end:3rem;--ed-c-timeline-node-marker-block-start: auto;--ed-c-timeline-node-marker-block-end: -1.625rem ;--ed-c-timeline-node-marker-inline-start: calc(50% - 1.625rem) ;--ed-c-timeline-node-marker-inline-end: auto;--ed-c-timeline-node-marker-highlight-block-end: -2rem ;--ed-c-timeline-node-marker-highlight-inline-start: calc(50% - 2rem) }.ed-c-timeline--horizontal.ed-c-timeline--alternating ::slotted(ed-timeline-node:nth-child(even)){align-self:flex-end;padding-block-start:3rem;--ed-c-timeline-node-marker-block-start: -1.625rem ;--ed-c-timeline-node-marker-block-end: auto;--ed-c-timeline-node-marker-inline-start: calc(50% - 1.625rem) ;--ed-c-timeline-node-marker-inline-end: auto;--ed-c-timeline-node-marker-highlight-block-start: -2rem ;--ed-c-timeline-node-marker-highlight-inline-start: calc(50% - 2rem) }';
|
|
5
|
+
var g = Object.defineProperty, a = (t, i, l, k) => {
|
|
6
|
+
for (var e = void 0, n = t.length - 1, d; n >= 0; n--)
|
|
7
|
+
(d = t[n]) && (e = d(i, l, e) || e);
|
|
8
|
+
return e && g(i, l, e), e;
|
|
9
|
+
};
|
|
10
|
+
class r extends s {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments), this.orientation = "vertical", this.behavior = "stacked";
|
|
13
|
+
}
|
|
14
|
+
static get styles() {
|
|
15
|
+
return m(h);
|
|
16
|
+
}
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "list");
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
const i = this.componentClassNames("ed-c-timeline", {
|
|
22
|
+
"ed-c-timeline--horizontal": this.orientation === "horizontal",
|
|
23
|
+
"ed-c-timeline--alternating": this.behavior === "alternating"
|
|
24
|
+
});
|
|
25
|
+
return c`
|
|
26
|
+
<div class="${i}">
|
|
27
|
+
<div class="ed-c-timeline__line" aria-hidden="true"></div>
|
|
28
|
+
<slot></slot>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
a([
|
|
34
|
+
o({ reflect: !0 })
|
|
35
|
+
], r.prototype, "orientation");
|
|
36
|
+
a([
|
|
37
|
+
o({ reflect: !0 })
|
|
38
|
+
], r.prototype, "behavior");
|
|
39
|
+
customElements.get("ed-timeline") === void 0 && customElements.define("ed-timeline", r);
|
|
40
|
+
export {
|
|
41
|
+
r as EdTimeline
|
|
42
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* A single entry on a timeline. Displays a marker on the connecting line plus
|
|
4
|
+
* an optional eyebrow tag, date, heading, and slotted body content.
|
|
5
|
+
*
|
|
6
|
+
* The component is content-agnostic: visual treatment per content type
|
|
7
|
+
* (article, talk, release, blog post, etc.) is driven by the generic
|
|
8
|
+
* `category` prop, which adds a `.ed-c-timeline-node--{category}` modifier
|
|
9
|
+
* class to the host element. Consumers wire their own per-category styling
|
|
10
|
+
* via attribute selectors and CSS custom properties — see the **Per-category
|
|
11
|
+
* styling** section below.
|
|
12
|
+
*
|
|
13
|
+
* **Per-category styling**
|
|
14
|
+
*
|
|
15
|
+
* The component exposes its internal elements via CSS `::part()` and reflects
|
|
16
|
+
* the `category` attribute on the host. Consumers can reach into the shadow
|
|
17
|
+
* DOM to apply per-category color (or any other treatment) like this:
|
|
18
|
+
*
|
|
19
|
+
* ```css
|
|
20
|
+
* ed-timeline-node[category="blog"] {
|
|
21
|
+
* --ed-c-timeline-node-marker-color: var(--my-blog-color);
|
|
22
|
+
* --ed-c-timeline-node-heading-color: var(--my-blog-color);
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* ed-timeline-node[category="release"]::part(marker) {
|
|
26
|
+
* border-radius: 2px;
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Custom-property hooks (with their fallback tokens):
|
|
31
|
+
*
|
|
32
|
+
* - `--ed-c-timeline-node-marker-color` (fallback: `--ed-theme-color-background-brand`)
|
|
33
|
+
* - `--ed-c-timeline-node-heading-color` (fallback: `inherit`)
|
|
34
|
+
*
|
|
35
|
+
* Exposed parts: `marker`, `body`, `eyebrow`, `date`, `heading`, `content`.
|
|
36
|
+
*
|
|
37
|
+
* **Scroll-in animations**
|
|
38
|
+
*
|
|
39
|
+
* The component does not ship animation logic. Consumers wire their own
|
|
40
|
+
* IntersectionObserver and toggle the `ed-is-visible` class on the host
|
|
41
|
+
* element, then write the animation CSS via the exposed parts:
|
|
42
|
+
*
|
|
43
|
+
* ```js
|
|
44
|
+
* const observer = new IntersectionObserver(entries => {
|
|
45
|
+
* for (const entry of entries) {
|
|
46
|
+
* entry.target.classList.toggle('ed-is-visible', entry.isIntersecting);
|
|
47
|
+
* }
|
|
48
|
+
* }, { threshold: 0.05 });
|
|
49
|
+
* for (const node of document.querySelectorAll('ed-timeline-node')) observer.observe(node);
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* ```css
|
|
53
|
+
* ed-timeline-node::part(marker) { opacity: 0; transform: scale(0); transition: opacity .5s, transform .5s; }
|
|
54
|
+
* ed-timeline-node.ed-is-visible::part(marker) { opacity: 1; transform: scale(1); }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @use Representing a single event, milestone, or entry within an `ed-timeline` wrapper
|
|
58
|
+
* @use Displaying a dated entry with a heading that optionally links to a detail page
|
|
59
|
+
* @use Using `variant="highlight"` to visually emphasize key milestones (current role, major release)
|
|
60
|
+
* @use Setting `datetime` to a machine-readable ISO 8601 value — the `date` label then renders inside a `<time datetime="…">` element
|
|
61
|
+
* @use Setting `category` to a project-defined slug (e.g. `"talk"`, `"release"`, `"blog"`) so consumer CSS can apply per-category visual treatment via `[category="…"]` host selectors and the documented custom-property hooks
|
|
62
|
+
* @use Projecting a custom marker (icon, avatar, accent dot) via the `marker` slot for richer per-node visual treatment that doesn't fit the category-color pattern
|
|
63
|
+
* @use Adding a category or type label above the date via the `eyebrow` slot (e.g. "Talk", "Article", "Project")
|
|
64
|
+
*
|
|
65
|
+
* @dontuse Outside of an `ed-timeline` — the node relies on the parent timeline for its connecting line and spacing context
|
|
66
|
+
* @dontuse Without setting `text` (or projecting heading content) — a node with no heading is visually empty and semantically meaningless
|
|
67
|
+
* @dontuse As a standalone card or list item — use `ed-card` or `ed-r-project-card` for non-timeline contexts
|
|
68
|
+
*
|
|
69
|
+
* @a11y Set `headingTagName` to match the surrounding document outline — do not leave the default `h3` if the timeline appears at a different heading depth
|
|
70
|
+
* @a11y When `href` is provided the heading becomes a link — ensure `text` clearly describes the destination without relying on surrounding visual context
|
|
71
|
+
* @a11y Set `datetime` to a machine-readable ISO 8601 value (e.g. `2026-05`, `2026-05-14`, `2026-05-14T15:30`) so assistive tech and search engines can parse the date
|
|
72
|
+
* @a11y The component sets `role="listitem"` to pair with the parent `ed-timeline`'s `role="list"` — do not override unless the surrounding context requires it
|
|
73
|
+
* @a11y When using consumer-driven scroll animations via `ed-is-visible`, respect `prefers-reduced-motion` in the consumer CSS
|
|
74
|
+
*
|
|
75
|
+
* @slot - Body content for this timeline entry (text passages, images, tags)
|
|
76
|
+
* @slot marker - Custom marker projected over the timeline line in place of the default dot
|
|
77
|
+
* @slot eyebrow - Small category or type label rendered above the date and heading
|
|
78
|
+
*
|
|
79
|
+
* @csspart marker - The marker dot (or wrapper around the slotted custom marker)
|
|
80
|
+
* @csspart body - The wrapper holding eyebrow, date, heading, and content
|
|
81
|
+
* @csspart eyebrow - The eyebrow wrapper (only present when the eyebrow slot is filled)
|
|
82
|
+
* @csspart date - The date label (`<time>` when `datetime` is set, otherwise `<span>`)
|
|
83
|
+
* @csspart heading - The heading element (`ed-heading`)
|
|
84
|
+
* @csspart content - The default-slot wrapper holding body content
|
|
85
|
+
*/
|
|
86
|
+
export declare class EdTimelineNode extends EdElement {
|
|
87
|
+
static get styles(): import('lit').CSSResult;
|
|
88
|
+
/**
|
|
89
|
+
* The heading text for this timeline node
|
|
90
|
+
*/
|
|
91
|
+
text: string;
|
|
92
|
+
/**
|
|
93
|
+
* Display label for the entry date (e.g. "May 2026", "Q2 2026")
|
|
94
|
+
*/
|
|
95
|
+
date?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Machine-readable ISO 8601 datetime for the entry. When set, the `date`
|
|
98
|
+
* label renders inside a `<time datetime="…">` element.
|
|
99
|
+
*/
|
|
100
|
+
datetime?: string;
|
|
101
|
+
/**
|
|
102
|
+
* URL the heading links to. When provided, the heading text becomes a link.
|
|
103
|
+
*/
|
|
104
|
+
href?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Semantic heading tag for the entry heading (h2–h6). Defaults to h3.
|
|
107
|
+
*/
|
|
108
|
+
headingTagName: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
109
|
+
/**
|
|
110
|
+
* Visual variant of the node marker
|
|
111
|
+
*/
|
|
112
|
+
variant?: 'default' | 'highlight';
|
|
113
|
+
/**
|
|
114
|
+
* Free-form category slug. Reflected as an attribute on the host and added
|
|
115
|
+
* as a `.ed-c-timeline-node--{category}` modifier class on the wrapper.
|
|
116
|
+
* Consumers wire per-category styling via `ed-timeline-node[category="…"]`
|
|
117
|
+
* selectors that set the documented `--ed-c-timeline-node-*` custom
|
|
118
|
+
* properties — see the component-level docs for the pattern.
|
|
119
|
+
*/
|
|
120
|
+
category?: string;
|
|
121
|
+
connectedCallback(): void;
|
|
122
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
123
|
+
}
|
|
124
|
+
declare global {
|
|
125
|
+
interface HTMLElementTagNameMap {
|
|
126
|
+
'ed-timeline-node': EdTimelineNode;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=timeline-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-node.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/timeline-node/timeline-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AACtF,OAAO,oBAAoB,CAAC;AAK5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,qBAAa,cAAe,SAAQ,SAAS;IAC3C,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,cAAc,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAExD;;OAEG;IAEH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAElC;;;;;;OAMG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,iBAAiB;IAOjB,MAAM;CAiDP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { EdElement as c } from "../EdElement.js";
|
|
2
|
+
import "../heading/heading.js";
|
|
3
|
+
import { unsafeCSS as p, html as i, nothing as l } from "lit";
|
|
4
|
+
import { property as n } from "lit/decorators.js";
|
|
5
|
+
const g = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-timeline-node{position:relative;padding-block-end:2rem}.ed-c-timeline-node__marker{position:absolute;inset-block-start:var(--ed-c-timeline-node-marker-block-start, .25rem );inset-inline-start:var(--ed-c-timeline-node-marker-inline-start, -2.1875rem );inset-inline-end:var(--ed-c-timeline-node-marker-inline-end, auto);inset-block-end:var(--ed-c-timeline-node-marker-block-end, auto);width:var(--ed-c-timeline-node-marker-size, .375rem );height:var(--ed-c-timeline-node-marker-size, .375rem );border-radius:50%;background:var(--ed-c-timeline-node-marker-color, var(--ed-theme-color-background-brand))}.ed-c-timeline-node--highlight .ed-c-timeline-node__marker{width:var(--ed-c-timeline-node-marker-highlight-size, .5rem );height:var(--ed-c-timeline-node-marker-highlight-size, .5rem );inset-inline-start:var(--ed-c-timeline-node-marker-highlight-inline-start, var(--ed-c-timeline-node-marker-inline-start, -2.25rem ));inset-inline-end:var(--ed-c-timeline-node-marker-highlight-inline-end, var(--ed-c-timeline-node-marker-inline-end, auto));inset-block-start:var(--ed-c-timeline-node-marker-highlight-block-start, var(--ed-c-timeline-node-marker-block-start, .25rem ));inset-block-end:var(--ed-c-timeline-node-marker-highlight-block-end, var(--ed-c-timeline-node-marker-block-end, auto))}.ed-c-timeline-node__marker--custom{background:transparent}.ed-c-timeline-node__marker--custom ::slotted(*){display:block;width:100%;height:100%}.ed-c-timeline-node__body{display:flex;flex-direction:column;gap:.25rem;text-align:inherit;padding-inline-start:var(--ed-c-timeline-node-body-padding-inline-start, 0);padding-inline-end:var(--ed-c-timeline-node-body-padding-inline-end, 0)}.ed-c-timeline-node__eyebrow{font-family:var(--ed-theme-typography-meta-default-font-family);font-weight:var(--ed-theme-typography-meta-default-font-weight);font-size:var(--ed-theme-typography-meta-default-font-size);line-height:var(--ed-theme-typography-meta-default-line-height);letter-spacing:var(--ed-theme-typography-meta-default-letter-spacing);text-transform:var(--ed-theme-typography-meta-default-text-transform);color:var(--ed-c-timeline-node-eyebrow-color, var(--ed-theme-color-content-subtle));text-transform:uppercase;letter-spacing:.04em}.ed-c-timeline-node__date{font-family:var(--ed-theme-typography-meta-default-font-family);font-weight:var(--ed-theme-typography-meta-default-font-weight);font-size:var(--ed-theme-typography-meta-default-font-size);line-height:var(--ed-theme-typography-meta-default-line-height);letter-spacing:var(--ed-theme-typography-meta-default-letter-spacing);text-transform:var(--ed-theme-typography-meta-default-text-transform);color:var(--ed-c-timeline-node-date-color, var(--ed-theme-color-content-subtle))}.ed-c-timeline-node__heading{display:block;color:var(--ed-c-timeline-node-heading-color, inherit)}.ed-c-timeline-node__link{color:inherit;text-decoration:none}.ed-c-timeline-node__link:hover,.ed-c-timeline-node__link:focus{text-decoration:underline;color:var(--ed-theme-link-color-content-hover)}.ed-c-timeline-node__content:empty{display:none}';
|
|
6
|
+
var v = Object.defineProperty, r = (m, d, a, s) => {
|
|
7
|
+
for (var e = void 0, o = m.length - 1, h; o >= 0; o--)
|
|
8
|
+
(h = m[o]) && (e = h(d, a, e) || e);
|
|
9
|
+
return e && v(d, a, e), e;
|
|
10
|
+
};
|
|
11
|
+
class t extends c {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.text = "", this.headingTagName = "h3";
|
|
14
|
+
}
|
|
15
|
+
static get styles() {
|
|
16
|
+
return p(g);
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "listitem");
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
const d = this.componentClassNames("ed-c-timeline-node", {
|
|
23
|
+
"ed-c-timeline-node--highlight": this.variant === "highlight",
|
|
24
|
+
[`ed-c-timeline-node--${this.category}`]: !!this.category
|
|
25
|
+
}), a = !this.slotEmpty("marker"), s = !this.slotEmpty("eyebrow"), e = this.date ? this.datetime ? i`<time class="ed-c-timeline-node__date" part="date" datetime="${this.datetime}">${this.date}</time>` : i`<span class="ed-c-timeline-node__date" part="date">${this.date}</span>` : l, o = this.text ? i`<ed-heading
|
|
26
|
+
class="ed-c-timeline-node__heading"
|
|
27
|
+
part="heading"
|
|
28
|
+
tagName="${this.headingTagName}"
|
|
29
|
+
variant="headline-sm"
|
|
30
|
+
>
|
|
31
|
+
${this.href ? i`<a class="ed-c-timeline-node__link" href="${this.href}">${this.text}</a>` : this.text}
|
|
32
|
+
</ed-heading>` : l;
|
|
33
|
+
return i`
|
|
34
|
+
<div class="${d}">
|
|
35
|
+
<div
|
|
36
|
+
class="ed-c-timeline-node__marker ${a ? "ed-c-timeline-node__marker--custom" : ""}"
|
|
37
|
+
part="marker"
|
|
38
|
+
>
|
|
39
|
+
${a ? i`<slot name="marker"></slot>` : l}
|
|
40
|
+
</div>
|
|
41
|
+
<div class="ed-c-timeline-node__body" part="body">
|
|
42
|
+
${s ? i`<div class="ed-c-timeline-node__eyebrow" part="eyebrow"><slot name="eyebrow"></slot></div>` : l}
|
|
43
|
+
${e}
|
|
44
|
+
${o}
|
|
45
|
+
<div class="ed-c-timeline-node__content" part="content">
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
r([
|
|
54
|
+
n()
|
|
55
|
+
], t.prototype, "text");
|
|
56
|
+
r([
|
|
57
|
+
n()
|
|
58
|
+
], t.prototype, "date");
|
|
59
|
+
r([
|
|
60
|
+
n()
|
|
61
|
+
], t.prototype, "datetime");
|
|
62
|
+
r([
|
|
63
|
+
n()
|
|
64
|
+
], t.prototype, "href");
|
|
65
|
+
r([
|
|
66
|
+
n()
|
|
67
|
+
], t.prototype, "headingTagName");
|
|
68
|
+
r([
|
|
69
|
+
n()
|
|
70
|
+
], t.prototype, "variant");
|
|
71
|
+
r([
|
|
72
|
+
n({ reflect: !0 })
|
|
73
|
+
], t.prototype, "category");
|
|
74
|
+
customElements.get("ed-timeline-node") === void 0 && customElements.define("ed-timeline-node", t);
|
|
75
|
+
export {
|
|
76
|
+
t as EdTimelineNode
|
|
77
|
+
};
|