compote-ui 0.45.0 → 0.46.0
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/drawer/drawer-close-trigger.svelte +1 -1
- package/dist/components/drawer/drawer-content.svelte +5 -5
- package/dist/components/drawer/drawer-trigger.svelte +8 -6
- package/dist/components/drawer/drawer-trigger.svelte.d.ts +6 -4
- package/dist/components/splitter/splitter.svelte +2 -2
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<Drawer.CloseTrigger
|
|
15
15
|
{...rest}
|
|
16
16
|
class={className ??
|
|
17
|
-
'absolute top-
|
|
17
|
+
'absolute top-3 right-3 flex size-7 cursor-pointer items-center justify-center rounded border-none bg-transparent text-ink-dim hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-[-1px]'}
|
|
18
18
|
>
|
|
19
19
|
{#if children}
|
|
20
20
|
{@render children()}
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
class?: ClassValue;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
let { class: className, children, ...rest }: Props = $props();
|
|
11
|
+
let { class: className, children, draggable = false, ...rest }: Props = $props();
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<Drawer.Content
|
|
15
15
|
{...rest}
|
|
16
|
+
{draggable}
|
|
16
17
|
class={cn(
|
|
17
|
-
'relative flex h-full max-h-[96svh] w-full flex-col
|
|
18
|
-
'data-[swipe-direction=left]:max-h-none data-[swipe-direction=left]:max-w-100
|
|
19
|
-
'data-[swipe-direction=right]:max-h-none data-[swipe-direction=right]:max-w-100
|
|
20
|
-
'data-[swipe-direction=up]:rounded-none data-[swipe-direction=up]:rounded-b-xl',
|
|
18
|
+
'pointer-events-auto relative flex h-full max-h-[96svh] w-full flex-col bg-surface-1 shadow-xl outline-none',
|
|
19
|
+
'data-[swipe-direction=left]:max-h-none data-[swipe-direction=left]:max-w-100',
|
|
20
|
+
'data-[swipe-direction=right]:max-h-none data-[swipe-direction=right]:max-w-100',
|
|
21
21
|
className
|
|
22
22
|
)}
|
|
23
23
|
>
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
-
import type
|
|
4
|
+
import { button, type ButtonSize, type ButtonVariant } from '../button/button.variants';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
type Props = DrawerTriggerBaseProps & {
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
class?: string;
|
|
10
|
+
};
|
|
9
11
|
|
|
10
|
-
let { class: className, children, ...rest }: Props = $props();
|
|
12
|
+
let { variant, size, class: className, children, ...rest }: Props = $props();
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
|
-
<Drawer.Trigger {...rest} class={className}>
|
|
15
|
+
<Drawer.Trigger {...rest} class={button({ variant, size, class: className })}>
|
|
14
16
|
{@render children?.()}
|
|
15
17
|
</Drawer.Trigger>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { DrawerTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { type ButtonSize, type ButtonVariant } from '../button/button.variants';
|
|
3
|
+
type Props = DrawerTriggerBaseProps & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
class?: string;
|
|
7
|
+
};
|
|
6
8
|
declare const DrawerTrigger: import("svelte").Component<Props, {}, "">;
|
|
7
9
|
type DrawerTrigger = ReturnType<typeof DrawerTrigger>;
|
|
8
10
|
export default DrawerTrigger;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<!-- Divider line -->
|
|
46
46
|
<div
|
|
47
47
|
class={cn(
|
|
48
|
-
'absolute bg-surface-3 transition-colors group-focus-within:bg-primary group-hover:bg-primary/40 group-data-
|
|
48
|
+
'absolute bg-surface-3 transition-colors group-focus-within:bg-primary group-hover:bg-primary/40 group-data-disabled:bg-border group-data-dragging:bg-primary',
|
|
49
49
|
isHorizontal
|
|
50
50
|
? 'inset-y-0 left-1/2 w-px -translate-x-1/2'
|
|
51
51
|
: 'inset-x-0 top-1/2 h-px -translate-y-1/2'
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<!-- Handle pill -->
|
|
55
55
|
<div
|
|
56
56
|
class={cn(
|
|
57
|
-
'relative z-10 rounded-full bg-surface-3 shadow-sm transition-colors group-hover:bg-primary/40 group-data-
|
|
57
|
+
'relative z-10 rounded-full bg-surface-3 shadow-sm transition-colors group-hover:bg-primary/40 group-data-disabled:invisible group-data-dragging:bg-primary',
|
|
58
58
|
isHorizontal ? 'h-6 w-1' : 'h-1 w-6'
|
|
59
59
|
)}
|
|
60
60
|
></div>
|