@progressive-development/pd-content 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pd-box-view.js +3 -0
- package/src/PdBoxView.js +49 -0
- package/stories/box-view.stories.js +61 -0
- package/stories/collapse.stories.js +34 -0
- package/stories/edit-content.stories.js +23 -0
- package/stories/more-info.stories.js +75 -0
- package/stories/resize-content.stories.js +28 -0
- package/stories/index.stories.js +0 -44
package/package.json
CHANGED
package/pd-box-view.js
ADDED
package/src/PdBoxView.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export class PdBoxView extends LitElement {
|
|
4
|
+
static get styles() {
|
|
5
|
+
return [
|
|
6
|
+
css`
|
|
7
|
+
:host {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: repeat(
|
|
10
|
+
var(--squi-box-columns, 4),
|
|
11
|
+
minmax(var(--squi-box-min-width, 100px), 1fr)
|
|
12
|
+
);
|
|
13
|
+
/*grid-auto-rows: minmax(var(--squi-box-min-height, 100px), 1fr); Für mobile 1 cloum auskommentiert, ging auch für große Ansicht, also eher hinderlich?*/
|
|
14
|
+
gap: var(--squi-box-gap, 25px);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media (min-width: 580px) {
|
|
18
|
+
.button-icon squi-icon {
|
|
19
|
+
margin: 0 0.5rem;
|
|
20
|
+
}
|
|
21
|
+
.button-icon.small squi-icon {
|
|
22
|
+
padding-right: 0.5rem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static get properties() {
|
|
30
|
+
return {
|
|
31
|
+
primary: { type: Boolean },
|
|
32
|
+
gradient: { type: Boolean },
|
|
33
|
+
disabled: { type: Boolean },
|
|
34
|
+
text: { type: String },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
this.primary = false;
|
|
41
|
+
this.gradient = true;
|
|
42
|
+
this.disabled = false;
|
|
43
|
+
this.text = 'Ok';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
render() {
|
|
47
|
+
return html` <slot></slot> `;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../pd-box-view.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'PdContent/Box View',
|
|
6
|
+
component: 'pd-box-view',
|
|
7
|
+
argTypes: {
|
|
8
|
+
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function Template() {
|
|
13
|
+
return html`
|
|
14
|
+
|
|
15
|
+
<h1>4 Columns (default)</h1>
|
|
16
|
+
|
|
17
|
+
<pd-box-view>
|
|
18
|
+
<div style="background-color: blue;">Test</div>
|
|
19
|
+
<div style="background-color: red;">Test</div>
|
|
20
|
+
<div style="background-color: green;">Test</div>
|
|
21
|
+
<div style="background-color: black;">Test</div>
|
|
22
|
+
<div style="background-color: grey;">Test</div>
|
|
23
|
+
<div style="background-color: purple;">Test</div>
|
|
24
|
+
</pd-box-view>
|
|
25
|
+
|
|
26
|
+
<h1>2 Columns</h1>
|
|
27
|
+
<pd-box-view style="--squi-box-columns: 2;">
|
|
28
|
+
<div style="background-color: blue;">Test</div>
|
|
29
|
+
<div style="background-color: red;">Test</div>
|
|
30
|
+
<div style="background-color: green;">Test</div>
|
|
31
|
+
<div style="background-color: black;">Test</div>
|
|
32
|
+
<div style="background-color: grey;">Test</div>
|
|
33
|
+
<div style="background-color: purple;">Test</div>
|
|
34
|
+
</pd-box-view>
|
|
35
|
+
|
|
36
|
+
<h1>3 Columns / Custom Gap</h1>
|
|
37
|
+
<pd-box-view style="--squi-box-columns: 3; --squi-box-gap: 100px;">
|
|
38
|
+
<div style="background-color: blue;">Test</div>
|
|
39
|
+
<div style="background-color: red;">Test</div>
|
|
40
|
+
<div style="background-color: green;">Test</div>
|
|
41
|
+
<div style="background-color: black;">Test</div>
|
|
42
|
+
<div style="background-color: grey;">Test</div>
|
|
43
|
+
<div style="background-color: purple;">Test</div>
|
|
44
|
+
</pd-box-view>
|
|
45
|
+
|
|
46
|
+
<h1>1 Columns</h1>
|
|
47
|
+
<pd-box-view style="--squi-box-columns: 1;">
|
|
48
|
+
<div style="background-color: blue;">Test</div>
|
|
49
|
+
<div style="background-color: red;">Test</div>
|
|
50
|
+
<div style="background-color: green;">Test</div>
|
|
51
|
+
<div style="background-color: black;">Test</div>
|
|
52
|
+
<div style="background-color: grey;">Test</div>
|
|
53
|
+
<div style="background-color: purple;">Test</div>
|
|
54
|
+
</pd-box-view>
|
|
55
|
+
`;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const BoxView = Template.bind({});
|
|
59
|
+
BoxView.args = {
|
|
60
|
+
};
|
|
61
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../pd-collapse.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'PdContent/Collapse',
|
|
6
|
+
component: 'pd-collapse',
|
|
7
|
+
argTypes: {
|
|
8
|
+
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function Template() {
|
|
13
|
+
return html`
|
|
14
|
+
|
|
15
|
+
<pd-collapse>
|
|
16
|
+
|
|
17
|
+
<div slot="header" class="header">
|
|
18
|
+
Test Title
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div slot="content" class="form-group">
|
|
22
|
+
Test Content...
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
</pd-collapse>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Collapse = Template.bind({});
|
|
32
|
+
Collapse.args = {
|
|
33
|
+
};
|
|
34
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../pd-edit-content.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'PdContent/Edit Content',
|
|
6
|
+
component: 'pd-edit-content',
|
|
7
|
+
argTypes: {
|
|
8
|
+
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function Template() {
|
|
13
|
+
return html`
|
|
14
|
+
<pd-edit-content contentTitle="Test content">
|
|
15
|
+
<p>Some content for edit</p>
|
|
16
|
+
</pd-edit-content>
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const EditContent = Template.bind({});
|
|
21
|
+
EditContent.args = {
|
|
22
|
+
};
|
|
23
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../pd-more-info.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'PdContent/More Info',
|
|
6
|
+
component: 'pd-more-info',
|
|
7
|
+
argTypes: {
|
|
8
|
+
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function Template() {
|
|
13
|
+
return html`
|
|
14
|
+
<h1>More Info Story</h1>
|
|
15
|
+
<pd-more-info>
|
|
16
|
+
<span slot="small-view">
|
|
17
|
+
Een regelmatig onderhoud van uw verwarmingsinstallatie is
|
|
18
|
+
essentieel en levert tal van voordelen op.
|
|
19
|
+
</span>
|
|
20
|
+
<span slot="large-view">
|
|
21
|
+
<p>
|
|
22
|
+
Een regelmatig onderhoud van uw verwarmingsinstallatie is
|
|
23
|
+
essentieel en levert tal van voordelen op. Bovendien is door de
|
|
24
|
+
Vlaamse overheid wettelijk verplicht het onderhoud tweejaarlijks
|
|
25
|
+
te laten uitvoeren door een erkende technieker.
|
|
26
|
+
</p>
|
|
27
|
+
<p>
|
|
28
|
+
Het regelmatig onderhouden van uw verwarmingsinstallatie levert
|
|
29
|
+
tal van voordelen op:
|
|
30
|
+
</p>
|
|
31
|
+
<ul>
|
|
32
|
+
<li>
|
|
33
|
+
<b>Je bespaart energie</b> - Een vakkundig onderhoud zorgt
|
|
34
|
+
voor een zuinige verwarmingsketel en lagere verwarmingskosten.
|
|
35
|
+
Zo bespaar je op je energiefactuur.
|
|
36
|
+
</li>
|
|
37
|
+
<li>
|
|
38
|
+
<b>Uw veiligheid</b> - Vermijd gevaarlijke situaties, zoals
|
|
39
|
+
CO-vergiftiging of schouwbrand.
|
|
40
|
+
</li>
|
|
41
|
+
<li>
|
|
42
|
+
<b>U beperkt het risico op pannes</b> - Door regelmatig uw
|
|
43
|
+
verwarmingsinstallatie te onderhouden, verklein je de kans op
|
|
44
|
+
defecten en vermijd je hoge herstellingskosten. Bovendien gaat
|
|
45
|
+
je verwarmingsketel gaat langer mee.
|
|
46
|
+
</li>
|
|
47
|
+
<li>
|
|
48
|
+
<b>U bent wettelijk in orde</b> - Het onderhouden van uw
|
|
49
|
+
verwarmingsinstallatie is verplicht in Vlaanderen.
|
|
50
|
+
</li>
|
|
51
|
+
</ul>
|
|
52
|
+
<ul>
|
|
53
|
+
<li>
|
|
54
|
+
Verwarmingsketels op gas (aardgas, butaan, propaan) moeten
|
|
55
|
+
2-jaarlijks een onderhoudsbeurt krijgen.
|
|
56
|
+
</li>
|
|
57
|
+
<li>
|
|
58
|
+
Verwarmingsketels op stookolie (mazout) of vaste brandstof
|
|
59
|
+
(hout, pellets, steenkool, ...) moeten jaarlijks een
|
|
60
|
+
onderhoudsbeurt krijgen.
|
|
61
|
+
</li>
|
|
62
|
+
<li>
|
|
63
|
+
Het onderhoud op een gas- of stookolieketel moet uitgevoerd
|
|
64
|
+
worden door een erkende technicus.
|
|
65
|
+
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
</span>
|
|
68
|
+
</pd-more-info>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const MoreInfo = Template.bind({});
|
|
73
|
+
MoreInfo.args = {
|
|
74
|
+
};
|
|
75
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable lit-a11y/alt-text */
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import '../pd-resize-content.js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'PdContent/Resize Content',
|
|
7
|
+
component: 'pd-resize-content',
|
|
8
|
+
argTypes: {
|
|
9
|
+
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function Template() {
|
|
14
|
+
return html`
|
|
15
|
+
<pd-resize-content>
|
|
16
|
+
<div slot="preview-content">Eine kurze Vorschau</div>
|
|
17
|
+
<div slot="resize-content">
|
|
18
|
+
<p>Hier steht dann etwaslängerer Text und alles weiteree auch es kann lang und groß werden</p>
|
|
19
|
+
<img src="https://bilder.t-online.de/b/84/93/82/46/id_84938246/920/tid_da/eichhoernchen-geert-weggen-zeigt-die-welt-der-kleinen-nager-.jpg">
|
|
20
|
+
</div>
|
|
21
|
+
</pd-resize-content>
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const ResizeContent = Template.bind({});
|
|
26
|
+
ResizeContent.args = {
|
|
27
|
+
};
|
|
28
|
+
|
package/stories/index.stories.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import '../pd-content.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PdContent',
|
|
6
|
-
component: 'pd-content',
|
|
7
|
-
argTypes: {
|
|
8
|
-
title: { control: 'text' },
|
|
9
|
-
counter: { control: 'number' },
|
|
10
|
-
textColor: { control: 'color' },
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function Template({ title = 'Hello world', counter = 5, textColor, slot }) {
|
|
15
|
-
return html`
|
|
16
|
-
<pd-content
|
|
17
|
-
style="--pd-content-text-color: ${textColor || 'black'}"
|
|
18
|
-
.title=${title}
|
|
19
|
-
.counter=${counter}
|
|
20
|
-
>
|
|
21
|
-
${slot}
|
|
22
|
-
</pd-content>
|
|
23
|
-
`;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const Regular = Template.bind({});
|
|
27
|
-
|
|
28
|
-
export const CustomTitle = Template.bind({});
|
|
29
|
-
CustomTitle.args = {
|
|
30
|
-
title: 'My title',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const CustomCounter = Template.bind({});
|
|
34
|
-
CustomCounter.args = {
|
|
35
|
-
counter: 123456,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const SlottedContent = Template.bind({});
|
|
39
|
-
SlottedContent.args = {
|
|
40
|
-
slot: html`<p>Slotted content</p>`,
|
|
41
|
-
};
|
|
42
|
-
SlottedContent.argTypes = {
|
|
43
|
-
slot: { table: { disable: true } },
|
|
44
|
-
};
|