Skip to content

Commit 74cd762

Browse files
committed
feat(card)!: migrate pfe-card to lit
test(card): adjust test for changes in slot controller test(card): e2e tests fix(card)!: remove public has_ attrs test(pfe-card): e2e tests with page object model feat(card): add parts to card docs(card): fix demo
1 parent 8f1685f commit 74cd762

32 files changed

+824
-1641
lines changed

elements/pfe-card/.npmignore

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { pfeCustomElementsManifestConfig } from '@patternfly/pfe-tools/custom-elements-manifest.js';
2+
3+
export default pfeCustomElementsManifestConfig({
4+
globs: ['pfe-*.ts'],
5+
});

elements/pfe-card/demo/demo.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
/* For demo only */
1+
:host {
2+
padding: 1em;
3+
}
4+
25
.demo-cards {
36
display: flex;
47
flex-wrap: wrap;

elements/pfe-card/demo/index.html

Lines changed: 0 additions & 178 deletions
This file was deleted.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<link rel="stylesheet" href="/core/pfe-styles/red-hat-font.min.css">
2+
<link rel="stylesheet" href="/core/pfe-styles/pfe-base.min.css">
3+
<link rel="stylesheet" href="/core/pfe-styles/pfe-context.min.css">
4+
<link rel="stylesheet" href="/core/pfe-styles/pfe-layouts.min.css">
5+
<link rel="stylesheet" href="/core/pfe-core/pfe.min.css">
6+
<link rel="stylesheet" href="/elements/pfe-card/pfe-card---lightdom.min.css">
7+
<link rel="stylesheet" href="/elements/pfe-card/demo/demo.css">
8+
9+
<div class="demo-cards">
10+
11+
<pfe-card color="lightest" pfe-border>
12+
<h2 slot="header">Lightest card</h2>
13+
<p>This is the lightest pfe-card and <a href="#">a link</a>, and <a href=".">a visited link</a> with
14+
<code>pfe-border</code>.</p>
15+
<div class="button-series" slot="footer">
16+
<pfe-cta slot="footer" priority="secondary">
17+
<a href="#">Try</a>
18+
</pfe-cta>
19+
<pfe-cta priority="primary">
20+
<a href="#">Buy</a>
21+
</pfe-cta>
22+
</div>
23+
</pfe-card>
24+
25+
<pfe-card>
26+
<h2 slot="header">Default card</h2>
27+
Unwrapped item. This is the default pfe-card and <a href=#"">a link</a>, and <a href=".">a visited link</a>.
28+
<div class="button-series" slot="footer">
29+
<pfe-cta slot="footer" priority="secondary">
30+
<a href="#">Try</a>
31+
</pfe-cta>
32+
<pfe-cta priority="primary">
33+
<a href="#">Buy</a>
34+
</pfe-cta>
35+
</div>
36+
</pfe-card>
37+
38+
<pfe-card color="darker">
39+
<h2 slot="header">Darker Card</h2>
40+
<p>This is the darker pfe-card and <a href="#">a link</a>, and <a href=".">a visited link</a>.</p>
41+
<div class="button-series" slot="footer">
42+
<pfe-cta slot="footer" priority="secondary">
43+
<a href="#">Try</a>
44+
</pfe-cta>
45+
<pfe-cta priority="primary">
46+
<a href="#">Buy</a>
47+
</pfe-cta>
48+
</div>
49+
</pfe-card>
50+
51+
<pfe-card color="darkest">
52+
<h2 slot="header">Darkest Card</h2>
53+
<p>This is the darkest pfe-card and <a href="#">a link</a>, and <a href=".">a visited link</a>.</p>
54+
<pfe-cta slot="footer">
55+
<a href="#">Learn more</a>
56+
</pfe-cta>
57+
</pfe-card>
58+
59+
<pfe-card color="complement">
60+
<h2 slot="header">Complement Card</h2>
61+
<p>This is the complement pfe-card and <a href="#">a link</a>, and <a href=".">a visited link</a>.</p>
62+
<pfe-cta slot="footer">
63+
<a href="#">Learn more</a>
64+
</pfe-cta>
65+
</pfe-card>
66+
67+
<pfe-card color="accent">
68+
<h2 slot="header">Accent Card</h2>
69+
<p>This is the accent pfe-card and <a href="#">a link</a>, and <a href=".">a visited link</a>.</p>
70+
<pfe-cta slot="footer">
71+
<a href="#">Learn more</a>
72+
</pfe-cta>
73+
</pfe-card>
74+
75+
</div>
76+
<div class="demo-cards">
77+
78+
<pfe-card color="lightest">
79+
<img overflow="top right left" src="/elements/pfe-card/demo/kitten-900x300.jpeg" />
80+
<h2>Imaged card with top & side overflow</h2>
81+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat porro similique saepe tempora vel! Facilis,
82+
porro?</p>
83+
<pfe-cta slot="footer">
84+
<a href="#">Learn more</a>
85+
</pfe-cta>
86+
</pfe-card>
87+
88+
<pfe-card color="lightest" class="custom-header-background">
89+
<h2 slot="header">Imaged card with side overflow + header</h2>
90+
<img overflow="top right left" src="/elements/pfe-card/demo/kitten-500x250.jpeg" />
91+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat porro similique saepe tempora vel! Facilis,
92+
porro?</p>
93+
<pfe-cta slot="footer">
94+
<a href="#">Learn more</a>
95+
</pfe-cta>
96+
</pfe-card>
97+
98+
<pfe-card color="lighter">
99+
<h2>Imaged card with side overflow</h2>
100+
<img overflow="right left" src="/elements/pfe-card/demo/kitten-650x250.jpeg" />
101+
<pfe-cta slot="footer">
102+
<a href="#">Learn more</a>
103+
</pfe-cta>
104+
</pfe-card>
105+
106+
<pfe-card color="darker">
107+
<h2>Imaged card with side & bottom overflow</h2>
108+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta rerum tempore natus alias! Cumque illum
109+
provident corrupti voluptates.</p>
110+
<img overflow="right left bottom" src="/elements/pfe-card/demo/kitten-400x250.jpeg" slot="footer" />
111+
</pfe-card>
112+
113+
<pfe-card color="darker" img-src="/elements/pfe-card/demo/kitten-500x500.jpeg"
114+
style="--pfe-card__header--BackgroundColor--dark: rgba(45,45,45,.7);">
115+
<h2 slot="header">Background Image on card </h2>
116+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta rerum tempore natus alias! Cumque illum
117+
provident corrupti voluptates.</p>
118+
</pfe-card>
119+
120+
</div>

elements/pfe-card/demo/pfe-card.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import '@patternfly/pfe-band';
2+
import '@patternfly/pfe-card';

0 commit comments

Comments
 (0)