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