Skip to content

Commit 4e50849

Browse files
authored
Merge branch 'master' into emit-event
2 parents a26379b + 93c5e99 commit 4e50849

File tree

67 files changed

+11528
-11193
lines changed

Some content is hidden

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

67 files changed

+11528
-11193
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ elements/*/_temp
77
elements/*/*.js
88
elements/*/*.map
99
elements/*/*.css
10+
elements/*/__*.scss
1011
# but don't ignore tooling files
1112
!elements/*/gulpfile.js
1213
!elements/*/rollup.config.js

.storybook/addons.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import '@storybook/addon-notes/register-panel';
12
import "@storybook/addon-knobs/register";
23
import "@storybook/addon-viewport/register";
3-
import "@storybook/addon-options/register";
4+
import '@storybook/addon-backgrounds/register';
5+
import '@storybook/addon-actions/register';

.storybook/config.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
1-
import { configure } from "@storybook/polymer";
2-
import { setOptions } from "@storybook/addon-options";
1+
import { configure, addParameters } from "@storybook/polymer";
32

43
import "./test-theme.css";
54

65
const req = require.context("../elements", true, /\.story\.js$/);
76

8-
setOptions({
9-
name: "PatternFly Elements",
10-
url: "/",
11-
addonPanelInRight: true
7+
// Theming doc: https://github.com/storybookjs/storybook/blob/next/docs/src/pages/configurations/theming/index.md
8+
// Parameters: https://github.com/storybookjs/storybook/blob/next/docs/src/pages/configurations/options-parameter/index.md
9+
addParameters({
10+
options: {
11+
panelPosition: "right",
12+
theme: {
13+
brandTitle: "PatternFly Elements",
14+
brandUrl: "/"
15+
}
16+
},
17+
backgrounds: [{
18+
name: "light",
19+
value: "#fff",
20+
default: true
21+
},{
22+
name: "dark",
23+
value: "#252525"
24+
}, {
25+
name: "saturated",
26+
value: "#007a87"
27+
}]
1228
});
1329

1430
function loadStories() {

.storybook/utils.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const listProperties = (obj) =>
3232
let v = set[1];
3333
let print = set[2];
3434

35+
// exit if the value is a boolean and is false
36+
if (typeof v === "boolean" && !v) {
37+
return;
38+
}
39+
3540
// If no print value is provided, default to true
3641
if (typeof print === "undefined") {
3742
print = true;
@@ -44,11 +49,8 @@ const listProperties = (obj) =>
4449
(v !== null && v !== "null")
4550
) {
4651
string += p;
47-
// If the value is a boolean and is false, or the value is not a string true
48-
if (
49-
(typeof v === "string" && v !== "true") ||
50-
(typeof v === "boolean" && !v)
51-
) {
52+
// If the value is a string and the value is not equal to the string "true"
53+
if (typeof v === "string" && v !== "true") {
5254
string += "=";
5355
if (typeof v === "string") {
5456
// If it's a string, use quotation marks around it

.storybook/webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require("path");
22

3-
module.exports = (baseConfig, env, defaultConfig) => {
4-
defaultConfig.resolve.alias = {
3+
module.exports = async ({ config, mode }) => {
4+
config.resolve.alias = {
55
"../../whatwg-fetch/fetch.js": path.join(
66
__dirname,
77
"../node_modules/whatwg-fetch/fetch.js"
@@ -20,5 +20,5 @@ module.exports = (baseConfig, env, defaultConfig) => {
2020
)
2121
};
2222

23-
return defaultConfig;
23+
return config;
2424
};

CHANGELOG-prerelease.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,20 @@
33
Tag: [v1.0.0-prerelease.26](https://github.com/patternfly/patternfly-elements/releases/tag/v1.0.0-prerelease.26)
44

55
- [f18aa6f](https://github.com/patternfly/patternfly-elements/commit/f18aa6ff05e510993baf0f1971a85e2e4715bcc4) Update build tools to support the files array in package.json for each component
6-
- [](https://github.com/patternfly/patternfly-elements/commit/) Add patternfly project as a dependency so that styles can be extended
6+
- [9d9d41c](https://github.com/patternfly/patternfly-elements/commit/9d9d41c30883674d52cd1c29aa2300829c00693f) Add patternfly project as a dependency so that styles can be extended
7+
- [b13ef5b](https://github.com/patternfly/patternfly-elements/commit/b13ef5b2470770acc01638d4a55c1f90a2859bda) Support table
8+
- [274e35c](https://github.com/patternfly/patternfly-elements/commit/274e35cd4e8a08721888d8fad195b6fe37a525b7) Navigation component
9+
- [6b5db77](https://github.com/patternfly/patternfly-elements/commit/6b5db77c20358499f78b66811b73ea6be309318b) Update documentation
10+
- [d4600dd](https://github.com/patternfly/patternfly-elements/commit/d4600dd1c6e2abfcf8918d06b4eaacb8fb62d208) Add automatic Sass globbing to pfe-sass
11+
- [27a97e1](https://github.com/patternfly/patternfly-elements/commit/27a97e135986de37ede55504a1630bf974de0e0c) pfe-cta: fix functions & IE11 accessibility
12+
- [9a39ae3](https://github.com/patternfly/patternfly-elements/commit/9a39ae3b7d0b8d129a3aea3b58e71dab5013c721) fix: Adding object-fit to resolve image distortion in cards, #417
13+
- [980203b](https://github.com/patternfly/patternfly-elements/commit/980203b2768d1d9d8813f386bb0f0bf37d3732ab) feat: Upgrade to latest version of storybook (#366)
14+
- [ab5bc0e](https://github.com/patternfly/patternfly-elements/commit/ab5bc0e66b1e0f2f4ba180ff80d24b84d0db3260) feat: added sm md and xl sizes for pfe-progress-indicator (#575)
15+
- [fc51ba](https://github.com/patternfly/patternfly-elements/commit/fc51baf1cb4313ca117cc505ba9c0e99dd44d0e9) feat: Add pfe-number schema (#576)
16+
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: pfe-card: storybook issue with incorrect attribute (#573)
17+
- []() Upgrade to latest version of storybook (#366)
18+
- [](https://github.com/patternfly/patternfly-elements/commit/) pfe-datetime: adding a json schema
19+
- [](https://github.com/patternfly/patternfly-elements/commit/) pfe-icon-panel: maintain icon height in flex display
720

821
## Prerelease 25 ( 2019-09-10 )
922

docs/content/getting-started/component-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Though we have tested and verified general usability within these frameworks, PF
1414

1515
<br/>
1616

17-
<iframe width="785" height="538" seamless frameborder="0" scrolling="no" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRfQ-5bKA57rXGt6QssqB4r7qweiCuODpQTL2qsKLMGSz582WOdaMBr1axvuQ88nu1UAo30n1EK_Qke/pubchart?oid=51483830&amp;format=interactive"></iframe>
17+
<iframe width="700" height="538" seamless frameborder="0" scrolling="yes" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRfQ-5bKA57rXGt6QssqB4r7qweiCuODpQTL2qsKLMGSz582WOdaMBr1axvuQ88nu1UAo30n1EK_Qke/pubchart?oid=51483830&amp;format=interactive"></iframe>

elements/pfe-accordion/demo/pfe-accordion.story.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
import { storiesOf } from "@storybook/polymer";
2+
import { withActions } from '@storybook/addon-actions';
23
import * as storybookBridge from "@storybook/addon-knobs/polymer";
34
import * as tools from "../../../.storybook/utils.js";
45

56
import PfeAccordion from "../pfe-accordion";
67

78
const stories = storiesOf("Accordion", module);
89

10+
// Add the documentation
11+
import about from "../docs/ABOUT.md";
12+
import slots from "../docs/SLOTS.md";
13+
import attributes from "../docs/ATTRIBUTES.md";
14+
import styling from "../docs/STYLING.md";
15+
import events from "../docs/EVENTS.md";
16+
stories.addParameters({
17+
notes: {
18+
About: about,
19+
Slots: slots,
20+
Attributes: attributes,
21+
Events: events,
22+
Styling: styling,
23+
}
24+
});
25+
926
// Define the template to be used
1027
const template = (data = {}) => {
1128
return tools.component(PfeAccordion.tag, data.prop, data.slots);
1229
};
1330

1431
stories.addDecorator(storybookBridge.withKnobs);
1532

33+
// Log events
34+
stories.addDecorator(withActions("pfe-accordion:change"))
35+
1636
stories.add(PfeAccordion.tag, () => {
1737
let config = {};
1838
let headings = [];
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The accordion component provides a way to toggle content in a list.
2+
3+
It is comprised of 3 web components:
4+
5+
- `pfe-accordion`
6+
- `pfe-accordion-header`
7+
- `pfe-accordion-panel`
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
**`color`**
2+
Changes the color of `<pfe-accordion-header>`
3+
4+
| Value | Description |
5+
| ----------------- | ------------------------------------------------------------------------- |
6+
| `striped` | Alternates `light` and `lightest` theme colors on `<pfe-accordion-header>` |
7+
| `lightest` | `lightest` theme color |
8+
| `light` (default) | `light` theme color |
9+
| `base` | `base` theme color |
10+
| `dark` | `dark` theme color |
11+
| `darkest` | `darkest` theme color |
12+
| `complement` | `complement`theme color |
13+
| `accent` | `accent` theme color |

0 commit comments

Comments
 (0)