@functionalcms/svelte-components 4.7.3 → 4.7.5

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.
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { cn } from '../../utils.js';
3
3
  import type { Snippet } from 'svelte';
4
+ import type { EventHandler } from 'svelte/elements';
4
5
 
5
6
  interface Props {
6
7
  children: Snippet;
@@ -26,8 +27,8 @@
26
27
  ariaControls?: string;
27
28
  tabIndex?: number;
28
29
  ariaLabel: string;
29
- click?: () => void;
30
- keydown?: (e: KeyboardEvent) => void;
30
+ click?: (event: MouseEvent) => void;
31
+ keydown?: (event: KeyboardEvent) => void;
31
32
  }
32
33
 
33
34
  let {
@@ -76,7 +77,6 @@
76
77
  css ? `${css}` : ''
77
78
  )
78
79
  );
79
-
80
80
  </script>
81
81
 
82
82
  {#if type == 'link'}
@@ -23,8 +23,8 @@ declare const Button: import("svelte").Component<Partial<{
23
23
  ariaControls?: string;
24
24
  tabIndex?: number;
25
25
  ariaLabel: string;
26
- click?: () => void;
27
- keydown?: (e: KeyboardEvent) => void;
26
+ click?: (event: MouseEvent) => void;
27
+ keydown?: (event: KeyboardEvent) => void;
28
28
  }>, {}, "">;
29
29
  type Button = ReturnType<typeof Button>;
30
30
  export default Button;
@@ -30,7 +30,11 @@
30
30
  placeholder: string;
31
31
 
32
32
  type: Type;
33
- value: string;
33
+
34
+ maxLength: number | undefined;
35
+ minLength: number | undefined;
36
+
37
+ value: string | any;
34
38
  addonLeft: Snippet;
35
39
  addonRight: Snippet;
36
40
  }
@@ -20,7 +20,9 @@ declare const Input: import("svelte").Component<Partial<{
20
20
  css: string;
21
21
  placeholder: string;
22
22
  type: Type;
23
- value: string;
23
+ maxLength: number | undefined;
24
+ minLength: number | undefined;
25
+ value: string | any;
24
26
  addonLeft: Snippet;
25
27
  addonRight: Snippet;
26
28
  }>, {}, "">;
@@ -39,7 +39,7 @@
39
39
  </script>
40
40
 
41
41
  <div class={css?.container}>
42
- <Button type="button" isPrimary css={buttonCss} click={() => toggleDrawer()}>
42
+ <Button type="button" isPrimary css={buttonCss} click={(event:any) => toggleDrawer()}>
43
43
  {@render buttonText?.()}
44
44
  </Button>
45
45
 
@@ -0,0 +1,10 @@
1
+ <script type='ts'>
2
+ interface Props {
3
+ children: Snippet;
4
+ }
5
+ let { children } = $props();
6
+ let dialog: any;
7
+ </script>
8
+ <dialog bind:this={dialog} on:close>
9
+ {@render children?.()}
10
+ </dialog>
@@ -0,0 +1,31 @@
1
+ export default Dialog;
2
+ type Dialog = SvelteComponent<$$ComponentProps, {
3
+ close: Event;
4
+ } & {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: "" | undefined;
8
+ };
9
+ declare const Dialog: $$__sveltets_2_IsomorphicComponent<{
10
+ children: any;
11
+ }, {
12
+ close: Event;
13
+ } & {
14
+ [evt: string]: CustomEvent<any>;
15
+ }, {}, {}, "">;
16
+ type $$ComponentProps = {
17
+ children: any;
18
+ };
19
+ 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> {
20
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
21
+ $$bindings?: Bindings;
22
+ } & Exports;
23
+ (internal: unknown, props: Props & {
24
+ $$events?: Events;
25
+ $$slots?: Slots;
26
+ }): Exports & {
27
+ $set?: any;
28
+ $on?: any;
29
+ };
30
+ z_$$bindings?: Bindings;
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "4.7.3",
3
+ "version": "4.7.5",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [