@progressive-development/pd-forms 0.1.16 → 0.1.19

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/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.1.16",
6
+ "version": "0.1.19",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
@@ -61,7 +61,7 @@ export class PdBaseInputElement extends PdBaseUIInput {
61
61
  this._input = this.shadowRoot.querySelector(this._getElementName());
62
62
  }
63
63
 
64
- _onBlur() {
64
+ _onBlur(event) {
65
65
  this.dispatchEvent(
66
66
  new CustomEvent('focus-lost', {
67
67
  detail: {
@@ -71,6 +71,8 @@ export class PdBaseInputElement extends PdBaseUIInput {
71
71
  bubbles: true,
72
72
  })
73
73
  );
74
+
75
+ this._handleChangedValue(this._input.value, event, true, true);
74
76
  }
75
77
 
76
78
  _onKeyUp(event) {
@@ -156,7 +156,7 @@ import { SharedInputStyles } from './shared-input-styles.js';
156
156
  );
157
157
  }
158
158
 
159
- _handleChangedValue(newValue, event, checkReturn) {
159
+ _handleChangedValue(newValue, event, checkReturn, showValidateMsg) {
160
160
  const changed = this.value !== newValue;
161
161
 
162
162
  this.value = newValue;
@@ -188,10 +188,13 @@ import { SharedInputStyles } from './shared-input-styles.js';
188
188
  bubbles: true,
189
189
  })
190
190
  );
191
- // generate validation event after delay
192
- clearTimeout(delayTimer);
193
- delayTimer = setTimeout(this._generateValidateEvent.bind(this),
194
- DELAY_WAIT_TIME_MS);
191
+
192
+ if (showValidateMsg) {
193
+ // generate validation event after delay
194
+ clearTimeout(delayTimer);
195
+ delayTimer = setTimeout(this._generateValidateEvent.bind(this),
196
+ DELAY_WAIT_TIME_MS);
197
+ }
195
198
  }
196
199
  }
197
200
 
package/src/PdButton.js CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  background-color: var(--pd-button-bg-col, var(--pd-default-dark-col));
48
48
  color: var(--pd-button-font-col, var(--pd-default-bg-col));
49
-
49
+ border: var(--pd-button-border, 0);
50
50
  cursor: pointer;
51
51
 
52
52
  box-shadow: var(--pd-button-box-shadow, none);
@@ -59,6 +59,7 @@
59
59
  background-color: var(--pd-button-bg-col-hover, var(--pd-default-hover-col));
60
60
  color: var(--pd-button-font-col-hover, var(--pd-default-dark-col));
61
61
  transition: background-color 0.4s ease 0s;
62
+ --pd-button-border: var(--pd-button-border-hover);
62
63
  }
63
64
 
64
65
  :host(:not([disabled])):host([primary]) .button-div:hover {
@@ -80,6 +81,7 @@
80
81
  border-color: var(--pd-default-disabled-col);
81
82
  background-color: var(--pd-button-bg-col-disabled, var(--pd-default-disabled-col));
82
83
  color: var(--pd-button-font-col-disabled, black);
84
+ --pd-button-border: var(--pd-button-border-disabled);
83
85
  }
84
86
 
85
87
  /* Style for Button */
package/src/PdCheckbox.js CHANGED
@@ -259,7 +259,7 @@ export class PdCheckbox extends PdBaseUIInput {
259
259
 
260
260
  // set changed value and generate events (key-pressed, enter-pressed, validateForm)
261
261
  // if neccessary
262
- this._handleChangedValue(checked ? 'false' : 'true', e);
262
+ this._handleChangedValue(checked ? 'false' : 'true', e, false, true);
263
263
 
264
264
  // TODO: Idee, alle input elemente haben gleichen event!
265
265
  /*
package/src/PdFormRow.js CHANGED
@@ -29,7 +29,8 @@ export class PdFormRow extends PdBaseUI {
29
29
  min-width: var(--my-row-width);
30
30
  max-width: 100%;
31
31
  gap: var(--my-gap);
32
- align-items: flex-start;
32
+ align-items: flex-start;
33
+ justify-content: var(--pd-form-row-align, left);
33
34
  padding-top: var(--pd-form-row-padding-top, 10px);
34
35
  }
35
36
 
package/src/PdRange.js CHANGED
@@ -224,7 +224,7 @@ export class PdRange extends PdBaseUIInput {
224
224
  }
225
225
 
226
226
  _onChange(e) {
227
- this._handleChangedValue(this._input.value, e, false);
227
+ this._handleChangedValue(this._input.value, e, false, true);
228
228
  }
229
229
 
230
230
  }