@lobb-js/studio 0.11.0 → 0.11.1

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.
@@ -2,6 +2,7 @@
2
2
  import { calculateDrawerWidth } from "../utils";
3
3
  import type { Snippet } from "svelte";
4
4
  import { fade, fly } from "svelte/transition";
5
+ import Portal from "svelte-portal";
5
6
 
6
7
  interface Props {
7
8
  children?: Snippet<[]>;
@@ -11,18 +12,20 @@
11
12
  let { onHide, children }: Props = $props();
12
13
  </script>
13
14
 
14
- <button
15
- transition:fade={{ duration: 250 }}
16
- onclick={() => onHide?.()}
17
- class="backgroundDrawerButton fixed left-0 top-0 z-30 h-screen w-screen bg-background opacity-50 cursor-default"
18
- aria-label="background used to hide the background"
19
- ></button>
15
+ <Portal target="body">
16
+ <button
17
+ transition:fade={{ duration: 250 }}
18
+ onclick={() => onHide?.()}
19
+ class="backgroundDrawerButton fixed left-0 top-0 z-40 h-screen w-screen bg-background opacity-50 cursor-default"
20
+ aria-label="background used to hide the background"
21
+ ></button>
20
22
 
21
- <!-- the drawer -->
22
- <div
23
- transition:fly={{ x: "100%", duration: 250 }}
24
- class="fixed right-0 top-0 z-30 flex h-full w-full flex-col border-l bg-background"
25
- style="max-width: {calculateDrawerWidth()}px;"
26
- >
27
- {@render children?.()}
28
- </div>
23
+ <!-- the drawer -->
24
+ <div
25
+ transition:fly={{ x: "100%", duration: 250 }}
26
+ class="fixed right-0 top-0 z-40 flex h-full w-full flex-col border-l bg-background"
27
+ style="max-width: {calculateDrawerWidth()}px;"
28
+ >
29
+ {@render children?.()}
30
+ </div>
31
+ </Portal>
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@lobb-js/studio",
3
- "version": "0.11.0",
3
+ "license": "UNLICENSED",
4
+ "version": "0.11.1",
4
5
  "type": "module",
5
6
  "publishConfig": {
6
7
  "access": "public"
@@ -41,7 +42,7 @@
41
42
  "postpublish": "./scripts/postpublish.sh"
42
43
  },
43
44
  "devDependencies": {
44
- "@lobb-js/core": "^0.17.0",
45
+ "@lobb-js/core": "^0.18.0",
45
46
  "@chromatic-com/storybook": "^4.1.2",
46
47
  "@storybook/addon-a11y": "^10.0.1",
47
48
  "@storybook/addon-docs": "^10.0.1",
@@ -107,6 +108,7 @@
107
108
  "mode-watcher": "^0.5.1",
108
109
  "mustache": "^4.2.0",
109
110
  "qs": "^6.14.1",
111
+ "svelte-portal": "^2.2.1",
110
112
  "svelte-sonner": "^0.3.28",
111
113
  "tailwind-merge": "^3.4.0",
112
114
  "tailwind-variants": "^3.2.2"
@@ -2,6 +2,7 @@
2
2
  import { calculateDrawerWidth } from "../utils";
3
3
  import type { Snippet } from "svelte";
4
4
  import { fade, fly } from "svelte/transition";
5
+ import Portal from "svelte-portal";
5
6
 
6
7
  interface Props {
7
8
  children?: Snippet<[]>;
@@ -11,18 +12,20 @@
11
12
  let { onHide, children }: Props = $props();
12
13
  </script>
13
14
 
14
- <button
15
- transition:fade={{ duration: 250 }}
16
- onclick={() => onHide?.()}
17
- class="backgroundDrawerButton fixed left-0 top-0 z-30 h-screen w-screen bg-background opacity-50 cursor-default"
18
- aria-label="background used to hide the background"
19
- ></button>
15
+ <Portal target="body">
16
+ <button
17
+ transition:fade={{ duration: 250 }}
18
+ onclick={() => onHide?.()}
19
+ class="backgroundDrawerButton fixed left-0 top-0 z-40 h-screen w-screen bg-background opacity-50 cursor-default"
20
+ aria-label="background used to hide the background"
21
+ ></button>
20
22
 
21
- <!-- the drawer -->
22
- <div
23
- transition:fly={{ x: "100%", duration: 250 }}
24
- class="fixed right-0 top-0 z-30 flex h-full w-full flex-col border-l bg-background"
25
- style="max-width: {calculateDrawerWidth()}px;"
26
- >
27
- {@render children?.()}
28
- </div>
23
+ <!-- the drawer -->
24
+ <div
25
+ transition:fly={{ x: "100%", duration: 250 }}
26
+ class="fixed right-0 top-0 z-40 flex h-full w-full flex-col border-l bg-background"
27
+ style="max-width: {calculateDrawerWidth()}px;"
28
+ >
29
+ {@render children?.()}
30
+ </div>
31
+ </Portal>