Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dialog): use native HTML dialog element #1865

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d6434fe
style: remove extra line from `.gitattributes` file
adamjohnson Aug 29, 2024
9a75fb8
Merge branch 'main' into staging/clefairy
bennypowers Sep 1, 2024
f9a6bd8
docs(tokens): remove copy button from value col
bennypowers Sep 2, 2024
f44edd9
feat(skip-link): href attr (#1813)
bennypowers Sep 3, 2024
24d190d
feat(dialog): use `rh-button` for dialog close button
adamjohnson Sep 3, 2024
7c9af0e
Merge branch 'main' into staging/clefairy
zeroedin Sep 3, 2024
59f4797
Merge branch 'main' into staging/clefairy
bennypowers Sep 5, 2024
2f13bf5
Merge branch 'main' into staging/clefairy
zeroedin Sep 5, 2024
c9e724a
fix: remove rti from navigations (#1821)
zeroedin Sep 6, 2024
da943f8
fix(accordion): bold accordion headers (#1806)
adamjohnson Sep 9, 2024
dd03b95
feat: theme properties (#1792)
bennypowers Sep 11, 2024
4cdf3bd
perf(audio-player): easier to ssr
bennypowers Sep 11, 2024
445ab56
feat(code-block): client-side highlighting (#1837)
bennypowers Sep 11, 2024
e084ff1
Merge branch 'main' into staging/clefairy
bennypowers Sep 12, 2024
68c31a9
style: lint
bennypowers Sep 12, 2024
c15fea2
feat(dialog): use native dialog WIP
adamjohnson Sep 13, 2024
6de8948
chore: lit css nesting (#1845)
bennypowers Sep 15, 2024
0f1311e
fix: theming for elements (#1853)
bennypowers Sep 15, 2024
72641a4
fix(tabs): always on
bennypowers Sep 15, 2024
8ee8afe
fix(tile): font-weight
bennypowers Sep 15, 2024
95f912b
docs: copy demo assets
bennypowers Sep 15, 2024
dc8b5f1
docs: demo assets
bennypowers Sep 15, 2024
818440d
fix(alert): missing id
bennypowers Sep 15, 2024
d646110
docs(accordion): disclosure link trailing slash
bennypowers Sep 12, 2024
1675338
perf: use node-native glob
bennypowers Sep 16, 2024
0440570
perf: replace cheerio with parse5
bennypowers Sep 16, 2024
caa1abf
feat(button): icon set (#1859)
bennypowers Sep 16, 2024
e9ceed3
feat(tile): link styles (#1860)
bennypowers Sep 16, 2024
6f3d7b8
docs: icon sets (#1844)
bennypowers Sep 16, 2024
3b9e16b
docs: tokens on color page (#1866)
bennypowers Sep 16, 2024
a98a060
docs(tokens): duplicate IDs
bennypowers Sep 16, 2024
8a3a88e
chore: align style use between docs and demo (#1862)
zeroedin Sep 16, 2024
85f9980
docs: remove prism css from dev-server.css (#1868)
zeroedin Sep 16, 2024
0b41a15
fix(audio-player) corrected focused on menu button after escape press…
zeroedin Sep 17, 2024
f7b1678
fix(audio-player): theming, icon, playback rate (#1854)
bennypowers Sep 17, 2024
b648291
fix(switch): reversed
bennypowers Sep 17, 2024
571229b
fix(switch): remove unused label prop
bennypowers Sep 17, 2024
d622d97
fix(switch): refactor css, document props
bennypowers Sep 17, 2024
ff26cf0
fix(button): apply color context
bennypowers Sep 17, 2024
2dc7aa6
fix(site-status): apply color context
bennypowers Sep 17, 2024
954b934
fix(switch): checked styles on dark
bennypowers Sep 17, 2024
959b825
docs(card): demo whitespace
bennypowers Sep 17, 2024
a11d450
style: lint css
bennypowers Sep 17, 2024
96b0694
test(switch): use rh-icon
bennypowers Sep 17, 2024
006ea0b
docs(alert): toast method
bennypowers Sep 17, 2024
716ad7d
Merge branch 'staging/clefairy' into feat/dialog/use-native-dialog-el…
adamjohnson Sep 17, 2024
246b20f
style(dialog): lint CSS based on updated rulesets
adamjohnson Sep 17, 2024
8473d8a
fix(cta): restore color and spacing (#1879)
bennypowers Sep 17, 2024
ef03121
docs: icon design update (#1880)
bennypowers Sep 18, 2024
22d9f99
docs(audio-player): more demos
bennypowers Sep 18, 2024
c65ff25
style(card): minor refactors
bennypowers Sep 18, 2024
4843202
docs(context): jsdoc
bennypowers Sep 18, 2024
0c32ae9
fix(context): claim events
bennypowers Sep 18, 2024
7bdb91b
docs(audio-player): context demo
bennypowers Sep 18, 2024
1590e06
fix(context-picker): weird layout science
bennypowers Sep 18, 2024
7fc156b
docs(pattern): always use an allowed pattern
bennypowers Sep 18, 2024
ee9dfed
docs: simplify installation tabs (#1690)
bennypowers Sep 18, 2024
bab5d4e
Merge branch 'staging/clefairy' into feat/dialog/use-native-dialog-el…
adamjohnson Sep 18, 2024
33574e3
feat(table): adding automatic data-labels on col-scoped tables (#1804)
markcaron Sep 18, 2024
6f190e9
fix(table): add container query support (#1881)
zeroedin Sep 18, 2024
f665cc9
docs(table): revise prose around container sizes
bennypowers Sep 18, 2024
bb107aa
docs: add edit this page link (#1882)
zeroedin Sep 18, 2024
da11a2a
Merge branch 'staging/clefairy' into feat/dialog/use-native-dialog-el…
zeroedin Sep 18, 2024
56c2b24
fix(dialog): more focus trap work, WIP
adamjohnson Sep 19, 2024
a8df42a
fix(dialog): remove container DOM node, improve styles
adamjohnson Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/big-glasses-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-audio-player>`: corrected focus when keyboard navigating options menu
7 changes: 7 additions & 0 deletions .changeset/chilly-shrimps-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rhds/elements": minor
---
`<rh-tile>`: add `link="private"` attribute, indicating that the link is
private, which changes the link icon from an arrow to a padlock, and
`link="external"` attribute, which changes the link icon to the "external link"
icon
11 changes: 11 additions & 0 deletions .changeset/dry-jobs-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@rhds/elements": minor
---
`<rh-card>` added `--rh-card-header-background-on-light` and `--rh-card-header-background-on-dark` CSS custom properties

```css
rh-card.custom-card {
--rh-card-header-background-on-light: cornflowerblue;
--rh-card-header-background-on-dark: darkblue;
}
```
4 changes: 4 additions & 0 deletions .changeset/flat-bats-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-audio-player>`: use theme tokens
5 changes: 5 additions & 0 deletions .changeset/forty-toes-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-accordion>`: Make `<rh-accordion-header>`'s bold.
5 changes: 5 additions & 0 deletions .changeset/gentle-rings-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-table>`: adds container query support
5 changes: 5 additions & 0 deletions .changeset/giant-planets-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`<rh-accordion>`: removed arrow-key keyboard navigation in favor of tab navigation.
4 changes: 4 additions & 0 deletions .changeset/gold-years-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-audio-player>`: use official red hat icons
16 changes: 16 additions & 0 deletions .changeset/gorgeous-impalas-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@rhds/elements": minor
---

`<rh-subnav>`:
- removed arrow-key keyboard navigation in favor of tab navigation.
- add `accessible-label` attribute to explicitly label landmark.
- corrects overflow icons

```
<rh-subnav accessible-label="Customer service">
<a href="#" active>Help</a>
<a href="#">Contact Us</a>
<a href="#">FAQ</a>
</rh-subnav>
```
4 changes: 4 additions & 0 deletions .changeset/heavy-roses-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": minor
---
`<rh-tag>` added `red-orange`, `yellow`, and `teal` colors. **NOTE** that `cyan` is now deprecated, but will continue to work using the `teal` colors.
21 changes: 21 additions & 0 deletions .changeset/honest-cameras-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@rhds/elements": minor
---

`<rh-dialog>`: Dialog now uses the native HTML `<dialog>` element internally.

Note: `#overlay` is now deprecated in favor of a public variable on the CSS psuedo-element `::backdrop`:

Before:

```css
rh-dialog::part(overlay) { ... }
```

After:

```css
rh-dialog {
--rh-dialog-backdrop-background-color: ghostwhite;
}
```
5 changes: 5 additions & 0 deletions .changeset/khaki-rings-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": minor
---

`<rh-table>`: added auto-generated table cell headings for responsive layout on small screens.
4 changes: 4 additions & 0 deletions .changeset/olive-ghosts-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-audio-player>`: add a playback control to the mini layout
8 changes: 8 additions & 0 deletions .changeset/rotten-bottles-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@rhds/elements": minor
---
`<rh-tag>`: added desaturated variant:

```html
<rh-tag variant="desaturated">New</rh-tag>
```
8 changes: 8 additions & 0 deletions .changeset/seven-bats-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@rhds/elements": minor
---
`<rh-tag>`: added `size` attribute.

```html
<rh-tag size="compact">New</rh-tag>
```
4 changes: 4 additions & 0 deletions .changeset/shy-taxis-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-tag>`: now supports color [theming](https://ux.redhat.com/theming/)
4 changes: 4 additions & 0 deletions .changeset/slick-ants-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-skip-link>`: ensure link is always at top of the page, per guidelines
9 changes: 9 additions & 0 deletions .changeset/slimy-guests-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@rhds/elements": minor
---
`<rh-button>`: add `icon-set` attribute, corresponding to `<rh-icon set="...">`

```html
<rh-button icon="giftbox"
icon-set="standard">Donate</rh-button>
```
13 changes: 13 additions & 0 deletions .changeset/swift-nails-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@rhds/elements": minor
---

`<rh-navigation-secondary>`:
- removed arrow-key keyboard navigation in favor of tab navigation.
- add `accessible-label` attribute to explicitly label landmark.

```
<rh-navigation-secondary accessible-label="Main">
...
</rh-navigation-secondary>
```
17 changes: 17 additions & 0 deletions .changeset/tall-corners-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@rhds/elements": minor
---
`<rh-skip-link>`: added optional `href` attribute:

```html
<rh-skip-link href="#main-content">Skip to main content</rh-skip-link>
```

is equivalent to:

```html
<rh-skip-link>
<a href="#main-content">Skip to main content</a>
</rh-skip-link>
```

5 changes: 5 additions & 0 deletions .changeset/tricky-windows-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": minor
---

`<rh-code-block>`: Added `highlighting="client"` for client-side syntax highlighting with Red Hat colour scheme
9 changes: 9 additions & 0 deletions .changeset/wild-apples-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@rhds/elements": minor
---
`<rh-tag>`: added `href` attribute

```html
<rh-tag icon="information-fill"
href="/info">Info</rh-tag>
```
27 changes: 27 additions & 0 deletions .changeset/wild-bulldogs-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@rhds/elements": minor
---

Theming: Added [theming tokens][theming] to most elements

Theming tokens let authors respond to the currently-active colour palette, and
are especially useful when implementing [patterns][patterns] using themable elements.

```html
<rh-card class="example-logo-text-and-cta">
<p>Lorem ipsum dolor sit amet, <em>consectetur adipiscing elit</em>.</p>
<rh-cta slot="footer" href="#">Call to action</rh-cta>
</rh-card>

<style>
.example-logo-text-and-cta {
width: 360px;
& em {
color: var(--rh-color-accent-base);
}
}
</style>
```

[theming]: ux.redhat.com/theming
[patterns]: https://ux.redhat.com/patterns/
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ node_modules
_site
docs/pfe.min*
docs/assets/playgrounds/
docs/assets/javascript/elements/*.js.map
docs/assets/javascript/elements/*.d.ts
docs/assets/javascript/elements/*.js
!docs/assets/javascript/elements/uxdot-installation-tabs.js
!docs/assets/javascript/elements/uxdot-pattern.js
docs/_data/playgrounds.json

# Build artifacts
Expand Down
2 changes: 1 addition & 1 deletion .pfe.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"description": "Red Hat Design System",
"componentSubpath": "elements",
"stylesheets": [
"/docs/styles/dev-server/styles.css"
"/docs/styles/demo/dev-server.css"
]
}
}
83 changes: 15 additions & 68 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ extends:
- stylelint-config-standard
- '@stylistic/stylelint-config'

plugins:
- ./node_modules/@rhds/tokens/plugins/stylelint.js
- '@stylistic/stylelint-plugin'

ignoreFiles:
- node_modules/**/*
- docs/assets/javascript/elements/*.js

rules:
alpha-value-notation: number # TODO: fix for `percentage` in tokens
Expand All @@ -19,6 +24,7 @@ rules:
- ignoreShorthands:
- /grid/

media-feature-range-notation: prefix
number-max-precision: 6
no-descending-specificity:
- true
Expand All @@ -42,84 +48,25 @@ rules:
- ignorePseudoElements:
- /part(.*)/

'@stylistic/string-quotes': double
'@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-comma-newline-after': always-multi-line
'@stylistic/indentation':
- 2
- indentInsideParens: 'once-at-root-twice-in-block'
- 2
- indentInsideParens: 'once-at-root-twice-in-block'
'@stylistic/max-line-length':
- 100
- ignorePattern: /--rh-font-family-/
- ignorePattern: /(--rh-font-family-|https:\/\/)/

rhds/deprecated: true
rhds/token-values: true

rhds/no-unknown-token-name:
- true
- migrations:
# reds
--rh-color-red-50: --rh-color-red-10
--rh-color-red-100: --rh-color-red-20
--rh-color-red-200: --rh-color-red-30
--rh-color-red-300: --rh-color-red-40
--rh-color-red-400: --rh-color-red-50
--rh-color-red-500: --rh-color-red-50
--rh-color-red-600: --rh-color-red-60
--rh-color-red-700: --rh-color-red-60
--rh-color-red-800: --rh-color-red-70
# oranges
--rh-color-orange-50: --rh-color-orange-10
--rh-color-orange-100: --rh-color-orange-30
--rh-color-orange-300: --rh-color-orange-40
--rh-color-orange-500: --rh-color-orange-60
--rh-color-orange-700: --rh-color-orange-70
# yellows (previously golds)
--rh-color-gold-50: --rh-color-yellow-10
--rh-color-gold-400: --rh-color-yellow-40
--rh-color-gold-600: --rh-color-yellow-70
# greens
--rh-color-green-50: --rh-color-green-10
--rh-color-green-100: --rh-color-green-20
--rh-color-green-500: --rh-color-green-60
--rh-color-green-600: --rh-color-green-70
# teals (previously cyans)
--rh-color-cyan-50: --rh-color-teal-10
--rh-color-cyan-100: --rh-color-teal-30
--rh-color-cyan-300: --rh-color-teal-50
--rh-color-cyan-400: --rh-color-teal-60
--rh-color-cyan-500: --rh-color-teal-70
# blues
--rh-color-blue-50: --rh-color-blue-10
--rh-color-blue-100: --rh-color-blue-20
--rh-color-blue-200: --rh-color-blue-30
--rh-color-blue-250: --rh-color-blue-40
--rh-color-blue-400: --rh-color-blue-50
--rh-color-blue-500: --rh-color-blue-60
--rh-color-blue-600: --rh-color-blue-70
# purples
--rh-color-purple-50: --rh-color-purple-10
--rh-color-purple-100: --rh-color-purple-20
--rh-color-purple-300: --rh-color-purple-40
--rh-color-purple-500: --rh-color-purple-60
--rh-color-purple-700: --rh-color-purple-70
# grays
--rh-color-gray-05: --rh-color-gray-10
--rh-color-gray-10: --rh-color-gray-20
--rh-color-gray-20: --rh-color-gray-30
--rh-color-gray-30: --rh-color-gray-40
--rh-color-gray-40: --rh-color-gray-50
--rh-color-gray-50: --rh-color-gray-60
--rh-color-gray-60: --rh-color-gray-70
--rh-color-gray-70: --rh-color-gray-80
--rh-color-gray-80: --rh-color-gray-90
--rh-color-gray-90: --rh-color-gray-95
--rh-color-black: --rh-color-gray-100

media-feature-range-notation: prefix

plugins:
- ./node_modules/@rhds/tokens/plugins/stylelint.cjs
- '@stylistic/stylelint-plugin'
- allowed:
- --rh-icon-size

overrides:
- files:
Expand Down
5 changes: 5 additions & 0 deletions declaration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ declare module '*.css' {
declare module '@rhds/tokens/media.js' {
export * from '@rhds/tokens/js/media.js';
}

declare module 'prism-esm/plugins/line-numbers/prism-line-numbers.js' {
import type { Prism } from "prism-esm";
export function Plugin(prism: Prism): void
}
3 changes: 1 addition & 2 deletions docs/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<head>
{% include "../partials/meta.html" %}

<link rel="stylesheet" href="/assets/packages/@rhds/tokens/css/global.css">
<link rel="stylesheet" href="/styles/styles.css">

{# On browsers that don't yet support native declarative shadow DOM, a
Expand Down Expand Up @@ -45,7 +44,7 @@
</head>

<body dsd-pending class="{{ extraPageClasses }}">
<rh-skip-link><a href="#main">Skip to main content</a></rh-skip-link>
<rh-skip-link href="#main">Skip to main content</rh-skip-link>
{{ content | safe }}
</body>
</html>
Loading