hamzus-ui 0.0.86 → 0.0.87

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamzus-ui",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -9,6 +9,7 @@
9
9
  export let buttonLabel = 'ajouter un fichier';
10
10
  export let multiple = false;
11
11
  export let name = 'file';
12
+ export let acceptLabel = null;
12
13
  export let accept = null;
13
14
  export let required = false;
14
15
  export let actualFiles = '';
@@ -69,8 +70,8 @@
69
70
  {#if required}
70
71
  <strong style="color:var(--red);">*</strong>
71
72
  {/if}
72
- {#if accept && acceptText[accept]}
73
- <strong style="color:var(--accent);">{acceptText[accept]}</strong>
73
+ {#if (accept && acceptText[accept]) || acceptLabel != null}
74
+ <strong style="color:var(--accent);">{acceptText[accept] ?? acceptLabel}</strong>
74
75
  {/if}
75
76
  </h4>
76
77
 
@@ -89,7 +90,7 @@
89
90
  {multiple}
90
91
  required={actualFiles.length > 0 ? false : required}
91
92
  on:change={handleFileChange}
92
- accept={acceptData[accept]}
93
+ accept={acceptData[accept] ?? accept}
93
94
  />
94
95
 
95
96
  {#if files.length > 0}