@progressive-development/pd-page 0.9.1 → 1.0.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/LICENSE +21 -2
- package/README.md +34 -57
- package/dist/generated/locales/be.d.ts +19 -1
- package/dist/generated/locales/be.d.ts.map +1 -1
- package/dist/generated/locales/de.d.ts +19 -1
- package/dist/generated/locales/de.d.ts.map +1 -1
- package/dist/generated/locales/en.d.ts +19 -1
- package/dist/generated/locales/en.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/locales/be.js +19 -1
- package/dist/locales/de.js +19 -1
- package/dist/locales/en.js +19 -1
- package/dist/pd-contact-us/PdContactUs.d.ts +15 -5
- package/dist/pd-contact-us/PdContactUs.d.ts.map +1 -1
- package/dist/pd-contact-us/PdContactUs.js +94 -134
- package/dist/pd-contact-us/pd-contact-us.stories.d.ts +36 -5
- package/dist/pd-contact-us/pd-contact-us.stories.d.ts.map +1 -1
- package/dist/pd-content/dist/pd-notice-box/PdNoticeBox.js +224 -0
- package/dist/pd-content/dist/pd-notice-box/pd-notice-box.js +8 -0
- package/dist/pd-footer/PdFooter.d.ts +27 -15
- package/dist/pd-footer/PdFooter.d.ts.map +1 -1
- package/dist/pd-footer/PdFooter.js +122 -74
- package/dist/pd-footer/pd-footer.stories.d.ts +47 -7
- package/dist/pd-footer/pd-footer.stories.d.ts.map +1 -1
- package/dist/pd-login/PdLogin.d.ts +59 -0
- package/dist/pd-login/PdLogin.d.ts.map +1 -0
- package/dist/pd-login/PdLogin.js +292 -0
- package/dist/pd-login/pd-login.d.ts +3 -0
- package/dist/pd-login/pd-login.d.ts.map +1 -0
- package/dist/pd-login/pd-login.stories.d.ts +55 -0
- package/dist/pd-login/pd-login.stories.d.ts.map +1 -0
- package/dist/pd-login.d.ts +2 -0
- package/dist/pd-login.js +8 -0
- package/dist/pd-menu/PdMenu.d.ts +72 -40
- package/dist/pd-menu/PdMenu.d.ts.map +1 -1
- package/dist/pd-menu/PdMenu.js +384 -276
- package/dist/pd-menu/pd-menu.stories.d.ts +59 -17
- package/dist/pd-menu/pd-menu.stories.d.ts.map +1 -1
- package/dist/pd-socialmedia/PdSocialmedia.d.ts +56 -0
- package/dist/pd-socialmedia/PdSocialmedia.d.ts.map +1 -0
- package/dist/pd-socialmedia/PdSocialmedia.js +426 -0
- package/dist/pd-socialmedia/pd-socialmedia-model.d.ts +16 -0
- package/dist/pd-socialmedia/pd-socialmedia-model.d.ts.map +1 -0
- package/dist/pd-socialmedia/pd-socialmedia-model.js +240 -0
- package/dist/pd-socialmedia/pd-socialmedia.d.ts +3 -0
- package/dist/pd-socialmedia/pd-socialmedia.d.ts.map +1 -0
- package/dist/pd-socialmedia/pd-socialmedia.stories.d.ts +53 -0
- package/dist/pd-socialmedia/pd-socialmedia.stories.d.ts.map +1 -0
- package/dist/pd-socialmedia.d.ts +2 -0
- package/dist/pd-socialmedia.js +7 -0
- package/dist/pd-toast/PdToast.d.ts +23 -0
- package/dist/pd-toast/PdToast.d.ts.map +1 -0
- package/dist/pd-toast/PdToast.js +222 -0
- package/dist/pd-toast/pd-toast.d.ts +3 -0
- package/dist/pd-toast/pd-toast.d.ts.map +1 -0
- package/dist/pd-toast/pd-toast.stories.d.ts +47 -0
- package/dist/pd-toast/pd-toast.stories.d.ts.map +1 -0
- package/dist/pd-toast.d.ts +2 -0
- package/dist/pd-toast.js +8 -0
- package/dist/stories/01_index.stories.d.ts +36 -4
- package/dist/stories/01_index.stories.d.ts.map +1 -1
- package/dist/toast-bus/toast-bus.d.ts +61 -0
- package/dist/toast-bus/toast-bus.d.ts.map +1 -0
- package/dist/toast-bus/toast-bus.js +42 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -8
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { css, LitElement, html } from 'lit';
|
|
2
2
|
import { localized, msg } from '@lit/localize';
|
|
3
|
-
import { property } from 'lit/decorators.js';
|
|
4
|
-
import
|
|
5
|
-
import '@progressive-development/pd-forms/pd-panel-button';
|
|
3
|
+
import { property, query } from 'lit/decorators.js';
|
|
4
|
+
import '@progressive-development/pd-forms/pd-button';
|
|
6
5
|
import '@progressive-development/pd-forms/pd-form-container';
|
|
7
6
|
import '@progressive-development/pd-forms/pd-form-row';
|
|
8
7
|
import '@progressive-development/pd-forms/pd-input';
|
|
@@ -27,195 +26,156 @@ let PdContactUs = class extends LitElement {
|
|
|
27
26
|
}
|
|
28
27
|
render() {
|
|
29
28
|
return html`
|
|
30
|
-
<div class="
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<div class="left-content">
|
|
35
|
-
<pd-contact
|
|
36
|
-
class="company-contact"
|
|
37
|
-
.contact="${this.contact}"
|
|
38
|
-
addressTitle="${msg("Adresse", {
|
|
39
|
-
id: "pd.contactus.address.title"
|
|
40
|
-
})}"
|
|
41
|
-
summary
|
|
42
|
-
></pd-contact>
|
|
43
|
-
</div>
|
|
29
|
+
<div class="contact-layout">
|
|
30
|
+
<div class="contact-card">
|
|
31
|
+
<pd-contact .contact="${this.contact}" summary></pd-contact>
|
|
32
|
+
</div>
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
placeHolder="${msg("Name", {
|
|
34
|
+
<div class="contact-form">
|
|
35
|
+
<pd-form-container id="contactFormId">
|
|
36
|
+
<pd-form-row>
|
|
37
|
+
<pd-input
|
|
38
|
+
id="nameInputId"
|
|
39
|
+
minlength="3"
|
|
40
|
+
maxlength="100"
|
|
41
|
+
placeHolder="${msg("Name", {
|
|
54
42
|
id: "pd.contactus.address.name"
|
|
55
43
|
})}"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
44
|
+
valueName="name"
|
|
45
|
+
autoCompleteName="full-name"
|
|
46
|
+
required
|
|
47
|
+
></pd-input>
|
|
48
|
+
</pd-form-row>
|
|
61
49
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
placeHolder="${msg("Email", {
|
|
50
|
+
<pd-form-row>
|
|
51
|
+
<pd-input
|
|
52
|
+
id="mailInputId"
|
|
53
|
+
placeHolder="${msg("Email", {
|
|
67
54
|
id: "pd.contactus.address.email"
|
|
68
55
|
})}"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
56
|
+
valueName="email"
|
|
57
|
+
autoCompleteName="email"
|
|
58
|
+
name="email"
|
|
59
|
+
fieldType="mail"
|
|
60
|
+
required
|
|
61
|
+
></pd-input>
|
|
62
|
+
</pd-form-row>
|
|
76
63
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
placeHolder="${msg("Telefon", {
|
|
64
|
+
<pd-form-row>
|
|
65
|
+
<pd-input
|
|
66
|
+
id="phoneInputId"
|
|
67
|
+
placeHolder="${msg("Telefon", {
|
|
82
68
|
id: "pd.contactus.address.phone"
|
|
83
69
|
})}"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
70
|
+
valueName="phone"
|
|
71
|
+
fieldType="phone"
|
|
72
|
+
autoCompleteName="tel"
|
|
73
|
+
required
|
|
74
|
+
></pd-input>
|
|
75
|
+
</pd-form-row>
|
|
90
76
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
placeHolder="${msg("Nachricht", {
|
|
77
|
+
<pd-form-row>
|
|
78
|
+
<pd-input-area
|
|
79
|
+
id="msgInputId"
|
|
80
|
+
minlength="6"
|
|
81
|
+
maxlength="500"
|
|
82
|
+
placeHolder="${msg("Nachricht", {
|
|
98
83
|
id: "pd.contactus.address.message"
|
|
99
84
|
})}"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
85
|
+
rows="8"
|
|
86
|
+
required
|
|
87
|
+
valueName="msg1"
|
|
88
|
+
></pd-input-area>
|
|
89
|
+
</pd-form-row>
|
|
105
90
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
buttonText="${msg("Absenden", {
|
|
91
|
+
<pd-form-row>
|
|
92
|
+
<pd-button
|
|
93
|
+
icon="${pdIcons.ICON_MAIL}"
|
|
94
|
+
text="${msg("Absenden", {
|
|
111
95
|
id: "pd.contactus.address.send"
|
|
112
96
|
})}"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
</div>
|
|
97
|
+
@button-clicked="${this._sendMail}"
|
|
98
|
+
primary
|
|
99
|
+
></pd-button>
|
|
100
|
+
</pd-form-row>
|
|
101
|
+
</pd-form-container>
|
|
119
102
|
</div>
|
|
120
103
|
</div>
|
|
121
104
|
`;
|
|
122
105
|
}
|
|
123
106
|
clear() {
|
|
124
|
-
this.
|
|
125
|
-
this.shadowRoot?.getElementById("mailInputId")?.["clear"]?.();
|
|
126
|
-
this.shadowRoot?.getElementById("phoneInputId")?.["clear"]?.();
|
|
127
|
-
this.shadowRoot?.getElementById("msgInputId")?.["clear"]?.();
|
|
107
|
+
this._form?.clear();
|
|
128
108
|
}
|
|
129
109
|
_sendMail() {
|
|
130
|
-
|
|
131
|
-
"contactFormId"
|
|
132
|
-
);
|
|
133
|
-
form.triggerValidate().then((result) => {
|
|
110
|
+
this._form.triggerValidate().then((result) => {
|
|
134
111
|
if (result) {
|
|
135
112
|
this.dispatchEvent(
|
|
136
113
|
new CustomEvent("send-contact-request", {
|
|
137
|
-
detail: { msgObj:
|
|
114
|
+
detail: { msgObj: this._form.getValues().origin }
|
|
138
115
|
})
|
|
139
116
|
);
|
|
140
|
-
|
|
117
|
+
this._form.reset();
|
|
141
118
|
}
|
|
142
119
|
});
|
|
143
120
|
}
|
|
144
121
|
};
|
|
145
122
|
PdContactUs.styles = [
|
|
146
|
-
PdColorStyles,
|
|
147
|
-
PdFontStyles,
|
|
148
123
|
css`
|
|
149
124
|
:host {
|
|
150
|
-
display:
|
|
151
|
-
flex-flow: row;
|
|
125
|
+
display: block;
|
|
152
126
|
background-color: var(--pd-contactus-bg-col, var(--pd-default-col));
|
|
153
127
|
background-image: var(--pd-contactus-bg-image);
|
|
154
128
|
background-repeat: no-repeat;
|
|
155
|
-
min-height: 500px;
|
|
156
129
|
width: 100%;
|
|
157
130
|
}
|
|
158
131
|
|
|
159
|
-
|
|
160
|
-
font-family: var(--pd-default-font-title-family);
|
|
161
|
-
font-style: normal;
|
|
162
|
-
color: var(--pd-contactus-font-col, var(--pd-default-bg-col));
|
|
163
|
-
margin-top: 1.4em;
|
|
164
|
-
margin-bottom: 2.5rem;
|
|
165
|
-
font-size: var(--pd-contactus-font-h2-size, 2.5rem);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.content-block {
|
|
169
|
-
overflow: hidden;
|
|
170
|
-
display: flex;
|
|
171
|
-
flex-direction: column;
|
|
172
|
-
align-items: flex-start;
|
|
173
|
-
justify-content: flex-start;
|
|
174
|
-
flex-grow: 1;
|
|
175
|
-
max-width: 1170px;
|
|
176
|
-
margin: 0 auto;
|
|
177
|
-
padding-left: 30px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.contact-block {
|
|
132
|
+
.contact-layout {
|
|
181
133
|
display: flex;
|
|
182
134
|
flex-wrap: wrap;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.left-content {
|
|
187
|
-
width: 35%;
|
|
188
|
-
min-width: 230px;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.right-content {
|
|
192
|
-
width: 65%;
|
|
135
|
+
gap: 2rem;
|
|
136
|
+
align-items: flex-start;
|
|
193
137
|
}
|
|
194
138
|
|
|
195
|
-
.
|
|
196
|
-
|
|
139
|
+
.contact-card {
|
|
140
|
+
flex: 1 1 300px;
|
|
141
|
+
min-width: 280px;
|
|
142
|
+
max-width: 420px;
|
|
143
|
+
/* Forward --pd-contactus-font-col to pd-contact internals */
|
|
144
|
+
--pd-contact-address-col: var(
|
|
145
|
+
--pd-contactus-font-col,
|
|
146
|
+
var(--pd-default-bg-col)
|
|
147
|
+
);
|
|
148
|
+
--pd-contact-address-title-col: var(
|
|
149
|
+
--pd-contactus-font-col,
|
|
150
|
+
var(--pd-default-bg-col)
|
|
151
|
+
);
|
|
152
|
+
--pd-default-font-content-col: var(
|
|
153
|
+
--pd-contactus-font-col,
|
|
154
|
+
var(--pd-default-bg-col)
|
|
155
|
+
);
|
|
156
|
+
--pd-default-font-title-col: var(
|
|
197
157
|
--pd-contactus-font-col,
|
|
198
158
|
var(--pd-default-bg-col)
|
|
199
159
|
);
|
|
200
|
-
--
|
|
160
|
+
--pd-contact-icon-col: var(
|
|
201
161
|
--pd-contactus-font-col,
|
|
202
162
|
var(--pd-default-bg-col)
|
|
203
163
|
);
|
|
204
164
|
}
|
|
205
165
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
ul {
|
|
211
|
-
justify-content: flex-start;
|
|
212
|
-
}
|
|
166
|
+
.contact-form {
|
|
167
|
+
flex: 1 1 360px;
|
|
168
|
+
min-width: 300px;
|
|
169
|
+
max-width: 520px;
|
|
213
170
|
}
|
|
214
171
|
`
|
|
215
172
|
];
|
|
216
173
|
__decorateClass([
|
|
217
174
|
property({ type: Object })
|
|
218
175
|
], PdContactUs.prototype, "contact", 2);
|
|
176
|
+
__decorateClass([
|
|
177
|
+
query("#contactFormId")
|
|
178
|
+
], PdContactUs.prototype, "_form", 2);
|
|
219
179
|
PdContactUs = __decorateClass([
|
|
220
180
|
localized()
|
|
221
181
|
], PdContactUs);
|
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
import { Meta,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import { PdContactData } from '@progressive-development/pd-contact';
|
|
3
|
+
/**
|
|
4
|
+
* Story arguments interface for pd-contact-us component.
|
|
5
|
+
* Maps to the component's public API.
|
|
6
|
+
*/
|
|
7
|
+
interface PdContactUsArgs {
|
|
8
|
+
/** Contact data for address display */
|
|
9
|
+
contact: PdContactData;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ## pd-contact-us
|
|
13
|
+
*
|
|
14
|
+
* Contact section with company address card and message form.
|
|
15
|
+
*
|
|
16
|
+
* ### Features
|
|
17
|
+
* - **Address Display**: Shows company contact information via pd-contact card
|
|
18
|
+
* - **Contact Form**: Name, email, phone, and message fields with validation
|
|
19
|
+
* - **Responsive Layout**: Card and form wrap below each other on narrow screens
|
|
20
|
+
* - **Localization**: All labels localized via @lit/localize
|
|
21
|
+
* - **Email/Phone Types**: Proper input types for better mobile UX
|
|
22
|
+
*
|
|
23
|
+
* ### Accessibility
|
|
24
|
+
* - Form fields use proper input types (email, tel)
|
|
25
|
+
* - Required fields are marked for screen readers
|
|
26
|
+
* - Submit button uses native button semantics
|
|
27
|
+
*/
|
|
28
|
+
declare const meta: Meta<PdContactUsArgs>;
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<PdContactUsArgs>;
|
|
31
|
+
/** Default contact section with company info and message form. Interactive via Controls panel. */
|
|
32
|
+
export declare const Default: Story;
|
|
33
|
+
/** All contact data configurations at a glance: full, standard, and minimal. */
|
|
34
|
+
export declare const AllVariants: Story;
|
|
35
|
+
/** CSS Custom Properties — Branded and Redesigned variants. */
|
|
36
|
+
export declare const CustomStyling: Story;
|
|
6
37
|
//# sourceMappingURL=pd-contact-us.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pd-contact-us.stories.d.ts","sourceRoot":"","sources":["../../src/pd-contact-us/pd-contact-us.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pd-contact-us.stories.d.ts","sourceRoot":"","sources":["../../src/pd-contact-us/pd-contact-us.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,oBAAoB,CAAC;AAM5B;;;GAGG;AACH,UAAU,eAAe;IACvB,uCAAuC;IACvC,OAAO,EAAE,aAAa,CAAC;CACxB;AAoCD;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CA8D/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAMvC,kGAAkG;AAClG,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAMjC,gFAAgF;AAChF,eAAO,MAAM,WAAW,EAAE,KAiCzB,CAAC;AAMF,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,KA2D3B,CAAC"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { LitElement, css, nothing, html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { pdIcons } from '@progressive-development/pd-icon';
|
|
4
|
+
import '@progressive-development/pd-icon/pd-icon';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = void 0 ;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (decorator(target, key, result) ) || result;
|
|
12
|
+
if (result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
const DEFAULT_ICONS = {
|
|
16
|
+
info: pdIcons.ICON_INFO_FLD,
|
|
17
|
+
note: pdIcons.ICON_INFO_FLD,
|
|
18
|
+
success: pdIcons.ICON_CHECKBOX,
|
|
19
|
+
warning: pdIcons.ICON_WARNING_FLD,
|
|
20
|
+
error: pdIcons.ICON_ERROR_FLD
|
|
21
|
+
};
|
|
22
|
+
class PdNoticeBox extends LitElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.type = "info";
|
|
26
|
+
this.variant = "box";
|
|
27
|
+
this.title = "";
|
|
28
|
+
this.icon = "";
|
|
29
|
+
this.hideIcon = false;
|
|
30
|
+
}
|
|
31
|
+
static {
|
|
32
|
+
this.styles = [
|
|
33
|
+
css`
|
|
34
|
+
:host {
|
|
35
|
+
/* Layout */
|
|
36
|
+
--_width: var(--pd-notice-box-width, 100%);
|
|
37
|
+
--_radius: var(--pd-notice-box-border-radius, var(--pd-radius-md, 8px));
|
|
38
|
+
--_padding: var(--pd-notice-box-padding, var(--pd-spacing-sm, 12px));
|
|
39
|
+
--_gap: var(--pd-notice-box-gap, var(--pd-spacing-sm, 12px));
|
|
40
|
+
|
|
41
|
+
/* Typography */
|
|
42
|
+
--_font-size: var(
|
|
43
|
+
--pd-notice-box-font-size,
|
|
44
|
+
var(--pd-default-font-content-size, 1rem)
|
|
45
|
+
);
|
|
46
|
+
--_title-font-size: var(
|
|
47
|
+
--pd-notice-box-title-font-size,
|
|
48
|
+
var(--pd-default-font-input-size, 1.05rem)
|
|
49
|
+
);
|
|
50
|
+
--_title-font-weight: var(--pd-notice-box-title-font-weight, 600);
|
|
51
|
+
|
|
52
|
+
/* Icon */
|
|
53
|
+
--_icon-size: var(--pd-notice-box-icon-size, 24px);
|
|
54
|
+
|
|
55
|
+
/* Sidebar */
|
|
56
|
+
--_sidebar-width: var(--pd-notice-box-sidebar-width, 4px);
|
|
57
|
+
|
|
58
|
+
/* Type colors - will be overridden per type */
|
|
59
|
+
--_type-col: var(--pd-default-info-col, #6b86ff);
|
|
60
|
+
--_type-bg-col: #e8f0ff;
|
|
61
|
+
--_type-text-col: var(
|
|
62
|
+
--pd-notice-box-text-col,
|
|
63
|
+
var(--pd-default-font-content-col, #353738)
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
display: block;
|
|
67
|
+
width: var(--_width);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Type-specific color overrides */
|
|
71
|
+
:host([type="info"]) {
|
|
72
|
+
--_type-col: var(
|
|
73
|
+
--pd-notice-box-info-col,
|
|
74
|
+
var(--pd-default-info-col, #6b86ff)
|
|
75
|
+
);
|
|
76
|
+
--_type-bg-col: var(--pd-notice-box-info-bg-col, #e8f0ff);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([type="note"]) {
|
|
80
|
+
--_type-col: var(
|
|
81
|
+
--pd-notice-box-note-col,
|
|
82
|
+
var(--pd-default-col, #067394)
|
|
83
|
+
);
|
|
84
|
+
--_type-bg-col: var(
|
|
85
|
+
--pd-notice-box-note-bg-col,
|
|
86
|
+
var(--pd-default-lightest-col, #cde2eb)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([type="success"]) {
|
|
91
|
+
--_type-col: var(
|
|
92
|
+
--pd-notice-box-success-col,
|
|
93
|
+
var(--pd-default-success-col, #348b11)
|
|
94
|
+
);
|
|
95
|
+
--_type-bg-col: var(
|
|
96
|
+
--pd-notice-box-success-bg-col,
|
|
97
|
+
var(--pd-default-success-light-col, #f5ffe8)
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([type="warning"]) {
|
|
102
|
+
--_type-col: var(
|
|
103
|
+
--pd-notice-box-warning-col,
|
|
104
|
+
var(--pd-default-warning-col, #ffbf00)
|
|
105
|
+
);
|
|
106
|
+
--_type-bg-col: var(--pd-notice-box-warning-bg-col, #fff8e0);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host([type="error"]) {
|
|
110
|
+
--_type-col: var(
|
|
111
|
+
--pd-notice-box-error-col,
|
|
112
|
+
var(--pd-default-error-col, #a1141b)
|
|
113
|
+
);
|
|
114
|
+
--_type-bg-col: var(
|
|
115
|
+
--pd-notice-box-error-bg-col,
|
|
116
|
+
var(--pd-default-error-light-col, #ffe8e8)
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Box variant */
|
|
121
|
+
.notice-box {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: flex-start;
|
|
124
|
+
gap: var(--_gap);
|
|
125
|
+
padding: var(--_padding);
|
|
126
|
+
border-radius: var(--_radius);
|
|
127
|
+
background-color: var(--_type-bg-col);
|
|
128
|
+
border: 1px solid var(--_type-col);
|
|
129
|
+
font-size: var(--_font-size);
|
|
130
|
+
color: var(--_type-text-col);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Sidebar variant */
|
|
134
|
+
:host([variant="sidebar"]) .notice-box {
|
|
135
|
+
background-color: transparent;
|
|
136
|
+
border: none;
|
|
137
|
+
border-left: var(--_sidebar-width) solid var(--_type-col);
|
|
138
|
+
border-radius: 0;
|
|
139
|
+
padding-left: var(--_padding);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Icon wrapper */
|
|
143
|
+
.icon-wrapper {
|
|
144
|
+
flex-shrink: 0;
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
width: var(--_icon-size);
|
|
149
|
+
height: var(--_icon-size);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.icon-wrapper pd-icon {
|
|
153
|
+
--pd-icon-primary-col: var(--_type-col);
|
|
154
|
+
--pd-icon-col-primary-active: var(--_type-col);
|
|
155
|
+
width: var(--_icon-size);
|
|
156
|
+
height: var(--_icon-size);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Content area */
|
|
160
|
+
.content {
|
|
161
|
+
flex: 1;
|
|
162
|
+
min-width: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.title {
|
|
166
|
+
margin: 0 0 0.25em 0;
|
|
167
|
+
font-size: var(--_title-font-size);
|
|
168
|
+
font-weight: var(--_title-font-weight);
|
|
169
|
+
font-family: var(--pd-default-font-title-family, inherit);
|
|
170
|
+
color: var(--_type-col);
|
|
171
|
+
line-height: 1.3;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.body {
|
|
175
|
+
line-height: 1.5;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.body ::slotted(*) {
|
|
179
|
+
margin: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.body ::slotted(*:not(:last-child)) {
|
|
183
|
+
margin-bottom: 0.5em;
|
|
184
|
+
}
|
|
185
|
+
`
|
|
186
|
+
];
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
const showIcon = this.variant === "box" && !this.hideIcon;
|
|
190
|
+
const iconName = this.icon || DEFAULT_ICONS[this.type];
|
|
191
|
+
return html`
|
|
192
|
+
<div class="notice-box" role="note" aria-label="${this.type} notice">
|
|
193
|
+
${showIcon ? html`
|
|
194
|
+
<div class="icon-wrapper" aria-hidden="true">
|
|
195
|
+
<pd-icon icon="${iconName}" class="primary"></pd-icon>
|
|
196
|
+
</div>
|
|
197
|
+
` : nothing}
|
|
198
|
+
<div class="content">
|
|
199
|
+
${this.title ? html`<h4 class="title">${this.title}</h4>` : nothing}
|
|
200
|
+
<div class="body">
|
|
201
|
+
<slot></slot>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
__decorateClass([
|
|
209
|
+
property({ type: String, reflect: true })
|
|
210
|
+
], PdNoticeBox.prototype, "type");
|
|
211
|
+
__decorateClass([
|
|
212
|
+
property({ type: String, reflect: true })
|
|
213
|
+
], PdNoticeBox.prototype, "variant");
|
|
214
|
+
__decorateClass([
|
|
215
|
+
property({ type: String })
|
|
216
|
+
], PdNoticeBox.prototype, "title");
|
|
217
|
+
__decorateClass([
|
|
218
|
+
property({ type: String })
|
|
219
|
+
], PdNoticeBox.prototype, "icon");
|
|
220
|
+
__decorateClass([
|
|
221
|
+
property({ type: Boolean })
|
|
222
|
+
], PdNoticeBox.prototype, "hideIcon");
|
|
223
|
+
|
|
224
|
+
export { PdNoticeBox };
|
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
import { LitElement, CSSResultGroup } from 'lit';
|
|
2
2
|
import { PdFooterLink, PdFooterMadeBy } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Application footer with links, version, and copyright.
|
|
5
|
+
*
|
|
6
|
+
* @summary Footer with navigation links, copyright, version, and developer reference.
|
|
5
7
|
*
|
|
6
|
-
* @fires footer-link - Wird ausgelöst, wenn auf einen Footer-Link geklickt wird.
|
|
7
|
-
* @slot - Standard-Slot nicht verwendet.
|
|
8
8
|
* @tagname pd-footer
|
|
9
|
+
*
|
|
10
|
+
* @event footer-link - Fired when a footer link is clicked.
|
|
11
|
+
*
|
|
12
|
+
* @cssprop --pd-footer-bg-col - Footer background. Default: `var(--pd-default-col)`.
|
|
13
|
+
* @cssprop --pd-footer-font-col - Footer text color. Default: `var(--pd-on-primary-col)`.
|
|
14
|
+
* @cssprop --pd-footer-font-family - Footer font family. Default: `var(--pd-default-font-link-family)`.
|
|
15
|
+
* @cssprop --pd-footer-font-size - Footer font size. Default: `1.1em`.
|
|
16
|
+
* @cssprop --pd-footer-bottom-col - Bottom line background. Default: `var(--pd-default-light-col)`.
|
|
17
|
+
* @cssprop --pd-footer-bottom-font-size - Bottom line font size. Default: `0.9em`.
|
|
18
|
+
* @cssprop --pd-footer-bottom-font-col - Bottom line text color. Default: `var(--pd-default-dark-col)`.
|
|
9
19
|
*/
|
|
10
20
|
export declare class PdFooter extends LitElement {
|
|
11
|
-
/**
|
|
12
|
-
* Optional: Copyright-Zeile, z.B. "2024 PD Progressive Development UG".
|
|
13
|
-
*/
|
|
21
|
+
/** Copyright text, e.g. "2024 PD Progressive Development UG". */
|
|
14
22
|
copyright: string;
|
|
15
|
-
/**
|
|
16
|
-
* Optionale Versionsangabe, z.B. "v1.2.3".
|
|
17
|
-
*/
|
|
23
|
+
/** Version string, e.g. "v1.2.3". */
|
|
18
24
|
version: string;
|
|
19
|
-
/**
|
|
20
|
-
* Optionaler Verweis auf den Entwickler oder die Agentur.
|
|
21
|
-
*/
|
|
25
|
+
/** Developer or agency reference with text and email/link. */
|
|
22
26
|
madeBy?: PdFooterMadeBy;
|
|
23
|
-
/**
|
|
24
|
-
* Liste von Footer-Links.
|
|
25
|
-
*/
|
|
27
|
+
/** Footer navigation links. */
|
|
26
28
|
footerLinks: PdFooterLink[];
|
|
27
29
|
static styles: CSSResultGroup;
|
|
28
30
|
render(): import('lit').TemplateResult<1>;
|
|
31
|
+
/**
|
|
32
|
+
* Handles keyboard events on footer links.
|
|
33
|
+
* Activates on Enter or Space key.
|
|
34
|
+
*/
|
|
35
|
+
private _handleLinkKeydown;
|
|
36
|
+
/**
|
|
37
|
+
* Handles keyboard events on madeBy element.
|
|
38
|
+
* Activates on Enter or Space key.
|
|
39
|
+
*/
|
|
40
|
+
private _handleMadeByKeydown;
|
|
29
41
|
private _clickMadeBy;
|
|
30
42
|
private _footerLinkClicked;
|
|
31
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdFooter.d.ts","sourceRoot":"","sources":["../../src/pd-footer/PdFooter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"PdFooter.d.ts","sourceRoot":"","sources":["../../src/pd-footer/PdFooter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,cAAc,EAAE,MAAM,KAAK,CAAC;AAIrE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,iEAAiE;IAEjE,SAAS,SAAM;IAEf,qCAAqC;IAErC,OAAO,SAAM;IAEb,8DAA8D;IAE9D,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,+BAA+B;IAE/B,WAAW,EAAE,YAAY,EAAE,CAAM;IAEjC,OAAgB,MAAM,EAAE,cAAc,CAsFpC;IAEO,MAAM;IA+Cf;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,kBAAkB;CAe3B"}
|