Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
11ddb8e
fix: Isolating styles from pfe-accordion PR
castastrophe Jul 26, 2021
1903750
fix: Migrating styles over from accordion PR and fixing IE11 discrepe…
castastrophe Jul 26, 2021
51ebc65
fix: Update demo page text
castastrophe Jul 26, 2021
ecc96be
fix: Update docs
castastrophe Jul 26, 2021
000a9b6
fix: Update polyfills for accordion
castastrophe Jul 26, 2021
3d673c3
fix: Add a create for pfe-icon if not defined
castastrophe Jul 26, 2021
3ab4bb6
Merge branch 'master' into fix-issue-1512-accordion-design
castastrophe Jul 26, 2021
bbdcb0e
Merge branch 'master' into fix-issue-1512-accordion-design
castastrophe Jul 26, 2021
71af927
fix: Pull JS changes out of pfelement
castastrophe Jul 26, 2021
41bb467
Merge branch 'fix-issue-1512-accordion-design' of github.com:patternf…
castastrophe Jul 26, 2021
39c0875
Update elements/pfelement/src/pfelement.js
castastrophe Jul 26, 2021
8c029c1
fix: Resolving define bugs
castastrophe Jul 27, 2021
d06479b
Merge branch 'fix-issue-1512-accordion-design' of github.com:patternf…
castastrophe Jul 27, 2021
7ab1281
fix: Fixing a design feedback and cleaning up duplication
castastrophe Jul 27, 2021
4a10b9b
fix: Update the pfe-collapsible extend
castastrophe Jul 27, 2021
51ee1f2
fix: Resolving IE11 discrepencies
castastrophe Jul 27, 2021
671576f
fix: Add a warning for version mismatches
castastrophe Jul 27, 2021
b4669b2
fix: Update baselines
castastrophe Jul 27, 2021
1739a1e
fix: Update baselines; snapshot IE
castastrophe Jul 27, 2021
4a79ae0
fix: Remove unused extends
castastrophe Jul 27, 2021
62c92c2
Branch was auto-updated with the latest.
github-actions[bot] Jul 27, 2021
7df943d
fix: Pull out polyfill updates to other PRs
castastrophe Jul 28, 2021
0a44d1f
fix: Remove duplicate region roles
castastrophe Jul 28, 2021
54e50b8
fix: Update documentation
castastrophe Jul 28, 2021
fd6c1b8
fix: correct pfe-icon duplicate define calls; update slot docs for ac…
castastrophe Jul 28, 2021
5fe60eb
fix: Update styles to fix bug on h-tags with margin-top
castastrophe Jul 28, 2021
eb84db8
fix: adjust comment
castastrophe Jul 28, 2021
ca56201
fix: Update documentation
castastrophe Jul 28, 2021
5872348
fix: Update demo page and adjust mark's placement
castastrophe Jul 28, 2021
156a89f
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
castastrophe Jul 28, 2021
2fd0d2a
fix: Pull out unrelated updates
castastrophe Jul 28, 2021
633e80f
fix: Changelog update
castastrophe Jul 28, 2021
1948ea0
fix: Adjusting margins for alignment
castastrophe Jul 28, 2021
2dd1ab0
fix: Apply design feedback; tweaking the animation
castastrophe Jul 29, 2021
c623a45
fix: Resolve IE11 bug, clean up styles, demo page
castastrophe Jul 29, 2021
4260afe
fix: Make more room for accents to align themselves
castastrophe Jul 29, 2021
7cfe89c
fix: Correct active background color duplication
castastrophe Jul 29, 2021
81819e3
fix: Update baseline images; remove HP refs
castastrophe Jul 29, 2021
abe7b84
fix: Design feedback applied
castastrophe Jul 29, 2021
2830fd1
fix: Migrate tests to new testing framework
castastrophe Jul 29, 2021
877ceb9
fix: Remove references from WCT for items converted to new test frame…
castastrophe Jul 29, 2021
ef36e95
fix: Bring back commented out tests
castastrophe Jul 29, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 1.11.0 (2021)

- [d3ea7fa](https://github.com/patternfly/patternfly-elements/commit/d3ea7facb0c36b7f3e20e2568bdc4bf2e5a5a852) feat: Graceful failure for component registry
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: Accordion alignment with latest design kit
- [5f88c39](https://github.com/patternfly/patternfly-elements/commit/5f88c3963f8a6c13a9aeba6e9f664678453d46ce) fix: Jump links parseInt for IE11

# 1.10.1 (2021-07-12)
Expand Down
31 changes: 15 additions & 16 deletions docs/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,37 +74,36 @@ <h3 slot="pfe-card--header">Card 3</h3>
</pfe-band>
<pfe-band>
<h2 slot="pfe-band--header">Accordion component</h2>
<pfe-accordion>
<pfe-accordion expanded-index="1">
<pfe-accordion-header>
<h3>Why do wizards need money if they could just create it?</h3>
<h3>Laboris sunt qui dolor consectetur excepteur in aliqua ipsum?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p>There is legislation that decides what you can conjure and what you can not. Because things that you conjure out of thin air will not last, it is illegal in the wizarding world.</p>
<p>Culpa adipisicing sunt dolor ullamco dolor duis in ad commodo.</p>
<pfe-cta>
<a href="#">Call to action</a>
</pfe-cta>
</pfe-accordion-panel>
<pfe-accordion-header>
<h3>Why doesn't Harry have a portrait of his parents?</h3>
<h3>Anim est tempor fugiat pariatur laborum deserunt ex mollit aliquip?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p><a href="#">The characters in the portraits</a> are not actually ghosts. They mainly are there just to repeat common phrases or serve as a general <a href="foobarbaz.com">representation of the individual</a> they depict. A portrait of his parents would not be of much help to Harry.</p>
<p><a href="#">Ullamco ullamco sint</a> ex id magna elit deserunt dolore nostrud eu et dolore est Lorem. Esse laborum do ut consectetur occaecat proident et nostrud ut nostrud veniam officia Lorem.</p>
</pfe-accordion-panel>
<pfe-accordion-header>
<h3>Why is Harry considered a half-blood if both of his parents could use magic?</h3>
<h3>Nostrud ad sit commodo nostrud?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p>Because Harry's grandparents were not able to do magic. This is generally frowned upon by those who consider themselves pure, such as the Malfoy's or other antagonists.</p>
<p>Nisi veniam tempor reprehenderit laboris amet laborum et do ut. Veniam eiusmod aliquip ullamco quis esse laborum Lorem exercitation consequat.</p>
</pfe-accordion-panel>
<pfe-accordion-header>
<h3>Is Hogwarts the only wizarding school?</h3>
<h3>Reprehenderit cupidatat labore?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p>No! It has been revealed that there are actually 11 long established and prestigious schools around the globe. These include Castelobruxo in the rainforest of Brazil, Durmstrang Institute (whereas nobody is certain of it’s whereabouts), and Ilvermorny, right here in the United States.</p>
</pfe-accordion-panel>
<pfe-accordion-header>
<h3>Where do the main characters work as adults?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p>Harry and Hermione are at the Ministry: he ends up leading the Auror department. Ron helps George at the joke shop and does very well. Ginny becomes a professional Quidditch player and then sportswriter for the Daily Prophet.</p>
<p><a href="https://www.pottermore.com/collection/characters" target="blank">Read more about the characters</a></p>
<p>Magna incididunt aliquip consectetur dolor adipisicing amet cillum officia nostrud. Elit exercitation voluptate aute nostrud.</p>
<pfe-cta>
<a href="#">Call to action</a>
</pfe-cta>
</pfe-accordion-panel>
</pfe-accordion>
</pfe-band>
Expand Down
26 changes: 26 additions & 0 deletions elements/pfe-accordion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,32 @@ Accepts a 0-based index value (integer) for the set of accordion items to collap

Collapse all accordion items.

## Styling hooks

| Theme hook | Description | Default |
| --- | --- | --- |
| `--pfe-accordion--Padding` | Applied to header and panel components | var(--pfe-theme--container-padding, 1rem) calc(var(--pfe-theme--container-padding, 1rem) * 1.5) |
| `--pfe-accordion--BorderColor` | Color of the encompassing borders | var(--pfe-theme--color--surface--border, #d2d2d2) |
| `--pfe-accordion--BorderWidth` | Width of the encompassing borders | var(--pfe-theme--surface--border-width, 1px) |
| `--pfe-accordion--accent--width` | Width of the accent mark | var(--pfe-theme--surface--border-width--active, 3px) |
| `--pfe-accordion--Width` | Maximum width for the accordion element | 100% |
| `--pfe-accordion--MaxWidth--content` | Maximum width for the content inside the accordion panel | 80ch |
| `--pfe-accordion--BoxShadow` | Box shadow on the header and panel in closed state | 0 5px 4px transparent |
| `--pfe-accordion--ZIndex` | Accordion's z-index for the stack | 3 |
| `--pfe-accordion--FontSize--header` | Font-size for the accordion header text | var(--pf-global--FontSize--xl, 1.25rem) |
| `--pfe-accordion--FontWeight--header` | Font-weight for the accordion header text | var(--pfe-theme--font-weight--normal, 400) |
| `--pfe-accordion--TextAlign` | Text alignment for the accordion header text | left |
| `--pfe-accordion--BackgroundColor` | Background color for the accordion header and panel | transparent |
| `--pfe-accordion--Color` | Text color for the accordion header and panel | var(--pfe-broadcasted--text, #3c3f42) |
| `--pfe-accordion--accent` | Left accent line color for the accordion header and panel | transparent |
| `--pfe-accordion--BackgroundColor--active` | Background color when the accordion is active (hover, focus) | var(--pfe-theme--color--surface--lighter, #f0f0f0) |
| `--pfe-accordion--Color--active` | Text color when the accordion is active (hover, focus) | var(--pfe-broadcasted--text, #3c3f42) |
| `--pfe-accordion--accent--active` | Color of the accent mark when the accordion is active (hover, focus) | var(--pfe-theme--color--ui-accent, #06c) |
| `--pfe-accordion--BackgroundColor--expanded` | Background color when the accordion is open | var(--pfe-theme--color--surface--lightest, #fff) |
| `--pfe-accordion--Color--expanded` | Text color when the accordion is open | var(--pfe-broadcasted--text, #3c3f42) |
| `--pfe-accordion--accent--expanded` | Color of the accent mark when the accordion is open | var(--pfe-theme--color--ui-accent, #06c) |
| `--pfe-accordion--BoxShadow--expanded` | Box shadow when the accordion is open | 0 5px 4px rgba(140, 140, 140, 0.35) |

## Test

npm run test
Expand Down
42 changes: 23 additions & 19 deletions elements/pfe-accordion/demo/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ section {
padding: 2rem;
}

pfe-jump-links-nav {
--pfe-accordion__panel-container--Padding: calc(var(--pfe-theme--container-spacer, 1rem) * 1.5);
}

.dark-background {
background-color: #252525;
--context: dark;
Expand Down Expand Up @@ -44,35 +40,43 @@ h2 {

/* Example not using context variable */
.custom-styles {
background-color: #e00;
--pfe-broadcasted--text: pink;
background-color: rgb(108, 245, 154);
--context: saturated;

--pfe-broadcasted--text: #444;
--pfe-broadcasted--link: green;
--pfe-broadcasted--link--hover: #eee;
--pfe-broadcasted--link--focus: #fff;
}

.custom-styles pfe-accordion {
--pfe-accordion--accent: #fff;
--pfe-theme--color--ui-accent: #ad41ad;
}
--pfe-accordion--BackgroundColor--active: rgba(255, 255, 255, 0.5);
--pfe-accordion--accent--active: hotpink;
--pfe-accordion--Color--active: inherit;

--pfe-accordion--accent--expanded: hotpink;
--pfe-accordion--BackgroundColor--expanded: pink;
--pfe-accordion--Color--expanded: #000;

.custom-styles pfe-accordion-header[expanded] {
--pfe-accordion--accent: #ad41ad;
--pfe-accordion--BorderColor: #fff;
}

.custom-styles pfe-accordion pfe-accordion {
.custom-styles pfe-accordion-panel pfe-accordion {
--context: light;

--pfe-accordion--accent: initial;
--pfe-theme--color--ui-accent: initial;
--pfe-accordion--accent--expanded: initial;
--pfe-accordion--accent--active: initial;
--pfe-accordion--BackgroundColor--expanded: initial;
--pfe-accordion--Color--expanded: initial;
--pfe-accordion--Color--active: initial;

--pfe-accordion--BorderColor: #fff;

--pfe-broadcasted--text: initial;
--pfe-broadcasted--link: initial;
--pfe-broadcasted--link--hover: initial;
--pfe-broadcasted--link--focus: initial;
}

.custom-styles pfe-accordion pfe-accordion-header[expanded] {
--pfe-accordion--accent: initial;
}

.custom-styles h2 {
margin-top: 0;
}
Expand Down
Loading