noph-ui 0.7.3 → 0.7.4

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,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { enhance } from '$app/forms'
2
3
  import Divider from '../divider/Divider.svelte'
3
4
  import type { DialogProps } from './types.ts'
4
5
 
@@ -12,6 +13,7 @@
12
13
  supportingText,
13
14
  buttons,
14
15
  divider,
16
+ enhanceFn,
15
17
  ...attributes
16
18
  }: DialogProps = $props()
17
19
 
@@ -24,7 +26,14 @@
24
26
  }
25
27
  </script>
26
28
 
27
- <form bind:this={element} class="np-dialog" popover="auto" role="dialog" {...attributes}>
29
+ <form
30
+ use:enhance={enhanceFn}
31
+ bind:this={element}
32
+ class="np-dialog"
33
+ popover="auto"
34
+ role="dialog"
35
+ {...attributes}
36
+ >
28
37
  {#if icon}
29
38
  <div class="np-dialog-icon">
30
39
  {@render icon()}
@@ -9,4 +9,5 @@ export interface DialogProps extends Omit<HTMLFormAttributes, 'class' | 'popover
9
9
  element?: HTMLElement;
10
10
  showPopover?: () => void;
11
11
  hidePopover?: () => void;
12
+ enhanceFn?: () => any;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "license": "MIT",
5
5
  "homepage": "https://noph.dev",
6
6
  "repository": {