@progressive-development/pd-contact 0.5.0 → 0.5.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/locales/be.js +5 -1
- package/dist/locales/de.js +5 -1
- package/dist/locales/en.js +5 -1
- package/dist/pd-contact.js +3 -1
- package/dist/src/PdContact.js +134 -86
- package/package.json +16 -13
- package/dist/node_modules/@progressive-development/pd-forms/pd-checkbox.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-form-container.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-form-row.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-hover-box.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-input.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-radio-group.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseInputElement.js +0 -86
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUi.js +0 -33
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUiInput.js +0 -229
- package/dist/node_modules/@progressive-development/pd-forms/src/PdCheckbox.js +0 -230
- package/dist/node_modules/@progressive-development/pd-forms/src/PdFormContainer.js +0 -167
- package/dist/node_modules/@progressive-development/pd-forms/src/PdFormRow.js +0 -92
- package/dist/node_modules/@progressive-development/pd-forms/src/PdHoverBox.js +0 -108
- package/dist/node_modules/@progressive-development/pd-forms/src/PdInput.js +0 -79
- package/dist/node_modules/@progressive-development/pd-forms/src/PdRadioGroup.js +0 -72
- package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js +0 -152
- package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-styles.js +0 -64
- package/dist/node_modules/@progressive-development/pd-icon/pd-icon.js +0 -4
- package/dist/node_modules/@progressive-development/pd-icon/src/PdIcon.js +0 -595
- package/dist/node_modules/lit-html/directive.js +0 -27
- package/dist/node_modules/lit-html/directives/class-map.js +0 -36
- package/dist/node_modules/lit-html/lit-html.js +0 -242
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { css, html } from "lit";
|
|
2
|
-
import { PdBaseUI } from "./PdBaseUi.js";
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
6
|
-
*/
|
|
7
|
-
class PdFormRow extends PdBaseUI {
|
|
8
|
-
static get styles() {
|
|
9
|
-
return css`
|
|
10
|
-
:host {
|
|
11
|
-
|
|
12
|
-
/* Define size for row, depends on media queries */
|
|
13
|
-
--my-row-width: 800px;
|
|
14
|
-
--my-gap: var(--pd-form-row-gap, 20px);
|
|
15
|
-
display: flex;
|
|
16
|
-
flex: 1 1 100%;
|
|
17
|
-
/*margin: 0 0 .5rem 0;*/
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
width: 100%;
|
|
20
|
-
gap: var(--my-gap);
|
|
21
|
-
align-items: var(--pd-form-row-align-item, flex-start);
|
|
22
|
-
padding-top: var(--pd-form-row-padding-top, 10px);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
::slotted(.full-size) {
|
|
26
|
-
--pd-input-field-width: 100%;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
::slotted(.quarter1) {
|
|
30
|
-
--pd-input-field-width: calc(var(--my-row-width) * 0.25 - (var(--my-gap) * 0.75));
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
::slotted(.quarter1-area) {
|
|
35
|
-
--pd-input-field-width: calc((var(--my-row-width) - 5px) * 0.25 - (var(--my-gap) * 0.75));
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
::slotted(.quarter2) {
|
|
40
|
-
--pd-input-field-width: calc((var(--my-row-width) * 0.5) - (var(--my-gap) / 2));
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
::slotted(.quarter2-area) {
|
|
45
|
-
--pd-input-field-width: calc(((var(--my-row-width) - 8px) * 0.5) - (var(--my-gap) / 2));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
::slotted(.quarter3) {
|
|
49
|
-
--pd-input-field-width: calc(var(--my-row-width) * 0.75 - (var(--my-gap) * 0.25));
|
|
50
|
-
}
|
|
51
|
-
/* Area is longer? Scrollbar? */
|
|
52
|
-
::slotted(.quarter3-area) {
|
|
53
|
-
--pd-input-field-width: calc((var(--my-row-width) - 10px) * 0.75 - (var(--my-gap) * 0.25));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
::slotted(.quarter4) {
|
|
57
|
-
--pd-input-field-width: var(--my-row-width);
|
|
58
|
-
}
|
|
59
|
-
/* Area is longer? Scrollbar? */
|
|
60
|
-
::slotted(.quarter4-area) {
|
|
61
|
-
--pd-input-field-width: calc(var(--my-row-width) - 15px);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@media (max-width: 930px) {
|
|
65
|
-
:host {
|
|
66
|
-
--my-row-width: 600px;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
@media (max-width: 650px) {
|
|
70
|
-
:host {
|
|
71
|
-
--my-row-width: 400px;
|
|
72
|
-
--my-gap: 10px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
@media (max-width: 450px) {
|
|
76
|
-
:host {
|
|
77
|
-
--my-row-width: 300px;
|
|
78
|
-
--my-gap: 8px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
`;
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
return html`
|
|
86
|
-
<slot></slot>
|
|
87
|
-
`;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
export {
|
|
91
|
-
PdFormRow
|
|
92
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { css, html } from "lit";
|
|
2
|
-
import { PdBaseUI } from "./PdBaseUi.js";
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
6
|
-
*
|
|
7
|
-
* Lit element container for pd input elements.
|
|
8
|
-
*
|
|
9
|
-
* Used to:
|
|
10
|
-
* - Automatically validation of form content
|
|
11
|
-
* - Success/NotReady information for form-container
|
|
12
|
-
*/
|
|
13
|
-
class PdHoverBox extends PdBaseUI {
|
|
14
|
-
static get properties() {
|
|
15
|
-
return {
|
|
16
|
-
_visible: { type: Boolean, state: true },
|
|
17
|
-
_toBottom: { type: Boolean }
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
static get styles() {
|
|
21
|
-
return [
|
|
22
|
-
PdBaseUI.styles,
|
|
23
|
-
css`
|
|
24
|
-
|
|
25
|
-
:host {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.hover-box {
|
|
30
|
-
position: relative;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.info-view {
|
|
34
|
-
position: absolute;
|
|
35
|
-
z-index: 100;
|
|
36
|
-
background-color: var(--pd-hover-box-bg-col, var(--pd-default-dark-col));
|
|
37
|
-
|
|
38
|
-
border: 1px solid var(--pd-hover-box-border-col, var(--pd-default-col));
|
|
39
|
-
|
|
40
|
-
text-align: center;
|
|
41
|
-
padding: 10px;
|
|
42
|
-
width: 240px;
|
|
43
|
-
|
|
44
|
-
color: var(--pd-hover-box-font-col, white);
|
|
45
|
-
font-size: var(--pd-hover-box-font-size, 0.8em);
|
|
46
|
-
|
|
47
|
-
transition: opacity 0.2s ease-in;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.visible {
|
|
51
|
-
visibility: visible;
|
|
52
|
-
opacity: 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.hidden {
|
|
56
|
-
visibility: hidden;
|
|
57
|
-
opacity: 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.to-bottom {
|
|
61
|
-
right: -3px;
|
|
62
|
-
top: -3px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.to-top {
|
|
66
|
-
right: -3px;
|
|
67
|
-
bottom: -3px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@media (max-width: 640px) {
|
|
71
|
-
.info-view-visible {
|
|
72
|
-
width: 190px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
`
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
render() {
|
|
80
|
-
return html`
|
|
81
|
-
<div class="hover-box">
|
|
82
|
-
|
|
83
|
-
<div @click="${this._activateInfo}">
|
|
84
|
-
<slot name="normal-view"></slot>
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<div id="infoViewId" @click="${this._closeInfo}" class="info-view ${this._visible ? "visible" : "hidden"} ${this._toBottom ? "to-bottom" : "to-top"}">
|
|
88
|
-
<slot name="info-view"></slot>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
`;
|
|
93
|
-
}
|
|
94
|
-
// eslint-disable-next-line class-methods-use-this
|
|
95
|
-
_activateInfo(e) {
|
|
96
|
-
const modal = this.shadowRoot.getElementById("infoViewId");
|
|
97
|
-
const rect = modal.getBoundingClientRect();
|
|
98
|
-
this._toBottom = !(modal.offsetHeight + rect.top + rect.height > window.innerHeight);
|
|
99
|
-
this._visible = true;
|
|
100
|
-
e.stopPropagation();
|
|
101
|
-
}
|
|
102
|
-
_closeInfo() {
|
|
103
|
-
this._visible = false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export {
|
|
107
|
-
PdHoverBox
|
|
108
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { css, html } from "lit";
|
|
2
|
-
import "../../pd-icon/pd-icon.js";
|
|
3
|
-
import { INPUT_TYPE_TEXT } from "./PdBaseUiInput.js";
|
|
4
|
-
import { PdBaseInputElement } from "./PdBaseInputElement.js";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
8
|
-
*/
|
|
9
|
-
const onlyContainsNumbers = (str) => /^\d+$/.test(str);
|
|
10
|
-
class PdInput extends PdBaseInputElement {
|
|
11
|
-
static get styles() {
|
|
12
|
-
return [
|
|
13
|
-
PdBaseInputElement.styles,
|
|
14
|
-
css`
|
|
15
|
-
* {
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
}
|
|
18
|
-
`
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
static get properties() {
|
|
22
|
-
return {
|
|
23
|
-
/**
|
|
24
|
-
* Icon to be shown inside `pd-input`.
|
|
25
|
-
*/
|
|
26
|
-
icon: { type: String },
|
|
27
|
-
secret: { type: Boolean },
|
|
28
|
-
// True for type password
|
|
29
|
-
minlength: { type: String },
|
|
30
|
-
maxlength: { type: String },
|
|
31
|
-
// max length for field,
|
|
32
|
-
onlyNumbers: { type: Boolean }
|
|
33
|
-
// if only numbers allowed => Refactor => dafür war type number vorgesehen, dieses attribut wird entfernt und auf type=number umgestellt
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
constructor() {
|
|
37
|
-
super();
|
|
38
|
-
this._inputType = INPUT_TYPE_TEXT;
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
const inputId = `${this.id}Input`;
|
|
42
|
-
return html`
|
|
43
|
-
${this._renderLabel(inputId)}
|
|
44
|
-
<div class="input ${this.errorMsg.length > 0 ? "error" : ""}">
|
|
45
|
-
${this.icon ? html`<pd-icon icon="${this.icon}" activeIcon @click="${this._iconClicked}"></pd-icon>` : ""}
|
|
46
|
-
<input
|
|
47
|
-
id="${inputId}"
|
|
48
|
-
name="${this.name || this.valueName || this.autoCompleteName}"
|
|
49
|
-
autocomplete=${this.autoCompleteName}
|
|
50
|
-
class="input-style ${this.gradient ? "gradient" : ""}"
|
|
51
|
-
type="${this.secret ? "password" : "text"}"
|
|
52
|
-
placeholder="${this.placeHolder}"
|
|
53
|
-
.value="${this.value}"
|
|
54
|
-
minlength="${this.minlength}"
|
|
55
|
-
maxlength="${this.maxlength}"
|
|
56
|
-
?readonly="${this.readonly}"
|
|
57
|
-
?disabled="${this.disabled}"
|
|
58
|
-
@keyup="${this._onKeyUp}"
|
|
59
|
-
@blur="${this._onBlur}"
|
|
60
|
-
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
${this._renderErrorMsg()}
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
_onKeyUp(e) {
|
|
67
|
-
if (this.onlyNumbers && !onlyContainsNumbers(this._input.value)) {
|
|
68
|
-
this._input.value = this._input.value.replace(/\D/g, "");
|
|
69
|
-
} else {
|
|
70
|
-
super._onKeyUp(e);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
_iconClicked() {
|
|
74
|
-
this.dispatchEvent(new CustomEvent("input-icon-click"));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
PdInput
|
|
79
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { css, html } from "lit";
|
|
2
|
-
import { classMap as o } from "../../../lit-html/directives/class-map.js";
|
|
3
|
-
import { PdBaseUIInput } from "./PdBaseUiInput.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license
|
|
6
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
class PdRadioGroup extends PdBaseUIInput {
|
|
9
|
-
static get styles() {
|
|
10
|
-
return [
|
|
11
|
-
PdBaseUIInput.styles,
|
|
12
|
-
css`
|
|
13
|
-
|
|
14
|
-
.group-style {
|
|
15
|
-
display: flex;
|
|
16
|
-
gap: var(--pd-cb-group-gap, 20px);
|
|
17
|
-
flex-direction: var(--pd-cb-group-direction, row);
|
|
18
|
-
flex-wrap: wrap;
|
|
19
|
-
padding: var(--pd-input-label-padding, 0);
|
|
20
|
-
padding-top: 5px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
::slotted(pd-checkbox) {
|
|
24
|
-
--pd-cb-border-col-readonly: var(--pd-cb-border-col, var(--pd-default-col));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
`
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
firstUpdated() {
|
|
31
|
-
this.addEventListener("field-change", (e) => {
|
|
32
|
-
const elCollection = this.getElementsByTagName("pd-checkbox");
|
|
33
|
-
Object.keys(elCollection).forEach((keyValue) => {
|
|
34
|
-
if (elCollection[keyValue] !== e.target) {
|
|
35
|
-
elCollection[keyValue].value = "false";
|
|
36
|
-
} else {
|
|
37
|
-
this.value = elCollection[keyValue].valueName;
|
|
38
|
-
}
|
|
39
|
-
elCollection[keyValue].readonly = elCollection[keyValue].value === "true";
|
|
40
|
-
});
|
|
41
|
-
this.dispatchEvent(
|
|
42
|
-
new CustomEvent("validate-form", {
|
|
43
|
-
detail: {
|
|
44
|
-
singleElement: this,
|
|
45
|
-
errorMap: /* @__PURE__ */ new Map()
|
|
46
|
-
},
|
|
47
|
-
composed: true,
|
|
48
|
-
bubbles: true
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
});
|
|
52
|
-
const elColl = this.getElementsByTagName("pd-checkbox");
|
|
53
|
-
Object.keys(elColl).forEach((keyValue) => {
|
|
54
|
-
if (elColl[keyValue].value === "true") {
|
|
55
|
-
elColl[keyValue].readonly = true;
|
|
56
|
-
this.value = elColl[keyValue].valueName;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
return html`
|
|
62
|
-
${this._renderLabel()}
|
|
63
|
-
<div class="group-style input ${o({ "error": this.errorMsg.length > 0 })}">
|
|
64
|
-
<slot></slot>
|
|
65
|
-
</div>
|
|
66
|
-
${this._renderErrorMsg()}
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
PdRadioGroup
|
|
72
|
-
};
|
package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
5
|
-
*/
|
|
6
|
-
const SharedInputFieldStyles = css`
|
|
7
|
-
|
|
8
|
-
/* Describe input div (with icon) around input/select/area element */
|
|
9
|
-
.input {
|
|
10
|
-
display: inline-block;
|
|
11
|
-
/*position: relative; Prüfen: Wenn das an ist, felder über scroll-menu?
|
|
12
|
-
position: relative;
|
|
13
|
-
*/
|
|
14
|
-
/* pd-icon smaller than input
|
|
15
|
-
--pd-icon-computed-size: calc(var(--my-input-height) * 0.75); /* calc */
|
|
16
|
-
|
|
17
|
-
/* Hack um eine Form Row (input mit Button => Booking) zu bekommen*/
|
|
18
|
-
/*padding-top: var(--squi-input-padding, 0.5rem); */
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
:host([text-right]) .input > input {
|
|
23
|
-
text-align: right;
|
|
24
|
-
}
|
|
25
|
-
:host([text-left]) .input > input {
|
|
26
|
-
text-align: left;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:host([icon-left]) .input pd-icon {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
left: 5px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([icon-left]) .input > input {
|
|
35
|
-
padding-left: calc(var(--pd-input-field-height, 2rem) + 5px);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host([icon-right]) .input pd-icon {
|
|
39
|
-
display: inline-block;
|
|
40
|
-
right: 5px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:host([icon-right]) .input > input {
|
|
44
|
-
padding-right: calc(var(--pd-input-field-height, 2rem) + 5px);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* relative hack => see comment above in .input class, do it only for icon fiels relative for the moment*/
|
|
48
|
-
:host([icon-right]) .input {
|
|
49
|
-
position: relative;
|
|
50
|
-
}
|
|
51
|
-
:host([icon-left]) .input {
|
|
52
|
-
position: relative;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
pd-icon {
|
|
56
|
-
display: none;
|
|
57
|
-
position: absolute;
|
|
58
|
-
--pd-icon-size: var(--pd-input-icon-size, calc(var(--pd-input-field-height, 2rem) * 0.9));
|
|
59
|
-
--pd-icon-col-active: var(--pd-input-icon-color, #edf7fd);
|
|
60
|
-
--pd-icon-stroke-col-active: var(--pd-input-icon-stroke-color, var(--pd-default-color));
|
|
61
|
-
top: 2px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
pd-icon:hover {
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/*
|
|
69
|
-
* Class input style used for input, select and text-area element.
|
|
70
|
-
* Not use iput here => because of own select css... => Nachtrag: Aber ein paar allgemeine Angaben rausziehen
|
|
71
|
-
*/
|
|
72
|
-
.input-style {
|
|
73
|
-
width: var(--pd-input-field-width, 250px);
|
|
74
|
-
padding: var(--pd-input-field-padding, 0.25rem);
|
|
75
|
-
background-color: var(--pd-input-field-bg-col, var(--pd-default-bg-col));
|
|
76
|
-
/*opacity: 80%;*/
|
|
77
|
-
color: var(--pd-default-font-input-col);
|
|
78
|
-
/*font-size: var(--squi-input-font-size, calc(var(--squi-input-height) / 1.8));*/
|
|
79
|
-
font-size: var(--pd-default-font-input-size);
|
|
80
|
-
font-family: var(--pd-default-font-input-family);
|
|
81
|
-
|
|
82
|
-
border: var(--pd-input-field-border, 1px solid var(--pd-default-light-col));
|
|
83
|
-
box-shadow: inset 0 1px 2px rgba(50, 48, 49, 0.1);
|
|
84
|
-
border-bottom: var(--pd-input-field-border-bottom,
|
|
85
|
-
2px solid var(--pd-default-col));
|
|
86
|
-
border-radius: var(--pd-border-radius, 0);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Hover for input, area, select */
|
|
90
|
-
.input-style:hover {
|
|
91
|
-
border-color: var(--pd-input-field-border-col-hover, var(--pd-default-hover-col));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Fokus for input, area => select with own css.? */
|
|
95
|
-
.input-style:focus {
|
|
96
|
-
border: var(--pd-input-field-border-focus, 2px solid var(--pd-default-col));
|
|
97
|
-
outline: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* Höhe soll nicht für Text Area gelten, daher ausgelagert (überschreibt sonst rows) */
|
|
101
|
-
input.input-style,
|
|
102
|
-
select.input-style {
|
|
103
|
-
height: var(--pd-input-field-height, 2.2rem);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* Disabled for input, area => select with own css.? */
|
|
107
|
-
.input-style[disabled] {
|
|
108
|
-
opacity: 0.5;
|
|
109
|
-
cursor: auto;
|
|
110
|
-
background-color: var(--pd-input-field-bg-col-disabled, #e9e9e9);
|
|
111
|
-
border-bottom: var(--pd-input-field-border-bottom-disabled,
|
|
112
|
-
2px solid var(--pd-default-disabled-col));
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.input-style[readonly]:hover,
|
|
116
|
-
.input-style[disabled]:hover {
|
|
117
|
-
border-color: var(--pd-default-disabled-col);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Disabled for input, area => select with own css.? */
|
|
121
|
-
.input-style[readonly] {
|
|
122
|
-
border-bottom: var(--pd-input-field-border-bottom-disabled,
|
|
123
|
-
2px solid var(--pd-default-disabled-col));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* error element style for input, area => select has own css.? */
|
|
127
|
-
.error .input-style {
|
|
128
|
-
border: 1px solid var(--pd-default-error-col);
|
|
129
|
-
color: var(--pd-default-error-col);
|
|
130
|
-
background-color: var(--pd-default-error-light-col);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/* Error Focus for input, area, select */
|
|
134
|
-
.error .input-style:focus {
|
|
135
|
-
border: 2px solid var(--pd-default-error-col);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* Placeholder color for input and input-area */
|
|
139
|
-
::placeholder {
|
|
140
|
-
color: var(--pd-input-placeholder-color, #474747e4);
|
|
141
|
-
}
|
|
142
|
-
:-ms-input-placeholder {
|
|
143
|
-
color: var(--pd-input-placeholder-color, #474747e4);
|
|
144
|
-
}
|
|
145
|
-
::-ms-input-placeholder {
|
|
146
|
-
color: var(--pd-input-placeholder-color, #474747e4);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
`;
|
|
150
|
-
export {
|
|
151
|
-
SharedInputFieldStyles
|
|
152
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
5
|
-
*/
|
|
6
|
-
const SharedInputStyles = css`
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Label used for input, select, input-area, range and radio-group.
|
|
10
|
-
* Not used in button, button-group, checkbox (may have a label...?), form-row, form-container
|
|
11
|
-
*/
|
|
12
|
-
label {
|
|
13
|
-
display: block;
|
|
14
|
-
padding: var(--pd-input-label-padding, 0);
|
|
15
|
-
color: var(--pd-input-lable-col, var(--pd-default-dark-col));
|
|
16
|
-
text-align: var(--pd-input-label-align, left);
|
|
17
|
-
font-size: var(--pd-input-lable-font-size, 0.9em);
|
|
18
|
-
font-family: var(--pd-input-lable-font-family, var(--pd-default-font-title-family));
|
|
19
|
-
max-width: var(--pd-input-field-width, 250px);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Error box for input elements. Used for checkbox, radio-group, input, input-area, select, range
|
|
24
|
-
*/
|
|
25
|
-
.error-box {
|
|
26
|
-
display: block;
|
|
27
|
-
color: var(--pd-default-error-col);
|
|
28
|
-
background: var(--pd-default-error-light-col);
|
|
29
|
-
border: 1px solid var(--pd-default-error-col);
|
|
30
|
-
border-radius: var(--pd-border-radius, 0);
|
|
31
|
-
max-width: var(--pd-input-field-width, 350px);
|
|
32
|
-
}
|
|
33
|
-
.error-box p {
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0.25rem 0.25rem 0.25rem 0.5rem;
|
|
36
|
-
font-size: .8rem;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* gradient noch aufräumen */
|
|
40
|
-
|
|
41
|
-
.gradient {
|
|
42
|
-
background: linear-gradient(
|
|
43
|
-
to bottom,
|
|
44
|
-
var(--my-background-gradient-color) 0%,
|
|
45
|
-
var(--my-background-color) 100%
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.error .gradient {
|
|
50
|
-
background: linear-gradient(
|
|
51
|
-
to bottom,
|
|
52
|
-
var(--my-background-gradient-color) 10%,
|
|
53
|
-
#f5979b 100%
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.gradient[disabled] {
|
|
58
|
-
background: linear-gradient(to bottom, #ebebeb 0%, #999 100%);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
`;
|
|
62
|
-
export {
|
|
63
|
-
SharedInputStyles
|
|
64
|
-
};
|