Skip to content

Commit

Permalink
Merge branch 'main' into fix/tile/collapse-empty-footer
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers authored Feb 9, 2025
2 parents 718559a + 7ab9dc5 commit 8a5700b
Show file tree
Hide file tree
Showing 167 changed files with 2,349 additions and 828 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-fans-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-tooltip>`: make tooltip content available to assistive technology
4 changes: 4 additions & 0 deletions .changeset/fifty-news-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-cta>`: workaround for Safari which sometimes double-renders icons
5 changes: 5 additions & 0 deletions .changeset/fresh-lions-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-code-block>`: enables copy and word wrap action for prerendered content
5 changes: 5 additions & 0 deletions .changeset/rotten-peas-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

Use non-localized font stacks (see [`@rhds/tokens` v2.1.1 release notes](https://github.com/RedHat-UX/red-hat-design-tokens/releases/tag/v2.1.1))
4 changes: 4 additions & 0 deletions .changeset/rude-jeans-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-icon>`: workaround for Safari which sometimes double-renders icons
5 changes: 5 additions & 0 deletions .changeset/spicy-balloons-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

Bump version of `@rhds/tokens`
5 changes: 5 additions & 0 deletions .changeset/warm-forks-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-avatar>`: corrected small viewport margin for `plain` variant avatars
22 changes: 21 additions & 1 deletion docs/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,27 @@
</style>
</noscript>

{% include "../partials/javascript/global.html" %}
<script type="importmap">{{ importMap | dump(2) | safe }}</script>

{# ensure SSR support modules are loaded first #}
{% include 'partials/javascript/dsd-init.html' %}

{# load all components #}
{% for tag in importElements %}
<script type="module">import '@rhds/elements/{{tag}}/{{tag}}.js';</script>
{% endfor %}

{# only load components that need hydrated (aka interactivity) #}
<script type="module">
import '@rhds/elements/rh-button/rh-button.js';
import '@uxdot/elements/uxdot-copy-permalink.js';
import '@uxdot/elements/uxdot-sidenav.js';
import '@uxdot/elements/uxdot-example.js';
</script>

<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js"></script>


</head>

<body dsd-pending class="{{ extraPageClasses }}">
Expand Down
4 changes: 3 additions & 1 deletion docs/_includes/layouts/pages/element.11ty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export default class ElementsPage extends Renderer<Context> {
</noscript>
<script type="module" data-helmet>
// although we load these ssr support modules elsewhere, we still
// need them here to ensure no double-rendering on webkit
import '/assets/javascript/ssr-support.js';
import '@uxdot/elements/uxdot-copy-button.js';
import '@uxdot/elements/uxdot-copy-permalink.js';
import '@uxdot/elements/uxdot-best-practice.js';
Expand Down Expand Up @@ -961,4 +964,3 @@ export default class ElementsPage extends Renderer<Context> {
}
}
};

3 changes: 3 additions & 0 deletions docs/_includes/layouts/pages/has-toc.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ layout: layouts/base.njk
data-helmet>

<script type="module" data-helmet>
// although we load these ssr support modules elsewhere, we still
// need them here to ensure no double-rendering on webkit
import '/assets/javascript/ssr-support.js';
import '@uxdot/elements/uxdot-toc.js';
</script>

Expand Down
3 changes: 3 additions & 0 deletions docs/_includes/partials/component/edit-this-page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
{% endfor %}
{% endif %}
{% set editPath = ('/' + (inputPath or page.inputPath)) | replace(r/^(\.)?\//, '') %}
{% if '30-code.md' in editPath or '90-demos.md' in editPath %}
{% set editPath = 'docs/_includes/layouts/pages/element.11ty.ts' %}
{% endif %}
<a href="https://github.com/RedHat-UX/red-hat-design-system/blob/main/{{ editPath }}?plain=1">Edit this page on GitHub</a>
</div>
13 changes: 13 additions & 0 deletions docs/_includes/partials/javascript/dsd-init.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script type="module">
// although we load these ssr support modules elsewhere, we still
// need them here to ensure no double-rendering on webkit
import '/assets/javascript/ssr-support.js';
// include these, which are often internal to elements,
// and are definitely required by context-picker and context-demo
// to avoid SSR defer-hydration bugs and SSR double-rendering bugs
import '@rhds/elements/rh-icon/rh-icon.js';
import '@rhds/elements/rh-surface/rh-surface.js';
import '@rhds/elements/rh-button/rh-button.js';
import '@rhds/elements/rh-tooltip/rh-tooltip.js';
import '@rhds/elements/rh-tag/rh-tag.js';
</script>
27 changes: 0 additions & 27 deletions docs/_includes/partials/javascript/global.html

This file was deleted.

6 changes: 4 additions & 2 deletions docs/about/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ order: 20
bodyClasses: page-docs
tags:
- about
importElements:
- rh-tile
---

<script type="module" data-helmet>
import '@rhds/elements/rh-tile/rh-tile.js';
</script>

<link data-helmet rel="stylesheet" href="/assets/packages/@rhds/elements/elements/rh-tile/rh-tile-lightdom.css">

<style data-helmet>
Expand Down
6 changes: 4 additions & 2 deletions docs/accessibility/accessibility-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ permalink: /accessibility/accessibility-tools/index.html
tags:
- accessibility
order: 10
importElements:
- rh-blockquote
---

<script type="module" data-helmet>
import '@rhds/elements/rh-blockquote/rh-blockquote.js';
</script>

## Automated Accessibility Tools

Automated tools can help you quickly identify many potential high-impact accessibility issues. Among such tools are free browser extensions like:
Expand Down
10 changes: 6 additions & 4 deletions docs/accessibility/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ title: Content
tags:
- accessibility
order: 40
importElements:
- rh-code-block
- rh-blockquote
- rh-table
---

<link data-helmet
rel="stylesheet"
href="/assets/packages/@rhds/elements/elements/rh-table/rh-table-lightdom.css">

<script type="module" data-helmet>
import '@rhds/elements/rh-code-block/rh-code-block.js';
import '@rhds/elements/rh-blockquote/rh-blockquote.js';
import '@rhds/elements/rh-table/rh-table.js';
</script>

<style data-helmet>
rh-blockquote {
display: block;
Expand Down
8 changes: 5 additions & 3 deletions docs/accessibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
title: Fundamentals
tags:
- accessibility
order: 75
importElements:
- rh-blockquote
order: 1
---

<script type="module" data-helmet>
import '@rhds/elements/rh-blockquote/rh-blockquote.js';
</script>

<style>
rh-blockquote {
display: block;
Expand Down
6 changes: 4 additions & 2 deletions docs/accessibility/screen-readers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ permalink: /accessibility/screen-readers/index.html
tags:
- accessibility
order: 100
importElements:
- rh-tile
---

<script type="module" data-helmet>
import '@rhds/elements/rh-tile/rh-tile.js';
</script>

<link rel="stylesheet"
data-helmet
href="/assets/packages/@rhds/elements/elements/rh-tile/rh-tile-lightdom.css">
Expand Down
5 changes: 5 additions & 0 deletions docs/assets/javascript/ssr-support.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// dsd polyfill needs to happen before hydration attempts
// lit-element-hydrate-support needs to be included before lit is loaded
import '/assets/javascript/dsd-polyfill.js';
import '@lit-labs/ssr-client/lit-element-hydrate-support.js';
import 'element-internals-polyfill';
12 changes: 4 additions & 8 deletions docs/elements/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@
<link rel="stylesheet" href="/styles/demo/styles.css" media="all">

<script type="importmap">{{ importMap | dump(2) | safe }}</script>

{# ensure SSR support modules are loaded first #}
{% include 'partials/javascript/dsd-init.html' %}

<script type="module">
// dsd polyfill needs to happen before hydration attempts
// lit-element-hydrate-support needs to be included before lit is loaded
import '/assets/javascript/dsd-polyfill.js';
import '@lit-labs/ssr-client/lit-element-hydrate-support.js';
import 'element-internals-polyfill';
// include these, which are often internal to elements, to avoid SSR defer-hydration bugs
import '@rhds/elements/rh-icon/rh-icon.js';
import '@rhds/elements/rh-surface/rh-surface.js';
// load up the demo and picker
import '@rhds/elements/lib/elements/rh-context-picker/rh-context-picker.js';
import '@rhds/elements/lib/elements/rh-context-demo/rh-context-demo.js';
Expand Down
2 changes: 1 addition & 1 deletion docs/foundations/typography/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ accommodate mixed-language content. For more technical details, go to the
<rh-table>

| Language | Font family |
|----------|------------------------------|
| -------- | ---------------------------- |
| Chinese | Noto Sans Simplified Chinese |
| Japanese | Noto Sans Japanese |
| Korean | Noto Sans Korean |
Expand Down
8 changes: 5 additions & 3 deletions docs/get-started/developers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ subnav:
collection: sortedDevelopers
order: 00
order: 20
importElements:
- rh-card
- rh-cta
---

<script type="module" data-helmet>
import '@rhds/elements/rh-card/rh-card.js';
import '@rhds/elements/rh-cta/rh-cta.js';
</script>

<style data-helmet>
.grid > rh-card {
display: grid;
Expand Down
12 changes: 7 additions & 5 deletions docs/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ title: Overview
order: 00
tags:
- getstarted
importElements:
- rh-tile
---

<link data-helmet rel="stylesheet" href="/assets/packages/@rhds/elements/elements/rh-tile/rh-tile-lightdom.css">

<script type="module" data-helmet>
import '@rhds/elements/rh-tile/rh-tile.js';
</script>

<style data-helmet>
#get-started-nav {
margin-block-start: var(--rh-space-2xl, 32px);
margin-block-start: var(--rh-space-2xl);
}

#get-started-nav figcaption {
font-family: var(--rh-font-family-heading, RedHatDisplay, 'Red Hat Display', 'Noto Sans Arabic', 'Noto Sans Hebrew', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans Thai', Helvetica, Arial, sans-serif);
font-size: var(--rh-font-size-heading-sm, 1.5rem);
font-family: var(--rh-font-family-heading);
font-size: var(--rh-font-size-heading-sm);
}
</style>

Expand Down
5 changes: 2 additions & 3 deletions docs/patterns/logo-wall/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ tags:
subnav:
collection: logowallPatterns
order: 4
importElements:
- rh-cta
- rh-surface
---

<script type="module" data-helmet>
import '@rhds/elements/rh-surface/rh-surface.js';
import '@rhds/elements/rh-cta/rh-cta.js';
import '@rhds/elements/lib/elements/rh-context-picker/rh-context-picker.js';
</script>

Expand Down
Loading

0 comments on commit 8a5700b

Please sign in to comment.