@hashrytech/quick-components-kit 0.8.0 → 0.8.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @hashrytech/quick-components-kit
2
2
 
3
+ ## 0.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: fixing type for onclick overlay
8
+
9
+ ## 0.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - fix: Adding close func property
14
+
3
15
  ## 0.8.0
4
16
 
5
17
  ### Minor Changes
@@ -14,12 +14,13 @@
14
14
  overlayClasses?: string;
15
15
  children?: Snippet;
16
16
  class?: ClassNameValue;
17
+ onclick?: (event: MouseEvent) => void;
17
18
  };
18
19
 
19
20
  </script>
20
21
 
21
22
  <script lang="ts">
22
- let {open=$bindable(false), escapeKeyClose=true, disableBodyScroll=true, overlayTransitionDuration=0, ariaLabel="Modal", overlayClasses="", children, ...props}: OverlayProps = $props();
23
+ let {open=$bindable(false), escapeKeyClose=true, disableBodyScroll=true, overlayTransitionDuration=0, ariaLabel="Modal", overlayClasses="", onclick, children, ...props}: OverlayProps = $props();
23
24
 
24
25
  const lockScroll = () => document.body.style.overflow = 'hidden';
25
26
  const unlockScroll = () => document.body.style.overflow = '';
@@ -53,6 +54,6 @@
53
54
  </script>
54
55
 
55
56
  {#if open}
56
- <div transition:fade={{duration: overlayTransitionDuration}} class={twMerge("fixed inset-0 bg-overlay-primary", overlayClasses)} role="presentation" onclick={() => open = false}></div>
57
+ <div transition:fade={{duration: overlayTransitionDuration}} class={twMerge("fixed inset-0 bg-overlay-primary", overlayClasses)} role="presentation" {onclick}></div>
57
58
  {/if}
58
59
 
@@ -9,6 +9,7 @@ export type OverlayProps = {
9
9
  overlayClasses?: string;
10
10
  children?: Snippet;
11
11
  class?: ClassNameValue;
12
+ onclick?: (event: MouseEvent) => void;
12
13
  };
13
14
  declare const Overlay: import("svelte").Component<OverlayProps, {
14
15
  closeOverlay: () => void;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hashrytech/quick-components-kit.git"
7
7
  },
8
- "version": "0.8.0",
8
+ "version": "0.8.2",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [