@progressive-development/pd-forms 0.0.61 → 0.1.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.
- package/.storybook/preview-head.html +4 -0
- package/package.json +2 -2
- package/src/PdBaseInputElement.js +0 -1
- package/src/PdBaseUiInput.js +2 -4
- package/src/PdButton.js +11 -22
- package/src/PdCheckbox.js +28 -13
- package/src/PdFormContainer.js +11 -11
- package/src/PdInputArea.js +2 -1
- package/src/PdRadioGroup.js +0 -5
- package/src/shared-global-styles.js +24 -20
- package/src/shared-input-field-styles.js +12 -12
- package/src/shared-input-styles.js +6 -6
- package/stories/checkbox.stories.js +20 -2
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent pd-forms following open-wc recommendations",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.1.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@lit-labs/motion": "^1.0.2",
|
|
23
23
|
"@lit/localize": "^0.11.2",
|
|
24
|
-
"@progressive-development/pd-icon": "^0.1.
|
|
24
|
+
"@progressive-development/pd-icon": "^0.1.6",
|
|
25
25
|
"lit": "^2.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
package/src/PdBaseUiInput.js
CHANGED
|
@@ -92,8 +92,6 @@ import { SharedInputStyles } from './shared-input-styles.js';
|
|
|
92
92
|
value: {type: String}, // current value (set from outside) TODO: Typ (Object, Number, Txt, Bool...)
|
|
93
93
|
_errorMsg: {type: String, state: true}, // errorMsg (could set fronm outside for busines validation, internal validation=> todo)
|
|
94
94
|
_inputType: {type: Number, state: true}, // number value for type (text, select, range....), set constructor of sub-class
|
|
95
|
-
// TODO: Nur für input, input-area, select im moment => weiter nach unten
|
|
96
|
-
_input: { type: Object, state: true } // reference for input html element
|
|
97
95
|
};
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -115,13 +113,13 @@ import { SharedInputStyles } from './shared-input-styles.js';
|
|
|
115
113
|
// Test: Clear input with value => Dann in BasisKlasse und alle leiten von Basis UI Element ab
|
|
116
114
|
clear() {
|
|
117
115
|
this.value = '';
|
|
118
|
-
this._input.value = this.value;
|
|
116
|
+
// this._input.value = this.value;
|
|
119
117
|
}
|
|
120
118
|
|
|
121
119
|
// Test: Reset input with value
|
|
122
120
|
reset() {
|
|
123
121
|
this.value = this.defaultValue || '';
|
|
124
|
-
this._input.value = this.value;
|
|
122
|
+
// this._input.value = this.value;
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
get errorMsg() {
|
package/src/PdButton.js
CHANGED
|
@@ -18,15 +18,6 @@ export class PdButton extends PdBaseUI {
|
|
|
18
18
|
PdBaseUI.styles,
|
|
19
19
|
css`
|
|
20
20
|
:host {
|
|
21
|
-
/*
|
|
22
|
-
--my-primary-color: var(--squi-primary-color, #177E89);
|
|
23
|
-
--my-button-background-color: var(--squi-button-background-color, #ffc857);
|
|
24
|
-
--my-button-background-hover-color: var(--squi-button-background-color, #ffb724);
|
|
25
|
-
--my-button-text-color: var(--squi-button-text-color, #084c61);
|
|
26
|
-
--my-button-font-family: var(--squi-primary-font-family, Oswald);
|
|
27
|
-
|
|
28
|
-
--my-button-width: var(--pd-input-field-width, 140px);
|
|
29
|
-
*/
|
|
30
21
|
|
|
31
22
|
display: flex;
|
|
32
23
|
justify-content: center;
|
|
@@ -37,16 +28,16 @@ export class PdButton extends PdBaseUI {
|
|
|
37
28
|
|
|
38
29
|
border-radius: var(--pd-border-radius, 1px);
|
|
39
30
|
|
|
40
|
-
background-color: var(--pd-button-bg-col, var(--pd-default-
|
|
31
|
+
background-color: var(--pd-button-bg-col, var(--pd-default-dark-col));
|
|
41
32
|
color: var(--pd-button-font-col, var(--pd-default-bg-color));
|
|
42
33
|
|
|
43
34
|
font-family: var(--pd-default-font-title-family);
|
|
44
35
|
font-size: var(--pd-button-font-size, var(--pd-default-font-content-size));
|
|
45
|
-
font-weight: var(--pd-button-font-weight, normal);
|
|
46
|
-
|
|
36
|
+
font-weight: var(--pd-button-font-weight, normal);
|
|
37
|
+
|
|
47
38
|
cursor: pointer;
|
|
48
39
|
|
|
49
|
-
box-shadow: -1px 1px 2px var(--pd-default-
|
|
40
|
+
box-shadow: var(--pd-button-box-shadow, -1px 1px 2px var(--pd-default-dark-col));
|
|
50
41
|
|
|
51
42
|
margin: 0.5rem;
|
|
52
43
|
|
|
@@ -57,11 +48,13 @@ export class PdButton extends PdBaseUI {
|
|
|
57
48
|
}
|
|
58
49
|
|
|
59
50
|
:host(:not([disabled]):hover) {
|
|
60
|
-
background-color: var(--pd-button-bg-col-hover, var(--pd-default-hover-
|
|
51
|
+
background-color: var(--pd-button-bg-col-hover, var(--pd-default-hover-col));
|
|
52
|
+
color: var(--pd-button-font-col-hover, var(--pd-default-dark-col));
|
|
53
|
+
transition: background-color 0.4s ease 0s;
|
|
61
54
|
}
|
|
62
55
|
|
|
63
56
|
:host([primary]) {
|
|
64
|
-
background-color: var(--pd-button-primary-bg-col, var(--pd-default-
|
|
57
|
+
background-color: var(--pd-button-primary-bg-col, var(--pd-default-col));
|
|
65
58
|
color: var(--pd-button-primary-font-col, var(--pd-default-bg-color));
|
|
66
59
|
}
|
|
67
60
|
|
|
@@ -71,15 +64,11 @@ export class PdButton extends PdBaseUI {
|
|
|
71
64
|
|
|
72
65
|
:host([disabled]) {
|
|
73
66
|
cursor: auto;
|
|
74
|
-
border-color: var(--pd-default-disabled-
|
|
75
|
-
background-color: var(--pd-button-bg-col-disabled, var(--pd-default-disabled-
|
|
76
|
-
color: var(--pd-button-font-col-disabled,
|
|
67
|
+
border-color: var(--pd-default-disabled-col);
|
|
68
|
+
background-color: var(--pd-button-bg-col-disabled, var(--pd-default-disabled-col));
|
|
69
|
+
color: var(--pd-button-font-col-disabled, black);
|
|
77
70
|
}
|
|
78
71
|
|
|
79
|
-
:host([disabled]:hover) {
|
|
80
|
-
box-shadow: -1px 1px 2px #1f2b2a;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
72
|
/* Style for Button */
|
|
84
73
|
a {
|
|
85
74
|
display: inline-block;
|
package/src/PdCheckbox.js
CHANGED
|
@@ -34,14 +34,14 @@ import { PdBaseUIInput, INPUT_TYPE_CHECK } from "./PdBaseUiInput.js";
|
|
|
34
34
|
* --pd-cb-unset-stroke-col unset, pd-icon default
|
|
35
35
|
* --pd-cb-unset-stroke-col-hover unset, pd-icon default
|
|
36
36
|
*
|
|
37
|
-
* --pd-cb-border-col --pd-default-
|
|
37
|
+
* --pd-cb-border-col --pd-default-col
|
|
38
38
|
* --pd-cb-border-radius 4px (not border for rounded elements, cb specific)
|
|
39
39
|
* --pd-cb-font-col --pd-default-font-input-col
|
|
40
40
|
* --pd-default-font-input-family
|
|
41
41
|
* --pd-default-font-input-size
|
|
42
42
|
* --pd-cb-txt-col-readonly #4d4d4d
|
|
43
43
|
* --pd-cb-switch-height not set
|
|
44
|
-
* --pd-cb-switch-paddle-col --pd-default-
|
|
44
|
+
* --pd-cb-switch-paddle-col --pd-default-col
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
47
|
export class PdCheckbox extends PdBaseUIInput {
|
|
@@ -119,12 +119,12 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
119
119
|
.checkbox pd-icon {
|
|
120
120
|
margin-right: .2rem;
|
|
121
121
|
margin-bottom: .2rem;
|
|
122
|
-
border: 2px solid var(--pd-cb-border-col, var(--pd-default-
|
|
123
|
-
border-radius: var(--pd-cb-border-radius,
|
|
122
|
+
border: 2px solid var(--pd-cb-border-col, var(--pd-default-col));;
|
|
123
|
+
border-radius: var(--pd-cb-border-radius, 3px);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.label {
|
|
127
|
-
margin-left: .
|
|
127
|
+
margin-left: 0.1rem;
|
|
128
128
|
color: var(--pd-cb-font-col, var(--pd-default-font-input-col));
|
|
129
129
|
font-family: var(--pd-default-font-input-family);
|
|
130
130
|
text-align: left;
|
|
@@ -132,7 +132,11 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.readonly .label {
|
|
135
|
-
color: var(--pd-cb-
|
|
135
|
+
color: var(--pd-cb-font-col-readonly, #4d4d4d);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.readonly .checkbox pd-icon {
|
|
139
|
+
border-color: var(--pd-cb-border-col-readonly, transparent);
|
|
136
140
|
}
|
|
137
141
|
|
|
138
142
|
/* Switch styles */
|
|
@@ -146,6 +150,10 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
146
150
|
user-select: none;
|
|
147
151
|
}
|
|
148
152
|
|
|
153
|
+
.switch .label {
|
|
154
|
+
margin-left: 0.5rem;
|
|
155
|
+
}
|
|
156
|
+
|
|
149
157
|
.switch-paddle {
|
|
150
158
|
display: inline-block;
|
|
151
159
|
vertical-align: baseline;
|
|
@@ -155,7 +163,7 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
155
163
|
max-width: 4rem;
|
|
156
164
|
height: 2rem;
|
|
157
165
|
border-radius: 0;
|
|
158
|
-
background: var(--pd-cb-switch-paddle-col, var(--pd-default-
|
|
166
|
+
background: var(--pd-cb-switch-paddle-col, var(--pd-default-col));
|
|
159
167
|
font-weight: inherit;
|
|
160
168
|
color: inherit;
|
|
161
169
|
cursor: pointer;
|
|
@@ -170,7 +178,7 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
170
178
|
height: 1.5rem;
|
|
171
179
|
-webkit-transform: translate3d(0, 0, 0);
|
|
172
180
|
transform: translate3d(0, 0, 0);
|
|
173
|
-
border: 2px solid var(--pd-cb-border-col, var(--pd-default-
|
|
181
|
+
border: 2px solid var(--pd-cb-border-col, var(--pd-default-col));
|
|
174
182
|
box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
|
|
175
183
|
border-radius: var(--pd-cb-border-radius, 4px);
|
|
176
184
|
-webkit-transition: all 0.25s ease-out;
|
|
@@ -196,9 +204,13 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
196
204
|
*/
|
|
197
205
|
}
|
|
198
206
|
|
|
207
|
+
.readonly .switch-paddle pd-icon {
|
|
208
|
+
border-color: var(--pd-cb-border-col-readonly, transparent);
|
|
209
|
+
}
|
|
210
|
+
|
|
199
211
|
.readonly .isChecked.switch-paddle pd-icon {
|
|
200
212
|
transform: translate3d(0, 0, 0);
|
|
201
|
-
left:
|
|
213
|
+
left: 0rem;
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
.isChecked.switch-paddle pd-icon {
|
|
@@ -213,11 +225,14 @@ export class PdCheckbox extends PdBaseUIInput {
|
|
|
213
225
|
`];
|
|
214
226
|
}
|
|
215
227
|
|
|
216
|
-
firstUpdated() {
|
|
217
|
-
this._hasInner = !!this.innerHTML.trim().length;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
228
|
render() {
|
|
229
|
+
|
|
230
|
+
// set inner for the first time (avoid upddate cycle in firstupdated (in real avoid log here...))
|
|
231
|
+
if (!this._hasInnerSet) {
|
|
232
|
+
this._hasInnerSet = true;
|
|
233
|
+
this._hasInner = !!this.innerHTML.trim().length;
|
|
234
|
+
}
|
|
235
|
+
|
|
221
236
|
const checked = (this.value === 'true');
|
|
222
237
|
const classMapVal = {'disabled': this.disabled, 'switch': this.isSwitch, 'readonly': this.readonly, 'div-container': true};
|
|
223
238
|
const aClassMap = {'switch-paddle': this.isSwitch, 'checkbox': !this.isSwitch, 'isChecked': checked, 'isUnchecked': !checked};
|
package/src/PdFormContainer.js
CHANGED
|
@@ -41,23 +41,23 @@ export class PdFormContainer extends PdBaseUI {
|
|
|
41
41
|
border-radius: var(--pd-border-radius, 0);
|
|
42
42
|
-moz-border-radius: var(--pd-border-radius, 0);
|
|
43
43
|
width:40%;
|
|
44
|
-
min-width:
|
|
44
|
+
min-width:250px;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.filled {
|
|
48
|
-
border-left: 4px solid var(--pd-
|
|
49
|
-
border-right: 4px solid var(--pd-
|
|
50
|
-
border-top: 1px solid var(--pd-
|
|
51
|
-
border-bottom: 1px solid var(--pd-
|
|
52
|
-
background-color: var(--pd-
|
|
48
|
+
border-left: 4px solid var(--pd-default-success-col);
|
|
49
|
+
border-right: 4px solid var(--pd-default-success-col);
|
|
50
|
+
border-top: 1px solid var(--pd-default-success-col);
|
|
51
|
+
border-bottom: 1px solid var(--pd-default-success-col);
|
|
52
|
+
background-color: var(--pd-default-success-light-col);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.unfilled {
|
|
56
|
-
border-left: 4px solid var(--pd-
|
|
57
|
-
border-right: 4px solid var(--pd-
|
|
58
|
-
border-top: 1px solid var(--pd-
|
|
59
|
-
border-bottom: 1px solid var(--pd-
|
|
60
|
-
background-color: var(--pd-
|
|
56
|
+
border-left: 4px solid var(--pd-default-error-col);
|
|
57
|
+
border-right: 4px solid var(--pd-default-error-col);
|
|
58
|
+
border-top: 1px solid var(--pd-default-error-col);
|
|
59
|
+
border-bottom: 1px solid var(--pd-default-error-col);
|
|
60
|
+
background-color: var(--pd-default-error-light-col);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
`];
|
package/src/PdInputArea.js
CHANGED
|
@@ -92,9 +92,10 @@ export class PdInputArea extends PdBaseInputElement {
|
|
|
92
92
|
placeholder="${this.placeHolder}"
|
|
93
93
|
?disabled="${this.disabled}"
|
|
94
94
|
?readonly="${this.readonly}"
|
|
95
|
+
.value="${this.value || ''}"
|
|
95
96
|
@keyup="${this._onKeyUp}"
|
|
96
97
|
@blur="${this._onBlur}"
|
|
97
|
-
|
|
98
|
+
></textarea>
|
|
98
99
|
</div>
|
|
99
100
|
${this._renderErrorMsg()}
|
|
100
101
|
`;
|
package/src/PdRadioGroup.js
CHANGED
|
@@ -8,31 +8,35 @@ import { css } from 'lit';
|
|
|
8
8
|
export const SharedGlobalStyles = css`
|
|
9
9
|
|
|
10
10
|
:host {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Set default fonts for all pd-components.
|
|
13
13
|
* Use content, title and input categories for fonts.
|
|
14
14
|
*/
|
|
15
|
-
--pd-default-font-title-family: var(--app-font-title-family
|
|
16
|
-
--pd-default-font-content-family: var(--app-font-content-family
|
|
17
|
-
--pd-default-font-input-family: var(--app-font-input-family
|
|
18
|
-
|
|
15
|
+
--pd-default-font-title-family: var(--app-font-title-family);
|
|
16
|
+
--pd-default-font-content-family: var(--app-font-content-family);
|
|
17
|
+
--pd-default-font-input-family: var(--app-font-input-family);
|
|
18
|
+
|
|
19
19
|
--pd-default-font-title-col: var(--app-font-title-col, #0A3A48);
|
|
20
|
-
--pd-default-font-content-col: var(--app-font-content-col, #
|
|
21
|
-
--pd-default-font-input-col: var(--app-font-input-col, #
|
|
22
|
-
|
|
20
|
+
--pd-default-font-content-col: var(--app-font-content-col, #353738);
|
|
21
|
+
--pd-default-font-input-col: var(--app-font-input-col, #353738);
|
|
22
|
+
|
|
23
23
|
--pd-default-font-content-size: var(--app-font-content-size, 1em);
|
|
24
24
|
--pd-default-font-input-size: var(--app-font-input-size, 1em);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--pd-default-
|
|
30
|
-
--pd-default-
|
|
31
|
-
--pd-default-
|
|
32
|
-
--pd-default-
|
|
33
|
-
|
|
34
|
-
--pd-default-
|
|
35
|
-
--pd-default-
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Set default colors for all pd-components
|
|
28
|
+
*/
|
|
29
|
+
--pd-default-col: var(--app-primary-col, #067394);
|
|
30
|
+
--pd-default-light-col: var(--app-primary-light-col, #AFC1D2);
|
|
31
|
+
--pd-default-dark-col: var(--app-primary-dark-col, #0A3A48);
|
|
32
|
+
--pd-default-bg-color: var(--app-primary-bg-col, #fefefe);
|
|
33
|
+
|
|
34
|
+
--pd-default-hover-col: var(--app-hover-col, #E1E03D);
|
|
35
|
+
--pd-default-error-col: var(--app-error-col, #cc2029);
|
|
36
|
+
--pd-default-error-light-col: var(--app-error-light-col, #ffe8e8);
|
|
37
|
+
--pd-default-success-col: var(--app-success-col, #42a01c);
|
|
38
|
+
--pd-default-success-light-col: var(--app-success-light-col, #f5ffe8);
|
|
39
|
+
--pd-default-disabled-col: #888585;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
`;
|
|
@@ -38,26 +38,26 @@ export const SharedInputFieldStyles = css`
|
|
|
38
38
|
/* padding: var(--squi-input-padding, 0.5rem); */
|
|
39
39
|
background-color: var(--pd-input-field-bg-col, var(--pd-default-bg-color));
|
|
40
40
|
/*opacity: 80%;*/
|
|
41
|
-
color: var(--pd-
|
|
41
|
+
color: var(--pd-default-font-input-col);
|
|
42
42
|
/*font-size: var(--squi-input-font-size, calc(var(--squi-input-height) / 1.8));*/
|
|
43
43
|
font-size: var(--pd-default-font-input-size);
|
|
44
44
|
font-family: var(--pd-default-font-input-family);
|
|
45
45
|
|
|
46
|
-
border: var(--pd-input-field-border, 1px solid var(--pd-default-
|
|
46
|
+
border: var(--pd-input-field-border, 1px solid var(--pd-default-light-col));
|
|
47
47
|
box-shadow: inset 0 1px 2px rgba(50, 48, 49, 0.1);
|
|
48
48
|
border-bottom: var(--pd-input-field-border-bottom,
|
|
49
|
-
2px solid var(--pd-default-
|
|
49
|
+
2px solid var(--pd-default-col));
|
|
50
50
|
border-radius: var(--pd-border-radius, 0);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/* Hover for input, area, select */
|
|
54
54
|
.input-style:hover {
|
|
55
|
-
border-color: var(--pd-input-field-border-col-hover, var(--pd-default-hover-
|
|
55
|
+
border-color: var(--pd-input-field-border-col-hover, var(--pd-default-hover-col));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/* Fokus for input, area => select with own css.? */
|
|
59
59
|
.input-style:focus {
|
|
60
|
-
border: var(--pd-input-field-border-focus, 2px solid var(--pd-default-
|
|
60
|
+
border: var(--pd-input-field-border-focus, 2px solid var(--pd-default-col));
|
|
61
61
|
outline: 0;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -73,30 +73,30 @@ export const SharedInputFieldStyles = css`
|
|
|
73
73
|
cursor: auto;
|
|
74
74
|
background-color: var(--pd-input-field-bg-col-disabled, #e9e9e9);
|
|
75
75
|
border-bottom: var(--pd-input-field-border-bottom-disabled,
|
|
76
|
-
2px solid var(--pd-default-disabled-
|
|
76
|
+
2px solid var(--pd-default-disabled-col));
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.input-style[readonly]:hover,
|
|
80
80
|
.input-style[disabled]:hover {
|
|
81
|
-
border-color: var(--pd-default-disabled-
|
|
81
|
+
border-color: var(--pd-default-disabled-col);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* Disabled for input, area => select with own css.? */
|
|
85
85
|
.input-style[readonly] {
|
|
86
86
|
border-bottom: var(--pd-input-field-border-bottom-disabled,
|
|
87
|
-
2px solid var(--pd-default-disabled-
|
|
87
|
+
2px solid var(--pd-default-disabled-col));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/* error element style for input, area => select has own css.? */
|
|
91
91
|
.error .input-style {
|
|
92
|
-
border: 1px solid var(--pd-default-error-
|
|
93
|
-
color: var(--pd-default-error-
|
|
94
|
-
background-color: var(--pd-error-
|
|
92
|
+
border: 1px solid var(--pd-default-error-col);
|
|
93
|
+
color: var(--pd-default-error-col);
|
|
94
|
+
background-color: var(--pd-default-error-light-col);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/* Error Focus for input, area, select */
|
|
98
98
|
.error .input-style:focus {
|
|
99
|
-
border: 2px solid var(--pd-default-error-
|
|
99
|
+
border: 2px solid var(--pd-default-error-col);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/* Placeholder color for input and input-area */
|
|
@@ -18,10 +18,10 @@ export const SharedInputStyles = css`
|
|
|
18
18
|
label {
|
|
19
19
|
display: block;
|
|
20
20
|
padding: var(--pd-input-label-padding, 0);
|
|
21
|
-
color: var(--pd-input-lable-col,
|
|
21
|
+
color: var(--pd-input-lable-col, var(--pd-default-dark-col));
|
|
22
22
|
text-align: var(--pd-input-label-align, left);
|
|
23
23
|
font-size: var(--pd-input-lable-font-size, 0.8rem);
|
|
24
|
-
font-family: var(--pd-input-lable-font-family);
|
|
24
|
+
font-family: var(--pd-input-lable-font-family, var(--pd-default-font-title-family));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -29,11 +29,11 @@ export const SharedInputStyles = css`
|
|
|
29
29
|
*/
|
|
30
30
|
.error-box {
|
|
31
31
|
display: block;
|
|
32
|
-
color: var(--pd-default-error-
|
|
33
|
-
background: var(--pd-error-
|
|
34
|
-
border: 1px solid var(--pd-default-error-
|
|
32
|
+
color: var(--pd-default-error-col);
|
|
33
|
+
background: var(--pd-default-error-light-col);
|
|
34
|
+
border: 1px solid var(--pd-default-error-col);
|
|
35
35
|
border-radius: var(--pd-border-radius, 0);
|
|
36
|
-
max-width: var(--pd-input-field-width);
|
|
36
|
+
max-width: var(--pd-input-field-width, 350px);
|
|
37
37
|
}
|
|
38
38
|
.error-box p {
|
|
39
39
|
margin: 0;
|
|
@@ -63,12 +63,30 @@ function Template({ errorMsg }) {
|
|
|
63
63
|
function SwitchTemplate({ errorMsg }) {
|
|
64
64
|
return html`
|
|
65
65
|
<h3>Switch selected</h3>
|
|
66
|
-
<pd-checkbox name="Test1" isSwitch value="true"
|
|
66
|
+
<pd-checkbox name="Test1" isSwitch value="true"
|
|
67
67
|
>Label zur Checkbox</pd-checkbox
|
|
68
68
|
>
|
|
69
69
|
|
|
70
70
|
<h3>Switch unselected</h3>
|
|
71
|
-
<pd-checkbox name="Test2" isSwitch value="false"
|
|
71
|
+
<pd-checkbox name="Test2" isSwitch value="false"
|
|
72
|
+
>Label zur Checkbox</pd-checkbox
|
|
73
|
+
>
|
|
74
|
+
|
|
75
|
+
<h3>Switch disabled</h3>
|
|
76
|
+
<pd-checkbox name="Test2" isSwitch value="false" disabled
|
|
77
|
+
>Label zur Checkbox</pd-checkbox
|
|
78
|
+
>
|
|
79
|
+
<h3>Switch disabled</h3>
|
|
80
|
+
<pd-checkbox name="Test2" isSwitch value="true" disabled
|
|
81
|
+
>Label zur Checkbox</pd-checkbox
|
|
82
|
+
>
|
|
83
|
+
|
|
84
|
+
<h3>Switch readonly</h3>
|
|
85
|
+
<pd-checkbox name="Test2" isSwitch value="false" readonly
|
|
86
|
+
>Label zur Checkbox</pd-checkbox
|
|
87
|
+
>
|
|
88
|
+
<h3>Switch readonly</h3>
|
|
89
|
+
<pd-checkbox name="Test2" isSwitch value="true" readonly
|
|
72
90
|
>Label zur Checkbox</pd-checkbox
|
|
73
91
|
>
|
|
74
92
|
`;
|