hamzus-ui 0.0.86 → 0.0.88

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.88",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -254,7 +254,7 @@
254
254
  >
255
255
  <slot name="trigger" />
256
256
  </div>
257
- <Portal disabled={!display} target="body">
257
+ <Portal disabled={!display && !exit} target="body">
258
258
  <content-container bind:this={contentContainer}>
259
259
  <content
260
260
  bind:this={content}
@@ -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}