@ims360/svelte-ivory 0.0.32 → 0.0.33

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.
@@ -5,6 +5,7 @@
5
5
  import type { Snippet } from 'svelte';
6
6
  import { fly } from 'svelte/transition';
7
7
  import { twMerge } from 'tailwind-merge';
8
+ import { Portal } from '..';
8
9
  import Heading from '../heading';
9
10
  import HiddenBackground from '../hiddenBackground';
10
11
 
@@ -35,31 +36,33 @@
35
36
  </script>
36
37
 
37
38
  {#if b_open}
38
- <HiddenBackground {onclose}>
39
- <!-- svelte-ignore a11y_click_events_have_key_events -->
40
- <!-- svelte-ignore a11y_no_static_element_interactions -->
41
- <div
42
- class={twMerge(
43
- clsx([
44
- 'bg-surface-50-950 absolute top-0 flex h-full flex-col gap-4 p-4',
45
- placement === 'left' && 'left-0',
46
- placement === 'right' && 'right-0',
47
- clazz
48
- ])
49
- )}
50
- transition:fly={{ x: placement === 'right' ? '100%' : '-100%', duration: 200 }}
51
- onclick={(e) => e.stopPropagation()}
52
- {...rest}
53
- >
54
- <div class="flex flex-row items-center justify-between gap-8">
55
- {#if title}
56
- <Heading>{title}</Heading>
57
- {/if}
58
- <button class="group ml-auto flex justify-end" type="button" onclick={onclose}>
59
- <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
60
- </button>
39
+ <Portal>
40
+ <HiddenBackground {onclose}>
41
+ <!-- svelte-ignore a11y_click_events_have_key_events -->
42
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
43
+ <div
44
+ class={twMerge(
45
+ clsx([
46
+ 'bg-surface-50-950 absolute top-0 flex h-full flex-col gap-4 p-4',
47
+ placement === 'left' && 'left-0',
48
+ placement === 'right' && 'right-0',
49
+ clazz
50
+ ])
51
+ )}
52
+ transition:fly={{ x: placement === 'right' ? '100%' : '-100%', duration: 200 }}
53
+ onclick={(e) => e.stopPropagation()}
54
+ {...rest}
55
+ >
56
+ <div class="flex flex-row items-center justify-between gap-8">
57
+ {#if title}
58
+ <Heading>{title}</Heading>
59
+ {/if}
60
+ <button class="group ml-auto flex justify-end" type="button" onclick={onclose}>
61
+ <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
62
+ </button>
63
+ </div>
64
+ {@render children()}
61
65
  </div>
62
- {@render children()}
63
- </div>
64
- </HiddenBackground>
66
+ </HiddenBackground>
67
+ </Portal>
65
68
  {/if}
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAMtC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC/B;AA8CL,QAAA,MAAM,MAAM,uDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAOtC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC/B;AAgDL,QAAA,MAAM,MAAM,uDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ims360/svelte-ivory",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "keywords": [
5
5
  "svelte"
6
6
  ],
@@ -5,6 +5,7 @@
5
5
  import type { Snippet } from 'svelte';
6
6
  import { fly } from 'svelte/transition';
7
7
  import { twMerge } from 'tailwind-merge';
8
+ import { Portal } from '..';
8
9
  import Heading from '../heading';
9
10
  import HiddenBackground from '../hiddenBackground';
10
11
 
@@ -35,31 +36,33 @@
35
36
  </script>
36
37
 
37
38
  {#if b_open}
38
- <HiddenBackground {onclose}>
39
- <!-- svelte-ignore a11y_click_events_have_key_events -->
40
- <!-- svelte-ignore a11y_no_static_element_interactions -->
41
- <div
42
- class={twMerge(
43
- clsx([
44
- 'bg-surface-50-950 absolute top-0 flex h-full flex-col gap-4 p-4',
45
- placement === 'left' && 'left-0',
46
- placement === 'right' && 'right-0',
47
- clazz
48
- ])
49
- )}
50
- transition:fly={{ x: placement === 'right' ? '100%' : '-100%', duration: 200 }}
51
- onclick={(e) => e.stopPropagation()}
52
- {...rest}
53
- >
54
- <div class="flex flex-row items-center justify-between gap-8">
55
- {#if title}
56
- <Heading>{title}</Heading>
57
- {/if}
58
- <button class="group ml-auto flex justify-end" type="button" onclick={onclose}>
59
- <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
60
- </button>
39
+ <Portal>
40
+ <HiddenBackground {onclose}>
41
+ <!-- svelte-ignore a11y_click_events_have_key_events -->
42
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
43
+ <div
44
+ class={twMerge(
45
+ clsx([
46
+ 'bg-surface-50-950 absolute top-0 flex h-full flex-col gap-4 p-4',
47
+ placement === 'left' && 'left-0',
48
+ placement === 'right' && 'right-0',
49
+ clazz
50
+ ])
51
+ )}
52
+ transition:fly={{ x: placement === 'right' ? '100%' : '-100%', duration: 200 }}
53
+ onclick={(e) => e.stopPropagation()}
54
+ {...rest}
55
+ >
56
+ <div class="flex flex-row items-center justify-between gap-8">
57
+ {#if title}
58
+ <Heading>{title}</Heading>
59
+ {/if}
60
+ <button class="group ml-auto flex justify-end" type="button" onclick={onclose}>
61
+ <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
62
+ </button>
63
+ </div>
64
+ {@render children()}
61
65
  </div>
62
- {@render children()}
63
- </div>
64
- </HiddenBackground>
66
+ </HiddenBackground>
67
+ </Portal>
65
68
  {/if}