reburn-ui 0.3.4 → 0.3.5
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.
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
rightSection,
|
|
70
70
|
variant = 'filled',
|
|
71
71
|
loading = false,
|
|
72
|
-
size
|
|
73
|
-
radius
|
|
72
|
+
size,
|
|
73
|
+
radius,
|
|
74
74
|
color,
|
|
75
75
|
loaderProps,
|
|
76
76
|
justify = 'center',
|
|
77
|
-
fullWidth
|
|
78
|
-
disabled
|
|
77
|
+
fullWidth,
|
|
78
|
+
disabled,
|
|
79
79
|
gradient,
|
|
80
80
|
autoContrast,
|
|
81
81
|
ref = $bindable(),
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type { Properties } from 'csstype';
|
|
8
8
|
import type { Snippet } from 'svelte';
|
|
9
9
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
10
|
-
import {
|
|
10
|
+
import { transitions, type TransitionOverrides } from '../Transitions/transitions.js';
|
|
11
11
|
|
|
12
12
|
export type OverlayProps<T extends keyof SvelteHTMLElements = 'div'> = SvelteHTMLElements[T] & {
|
|
13
13
|
/** Controls overlay `background-color` opacity 0–1, disregarded when `gradient` prop is set, `0.6` by default */
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
as?: T;
|
|
42
42
|
|
|
43
43
|
/** Props passed down to the `Transition` component */
|
|
44
|
-
transitionProps?:
|
|
44
|
+
transitionProps?: TransitionOverrides<'fade'>['options'];
|
|
45
45
|
};
|
|
46
46
|
</script>
|
|
47
47
|
|
|
@@ -57,9 +57,11 @@
|
|
|
57
57
|
blur,
|
|
58
58
|
radius,
|
|
59
59
|
zIndex = getDefaultZIndex('modal'),
|
|
60
|
-
transitionProps,
|
|
60
|
+
transitionProps = {},
|
|
61
61
|
...props
|
|
62
62
|
}: OverlayProps<T> = $props();
|
|
63
|
+
|
|
64
|
+
const fadeTransition = transitions.fade;
|
|
63
65
|
</script>
|
|
64
66
|
|
|
65
67
|
<!-- TODO: maybe remove the background thingy for a css class, since the rgba function is pretty big -->
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
style:--overlay-filter={blur ? `blur(${rem(blur)})` : undefined}
|
|
76
78
|
style:--overlay-radius={radius ? getRadius(radius) : undefined}
|
|
77
79
|
style:--overlay-z-index={zIndex?.toString()}
|
|
78
|
-
transition:
|
|
80
|
+
transition:fadeTransition={transitionProps}
|
|
79
81
|
>
|
|
80
82
|
{@render children?.()}
|
|
81
83
|
</svelte:element>
|
|
@@ -2,7 +2,7 @@ import type { MantineRadius } from '../../MantineProvider/theme.types.js';
|
|
|
2
2
|
import type { Properties } from 'csstype';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
5
|
-
import { type
|
|
5
|
+
import { type TransitionOverrides } from '../Transitions/transitions.js';
|
|
6
6
|
export type OverlayProps<T extends keyof SvelteHTMLElements = 'div'> = SvelteHTMLElements[T] & {
|
|
7
7
|
/** Controls overlay `background-color` opacity 0–1, disregarded when `gradient` prop is set, `0.6` by default */
|
|
8
8
|
backgroundOpacity?: number;
|
|
@@ -25,7 +25,7 @@ export type OverlayProps<T extends keyof SvelteHTMLElements = 'div'> = SvelteHTM
|
|
|
25
25
|
/** Element type */
|
|
26
26
|
as?: T;
|
|
27
27
|
/** Props passed down to the `Transition` component */
|
|
28
|
-
transitionProps?:
|
|
28
|
+
transitionProps?: TransitionOverrides<'fade'>['options'];
|
|
29
29
|
};
|
|
30
30
|
declare function $$render<T extends keyof SvelteHTMLElements>(): {
|
|
31
31
|
props: OverlayProps<T>;
|