compote-ui 0.13.0 → 0.14.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/checkbox/checkbox.svelte +1 -1
- package/dist/components/combobox/combobox.svelte +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/theme.css +6 -2
- package/package.json +1 -1
|
@@ -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 p-6', 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-base font-semibold leading-none', 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';
|
|
@@ -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" />
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
|
|
101
101
|
<Combobox.Control
|
|
102
102
|
class={cn(
|
|
103
|
-
'flex min-h-9 items-center gap-1 rounded border px-3 shadow-sm',
|
|
104
|
-
'focus-within:ring-1 focus-within:ring-
|
|
103
|
+
'flex min-h-9 items-center gap-1 rounded border bg-surface-1 px-3 shadow-sm',
|
|
104
|
+
'focus-within:ring-1 focus-within:ring-ring',
|
|
105
105
|
'data-invalid:border-danger data-invalid:focus-within:ring-danger',
|
|
106
106
|
multiple && 'flex-wrap py-1'
|
|
107
107
|
)}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
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
6
|
export { default as Carousel } from './components/carousel/carousel.svelte';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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
6
|
export { default as Carousel } from './components/carousel/carousel.svelte';
|
|
5
7
|
export { default as Checkbox } from './components/checkbox/checkbox.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);
|