@makolabs/ripple 1.0.4 → 1.0.6
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/modal/Modal.svelte
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
size,
|
|
12
12
|
hideCloseButton = false,
|
|
13
13
|
class: className = '',
|
|
14
|
+
contentclass: contentClassName = '',
|
|
15
|
+
bodyclass: bodyClassName = '',
|
|
16
|
+
titleclass: titleClassName = '',
|
|
17
|
+
headerclass: headerClassName = '',
|
|
18
|
+
backdropclass: backdropClassName = '',
|
|
14
19
|
children,
|
|
15
20
|
footer
|
|
16
21
|
}: ModalProps = $props();
|
|
@@ -44,25 +49,25 @@
|
|
|
44
49
|
</script>
|
|
45
50
|
|
|
46
51
|
{#if open}
|
|
47
|
-
<div class={styles.base()} role="dialog" aria-modal="true">
|
|
52
|
+
<div class="{styles.base()} {className}" role="dialog" aria-modal="true">
|
|
48
53
|
<!-- Backdrop -->
|
|
49
54
|
<div
|
|
50
|
-
class={styles.backdrop()}
|
|
55
|
+
class="{styles.backdrop()} {backdropClassName}"
|
|
51
56
|
onclick={handleBackdropClick}
|
|
52
57
|
transition:fade={{ duration: 200 }}
|
|
53
58
|
role="presentation"></div>
|
|
54
59
|
|
|
55
60
|
<!-- Modal Container -->
|
|
56
61
|
<div
|
|
57
|
-
class="{styles.container()} {
|
|
62
|
+
class="{styles.container()} {contentClassName}"
|
|
58
63
|
transition:scale={{ duration: 200, easing: quintOut, start: 0.95 }}
|
|
59
64
|
>
|
|
60
65
|
<!-- Header -->
|
|
61
66
|
{#if title || !hideCloseButton}
|
|
62
|
-
<header class={styles.header()}>
|
|
67
|
+
<header class="{styles.header()} {headerClassName}">
|
|
63
68
|
<div class="flex-1">
|
|
64
69
|
{#if title}
|
|
65
|
-
<h2 class={styles.title()}>{title}</h2>
|
|
70
|
+
<h2 class="{styles.title()} {titleClassName}">{title}</h2>
|
|
66
71
|
{/if}
|
|
67
72
|
{#if description}
|
|
68
73
|
<p class={styles.description()}>{description}</p>
|
|
@@ -91,7 +96,7 @@
|
|
|
91
96
|
|
|
92
97
|
<!-- Body -->
|
|
93
98
|
{#if children}
|
|
94
|
-
<div class={styles.body()}>
|
|
99
|
+
<div class="{styles.body()} {bodyClassName}">
|
|
95
100
|
{@render children()}
|
|
96
101
|
</div>
|
|
97
102
|
{/if}
|
package/dist/modal/modal.d.ts
CHANGED
|
@@ -102,6 +102,11 @@ export type ModalProps = {
|
|
|
102
102
|
size?: VariantSizes;
|
|
103
103
|
hideCloseButton?: boolean;
|
|
104
104
|
class?: string;
|
|
105
|
+
contentclass?: string;
|
|
106
|
+
bodyclass?: string;
|
|
107
|
+
titleclass?: string;
|
|
108
|
+
headerclass?: string;
|
|
109
|
+
backdropclass?: string;
|
|
105
110
|
children?: Snippet;
|
|
106
111
|
footer?: Snippet;
|
|
107
112
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { tv } from 'tailwind-variants';
|
|
3
2
|
import type { Snippet } from 'svelte';
|
|
4
3
|
|
|
5
4
|
export type PipelineStage = {
|
|
@@ -13,7 +12,6 @@
|
|
|
13
12
|
stages: PipelineStage[];
|
|
14
13
|
class?: string;
|
|
15
14
|
size?: 'sm' | 'base' | 'lg';
|
|
16
|
-
equalWidth?: boolean;
|
|
17
15
|
children?: Snippet<[PipelineStage, number]>;
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -21,7 +19,6 @@
|
|
|
21
19
|
stages = [],
|
|
22
20
|
class: className = '',
|
|
23
21
|
size = 'base',
|
|
24
|
-
equalWidth = true,
|
|
25
22
|
children
|
|
26
23
|
}: Props = $props();
|
|
27
24
|
|