Skip to content

Commit 5613ed6

Browse files
committed
fixing pfe-content-set so light dom styles come through to the shadow dom
1 parent 5f07640 commit 5613ed6

File tree

13 files changed

+316
-568
lines changed

13 files changed

+316
-568
lines changed

elements/pfe-content-set/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2018 Red Hat, Inc.
1+
Copyright 2019 Red Hat, Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

elements/pfe-content-set/README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,27 @@
33

44
## Overview
55

6-
`pfe-content-set` is a combo component, which brings together the utilities of the accordion and tabs components. Effectively both of these components do the same job, which is to encapsulate chunks of information under headings for easier browsing. Hiding some information and allowing the user to toggle through the headings to show other bits of information.
6+
`pfe-content-set` is a combo component, which brings together the utilities of the accordion and tabs components. Effectively both of these components do the same job, which is to encapsulate chunks of information under headings for easier browsing. Hiding some information and allowing the user to toggle through the headings to show other bits of information.
77

88
Since tabs can pose a layout issue on mobile because of the lack of horizontal space, this component will first assess the width of the parent container. If the width is less than 768px, the component will render the content within the `<pfe-accordion>` component. If it is larger than this value, the content will be rendered inside the `<pfe-tabs>` component.
99

1010
## Dependencies
1111

1212
Requires both the `pfe-accordion` and `pfe-tabs` components, as well as the base `pfelement`.
1313

14-
1514
## Usage
1615

17-
You must wrap each chunk of information (heading + content) in a `<pfe-content-set-group>` tag.
18-
19-
You must also apply the `pfe-heading` to the HTML heading element, like an H2 or H3. Otherwise content within the component will not be rendered.
16+
<!-- You must wrap each chunk of information (heading + content) in a `<pfe-content-set-group>` tag. -->
17+
Each header must have an attribute of `pfe-content-set--header` and each panel must have an attribute of `pfe-content-set--panel`. Each header must be immediately followed by a panel.
2018

2119
```html
2220
<pfe-content-set>
23-
<pfe-content-set-group>
24-
<h2 pfe-heading>Heading 1</h2>
25-
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore </p>
26-
</pfe-content-set-group>
27-
<pfe-content-set-group>
28-
<h2 pfe-heading>Heading 2</h2>
29-
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu et jen, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
30-
</pfe-content-set-group>
31-
<pfe-content-set-group>
32-
<h2 pfe-heading>Heading 3</h2>
33-
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
34-
</pfe-content-set-group>
21+
<h2 pfe-content-set--header>Heading 1</h2>
22+
<p pfe-content-set--panel>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore </p>
23+
<h2 pfe-content-set--header>Heading 2</h2>
24+
<p pfe-content-set--panel>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu et jen, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
25+
<h2 pfe-content-set--header>Heading 3</h2>
26+
<p pfe-content-set--panel>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
3527
</pfe-content-set>
3628

3729
```
@@ -48,7 +40,7 @@ You must also apply the `pfe-heading` to the HTML heading element, like an H2 or
4840
- Tabs: Borders are removed, only an indicator appears under the active heading.
4941
- `pfe-variant="secondary"`
5042
- Accordion: Headings are on a dark background, text color is reversed.
51-
- Tabs: Headings are encased in a block. The active heading is solid, with a caret pointing downward towards the content. Other headings have a border with no fill.
43+
- Tabs: Headings are encased in a block. The active heading is solid, with a caret pointing downward towards the content. Other headings have a border with no fill.
5244
- `vertical`
5345
- Accordion: No effect.
5446
- Tabs: Headings stack on the left, content pane is shown on the right.

elements/pfe-content-set/demo/browser_testing.html

Lines changed: 0 additions & 220 deletions
This file was deleted.

elements/pfe-content-set/demo/index.html

Lines changed: 159 additions & 153 deletions
Large diffs are not rendered by default.

elements/pfe-content-set/demo/pfe-content-set.story.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ ${Array(countVar)
7373
.split(0)
7474
.map(
7575
(item, i) => `
76-
<pfe-content-set-group>
77-
<h2 pfe-heading>${sets[i].heading}</h2>
78-
${sets[i].panel}
79-
</pfe-content-set-group>
80-
`
81-
)
76+
<h2 pfe-content-set--header>${sets[i].heading}</h2>
77+
<div pfe-content-set--panel>
78+
${sets[i].panel}
79+
</div>`)
8280
.join("")}
8381
</pfe-content-set>
8482
`;

elements/pfe-content-set/gulpfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// rollup.config.js
21
const gulpFactory = require("../../scripts/gulpfile.factory.js");
32
const pfelementPackage = require("./package.json");
43

elements/pfe-content-set/package-lock.json

Lines changed: 12 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/pfe-content-set/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,5 @@
2828
"@patternfly/pfe-tabs": "^1.0.0-prerelease.9",
2929
"@patternfly/pfelement": "^1.0.0-prerelease.9"
3030
},
31-
"devDependencies": {
32-
"@patternfly/pfe-sass": "^1.0.0-prerelease.9"
33-
},
34-
"generator-pfelement-version": "0.6.8"
31+
"generator-pfelement-version": "1.1.0"
3532
}

elements/pfe-content-set/src/pfe-content-set.css

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1 @@
1-
${this.isTab ? `
2-
<pfe-tabs ${this.settings.variant ? "pfe-variant=" + this.settings.variant : ""}
3-
${this.orientation ? this.orientation : ""}>
4-
${this.groupings.map(group => `
5-
<pfe-tab slot="tab">
6-
${group.heading.innerText}
7-
</pfe-tab>
8-
<pfe-tab-panel slot="panel">
9-
${group.body.map(item => item.outerHTML).join("")}
10-
</pfe-tab-panel>
11-
`).join('')}
12-
</pfe-tabs>
13-
` : `
14-
<pfe-accordion ${this.settings.color ? "color=" + this.settings.color : ""}>
15-
${this.groupings.map(group => `
16-
<pfe-accordion-header>
17-
${group.heading.outerHTML}
18-
</pfe-accordion-header>
19-
<pfe-accordion-panel>
20-
${group.body.map(item => item.outerHTML).join("")}
21-
</pfe-accordion-panel>
22-
`).join('')}
23-
</pfe-accordion>
24-
`}
25-
1+
<slot></slot>

0 commit comments

Comments
 (0)