sveltekit-ui 1.0.37 → 1.0.39

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.
@@ -9,7 +9,6 @@
9
9
  import FileInput from "../FileInput/index.svelte"
10
10
  import TextInput from "../TextInput/index.svelte"
11
11
  import Dropdown from "../Dropdown/index.svelte"
12
- import TimeInput from "../TimeInput/index.svelte"
13
12
  import StoragePicker from "../StoragePicker/index.svelte"
14
13
 
15
14
  let { manager, extra_buttons } = $props()
@@ -3,13 +3,13 @@
3
3
  import Image from "../../Image/index.svelte"
4
4
  import Icon from "../../Icon/index.svelte"
5
5
 
6
- let { input } = $props()
6
+ let { manager } = $props()
7
7
  </script>
8
8
 
9
- {#if ["audio/mpeg"].includes(input?.mime_type)}
10
- <Audio manager={input?.manager} />
11
- {:else if ["image/webp", "image/jpeg", "image/png", "image/gif"].includes(input?.mime_type)}
12
- <Image manager={input?.manager} />
13
- {:else if input && Object.keys(input || {}).length > 0}
9
+ {#if ["audio/mpeg"].includes(manager?.mime_type)}
10
+ <Audio manager={manager?.manager} />
11
+ {:else if ["image/webp", "image/jpeg", "image/png", "image/gif", "image/svg+xml"].includes(manager?.mime_type)}
12
+ <Image manager={manager?.manager} />
13
+ {:else if manager && Object.keys(manager || {}).length > 0}
14
14
  <Icon manager={manager?.file_icon_manager} />
15
15
  {/if}
@@ -9,27 +9,22 @@
9
9
  let { manager } = $props()
10
10
  </script>
11
11
 
12
- {#snippet display_val(input)}
13
- {#if Array.isArray(input) && input.length > 0}
14
- {#each input as input_item}
15
- <div style="display: flex; gap: 1rem; align-items: center;">
16
- <p>{input_item?.file_name}</p>
17
- <p style="color: var(--g10-t); font-size: 1.2rem;">{input_item?.mime_type}</p>
18
- </div>
19
- <DisplayFile input={input_item} />
20
- {/each}
21
- {:else}
22
- {@render display_file(input)}
23
- {/if}
24
- {/snippet}
25
-
26
12
  <div style="margin-top: {manager?.mt}rem; margin-bottom: {manager?.mb}rem;">
27
13
  {#if manager?.is_show_button}
28
14
  <Button manager={manager?.select_file_from_storage_button_manager} />
29
15
  {/if}
30
16
  {#if manager?.is_show_content}
31
17
  <div style="margin-top: 1rem;">
32
- <DisplayFile input={manager?.display_file} />
18
+ {#if Array.isArray(manager?.display_file) && manager?.display_file.length > 0}
19
+ {#each manager?.display_file as input_item}
20
+ <div style="display: flex; gap: 1rem; align-items: center;">
21
+ <p>{input_item?.file_name}</p>
22
+ <p style="color: var(--g10-t); font-size: 1.2rem;">{input_item?.mime_type}</p>
23
+ </div>
24
+ <DisplayFile manager={input_item} />
25
+ {/each}
26
+ {:else}<DisplayFile manager={manager?.display_file} />
27
+ {/if}
33
28
  </div>
34
29
  {/if}
35
30
  <Popover manager={manager?.popover_manager}>
@@ -46,7 +41,7 @@
46
41
  <div class="file_container">
47
42
  <div>
48
43
  <div class="file_display" style="height: {manager?.display_height}rem;">
49
- <DisplayFile input={locally_uploaded_file_prepped} />
44
+ <DisplayFile manager={locally_uploaded_file_prepped} />
50
45
  </div>
51
46
  <div class="file_det">
52
47
  <p>{locally_uploaded_file_prepped?.file?.type}</p>
@@ -85,7 +80,7 @@
85
80
  <div class="file_container">
86
81
  <div>
87
82
  <div style="height: 20rem;">
88
- <DisplayFile input={storage_file_prepped} />
83
+ <DisplayFile manager={storage_file_prepped} />
89
84
  </div>
90
85
  <div class="file_det">
91
86
  <p>{storage_file_prepped?.mime_type}</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltekit-ui",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "description": "A SvelteKit UI component library for building modern web applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,6 @@
9
9
  import FileInput from "$lib/Components/FileInput/index.svelte"
10
10
  import TextInput from "$lib/Components/TextInput/index.svelte"
11
11
  import Dropdown from "$lib/Components/Dropdown/index.svelte"
12
- import TimeInput from "$lib/Components/TimeInput/index.svelte"
13
12
  import StoragePicker from "$lib/Components/StoragePicker/index.svelte"
14
13
 
15
14
  let { manager, extra_buttons } = $props()
@@ -3,13 +3,13 @@
3
3
  import Image from "$lib/Components/Image/index.svelte"
4
4
  import Icon from "$lib/Components/Icon/index.svelte"
5
5
 
6
- let { input } = $props()
6
+ let { manager } = $props()
7
7
  </script>
8
8
 
9
- {#if ["audio/mpeg"].includes(input?.mime_type)}
10
- <Audio manager={input?.manager} />
11
- {:else if ["image/webp", "image/jpeg", "image/png", "image/gif"].includes(input?.mime_type)}
12
- <Image manager={input?.manager} />
13
- {:else if input && Object.keys(input || {}).length > 0}
9
+ {#if ["audio/mpeg"].includes(manager?.mime_type)}
10
+ <Audio manager={manager?.manager} />
11
+ {:else if ["image/webp", "image/jpeg", "image/png", "image/gif", "image/svg+xml"].includes(manager?.mime_type)}
12
+ <Image manager={manager?.manager} />
13
+ {:else if manager && Object.keys(manager || {}).length > 0}
14
14
  <Icon manager={manager?.file_icon_manager} />
15
15
  {/if}
@@ -9,27 +9,22 @@
9
9
  let { manager } = $props()
10
10
  </script>
11
11
 
12
- {#snippet display_val(input)}
13
- {#if Array.isArray(input) && input.length > 0}
14
- {#each input as input_item}
15
- <div style="display: flex; gap: 1rem; align-items: center;">
16
- <p>{input_item?.file_name}</p>
17
- <p style="color: var(--g10-t); font-size: 1.2rem;">{input_item?.mime_type}</p>
18
- </div>
19
- <DisplayFile input={input_item} />
20
- {/each}
21
- {:else}
22
- {@render display_file(input)}
23
- {/if}
24
- {/snippet}
25
-
26
12
  <div style="margin-top: {manager?.mt}rem; margin-bottom: {manager?.mb}rem;">
27
13
  {#if manager?.is_show_button}
28
14
  <Button manager={manager?.select_file_from_storage_button_manager} />
29
15
  {/if}
30
16
  {#if manager?.is_show_content}
31
17
  <div style="margin-top: 1rem;">
32
- <DisplayFile input={manager?.display_file} />
18
+ {#if Array.isArray(manager?.display_file) && manager?.display_file.length > 0}
19
+ {#each manager?.display_file as input_item}
20
+ <div style="display: flex; gap: 1rem; align-items: center;">
21
+ <p>{input_item?.file_name}</p>
22
+ <p style="color: var(--g10-t); font-size: 1.2rem;">{input_item?.mime_type}</p>
23
+ </div>
24
+ <DisplayFile manager={input_item} />
25
+ {/each}
26
+ {:else}<DisplayFile manager={manager?.display_file} />
27
+ {/if}
33
28
  </div>
34
29
  {/if}
35
30
  <Popover manager={manager?.popover_manager}>
@@ -46,7 +41,7 @@
46
41
  <div class="file_container">
47
42
  <div>
48
43
  <div class="file_display" style="height: {manager?.display_height}rem;">
49
- <DisplayFile input={locally_uploaded_file_prepped} />
44
+ <DisplayFile manager={locally_uploaded_file_prepped} />
50
45
  </div>
51
46
  <div class="file_det">
52
47
  <p>{locally_uploaded_file_prepped?.file?.type}</p>
@@ -85,7 +80,7 @@
85
80
  <div class="file_container">
86
81
  <div>
87
82
  <div style="height: 20rem;">
88
- <DisplayFile input={storage_file_prepped} />
83
+ <DisplayFile manager={storage_file_prepped} />
89
84
  </div>
90
85
  <div class="file_det">
91
86
  <p>{storage_file_prepped?.mime_type}</p>