@nasa-jpl/stellar-svelte 2.0.0-alpha.31 → 2.0.0-alpha.33
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/ui/alert/index.d.ts +7 -7
- package/dist/components/ui/alert/index.js +10 -10
- package/dist/components/ui/badge/index.d.ts +3 -3
- package/dist/components/ui/badge/index.js +8 -8
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/button/index.js +1 -1
- package/dist/components/ui/carousel/carousel-next.svelte +18 -20
- package/dist/components/ui/carousel/carousel-next.svelte.d.ts +1 -1
- package/dist/components/ui/carousel/carousel-previous.svelte +16 -20
- package/dist/components/ui/carousel/carousel-previous.svelte.d.ts +1 -1
- package/dist/components/ui/sheet/index.d.ts +11 -11
- package/dist/components/ui/sheet/index.js +25 -25
- package/dist/components/ui/table/index.d.ts +2 -2
- package/dist/components/ui/table/index.js +1 -1
- package/dist/components/ui/toggle/index.d.ts +4 -4
- package/dist/components/ui/toggle/index.js +10 -10
- package/dist/components/ui/toggle-group/index.d.ts +9 -6
- package/dist/components/ui/toggle-group/index.js +6 -6
- package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +4 -2
- package/dist/components/ui/toggle-group/toggle-group.svelte +7 -7
- package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +9 -77
- package/dist/index.d.ts +46 -47
- package/dist/index.js +48 -52
- package/dist/types/tailwind.d.ts +18 -0
- package/dist/types/tailwind.js +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
2
|
+
import Description from './alert-description.svelte';
|
|
3
|
+
import Title from './alert-title.svelte';
|
|
4
|
+
import Root from './alert.svelte';
|
|
5
5
|
export declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
default: string;
|
|
@@ -38,6 +38,6 @@ export declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
|
38
38
|
destructive: string;
|
|
39
39
|
};
|
|
40
40
|
}>, unknown, unknown, undefined>>;
|
|
41
|
-
export type Variant = VariantProps<typeof alertVariants>[
|
|
42
|
-
export type HeadingLevel =
|
|
43
|
-
export { Root
|
|
41
|
+
export type Variant = VariantProps<typeof alertVariants>['variant'];
|
|
42
|
+
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
43
|
+
export { Root as Alert, Description as AlertDescription, Title as AlertTitle, Description, Root, Title, };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { tv } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
import Description from './alert-description.svelte';
|
|
3
|
+
import Title from './alert-title.svelte';
|
|
4
|
+
import Root from './alert.svelte';
|
|
5
5
|
export const alertVariants = tv({
|
|
6
|
-
base:
|
|
6
|
+
base: 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
|
-
default:
|
|
10
|
-
destructive:
|
|
9
|
+
default: 'bg-background text-foreground',
|
|
10
|
+
destructive: 'border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
defaultVariants: {
|
|
14
|
-
variant:
|
|
14
|
+
variant: 'default',
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
export {
|
|
17
|
+
export {
|
|
18
18
|
//
|
|
19
|
-
Root as Alert, Description as AlertDescription, Title as AlertTitle, };
|
|
19
|
+
Root as Alert, Description as AlertDescription, Title as AlertTitle, Description, Root, Title, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { default as Badge } from
|
|
1
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
2
|
+
export { default as Badge } from './badge.svelte';
|
|
3
3
|
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
variant: {
|
|
5
5
|
default: string;
|
|
@@ -50,4 +50,4 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
50
50
|
outline: string;
|
|
51
51
|
};
|
|
52
52
|
}>, unknown, unknown, undefined>>;
|
|
53
|
-
export type Variant = VariantProps<typeof badgeVariants>[
|
|
53
|
+
export type Variant = VariantProps<typeof badgeVariants>['variant'];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { tv } from
|
|
2
|
-
export { default as Badge } from
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export { default as Badge } from './badge.svelte';
|
|
3
3
|
export const badgeVariants = tv({
|
|
4
|
-
base:
|
|
4
|
+
base: 'inline-flex select-none items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
|
-
default:
|
|
8
|
-
secondary:
|
|
9
|
-
destructive:
|
|
10
|
-
outline:
|
|
7
|
+
default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
|
8
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
9
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
10
|
+
outline: 'text-foreground',
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
defaultVariants: {
|
|
14
|
-
variant:
|
|
14
|
+
variant: 'default',
|
|
15
15
|
},
|
|
16
16
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
1
2
|
import type { Button as ButtonPrimitive } from 'bits-ui';
|
|
2
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
3
3
|
import Root from './button.svelte';
|
|
4
4
|
declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
variant: {
|
|
@@ -121,4 +121,4 @@ type Props = ButtonPrimitive.Props & {
|
|
|
121
121
|
size?: Size;
|
|
122
122
|
};
|
|
123
123
|
type Events = ButtonPrimitive.Events;
|
|
124
|
-
export { Root as Button,
|
|
124
|
+
export { Root as Button, buttonVariants, Root, type Events as ButtonEvents, type Props as ButtonProps, type Events, type Props, };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import { getEmblaContext } from "./context.js";
|
|
1
|
+
<script>import { Button } from "../button/index.js";
|
|
3
2
|
import { cn } from "../../../utils.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
} from "../button/index.js";
|
|
3
|
+
import ArrowRight from "lucide-svelte/icons/arrow-right";
|
|
4
|
+
import { getEmblaContext } from "./context.js";
|
|
7
5
|
let className = void 0;
|
|
8
6
|
export { className as class };
|
|
9
7
|
export let variant = "outline";
|
|
@@ -12,20 +10,20 @@ const { orientation, canScrollNext, scrollNext, handleKeyDown } = getEmblaContex
|
|
|
12
10
|
</script>
|
|
13
11
|
|
|
14
12
|
<Button
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
{variant}
|
|
14
|
+
{size}
|
|
15
|
+
class={cn(
|
|
16
|
+
'absolute h-8 w-8 touch-manipulation rounded-full',
|
|
17
|
+
$orientation === 'horizontal'
|
|
18
|
+
? '-right-12 top-1/2 -translate-y-1/2'
|
|
19
|
+
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
disabled={!$canScrollNext}
|
|
23
|
+
on:click={scrollNext}
|
|
24
|
+
on:keydown={handleKeyDown}
|
|
25
|
+
{...$$restProps}
|
|
28
26
|
>
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
<ArrowRight class="h-4 w-4" />
|
|
28
|
+
<span class="sr-only">Next slide</span>
|
|
31
29
|
</Button>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import { getEmblaContext } from "./context.js";
|
|
1
|
+
<script>import { Button } from "../button/index.js";
|
|
3
2
|
import { cn } from "../../../utils.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
} from "../button/index.js";
|
|
3
|
+
import ArrowLeft from "lucide-svelte/icons/arrow-left";
|
|
4
|
+
import { getEmblaContext } from "./context.js";
|
|
7
5
|
let className = void 0;
|
|
8
6
|
export { className as class };
|
|
9
7
|
export let variant = "outline";
|
|
@@ -12,20 +10,18 @@ const { orientation, canScrollPrev, scrollPrev, handleKeyDown } = getEmblaContex
|
|
|
12
10
|
</script>
|
|
13
11
|
|
|
14
12
|
<Button
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
on:keydown={handleKeyDown}
|
|
27
|
-
{...$$restProps}
|
|
13
|
+
{variant}
|
|
14
|
+
{size}
|
|
15
|
+
class={cn(
|
|
16
|
+
'absolute h-8 w-8 touch-manipulation rounded-full',
|
|
17
|
+
$orientation === 'horizontal' ? '-left-12 top-1/2 -translate-y-1/2' : '-top-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
disabled={!$canScrollPrev}
|
|
21
|
+
on:click={scrollPrev}
|
|
22
|
+
on:keydown={handleKeyDown}
|
|
23
|
+
{...$$restProps}
|
|
28
24
|
>
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
<ArrowLeft class="h-4 w-4" />
|
|
26
|
+
<span class="sr-only">Previous slide</span>
|
|
31
27
|
</Button>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import Header from
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
2
|
+
import { Dialog as SheetPrimitive } from 'bits-ui';
|
|
3
|
+
import Content from './sheet-content.svelte';
|
|
4
|
+
import Description from './sheet-description.svelte';
|
|
5
|
+
import Footer from './sheet-footer.svelte';
|
|
6
|
+
import Header from './sheet-header.svelte';
|
|
7
|
+
import Overlay from './sheet-overlay.svelte';
|
|
8
|
+
import Portal from './sheet-portal.svelte';
|
|
9
|
+
import Title from './sheet-title.svelte';
|
|
10
10
|
declare const Root: typeof SheetPrimitive.Root;
|
|
11
11
|
declare const Close: typeof SheetPrimitive.Close;
|
|
12
12
|
declare const Trigger: typeof SheetPrimitive.Trigger;
|
|
13
|
-
export {
|
|
13
|
+
export { Close, Content, Description, Footer, Header, Overlay, Portal, Root, Root as Sheet, Close as SheetClose, Content as SheetContent, Description as SheetDescription, Footer as SheetFooter, Header as SheetHeader, Overlay as SheetOverlay, Portal as SheetPortal, Title as SheetTitle, Trigger as SheetTrigger, Title, Trigger, };
|
|
14
14
|
export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
15
15
|
side: {
|
|
16
16
|
top: string;
|
|
@@ -111,4 +111,4 @@ export declare const sheetTransitions: {
|
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
export type Side = VariantProps<typeof sheetVariants>[
|
|
114
|
+
export type Side = VariantProps<typeof sheetVariants>['side'];
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { Dialog as SheetPrimitive } from
|
|
2
|
-
import { tv } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import Header from
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { Dialog as SheetPrimitive } from 'bits-ui';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
import Content from './sheet-content.svelte';
|
|
4
|
+
import Description from './sheet-description.svelte';
|
|
5
|
+
import Footer from './sheet-footer.svelte';
|
|
6
|
+
import Header from './sheet-header.svelte';
|
|
7
|
+
import Overlay from './sheet-overlay.svelte';
|
|
8
|
+
import Portal from './sheet-portal.svelte';
|
|
9
|
+
import Title from './sheet-title.svelte';
|
|
10
10
|
const Root = SheetPrimitive.Root;
|
|
11
11
|
const Close = SheetPrimitive.Close;
|
|
12
12
|
const Trigger = SheetPrimitive.Trigger;
|
|
13
|
-
export {
|
|
13
|
+
export { Close, Content, Description, Footer, Header, Overlay, Portal, Root,
|
|
14
14
|
//
|
|
15
|
-
Root as Sheet, Close as SheetClose,
|
|
15
|
+
Root as Sheet, Close as SheetClose, Content as SheetContent, Description as SheetDescription, Footer as SheetFooter, Header as SheetHeader, Overlay as SheetOverlay, Portal as SheetPortal, Title as SheetTitle, Trigger as SheetTrigger, Title, Trigger, };
|
|
16
16
|
export const sheetVariants = tv({
|
|
17
|
-
base:
|
|
17
|
+
base: 'bg-background fixed z-50 gap-4 p-6 shadow-lg',
|
|
18
18
|
variants: {
|
|
19
19
|
side: {
|
|
20
|
-
top:
|
|
21
|
-
bottom:
|
|
22
|
-
left:
|
|
23
|
-
right:
|
|
20
|
+
top: 'inset-x-0 top-0 border-b',
|
|
21
|
+
bottom: 'inset-x-0 bottom-0 border-t',
|
|
22
|
+
left: 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
23
|
+
right: 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
defaultVariants: {
|
|
27
|
-
side:
|
|
27
|
+
side: 'right',
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
export const sheetTransitions = {
|
|
31
31
|
top: {
|
|
32
32
|
in: {
|
|
33
|
-
y:
|
|
33
|
+
y: '-100%',
|
|
34
34
|
duration: 500,
|
|
35
35
|
opacity: 1,
|
|
36
36
|
},
|
|
37
37
|
out: {
|
|
38
|
-
y:
|
|
38
|
+
y: '-100%',
|
|
39
39
|
duration: 300,
|
|
40
40
|
opacity: 1,
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
bottom: {
|
|
44
44
|
in: {
|
|
45
|
-
y:
|
|
45
|
+
y: '100%',
|
|
46
46
|
duration: 500,
|
|
47
47
|
opacity: 1,
|
|
48
48
|
},
|
|
49
49
|
out: {
|
|
50
|
-
y:
|
|
50
|
+
y: '100%',
|
|
51
51
|
duration: 300,
|
|
52
52
|
opacity: 1,
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
left: {
|
|
56
56
|
in: {
|
|
57
|
-
x:
|
|
57
|
+
x: '-100%',
|
|
58
58
|
duration: 500,
|
|
59
59
|
opacity: 1,
|
|
60
60
|
},
|
|
61
61
|
out: {
|
|
62
|
-
x:
|
|
62
|
+
x: '-100%',
|
|
63
63
|
duration: 300,
|
|
64
64
|
opacity: 1,
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
right: {
|
|
68
68
|
in: {
|
|
69
|
-
x:
|
|
69
|
+
x: '100%',
|
|
70
70
|
duration: 500,
|
|
71
71
|
opacity: 1,
|
|
72
72
|
},
|
|
73
73
|
out: {
|
|
74
|
-
x:
|
|
74
|
+
x: '100%',
|
|
75
75
|
duration: 300,
|
|
76
76
|
opacity: 1,
|
|
77
77
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
2
2
|
import Body from './table-body.svelte';
|
|
3
3
|
import Caption from './table-caption.svelte';
|
|
4
4
|
import Cell from './table-cell.svelte';
|
|
@@ -60,4 +60,4 @@ declare const tableCellVariants: import("tailwind-variants").TVReturnType<{
|
|
|
60
60
|
type TableCellProps = {
|
|
61
61
|
size?: VariantProps<typeof tableCellVariants>['size'];
|
|
62
62
|
};
|
|
63
|
-
export { Body, Caption, Cell, Footer, Head, Header, Root, Row, Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow,
|
|
63
|
+
export { Body, Caption, Cell, Footer, Head, Header, Root, Row, Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, tableCellVariants, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow, type TableCellProps, };
|
|
@@ -23,4 +23,4 @@ const tableCellVariants = tv({
|
|
|
23
23
|
});
|
|
24
24
|
export { Body, Caption, Cell, Footer, Head, Header, Root, Row,
|
|
25
25
|
//
|
|
26
|
-
Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow,
|
|
26
|
+
Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, tableCellVariants, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Root from
|
|
1
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
2
|
+
import Root from './toggle.svelte';
|
|
3
3
|
export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
variant: {
|
|
5
5
|
default: string;
|
|
@@ -71,6 +71,6 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
|
|
|
71
71
|
lg: string;
|
|
72
72
|
};
|
|
73
73
|
}>, unknown, unknown, undefined>>;
|
|
74
|
-
export type Variant = VariantProps<typeof toggleVariants>[
|
|
75
|
-
export type Size = VariantProps<typeof toggleVariants>[
|
|
74
|
+
export type Variant = VariantProps<typeof toggleVariants>['variant'];
|
|
75
|
+
export type Size = VariantProps<typeof toggleVariants>['size'];
|
|
76
76
|
export { Root, Root as Toggle, };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { tv } from
|
|
2
|
-
import Root from
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
import Root from './toggle.svelte';
|
|
3
3
|
export const toggleVariants = tv({
|
|
4
|
-
base:
|
|
4
|
+
base: 'ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
|
-
default:
|
|
8
|
-
outline:
|
|
7
|
+
default: 'bg-transparent',
|
|
8
|
+
outline: 'border-input hover:bg-accent hover:text-accent-foreground border bg-transparent',
|
|
9
9
|
},
|
|
10
10
|
size: {
|
|
11
|
-
default:
|
|
12
|
-
sm:
|
|
13
|
-
lg:
|
|
11
|
+
default: 'h-10 px-3',
|
|
12
|
+
sm: 'h-9 px-2.5',
|
|
13
|
+
lg: 'h-11 px-5',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
17
|
-
variant:
|
|
18
|
-
size:
|
|
17
|
+
variant: 'default',
|
|
18
|
+
size: 'default',
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
21
|
export { Root,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
import Item from
|
|
4
|
-
import
|
|
1
|
+
import type { toggleVariants } from '../toggle/index.js';
|
|
2
|
+
import type { VariantProps } from '../../../types/tailwind.js';
|
|
3
|
+
import Item from './toggle-group-item.svelte';
|
|
4
|
+
import Root from './toggle-group.svelte';
|
|
5
5
|
export type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
6
6
|
export declare function setToggleGroupCtx(props: ToggleVariants): void;
|
|
7
|
-
export declare function getToggleGroupCtx():
|
|
8
|
-
|
|
7
|
+
export declare function getToggleGroupCtx(): {
|
|
8
|
+
variant?: "default" | "outline" | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | undefined;
|
|
10
|
+
};
|
|
11
|
+
export { Item, Root, Root as ToggleGroup, Item as ToggleGroupItem, };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getContext, setContext } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { getContext, setContext } from 'svelte';
|
|
2
|
+
import Item from './toggle-group-item.svelte';
|
|
3
|
+
import Root from './toggle-group.svelte';
|
|
4
4
|
export function setToggleGroupCtx(props) {
|
|
5
|
-
setContext(
|
|
5
|
+
setContext('toggleGroup', props);
|
|
6
6
|
}
|
|
7
7
|
export function getToggleGroupCtx() {
|
|
8
|
-
return getContext(
|
|
8
|
+
return getContext('toggleGroup');
|
|
9
9
|
}
|
|
10
|
-
export {
|
|
10
|
+
export { Item, Root,
|
|
11
11
|
//
|
|
12
12
|
Root as ToggleGroup, Item as ToggleGroupItem, };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import { type ToggleVariants } from "./index.js";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
value: string;
|
|
6
5
|
disabled?: boolean | undefined | undefined;
|
|
7
6
|
asChild?: boolean | undefined | undefined;
|
|
8
7
|
el?: HTMLButtonElement | undefined;
|
|
9
|
-
} & import("svelte/elements.js").HTMLButtonAttributes &
|
|
8
|
+
} & import("svelte/elements.js").HTMLButtonAttributes & {
|
|
9
|
+
variant?: "default" | "outline" | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | undefined;
|
|
11
|
+
};
|
|
10
12
|
events: {
|
|
11
13
|
[evt: string]: CustomEvent<any>;
|
|
12
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
|
|
2
3
|
import { setToggleGroupCtx } from "./index.js";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export { className as class };
|
|
6
6
|
export let variant = "default";
|
|
@@ -13,10 +13,10 @@ setToggleGroupCtx({
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<ToggleGroupPrimitive.Root
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
class={cn('flex items-center justify-center gap-1', className)}
|
|
17
|
+
bind:value
|
|
18
|
+
{...$$restProps}
|
|
19
|
+
let:builder
|
|
20
20
|
>
|
|
21
|
-
|
|
21
|
+
<slot {builder} />
|
|
22
22
|
</ToggleGroupPrimitive.Root>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
|
|
3
|
-
declare class __sveltets_Render<T extends "single" | "multiple"> {
|
|
2
|
+
declare class __sveltets_Render<T extends 'single' | 'multiple'> {
|
|
4
3
|
props(): {
|
|
5
4
|
disabled?: boolean | undefined;
|
|
6
5
|
type?: T | undefined;
|
|
@@ -11,77 +10,10 @@ declare class __sveltets_Render<T extends "single" | "multiple"> {
|
|
|
11
10
|
onValueChange?: import("bits-ui/dist/internal/types.js").OnChangeFn<(T extends "single" ? string : string[]) | undefined> | undefined;
|
|
12
11
|
asChild?: boolean | undefined | undefined;
|
|
13
12
|
el?: HTMLDivElement | undefined;
|
|
14
|
-
} & import("bits-ui/dist/internal/types.js").HTMLDivAttributes &
|
|
15
|
-
variant
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
size: {
|
|
20
|
-
default: string;
|
|
21
|
-
sm: string;
|
|
22
|
-
lg: string;
|
|
23
|
-
};
|
|
24
|
-
}, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
25
|
-
variant: {
|
|
26
|
-
default: string;
|
|
27
|
-
outline: string;
|
|
28
|
-
};
|
|
29
|
-
size: {
|
|
30
|
-
default: string;
|
|
31
|
-
sm: string;
|
|
32
|
-
lg: string;
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
variant: {
|
|
36
|
-
default: string;
|
|
37
|
-
outline: string;
|
|
38
|
-
};
|
|
39
|
-
size: {
|
|
40
|
-
default: string;
|
|
41
|
-
sm: string;
|
|
42
|
-
lg: string;
|
|
43
|
-
};
|
|
44
|
-
}>, {
|
|
45
|
-
variant: {
|
|
46
|
-
default: string;
|
|
47
|
-
outline: string;
|
|
48
|
-
};
|
|
49
|
-
size: {
|
|
50
|
-
default: string;
|
|
51
|
-
sm: string;
|
|
52
|
-
lg: string;
|
|
53
|
-
};
|
|
54
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
55
|
-
variant: {
|
|
56
|
-
default: string;
|
|
57
|
-
outline: string;
|
|
58
|
-
};
|
|
59
|
-
size: {
|
|
60
|
-
default: string;
|
|
61
|
-
sm: string;
|
|
62
|
-
lg: string;
|
|
63
|
-
};
|
|
64
|
-
}, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
65
|
-
variant: {
|
|
66
|
-
default: string;
|
|
67
|
-
outline: string;
|
|
68
|
-
};
|
|
69
|
-
size: {
|
|
70
|
-
default: string;
|
|
71
|
-
sm: string;
|
|
72
|
-
lg: string;
|
|
73
|
-
};
|
|
74
|
-
}, {
|
|
75
|
-
variant: {
|
|
76
|
-
default: string;
|
|
77
|
-
outline: string;
|
|
78
|
-
};
|
|
79
|
-
size: {
|
|
80
|
-
default: string;
|
|
81
|
-
sm: string;
|
|
82
|
-
lg: string;
|
|
83
|
-
};
|
|
84
|
-
}>, unknown, unknown, undefined>>>;
|
|
13
|
+
} & import("bits-ui/dist/internal/types.js").HTMLDivAttributes & {
|
|
14
|
+
variant?: "default" | "outline" | undefined;
|
|
15
|
+
size?: "default" | "sm" | "lg" | undefined;
|
|
16
|
+
};
|
|
85
17
|
events(): {} & {
|
|
86
18
|
[evt: string]: CustomEvent<any>;
|
|
87
19
|
};
|
|
@@ -98,9 +30,9 @@ declare class __sveltets_Render<T extends "single" | "multiple"> {
|
|
|
98
30
|
};
|
|
99
31
|
};
|
|
100
32
|
}
|
|
101
|
-
export type ToggleGroupProps<T extends
|
|
102
|
-
export type ToggleGroupEvents<T extends
|
|
103
|
-
export type ToggleGroupSlots<T extends
|
|
104
|
-
export default class ToggleGroup<T extends
|
|
33
|
+
export type ToggleGroupProps<T extends 'single' | 'multiple'> = ReturnType<__sveltets_Render<T>['props']>;
|
|
34
|
+
export type ToggleGroupEvents<T extends 'single' | 'multiple'> = ReturnType<__sveltets_Render<T>['events']>;
|
|
35
|
+
export type ToggleGroupSlots<T extends 'single' | 'multiple'> = ReturnType<__sveltets_Render<T>['slots']>;
|
|
36
|
+
export default class ToggleGroup<T extends 'single' | 'multiple'> extends SvelteComponent<ToggleGroupProps<T>, ToggleGroupEvents<T>, ToggleGroupSlots<T>> {
|
|
105
37
|
}
|
|
106
38
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export { Accordion, Alert, AlertDialog, AspectRatio, Avatar, Badge, Breadcrumb, Button, Calendar, Card, Carousel, Checkbox, Collapsible, Command, ContextMenu, Dialog, Drawer, DropdownMenu, Form, H1, H2, H3, H4, HoverCard, Input, Label, Menubar, ModeWatcher, P, Pagination, Popover, Progress, RadioGroup, RangeCalendar, Resizable, ScrollArea, Select, Separator, Sheet, Skeleton, Slider, Sonner, Switch, Table, Tabs, Textarea, ThemeSwitcherButton, ThemeSwitcherDropdown, Toggle, ToggleGroup, Tooltip, };
|
|
1
|
+
export * as Accordion from './components/ui/accordion/index.js';
|
|
2
|
+
export * as AlertDialog from './components/ui/alert-dialog/index.js';
|
|
3
|
+
export * as Alert from './components/ui/alert/index.js';
|
|
4
|
+
export { AspectRatio } from './components/ui/aspect-ratio/index.js';
|
|
5
|
+
export * as Avatar from './components/ui/avatar/index.js';
|
|
6
|
+
export { Badge } from './components/ui/badge/index.js';
|
|
7
|
+
export * as Breadcrumb from './components/ui/breadcrumb/index.js';
|
|
8
|
+
export { Button } from './components/ui/button/index.js';
|
|
9
|
+
export * as Calendar from './components/ui/calendar/index.js';
|
|
10
|
+
export * as Card from './components/ui/card/index.js';
|
|
11
|
+
export * as Carousel from './components/ui/carousel/index.js';
|
|
12
|
+
export { Checkbox } from './components/ui/checkbox/index.js';
|
|
13
|
+
export { Collapsible } from './components/ui/collapsible/index.js';
|
|
14
|
+
export * as Command from './components/ui/command/index.js';
|
|
15
|
+
export * as ContextMenu from './components/ui/context-menu/index.js';
|
|
16
|
+
export * as Dialog from './components/ui/dialog/index.js';
|
|
17
|
+
export * as Drawer from './components/ui/drawer/index.js';
|
|
18
|
+
export * as DropdownMenu from './components/ui/dropdown-menu/index.js';
|
|
19
|
+
export * as Form from './components/ui/form/index.js';
|
|
20
|
+
export { HoverCard } from './components/ui/hover-card/index.js';
|
|
21
|
+
export { Input } from './components/ui/input/index.js';
|
|
22
|
+
export { Label } from './components/ui/label/index.js';
|
|
23
|
+
export * as Menubar from './components/ui/menubar/index.js';
|
|
24
|
+
export { ModeWatcher } from './components/ui/theme-switcher/index.js';
|
|
25
|
+
export * as Pagination from './components/ui/pagination/index.js';
|
|
26
|
+
export * as Popover from './components/ui/popover/index.js';
|
|
27
|
+
export { Progress } from './components/ui/progress/index.js';
|
|
28
|
+
export * as RadioGroup from './components/ui/radio-group/index.js';
|
|
29
|
+
export * as RangeCalendar from './components/ui/range-calendar/index.js';
|
|
30
|
+
export * as Resizable from './components/ui/resizable/index.js';
|
|
31
|
+
export * as ScrollArea from './components/ui/scroll-area/index.js';
|
|
32
|
+
export * as Select from './components/ui/select/index.js';
|
|
33
|
+
export { Separator } from './components/ui/separator/index.js';
|
|
34
|
+
export * as Sheet from './components/ui/sheet/index.js';
|
|
35
|
+
export { Skeleton } from './components/ui/skeleton/index.js';
|
|
36
|
+
export { Slider } from './components/ui/slider/index.js';
|
|
37
|
+
export * as Sonner from './components/ui/sonner/index.js';
|
|
38
|
+
export { Switch } from './components/ui/switch/index.js';
|
|
39
|
+
export * as Table from './components/ui/table/index.js';
|
|
40
|
+
export * as Tabs from './components/ui/tabs/index.js';
|
|
41
|
+
export { Textarea } from './components/ui/textarea/index.js';
|
|
42
|
+
export { ThemeSwitcherButton, ThemeSwitcherDropdown } from './components/ui/theme-switcher/index.js';
|
|
43
|
+
export * as ToggleGroup from './components/ui/toggle-group/index.js';
|
|
44
|
+
export { Toggle } from './components/ui/toggle/index.js';
|
|
45
|
+
export { Tooltip } from './components/ui/tooltip/index.js';
|
|
46
|
+
export { H1, H2, H3, H4, P } from './components/ui/typography/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,53 +1,49 @@
|
|
|
1
1
|
// Reexport your entry components here
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export { Accordion, Alert, AlertDialog, AspectRatio, Avatar, Badge, Breadcrumb, Button, Calendar, Card, Carousel, Checkbox, Collapsible, Command, ContextMenu, Dialog, Drawer, DropdownMenu, Form, H1, H2, H3, H4, HoverCard, Input, Label, Menubar, ModeWatcher,
|
|
51
|
-
// NavigationMenu,
|
|
52
|
-
// NumberInput,
|
|
53
|
-
P, Pagination, Popover, Progress, RadioGroup, RangeCalendar, Resizable, ScrollArea, Select, Separator, Sheet, Skeleton, Slider, Sonner, Switch, Table, Tabs, Textarea, ThemeSwitcherButton, ThemeSwitcherDropdown, Toggle, ToggleGroup, Tooltip, };
|
|
2
|
+
export * as Accordion from './components/ui/accordion/index.js';
|
|
3
|
+
export * as AlertDialog from './components/ui/alert-dialog/index.js';
|
|
4
|
+
export * as Alert from './components/ui/alert/index.js';
|
|
5
|
+
export { AspectRatio } from './components/ui/aspect-ratio/index.js';
|
|
6
|
+
export * as Avatar from './components/ui/avatar/index.js';
|
|
7
|
+
export { Badge } from './components/ui/badge/index.js';
|
|
8
|
+
export * as Breadcrumb from './components/ui/breadcrumb/index.js';
|
|
9
|
+
export { Button } from './components/ui/button/index.js';
|
|
10
|
+
export * as Calendar from './components/ui/calendar/index.js';
|
|
11
|
+
export * as Card from './components/ui/card/index.js';
|
|
12
|
+
export * as Carousel from './components/ui/carousel/index.js';
|
|
13
|
+
export { Checkbox } from './components/ui/checkbox/index.js';
|
|
14
|
+
export { Collapsible } from './components/ui/collapsible/index.js';
|
|
15
|
+
export * as Command from './components/ui/command/index.js';
|
|
16
|
+
export * as ContextMenu from './components/ui/context-menu/index.js';
|
|
17
|
+
export * as Dialog from './components/ui/dialog/index.js';
|
|
18
|
+
export * as Drawer from './components/ui/drawer/index.js';
|
|
19
|
+
export * as DropdownMenu from './components/ui/dropdown-menu/index.js';
|
|
20
|
+
export * as Form from './components/ui/form/index.js';
|
|
21
|
+
export { HoverCard } from './components/ui/hover-card/index.js';
|
|
22
|
+
export { Input } from './components/ui/input/index.js';
|
|
23
|
+
export { Label } from './components/ui/label/index.js';
|
|
24
|
+
export * as Menubar from './components/ui/menubar/index.js';
|
|
25
|
+
export { ModeWatcher } from './components/ui/theme-switcher/index.js';
|
|
26
|
+
// export { NavigationMenu } from './components/ui/navigation-menu/index.js';
|
|
27
|
+
// export { NumberInput } from './components/ui/number-input/index.js';
|
|
28
|
+
export * as Pagination from './components/ui/pagination/index.js';
|
|
29
|
+
export * as Popover from './components/ui/popover/index.js';
|
|
30
|
+
export { Progress } from './components/ui/progress/index.js';
|
|
31
|
+
export * as RadioGroup from './components/ui/radio-group/index.js';
|
|
32
|
+
export * as RangeCalendar from './components/ui/range-calendar/index.js';
|
|
33
|
+
export * as Resizable from './components/ui/resizable/index.js';
|
|
34
|
+
export * as ScrollArea from './components/ui/scroll-area/index.js';
|
|
35
|
+
export * as Select from './components/ui/select/index.js';
|
|
36
|
+
export { Separator } from './components/ui/separator/index.js';
|
|
37
|
+
export * as Sheet from './components/ui/sheet/index.js';
|
|
38
|
+
export { Skeleton } from './components/ui/skeleton/index.js';
|
|
39
|
+
export { Slider } from './components/ui/slider/index.js';
|
|
40
|
+
export * as Sonner from './components/ui/sonner/index.js';
|
|
41
|
+
export { Switch } from './components/ui/switch/index.js';
|
|
42
|
+
export * as Table from './components/ui/table/index.js';
|
|
43
|
+
export * as Tabs from './components/ui/tabs/index.js';
|
|
44
|
+
export { Textarea } from './components/ui/textarea/index.js';
|
|
45
|
+
export { ThemeSwitcherButton, ThemeSwitcherDropdown } from './components/ui/theme-switcher/index.js';
|
|
46
|
+
export * as ToggleGroup from './components/ui/toggle-group/index.js';
|
|
47
|
+
export { Toggle } from './components/ui/toggle/index.js';
|
|
48
|
+
export { Tooltip } from './components/ui/tooltip/index.js';
|
|
49
|
+
export { H1, H2, H3, H4, P } from './components/ui/typography/index.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ClassValue, TVVariantKeys } from 'tailwind-variants';
|
|
2
|
+
type TVSlots = Record<string, ClassValue> | undefined;
|
|
3
|
+
type TVBaseName = 'base';
|
|
4
|
+
type TVSlotsWithBase<S extends TVSlots, B extends ClassValue> = B extends undefined ? keyof S : keyof S | TVBaseName;
|
|
5
|
+
type SlotsClassValue<S extends TVSlots, B extends ClassValue> = {
|
|
6
|
+
[K in TVSlotsWithBase<S, B>]?: ClassValue;
|
|
7
|
+
};
|
|
8
|
+
type TVVariantsDefault<S extends TVSlots, B extends ClassValue> = S extends undefined ? {} : {
|
|
9
|
+
[key: string]: {
|
|
10
|
+
[key: string]: S extends TVSlots ? SlotsClassValue<S, B> | ClassValue : ClassValue;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type VariantProps<T> = T extends {
|
|
14
|
+
variants: infer V;
|
|
15
|
+
} ? V extends TVVariantsDefault<any, undefined> ? {
|
|
16
|
+
[K in TVVariantKeys<V, any>[number]]?: keyof V[K];
|
|
17
|
+
} : never : never;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"svelte": "./dist/index.js",
|
|
81
81
|
"type": "module",
|
|
82
82
|
"types": "./dist/index.d.ts",
|
|
83
|
-
"version": "2.0.0-alpha.
|
|
84
|
-
"gitHead": "
|
|
83
|
+
"version": "2.0.0-alpha.33",
|
|
84
|
+
"gitHead": "1bec247b4709828d586f16653b93414ca53bf4ac"
|
|
85
85
|
}
|