@nasa-jpl/stellar-svelte 2.0.0-alpha.71 → 2.1.10
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/alert-description.svelte +3 -1
- package/dist/components/ui/alert/alert-description.svelte.d.ts +4 -1
- package/dist/components/ui/alert/alert-title.svelte +6 -4
- package/dist/components/ui/alert/alert-title.svelte.d.ts +3 -2
- package/dist/components/ui/alert/alert.svelte +7 -2
- package/dist/components/ui/alert/alert.svelte.d.ts +2 -1
- package/dist/components/ui/alert/index.d.ts +102 -3
- package/dist/components/ui/alert/index.js +17 -1
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +1 -1
- package/dist/components/ui/badge/index.d.ts +2 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/calendar/calendar-day.svelte.d.ts +1 -1
- package/dist/components/ui/calendar/calendar-next-button.svelte.d.ts +1 -1
- package/dist/components/ui/calendar/calendar-prev-button.svelte.d.ts +1 -1
- package/dist/components/ui/command/command-empty.svelte +3 -1
- package/dist/components/ui/command/command-group.svelte +11 -8
- package/dist/components/ui/command/command-group.svelte.d.ts +1 -1
- package/dist/components/ui/command/command-input.svelte +7 -3
- package/dist/components/ui/command/command-item.svelte +5 -1
- package/dist/components/ui/command/command-shortcut.svelte +3 -1
- package/dist/components/ui/command/command.svelte +3 -0
- package/dist/components/ui/command/index.d.ts +58 -11
- package/dist/components/ui/command/index.js +61 -12
- package/dist/components/ui/form/form-field-errors.svelte.d.ts +1 -1
- package/dist/components/ui/form/form-legend.svelte.d.ts +1 -1
- package/dist/components/ui/label/label.svelte.d.ts +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte.d.ts +1 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte.d.ts +1 -1
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +1 -1
- package/dist/components/ui/select/select-trigger.svelte.d.ts +1 -1
- package/dist/components/ui/sheet/index.d.ts +2 -2
- package/dist/components/ui/table/index.d.ts +2 -2
- package/dist/components/ui/table/table-cell.svelte.d.ts +1 -1
- package/dist/components/ui/table/table-header.svelte.d.ts +1 -1
- package/dist/components/ui/table/table-row.svelte.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts +2 -2
- package/dist/components/ui/toggle-group/index.d.ts +1 -1
- package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +2 -2
- package/dist/components/ui/tooltip/index.d.ts +2 -1
- package/dist/components/ui/tooltip/index.js +3 -2
- package/dist/components/ui/tooltip/tooltip-arrow.svelte +10 -0
- package/dist/components/ui/tooltip/tooltip-arrow.svelte.d.ts +17 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +8 -11
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +1 -1
- package/dist/index.css +64 -19
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +4 -4
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +0 -25
- package/dist/components/ui/command/command-dialog.svelte.d.ts +0 -40
- package/dist/components/ui/command/command.svelte.d.ts +0 -19
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte.d.ts +0 -24
- package/dist/components/ui/context-menu/context-menu-label.svelte.d.ts +0 -25
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte.d.ts +0 -23
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte.d.ts +0 -23
- package/dist/components/ui/drawer/index.d.ts +0 -13
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +0 -24
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +0 -25
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +0 -23
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +0 -23
- package/dist/components/ui/menubar/menubar-label.svelte.d.ts +0 -23
- package/dist/components/ui/menubar/menubar-sub-trigger.svelte.d.ts +0 -21
- package/dist/components/ui/resizable/resizable-handle.svelte.d.ts +0 -23
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +0 -25
- package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +0 -29
- package/dist/components/ui/select/select-content.svelte.d.ts +0 -38
- package/dist/components/ui/select/select-item.svelte.d.ts +0 -34
- package/dist/components/ui/select/select-label.svelte.d.ts +0 -24
- package/dist/components/ui/sheet/sheet-content.svelte.d.ts +0 -30
- package/dist/components/ui/toggle/toggle.svelte.d.ts +0 -25
- package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +0 -38
- package/dist/components/ui/typography/H1.svelte +0 -8
- package/dist/components/ui/typography/H1.svelte.d.ts +0 -21
- package/dist/components/ui/typography/H2.svelte +0 -8
- package/dist/components/ui/typography/H2.svelte.d.ts +0 -21
- package/dist/components/ui/typography/H3.svelte +0 -8
- package/dist/components/ui/typography/H3.svelte.d.ts +0 -21
- package/dist/components/ui/typography/H4.svelte +0 -8
- package/dist/components/ui/typography/H4.svelte.d.ts +0 -21
- package/dist/components/ui/typography/P.svelte +0 -8
- package/dist/components/ui/typography/P.svelte.d.ts +0 -21
- package/dist/components/ui/typography/index.d.ts +0 -6
- package/dist/components/ui/typography/index.js +0 -6
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { alertSizeVariants } from "./index.js";
|
|
2
3
|
let className = void 0;
|
|
4
|
+
export let size = "default";
|
|
3
5
|
export { className as class };
|
|
4
6
|
</script>
|
|
5
7
|
|
|
6
|
-
<div class={cn('text-sm [&_p]:leading-relaxed', className)} {...$$restProps}>
|
|
8
|
+
<div class={cn('text-sm [&_p]:leading-relaxed', alertSizeVariants.size[size].description, className)} {...$$restProps}>
|
|
7
9
|
<slot />
|
|
8
10
|
</div>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { type AlertSize } from './index.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
|
-
props: HTMLAttributes<HTMLDivElement
|
|
5
|
+
props: HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
size?: AlertSize;
|
|
7
|
+
};
|
|
5
8
|
events: {
|
|
6
9
|
[evt: string]: CustomEvent<any>;
|
|
7
10
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { alertSizeVariants } from "./index.js";
|
|
2
3
|
let className = void 0;
|
|
3
4
|
export let level = "h5";
|
|
5
|
+
export let size = "default";
|
|
4
6
|
export { className as class };
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<svelte:element
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
this={level}
|
|
11
|
+
class={cn('mb-1 font-medium leading-none tracking-tight', alertSizeVariants.size[size].title, className)}
|
|
12
|
+
{...$$restProps}
|
|
11
13
|
>
|
|
12
|
-
|
|
14
|
+
<slot />
|
|
13
15
|
</svelte:element>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from
|
|
3
|
-
import type
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { type AlertSize, type HeadingLevel } from './index.js';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: HTMLAttributes<HTMLHeadingElement> & {
|
|
6
6
|
level?: HeadingLevel;
|
|
7
|
+
size?: AlertSize;
|
|
7
8
|
};
|
|
8
9
|
events: {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<script>import { cn } from "../../../utils.js";
|
|
2
|
-
import { alertVariants } from "./index.js";
|
|
2
|
+
import { alertSizeVariants, alertVariants } from "./index.js";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let variant = "default";
|
|
5
|
+
export let size = "default";
|
|
5
6
|
export { className as class };
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
|
-
<div
|
|
9
|
+
<div
|
|
10
|
+
class={cn(alertVariants({ variant, size }), alertSizeVariants.size[size].alert, className)}
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
role="alert"
|
|
13
|
+
>
|
|
9
14
|
<slot />
|
|
10
15
|
</div>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
import { type Variant } from './index.js';
|
|
3
|
+
import { type AlertSize, type Variant } from './index.js';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: HTMLAttributes<HTMLDivElement> & {
|
|
6
6
|
variant?: Variant;
|
|
7
|
+
size?: AlertSize;
|
|
7
8
|
};
|
|
8
9
|
events: {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,42 +2,141 @@ import type { VariantProps } from '../../../types/tailwind.js';
|
|
|
2
2
|
import Description from './alert-description.svelte';
|
|
3
3
|
import Title from './alert-title.svelte';
|
|
4
4
|
import Root from './alert.svelte';
|
|
5
|
+
declare const alertSizeVariants: {
|
|
6
|
+
size: {
|
|
7
|
+
default: {
|
|
8
|
+
alert: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
alert: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
5
19
|
export declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
20
|
+
size: {
|
|
21
|
+
default: {
|
|
22
|
+
alert: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
lg: {
|
|
27
|
+
alert: string;
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
6
32
|
variant: {
|
|
7
33
|
default: string;
|
|
8
34
|
destructive: string;
|
|
9
35
|
};
|
|
10
|
-
}, undefined, "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", import("tailwind-variants/dist/config").TVConfig<{
|
|
36
|
+
}, undefined, "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", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
37
|
+
size: {
|
|
38
|
+
default: {
|
|
39
|
+
alert: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
lg: {
|
|
44
|
+
alert: string;
|
|
45
|
+
title: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
11
49
|
variant: {
|
|
12
50
|
default: string;
|
|
13
51
|
destructive: string;
|
|
14
52
|
};
|
|
15
53
|
}, {
|
|
54
|
+
size: {
|
|
55
|
+
default: {
|
|
56
|
+
alert: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
lg: {
|
|
61
|
+
alert: string;
|
|
62
|
+
title: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
16
66
|
variant: {
|
|
17
67
|
default: string;
|
|
18
68
|
destructive: string;
|
|
19
69
|
};
|
|
20
70
|
}>, {
|
|
71
|
+
size: {
|
|
72
|
+
default: {
|
|
73
|
+
alert: string;
|
|
74
|
+
title: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
lg: {
|
|
78
|
+
alert: string;
|
|
79
|
+
title: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
21
83
|
variant: {
|
|
22
84
|
default: string;
|
|
23
85
|
destructive: string;
|
|
24
86
|
};
|
|
25
87
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
88
|
+
size: {
|
|
89
|
+
default: {
|
|
90
|
+
alert: string;
|
|
91
|
+
title: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
lg: {
|
|
95
|
+
alert: string;
|
|
96
|
+
title: string;
|
|
97
|
+
description: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
26
100
|
variant: {
|
|
27
101
|
default: string;
|
|
28
102
|
destructive: string;
|
|
29
103
|
};
|
|
30
|
-
}, undefined, "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", import("tailwind-variants/dist/config").TVConfig<{
|
|
104
|
+
}, undefined, "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", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
105
|
+
size: {
|
|
106
|
+
default: {
|
|
107
|
+
alert: string;
|
|
108
|
+
title: string;
|
|
109
|
+
description: string;
|
|
110
|
+
};
|
|
111
|
+
lg: {
|
|
112
|
+
alert: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
31
117
|
variant: {
|
|
32
118
|
default: string;
|
|
33
119
|
destructive: string;
|
|
34
120
|
};
|
|
35
121
|
}, {
|
|
122
|
+
size: {
|
|
123
|
+
default: {
|
|
124
|
+
alert: string;
|
|
125
|
+
title: string;
|
|
126
|
+
description: string;
|
|
127
|
+
};
|
|
128
|
+
lg: {
|
|
129
|
+
alert: string;
|
|
130
|
+
title: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
36
134
|
variant: {
|
|
37
135
|
default: string;
|
|
38
136
|
destructive: string;
|
|
39
137
|
};
|
|
40
138
|
}>, unknown, unknown, undefined>>;
|
|
139
|
+
export type AlertSize = 'default' | 'lg';
|
|
41
140
|
export type Variant = VariantProps<typeof alertVariants>['variant'];
|
|
42
141
|
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
43
|
-
export { Root as Alert, Description as AlertDescription, Title as AlertTitle, Description, Root, Title, };
|
|
142
|
+
export { Root as Alert, Description as AlertDescription, alertSizeVariants, Title as AlertTitle, Description, Root, Title, };
|
|
@@ -2,6 +2,20 @@ import { tv } from 'tailwind-variants';
|
|
|
2
2
|
import Description from './alert-description.svelte';
|
|
3
3
|
import Title from './alert-title.svelte';
|
|
4
4
|
import Root from './alert.svelte';
|
|
5
|
+
const alertSizeVariants = {
|
|
6
|
+
size: {
|
|
7
|
+
default: {
|
|
8
|
+
alert: 'p-2.5 [&:has(svg)]:pl-10 [&>svg]:left-3 [&>svg]:top-3',
|
|
9
|
+
title: 'text-sm mb-0',
|
|
10
|
+
description: 'text-xs leading-5',
|
|
11
|
+
},
|
|
12
|
+
lg: {
|
|
13
|
+
alert: '',
|
|
14
|
+
title: '',
|
|
15
|
+
description: '',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
5
19
|
export const alertVariants = tv({
|
|
6
20
|
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
21
|
variants: {
|
|
@@ -9,11 +23,13 @@ export const alertVariants = tv({
|
|
|
9
23
|
default: 'bg-background text-foreground',
|
|
10
24
|
destructive: 'border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
11
25
|
},
|
|
26
|
+
...alertSizeVariants,
|
|
12
27
|
},
|
|
13
28
|
defaultVariants: {
|
|
14
29
|
variant: 'default',
|
|
30
|
+
size: 'default',
|
|
15
31
|
},
|
|
16
32
|
});
|
|
17
33
|
export {
|
|
18
34
|
//
|
|
19
|
-
Root as Alert, Description as AlertDescription, Title as AlertTitle, Description, Root, Title, };
|
|
35
|
+
Root as Alert, Description as AlertDescription, alertSizeVariants, Title as AlertTitle, Description, Root, Title, };
|
|
@@ -9,7 +9,7 @@ declare const __propDef: {
|
|
|
9
9
|
} & {
|
|
10
10
|
[x: `data-melt-${string}`]: "";
|
|
11
11
|
} & {
|
|
12
|
-
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/dialog/events").DialogEvents["close"]>;
|
|
12
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/dialog/events.js").DialogEvents["close"]>;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -9,7 +9,7 @@ declare const __propDef: {
|
|
|
9
9
|
} & {
|
|
10
10
|
[x: `data-melt-${string}`]: "";
|
|
11
11
|
} & {
|
|
12
|
-
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/dialog/events").DialogEvents["close"]>;
|
|
12
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/dialog/events.js").DialogEvents["close"]>;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -7,7 +7,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
7
7
|
destructive: string;
|
|
8
8
|
outline: string;
|
|
9
9
|
};
|
|
10
|
-
}, undefined, "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", import("tailwind-variants/dist/config").TVConfig<{
|
|
10
|
+
}, undefined, "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", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
11
11
|
variant: {
|
|
12
12
|
default: string;
|
|
13
13
|
secondary: string;
|
|
@@ -35,7 +35,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
35
35
|
destructive: string;
|
|
36
36
|
outline: string;
|
|
37
37
|
};
|
|
38
|
-
}, undefined, "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", import("tailwind-variants/dist/config").TVConfig<{
|
|
38
|
+
}, undefined, "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", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
39
39
|
variant: {
|
|
40
40
|
default: string;
|
|
41
41
|
secondary: string;
|
|
@@ -22,7 +22,7 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
22
22
|
'icon-lg': string;
|
|
23
23
|
'icon-xl': string;
|
|
24
24
|
};
|
|
25
|
-
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
|
|
25
|
+
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
26
26
|
variant: {
|
|
27
27
|
default: string;
|
|
28
28
|
destructive: string;
|
|
@@ -106,7 +106,7 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
106
106
|
'icon-lg': string;
|
|
107
107
|
'icon-xl': string;
|
|
108
108
|
};
|
|
109
|
-
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
|
|
109
|
+
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
110
110
|
variant: {
|
|
111
111
|
default: string;
|
|
112
112
|
destructive: string;
|
|
@@ -24,7 +24,7 @@ declare const __propDef: {
|
|
|
24
24
|
} & {
|
|
25
25
|
[x: `data-melt-${string}`]: "";
|
|
26
26
|
} & {
|
|
27
|
-
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/calendar/events").CalendarEvents["cell"]>;
|
|
27
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/calendar/events.js").CalendarEvents["cell"]>;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
@@ -14,7 +14,7 @@ declare const __propDef: {
|
|
|
14
14
|
} & {
|
|
15
15
|
[x: `data-melt-${string}`]: "";
|
|
16
16
|
} & {
|
|
17
|
-
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/calendar/events").CalendarEvents["nextButton"]>;
|
|
17
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/calendar/events.js").CalendarEvents["nextButton"]>;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -14,7 +14,7 @@ declare const __propDef: {
|
|
|
14
14
|
} & {
|
|
15
15
|
[x: `data-melt-${string}`]: "";
|
|
16
16
|
} & {
|
|
17
|
-
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/calendar/events").CalendarEvents["prevButton"]>;
|
|
17
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<import("@melt-ui/svelte/dist/builders/calendar/events.js").CalendarEvents["prevButton"]>;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
|
+
import { commandSizeVariants, getCommandCtx } from "./index.js";
|
|
3
4
|
let className = void 0;
|
|
4
5
|
export { className as class };
|
|
6
|
+
const { size } = getCommandCtx();
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
|
-
<CommandPrimitive.Empty class={cn("
|
|
9
|
+
<CommandPrimitive.Empty class={cn("text-center", commandSizeVariants.empty[size], className)} {...$$restProps}>
|
|
8
10
|
<slot />
|
|
9
11
|
</CommandPrimitive.Empty>
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
import { commandSizeVariants, getCommandCtx } from "./index.js";
|
|
3
4
|
let className = void 0;
|
|
4
5
|
export { className as class };
|
|
6
|
+
const { size } = getCommandCtx();
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<CommandPrimitive.Group
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
class={cn(
|
|
11
|
+
'text-foreground [&_[data-cmdk-group-heading]]:text-xs [&_[data-cmdk-group-heading]]:text-muted-foreground overflow-hidden [&_[data-cmdk-group-heading]]:font-medium',
|
|
12
|
+
commandSizeVariants.group[size],
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...$$restProps}
|
|
13
16
|
>
|
|
14
|
-
|
|
17
|
+
<slot />
|
|
15
18
|
</CommandPrimitive.Group>
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
2
|
import Search from "lucide-svelte/icons/search";
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
|
+
import { commandSizeVariants, getCommandCtx } from "./index.js";
|
|
4
5
|
let className = void 0;
|
|
5
6
|
export { className as class };
|
|
6
7
|
export let value = "";
|
|
8
|
+
const { size } = getCommandCtx();
|
|
7
9
|
</script>
|
|
8
10
|
|
|
9
|
-
<div class="flex items-center border-b
|
|
10
|
-
<Search class="
|
|
11
|
+
<div class={cn("flex items-center border-b", commandSizeVariants.inputWrapper[size])} data-cmdk-input-wrapper="">
|
|
12
|
+
<Search class={cn("shrink-0 opacity-50", commandSizeVariants.inputIcon[size])} />
|
|
11
13
|
<CommandPrimitive.Input
|
|
12
14
|
class={cn(
|
|
13
|
-
"placeholder:text-muted-foreground flex
|
|
15
|
+
"placeholder:text-muted-foreground flex w-full rounded-md bg-transparent outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
commandSizeVariants.input[size],
|
|
17
|
+
commandSizeVariants.text[size],
|
|
14
18
|
className
|
|
15
19
|
)}
|
|
16
20
|
{...$$restProps}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
|
+
import { commandSizeVariants, getCommandCtx } from "./index.js";
|
|
3
4
|
export let asChild = false;
|
|
4
5
|
let className = void 0;
|
|
5
6
|
export { className as class };
|
|
7
|
+
const { size } = getCommandCtx();
|
|
6
8
|
</script>
|
|
7
9
|
|
|
8
10
|
<CommandPrimitive.Item
|
|
9
11
|
{asChild}
|
|
10
12
|
class={cn(
|
|
11
|
-
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm
|
|
13
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
14
|
+
commandSizeVariants.item[size],
|
|
15
|
+
commandSizeVariants.text[size],
|
|
12
16
|
className
|
|
13
17
|
)}
|
|
14
18
|
{...$$restProps}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { commandSizeVariants, getCommandCtx } from "./index.js";
|
|
2
3
|
let className = void 0;
|
|
3
4
|
export { className as class };
|
|
5
|
+
const { size } = getCommandCtx();
|
|
4
6
|
</script>
|
|
5
7
|
|
|
6
8
|
<span
|
|
7
|
-
class={cn("text-muted-foreground ml-auto
|
|
9
|
+
class={cn("text-muted-foreground ml-auto tracking-widest", commandSizeVariants.shortcut[size], className)}
|
|
8
10
|
{...$$restProps}
|
|
9
11
|
>
|
|
10
12
|
<slot />
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
|
+
import { setCommandCtx } from "./index.js";
|
|
3
4
|
export let value = void 0;
|
|
5
|
+
export let size = "default";
|
|
4
6
|
let className = void 0;
|
|
5
7
|
export { className as class };
|
|
8
|
+
setCommandCtx(size);
|
|
6
9
|
</script>
|
|
7
10
|
|
|
8
11
|
<CommandPrimitive.Root
|
|
@@ -1,12 +1,59 @@
|
|
|
1
|
-
import { Command as CommandPrimitive } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import Item from
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { Command as CommandPrimitive } from 'cmdk-sv';
|
|
2
|
+
import Dialog from './command-dialog.svelte';
|
|
3
|
+
import Empty from './command-empty.svelte';
|
|
4
|
+
import Group from './command-group.svelte';
|
|
5
|
+
import Input from './command-input.svelte';
|
|
6
|
+
import Item from './command-item.svelte';
|
|
7
|
+
import List from './command-list.svelte';
|
|
8
|
+
import Separator from './command-separator.svelte';
|
|
9
|
+
import Shortcut from './command-shortcut.svelte';
|
|
10
|
+
import Root from './command.svelte';
|
|
11
11
|
declare const Loading: typeof CommandPrimitive.Loading;
|
|
12
|
-
export
|
|
12
|
+
export type CommandSize = 'default' | 'sm' | 'xs';
|
|
13
|
+
export declare const commandSizeVariants: {
|
|
14
|
+
input: {
|
|
15
|
+
default: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
xs: string;
|
|
18
|
+
};
|
|
19
|
+
inputWrapper: {
|
|
20
|
+
default: string;
|
|
21
|
+
sm: string;
|
|
22
|
+
xs: string;
|
|
23
|
+
};
|
|
24
|
+
inputIcon: {
|
|
25
|
+
default: string;
|
|
26
|
+
sm: string;
|
|
27
|
+
xs: string;
|
|
28
|
+
};
|
|
29
|
+
item: {
|
|
30
|
+
default: string;
|
|
31
|
+
sm: string;
|
|
32
|
+
xs: string;
|
|
33
|
+
};
|
|
34
|
+
group: {
|
|
35
|
+
default: string;
|
|
36
|
+
sm: string;
|
|
37
|
+
xs: string;
|
|
38
|
+
};
|
|
39
|
+
shortcut: {
|
|
40
|
+
default: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
xs: string;
|
|
43
|
+
};
|
|
44
|
+
empty: {
|
|
45
|
+
default: string;
|
|
46
|
+
sm: string;
|
|
47
|
+
xs: string;
|
|
48
|
+
};
|
|
49
|
+
text: {
|
|
50
|
+
default: string;
|
|
51
|
+
sm: string;
|
|
52
|
+
xs: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare function setCommandCtx(size: CommandSize): void;
|
|
56
|
+
export declare function getCommandCtx(): {
|
|
57
|
+
size: CommandSize;
|
|
58
|
+
};
|
|
59
|
+
export { Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Input as CommandInput, Item as CommandItem, List as CommandList, Loading as CommandLoading, Separator as CommandSeparator, Shortcut as CommandShortcut, Dialog, Empty, Group, Input, Item, List, Loading, Root, Separator, Shortcut, };
|
|
@@ -1,14 +1,63 @@
|
|
|
1
|
-
import { Command as CommandPrimitive } from
|
|
2
|
-
import
|
|
3
|
-
import Dialog from
|
|
4
|
-
import Empty from
|
|
5
|
-
import Group from
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import List from
|
|
9
|
-
import Separator from
|
|
10
|
-
import Shortcut from
|
|
1
|
+
import { Command as CommandPrimitive } from 'cmdk-sv';
|
|
2
|
+
import { getContext, setContext } from 'svelte';
|
|
3
|
+
import Dialog from './command-dialog.svelte';
|
|
4
|
+
import Empty from './command-empty.svelte';
|
|
5
|
+
import Group from './command-group.svelte';
|
|
6
|
+
import Input from './command-input.svelte';
|
|
7
|
+
import Item from './command-item.svelte';
|
|
8
|
+
import List from './command-list.svelte';
|
|
9
|
+
import Separator from './command-separator.svelte';
|
|
10
|
+
import Shortcut from './command-shortcut.svelte';
|
|
11
|
+
import Root from './command.svelte';
|
|
11
12
|
const Loading = CommandPrimitive.Loading;
|
|
12
|
-
export
|
|
13
|
+
export const commandSizeVariants = {
|
|
14
|
+
input: {
|
|
15
|
+
default: 'h-11 py-3',
|
|
16
|
+
sm: 'h-9 py-2',
|
|
17
|
+
xs: 'h-7 py-1.5',
|
|
18
|
+
},
|
|
19
|
+
inputWrapper: {
|
|
20
|
+
default: 'px-2',
|
|
21
|
+
sm: 'px-2',
|
|
22
|
+
xs: 'px-1.5',
|
|
23
|
+
},
|
|
24
|
+
inputIcon: {
|
|
25
|
+
default: 'h-4 w-4 mr-2',
|
|
26
|
+
sm: 'h-4 w-4 mr-2',
|
|
27
|
+
xs: 'h-3 w-3 mr-1.5',
|
|
28
|
+
},
|
|
29
|
+
item: {
|
|
30
|
+
default: 'px-2 py-1.5',
|
|
31
|
+
sm: 'px-2 py-1',
|
|
32
|
+
xs: 'px-1.5 py-1',
|
|
33
|
+
},
|
|
34
|
+
group: {
|
|
35
|
+
default: 'p-1 [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:py-1.5',
|
|
36
|
+
sm: 'p-1 [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:py-1',
|
|
37
|
+
xs: 'p-0.5 [&_[data-cmdk-group-heading]]:px-1.5 [&_[data-cmdk-group-heading]]:py-1.5',
|
|
38
|
+
},
|
|
39
|
+
shortcut: {
|
|
40
|
+
default: 'text-xs',
|
|
41
|
+
sm: 'text-xs',
|
|
42
|
+
xs: 'text-[10px]',
|
|
43
|
+
},
|
|
44
|
+
empty: {
|
|
45
|
+
default: 'py-6 text-sm',
|
|
46
|
+
sm: 'py-4 text-sm',
|
|
47
|
+
xs: 'py-3 text-xs',
|
|
48
|
+
},
|
|
49
|
+
text: {
|
|
50
|
+
default: 'text-sm',
|
|
51
|
+
sm: 'text-sm',
|
|
52
|
+
xs: 'text-xs',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export function setCommandCtx(size) {
|
|
56
|
+
setContext('command', { size });
|
|
57
|
+
}
|
|
58
|
+
export function getCommandCtx() {
|
|
59
|
+
return getContext('command') ?? { size: 'default' };
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
13
62
|
//
|
|
14
|
-
Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup,
|
|
63
|
+
Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Input as CommandInput, Item as CommandItem, List as CommandList, Loading as CommandLoading, Separator as CommandSeparator, Shortcut as CommandShortcut, Dialog, Empty, Group, Input, Item, List, Loading, Root, Separator, Shortcut, };
|
|
@@ -5,7 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
id?: string;
|
|
6
6
|
asChild?: boolean;
|
|
7
7
|
el?: HTMLDivElement;
|
|
8
|
-
} & import("svelte/elements
|
|
8
|
+
} & import("svelte/elements").HTMLAttributes<HTMLDivElement> & {
|
|
9
9
|
errorClasses?: string | undefined | null;
|
|
10
10
|
size?: LabelSize;
|
|
11
11
|
};
|