@getmicdrop/svelte-components 5.1.2 → 5.1.3
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.
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
let className = "";
|
|
34
34
|
export { className as class };
|
|
35
35
|
|
|
36
|
-
// Check if children is a Svelte 5 snippet (function) or a string
|
|
37
|
-
$: isSnippet = typeof children === 'function';
|
|
38
36
|
|
|
39
37
|
// Legacy variant name mapping
|
|
40
38
|
const variantMap = {
|
|
@@ -133,7 +131,7 @@
|
|
|
133
131
|
{...$$restProps}
|
|
134
132
|
>
|
|
135
133
|
<span class="inline-flex items-center gap-1.5" class:invisible={loading || success}>
|
|
136
|
-
{#if
|
|
134
|
+
{#if typeof children === 'function'}{@render children()}{:else if children}{children}{/if}
|
|
137
135
|
</span>
|
|
138
136
|
{#if loading}
|
|
139
137
|
<span class="absolute inset-0 flex items-center justify-center">
|
|
@@ -149,7 +147,7 @@
|
|
|
149
147
|
{...$$restProps}
|
|
150
148
|
>
|
|
151
149
|
<span class="inline-flex items-center gap-1.5" class:invisible={loading || success}>
|
|
152
|
-
{#if
|
|
150
|
+
{#if typeof children === 'function'}{@render children()}{:else if children}{children}{/if}
|
|
153
151
|
</span>
|
|
154
152
|
{#if loading}
|
|
155
153
|
<span class="absolute inset-0 flex items-center justify-center">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default Button;
|
|
2
|
-
type Button = SvelteComponent
|
|
2
|
+
type Button = SvelteComponent<{
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
class?: string | undefined;
|
|
5
5
|
size?: string | undefined;
|
|
@@ -12,17 +12,13 @@ type Button = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
|
12
12
|
href?: null | undefined;
|
|
13
13
|
children?: string | Function | undefined;
|
|
14
14
|
}, {
|
|
15
|
-
default: {};
|
|
16
|
-
}>, {
|
|
17
15
|
click: PointerEvent;
|
|
18
16
|
} & {
|
|
19
17
|
[evt: string]: CustomEvent<any>;
|
|
20
|
-
}, {
|
|
21
|
-
default: {};
|
|
22
|
-
}> & {
|
|
18
|
+
}, {}> & {
|
|
23
19
|
$$bindings?: string | undefined;
|
|
24
20
|
};
|
|
25
|
-
declare const Button: $$__sveltets_2_IsomorphicComponent
|
|
21
|
+
declare const Button: $$__sveltets_2_IsomorphicComponent<{
|
|
26
22
|
[x: string]: any;
|
|
27
23
|
class?: string | undefined;
|
|
28
24
|
size?: string | undefined;
|
|
@@ -35,19 +31,10 @@ declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWit
|
|
|
35
31
|
href?: null | undefined;
|
|
36
32
|
children?: string | Function | undefined;
|
|
37
33
|
}, {
|
|
38
|
-
default: {};
|
|
39
|
-
}>, {
|
|
40
34
|
click: PointerEvent;
|
|
41
35
|
} & {
|
|
42
36
|
[evt: string]: CustomEvent<any>;
|
|
43
|
-
}, {
|
|
44
|
-
default: {};
|
|
45
|
-
}, {}, string>;
|
|
46
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
47
|
-
default: any;
|
|
48
|
-
} ? Props extends Record<string, never> ? any : {
|
|
49
|
-
children?: any;
|
|
50
|
-
} : {});
|
|
37
|
+
}, {}, {}, string>;
|
|
51
38
|
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> {
|
|
52
39
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
53
40
|
$$bindings?: Bindings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Button/Button.svelte.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Button/Button.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA8KA;;;;;;;;;;;;;;;;mBAA+N;6CATlL,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,OAAO,OAAO,QAAQ;IAC3L,cAAc,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,WAAW,OAAO,SAAS,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,eAAe,QAAQ,CAAC"}
|