Skip to content

Commit 5a7ec89

Browse files
authored
Merge branch 'master' into issue-310/band-layout
2 parents 7034ee2 + df25d17 commit 5a7ec89

File tree

79 files changed

+6121
-7695
lines changed

Some content is hidden

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

79 files changed

+6121
-7695
lines changed

docs/assets/pfe-base-sass/variables/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ $pfe-global--disabled-state--BorderColor: $pfe-global--color--gray-mercur
160160
// Theme colors
161161
// ========================================================================
162162

163-
// I think these are misplaced. Should be in cp-theme instead.
163+
// @TODO I think these are misplaced. Should be in the theme instead
164164
// $pfe-global--primary-color: $pfe-global--color--red !default;
165165
// $pfe-global--secondary-color: $pf-color-black-600 !default;
166166
//

docs/assets/sass/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ $pfe-global--disabled-state--BorderColor: $pfe-global--color--gray-mercur
160160
// Theme colors
161161
// ========================================================================
162162

163-
// I think these are misplaced. Should be in cp-theme instead.
163+
// @TODO I think these are misplaced. Should be in the theme instead.
164164
// $pfe-global--primary-color: $pfe-global--color--red !default;
165165
// $pfe-global--secondary-color: $pf-color-black-600 !default;
166166
//

docs/content/develop/step-1a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You may also specify multiple elements. For example, `pfe-card` and `pfe-cta` a
5555
npm run dev pfe-card pfe-cta
5656
```
5757

58-
## Preview Your Changes
58+
## Preview your changes
5959

6060
From the root of the PatternFly Elements repository, run the start command which will open a browser to the `/doc` directory.
6161

docs/content/theme/pfe-layouts.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ tags = [ "theme" ]
1212
<link rel="stylesheet" type="text/css" href="//overpass-30e2.kxcdn.com/overpass.css">
1313
<link rel="stylesheet" type="text/css" href="../pfe-layouts.css">
1414
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism.min.css">
15-
<link rel="stylesheet" type="text/css" href="../../cp-themeset/cp-themeset.css">
1615

1716
<style>
1817

elements/pfe-accordion/demo/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<title>PFElements: pfe-accordion Demo</title>
66

77
<link rel="stylesheet" href="http://overpass-30e2.kxcdn.com/overpass.css" />
8-
<!-- <link rel="stylesheet" href="../../../themes/cp-theme/cp-theme.css" /> -->
98

109
<noscript>
1110
<link href="../../pfelement/pfelement-noscript.min.css" rel="stylesheet">

elements/pfe-accordion/src/pfe-accordion.js

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ class PfeAccordion extends PFElement {
185185
headers.forEach(header => {
186186
const panel = this._panelForHeader(header);
187187

188-
header.setAttribute("aria-controls", panel.id);
189-
panel.setAttribute("aria-labelledby", header.id);
188+
header.setAttribute("aria-controls", panel.pfeId);
189+
panel.setAttribute("aria-labelledby", header.pfeId);
190190
});
191191
}
192192

@@ -356,6 +356,18 @@ class PfeAccordionHeader extends PFElement {
356356
return "pfe-accordion-header.html";
357357
}
358358

359+
get pfeId() {
360+
return this.getAttribute("pfe-id");
361+
}
362+
363+
set pfeId(id) {
364+
if (!id) {
365+
return;
366+
}
367+
368+
this.setAttribute("pfe-id", id);
369+
}
370+
359371
static get observedAttributes() {
360372
return ["aria-expanded"];
361373
}
@@ -372,8 +384,8 @@ class PfeAccordionHeader extends PFElement {
372384
this.setAttribute("role", "header");
373385
}
374386

375-
if (!this.id) {
376-
this.id = `${PfeAccordionHeader.tag}-${generateId()}`;
387+
if (!this.pfeId) {
388+
this.pfeId = `${PfeAccordionHeader.tag}-${generateId()}`;
377389
}
378390

379391
this.button = this.shadowRoot.querySelector("button");
@@ -456,6 +468,18 @@ class PfeAccordionPanel extends PFElement {
456468
return "pfe-accordion-panel.html";
457469
}
458470

471+
get pfeId() {
472+
return this.getAttribute("pfe-id");
473+
}
474+
475+
set pfeId(id) {
476+
if (!id) {
477+
return;
478+
}
479+
480+
this.setAttribute("pfe-id", id);
481+
}
482+
459483
constructor() {
460484
super(PfeAccordionPanel);
461485
}
@@ -467,8 +491,8 @@ class PfeAccordionPanel extends PFElement {
467491
this.setAttribute("role", "region");
468492
}
469493

470-
if (!this.id) {
471-
this.id = `${PfeAccordionPanel.tag}-${generateId()}`;
494+
if (!this.pfeId) {
495+
this.pfeId = `${PfeAccordionPanel.tag}-${generateId()}`;
472496
}
473497
}
474498

elements/pfe-accordion/test/pfe-accordion_test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ <h2>Where do the main characters work as adults?</h2>
6868
assert.equal(header.getAttribute('role'), 'header');
6969
assert.isTrue(panel.hasAttribute('aria-labelledby'));
7070
assert.equal(panel.getAttribute('role'), 'region');
71-
assert.equal(header.id, panel.getAttribute('aria-labelledby'));
72-
assert.equal(panel.id, header.getAttribute('aria-controls'));
71+
assert.equal(header.pfeId, panel.getAttribute('aria-labelledby'));
72+
assert.equal(panel.pfeId, header.getAttribute('aria-controls'));
7373
});
7474

7575
test('it should expand a panel when a header is selected', () => {

elements/pfe-autocomplete/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-autocomplete/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
## Install
66
```
7-
npm install @patternfly/cp-theme
87
npm install @patternfly/pfe-autocomplete
98
```
109

11-
cp-theme is a package that contains css variables setting that is used for theming patternfly elements.
1210

1311
Once installed, import it to your application:
1412
```
15-
import '@patternfly/cp-theme.umd.js';
1613
import '@patternfly/pfe-autocomplete.umd.js';
1714
```
1815

elements/pfe-autocomplete/demo/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<script src="/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
1616
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>
1717
<script>require([
18-
'../../../themes/cp-theme/cp-theme.umd.js',
1918
'../pfe-autocomplete.umd.js'
2019
])</script>
2120
</head>

0 commit comments

Comments
 (0)