@progressive-development/pd-forms 0.2.9 → 0.2.11

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.2.9",
6
+ "version": "0.2.11",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
@@ -93,7 +93,7 @@ export class PdInputFile extends PdBaseInputElement {
93
93
  ?disabled="${this.disabled}"
94
94
  @keyup="${this._onKeyUp}"
95
95
  @blur="${this._onBlur}"
96
-
96
+ @change="${this._onChange}"
97
97
  />
98
98
  </div>
99
99
  ${this._renderErrorMsg()}
@@ -108,4 +108,14 @@ export class PdInputFile extends PdBaseInputElement {
108
108
  this.dispatchEvent(new CustomEvent("input-icon-click"))
109
109
  }
110
110
 
111
+ _onChange(e) {
112
+ // TODO
113
+ this.dispatchEvent(new CustomEvent("file-change"))
114
+ }
115
+
116
+ get files() {
117
+ const el = this.shadowRoot.getElementById(`${this.id}Input`);
118
+ return el ? el.files : undefined;
119
+ }
120
+
111
121
  }
@@ -22,6 +22,7 @@ export const SharedInputStyles = css`
22
22
  text-align: var(--pd-input-label-align, left);
23
23
  font-size: var(--pd-input-lable-font-size, 0.9em);
24
24
  font-family: var(--pd-input-lable-font-family, var(--pd-default-font-title-family));
25
+ max-width: var(--pd-input-field-width, 250px);
25
26
  }
26
27
 
27
28
  /**