fuma 2.0.9 → 2.0.11
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 +17 -13
- package/dist/ui/icon/Icon.svelte.d.ts +2 -1
- package/dist/ui/input/InputRelation.svelte +3 -2
- package/dist/ui/input/InputRelation.svelte.d.ts +3 -2
- package/dist/ui/input/InputRelations.svelte +5 -4
- package/dist/ui/input/InputRelations.svelte.d.ts +3 -2
- package/dist/utils/options.d.ts +2 -1
- package/package.json +1 -1
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;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { FormControl, SelectorList } from './index.js'
|
|
12
12
|
import type { TippyProps } from '../../utils/tippy.js'
|
|
13
13
|
import RelationAfter from './RelationAfter.svelte'
|
|
14
|
+
import type { SnippetLike } from '../table/type.js'
|
|
14
15
|
|
|
15
16
|
export let key = Math.random().toString()
|
|
16
17
|
export let label = ''
|
|
@@ -26,8 +27,8 @@
|
|
|
26
27
|
export let dropdownProps: ComponentProps<DropDown> = {}
|
|
27
28
|
export let flatMode = false
|
|
28
29
|
export let noSlotItemWrapper = false
|
|
29
|
-
export let slotItem:
|
|
30
|
-
export let slotSuggestion:
|
|
30
|
+
export let slotItem: SnippetLike<[RelationItem]>
|
|
31
|
+
export let slotSuggestion: SnippetLike<[RelationItem]> = slotItem
|
|
31
32
|
export let input: HTMLInputAttributes | undefined = undefined
|
|
32
33
|
export let append: Snippet | undefined = undefined
|
|
33
34
|
|
|
@@ -2,6 +2,7 @@ import { type ComponentProps, type Snippet } from 'svelte';
|
|
|
2
2
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
3
|
import { DropDown } from '../menu/index.js';
|
|
4
4
|
import type { TippyProps } from '../../utils/tippy.js';
|
|
5
|
+
import type { SnippetLike } from '../table/type.js';
|
|
5
6
|
declare class __sveltets_Render<RelationItem extends {
|
|
6
7
|
id: string | number;
|
|
7
8
|
}> {
|
|
@@ -19,8 +20,8 @@ declare class __sveltets_Render<RelationItem extends {
|
|
|
19
20
|
dropdownProps?: ComponentProps<DropDown>;
|
|
20
21
|
flatMode?: boolean;
|
|
21
22
|
noSlotItemWrapper?: boolean;
|
|
22
|
-
slotItem:
|
|
23
|
-
slotSuggestion?:
|
|
23
|
+
slotItem: SnippetLike<[RelationItem]>;
|
|
24
|
+
slotSuggestion?: SnippetLike<[RelationItem]> | undefined;
|
|
24
25
|
input?: HTMLInputAttributes | undefined;
|
|
25
26
|
append?: Snippet | undefined;
|
|
26
27
|
class?: string;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { FormControl, SelectorList } from './index.js'
|
|
13
13
|
import { DropDown } from '../menu/index.js'
|
|
14
14
|
import RelationAfter from './RelationAfter.svelte'
|
|
15
|
+
import type { SnippetLike } from '../table/type.js'
|
|
15
16
|
|
|
16
17
|
export let key = ''
|
|
17
18
|
export let label = ''
|
|
@@ -22,8 +23,8 @@
|
|
|
22
23
|
export let error = ''
|
|
23
24
|
export let placeholder = ''
|
|
24
25
|
export let flatMode = false
|
|
25
|
-
export let slotItem:
|
|
26
|
-
export let slotSuggestion:
|
|
26
|
+
export let slotItem: SnippetLike<[RelationItem]>
|
|
27
|
+
export let slotSuggestion: SnippetLike<[RelationItem]> = slotItem
|
|
27
28
|
export let input: HTMLInputAttributes | undefined = undefined
|
|
28
29
|
export let append: Snippet | undefined = undefined
|
|
29
30
|
|
|
@@ -102,11 +103,11 @@
|
|
|
102
103
|
{#each items || [] as item, index (item.id)}
|
|
103
104
|
<div
|
|
104
105
|
transition:slide|local={{ axis: 'x', duration: 200 }}
|
|
105
|
-
class="badge badge-outline badge-lg items-center
|
|
106
|
+
class="badge badge-outline badge-lg items-center pr-0 text-right whitespace-nowrap"
|
|
106
107
|
>
|
|
107
108
|
{@render slotItem(item)}
|
|
108
109
|
<div
|
|
109
|
-
class="btn btn-circle btn-ghost btn-xs
|
|
110
|
+
class="btn btn-circle btn-ghost btn-xs mr-[2px] ml-1 h-[18px] min-h-[18px] w-[18px]"
|
|
110
111
|
role="button"
|
|
111
112
|
tabindex="0"
|
|
112
113
|
on:click={() => remove(index)}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
2
|
import { type Snippet } from 'svelte';
|
|
3
|
+
import type { SnippetLike } from '../table/type.js';
|
|
3
4
|
declare class __sveltets_Render<RelationItem extends {
|
|
4
5
|
id: string | number;
|
|
5
6
|
}> {
|
|
@@ -13,8 +14,8 @@ declare class __sveltets_Render<RelationItem extends {
|
|
|
13
14
|
error?: string;
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
flatMode?: boolean;
|
|
16
|
-
slotItem:
|
|
17
|
-
slotSuggestion?:
|
|
17
|
+
slotItem: SnippetLike<[RelationItem]>;
|
|
18
|
+
slotSuggestion?: SnippetLike<[RelationItem]> | undefined;
|
|
18
19
|
input?: HTMLInputAttributes | undefined;
|
|
19
20
|
append?: Snippet | undefined;
|
|
20
21
|
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>;
|