@progressive-development/pd-content 0.5.8 → 0.6.0
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/generated/locale-codes.d.ts +14 -0
- package/dist/generated/locale-codes.d.ts.map +1 -0
- package/dist/generated/locales/be.d.ts +5 -0
- package/dist/generated/locales/be.d.ts.map +1 -0
- package/dist/generated/locales/de.d.ts +5 -0
- package/dist/generated/locales/de.d.ts.map +1 -0
- package/dist/generated/locales/en.d.ts +5 -0
- package/dist/generated/locales/en.d.ts.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -5
- package/dist/locales/be.d.ts +2 -0
- package/dist/locales/de.d.ts +2 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/pd-box-view.d.ts +6 -0
- package/dist/pd-box-view.d.ts.map +1 -0
- package/dist/pd-box-view.js +33 -4
- package/dist/pd-collapse.d.ts +31 -0
- package/dist/pd-collapse.d.ts.map +1 -0
- package/dist/pd-collapse.js +151 -4
- package/dist/pd-edit-content.d.ts +29 -0
- package/dist/pd-edit-content.d.ts.map +1 -0
- package/dist/pd-edit-content.js +224 -4
- package/dist/pd-more-info.d.ts +23 -0
- package/dist/pd-more-info.d.ts.map +1 -0
- package/dist/pd-more-info.js +83 -4
- package/dist/pd-resize-content.d.ts +25 -0
- package/dist/pd-resize-content.d.ts.map +1 -0
- package/dist/pd-resize-content.js +64 -4
- package/dist/stories/pd-box-view.stories.d.ts +10 -0
- package/dist/stories/pd-box-view.stories.d.ts.map +1 -0
- package/dist/stories/pd-collapse.stories.d.ts +21 -0
- package/dist/stories/pd-collapse.stories.d.ts.map +1 -0
- package/dist/stories/pd-edit-content.stories.d.ts +11 -0
- package/dist/stories/pd-edit-content.stories.d.ts.map +1 -0
- package/dist/stories/pd-more-info.stories.d.ts +6 -0
- package/dist/stories/pd-more-info.stories.d.ts.map +1 -0
- package/dist/stories/pd-resize-content.stories.d.ts +5 -0
- package/dist/stories/pd-resize-content.stories.d.ts.map +1 -0
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +29 -45
- package/dist/src/PdBoxView.js +0 -24
- package/dist/src/PdCollapse.js +0 -135
- package/dist/src/PdEditContent.js +0 -223
- package/dist/src/PdMoreInfo.js +0 -77
- package/dist/src/PdResizeContent.js +0 -67
package/dist/pd-more-info.js
CHANGED
|
@@ -1,4 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
import { css, LitElement, html } from "lit";
|
|
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
|
+
}
|
|
56
|
+
|
|
57
|
+
p {
|
|
58
|
+
color: var(--pd-default-font-content-col);
|
|
59
|
+
font-size: var(--pd-default-font-content-size);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
a {
|
|
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
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Komponente zur responsiven Darstellung von Inhalten.
|
|
4
|
+
* Wenn die Bildschirmbreite unter `resizeWidth` liegt, wird ein Popup angezeigt.
|
|
5
|
+
*
|
|
6
|
+
* @fires book-date – Wenn ein freier Termin ausgewählt wird (nicht aktiv)
|
|
7
|
+
* @fires edit-selection – Wenn der Nutzer Datum oder PLZ bearbeiten möchte (nicht aktiv)
|
|
8
|
+
*
|
|
9
|
+
* @slot resize-content - Der Hauptinhalt, der bei ausreichender Breite direkt angezeigt wird.
|
|
10
|
+
* @slot preview-content - Der Vorschauinhalt, der im Popup angezeigt wird, wenn die Breite nicht ausreicht.
|
|
11
|
+
*/
|
|
12
|
+
export declare class PdResizeContent extends LitElement {
|
|
13
|
+
/**
|
|
14
|
+
* Minimale Breite, ab der der Inhalt direkt dargestellt wird. Darunter erscheint ein Popup.
|
|
15
|
+
*/
|
|
16
|
+
resizeWidth: string;
|
|
17
|
+
/**
|
|
18
|
+
* Interner Zustand: Gibt an, ob der Inhalt versteckt werden soll und stattdessen ein Popup angezeigt wird.
|
|
19
|
+
*/
|
|
20
|
+
private _hideContent;
|
|
21
|
+
static styles: import('lit').CSSResult;
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
protected render(): import('lit-html').TemplateResult<1>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=pd-resize-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-resize-content.d.ts","sourceRoot":"","sources":["../src/pd-resize-content.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,OAAO,6CAA6C,CAAC;AAErD;;;;;;;;;GASG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAC7C;;OAEG;IAEH,WAAW,SAAY;IAEvB;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAS;IAE7B,MAAM,CAAC,MAAM,0BAaX;IAEF,iBAAiB,IAAI,IAAI;IAUzB,SAAS,CAAC,MAAM;CAUjB"}
|
|
@@ -1,4 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { css, LitElement, html } from "lit";
|
|
2
|
+
import { property, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { installMediaQueryWatcher } from "pwa-helpers/media-query.js";
|
|
4
|
+
import "@progressive-development/pd-dialog/pd-popup";
|
|
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 PdResizeContent = class extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.resizeWidth = "1232px";
|
|
19
|
+
this._hideContent = false;
|
|
20
|
+
}
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
super.connectedCallback();
|
|
23
|
+
installMediaQueryWatcher(
|
|
24
|
+
`(min-width: ${this.resizeWidth})`,
|
|
25
|
+
(matches) => {
|
|
26
|
+
this._hideContent = !matches;
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return this._hideContent ? html`
|
|
32
|
+
<pd-popup>
|
|
33
|
+
<div slot="small-view"><slot name="preview-content"></slot></div>
|
|
34
|
+
<div slot="content"><slot name="resize-content"></slot></div>
|
|
35
|
+
</pd-popup>
|
|
36
|
+
` : html`<slot name="resize-content"></slot>`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
PdResizeContent.styles = css`
|
|
40
|
+
:host {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
h3 {
|
|
45
|
+
color: #084c61;
|
|
46
|
+
font-family: Oswald;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
p {
|
|
50
|
+
color: #084c61;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
__decorateClass([
|
|
54
|
+
property({ type: String })
|
|
55
|
+
], PdResizeContent.prototype, "resizeWidth", 2);
|
|
56
|
+
__decorateClass([
|
|
57
|
+
state()
|
|
58
|
+
], PdResizeContent.prototype, "_hideContent", 2);
|
|
59
|
+
PdResizeContent = __decorateClass([
|
|
60
|
+
customElement("pd-resize-content")
|
|
61
|
+
], PdResizeContent);
|
|
62
|
+
export {
|
|
63
|
+
PdResizeContent
|
|
64
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/web-components';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: string;
|
|
5
|
+
render: () => import('lit-html').TemplateResult<1>;
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj;
|
|
9
|
+
export declare const BoxView: Story;
|
|
10
|
+
//# sourceMappingURL=pd-box-view.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-box-view.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-box-view.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,mBAAmB,CAAC;AAE3B,QAAA,MAAM,IAAI;;;;CA6CM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/web-components';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
render: ({ active, header, content, }: import('@storybook/web-components').Args) => import('lit-html').TemplateResult<1>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
active: {
|
|
7
|
+
control: "boolean";
|
|
8
|
+
};
|
|
9
|
+
header: {
|
|
10
|
+
control: "text";
|
|
11
|
+
};
|
|
12
|
+
content: {
|
|
13
|
+
control: "text";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj;
|
|
19
|
+
export declare const Closed: Story;
|
|
20
|
+
export declare const Open: Story;
|
|
21
|
+
//# sourceMappingURL=pd-collapse.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-collapse.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-collapse.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,mBAAmB,CAAC;AAE3B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAiBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/web-components';
|
|
2
|
+
declare const _default: Meta;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: StoryFn<any>;
|
|
5
|
+
export declare const WithEditLinks: StoryFn<any>;
|
|
6
|
+
export declare const EditDisabled: StoryFn<any>;
|
|
7
|
+
export declare const WithoutStepNumber: StoryFn<any>;
|
|
8
|
+
export declare const CustomSlotContent: StoryFn<any>;
|
|
9
|
+
export declare const EditContent: () => import('lit-html').TemplateResult<1>;
|
|
10
|
+
export declare const NumberEditContent: () => import('lit-html').TemplateResult<1>;
|
|
11
|
+
//# sourceMappingURL=pd-edit-content.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-edit-content.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-edit-content.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,uBAAuB,CAAC;wBAS1B,IAAI;AAPT,wBAOU;AA+FV,eAAO,MAAM,OAAO,cAAoB,CAAC;AASzC,eAAO,MAAM,aAAa,cAAoB,CAAC;AAS/C,eAAO,MAAM,YAAY,cAAoB,CAAC;AAS9C,eAAO,MAAM,iBAAiB,cAAoB,CAAC;AAQnD,eAAO,MAAM,iBAAiB,cAAoB,CAAC;AAenD,eAAO,MAAM,WAAW,4CAsDvB,CAAC;AAGF,eAAO,MAAM,iBAAiB,4CA0B7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-more-info.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-more-info.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,oBAAoB,CAAC;wBAQvB,IAAI;AANT,wBAMU;AAyCV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAGzC,eAAO,MAAM,eAAe,SAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-resize-content.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-resize-content.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,sBAAsB,CAAC;wBAWzB,IAAI;AATT,wBASU;AAqBV,eAAO,MAAM,OAAO,SAAoB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typdefinitionen für die PdCollapse Komponente
|
|
3
|
+
*/
|
|
4
|
+
export interface PdCollapseToggleEventDetail {
|
|
5
|
+
/**
|
|
6
|
+
* Gibt den neuen aktiven Zustand an.
|
|
7
|
+
* `true` wenn geöffnet, `false` wenn geschlossen.
|
|
8
|
+
*/
|
|
9
|
+
detail: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface PdEditLink {
|
|
12
|
+
key: string;
|
|
13
|
+
txt: string;
|
|
14
|
+
icon?: unknown;
|
|
15
|
+
defaultIcon?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface PdEditContentDataEntry {
|
|
18
|
+
name: string;
|
|
19
|
+
val: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-development/pd-content",
|
|
3
|
+
"version": "0.6.0",
|
|
3
4
|
"description": "Progressive Development content components. ",
|
|
4
5
|
"author": "PD Progressive Development",
|
|
5
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
-
"version": "0.5.8",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
".": "./dist/index.js",
|
|
11
12
|
"./pd-box-view": "./dist/pd-box-view.js",
|
|
@@ -24,71 +25,54 @@
|
|
|
24
25
|
"LICENSE"
|
|
25
26
|
],
|
|
26
27
|
"scripts": {
|
|
27
|
-
"analyze": "cem analyze --litelement",
|
|
28
|
+
"analyze": "cem analyze --litelement --exclude dist,demo",
|
|
28
29
|
"start": "vite",
|
|
29
30
|
"build": "vite build",
|
|
30
31
|
"preview": "vite preview",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"lint": "eslint --ext .ts,.html src --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
34
|
+
"format": "eslint --ext .ts,.html src --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
33
35
|
"test": "vitest run --coverage",
|
|
34
36
|
"test:watch": "vitest --watch",
|
|
37
|
+
"check": "npm run lint && npm run build",
|
|
38
|
+
"prepublishOnly": "npm run clean && npm run check",
|
|
35
39
|
"localizeExtract": "lit-localize extract",
|
|
36
40
|
"localizeBuild": "lit-localize build",
|
|
37
41
|
"storybook": "storybook dev -p 6006",
|
|
38
42
|
"build-storybook": "storybook build"
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
|
-
"@lit/localize": "^0.
|
|
42
|
-
"@progressive-development/pd-dialog": "^0.
|
|
43
|
-
"@progressive-development/pd-icon": "^0.
|
|
44
|
-
"@progressive-development/pd-shared-styles": "^0.
|
|
45
|
-
"lit": "^
|
|
45
|
+
"@lit/localize": "^0.12.2",
|
|
46
|
+
"@progressive-development/pd-dialog": "^0.6.0",
|
|
47
|
+
"@progressive-development/pd-icon": "^0.6.1",
|
|
48
|
+
"@progressive-development/pd-shared-styles": "^0.2.1",
|
|
49
|
+
"lit": "^3.3.0",
|
|
46
50
|
"pwa-helpers": "^0.9.1"
|
|
47
51
|
},
|
|
48
52
|
"devDependencies": {
|
|
49
|
-
"@chromatic-com/storybook": "^1.
|
|
53
|
+
"@chromatic-com/storybook": "^1.9.0",
|
|
50
54
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
51
55
|
"@lit/localize-tools": "^0.6.10",
|
|
52
|
-
"@storybook/addon-essentials": "^8.
|
|
53
|
-
"@storybook/addon-links": "^8.
|
|
56
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
57
|
+
"@storybook/addon-links": "^8.6.14",
|
|
54
58
|
"@storybook/blocks": "^8.0.10",
|
|
55
|
-
"@storybook/test": "^8.
|
|
59
|
+
"@storybook/test": "^8.6.14",
|
|
56
60
|
"@storybook/web-components": "^8.0.10",
|
|
57
|
-
"@storybook/web-components-vite": "^8.
|
|
58
|
-
"eslint": "^
|
|
59
|
-
"eslint
|
|
61
|
+
"@storybook/web-components-vite": "^8.6.14",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
63
|
+
"@typescript-eslint/parser": "^8.32.1",
|
|
64
|
+
"eslint": "^8.57.1",
|
|
65
|
+
"eslint-config-prettier": "^9.1.0",
|
|
60
66
|
"eslint-plugin-storybook": "^0.8.0",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"vite": "^5.4
|
|
67
|
-
"vitest": "^2.1.
|
|
67
|
+
"prettier": "^3.5.3",
|
|
68
|
+
"rollup-plugin-visualizer": "^5.14.0",
|
|
69
|
+
"storybook": "^8.6.14",
|
|
70
|
+
"typescript": "^5.8.3",
|
|
71
|
+
"vite": "^5.4.19",
|
|
72
|
+
"vite-plugin-dts": "^4.5.4",
|
|
73
|
+
"vitest": "^2.1.9"
|
|
68
74
|
},
|
|
69
75
|
"customElements": "custom-elements.json",
|
|
70
|
-
"eslintConfig": {
|
|
71
|
-
"extends": [
|
|
72
|
-
"@open-wc",
|
|
73
|
-
"prettier",
|
|
74
|
-
"plugin:storybook/recommended"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
"prettier": {
|
|
78
|
-
"singleQuote": true,
|
|
79
|
-
"arrowParens": "avoid"
|
|
80
|
-
},
|
|
81
|
-
"husky": {
|
|
82
|
-
"hooks": {
|
|
83
|
-
"pre-commit": "lint-staged"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"lint-staged": {
|
|
87
|
-
"*.js": [
|
|
88
|
-
"eslint --fix",
|
|
89
|
-
"prettier --write"
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
76
|
"keywords": [
|
|
93
77
|
"pd",
|
|
94
78
|
"progressive",
|
package/dist/src/PdBoxView.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { LitElement, css, html } from "lit";
|
|
2
|
-
class PdBoxView extends LitElement {
|
|
3
|
-
static get styles() {
|
|
4
|
-
return [
|
|
5
|
-
css`
|
|
6
|
-
:host {
|
|
7
|
-
display: grid;
|
|
8
|
-
grid-template-columns: repeat(
|
|
9
|
-
var(--pd-box-columns, 4),
|
|
10
|
-
minmax(var(--pd-box-min-width, 100px), 1fr)
|
|
11
|
-
);
|
|
12
|
-
/*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?*/
|
|
13
|
-
gap: var(--pd-box-gap, 25px);
|
|
14
|
-
}
|
|
15
|
-
`
|
|
16
|
-
];
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return html` <slot></slot> `;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
PdBoxView
|
|
24
|
-
};
|
package/dist/src/PdCollapse.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { LitElement, css, html } from "lit";
|
|
2
|
-
import { ICON_TOGGLE_COLLAPSE } from "@progressive-development/pd-icon";
|
|
3
|
-
import "@progressive-development/pd-icon/pd-icon";
|
|
4
|
-
import { PDColorStyles, PDFontStyles } from "@progressive-development/pd-shared-styles";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
8
|
-
*/
|
|
9
|
-
class PdCollapse extends LitElement {
|
|
10
|
-
static get properties() {
|
|
11
|
-
return {
|
|
12
|
-
active: { type: Boolean },
|
|
13
|
-
icon: { type: String }
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.active = false;
|
|
19
|
-
}
|
|
20
|
-
static get styles() {
|
|
21
|
-
return [
|
|
22
|
-
PDColorStyles,
|
|
23
|
-
PDFontStyles,
|
|
24
|
-
css`
|
|
25
|
-
:host {
|
|
26
|
-
display: block;
|
|
27
|
-
width: 100%;
|
|
28
|
-
position: relative;
|
|
29
|
-
overflow: visible;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host .content.open {
|
|
33
|
-
border: 2px solid var(--pd-default-light-col);
|
|
34
|
-
background: var(--pd-collapse-content-bg-col, var(--pd-default-bg-col));
|
|
35
|
-
margin-bottom: 1rem;
|
|
36
|
-
position: relative;
|
|
37
|
-
overflow: visible;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
pd-icon {
|
|
41
|
-
--pd-icon-stroke-col-active: var(--pd-default-bg-col);
|
|
42
|
-
--pd-icon-col-active: var(--pd-default-dark-col);
|
|
43
|
-
--pd-icon-col-hover: var(--pd-default-dark-col);
|
|
44
|
-
--pd-icon-stroke-col-hover: var(--pd-default-hover-col);
|
|
45
|
-
--pd-icon-col-active-hover: var(--pd-default-dark-col);
|
|
46
|
-
--pd-icon-stroke-col-active-hover: var(--pd-default-hover-col);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.trigger {
|
|
50
|
-
background: var(--pd-collapse-bg-col, var(--pd-default-col));
|
|
51
|
-
font-family: var(--pd-default-font-title-family);
|
|
52
|
-
font-weight: bold;
|
|
53
|
-
color: var(--pd-collapse-font-col, var(--pd-default-bg-col));
|
|
54
|
-
transition-property: box-shadow, background;
|
|
55
|
-
transition: 0.2s ease-in;
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
font-size: var(--pd-collapse-header-font-size, 1rem);
|
|
58
|
-
padding: 0.5rem;
|
|
59
|
-
display: flex;
|
|
60
|
-
justify-content: space-between;
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
position: relative;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
::slotted(.header) {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.trigger:hover {
|
|
71
|
-
background: var(--pd-collapse-hover-col, var(--pd-default-dark-col));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.trigger.closed {
|
|
75
|
-
margin-bottom: 1rem;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.content {
|
|
79
|
-
will-change: transform;
|
|
80
|
-
height: 0;
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
transition-property: visibility, transform;
|
|
83
|
-
transition-duration: 0.2s;
|
|
84
|
-
visibility: hidden;
|
|
85
|
-
transform: translate3d(0, -100%, 0);
|
|
86
|
-
box-sizing: border-box;
|
|
87
|
-
|
|
88
|
-
padding: 0.5em;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.content.open {
|
|
92
|
-
visibility: visible;
|
|
93
|
-
height: auto;
|
|
94
|
-
transform: translate3d(0, 0, 0);
|
|
95
|
-
overflow-y: auto;
|
|
96
|
-
}
|
|
97
|
-
`
|
|
98
|
-
];
|
|
99
|
-
}
|
|
100
|
-
open() {
|
|
101
|
-
this.active = true;
|
|
102
|
-
}
|
|
103
|
-
close() {
|
|
104
|
-
this.active = false;
|
|
105
|
-
}
|
|
106
|
-
onClick() {
|
|
107
|
-
this.active = !this.active;
|
|
108
|
-
this.dispatchEvent(
|
|
109
|
-
new CustomEvent("toggle-accordion", {
|
|
110
|
-
bubbles: true,
|
|
111
|
-
composed: true,
|
|
112
|
-
detail: this.active
|
|
113
|
-
})
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
render() {
|
|
117
|
-
return html`<div
|
|
118
|
-
class="trigger ${this.active ? "open" : "closed"}"
|
|
119
|
-
@click="${this.onClick}"
|
|
120
|
-
>
|
|
121
|
-
<slot name="header"></slot>
|
|
122
|
-
<pd-icon
|
|
123
|
-
icon="${ICON_TOGGLE_COLLAPSE}"
|
|
124
|
-
?activeIcon="${this.active}"
|
|
125
|
-
class="small primary"
|
|
126
|
-
></pd-icon>
|
|
127
|
-
</div>
|
|
128
|
-
<div class="content ${this.active ? "open" : "closed"}">
|
|
129
|
-
<slot name="content"></slot>
|
|
130
|
-
</div> `;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
export {
|
|
134
|
-
PdCollapse
|
|
135
|
-
};
|