@progressive-development/pd-content 0.7.17 → 0.9.2
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/dist/index.d.ts +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -18
- package/dist/locales/be.js +2 -3
- package/dist/locales/de.js +2 -3
- package/dist/locales/en.js +2 -3
- package/dist/pd-box-view/PdBoxView.d.ts +9 -0
- package/dist/pd-box-view/PdBoxView.d.ts.map +1 -0
- package/dist/pd-box-view/PdBoxView.js +23 -0
- package/dist/pd-box-view/pd-box-view.d.ts +3 -0
- package/dist/pd-box-view/pd-box-view.d.ts.map +1 -0
- package/dist/{stories → pd-box-view}/pd-box-view.stories.d.ts +1 -1
- package/dist/pd-box-view/pd-box-view.stories.d.ts.map +1 -0
- package/dist/pd-box-view.d.ts +2 -6
- package/dist/pd-box-view.js +8 -33
- package/dist/pd-collapse/PdCollapse.d.ts +38 -0
- package/dist/pd-collapse/PdCollapse.d.ts.map +1 -0
- package/dist/pd-collapse/PdCollapse.js +213 -0
- package/dist/pd-collapse/pd-collapse.d.ts +3 -0
- package/dist/pd-collapse/pd-collapse.d.ts.map +1 -0
- package/dist/{stories → pd-collapse}/pd-collapse.stories.d.ts +1 -1
- package/dist/pd-collapse/pd-collapse.stories.d.ts.map +1 -0
- package/dist/pd-collapse-group/PdCollapseGroup.d.ts +28 -0
- package/dist/pd-collapse-group/PdCollapseGroup.d.ts.map +1 -0
- package/dist/pd-collapse-group/PdCollapseGroup.js +90 -0
- package/dist/pd-collapse-group/pd-collapse-group.d.ts +3 -0
- package/dist/pd-collapse-group/pd-collapse-group.d.ts.map +1 -0
- package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts.map +1 -0
- package/dist/pd-collapse-group.d.ts +2 -27
- package/dist/pd-collapse-group.js +8 -97
- package/dist/pd-collapse.d.ts +2 -36
- package/dist/pd-collapse.js +6 -216
- package/dist/pd-edit-content/PdEditContent.d.ts +32 -0
- package/dist/pd-edit-content/PdEditContent.d.ts.map +1 -0
- package/dist/pd-edit-content/PdEditContent.js +218 -0
- package/dist/pd-edit-content/pd-edit-content.d.ts +3 -0
- package/dist/pd-edit-content/pd-edit-content.d.ts.map +1 -0
- package/dist/{stories → pd-edit-content}/pd-edit-content.stories.d.ts +2 -2
- package/dist/pd-edit-content/pd-edit-content.stories.d.ts.map +1 -0
- package/dist/pd-edit-content.d.ts +2 -29
- package/dist/pd-edit-content.js +6 -222
- package/dist/pd-more-info/PdMoreInfo.d.ts +25 -0
- package/dist/pd-more-info/PdMoreInfo.d.ts.map +1 -0
- package/dist/pd-more-info/PdMoreInfo.js +80 -0
- package/dist/pd-more-info/pd-more-info.d.ts +3 -0
- package/dist/pd-more-info/pd-more-info.d.ts.map +1 -0
- package/dist/pd-more-info/pd-more-info.stories.d.ts.map +1 -0
- package/dist/pd-more-info.d.ts +2 -23
- package/dist/pd-more-info.js +6 -81
- package/dist/pd-panel-viewer/PdPanel.d.ts +9 -0
- package/dist/pd-panel-viewer/PdPanel.d.ts.map +1 -0
- package/dist/pd-panel-viewer/PdPanel.js +38 -0
- package/dist/pd-panel-viewer/PdPanelViewer.d.ts +20 -0
- package/dist/pd-panel-viewer/PdPanelViewer.d.ts.map +1 -0
- package/dist/pd-panel-viewer/PdPanelViewer.js +206 -0
- package/dist/pd-panel-viewer/pd-panel-viewer.d.ts +3 -0
- package/dist/pd-panel-viewer/pd-panel-viewer.d.ts.map +1 -0
- package/dist/pd-panel-viewer/pd-panel.d.ts +3 -0
- package/dist/pd-panel-viewer/pd-panel.d.ts.map +1 -0
- package/dist/pd-panel-viewer.d.ts +2 -17
- package/dist/pd-panel-viewer.js +6 -205
- package/dist/pd-panel.d.ts +2 -6
- package/dist/pd-panel.js +7 -47
- package/dist/pd-resize-content/PdResizeContent.d.ts +27 -0
- package/dist/pd-resize-content/PdResizeContent.d.ts.map +1 -0
- package/dist/pd-resize-content/PdResizeContent.js +62 -0
- package/dist/pd-resize-content/pd-resize-content.d.ts +3 -0
- package/dist/pd-resize-content/pd-resize-content.d.ts.map +1 -0
- package/dist/pd-resize-content/pd-resize-content.stories.d.ts.map +1 -0
- package/dist/pd-resize-content.d.ts +2 -25
- package/dist/pd-resize-content.js +6 -62
- package/dist/pd-tab/PdTab.d.ts +16 -0
- package/dist/pd-tab/PdTab.d.ts.map +1 -0
- package/dist/pd-tab/PdTab.js +176 -0
- package/dist/pd-tab/pd-tab.d.ts +3 -0
- package/dist/pd-tab/pd-tab.d.ts.map +1 -0
- package/dist/{stories → pd-tab}/pd-tab.stories.d.ts +1 -1
- package/dist/pd-tab/pd-tab.stories.d.ts.map +1 -0
- package/dist/pd-tab.d.ts +2 -13
- package/dist/pd-tab.js +6 -180
- package/dist/types.d.ts.map +1 -1
- package/package.json +28 -49
- package/dist/pd-box-view.d.ts.map +0 -1
- package/dist/pd-collapse-group.d.ts.map +0 -1
- package/dist/pd-collapse.d.ts.map +0 -1
- package/dist/pd-edit-content.d.ts.map +0 -1
- package/dist/pd-more-info.d.ts.map +0 -1
- package/dist/pd-panel-viewer.d.ts.map +0 -1
- package/dist/pd-panel.d.ts.map +0 -1
- package/dist/pd-resize-content.d.ts.map +0 -1
- package/dist/pd-tab.d.ts.map +0 -1
- package/dist/stories/pd-box-view.stories.d.ts.map +0 -1
- package/dist/stories/pd-collapse-group.stories.d.ts.map +0 -1
- package/dist/stories/pd-collapse.stories.d.ts.map +0 -1
- package/dist/stories/pd-edit-content.stories.d.ts.map +0 -1
- package/dist/stories/pd-more-info.stories.d.ts.map +0 -1
- package/dist/stories/pd-resize-content.stories.d.ts.map +0 -1
- package/dist/stories/pd-tab.stories.d.ts.map +0 -1
- /package/dist/{stories → pd-collapse-group}/pd-collapse-group.stories.d.ts +0 -0
- /package/dist/{stories → pd-more-info}/pd-more-info.stories.d.ts +0 -0
- /package/dist/{stories → pd-resize-content}/pd-resize-content.stories.d.ts +0 -0
package/dist/pd-edit-content.js
CHANGED
|
@@ -1,224 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { property, customElement } from "lit/decorators.js";
|
|
3
|
-
import { PdColorStyles, PdFontStyles } from "@progressive-development/pd-shared-styles";
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
8
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
-
if (decorator = decorators[i])
|
|
10
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11
|
-
if (kind && result) __defProp(target, key, result);
|
|
12
|
-
return result;
|
|
13
|
-
};
|
|
14
|
-
const editIcon = html`<svg
|
|
15
|
-
class="edit"
|
|
16
|
-
viewBox="0 0 19 19"
|
|
17
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
-
>
|
|
19
|
-
<g>
|
|
20
|
-
<path
|
|
21
|
-
d="M8.44,7.25C8.348,7.342,8.277,7.447,8.215,7.557L8.174,7.516L8.149,7.69 C8.049,7.925,8.014,8.183,8.042,8.442l-0.399,2.796l2.797-0.399c0.259,0.028,0.517-0.007,0.752-0.107l0.174-0.024l-0.041-0.041 c0.109-0.062,0.215-0.133,0.307-0.225l5.053-5.053l-3.191-3.191L8.44,7.25z"
|
|
22
|
-
fill="var(--edit-fill-color)"
|
|
23
|
-
/>
|
|
24
|
-
<path
|
|
25
|
-
d="M18.183,1.568l-0.87-0.87c-0.641-0.641-1.637-0.684-2.225-0.097l-0.797,0.797l3.191,3.191l0.797-0.798 C18.867,3.205,18.824,2.209,18.183,1.568z"
|
|
26
|
-
fill="var(--edit-fill-color)"
|
|
27
|
-
/>
|
|
28
|
-
<path
|
|
29
|
-
d="M15,9.696V17H2V2h8.953l1.523-1.42c0.162-0.161,0.353-0.221,0.555-0.293 c0.043-0.119,0.104-0.18,0.176-0.287H0v19h17V7.928L15,9.696z"
|
|
30
|
-
fill="var(--edit-fill-color)"
|
|
31
|
-
/>
|
|
32
|
-
</g>
|
|
33
|
-
</svg>`;
|
|
34
|
-
let PdEditContent = class extends LitElement {
|
|
35
|
-
constructor() {
|
|
36
|
-
super(...arguments);
|
|
37
|
-
this.contentTitle = "";
|
|
38
|
-
this.data = [];
|
|
39
|
-
this.editLinks = [];
|
|
40
|
-
this.editDisabled = false;
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
var _a;
|
|
44
|
-
return html`
|
|
45
|
-
<div class="header">
|
|
46
|
-
${this.stepNumber ? html`
|
|
47
|
-
<div class="circle">
|
|
48
|
-
<span class="step-number">${this.stepNumber}</span>
|
|
49
|
-
</div>
|
|
50
|
-
` : null}
|
|
51
|
-
<h4>${this.contentTitle}</h4>
|
|
52
|
-
</div>
|
|
53
|
-
<div>
|
|
54
|
-
${((_a = this.data) == null ? void 0 : _a.length) ? html`
|
|
55
|
-
<div class="param-data">
|
|
56
|
-
${this.data.map(
|
|
57
|
-
(entry) => html`<div>
|
|
58
|
-
<span class="label">${entry.name}</span>
|
|
59
|
-
<span class="value">${entry.val}</span>
|
|
60
|
-
</div>`
|
|
61
|
-
)}
|
|
62
|
-
</div>
|
|
63
|
-
` : null}
|
|
64
|
-
<slot></slot>
|
|
65
|
-
<div class="link-row">
|
|
66
|
-
${!this.editDisabled ? html`
|
|
67
|
-
<a @click="${this._editContent}">
|
|
68
|
-
<div class="link-item">
|
|
69
|
-
${editIcon} Bewerk ${this.contentTitle}
|
|
70
|
-
</div>
|
|
71
|
-
</a>
|
|
72
|
-
` : null}
|
|
73
|
-
${this.editLinks.map(
|
|
74
|
-
(link) => html`
|
|
75
|
-
<a data-link="${link.key}" @click="${this._editContent}">
|
|
76
|
-
<div class="link-item">
|
|
77
|
-
${PdEditContent._getLinkLogo(link)} ${link.txt}
|
|
78
|
-
</div>
|
|
79
|
-
</a>
|
|
80
|
-
`
|
|
81
|
-
)}
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
`;
|
|
85
|
-
}
|
|
86
|
-
static _getLinkLogo(link) {
|
|
87
|
-
if (link.icon) return link.icon;
|
|
88
|
-
if (link.defaultIcon) return editIcon;
|
|
89
|
-
return "";
|
|
90
|
-
}
|
|
91
|
-
_editContent(e) {
|
|
92
|
-
var _a, _b;
|
|
93
|
-
const link = (_b = (_a = e.currentTarget) == null ? void 0 : _a.dataset) == null ? void 0 : _b.link;
|
|
94
|
-
this.dispatchEvent(
|
|
95
|
-
new CustomEvent("edit-content", {
|
|
96
|
-
detail: { step: this.stepNumber, link },
|
|
97
|
-
bubbles: true,
|
|
98
|
-
composed: true
|
|
99
|
-
})
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
PdEditContent.styles = [
|
|
104
|
-
PdColorStyles,
|
|
105
|
-
PdFontStyles,
|
|
106
|
-
css`
|
|
107
|
-
:host {
|
|
108
|
-
display: block;
|
|
109
|
-
}
|
|
1
|
+
import { PdEditContent } from './pd-edit-content/PdEditContent.js';
|
|
110
2
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
line-height: 40px;
|
|
116
|
-
color: var(--pd-ec-font-title-col, var(--pd-default-bg-col));
|
|
117
|
-
padding-left: 5px;
|
|
118
|
-
}
|
|
3
|
+
const tag = "pd-edit-content";
|
|
4
|
+
if (!customElements.get(tag)) {
|
|
5
|
+
customElements.define(tag, PdEditContent);
|
|
6
|
+
}
|
|
119
7
|
|
|
120
|
-
|
|
121
|
-
display: flex;
|
|
122
|
-
gap: 5px;
|
|
123
|
-
background-color: var(--pd-ec-bg-col, var(--pd-default-col));
|
|
124
|
-
align-items: center;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.circle {
|
|
128
|
-
margin-left: 5px;
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: center;
|
|
131
|
-
justify-content: center;
|
|
132
|
-
width: 27px;
|
|
133
|
-
height: 27px;
|
|
134
|
-
border-radius: 50%;
|
|
135
|
-
background-color: var(--pd-ec-font-title-col, var(--pd-default-bg-col));
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.step-number {
|
|
139
|
-
font-family: var(--pd-default-font-title-family);
|
|
140
|
-
font-size: var(--pd-ec-font-title-size, 1.2em);
|
|
141
|
-
font-weight: var(--pd-ec-nr-font-weight, bold);
|
|
142
|
-
color: var(--pd-ec-bg-col, var(--pd-default-col));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.label {
|
|
146
|
-
display: inline-block;
|
|
147
|
-
font-weight: bold;
|
|
148
|
-
width: 200px;
|
|
149
|
-
padding-top: 10px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
a {
|
|
153
|
-
cursor: pointer;
|
|
154
|
-
font-family: var(--pd-default-font-link-family);
|
|
155
|
-
font-size: var(--pd-default-font-link-size);
|
|
156
|
-
color: var(--pd-default-font-link-col);
|
|
157
|
-
--edit-fill-color: var(--pd-default-font-link-col);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
a:hover {
|
|
161
|
-
color: var(--pd-default-font-link-col-hover);
|
|
162
|
-
--edit-fill-color: var(--pd-default-font-link-col-hover);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.edit {
|
|
166
|
-
width: 1.1em;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/*
|
|
170
|
-
could used as class for given svg icons, workaround class
|
|
171
|
-
hard coded for specific icon => maybe use custom properties here, but not for that hack...
|
|
172
|
-
*/
|
|
173
|
-
.own-edit-icon {
|
|
174
|
-
width: 2em;
|
|
175
|
-
margin-top: -10px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.link-row {
|
|
179
|
-
padding: 5px 0;
|
|
180
|
-
display: flex;
|
|
181
|
-
flex-wrap: wrap;
|
|
182
|
-
gap: 15px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.link-item {
|
|
186
|
-
display: flex;
|
|
187
|
-
gap: 2px;
|
|
188
|
-
white-space: nowrap;
|
|
189
|
-
align-items: center;
|
|
190
|
-
pointer-events: none;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.param-data {
|
|
194
|
-
padding-bottom: 10px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@media (max-width: 360px) {
|
|
198
|
-
.label {
|
|
199
|
-
width: 130px;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
`
|
|
203
|
-
];
|
|
204
|
-
__decorateClass([
|
|
205
|
-
property({ type: Number })
|
|
206
|
-
], PdEditContent.prototype, "stepNumber", 2);
|
|
207
|
-
__decorateClass([
|
|
208
|
-
property({ type: String })
|
|
209
|
-
], PdEditContent.prototype, "contentTitle", 2);
|
|
210
|
-
__decorateClass([
|
|
211
|
-
property({ type: Array })
|
|
212
|
-
], PdEditContent.prototype, "data", 2);
|
|
213
|
-
__decorateClass([
|
|
214
|
-
property({ type: Array })
|
|
215
|
-
], PdEditContent.prototype, "editLinks", 2);
|
|
216
|
-
__decorateClass([
|
|
217
|
-
property({ type: Boolean })
|
|
218
|
-
], PdEditContent.prototype, "editDisabled", 2);
|
|
219
|
-
PdEditContent = __decorateClass([
|
|
220
|
-
customElement("pd-edit-content")
|
|
221
|
-
], PdEditContent);
|
|
222
|
-
export {
|
|
223
|
-
PdEditContent
|
|
224
|
-
};
|
|
8
|
+
export { PdEditContent };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement, CSSResultGroup } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @tagname pd-more-info
|
|
4
|
+
*
|
|
5
|
+
* `pd-more-info` Komponente zeigt zuerst einen kompakten Text (Slot `small-view`)
|
|
6
|
+
* und erlaubt es dem Nutzer, bei Klick weitere Informationen (Slot `large-view`) einzublenden.
|
|
7
|
+
*
|
|
8
|
+
* @slot small-view - Der kompakte Textblock für die erste Ansicht
|
|
9
|
+
* @slot large-view - Der erweiterte Textblock nach Klick auf "Mehr Informationen"
|
|
10
|
+
*
|
|
11
|
+
* @cssprop --pd-default-font-content-col - Textfarbe
|
|
12
|
+
* @cssprop --pd-default-font-content-size - Textgröße
|
|
13
|
+
* @cssprop --pd-default-font-link-family - Schriftart für Link
|
|
14
|
+
* @cssprop --pd-default-font-link-size - Schriftgröße für Link
|
|
15
|
+
* @cssprop --pd-default-font-link-col - Linkfarbe
|
|
16
|
+
* @cssprop --pd-default-font-link-col-hover - Hoverfarbe für Link
|
|
17
|
+
*/
|
|
18
|
+
export declare class PdMoreInfo extends LitElement {
|
|
19
|
+
private _lessInfo;
|
|
20
|
+
static styles: CSSResultGroup;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
private _showMoreInfo;
|
|
23
|
+
private _showLessInfo;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=PdMoreInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdMoreInfo.d.ts","sourceRoot":"","sources":["../../src/pd-more-info/PdMoreInfo.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAI5D;;;;;;;;;;;;;;;GAeG;AACH,qBACa,UAAW,SAAQ,UAAU;IAExC,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAgB,MAAM,EAAE,cAAc,CAsBpC;IAEO,MAAM;IAoBf,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;CAWtB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { css, LitElement, html } from 'lit';
|
|
2
|
+
import { state } from 'lit/decorators.js';
|
|
3
|
+
import { localized, msg } from '@lit/localize';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let PdMoreInfo = class extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._lessInfo = true;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html`
|
|
22
|
+
<p>
|
|
23
|
+
${this._lessInfo ? html`
|
|
24
|
+
<slot name="small-view"></slot>
|
|
25
|
+
<a @click=${this._showMoreInfo}>
|
|
26
|
+
${msg("Mehr Informationen", { id: "pd.moreInfo.more" })}
|
|
27
|
+
</a>
|
|
28
|
+
` : html`
|
|
29
|
+
<slot name="large-view"></slot>
|
|
30
|
+
<a @click=${this._showLessInfo}>
|
|
31
|
+
${msg("Text ausblenden", { id: "pd.moreInfo.less" })}
|
|
32
|
+
</a>
|
|
33
|
+
`}
|
|
34
|
+
</p>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
_showMoreInfo() {
|
|
38
|
+
this._lessInfo = false;
|
|
39
|
+
}
|
|
40
|
+
_showLessInfo() {
|
|
41
|
+
this._lessInfo = true;
|
|
42
|
+
const rect = this.getBoundingClientRect();
|
|
43
|
+
window.scrollBy({
|
|
44
|
+
top: rect.top - 150,
|
|
45
|
+
left: 0,
|
|
46
|
+
behavior: "smooth"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
PdMoreInfo.styles = [
|
|
51
|
+
css`
|
|
52
|
+
:host {
|
|
53
|
+
display: block;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
p {
|
|
57
|
+
color: var(--pd-default-font-content-col);
|
|
58
|
+
font-size: var(--pd-default-font-content-size);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
a {
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
font-family: var(--pd-default-font-link-family);
|
|
64
|
+
font-size: var(--pd-default-font-link-size);
|
|
65
|
+
color: var(--pd-default-font-link-col);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
a:hover {
|
|
69
|
+
color: var(--pd-default-font-link-col-hover);
|
|
70
|
+
}
|
|
71
|
+
`
|
|
72
|
+
];
|
|
73
|
+
__decorateClass([
|
|
74
|
+
state()
|
|
75
|
+
], PdMoreInfo.prototype, "_lessInfo", 2);
|
|
76
|
+
PdMoreInfo = __decorateClass([
|
|
77
|
+
localized()
|
|
78
|
+
], PdMoreInfo);
|
|
79
|
+
|
|
80
|
+
export { PdMoreInfo };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-more-info.d.ts","sourceRoot":"","sources":["../../src/pd-more-info/pd-more-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-more-info.stories.d.ts","sourceRoot":"","sources":["../../src/pd-more-info/pd-more-info.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,mBAAmB,CAAC;wBAQtB,IAAI;AANT,wBAMU;AAyCV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAGzC,eAAO,MAAM,eAAe,SAA+B,CAAC"}
|
package/dist/pd-more-info.d.ts
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* `pd-more-info` Komponente zeigt zuerst einen kompakten Text (Slot `small-view`)
|
|
4
|
-
* und erlaubt es dem Nutzer, bei Klick weitere Informationen (Slot `large-view`) einzublenden.
|
|
5
|
-
*
|
|
6
|
-
* @slot small-view - Der kompakte Textblock für die erste Ansicht
|
|
7
|
-
* @slot large-view - Der erweiterte Textblock nach Klick auf "Mehr Informationen"
|
|
8
|
-
*
|
|
9
|
-
* @cssprop --pd-default-font-content-col - Textfarbe
|
|
10
|
-
* @cssprop --pd-default-font-content-size - Textgröße
|
|
11
|
-
* @cssprop --pd-default-font-link-family - Schriftart für Link
|
|
12
|
-
* @cssprop --pd-default-font-link-size - Schriftgröße für Link
|
|
13
|
-
* @cssprop --pd-default-font-link-col - Linkfarbe
|
|
14
|
-
* @cssprop --pd-default-font-link-col-hover - Hoverfarbe für Link
|
|
15
|
-
*/
|
|
16
|
-
export declare class PdMoreInfo extends LitElement {
|
|
17
|
-
private _lessInfo;
|
|
18
|
-
static styles: CSSResultGroup;
|
|
19
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
20
|
-
private _showMoreInfo;
|
|
21
|
-
private _showLessInfo;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=pd-more-info.d.ts.map
|
|
1
|
+
export * from './pd-more-info/pd-more-info'
|
|
2
|
+
export {}
|
package/dist/pd-more-info.js
CHANGED
|
@@ -1,83 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { state, customElement } from "lit/decorators.js";
|
|
3
|
-
import { localized, msg } from "@lit/localize";
|
|
4
|
-
import { PdFontStyles } from "@progressive-development/pd-shared-styles";
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
-
if (decorator = decorators[i])
|
|
11
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
-
if (kind && result) __defProp(target, key, result);
|
|
13
|
-
return result;
|
|
14
|
-
};
|
|
15
|
-
let PdMoreInfo = class extends LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this._lessInfo = true;
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return html`
|
|
22
|
-
<p>
|
|
23
|
-
${this._lessInfo ? html`
|
|
24
|
-
<slot name="small-view"></slot>
|
|
25
|
-
<a @click=${this._showMoreInfo}>
|
|
26
|
-
${msg("Mehr Informationen", { id: "pd.moreInfo.more" })}
|
|
27
|
-
</a>
|
|
28
|
-
` : html`
|
|
29
|
-
<slot name="large-view"></slot>
|
|
30
|
-
<a @click=${this._showLessInfo}>
|
|
31
|
-
${msg("Text ausblenden", { id: "pd.moreInfo.less" })}
|
|
32
|
-
</a>
|
|
33
|
-
`}
|
|
34
|
-
</p>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
_showMoreInfo() {
|
|
38
|
-
this._lessInfo = false;
|
|
39
|
-
}
|
|
40
|
-
_showLessInfo() {
|
|
41
|
-
this._lessInfo = true;
|
|
42
|
-
const rect = this.getBoundingClientRect();
|
|
43
|
-
window.scrollBy({
|
|
44
|
-
top: rect.top - 150,
|
|
45
|
-
left: 0,
|
|
46
|
-
behavior: "smooth"
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
PdMoreInfo.styles = [
|
|
51
|
-
PdFontStyles,
|
|
52
|
-
css`
|
|
53
|
-
:host {
|
|
54
|
-
display: block;
|
|
55
|
-
}
|
|
1
|
+
import { PdMoreInfo } from './pd-more-info/PdMoreInfo.js';
|
|
56
2
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
3
|
+
const tag = "pd-more-info";
|
|
4
|
+
if (!customElements.get(tag)) {
|
|
5
|
+
customElements.define(tag, PdMoreInfo);
|
|
6
|
+
}
|
|
61
7
|
|
|
62
|
-
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
font-family: var(--pd-default-font-link-family);
|
|
65
|
-
font-size: var(--pd-default-font-link-size);
|
|
66
|
-
color: var(--pd-default-font-link-col);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
a:hover {
|
|
70
|
-
color: var(--pd-default-font-link-col-hover);
|
|
71
|
-
}
|
|
72
|
-
`
|
|
73
|
-
];
|
|
74
|
-
__decorateClass([
|
|
75
|
-
state()
|
|
76
|
-
], PdMoreInfo.prototype, "_lessInfo", 2);
|
|
77
|
-
PdMoreInfo = __decorateClass([
|
|
78
|
-
customElement("pd-more-info"),
|
|
79
|
-
localized()
|
|
80
|
-
], PdMoreInfo);
|
|
81
|
-
export {
|
|
82
|
-
PdMoreInfo
|
|
83
|
-
};
|
|
8
|
+
export { PdMoreInfo };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdPanel.d.ts","sourceRoot":"","sources":["../../src/pd-panel-viewer/PdPanel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,UAAU,EAAO,MAAM,KAAK,CAAC;AAE5C;;GAEG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,0BAsBX;IAEF,MAAM;CAOP"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LitElement, css, html } from 'lit';
|
|
2
|
+
|
|
3
|
+
class PdPanel extends LitElement {
|
|
4
|
+
static {
|
|
5
|
+
this.styles = css`
|
|
6
|
+
:host {
|
|
7
|
+
background: var(--pd-panel-bg, #afc1d2);
|
|
8
|
+
border-radius: var(--pd-panel-border-radius, 0.2em);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Default styles for content */
|
|
12
|
+
#content {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
padding: 2rem;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: flex-start;
|
|
23
|
+
}
|
|
24
|
+
#content > slot::slotted(*) {
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return html`
|
|
31
|
+
<div id="content">
|
|
32
|
+
<slot></slot>
|
|
33
|
+
</div>
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { PdPanel };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @tagname pd-panel-viewer
|
|
4
|
+
*/
|
|
5
|
+
export declare class PdPanelViewer extends LitElement {
|
|
6
|
+
withProgress: boolean;
|
|
7
|
+
deltaCalc: number;
|
|
8
|
+
_index: number;
|
|
9
|
+
_panData: any;
|
|
10
|
+
_update: {};
|
|
11
|
+
static styles: import('lit').CSSResult;
|
|
12
|
+
get index(): number;
|
|
13
|
+
set index(value: number);
|
|
14
|
+
render(): import('lit').TemplateResult<1>;
|
|
15
|
+
firstUpdated(): void;
|
|
16
|
+
update(changedProperties: any): void;
|
|
17
|
+
next(): void;
|
|
18
|
+
previous(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=PdPanelViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdPanelViewer.d.ts","sourceRoot":"","sources":["../../src/pd-panel-viewer/PdPanelViewer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAM5C,OAAO,0CAA0C,CAAC;AAIlD;;GAEG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAE3C,YAAY,UAAS;IAGrB,SAAS,SAAK;IAGd,MAAM,SAAK;IAIX,QAAQ,EAAE,GAAG,CAAM;IAGnB,OAAO,KAAM;IAEb,MAAM,CAAC,MAAM,0BAkEX;IAEF,IAAI,KAAK,WAER;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAId;IAED,MAAM;IAmCN,YAAY;IAoBZ,MAAM,CAAC,iBAAiB,EAAE,GAAG;IAkC7B,IAAI;IASJ,QAAQ;CAOT"}
|