@progressive-development/pd-page 0.6.25 → 0.9.1

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.
Files changed (40) hide show
  1. package/dist/index.d.ts +3 -3
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +9 -14
  4. package/dist/locales/be.js +2 -3
  5. package/dist/locales/de.js +2 -3
  6. package/dist/locales/en.js +2 -3
  7. package/dist/pd-contact-us/PdContactUs.d.ts +19 -0
  8. package/dist/pd-contact-us/PdContactUs.d.ts.map +1 -0
  9. package/dist/pd-contact-us/PdContactUs.js +223 -0
  10. package/dist/pd-contact-us/pd-contact-us.d.ts +3 -0
  11. package/dist/pd-contact-us/pd-contact-us.d.ts.map +1 -0
  12. package/dist/{stories → pd-contact-us}/pd-contact-us.stories.d.ts +1 -1
  13. package/dist/pd-contact-us/pd-contact-us.stories.d.ts.map +1 -0
  14. package/dist/pd-contact-us.d.ts +2 -18
  15. package/dist/pd-contact-us.js +6 -224
  16. package/dist/pd-footer/PdFooter.d.ts +32 -0
  17. package/dist/pd-footer/PdFooter.d.ts.map +1 -0
  18. package/dist/pd-footer/PdFooter.js +162 -0
  19. package/dist/pd-footer/pd-footer.d.ts +3 -0
  20. package/dist/pd-footer/pd-footer.d.ts.map +1 -0
  21. package/dist/pd-footer/pd-footer.stories.d.ts.map +1 -0
  22. package/dist/pd-footer.d.ts +2 -31
  23. package/dist/pd-footer.js +6 -165
  24. package/dist/pd-menu/PdMenu.d.ts +72 -0
  25. package/dist/pd-menu/PdMenu.d.ts.map +1 -0
  26. package/dist/pd-menu/PdMenu.js +472 -0
  27. package/dist/pd-menu/pd-menu.d.ts +3 -0
  28. package/dist/pd-menu/pd-menu.d.ts.map +1 -0
  29. package/dist/{stories → pd-menu}/pd-menu.stories.d.ts +1 -1
  30. package/dist/{stories → pd-menu}/pd-menu.stories.d.ts.map +1 -1
  31. package/dist/pd-menu.d.ts +2 -71
  32. package/dist/pd-menu.js +6 -471
  33. package/dist/stories/01_index.stories.d.ts.map +1 -1
  34. package/package.json +29 -49
  35. package/dist/pd-contact-us.d.ts.map +0 -1
  36. package/dist/pd-footer.d.ts.map +0 -1
  37. package/dist/pd-menu.d.ts.map +0 -1
  38. package/dist/stories/pd-contact-us.stories.d.ts.map +0 -1
  39. package/dist/stories/pd-footer.stories.d.ts.map +0 -1
  40. /package/dist/{stories → pd-footer}/pd-footer.stories.d.ts +0 -0
@@ -0,0 +1,162 @@
1
+ import { LitElement, css, nothing, html } from 'lit';
2
+ import { property } from 'lit/decorators.js';
3
+ import { PdColorStyles, PdFontStyles } from '@progressive-development/pd-shared-styles';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = void 0 ;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = (decorator(target, key, result) ) || result;
11
+ if (result) __defProp(target, key, result);
12
+ return result;
13
+ };
14
+ class PdFooter extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.copyright = "";
18
+ this.version = "";
19
+ this.footerLinks = [];
20
+ }
21
+ static {
22
+ this.styles = [
23
+ PdColorStyles,
24
+ PdFontStyles,
25
+ css`
26
+ :host {
27
+ display: flex;
28
+ flex-flow: column;
29
+ justify-content: end;
30
+ background-color: var(--pd-footer-bg-col, var(--pd-default-col));
31
+ width: 100%;
32
+ white-space: nowrap;
33
+ }
34
+
35
+ .footer-links {
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: right;
39
+ height: 100%;
40
+ color: var(--pd-footer-font-col, var(--pd-default-bg-col));
41
+ font-family: var(
42
+ --pd-footer-font-family,
43
+ var(--pd-default-font-link-family)
44
+ );
45
+ font-size: var(--pd-footer-font-size, 1.1em);
46
+ }
47
+
48
+ .footer-links ul {
49
+ display: flex;
50
+ flex-wrap: wrap;
51
+ list-style: none;
52
+ gap: 2em;
53
+ margin: 0;
54
+ padding: 2em 2.5em;
55
+ }
56
+
57
+ .footer-links li {
58
+ cursor: pointer;
59
+ }
60
+
61
+ .footer-links li:hover {
62
+ color: var(--pd-default-hover-col);
63
+ }
64
+
65
+ .bottom-line {
66
+ background-color: var(
67
+ --pd-footer-bottom-col,
68
+ var(--pd-default-light-col)
69
+ );
70
+ font-size: var(--pd-footer-bottom-font-size, 0.9em);
71
+ color: var(--pd-footer-bottom-font-col, var(--pd-default-dark-col));
72
+ padding: 0.5em;
73
+ display: flex;
74
+ gap: 1em;
75
+ flex-wrap: wrap;
76
+ justify-content: space-between;
77
+ align-items: center;
78
+ }
79
+
80
+ .copyright {
81
+ font-weight: bold;
82
+ }
83
+
84
+ .version {
85
+ font-weight: normal;
86
+ }
87
+
88
+ .madeBy {
89
+ cursor: pointer;
90
+ font-style: italic;
91
+ }
92
+
93
+ .madeBy:hover {
94
+ color: var(--pd-default-col);
95
+ }
96
+ `
97
+ ];
98
+ }
99
+ render() {
100
+ return html`
101
+ <div class="footer-links">
102
+ <ul>
103
+ ${this.footerLinks?.map(
104
+ (link) => html`
105
+ <li>
106
+ <a @click=${this._footerLinkClicked} data-link=${link.key}
107
+ >${link.name}</a
108
+ >
109
+ </li>
110
+ `
111
+ )}
112
+ </ul>
113
+ </div>
114
+
115
+ <div class="bottom-line">
116
+ <div>
117
+ ${this.copyright ? html`<span class="copyright">© ${this.copyright}, </span>` : nothing}
118
+ ${this.version ? html`<span class="version">${this.version}</span>` : nothing}
119
+ </div>
120
+
121
+ ${this.madeBy ? html`<span class="madeBy" @click=${this._clickMadeBy}
122
+ >${this.madeBy.txt}</span
123
+ >` : nothing}
124
+ </div>
125
+ `;
126
+ }
127
+ _clickMadeBy() {
128
+ if (this.madeBy?.email) {
129
+ window.location.href = `mailto:${this.madeBy.email}`;
130
+ } else if (this.madeBy?.link) {
131
+ window.open(this.madeBy.link, "_blank");
132
+ }
133
+ }
134
+ _footerLinkClicked(e) {
135
+ const target = e.currentTarget;
136
+ const linkKey = target.dataset.link;
137
+ const linkObj = this.footerLinks?.find((fl) => fl.key === linkKey);
138
+ if (linkObj) {
139
+ this.dispatchEvent(
140
+ new CustomEvent("footer-link", {
141
+ detail: { linkObj },
142
+ bubbles: true,
143
+ composed: true
144
+ })
145
+ );
146
+ }
147
+ }
148
+ }
149
+ __decorateClass([
150
+ property({ type: String })
151
+ ], PdFooter.prototype, "copyright");
152
+ __decorateClass([
153
+ property({ type: String })
154
+ ], PdFooter.prototype, "version");
155
+ __decorateClass([
156
+ property({ type: Object })
157
+ ], PdFooter.prototype, "madeBy");
158
+ __decorateClass([
159
+ property({ type: Array })
160
+ ], PdFooter.prototype, "footerLinks");
161
+
162
+ export { PdFooter };
@@ -0,0 +1,3 @@
1
+ import { PdFooter } from './PdFooter.js';
2
+ export { PdFooter };
3
+ //# sourceMappingURL=pd-footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pd-footer.d.ts","sourceRoot":"","sources":["../../src/pd-footer/pd-footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAOzC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pd-footer.stories.d.ts","sourceRoot":"","sources":["../../src/pd-footer/pd-footer.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,gBAAgB,CAAC;wBAcnB,IAAI;AAZT,wBAYU;AAuBV,eAAO,MAAM,OAAO,EAAE,OAA2B,CAAC;AAQlD,eAAO,MAAM,oBAAoB,EAAE,OAA2B,CAAC;AAM/D,eAAO,MAAM,QAAQ,EAAE,OAA2B,CAAC;AAKnD,eAAO,MAAM,gBAAgB,EAAE,OAA2B,CAAC"}
@@ -1,31 +1,2 @@
1
- import { LitElement, CSSResultGroup } from 'lit';
2
- import { PdFooterLink, PdFooterMadeBy } from './types';
3
- /**
4
- * Footer-Komponente mit konfigurierbaren Links, Version und Copyright.
5
- *
6
- * @fires footer-link - Wird ausgelöst, wenn auf einen Footer-Link geklickt wird.
7
- * @slot - Standard-Slot nicht verwendet.
8
- */
9
- export declare class PdFooter extends LitElement {
10
- /**
11
- * Optional: Copyright-Zeile, z.B. "2024 PD Progressive Development UG".
12
- */
13
- copyright: string;
14
- /**
15
- * Optionale Versionsangabe, z.B. "v1.2.3".
16
- */
17
- version: string;
18
- /**
19
- * Optionaler Verweis auf den Entwickler oder die Agentur.
20
- */
21
- madeBy?: PdFooterMadeBy;
22
- /**
23
- * Liste von Footer-Links.
24
- */
25
- footerLinks: PdFooterLink[];
26
- static styles: CSSResultGroup;
27
- render(): import('lit-html').TemplateResult<1>;
28
- private _clickMadeBy;
29
- private _footerLinkClicked;
30
- }
31
- //# sourceMappingURL=pd-footer.d.ts.map
1
+ export * from './pd-footer/pd-footer'
2
+ export {}
package/dist/pd-footer.js CHANGED
@@ -1,167 +1,8 @@
1
- import { css, LitElement, nothing, html } from "lit";
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
- let PdFooter = class extends LitElement {
15
- constructor() {
16
- super(...arguments);
17
- this.copyright = "";
18
- this.version = "";
19
- this.footerLinks = [];
20
- }
21
- render() {
22
- var _a;
23
- return html`
24
- <div class="footer-links">
25
- <ul>
26
- ${(_a = this.footerLinks) == null ? void 0 : _a.map(
27
- (link) => html`
28
- <li>
29
- <a @click=${this._footerLinkClicked} data-link=${link.key}
30
- >${link.name}</a
31
- >
32
- </li>
33
- `
34
- )}
35
- </ul>
36
- </div>
1
+ import { PdFooter } from './pd-footer/PdFooter.js';
37
2
 
38
- <div class="bottom-line">
39
- <div>
40
- ${this.copyright ? html`<span class="copyright">© ${this.copyright}, </span>` : nothing}
41
- ${this.version ? html`<span class="version">${this.version}</span>` : nothing}
42
- </div>
3
+ const tag = "pd-footer";
4
+ if (!customElements.get(tag)) {
5
+ customElements.define(tag, PdFooter);
6
+ }
43
7
 
44
- ${this.madeBy ? html`<span class="madeBy" @click=${this._clickMadeBy}
45
- >${this.madeBy.txt}</span
46
- >` : nothing}
47
- </div>
48
- `;
49
- }
50
- _clickMadeBy() {
51
- var _a, _b;
52
- if ((_a = this.madeBy) == null ? void 0 : _a.email) {
53
- window.location.href = `mailto:${this.madeBy.email}`;
54
- } else if ((_b = this.madeBy) == null ? void 0 : _b.link) {
55
- window.open(this.madeBy.link, "_blank");
56
- }
57
- }
58
- _footerLinkClicked(e) {
59
- var _a;
60
- const target = e.currentTarget;
61
- const linkKey = target.dataset.link;
62
- const linkObj = (_a = this.footerLinks) == null ? void 0 : _a.find((fl) => fl.key === linkKey);
63
- if (linkObj) {
64
- this.dispatchEvent(
65
- new CustomEvent("footer-link", {
66
- detail: { linkObj },
67
- bubbles: true,
68
- composed: true
69
- })
70
- );
71
- }
72
- }
73
- };
74
- PdFooter.styles = [
75
- PdColorStyles,
76
- PdFontStyles,
77
- css`
78
- :host {
79
- display: flex;
80
- flex-flow: column;
81
- justify-content: end;
82
- background-color: var(--pd-footer-bg-col, var(--pd-default-col));
83
- width: 100%;
84
- white-space: nowrap;
85
- }
86
-
87
- .footer-links {
88
- display: flex;
89
- align-items: center;
90
- justify-content: right;
91
- height: 100%;
92
- color: var(--pd-footer-font-col, var(--pd-default-bg-col));
93
- font-family: var(
94
- --pd-footer-font-family,
95
- var(--pd-default-font-link-family)
96
- );
97
- font-size: var(--pd-footer-font-size, 1.1em);
98
- }
99
-
100
- .footer-links ul {
101
- display: flex;
102
- flex-wrap: wrap;
103
- list-style: none;
104
- gap: 2em;
105
- margin: 0;
106
- padding: 2em 2.5em;
107
- }
108
-
109
- .footer-links li {
110
- cursor: pointer;
111
- }
112
-
113
- .footer-links li:hover {
114
- color: var(--pd-default-hover-col);
115
- }
116
-
117
- .bottom-line {
118
- background-color: var(
119
- --pd-footer-bottom-col,
120
- var(--pd-default-light-col)
121
- );
122
- font-size: var(--pd-footer-bottom-font-size, 0.9em);
123
- color: var(--pd-footer-bottom-font-col, var(--pd-default-dark-col));
124
- padding: 0.5em;
125
- display: flex;
126
- gap: 1em;
127
- flex-wrap: wrap;
128
- justify-content: space-between;
129
- align-items: center;
130
- }
131
-
132
- .copyright {
133
- font-weight: bold;
134
- }
135
-
136
- .version {
137
- font-weight: normal;
138
- }
139
-
140
- .madeBy {
141
- cursor: pointer;
142
- font-style: italic;
143
- }
144
-
145
- .madeBy:hover {
146
- color: var(--pd-default-col);
147
- }
148
- `
149
- ];
150
- __decorateClass([
151
- property({ type: String })
152
- ], PdFooter.prototype, "copyright", 2);
153
- __decorateClass([
154
- property({ type: String })
155
- ], PdFooter.prototype, "version", 2);
156
- __decorateClass([
157
- property({ type: Object })
158
- ], PdFooter.prototype, "madeBy", 2);
159
- __decorateClass([
160
- property({ type: Array })
161
- ], PdFooter.prototype, "footerLinks", 2);
162
- PdFooter = __decorateClass([
163
- customElement("pd-footer")
164
- ], PdFooter);
165
- export {
166
- PdFooter
167
- };
8
+ export { PdFooter };
@@ -0,0 +1,72 @@
1
+ import { LitElement, CSSResultGroup } from 'lit';
2
+ import { PdMenuItem } from '../types.js';
3
+ /**
4
+ * Menü-Komponente zur Navigation in der Anwendung.
5
+ *
6
+ * @fires route-event – Wird ausgelöst, wenn ein Menüpunkt mit Route geklickt wird
7
+ * @fires locale-change – Wird ausgelöst, wenn die Sprache gewechselt wird
8
+ *
9
+ * @slot slotLogo – Slot für das App-Logo
10
+ * @tagname pd-menu
11
+ */
12
+ export declare class PdMenu extends LitElement {
13
+ /**
14
+ * Aktuelle aktive Route (zur Hervorhebung)
15
+ */
16
+ activeRoute: string;
17
+ /**
18
+ * Aktuell ausgewählte Sprache
19
+ */
20
+ selectedLocale: string;
21
+ /**
22
+ * Aktuell ausgewählte Sprache
23
+ */
24
+ logoRoute?: string;
25
+ /**
26
+ * Liste verfügbarer Sprachen
27
+ */
28
+ locales: string[];
29
+ /**
30
+ * Hauptmenüeinträge
31
+ */
32
+ menuItems: PdMenuItem[];
33
+ /**
34
+ * Zusätzliche Einträge in der oberen Menüzeile
35
+ */
36
+ topMenuItems: PdMenuItem[];
37
+ /**
38
+ * Flag, ob Burger-Menü deaktiviert ist
39
+ */
40
+ noBurgerMenu: boolean;
41
+ /**
42
+ * Größe des Headers (für Scroll-Berechnung)
43
+ */
44
+ headerSize: number;
45
+ /**
46
+ * Index des aktiven Inhaltsbereichs (bei Scroll)
47
+ */
48
+ private _activeSecIndex;
49
+ /**
50
+ * Burger-Menü aktiv?
51
+ */
52
+ private _activeBurgerMenu;
53
+ /**
54
+ * Sprachmenü aktiv?
55
+ */
56
+ private _activeLocaleMenu;
57
+ /**
58
+ * Zeige mobile Ansicht?
59
+ */
60
+ private _smallScreen;
61
+ static styles: CSSResultGroup;
62
+ protected firstUpdated(): void;
63
+ render(): import('lit').TemplateResult<1>;
64
+ private _renderItems;
65
+ private _toggleBurgerMenu;
66
+ private _toggleLocaleSelection;
67
+ private _localeClicked;
68
+ private _menuItemClicked;
69
+ private _logoClicked;
70
+ private static _scrollToTop;
71
+ }
72
+ //# sourceMappingURL=PdMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdMenu.d.ts","sourceRoot":"","sources":["../../src/pd-menu/PdMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAY5D,OAAO,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,qBAAa,MAAO,SAAQ,UAAU;IACpC;;OAEG;IAEH,WAAW,SAAM;IAEjB;;OAEG;IAEH,cAAc,SAAM;IAEpB;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAEH,OAAO,EAAE,MAAM,EAAE,CAAM;IAEvB;;OAEG;IAEH,SAAS,EAAE,UAAU,EAAE,CAAM;IAE7B;;OAEG;IAEH,YAAY,EAAE,UAAU,EAAE,CAAM;IAEhC;;OAEG;IAEH,YAAY,UAAS;IAErB;;OAEG;IAEH,UAAU,SAAK;IAEf;;OAEG;IAEH,OAAO,CAAC,eAAe,CAAK;IAE5B;;OAEG;IAEH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;OAEG;IAEH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAgB,MAAM,EAAE,cAAc,CAyOpC;IAEF,SAAS,CAAC,YAAY;IAmCtB,MAAM;IAqEN,OAAO,CAAC,YAAY;IAiCpB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,MAAM,CAAC,YAAY;CAG5B"}