Skip to content

Commit ad7b36d

Browse files
authored
Merge bb938e5 into 3e9d785
2 parents 3e9d785 + bb938e5 commit ad7b36d

File tree

1,939 files changed

+4337
-5165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,939 files changed

+4337
-5165
lines changed

.changeset/clever-yaks-thank.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/elements": minor
3+
---
4+
`<pf-card>`: added `title` slot, for when the title is not inline with any slotted header actions

.changeset/dirty-bears-win.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
"@patternfly/elements": major
3+
---
4+
`<pf-icon>`: removed the `getIconUrl` static method, and replaced it with the
5+
`resolve` static method
6+
7+
The steps for overriding icon loading behaviour have changed. Before, you had to
8+
return a string from the `getIconUrl` method, or the second argument to
9+
`addIconSet`. Now, both of those functions must return a Node, or any lit-html
10+
renderable value, or a Promise thereof.
11+
12+
BEFORE:
13+
14+
```js
15+
PfIcon.addIconSet('local', (set, icon) =>
16+
new URL(`/assets/icons/${set}-${icon}.js`));
17+
18+
// or
19+
PfIcon.getIconUrl = (set, icon) =>
20+
new URL(`/assets/icons/${set}-${icon}.js`))
21+
```
22+
23+
AFTER
24+
```js
25+
PfIcon.addIconSet('local', (set, icon) =>
26+
import(`/assets/icons/${set}-${icon}.js`))
27+
.then(mod => mod.default);
28+
29+
// or
30+
PfIcon.resolve = (set, icon) =>
31+
import(`/assets/icons/${set}-${icon}.js`))
32+
.then(mod => mod.default);
33+
```
34+

.changeset/few-lands-feel.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/pfe-core": major
3+
---
4+
Removed global `pfeLog` feature

.changeset/fresh-shrimps-work.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/elements": major
3+
---
4+
`<pf-icon>`: removed the `defaultIconSet` static field.

.changeset/heavy-peas-appear.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@patternfly/pfe-tools": minor
3+
---
4+
Added `querySnapshot` accessibility testing helper
5+
6+
```ts
7+
8+
describe('then clicking the toggle', function() {
9+
beforeEach(async function() {
10+
await clickElementAtCenter(toggle);
11+
});
12+
it('expands the disclosure panel', async function() {
13+
const snapshot = await a11ySnapshot();
14+
const expanded = querySnapshot(snapshot, { expanded: true });
15+
expect(expanded).to.be.ok;
16+
});
17+
});
18+
```

.changeset/hip-coins-prove.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
"@patternfly/elements": major
3+
---
4+
`<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:
5+
6+
**Before**:
7+
8+
```js
9+
import {
10+
AccordionHeaderChangeEvent
11+
} from '@patternfly/elements/pf-accordion/pf-accordion.js';
12+
13+
addEventListener('change', function(event) {
14+
if (event instanceof AccordionHeaderChangeEvent) {
15+
// ...
16+
}
17+
});
18+
```
19+
20+
**After**:
21+
22+
```js
23+
import {
24+
PfAccordionHeaderChangeEvent
25+
} from '@patternfly/elements/pf-accordion/pf-accordion.js';
26+
27+
addEventListener('change', function(event) {
28+
if (event instanceof PfAccordionHeaderChangeEvent) {
29+
// ...
30+
}
31+
});
32+
```

.changeset/khaki-regions-play.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/elements": major
3+
---
4+
`<pf-icon>`: removed svg files, use `@patternfly/icons` instead

.changeset/label-close-remove.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@patternfly/elements": major
3+
---
4+
`<pf-label>`: when clicking close button, `close` event is fired.
5+
Now, if that event is not cancelled, the label will remove itself from the document.
6+
7+
To restore previous behaviour:
8+
9+
```js
10+
import { LabelCloseEvent } from '@patternfly/elements/pf-label/pf-label.js';
11+
label.addEventListener('close', function(event) {
12+
if (event instanceof LabelCloseEvent) {
13+
event.preventDefault();
14+
return false;
15+
}
16+
});
17+
```

.changeset/mean-tires-ask.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/pfe-core": major
3+
---
4+
Removed `window.PfeConfig` global config object

.changeset/polite-rules-dress.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/pfe-core": major
3+
---
4+
Removed global `auto-reveal` feature

0 commit comments

Comments
 (0)