@ezeep/ezeep-js 1.0.256 → 1.0.257

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.
@@ -34296,7 +34296,7 @@ let EzpTextButton = class {
34296
34296
  };
34297
34297
  EzpTextButton.style = ezpTextButtonCss;
34298
34298
 
34299
- const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);width:100%}.file-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2);background:var(--ezp-core-background-secondary);border-radius:3px}.file-item ezp-label{-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item ezp-icon-button{-ms-flex-negative:0;flex-shrink:0}";
34299
+ const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:35vh;overflow-y:auto}.file-item{display:grid;grid-template-columns:1fr auto;-ms-flex-align:center;align-items:center;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);background:var(--ezp-core-background-secondary);border-radius:3px;min-height:32px}.file-name{grid-column:1;min-width:0}.file-name ezp-label{--ezp-label-minWidth:0}.file-remove{grid-column:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";
34300
34300
 
34301
34301
  let EzpUpload = class {
34302
34302
  constructor(hostRef) {
@@ -34319,10 +34319,20 @@ let EzpUpload = class {
34319
34319
  // Add new files to existing selection instead of replacing
34320
34320
  this.selectedFiles = [...this.selectedFiles, ...files];
34321
34321
  this.uploadFile.emit(this.selectedFiles);
34322
+ // Reset the input so the same file can be selected again
34323
+ if (this.input) {
34324
+ this.input.value = '';
34325
+ }
34322
34326
  };
34323
- this.removeFile = (index) => {
34327
+ this.removeFile = (event, index) => {
34328
+ event.preventDefault();
34329
+ event.stopPropagation();
34324
34330
  this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
34325
34331
  this.uploadFile.emit(this.selectedFiles);
34332
+ // Reset the input so it's ready for new selections
34333
+ if (this.input) {
34334
+ this.input.value = '';
34335
+ }
34326
34336
  };
34327
34337
  }
34328
34338
  /**
@@ -34360,7 +34370,7 @@ let EzpUpload = class {
34360
34370
  *
34361
34371
  */
34362
34372
  render() {
34363
- return (index.h(index.Host, { class: { dragging: this.dragging } }, index.h("form", { id: "form", ref: (form) => (this.form = form) }, index.h("div", { id: "header" }, index.h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), index.h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), index.h("div", { id: "meta" }, index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), index.h("label", { htmlFor: "input", id: "select" }, index.h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), index.h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (index.h(index.Fragment, null, index.h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), index.h("div", { id: "file-list" }, this.selectedFiles.map((file, index$1) => (index.h("div", { key: index$1, class: "file-item" }, index.h("ezp-label", { level: "tertiary", text: file.name }), index.h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: () => this.removeFile(index$1) })))))))))));
34373
+ return (index.h(index.Host, { class: { dragging: this.dragging } }, index.h("form", { id: "form", ref: (form) => (this.form = form) }, index.h("div", { id: "header" }, index.h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), index.h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), index.h("div", { id: "meta" }, index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), index.h("label", { htmlFor: "input", id: "select" }, index.h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), index.h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (index.h(index.Fragment, null, index.h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), index.h("div", { id: "file-list" }, this.selectedFiles.map((file, index$1) => (index.h("div", { key: index$1, class: "file-item" }, index.h("div", { class: "file-name" }, index.h("ezp-label", { level: "tertiary", text: file.name })), index.h("div", { class: "file-remove" }, index.h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: (event) => this.removeFile(event, index$1) }))))))))))));
34364
34374
  }
34365
34375
  };
34366
34376
  EzpUpload.style = ezpUploadCss;
@@ -70,25 +70,32 @@
70
70
  #file-list {
71
71
  display: flex;
72
72
  flex-direction: column;
73
- gap: var(--ezp-spacing-3);
74
73
  width: 100%;
74
+ height: 35vh;
75
+ overflow-y: auto;
75
76
  }
76
77
 
77
78
  .file-item {
78
- display: flex;
79
+ display: grid;
80
+ grid-template-columns: 1fr auto;
79
81
  align-items: center;
80
- justify-content: space-between;
81
82
  gap: var(--ezp-spacing-3);
82
- padding: var(--ezp-spacing-2);
83
+ padding: var(--ezp-spacing-2) var(--ezp-spacing-3);
83
84
  background: var(--ezp-core-background-secondary);
84
85
  border-radius: 3px;
86
+ min-height: 32px;
85
87
  }
86
- .file-item ezp-label {
87
- flex: 1;
88
- overflow: hidden;
89
- text-overflow: ellipsis;
90
- white-space: nowrap;
88
+
89
+ .file-name {
90
+ grid-column: 1;
91
+ min-width: 0;
91
92
  }
92
- .file-item ezp-icon-button {
93
- flex-shrink: 0;
93
+ .file-name ezp-label {
94
+ --ezp-label-minWidth: 0;
95
+ }
96
+
97
+ .file-remove {
98
+ grid-column: 2;
99
+ display: flex;
100
+ align-items: center;
94
101
  }
@@ -19,10 +19,20 @@ export class EzpUpload {
19
19
  // Add new files to existing selection instead of replacing
20
20
  this.selectedFiles = [...this.selectedFiles, ...files];
21
21
  this.uploadFile.emit(this.selectedFiles);
22
+ // Reset the input so the same file can be selected again
23
+ if (this.input) {
24
+ this.input.value = '';
25
+ }
22
26
  };
23
- this.removeFile = (index) => {
27
+ this.removeFile = (event, index) => {
28
+ event.preventDefault();
29
+ event.stopPropagation();
24
30
  this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
25
31
  this.uploadFile.emit(this.selectedFiles);
32
+ // Reset the input so it's ready for new selections
33
+ if (this.input) {
34
+ this.input.value = '';
35
+ }
26
36
  };
27
37
  }
28
38
  /**
@@ -74,8 +84,10 @@ export class EzpUpload {
74
84
  this.selectedFiles.length > 0 && (h(Fragment, null,
75
85
  h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }),
76
86
  h("div", { id: "file-list" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "file-item" },
77
- h("ezp-label", { level: "tertiary", text: file.name }),
78
- h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: () => this.removeFile(index) })))))))))));
87
+ h("div", { class: "file-name" },
88
+ h("ezp-label", { level: "tertiary", text: file.name })),
89
+ h("div", { class: "file-remove" },
90
+ h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: (event) => this.removeFile(event, index) }))))))))))));
79
91
  }
80
92
  static get is() { return "ezp-upload"; }
81
93
  static get encapsulation() { return "shadow"; }
@@ -34331,7 +34331,7 @@ let EzpTextButton$1 = class extends HTMLElement {
34331
34331
  static get style() { return ezpTextButtonCss; }
34332
34332
  };
34333
34333
 
34334
- const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);width:100%}.file-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2);background:var(--ezp-core-background-secondary);border-radius:3px}.file-item ezp-label{-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item ezp-icon-button{-ms-flex-negative:0;flex-shrink:0}";
34334
+ const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:35vh;overflow-y:auto}.file-item{display:grid;grid-template-columns:1fr auto;-ms-flex-align:center;align-items:center;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);background:var(--ezp-core-background-secondary);border-radius:3px;min-height:32px}.file-name{grid-column:1;min-width:0}.file-name ezp-label{--ezp-label-minWidth:0}.file-remove{grid-column:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";
34335
34335
 
34336
34336
  let EzpUpload$1 = class extends HTMLElement {
34337
34337
  constructor() {
@@ -34356,10 +34356,20 @@ let EzpUpload$1 = class extends HTMLElement {
34356
34356
  // Add new files to existing selection instead of replacing
34357
34357
  this.selectedFiles = [...this.selectedFiles, ...files];
34358
34358
  this.uploadFile.emit(this.selectedFiles);
34359
+ // Reset the input so the same file can be selected again
34360
+ if (this.input) {
34361
+ this.input.value = '';
34362
+ }
34359
34363
  };
34360
- this.removeFile = (index) => {
34364
+ this.removeFile = (event, index) => {
34365
+ event.preventDefault();
34366
+ event.stopPropagation();
34361
34367
  this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
34362
34368
  this.uploadFile.emit(this.selectedFiles);
34369
+ // Reset the input so it's ready for new selections
34370
+ if (this.input) {
34371
+ this.input.value = '';
34372
+ }
34363
34373
  };
34364
34374
  }
34365
34375
  /**
@@ -34397,7 +34407,7 @@ let EzpUpload$1 = class extends HTMLElement {
34397
34407
  *
34398
34408
  */
34399
34409
  render() {
34400
- return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), h("div", { id: "file-list" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "file-item" }, h("ezp-label", { level: "tertiary", text: file.name }), h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: () => this.removeFile(index) })))))))))));
34410
+ return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), h("div", { id: "file-list" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "file-item" }, h("div", { class: "file-name" }, h("ezp-label", { level: "tertiary", text: file.name })), h("div", { class: "file-remove" }, h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: (event) => this.removeFile(event, index) }))))))))))));
34401
34411
  }
34402
34412
  static get style() { return ezpUploadCss; }
34403
34413
  };
@@ -34292,7 +34292,7 @@ let EzpTextButton = class {
34292
34292
  };
34293
34293
  EzpTextButton.style = ezpTextButtonCss;
34294
34294
 
34295
- const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);width:100%}.file-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2);background:var(--ezp-core-background-secondary);border-radius:3px}.file-item ezp-label{-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item ezp-icon-button{-ms-flex-negative:0;flex-shrink:0}";
34295
+ const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:35vh;overflow-y:auto}.file-item{display:grid;grid-template-columns:1fr auto;-ms-flex-align:center;align-items:center;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);background:var(--ezp-core-background-secondary);border-radius:3px;min-height:32px}.file-name{grid-column:1;min-width:0}.file-name ezp-label{--ezp-label-minWidth:0}.file-remove{grid-column:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";
34296
34296
 
34297
34297
  let EzpUpload = class {
34298
34298
  constructor(hostRef) {
@@ -34315,10 +34315,20 @@ let EzpUpload = class {
34315
34315
  // Add new files to existing selection instead of replacing
34316
34316
  this.selectedFiles = [...this.selectedFiles, ...files];
34317
34317
  this.uploadFile.emit(this.selectedFiles);
34318
+ // Reset the input so the same file can be selected again
34319
+ if (this.input) {
34320
+ this.input.value = '';
34321
+ }
34318
34322
  };
34319
- this.removeFile = (index) => {
34323
+ this.removeFile = (event, index) => {
34324
+ event.preventDefault();
34325
+ event.stopPropagation();
34320
34326
  this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
34321
34327
  this.uploadFile.emit(this.selectedFiles);
34328
+ // Reset the input so it's ready for new selections
34329
+ if (this.input) {
34330
+ this.input.value = '';
34331
+ }
34322
34332
  };
34323
34333
  }
34324
34334
  /**
@@ -34356,7 +34366,7 @@ let EzpUpload = class {
34356
34366
  *
34357
34367
  */
34358
34368
  render() {
34359
- return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), h("div", { id: "file-list" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "file-item" }, h("ezp-label", { level: "tertiary", text: file.name }), h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: () => this.removeFile(index) })))))))))));
34369
+ return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), h("div", { id: "file-list" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "file-item" }, h("div", { class: "file-name" }, h("ezp-label", { level: "tertiary", text: file.name })), h("div", { class: "file-remove" }, h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: (event) => this.removeFile(event, index) }))))))))))));
34360
34370
  }
34361
34371
  };
34362
34372
  EzpUpload.style = ezpUploadCss;