fuma 2.0.9 → 2.0.10
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/dist/ui/icon/Icon.svelte
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { tippy, type TippyProps, type TippyInstance } from '../../utils/tippy.js'
|
|
3
|
-
import { onMount } from 'svelte'
|
|
3
|
+
import { onMount, type Snippet } from 'svelte'
|
|
4
4
|
|
|
5
|
-
export let path: string
|
|
5
|
+
export let path: string | Snippet
|
|
6
6
|
export let title = ''
|
|
7
7
|
export let size = 22
|
|
8
8
|
let klass = ''
|
|
@@ -35,15 +35,19 @@
|
|
|
35
35
|
})
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
|
-
<i bind:this={icon} class="grid place-content-center
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
<i bind:this={icon} class="fill-base-content grid place-content-center {klass}" {style}>
|
|
39
|
+
{#if typeof path === 'string'}
|
|
40
|
+
<svg
|
|
41
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
42
|
+
width={size}
|
|
43
|
+
height={size}
|
|
44
|
+
viewBox={`0 0 ${viewWidth} ${viewHeight}`}
|
|
45
|
+
style="display: inline-block;"
|
|
46
|
+
class={classSVG}
|
|
47
|
+
>
|
|
48
|
+
<path d={path} />
|
|
49
|
+
</svg>
|
|
50
|
+
{:else}
|
|
51
|
+
{@render path()}
|
|
52
|
+
{/if}
|
|
49
53
|
</i>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type TippyProps } from '../../utils/tippy.js';
|
|
2
|
+
import { type Snippet } from 'svelte';
|
|
2
3
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
4
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
5
|
$$bindings?: Bindings;
|
|
@@ -13,7 +14,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
14
|
z_$$bindings?: Bindings;
|
|
14
15
|
}
|
|
15
16
|
declare const Icon: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
path: string;
|
|
17
|
+
path: string | Snippet;
|
|
17
18
|
title?: string;
|
|
18
19
|
size?: number;
|
|
19
20
|
class?: string;
|
package/dist/utils/options.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
1
2
|
export type Option = {
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
4
|
-
icon?: string;
|
|
5
|
+
icon?: string | Snippet;
|
|
5
6
|
};
|
|
6
7
|
export type OptionRecord<Values extends string> = Record<Values, Omit<Option, 'value'>>;
|
|
7
8
|
export type Options = string | string[] | Option[] | Record<string, string> | OptionRecord<string>;
|