@fluid-topics/ft-file-button 0.2.0 → 0.2.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.
|
@@ -21,8 +21,10 @@ export declare class FtFileButton extends FtLitElement implements FtFileButtonPr
|
|
|
21
21
|
trailingIcon: boolean;
|
|
22
22
|
accept: string;
|
|
23
23
|
private input;
|
|
24
|
+
private button;
|
|
24
25
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
25
26
|
private onFileChange;
|
|
27
|
+
focus(): void;
|
|
26
28
|
clear(): void;
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=ft-file-button.d.ts.map
|
|
@@ -634,7 +634,7 @@ class ei extends wt{constructor(t){if(super(t),this.it=H,t.type!==gt)throw Error
|
|
|
634
634
|
@change=${this.onFileChange}
|
|
635
635
|
hidden/>
|
|
636
636
|
</div>
|
|
637
|
-
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new bi(this.input.files.item(0)))}clear(){this.input.value=""}}vi.elementDefinitions={"ft-button":yi},xi([i({type:Boolean})],vi.prototype,"disabled",void 0),xi([i({type:String})],vi.prototype,"label",void 0),xi([i({type:String})],vi.prototype,"icon",void 0),xi([i({type:Boolean})],vi.prototype,"trailingIcon",void 0),xi([i({type:String})],vi.prototype,"accept",void 0),xi([s(".ft-file-button--input")],vi.prototype,"input",void 0),l("ft-file-button")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{constructor(...t){super(t),this._constructor=this.constructor}render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),W`
|
|
637
|
+
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new bi(this.input.files.item(0)))}focus(){this.button.focus()}clear(){this.input.value=""}}vi.elementDefinitions={"ft-button":yi},xi([i({type:Boolean})],vi.prototype,"disabled",void 0),xi([i({type:String})],vi.prototype,"label",void 0),xi([i({type:String})],vi.prototype,"icon",void 0),xi([i({type:Boolean})],vi.prototype,"trailingIcon",void 0),xi([i({type:String})],vi.prototype,"accept",void 0),xi([s(".ft-file-button--input")],vi.prototype,"input",void 0),xi([s("ft-button")],vi.prototype,"button",void 0),l("ft-file-button")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{constructor(...t){super(t),this._constructor=this.constructor}render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),W`
|
|
638
638
|
${i.map((t=>W`
|
|
639
639
|
<style>${t}</style>
|
|
640
640
|
`))}
|
package/build/ft-file-button.js
CHANGED
|
@@ -54,6 +54,9 @@ export class FtFileButton extends FtLitElement {
|
|
|
54
54
|
this.dispatchEvent(new FileChangeEvent(this.input.files.item(0)));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
focus() {
|
|
58
|
+
this.button.focus();
|
|
59
|
+
}
|
|
57
60
|
clear() {
|
|
58
61
|
this.input.value = "";
|
|
59
62
|
}
|
|
@@ -79,4 +82,7 @@ __decorate([
|
|
|
79
82
|
__decorate([
|
|
80
83
|
query(".ft-file-button--input")
|
|
81
84
|
], FtFileButton.prototype, "input", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
query("ft-button")
|
|
87
|
+
], FtFileButton.prototype, "button", void 0);
|
|
82
88
|
//# sourceMappingURL=ft-file-button.js.map
|
|
@@ -536,4 +536,4 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
536
536
|
@change=${this.onFileChange}
|
|
537
537
|
hidden/>
|
|
538
538
|
</div>
|
|
539
|
-
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new Ti(this.input.files.item(0)))}clear(){this.input.value=""}}Bi.elementDefinitions={"ft-button":Ai},Ii([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ii([o.property({type:String})],Bi.prototype,"label",void 0),Ii([o.property({type:String})],Bi.prototype,"icon",void 0),Ii([o.property({type:Boolean})],Bi.prototype,"trailingIcon",void 0),Ii([o.property({type:String})],Bi.prototype,"accept",void 0),Ii([o.query(".ft-file-button--input")],Bi.prototype,"input",void 0),i.customElement("ft-file-button")(Bi),t.FileChangeEvent=Ti,t.FtFileButton=Bi,t.FtFileButtonCssVariables={},Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
539
|
+
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new Ti(this.input.files.item(0)))}focus(){this.button.focus()}clear(){this.input.value=""}}Bi.elementDefinitions={"ft-button":Ai},Ii([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ii([o.property({type:String})],Bi.prototype,"label",void 0),Ii([o.property({type:String})],Bi.prototype,"icon",void 0),Ii([o.property({type:Boolean})],Bi.prototype,"trailingIcon",void 0),Ii([o.property({type:String})],Bi.prototype,"accept",void 0),Ii([o.query(".ft-file-button--input")],Bi.prototype,"input",void 0),Ii([o.query("ft-button")],Bi.prototype,"button",void 0),i.customElement("ft-file-button")(Bi),t.FileChangeEvent=Ti,t.FtFileButton=Bi,t.FtFileButtonCssVariables={},Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
@@ -634,4 +634,4 @@ class ii extends $t{constructor(t){if(super(t),this.it=K,t.type!==mt)throw Error
|
|
|
634
634
|
@change=${this.onFileChange}
|
|
635
635
|
hidden/>
|
|
636
636
|
</div>
|
|
637
|
-
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new vi(this.input.files.item(0)))}clear(){this.input.value=""}}gi.elementDefinitions={"ft-button":xi},bi([o({type:Boolean})],gi.prototype,"disabled",void 0),bi([o({type:String})],gi.prototype,"label",void 0),bi([o({type:String})],gi.prototype,"icon",void 0),bi([o({type:Boolean})],gi.prototype,"trailingIcon",void 0),bi([o({type:String})],gi.prototype,"accept",void 0),bi([r(".ft-file-button--input")],gi.prototype,"input",void 0),p("ft-file-button")(gi),t.FileChangeEvent=vi,t.FtFileButton=gi,t.FtFileButtonCssVariables={},Object.defineProperty(t,"t",{value:!0})}({});
|
|
637
|
+
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new vi(this.input.files.item(0)))}focus(){this.button.focus()}clear(){this.input.value=""}}gi.elementDefinitions={"ft-button":xi},bi([o({type:Boolean})],gi.prototype,"disabled",void 0),bi([o({type:String})],gi.prototype,"label",void 0),bi([o({type:String})],gi.prototype,"icon",void 0),bi([o({type:Boolean})],gi.prototype,"trailingIcon",void 0),bi([o({type:String})],gi.prototype,"accept",void 0),bi([r(".ft-file-button--input")],gi.prototype,"input",void 0),bi([r("ft-button")],gi.prototype,"button",void 0),p("ft-file-button")(gi),t.FileChangeEvent=vi,t.FtFileButton=gi,t.FtFileButtonCssVariables={},Object.defineProperty(t,"t",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-file-button",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "File",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "^0.2.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "^0.2.
|
|
22
|
+
"@fluid-topics/ft-button": "^0.2.1",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "^0.2.1",
|
|
24
24
|
"lit": "2.1.3"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "2ed08ecdd09372f1c522c4812bd738b7ee79a644"
|
|
27
27
|
}
|