@fluid-topics/ft-file-button 2.0.38 → 2.1.0
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/build/definitions.d.ts +0 -2
- package/build/definitions.js +0 -2
- package/build/ft-file-button.d.ts +21 -3
- package/build/ft-file-button.js +80 -5
- package/build/ft-file-button.light.js +378 -1451
- package/build/ft-file-button.min.js +392 -1464
- package/build/{ft-base-file-button.properties.d.ts → ft-file-button.properties.d.ts} +1 -1
- package/build/ft-file-button.styles.d.ts +1 -1
- package/build/ft-file-button.styles.js +1 -1
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -3
- package/package.json +4 -4
- package/build/ft-base-file-button.d.ts +0 -25
- package/build/ft-base-file-button.js +0 -81
- package/build/ftds-file-button.d.ts +0 -6
- package/build/ftds-file-button.js +0 -9
- package/build/ftds-file-button.styles.d.ts +0 -1
- package/build/ftds-file-button.styles.js +0 -3
- /package/build/{ft-base-file-button.properties.js → ft-file-button.properties.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const FtFileButtonCssVariables: {};
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const fileButtonStyles: import("lit").CSSResult;
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./ft-
|
|
2
|
-
export * from "./ft-
|
|
3
|
-
export * from "./ftds-file-button";
|
|
1
|
+
export * from "./ft-file-button";
|
|
2
|
+
export * from "./ft-file-button.properties";
|
|
4
3
|
export * from "./ft-file-button";
|
|
5
4
|
export * from "./ft-file-button.styles";
|
|
6
5
|
import "./define";
|
package/build/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./ft-
|
|
2
|
-
export * from "./ft-
|
|
3
|
-
export * from "./ftds-file-button";
|
|
1
|
+
export * from "./ft-file-button";
|
|
2
|
+
export * from "./ft-file-button.properties";
|
|
4
3
|
export * from "./ft-file-button";
|
|
5
4
|
export * from "./ft-file-button.styles";
|
|
6
5
|
import "./define";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-file-button",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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": "2.0
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "2.0
|
|
22
|
+
"@fluid-topics/ft-button": "2.1.0",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "2.1.0",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4727cf19d04236ad1d2b2cb43ce1c46298834c7e"
|
|
27
27
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
import { FtBaseFileButtonProperties } from "./ft-base-file-button.properties";
|
|
3
|
-
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
4
|
-
export declare class FileChangeEvent extends CustomEvent<{
|
|
5
|
-
file: File;
|
|
6
|
-
}> {
|
|
7
|
-
constructor(file: File);
|
|
8
|
-
}
|
|
9
|
-
declare const FtBaseFileButton_base: import("@fluid-topics/ft-wc-utils").FtdsBaseType<typeof FtLitElement>;
|
|
10
|
-
export declare class FtBaseFileButton extends FtBaseFileButton_base implements FtBaseFileButtonProperties {
|
|
11
|
-
static elementDefinitions: ElementDefinitionsMap;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
label: string;
|
|
14
|
-
icon?: string;
|
|
15
|
-
iconVariant?: FtIconVariants;
|
|
16
|
-
trailingIcon: boolean;
|
|
17
|
-
accept: string;
|
|
18
|
-
private input;
|
|
19
|
-
private button;
|
|
20
|
-
focus(): void;
|
|
21
|
-
clear(): void;
|
|
22
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
23
|
-
private onFileChange;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html } from "lit";
|
|
8
|
-
import { property, query, } from "lit/decorators.js";
|
|
9
|
-
import { FtLitElement, toFtdsBase, } from "@fluid-topics/ft-wc-utils";
|
|
10
|
-
export class FileChangeEvent extends CustomEvent {
|
|
11
|
-
constructor(file) {
|
|
12
|
-
super("change", { detail: { file } });
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export class FtBaseFileButton extends toFtdsBase(FtLitElement) {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
this.label = "";
|
|
20
|
-
this.icon = undefined;
|
|
21
|
-
this.trailingIcon = false;
|
|
22
|
-
this.accept = "";
|
|
23
|
-
}
|
|
24
|
-
focus() {
|
|
25
|
-
this.button.focus();
|
|
26
|
-
}
|
|
27
|
-
clear() {
|
|
28
|
-
this.input.value = "";
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
return html `
|
|
32
|
-
<div class="ft-file-button">
|
|
33
|
-
<ft-or-ftds-button ?disabled=${this.disabled}
|
|
34
|
-
label="${this.label}"
|
|
35
|
-
family="${this.family}"
|
|
36
|
-
size="${this.size}"
|
|
37
|
-
icon="${this.icon}"
|
|
38
|
-
.iconVariant=${this.iconVariant}
|
|
39
|
-
?trailingIcon=${this.trailingIcon}
|
|
40
|
-
@click=${() => this.input.click()}>
|
|
41
|
-
<slot></slot>
|
|
42
|
-
</ft-or-ftds-button>
|
|
43
|
-
<input class="ft-file-button--input"
|
|
44
|
-
type="file"
|
|
45
|
-
accept="${this.accept}"
|
|
46
|
-
@change=${this.onFileChange}
|
|
47
|
-
hidden/>
|
|
48
|
-
</div>
|
|
49
|
-
`;
|
|
50
|
-
}
|
|
51
|
-
onFileChange() {
|
|
52
|
-
if (this.input.files.length > 0) {
|
|
53
|
-
this.dispatchEvent(new FileChangeEvent(this.input.files.item(0)));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
FtBaseFileButton.elementDefinitions = {};
|
|
58
|
-
__decorate([
|
|
59
|
-
property({ type: Boolean })
|
|
60
|
-
], FtBaseFileButton.prototype, "disabled", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
property()
|
|
63
|
-
], FtBaseFileButton.prototype, "label", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
property()
|
|
66
|
-
], FtBaseFileButton.prototype, "icon", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
property()
|
|
69
|
-
], FtBaseFileButton.prototype, "iconVariant", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
property({ type: Boolean })
|
|
72
|
-
], FtBaseFileButton.prototype, "trailingIcon", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
property()
|
|
75
|
-
], FtBaseFileButton.prototype, "accept", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
query(".ft-file-button--input")
|
|
78
|
-
], FtBaseFileButton.prototype, "input", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
query("ft-or-ftds-button")
|
|
81
|
-
], FtBaseFileButton.prototype, "button", void 0);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FtBaseFileButton } from "./ft-base-file-button";
|
|
2
|
-
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
export declare class FtdsFileButton extends FtBaseFileButton {
|
|
4
|
-
static elementDefinitions: ElementDefinitionsMap;
|
|
5
|
-
static styles: import("lit").CSSResult;
|
|
6
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FtBaseFileButton } from "./ft-base-file-button";
|
|
2
|
-
import { styles } from "./ftds-file-button.styles";
|
|
3
|
-
import { FtdsButton } from "@fluid-topics/ft-button";
|
|
4
|
-
export class FtdsFileButton extends FtBaseFileButton {
|
|
5
|
-
}
|
|
6
|
-
FtdsFileButton.elementDefinitions = {
|
|
7
|
-
"ft-or-ftds-button": FtdsButton,
|
|
8
|
-
};
|
|
9
|
-
FtdsFileButton.styles = styles;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import("lit").CSSResult;
|
|
File without changes
|