Skip to content
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
cd524a0
chore: replace old analyzer with new generator
bennypowers Jun 17, 2025
ab94804
docs: cem config
bennypowers Jun 27, 2025
281e50a
chore: deps
bennypowers Jun 29, 2025
aba0e10
chore: deps
bennypowers Jul 16, 2025
28d88b1
Merge branch 'main' into docs/cem-tool-update
bennypowers Jul 16, 2025
dc8015d
docs: further reconfigure, following cem migration
bennypowers Jul 16, 2025
0fb9837
chore: update deps
bennypowers Jul 16, 2025
7f3e044
chore: patch deps
bennypowers Jul 16, 2025
5e7a139
fix: patch
bennypowers Jul 16, 2025
3ad67ee
docs: demo config
bennypowers Jul 16, 2025
2cad4fe
docs: element aliases in jsdoc
bennypowers Jul 16, 2025
40e4fcf
docs: cem config
bennypowers Jul 16, 2025
d7ad783
docs: integrate cem and pfe-tools
bennypowers Jul 16, 2025
5128fcd
chore: update deps
bennypowers Jul 16, 2025
e4180db
chore: update deps
bennypowers Jul 17, 2025
99b96e2
docs: update cem config and 11ty templates
bennypowers Jul 17, 2025
fe92a04
docs: update element jsdocs with aliases
bennypowers Jul 17, 2025
04d7ef3
docs: jsdoc to html comment
bennypowers Jul 18, 2025
5f9a020
chore: downgrade playwright
bennypowers Jul 18, 2025
9b74f26
chore: revert
bennypowers Jul 18, 2025
adfbfd3
docs: alias
bennypowers Jul 18, 2025
5a5b361
docs: cem demos
bennypowers Jul 18, 2025
a746444
chore: tests
bennypowers Jul 18, 2025
5bae4a9
chore: update pfe tools
bennypowers Jul 18, 2025
f155c48
docs: always do the whole analyze run
bennypowers Jul 18, 2025
1483b85
docs: migrate all slot and part jsdoc
bennypowers Jul 18, 2025
6009570
docs: denoise
bennypowers Jul 18, 2025
7a2ac0e
chore: update cem
bennypowers Jul 18, 2025
b7c2e8c
docs: show summary for css parts
bennypowers Jul 19, 2025
f4a55f2
docs: demos
bennypowers Jul 19, 2025
74856d4
Merge branch 'main' into docs/migrate-jsdoc
bennypowers Jul 21, 2025
2583bc1
docs(video-embed): template docs
bennypowers Jul 21, 2025
89c756f
chore: package lock
bennypowers Jul 21, 2025
2f63d13
chore: update deps
bennypowers Jul 21, 2025
eddf9f4
chore: patch eslint-plugin-lit-a11y
bennypowers Jul 21, 2025
b023e03
docs(footer): fix template docs
bennypowers Jul 21, 2025
57e0ece
perf(cta): compose slot template
bennypowers Jul 21, 2025
11e4a86
chore: deps
bennypowers Jul 21, 2025
2fd57a3
chore: patch before lint
bennypowers Jul 21, 2025
4035487
docs: template docs
bennypowers Jul 21, 2025
257f4e2
docs: workaround for big lit ssr oof
bennypowers Jul 21, 2025
13c9d54
docs: migrate css prop jsdoc to css files
bennypowers Jul 21, 2025
f6523bd
docs: review migrate cssprops
bennypowers Jul 21, 2025
ffe41a2
chore: update deps
bennypowers Jul 21, 2025
735da33
style: lint
bennypowers Jul 21, 2025
1739eb6
chore: relax lint rules for css
bennypowers Jul 21, 2025
ccf49e6
style: lint css
bennypowers Jul 21, 2025
9ed9b00
docs: remove duplicated event
bennypowers Jul 21, 2025
7df240e
style: css docs
bennypowers Jul 21, 2025
d3ce0d1
chore: update cem
bennypowers Jul 21, 2025
98564df
Merge branch 'main' into docs/migrate-jsdoc
bennypowers Jul 22, 2025
a1dad13
Merge branch 'main' into docs/migrate-jsdoc
bennypowers Jul 23, 2025
d69a606
chore: update cem deps
bennypowers Jul 23, 2025
86bd62b
docs: order of summary and description
bennypowers Jul 23, 2025
cd5379a
docs(audio-player): well formed yaml
bennypowers Jul 23, 2025
ae73a3c
docs(audio-player): range thumb css prop
bennypowers Jul 23, 2025
9744bb2
docs(audio-player): missing css props
bennypowers Jul 23, 2025
33443b3
style: lint
bennypowers Jul 23, 2025
9f43260
chore: update cem
bennypowers Jul 23, 2025
9dd706e
style: whitespace
bennypowers Jul 23, 2025
15413e5
refactor: classMap
bennypowers Jul 23, 2025
985a32d
chore: update cem
bennypowers Jul 23, 2025
fd8dd0a
chore: update cem
bennypowers Jul 23, 2025
266c9a5
fix(breadcrumb): redundant var call
bennypowers Jul 23, 2025
d9f2367
chore: update cem
bennypowers Jul 23, 2025
3ef1209
docs(navigation-secondary): css prop
bennypowers Jul 24, 2025
a087970
docs(navigation-secondary): css props
bennypowers Jul 24, 2025
b280001
docs(skip-link): default slot
bennypowers Jul 24, 2025
6186eeb
style: lint
bennypowers Jul 24, 2025
8cf0128
docs: go back to dogfooding disclosure
bennypowers Jul 24, 2025
b0859aa
chore: update cem
bennypowers Jul 24, 2025
6f98605
fix(pagination): don't clobber variable
bennypowers Jul 24, 2025
4e465d2
style: lint
bennypowers Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ rules:
'@stylistic/string-quotes': single
'@stylistic/selector-combinator-space-after': always
'@stylistic/selector-combinator-space-before': always
'@stylistic/function-parentheses-newline-inside': never-multi-line
'@stylistic/function-parentheses-newline-inside': null
'@stylistic/function-comma-newline-after': always-multi-line
'@stylistic/indentation':
- 2
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/layouts/pages/element.11ty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ export default class ElementsPage extends Renderer<Context> {
${(await Promise.all(slots.map(async slot => html`
<tr>
<td><code>${slot.name}</code></td>
<td>${await this.#innerMD(slot.description)}</td>
<td>${await this.#innerMD(slot.summary)}</td>
<td>${await this.#innerMD(slot.description)}</td>
</tr>`))).join('')}
</tbody>
</table>
Expand Down Expand Up @@ -652,8 +652,8 @@ export default class ElementsPage extends Renderer<Context> {
${(await Promise.all(parts.map(async part => html`
<tr>
<td><code>${part.name}</code></td>
<td>${await this.#innerMD(part.description)}</td>
<td>${await this.#innerMD(part.summary)}</td>
<td>${await this.#innerMD(part.description)}</td>
</tr>`))).join('')}
</tbody>
</table>
Expand Down
5 changes: 3 additions & 2 deletions elements/rh-accordion/rh-accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class AccordionCollapseEvent extends ComposedEvent {
*
* @fires {AccordionExpandEvent} expand - when a panel expands
* @fires {AccordionCollapseEvent} collapse - when a panel collapses
* @slot - Place the `rh-accordion-header` and `rh-accordion-panel` elements here.
* @attr [accents=inline] Position accents in the header either inline or bottom
*/
@customElement('rh-accordion')
Expand Down Expand Up @@ -150,7 +149,9 @@ export class RhAccordion extends LitElement {
const expanded = this.#expanded;
return html`
<div id="container"
class="${classMap({ large, expanded })}"><slot></slot></div>
class="${classMap({ large, expanded })}"><!--
Place the \`rh-accordion-header\` and \`rh-accordion-panel\` elements here.
Comment thread
bennypowers marked this conversation as resolved.
--><slot></slot></div>
`;
}

Expand Down
8 changes: 3 additions & 5 deletions elements/rh-alert/rh-alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ const toasts = new Set<Required<ToastOptions>>();
* @alias alert
*
* @fires {AlertCloseEvent} close - when the dismissable alert closes
*
* @slot - Provide a description for the alert message
* @slot header - Provide a header for the alert message.
* @slot actions - Provide actions that the user can take for the alert
*
*/
@customElement('rh-alert')
@themable
Expand Down Expand Up @@ -209,6 +204,7 @@ export class RhAlert extends LitElement {
// eslint-disable-next-line lit-a11y/click-events-have-key-events
const footer = html`<footer class="${classMap({ hasActions })}"
@click="${this.#onActionsClick}">
<!-- Provide actions that the user can take for the alert -->
<slot name="actions"></slot>
</footer>`;
return html`
Expand All @@ -228,6 +224,7 @@ export class RhAlert extends LitElement {
<div id="middle-column">
<header ?hidden="${!_isServer && this.#slots.isEmpty('header')}">
<div id="header">
<!-- Provide a header for the alert message. -->
<slot name="header"></slot>
</div>${!this.dismissable && this.variant !== 'toast' ? '' : html`
<div id="header-actions">
Expand All @@ -239,6 +236,7 @@ export class RhAlert extends LitElement {
</div>`}
</header>
<div id="description">
<!-- Provide a description for the alert message -->
<slot></slot>
</div>
${footer}
Expand Down
19 changes: 8 additions & 11 deletions elements/rh-announcement/rh-announcement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ export class AnnouncementCloseEvent extends Event {
*
* @alias announcement
*
* @slot image
* If this slot is used, we expect an image tag with a width and height set.
* An icon, svg, or use of the icon component are also valid in this region.
* @slot Any content that is not designated for the header or footer slot, will go to this slot.
* @slot cta
* If this slot is used, we expect a rh-cta component.
* @fires {AnnouncementCloseEvent} close
* When a user clicks the close/dismiss button on an announcement.
* @csspart row
* The row for the banner. Contains the image and content divs.
* @csspart image
* The image for the banner. Contains the image slot.
*/

@customElement('rh-announcement')
@colorPalettes
@themable
Expand Down Expand Up @@ -76,17 +65,25 @@ export class RhAnnouncement extends LitElement {
'block-start': imagePosBlockStart,
'empty': this.#slots.isEmpty(null),
})}">
<!-- The row for the banner. Contains the image and content divs. -->
<div id="row" part="row">
<!-- The image for the banner. Contains the image slot. -->
<div id="image"
part="image"
class="${classMap({ empty: !this.#slots.hasSlotted('image') })}">
<!--
If this slot is used, we expect an image tag with a width and height set.
An icon, svg, or use of the icon component are also valid in this region.
-->
<slot name="image"></slot>
</div>
<div id="content">
<div id="body" class="${classMap({ empty: this.#slots.isEmpty(null) })}">
<!-- Any content that is not designated for the header or footer slot, will go to this slot. -->
<slot></slot>
</div>
<div id="cta" class="${classMap({ empty: !this.#slots.hasSlotted('cta') })}">
<!-- If this slot is used, we expect a rh-cta component. -->
<slot name="cta"></slot>
</div>
</div>
Expand Down
19 changes: 12 additions & 7 deletions elements/rh-audio-player/rh-audio-player-about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ import { HeadingLevelContextConsumer } from '../../lib/context/headings/consumer

/**
* Audio Player About Panel
* @slot heading - custom heading for panel
* @slot - panel content
* @slot profile - `<rh-avatar>` for attribution
* @csspart heading - panel heading
* @csspart body - panel body
* @csspart profile - panel profile / avatar
*/
@customElement('rh-audio-player-about')
export class RhAudioPlayerAbout extends LitElement {
Expand All @@ -45,7 +39,9 @@ export class RhAudioPlayerAbout extends LitElement {
const heading = this.#headings.wrap(mediatitle ?? '');

return html`
<!-- panel heading -->
Comment thread
bennypowers marked this conversation as resolved.
<rh-audio-player-scrolling-text-overflow id="title" part="heading">
<!-- custom heading for panel -->
<slot name="heading">${label}</slot>
</rh-audio-player-scrolling-text-overflow>${!mediatitle ? `` : !mediaseries ? heading : html`
<hgroup class="media-info" part="heading">${!mediaseries ? '' : html`
Expand All @@ -56,7 +52,16 @@ export class RhAudioPlayerAbout extends LitElement {
${heading}
</rh-audio-player-scrolling-text-overflow>
</hgroup>`}
<div part="body" ?hidden="${!hasContent}" tabindex=0><slot></slot></div>
<!-- panel body -->
<div part="body" ?hidden="${!hasContent}" tabindex=0><!-- panel content --><slot></slot></div>
<!--
part:
description: |
panel profile / avatar
slot:
description: |
\`<rh-avatar>\` for attribution
-->
<slot part="profile" name="profile"></slot>`;
}

Expand Down
3 changes: 2 additions & 1 deletion elements/rh-audio-player/rh-audio-player-range-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ input[type='range'] {
--_interactive-color: var(--rh-color-border-interactive);
--_accent-color: var(--rh-color-accent-brand);
--_outline: var(--rh-border-width-md, 2px) solid var(--_interactive-color);
--_thumb-color: var(--rh-audio-player-range-thumb-color, var(--_accent-color));
--_thumb-color: /** color of time and volume range slider thumb */
var(--rh-audio-player-range-thumb-color, var(--_accent-color));
--_progress-color: var(--rh-audio-player-range-progress-color, var(--_accent-color));

&:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
flex: 1 0 auto;
overflow-y: visible;

/** color of fade effect (should match background) */
--_fade-color:
light-dark(var(--rh-audio-player-scrolling-text-overflow-background-color,
var(--rh-color-surface-lightest, #ffffff)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ import styles from './rh-audio-player-scrolling-text-overflow.css';

/**
* Audio Player Scrolling Text Overflow
* @slot - inline text to scroll if wider than host
* @cssprop [--rh-audio-player-scrolling-text-overflow-background-color=var(--rh-color-surface-lightest, #ffffff)]
* color of fade effect (should match background)
*/
@customElement('rh-audio-player-scrolling-text-overflow')
@themable
export class RhAudioPlayerScrollingTextOverflow extends LitElement {
static readonly styles = [styles];


#scrolling = false;

#style?: CSSStyleDeclaration;
Expand All @@ -42,18 +38,21 @@ export class RhAudioPlayerScrollingTextOverflow extends LitElement {
}

render() {
const { direction } = this.#style ?? {};
const direction = this.#style?.direction ?? 'auto';
const scrolling = this.#scrolling;
const scrollable = this.#isScrollable;
return html`
<div id="outer"
class="${classMap({ [direction || 'auto']: true })}"
class="${classMap({ [direction]: true })}"
@mouseover=${this.startScrolling}
@mouseout=${this.stopScrolling}
@focus=${this.startScrolling}
@blur=${this.stopScrolling}>
<div id="inner">
<slot class="${this.#scrolling ? 'scrolling' : ''} ${this.#isScrollable ? 'scrollable' : ''}"></slot>
</div>
${this.#isScrollable ? html`<span id="fade"></span>` : ''}
<!-- inline text to scroll if wider than host -->
Comment thread
bennypowers marked this conversation as resolved.
<slot class="${classMap({ scrolling, scrollable })}"></slot>
</div>${!scrollable ? '' : html`
<span id="fade"></span>`}
</div>`;
}

Expand Down
13 changes: 7 additions & 6 deletions elements/rh-audio-player/rh-audio-player-subscribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ import styles from './rh-audio-player-subscribe.css';

/**
* Audio Player Subscribe Panel
* @slot heading - custom heading for panel
* @slot - panel content
* @slot link - link to subscribe to podcast
* @csspart heading - scrolling text overflow
* @csspart body - body content slot
* @csspart links - subscribe links
*/
@customElement('rh-audio-player-subscribe')
export class RhAudioPlayerSubscribe extends LitElement {
Expand All @@ -36,10 +30,17 @@ export class RhAudioPlayerSubscribe extends LitElement {

override render() {
return html`
<!-- scrolling text overflow -->
<rh-audio-player-scrolling-text-overflow part="heading">
<!-- custom heading for panel -->
<slot name="heading">${this.#headings.wrap(this.menuLabel)}</slot>
</rh-audio-player-scrolling-text-overflow>
<!-- panel content -->
<slot part="body" ?hidden="${this.#slots.isEmpty(null)}"></slot>
<!-- slot:
summary: link to subscribe to podcast
part:
summary: subscribe links -->
<slot name="link" part="links"></slot>`;
}

Expand Down
23 changes: 18 additions & 5 deletions elements/rh-audio-player/rh-audio-player.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,18 @@ button {
--_about-mediatitle-display: none;
--_about-heading-display: flex;
--_box-shadow: light-dark(var(--rh-box-shadow-md, 0 4px 6px 1px rgba(21, 21, 21, 0.25)), none);
--_secondary-opacity: var(--rh-audio-player-secondary-opacity, 1);
--_secondary-opacity: /** player secondary opacity used for partially faded elements - */
var(--rh-audio-player-secondary-opacity, 1);
--_text-color: var(--rh-audio-player-text-color, var(--rh-color-text-primary));
--_border-color: var(--rh-color-border-subtle);
--_border-color: /** color of player border - */
var(--rh-color-border-subtle);
--_surface-color:
light-dark(var(--rh-audio-player-background-color, var(--rh-color-surface-lightest, #ffffff)),
var(--rh-audio-player-background-color, var(--rh-color-surface-darkest, #151515)));
--_secondary-text-color:
light-dark(
/** color of player background - */
var(--rh-audio-player-background-color, var(--rh-color-surface-lightest, #ffffff)),
var(--rh-audio-player-background-color, var(--rh-color-surface-darkest, #151515))
);
--_secondary-text-color: /** player secondary text color - */
var(--rh-audio-player-secondary-text-color,
var(--rh-color-text-secondary));
--_static-border-color: var(--rh-color-border-subtle);
Expand All @@ -58,9 +63,17 @@ button {
--_static-surface-focus-color:
light-dark(var(--rh-color-surface-light, #e0e0e0),
var(--rh-color-surface-dark, #383838));

/** padding top on tooltips - */
--rh-tooltip-content-padding-block-start: var(--rh-space-md, 8px);

/** padding bottom on tooltips - */
--rh-tooltip-content-padding-block-end: var(--rh-space-md, 8px);

/** padding left on tooltips - */
--rh-tooltip-content-padding-inline-start: var(--rh-space-md, 8px);

/** padding right on tooltips - */
--rh-tooltip-content-padding-inline-end: var(--rh-space-md, 8px);
--rh-audio-player-scrolling-text-overflow-background-color: var(--_surface-color);

Expand Down
Loading