compote-ui 0.13.1 → 0.15.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/button/button.variants.d.ts +2 -2
- package/dist/components/button/button.variants.js +1 -1
- package/dist/components/button/link-button.svelte +16 -0
- package/dist/components/button/link-button.svelte.d.ts +10 -0
- package/dist/components/card/card-content.svelte +10 -0
- package/dist/components/card/card-content.svelte.d.ts +4 -0
- package/dist/components/card/card-description.svelte +10 -0
- package/dist/components/card/card-description.svelte.d.ts +4 -0
- package/dist/components/card/card-footer.svelte +10 -0
- package/dist/components/card/card-footer.svelte.d.ts +4 -0
- package/dist/components/card/card-header.svelte +10 -0
- package/dist/components/card/card-header.svelte.d.ts +4 -0
- package/dist/components/card/card-title.svelte +10 -0
- package/dist/components/card/card-title.svelte.d.ts +4 -0
- package/dist/components/card/card.svelte +10 -0
- package/dist/components/card/card.svelte.d.ts +4 -0
- package/dist/components/card/index.d.ts +6 -0
- package/dist/components/card/index.js +6 -0
- package/dist/components/carousel/{carousel.svelte.d.ts → carousel backup.svelte.d.ts } +3 -4
- package/dist/components/carousel/carousel-control.svelte +22 -0
- package/dist/components/carousel/carousel-control.svelte.d.ts +8 -0
- package/dist/components/carousel/carousel-indicator-group.svelte +19 -0
- package/dist/components/carousel/carousel-indicator-group.svelte.d.ts +8 -0
- package/dist/components/carousel/carousel-indicator.svelte +25 -0
- package/dist/components/carousel/carousel-indicator.svelte.d.ts +9 -0
- package/dist/components/carousel/carousel-item-group.svelte +22 -0
- package/dist/components/carousel/carousel-item-group.svelte.d.ts +8 -0
- package/dist/components/carousel/carousel-item.svelte +16 -0
- package/dist/components/carousel/carousel-item.svelte.d.ts +8 -0
- package/dist/components/carousel/carousel-next-trigger.svelte +27 -0
- package/dist/components/carousel/carousel-next-trigger.svelte.d.ts +8 -0
- package/dist/components/carousel/carousel-prev-trigger.svelte +27 -0
- package/dist/components/carousel/carousel-prev-trigger.svelte.d.ts +8 -0
- package/dist/components/carousel/carousel-root.svelte +19 -0
- package/dist/components/carousel/carousel-root.svelte.d.ts +8 -0
- package/dist/components/carousel/index.d.ts +8 -0
- package/dist/components/carousel/index.js +8 -0
- package/dist/components/checkbox/checkbox.svelte +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/theme.css +6 -2
- package/package.json +6 -6
- /package/dist/components/carousel/{carousel.svelte → carousel backup.svelte} +0 -0
|
@@ -13,7 +13,7 @@ export declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
13
13
|
'icon-sm': string;
|
|
14
14
|
'icon-lg': string;
|
|
15
15
|
};
|
|
16
|
-
}, undefined, "
|
|
16
|
+
}, undefined, "inline-flex cursor-pointer items-center justify-center rounded bg-transparent text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50", {
|
|
17
17
|
variant: {
|
|
18
18
|
default: string;
|
|
19
19
|
outline: string;
|
|
@@ -41,6 +41,6 @@ export declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
41
41
|
'icon-sm': string;
|
|
42
42
|
'icon-lg': string;
|
|
43
43
|
};
|
|
44
|
-
}, undefined, "
|
|
44
|
+
}, undefined, "inline-flex cursor-pointer items-center justify-center rounded bg-transparent text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50", unknown, unknown, undefined>>;
|
|
45
45
|
export type ButtonVariant = VariantProps<typeof button>['variant'];
|
|
46
46
|
export type ButtonSize = VariantProps<typeof button>['size'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const button = tv({
|
|
3
|
-
base: '
|
|
3
|
+
base: 'inline-flex cursor-pointer items-center justify-center rounded bg-transparent text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50',
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
6
|
default: 'bg-primary text-ink-inverse hover:bg-primary/90 active:bg-primary/80',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
|
+
import { button, type ButtonVariant, type ButtonSize } from './button.variants';
|
|
4
|
+
|
|
5
|
+
type Props = Omit<HTMLAnchorAttributes, 'class'> & {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let { variant, size, class: className, children, ...rest }: Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<a class={button({ variant, size, class: className })} {...rest}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</a>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
2
|
+
import { type ButtonVariant, type ButtonSize } from './button.variants';
|
|
3
|
+
type Props = Omit<HTMLAnchorAttributes, 'class'> & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
class?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const LinkButton: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type LinkButton = ReturnType<typeof LinkButton>;
|
|
10
|
+
export default LinkButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLDivElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class={cn('p-6 pt-0', className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLParagraphElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<p class={cn('text-sm text-ink-dim', className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</p>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLDivElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class={cn('flex items-center p-6 pt-0', className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLDivElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class={cn('flex flex-col gap-1.5 pb-4', className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLHeadingElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<h3 class={cn('text-lg font-semibold', className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</h3>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLDivElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class={cn('rounded-xl border border-border bg-surface-1 text-ink', className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Root } from './card.svelte';
|
|
2
|
+
export { default as Header } from './card-header.svelte';
|
|
3
|
+
export { default as Title } from './card-title.svelte';
|
|
4
|
+
export { default as Description } from './card-description.svelte';
|
|
5
|
+
export { default as Content } from './card-content.svelte';
|
|
6
|
+
export { default as Footer } from './card-footer.svelte';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Root } from './card.svelte';
|
|
2
|
+
export { default as Header } from './card-header.svelte';
|
|
3
|
+
export { default as Title } from './card-title.svelte';
|
|
4
|
+
export { default as Description } from './card-description.svelte';
|
|
5
|
+
export { default as Content } from './card-content.svelte';
|
|
6
|
+
export { default as Footer } from './card-footer.svelte';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
2
1
|
import type { CarouselRootProps } from '@ark-ui/svelte/carousel';
|
|
3
2
|
interface ImageItem {
|
|
4
3
|
id?: string | number;
|
|
@@ -14,6 +13,6 @@ interface Props extends Omit<CarouselRootProps, 'slideCount'> {
|
|
|
14
13
|
selectedIds?: (string | number)[];
|
|
15
14
|
onSetStar?: (id: string | number) => void;
|
|
16
15
|
}
|
|
17
|
-
declare const
|
|
18
|
-
type
|
|
19
|
-
export default
|
|
16
|
+
declare const Carouselbackup: import("svelte").Component<Props, {}, "selectedIds">;
|
|
17
|
+
type Carouselbackup = ReturnType<typeof Carouselbackup>;
|
|
18
|
+
export default Carouselbackup;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
3
|
+
import type { CarouselControlProps } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: CarouselControlProps & { children?: Snippet } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Carousel.Control
|
|
15
|
+
class={cn(
|
|
16
|
+
'flex items-center gap-2 data-[justify=center]:justify-center data-[orientation=vertical]:flex-col',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...rest}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</Carousel.Control>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselControlProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselControlProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselControl: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselControl = ReturnType<typeof CarouselControl>;
|
|
8
|
+
export default CarouselControl;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
3
|
+
import type { CarouselIndicatorGroupProps } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: CarouselIndicatorGroupProps & { children?: Snippet } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Carousel.IndicatorGroup
|
|
15
|
+
class={cn('flex justify-center gap-2 data-[orientation=vertical]:flex-col', className)}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
{@render children?.()}
|
|
19
|
+
</Carousel.IndicatorGroup>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselIndicatorGroupProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselIndicatorGroupProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselIndicatorGroup: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselIndicatorGroup = ReturnType<typeof CarouselIndicatorGroup>;
|
|
8
|
+
export default CarouselIndicatorGroup;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
3
|
+
import type { CarouselIndicatorProps } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
thumbnail = false,
|
|
11
|
+
...rest
|
|
12
|
+
}: CarouselIndicatorProps & { children?: Snippet; thumbnail?: boolean } = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Carousel.Indicator
|
|
16
|
+
class={cn(
|
|
17
|
+
thumbnail
|
|
18
|
+
? 'h-14 w-14 cursor-pointer overflow-hidden rounded-sm border-2 border-transparent opacity-60 transition-all data-current:border-primary data-current:opacity-100 [&_img]:h-full [&_img]:w-full [&_img]:object-cover'
|
|
19
|
+
: 'size-2 cursor-pointer rounded-full border-0 bg-surface-3 p-0 data-current:bg-primary',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...rest}
|
|
23
|
+
>
|
|
24
|
+
{@render children?.()}
|
|
25
|
+
</Carousel.Indicator>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CarouselIndicatorProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselIndicatorProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
thumbnail?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const CarouselIndicator: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type CarouselIndicator = ReturnType<typeof CarouselIndicator>;
|
|
9
|
+
export default CarouselIndicator;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
3
|
+
import type { CarouselItemGroupProps } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: CarouselItemGroupProps & { children?: Snippet } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Carousel.ItemGroup
|
|
15
|
+
class={cn(
|
|
16
|
+
'flex min-w-0 flex-1 overflow-hidden rounded-lg [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...rest}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</Carousel.ItemGroup>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselItemGroupProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselItemGroupProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselItemGroup: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselItemGroup = ReturnType<typeof CarouselItemGroup>;
|
|
8
|
+
export default CarouselItemGroup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
3
|
+
import type { CarouselItemProps } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: CarouselItemProps & { children?: Snippet } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Carousel.Item class={cn('min-w-0 flex-[0_0_100%]', className)} {...rest}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</Carousel.Item>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselItemProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselItemProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselItem: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselItem = ReturnType<typeof CarouselItem>;
|
|
8
|
+
export default CarouselItem;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import PhArrowRight from '../../icons/PhArrowRight.svelte';
|
|
3
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import type { CarouselNextTriggerProps } from '@ark-ui/svelte/carousel';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...rest
|
|
12
|
+
}: CarouselNextTriggerProps & { children?: Snippet } = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Carousel.NextTrigger
|
|
16
|
+
class={cn(
|
|
17
|
+
'inline-flex size-9 items-center justify-center rounded-md border bg-surface-1 shadow-sm hover:bg-surface-2 active:bg-surface-3 disabled:opacity-50',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...rest}
|
|
21
|
+
>
|
|
22
|
+
{#if children}
|
|
23
|
+
{@render children()}
|
|
24
|
+
{:else}
|
|
25
|
+
<PhArrowRight class="size-4" />
|
|
26
|
+
{/if}
|
|
27
|
+
</Carousel.NextTrigger>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselNextTriggerProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselNextTriggerProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselNextTrigger: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselNextTrigger = ReturnType<typeof CarouselNextTrigger>;
|
|
8
|
+
export default CarouselNextTrigger;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import PhArrowLeft from '../../icons/PhArrowLeft.svelte';
|
|
3
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import type { CarouselPrevTriggerProps } from '@ark-ui/svelte/carousel';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...rest
|
|
12
|
+
}: CarouselPrevTriggerProps & { children?: Snippet } = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Carousel.PrevTrigger
|
|
16
|
+
class={cn(
|
|
17
|
+
'inline-flex size-9 items-center justify-center rounded-md border bg-surface-1 shadow-sm hover:bg-surface-2 active:bg-surface-3 disabled:opacity-50',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...rest}
|
|
21
|
+
>
|
|
22
|
+
{#if children}
|
|
23
|
+
{@render children()}
|
|
24
|
+
{:else}
|
|
25
|
+
<PhArrowLeft class="size-4" />
|
|
26
|
+
{/if}
|
|
27
|
+
</Carousel.PrevTrigger>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselPrevTriggerProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselPrevTriggerProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselPrevTrigger: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselPrevTrigger = ReturnType<typeof CarouselPrevTrigger>;
|
|
8
|
+
export default CarouselPrevTrigger;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
3
|
+
import type { CarouselRootProps } from '@ark-ui/svelte/carousel';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: CarouselRootProps & { children?: Snippet } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Carousel.Root
|
|
15
|
+
class={cn('flex flex-col gap-2 data-[orientation=vertical]:flex-row', className)}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
{@render children?.()}
|
|
19
|
+
</Carousel.Root>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CarouselRootProps } from '@ark-ui/svelte/carousel';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = CarouselRootProps & {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const CarouselRoot: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type CarouselRoot = ReturnType<typeof CarouselRoot>;
|
|
8
|
+
export default CarouselRoot;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Root } from './carousel-root.svelte';
|
|
2
|
+
export { default as Control } from './carousel-control.svelte';
|
|
3
|
+
export { default as PrevTrigger } from './carousel-prev-trigger.svelte';
|
|
4
|
+
export { default as NextTrigger } from './carousel-next-trigger.svelte';
|
|
5
|
+
export { default as ItemGroup } from './carousel-item-group.svelte';
|
|
6
|
+
export { default as Item } from './carousel-item.svelte';
|
|
7
|
+
export { default as IndicatorGroup } from './carousel-indicator-group.svelte';
|
|
8
|
+
export { default as Indicator } from './carousel-indicator.svelte';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Root } from './carousel-root.svelte';
|
|
2
|
+
export { default as Control } from './carousel-control.svelte';
|
|
3
|
+
export { default as PrevTrigger } from './carousel-prev-trigger.svelte';
|
|
4
|
+
export { default as NextTrigger } from './carousel-next-trigger.svelte';
|
|
5
|
+
export { default as ItemGroup } from './carousel-item-group.svelte';
|
|
6
|
+
export { default as Item } from './carousel-item.svelte';
|
|
7
|
+
export { default as IndicatorGroup } from './carousel-indicator-group.svelte';
|
|
8
|
+
export { default as Indicator } from './carousel-indicator.svelte';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<Checkbox.Control
|
|
16
16
|
class="{children
|
|
17
17
|
? 'mt-0.5'
|
|
18
|
-
: ''}
|
|
18
|
+
: ''} flex size-5 shrink-0 items-center justify-center rounded-sm border bg-transparent transition-colors hover:border-primary/50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus-visible:outline-2 data-focus-visible:outline-offset-2 data-focus-visible:outline-ring data-invalid:border-danger data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary"
|
|
19
19
|
>
|
|
20
20
|
<Checkbox.Indicator>
|
|
21
21
|
<PhCheck class="size-3.5 text-ink-inverse" />
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { default as Button } from './components/button/button.svelte';
|
|
2
|
+
export { default as LinkButton } from './components/button/link-button.svelte';
|
|
3
|
+
export * as Card from './components/card';
|
|
2
4
|
export { loadImage, fileToDataUrl, cropImage, processImage } from './utils/image-processing';
|
|
3
5
|
export type { ProcessImageOptions, CropRegion } from './utils/image-processing';
|
|
4
|
-
export
|
|
6
|
+
export * as Carousel from './components/carousel';
|
|
5
7
|
export { default as Checkbox } from './components/checkbox/checkbox.svelte';
|
|
6
8
|
export { default as CheckboxGroup } from './components/checkbox/checkbox-group.svelte';
|
|
7
9
|
export { default as Combobox } from './components/combobox/combobox.svelte';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Reexport your entry components here
|
|
2
2
|
export { default as Button } from './components/button/button.svelte';
|
|
3
|
+
export { default as LinkButton } from './components/button/link-button.svelte';
|
|
4
|
+
export * as Card from './components/card';
|
|
3
5
|
export { loadImage, fileToDataUrl, cropImage, processImage } from './utils/image-processing';
|
|
4
|
-
export
|
|
6
|
+
export * as Carousel from './components/carousel';
|
|
5
7
|
export { default as Checkbox } from './components/checkbox/checkbox.svelte';
|
|
6
8
|
export { default as CheckboxGroup } from './components/checkbox/checkbox-group.svelte';
|
|
7
9
|
export { default as Combobox } from './components/combobox/combobox.svelte';
|
package/dist/theme.css
CHANGED
|
@@ -35,8 +35,12 @@
|
|
|
35
35
|
--compote-ring: var(--compote-primary);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.dark
|
|
39
|
-
|
|
38
|
+
.dark {
|
|
39
|
+
color-scheme: dark;
|
|
40
|
+
}
|
|
41
|
+
.light {
|
|
42
|
+
color-scheme: light;
|
|
43
|
+
}
|
|
40
44
|
|
|
41
45
|
@theme inline {
|
|
42
46
|
--color-ink: var(--compote-ink);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compote-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"svelte": "^5.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@eslint/compat": "^2.0.
|
|
38
|
+
"@eslint/compat": "^2.0.4",
|
|
39
39
|
"@eslint/js": "^10.0.1",
|
|
40
40
|
"@iconify-json/ph": "^1.2.2",
|
|
41
41
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
42
|
-
"@sveltejs/kit": "^2.
|
|
42
|
+
"@sveltejs/kit": "^2.56.1",
|
|
43
43
|
"@sveltejs/package": "^2.5.7",
|
|
44
|
-
"@sveltejs/vite-plugin-svelte": "
|
|
44
|
+
"@sveltejs/vite-plugin-svelte": "6.2.4",
|
|
45
45
|
"@tailwindcss/vite": "^4.1.18",
|
|
46
46
|
"@types/node": "^22",
|
|
47
|
-
"eslint": "^10.0
|
|
47
|
+
"eslint": "^10.2.0",
|
|
48
48
|
"eslint-config-prettier": "^10.1.8",
|
|
49
|
-
"eslint-plugin-svelte": "^3.
|
|
49
|
+
"eslint-plugin-svelte": "^3.17.0",
|
|
50
50
|
"globals": "^17.4.0",
|
|
51
51
|
"prettier": "^3.8.1",
|
|
52
52
|
"prettier-plugin-svelte": "^3.4.1",
|
|
File without changes
|