@shoper/phoenix_design_system 1.2.0-3 → 1.2.0-4
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/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js +3 -3
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker_constants.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker_label.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js +3 -3
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker_constants.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker_constants.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker_label.js +1 -1
- package/package.json +1 -1
|
@@ -91,7 +91,7 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
|
|
|
91
91
|
value="${ifDefined.ifDefined(this.value)}"
|
|
92
92
|
?disabled="${this.disabled}"
|
|
93
93
|
?required="${this.required}"
|
|
94
|
-
accept="${ifDefined.ifDefined(this.
|
|
94
|
+
accept="${ifDefined.ifDefined(this.accept)}"
|
|
95
95
|
@change="${this._handleChangeEvent}"
|
|
96
96
|
hidden
|
|
97
97
|
/>
|
|
@@ -115,7 +115,7 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
|
|
|
115
115
|
}
|
|
116
116
|
_addEventListeners() {
|
|
117
117
|
this.addEventListener(file_picker_constants.FILE_ITEM_EVENT_NAMES.removed, this._removeFileItem);
|
|
118
|
-
this.addEventListener(file_picker_constants.FILE_PICKER_LABEL_EVENT_NAMES.
|
|
118
|
+
this.addEventListener(file_picker_constants.FILE_PICKER_LABEL_EVENT_NAMES.filePickerLabelClickedByEnterKey, this._triggerClickOnLabel);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
tslib_es6.__decorate([
|
|
@@ -161,7 +161,7 @@ tslib_es6.__decorate([
|
|
|
161
161
|
tslib_es6.__decorate([
|
|
162
162
|
decorators.property({ type: String }),
|
|
163
163
|
tslib_es6.__metadata("design:type", String)
|
|
164
|
-
], exports.HFilePicker.prototype, "
|
|
164
|
+
], exports.HFilePicker.prototype, "accept", void 0);
|
|
165
165
|
tslib_es6.__decorate([
|
|
166
166
|
decorators.property({ type: FileList, reflect: true }),
|
|
167
167
|
tslib_es6.__metadata("design:type", Object)
|
|
@@ -22,7 +22,7 @@ const FILE_PICKER_CONTROL_CSS_CLASSES = {
|
|
|
22
22
|
filePickerLabel: `${baseFilePickerControlClass}__label`
|
|
23
23
|
};
|
|
24
24
|
const FILE_PICKER_LABEL_EVENT_NAMES = {
|
|
25
|
-
|
|
25
|
+
filePickerLabelClickedByEnterKey: 'filePickerLabelClickedByEnterKey'
|
|
26
26
|
};
|
|
27
27
|
const baseFilePickerIconClass = 'file-picker-icon';
|
|
28
28
|
const FILE_PICKER_ICON_CSS_CLASSES = {
|
|
@@ -15,7 +15,7 @@ exports.HFilePickerLabel = class HFilePickerLabel extends phoenix_light_lit_elem
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
this._dispatchClickEvent = () => {
|
|
18
|
-
this.dispatchEvent(new CustomEvent(file_picker_constants.FILE_PICKER_LABEL_EVENT_NAMES.
|
|
18
|
+
this.dispatchEvent(new CustomEvent(file_picker_constants.FILE_PICKER_LABEL_EVENT_NAMES.filePickerLabelClickedByEnterKey, {
|
|
19
19
|
bubbles: true
|
|
20
20
|
}));
|
|
21
21
|
};
|
|
@@ -12,7 +12,7 @@ export declare class HFilePicker extends PhoenixLightLitElement {
|
|
|
12
12
|
labelIconName: string;
|
|
13
13
|
removeButtonText: string;
|
|
14
14
|
removeButtonIconName: string;
|
|
15
|
-
|
|
15
|
+
accept: string;
|
|
16
16
|
files: FileList | null;
|
|
17
17
|
file: FileItem;
|
|
18
18
|
private _$fileInputRef;
|
|
@@ -87,7 +87,7 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
|
|
|
87
87
|
value="${ifDefined(this.value)}"
|
|
88
88
|
?disabled="${this.disabled}"
|
|
89
89
|
?required="${this.required}"
|
|
90
|
-
accept="${ifDefined(this.
|
|
90
|
+
accept="${ifDefined(this.accept)}"
|
|
91
91
|
@change="${this._handleChangeEvent}"
|
|
92
92
|
hidden
|
|
93
93
|
/>
|
|
@@ -111,7 +111,7 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
|
|
|
111
111
|
}
|
|
112
112
|
_addEventListeners() {
|
|
113
113
|
this.addEventListener(FILE_ITEM_EVENT_NAMES.removed, this._removeFileItem);
|
|
114
|
-
this.addEventListener(FILE_PICKER_LABEL_EVENT_NAMES.
|
|
114
|
+
this.addEventListener(FILE_PICKER_LABEL_EVENT_NAMES.filePickerLabelClickedByEnterKey, this._triggerClickOnLabel);
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
__decorate([
|
|
@@ -157,7 +157,7 @@ __decorate([
|
|
|
157
157
|
__decorate([
|
|
158
158
|
property({ type: String }),
|
|
159
159
|
__metadata("design:type", String)
|
|
160
|
-
], HFilePicker.prototype, "
|
|
160
|
+
], HFilePicker.prototype, "accept", void 0);
|
|
161
161
|
__decorate([
|
|
162
162
|
property({ type: FileList, reflect: true }),
|
|
163
163
|
__metadata("design:type", Object)
|
package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker_constants.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const FILE_PICKER_CONTROL_CSS_CLASSES: {
|
|
|
22
22
|
readonly filePickerLabel: "file-picker__label";
|
|
23
23
|
};
|
|
24
24
|
export declare const FILE_PICKER_LABEL_EVENT_NAMES: {
|
|
25
|
-
readonly
|
|
25
|
+
readonly filePickerLabelClickedByEnterKey: "filePickerLabelClickedByEnterKey";
|
|
26
26
|
};
|
|
27
27
|
export declare const FILE_PICKER_ICON_CSS_CLASSES: {
|
|
28
28
|
readonly filePickerIcon: "file-picker-icon";
|
|
@@ -18,7 +18,7 @@ const FILE_PICKER_CONTROL_CSS_CLASSES = {
|
|
|
18
18
|
filePickerLabel: `${baseFilePickerControlClass}__label`
|
|
19
19
|
};
|
|
20
20
|
const FILE_PICKER_LABEL_EVENT_NAMES = {
|
|
21
|
-
|
|
21
|
+
filePickerLabelClickedByEnterKey: 'filePickerLabelClickedByEnterKey'
|
|
22
22
|
};
|
|
23
23
|
const baseFilePickerIconClass = 'file-picker-icon';
|
|
24
24
|
const FILE_PICKER_ICON_CSS_CLASSES = {
|
|
@@ -11,7 +11,7 @@ let HFilePickerLabel = class HFilePickerLabel extends PhoenixLightLitElement {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
this._dispatchClickEvent = () => {
|
|
14
|
-
this.dispatchEvent(new CustomEvent(FILE_PICKER_LABEL_EVENT_NAMES.
|
|
14
|
+
this.dispatchEvent(new CustomEvent(FILE_PICKER_LABEL_EVENT_NAMES.filePickerLabelClickedByEnterKey, {
|
|
15
15
|
bubbles: true
|
|
16
16
|
}));
|
|
17
17
|
};
|