@ims360/svelte-ivory 0.0.31 → 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.
- package/dist/components/layout/drawer/Drawer.svelte +29 -26
- package/dist/components/layout/drawer/Drawer.svelte.d.ts.map +1 -1
- package/dist/components/layout/modal/Modal.svelte +1 -1
- package/package.json +1 -1
- package/src/lib/components/layout/drawer/Drawer.svelte +29 -26
- package/src/lib/components/layout/modal/Modal.svelte +1 -1
|
@@ -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
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
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
|
-
|
|
63
|
-
|
|
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;
|
|
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"}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<Portal>
|
|
65
65
|
<HiddenBackground
|
|
66
66
|
onclose={close}
|
|
67
|
-
class="flex h-full w-full flex-col items-center justify-start p-16"
|
|
67
|
+
class="flex h-full w-full flex-col items-center justify-start p-8 lg:p-12 xl:p-16"
|
|
68
68
|
>
|
|
69
69
|
{#if modal}
|
|
70
70
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
package/package.json
CHANGED
|
@@ -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
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
</HiddenBackground>
|
|
66
|
+
</HiddenBackground>
|
|
67
|
+
</Portal>
|
|
65
68
|
{/if}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<Portal>
|
|
65
65
|
<HiddenBackground
|
|
66
66
|
onclose={close}
|
|
67
|
-
class="flex h-full w-full flex-col items-center justify-start p-16"
|
|
67
|
+
class="flex h-full w-full flex-col items-center justify-start p-8 lg:p-12 xl:p-16"
|
|
68
68
|
>
|
|
69
69
|
{#if modal}
|
|
70
70
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|