Skip to content

Commit

Permalink
Merge branch 'staging/4.0' into fix/ssr/core-initial
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Jun 25, 2024
2 parents 311d03d + 25eaebc commit 5a0c5d6
Show file tree
Hide file tree
Showing 48 changed files with 1,410 additions and 822 deletions.
34 changes: 34 additions & 0 deletions .changeset/dirty-bears-win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: removed the `getIconUrl` static method, and replaced it with the
`resolve` static method

The steps for overriding icon loading behaviour have changed. Before, you had to
return a string from the `getIconUrl` method, or the second argument to
`addIconSet`. Now, both of those functions must return a Node, or any lit-html
renderable value, or a Promise thereof.

BEFORE:

```js
PfIcon.addIconSet('local', (set, icon) =>
new URL(`/assets/icons/${set}-${icon}.js`));

// or
PfIcon.getIconUrl = (set, icon) =>
new URL(`/assets/icons/${set}-${icon}.js`))
```

AFTER
```js
PfIcon.addIconSet('local', (set, icon) =>
import(`/assets/icons/${set}-${icon}.js`))
.then(mod => mod.default);

// or
PfIcon.resolve = (set, icon) =>
import(`/assets/icons/${set}-${icon}.js`))
.then(mod => mod.default);
```

4 changes: 4 additions & 0 deletions .changeset/fresh-shrimps-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: removed the `defaultIconSet` static field.
18 changes: 18 additions & 0 deletions .changeset/heavy-peas-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@patternfly/pfe-tools": minor
---
Added `querySnapshot` accessibility testing helper

```ts

describe('then clicking the toggle', function() {
beforeEach(async function() {
await clickElementAtCenter(toggle);
});
it('expands the disclosure panel', async function() {
const snapshot = await a11ySnapshot();
const expanded = querySnapshot(snapshot, { expanded: true });
expect(expanded).to.be.ok;
});
});
```
32 changes: 32 additions & 0 deletions .changeset/hip-coins-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@patternfly/elements": major
---
`<pf-accordion>`: Removed `BaseAccordion*` classes, as well as static `isPanel`, `isHeader`, and `isAccordion` methods. Removed the optional `parentAccordion` parameter to `PfAccordion#expand(index)`. Renamed accordion event classes by adding the `Pf` prefix:

**Before**:

```js
import {
AccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof AccordionHeaderChangeEvent) {
// ...
}
});
```

**After**:

```js
import {
PfAccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof PfAccordionHeaderChangeEvent) {
// ...
}
});
```
4 changes: 4 additions & 0 deletions .changeset/huge-mice-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-tools": patch
---
**Dev Server**: load lightdom shim files
4 changes: 4 additions & 0 deletions .changeset/legal-chairs-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-tools": patch
---
**Dev Server**: reload on typescript file changes
4 changes: 0 additions & 4 deletions .changeset/odd-months-flow.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/purple-boxes-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@patternfly/elements": patch
---

`<pf-back-to-top>`: fix hover color
4 changes: 4 additions & 0 deletions .changeset/shaky-cats-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/create-element": patch
---
Element generator now generates demo files with inlined script and styles
12 changes: 12 additions & 0 deletions .changeset/slick-bats-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@patternfly/pfe-tools": minor
---
**TypeScript**: Add static version transformer. This adds a runtime-only
static `version` field to custom element classes.

```js
import '@patternfly/elements/pf-button/pf-button.js';
const PFE_VERSION =
await customElements.whenDefined('pf-button')
.then(PfButton => PfButton.version);
```
4 changes: 0 additions & 4 deletions .changeset/upset-birds-mix.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/_data/importMap.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = async function() {
const { Generator } = await import('@jspm/generator');

const generator = new Generator({
defaultProvider: 'jspm.io',
defaultProvider: 'jsdelivr',
env: ['production', 'browser', 'module'],
});

Expand Down
6 changes: 6 additions & 0 deletions elements/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @patternfly/elements

## 3.0.2

### Patch Changes

- 9702278: `<pf-clipboard-copy>`: corrected size of copy button

## 3.0.1

### Patch Changes
Expand Down
8 changes: 5 additions & 3 deletions elements/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@patternfly/elements",
"license": "MIT",
"version": "3.0.1",
"version": "3.0.2",
"description": "PatternFly Elements",
"customElements": "custom-elements.json",
"type": "module",
Expand Down Expand Up @@ -125,11 +125,13 @@
"Nikki Massaro Kauffman <[email protected]> (https://github.com/nikkimk)",
"Steven Spriggs <[email protected]",
"castastrophe (https://github.com/castastrophe)",
"Wes Ruvalcaba"
"Wes Ruvalcaba",
"Rohit Bharmal (https://github.com/Rohit2601)",
"Ajinyka Shinde <[email protected]>"
],
"dependencies": {
"@lit/context": "^1.1.0",
"@patternfly/icons": "^1.0.2",
"@patternfly/icons": "^1.0.3",
"@patternfly/pfe-core": "^3.0.0",
"lit": "^3.1.2",
"tslib": "^2.6.2"
Expand Down
39 changes: 0 additions & 39 deletions elements/pf-accordion/BaseAccordionHeader.css

This file was deleted.

145 changes: 0 additions & 145 deletions elements/pf-accordion/BaseAccordionHeader.ts

This file was deleted.

27 changes: 0 additions & 27 deletions elements/pf-accordion/BaseAccordionPanel.css

This file was deleted.

Loading

0 comments on commit 5a0c5d6

Please sign in to comment.