@kayord/ui 2.0.3 → 2.0.4
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/button-group/button-group-separator.svelte +7 -1
- package/dist/components/ui/button-group/button-group-separator.svelte.d.ts +1 -1
- package/dist/components/ui/button-group/button-group-text.svelte +8 -11
- package/dist/components/ui/button-group/button-group-text.svelte.d.ts +3 -2
- package/dist/components/ui/button-group/button-group.svelte +5 -3
- package/dist/components/ui/button-group/button-group.svelte.d.ts +4 -3
- package/dist/components/ui/empty/empty-content.svelte +8 -2
- package/dist/components/ui/empty/empty-content.svelte.d.ts +2 -1
- package/dist/components/ui/empty/empty-description.svelte +8 -2
- package/dist/components/ui/empty/empty-description.svelte.d.ts +2 -1
- package/dist/components/ui/empty/empty-header.svelte +8 -2
- package/dist/components/ui/empty/empty-header.svelte.d.ts +2 -1
- package/dist/components/ui/empty/empty-media.svelte +4 -2
- package/dist/components/ui/empty/empty-media.svelte.d.ts +3 -2
- package/dist/components/ui/empty/empty-title.svelte +8 -3
- package/dist/components/ui/empty/empty-title.svelte.d.ts +2 -1
- package/dist/components/ui/empty/empty.svelte +8 -2
- package/dist/components/ui/empty/empty.svelte.d.ts +2 -1
- package/dist/components/ui/field/field-content.svelte +8 -2
- package/dist/components/ui/field/field-content.svelte.d.ts +2 -1
- package/dist/components/ui/field/field-description.svelte +8 -2
- package/dist/components/ui/field/field-description.svelte.d.ts +2 -1
- package/dist/components/ui/field/field-error.svelte +4 -2
- package/dist/components/ui/field/field-error.svelte.d.ts +3 -2
- package/dist/components/ui/field/field-group.svelte +8 -2
- package/dist/components/ui/field/field-group.svelte.d.ts +2 -1
- package/dist/components/ui/field/field-legend.svelte +4 -2
- package/dist/components/ui/field/field-legend.svelte.d.ts +3 -2
- package/dist/components/ui/field/field-separator.svelte +4 -2
- package/dist/components/ui/field/field-separator.svelte.d.ts +3 -2
- package/dist/components/ui/field/field-set.svelte +8 -2
- package/dist/components/ui/field/field-set.svelte.d.ts +2 -1
- package/dist/components/ui/field/field-title.svelte +8 -2
- package/dist/components/ui/field/field-title.svelte.d.ts +2 -1
- package/dist/components/ui/field/field.svelte +5 -3
- package/dist/components/ui/field/field.svelte.d.ts +4 -3
- package/dist/components/ui/input-group/input-group-addon.svelte +5 -3
- package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +4 -3
- package/dist/components/ui/input-group/input-group-button.svelte +9 -1
- package/dist/components/ui/input-group/input-group-button.svelte.d.ts +1 -1
- package/dist/components/ui/input-group/input-group-input.svelte +7 -1
- package/dist/components/ui/input-group/input-group-input.svelte.d.ts +1 -1
- package/dist/components/ui/input-group/input-group-text.svelte +8 -2
- package/dist/components/ui/input-group/input-group-text.svelte.d.ts +2 -1
- package/dist/components/ui/input-group/input-group-textarea.svelte +7 -1
- package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +1 -1
- package/dist/components/ui/input-group/input-group.svelte +8 -2
- package/dist/components/ui/input-group/input-group.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-actions.svelte +8 -3
- package/dist/components/ui/item/item-actions.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-content.svelte +8 -2
- package/dist/components/ui/item/item-content.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-description.svelte +8 -2
- package/dist/components/ui/item/item-description.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-footer.svelte +13 -3
- package/dist/components/ui/item/item-footer.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-group.svelte +14 -3
- package/dist/components/ui/item/item-group.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-header.svelte +13 -3
- package/dist/components/ui/item/item-header.svelte.d.ts +2 -1
- package/dist/components/ui/item/item-media.svelte +11 -4
- package/dist/components/ui/item/item-media.svelte.d.ts +4 -3
- package/dist/components/ui/item/item-separator.svelte +2 -2
- package/dist/components/ui/item/item-separator.svelte.d.ts +1 -1
- package/dist/components/ui/item/item-title.svelte +8 -2
- package/dist/components/ui/item/item-title.svelte.d.ts +2 -1
- package/dist/components/ui/item/item.svelte +6 -7
- package/dist/components/ui/item/item.svelte.d.ts +4 -3
- package/dist/components/ui/kbd/kbd-group.svelte +8 -3
- package/dist/components/ui/kbd/kbd-group.svelte.d.ts +2 -1
- package/dist/components/ui/kbd/kbd.svelte +8 -2
- package/dist/components/ui/kbd/kbd.svelte.d.ts +2 -1
- package/dist/components/ui/native-select/index.d.ts +4 -0
- package/dist/components/ui/native-select/index.js +4 -0
- package/dist/components/ui/native-select/native-select-opt-group.svelte +10 -0
- package/dist/components/ui/native-select/native-select-opt-group.svelte.d.ts +5 -0
- package/dist/components/ui/native-select/native-select-option.svelte +10 -0
- package/dist/components/ui/native-select/native-select-option.svelte.d.ts +5 -0
- package/dist/components/ui/native-select/native-select.svelte +35 -0
- package/dist/components/ui/native-select/native-select.svelte.d.ts +5 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte +3 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +2 -1
- package/dist/components/ui/spinner/spinner.svelte +1 -3
- package/package.json +17 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
declare const fieldVariants: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
export declare const fieldVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
orientation: {
|
|
4
4
|
vertical: string;
|
|
5
5
|
horizontal: string[];
|
|
@@ -19,10 +19,11 @@ declare const fieldVariants: import("tailwind-variants").TVReturnType<{
|
|
|
19
19
|
};
|
|
20
20
|
}, undefined, "group/field data-[invalid=true]:text-destructive flex w-full gap-3", unknown, unknown, undefined>>;
|
|
21
21
|
export type FieldOrientation = VariantProps<typeof fieldVariants>["orientation"];
|
|
22
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
22
23
|
import type { HTMLAttributes } from "svelte/elements";
|
|
23
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
24
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
24
25
|
orientation?: FieldOrientation;
|
|
25
26
|
};
|
|
26
|
-
declare const Field: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
27
|
+
declare const Field: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
27
28
|
type Field = ReturnType<typeof Field>;
|
|
28
29
|
export default Field;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
-
const inputGroupAddonVariants = tv({
|
|
3
|
+
export const inputGroupAddonVariants = tv({
|
|
4
4
|
base: "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
5
5
|
variants: {
|
|
6
6
|
align: {
|
|
@@ -20,20 +20,22 @@
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<script lang="ts">
|
|
23
|
-
import { cn } from "../../../utils.js";
|
|
23
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
24
24
|
import type { HTMLAttributes } from "svelte/elements";
|
|
25
25
|
|
|
26
26
|
let {
|
|
27
|
+
ref = $bindable(null),
|
|
27
28
|
class: className,
|
|
28
29
|
children,
|
|
29
30
|
align = "inline-start",
|
|
30
31
|
...restProps
|
|
31
|
-
}: HTMLAttributes<HTMLDivElement
|
|
32
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
32
33
|
align?: InputGroupAddonAlign;
|
|
33
34
|
} = $props();
|
|
34
35
|
</script>
|
|
35
36
|
|
|
36
37
|
<div
|
|
38
|
+
bind:this={ref}
|
|
37
39
|
role="group"
|
|
38
40
|
data-slot="input-group-addon"
|
|
39
41
|
data-align={align}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
declare const inputGroupAddonVariants: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
export declare const inputGroupAddonVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
align: {
|
|
4
4
|
"inline-start": string;
|
|
5
5
|
"inline-end": string;
|
|
@@ -22,10 +22,11 @@ declare const inputGroupAddonVariants: import("tailwind-variants").TVReturnType<
|
|
|
22
22
|
};
|
|
23
23
|
}, undefined, "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", unknown, unknown, undefined>>;
|
|
24
24
|
export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>["align"];
|
|
25
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
25
26
|
import type { HTMLAttributes } from "svelte/elements";
|
|
26
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
27
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
27
28
|
align?: InputGroupAddonAlign;
|
|
28
29
|
};
|
|
29
|
-
declare const InputGroupAddon: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
30
|
+
declare const InputGroupAddon: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
30
31
|
type InputGroupAddon = ReturnType<typeof InputGroupAddon>;
|
|
31
32
|
export default InputGroupAddon;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import { Button } from "../button/index.js";
|
|
26
26
|
|
|
27
27
|
let {
|
|
28
|
+
ref = $bindable(null),
|
|
28
29
|
class: className,
|
|
29
30
|
children,
|
|
30
31
|
type = "button",
|
|
@@ -36,6 +37,13 @@
|
|
|
36
37
|
} = $props();
|
|
37
38
|
</script>
|
|
38
39
|
|
|
39
|
-
<Button
|
|
40
|
+
<Button
|
|
41
|
+
bind:ref
|
|
42
|
+
{type}
|
|
43
|
+
data-size={size}
|
|
44
|
+
{variant}
|
|
45
|
+
class={cn(inputGroupButtonVariants({ size }), className)}
|
|
46
|
+
{...restProps}
|
|
47
|
+
>
|
|
40
48
|
{@render children?.()}
|
|
41
49
|
</Button>
|
|
@@ -27,6 +27,6 @@ import { Button } from "../button/index.js";
|
|
|
27
27
|
type $$ComponentProps = Omit<ComponentProps<typeof Button>, "href" | "size"> & {
|
|
28
28
|
size?: InputGroupButtonSize;
|
|
29
29
|
};
|
|
30
|
-
declare const InputGroupButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
30
|
+
declare const InputGroupButton: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
31
31
|
type InputGroupButton = ReturnType<typeof InputGroupButton>;
|
|
32
32
|
export default InputGroupButton;
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
import type { ComponentProps } from "svelte";
|
|
4
4
|
import { Input } from "../input/index.js";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<typeof Input> = $props();
|
|
7
12
|
</script>
|
|
8
13
|
|
|
9
14
|
<Input
|
|
15
|
+
bind:ref
|
|
10
16
|
data-slot="input-group-control"
|
|
11
17
|
class={cn(
|
|
12
18
|
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
@@ -6,6 +6,6 @@ declare const InputGroupInput: import("svelte").Component<(Omit<import("svelte/e
|
|
|
6
6
|
files?: undefined;
|
|
7
7
|
})) & {
|
|
8
8
|
ref?: HTMLElement | null | undefined;
|
|
9
|
-
}, {}, "value">;
|
|
9
|
+
}, {}, "value" | "ref">;
|
|
10
10
|
type InputGroupInput = ReturnType<typeof InputGroupInput>;
|
|
11
11
|
export default InputGroupInput;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<span
|
|
14
|
+
bind:this={ref}
|
|
9
15
|
class={cn(
|
|
10
16
|
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
11
17
|
className
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const InputGroupText: import("svelte").Component<HTMLAttributes<HTMLSpanElement
|
|
3
|
+
declare const InputGroupText: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
3
4
|
type InputGroupText = ReturnType<typeof InputGroupText>;
|
|
4
5
|
export default InputGroupText;
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
import { Textarea } from "../textarea/index.js";
|
|
4
4
|
import type { ComponentProps } from "svelte";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<typeof Textarea> = $props();
|
|
7
12
|
</script>
|
|
8
13
|
|
|
9
14
|
<Textarea
|
|
15
|
+
bind:ref
|
|
10
16
|
data-slot="input-group-control"
|
|
11
17
|
class={cn(
|
|
12
18
|
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const InputGroupTextarea: import("svelte").Component<Omit<import("../../../utils.js").WithElementRef<import("svelte/elements").HTMLTextareaAttributes>, "children">, {}, "value">;
|
|
1
|
+
declare const InputGroupTextarea: import("svelte").Component<Omit<import("../../../utils.js").WithElementRef<import("svelte/elements").HTMLTextareaAttributes>, "children">, {}, "value" | "ref">;
|
|
2
2
|
type InputGroupTextarea = ReturnType<typeof InputGroupTextarea>;
|
|
3
3
|
export default InputGroupTextarea;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<div
|
|
14
|
+
bind:this={ref}
|
|
9
15
|
data-slot="input-group"
|
|
10
16
|
role="group"
|
|
11
17
|
class={cn(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const InputGroup: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const InputGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type InputGroup = ReturnType<typeof InputGroup>;
|
|
4
5
|
export default InputGroup;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
|
-
<div data-slot="item-actions" class={cn("flex items-center gap-2", className)} {...restProps}>
|
|
13
|
+
<div bind:this={ref} data-slot="item-actions" class={cn("flex items-center gap-2", className)} {...restProps}>
|
|
9
14
|
{@render children?.()}
|
|
10
15
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemActions: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const ItemActions: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type ItemActions = ReturnType<typeof ItemActions>;
|
|
4
5
|
export default ItemActions;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<div
|
|
14
|
+
bind:this={ref}
|
|
9
15
|
data-slot="item-content"
|
|
10
16
|
class={cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className)}
|
|
11
17
|
{...restProps}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemContent: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const ItemContent: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type ItemContent = ReturnType<typeof ItemContent>;
|
|
4
5
|
export default ItemContent;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLParagraphElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<p
|
|
14
|
+
bind:this={ref}
|
|
9
15
|
data-slot="item-description"
|
|
10
16
|
class={cn(
|
|
11
17
|
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemDescription: import("svelte").Component<HTMLAttributes<HTMLParagraphElement
|
|
3
|
+
declare const ItemDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
3
4
|
type ItemDescription = ReturnType<typeof ItemDescription>;
|
|
4
5
|
export default ItemDescription;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-footer"
|
|
16
|
+
class={cn("flex basis-full items-center justify-between gap-2", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
9
19
|
{@render children?.()}
|
|
10
20
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemFooter: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const ItemFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type ItemFooter = ReturnType<typeof ItemFooter>;
|
|
4
5
|
export default ItemFooter;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
role="list"
|
|
16
|
+
data-slot="item-group"
|
|
17
|
+
class={cn("group/item-group flex flex-col", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
>
|
|
9
20
|
{@render children?.()}
|
|
10
21
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemGroup: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const ItemGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type ItemGroup = ReturnType<typeof ItemGroup>;
|
|
4
5
|
export default ItemGroup;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-header"
|
|
16
|
+
class={cn("flex basis-full items-center justify-between gap-2", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
9
19
|
{@render children?.()}
|
|
10
20
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemHeader: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const ItemHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type ItemHeader = ReturnType<typeof ItemHeader>;
|
|
4
5
|
export default ItemHeader;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
|
-
const itemMediaVariants = tv({
|
|
4
|
+
export const itemMediaVariants = tv({
|
|
5
5
|
base: "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -19,17 +19,24 @@
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
|
-
import { cn } from "../../../utils.js";
|
|
22
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
23
23
|
import type { HTMLAttributes } from "svelte/elements";
|
|
24
24
|
|
|
25
25
|
let {
|
|
26
|
+
ref = $bindable(null),
|
|
26
27
|
class: className,
|
|
27
28
|
children,
|
|
28
29
|
variant = "default",
|
|
29
30
|
...restProps
|
|
30
|
-
}: HTMLAttributes<HTMLDivElement
|
|
31
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & { variant?: ItemMediaVariant } = $props();
|
|
31
32
|
</script>
|
|
32
33
|
|
|
33
|
-
<div
|
|
34
|
+
<div
|
|
35
|
+
bind:this={ref}
|
|
36
|
+
data-slot="item-media"
|
|
37
|
+
data-variant={variant}
|
|
38
|
+
class={cn(itemMediaVariants({ variant }), className)}
|
|
39
|
+
{...restProps}
|
|
40
|
+
>
|
|
34
41
|
{@render children?.()}
|
|
35
42
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
declare const itemMediaVariants: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
export declare const itemMediaVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
4
|
default: string;
|
|
5
5
|
icon: string;
|
|
@@ -19,10 +19,11 @@ declare const itemMediaVariants: import("tailwind-variants").TVReturnType<{
|
|
|
19
19
|
};
|
|
20
20
|
}, undefined, "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", unknown, unknown, undefined>>;
|
|
21
21
|
export type ItemMediaVariant = VariantProps<typeof itemMediaVariants>["variant"];
|
|
22
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
22
23
|
import type { HTMLAttributes } from "svelte/elements";
|
|
23
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
24
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
24
25
|
variant?: ItemMediaVariant;
|
|
25
26
|
};
|
|
26
|
-
declare const ItemMedia: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
27
|
+
declare const ItemMedia: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
27
28
|
type ItemMedia = ReturnType<typeof ItemMedia>;
|
|
28
29
|
export default ItemMedia;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
import type { ComponentProps } from "svelte";
|
|
5
5
|
|
|
6
|
-
let { class: className, ...restProps }: ComponentProps<typeof Separator> = $props();
|
|
6
|
+
let { ref = $bindable(null), class: className, ...restProps }: ComponentProps<typeof Separator> = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<Separator data-slot="item-separator" orientation="horizontal" class={cn("my-0", className)} {...restProps} />
|
|
9
|
+
<Separator bind:ref data-slot="item-separator" orientation="horizontal" class={cn("my-0", className)} {...restProps} />
|
|
@@ -8,6 +8,6 @@ declare const ItemSeparator: import("svelte").Component<Omit<{
|
|
|
8
8
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
9
9
|
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
10
10
|
ref?: HTMLElement | null | undefined;
|
|
11
|
-
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "">;
|
|
11
|
+
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "ref">;
|
|
12
12
|
type ItemSeparator = ReturnType<typeof ItemSeparator>;
|
|
13
13
|
export default ItemSeparator;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<div
|
|
14
|
+
bind:this={ref}
|
|
9
15
|
data-slot="item-title"
|
|
10
16
|
class={cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className)}
|
|
11
17
|
{...restProps}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const ItemTitle: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const ItemTitle: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type ItemTitle = ReturnType<typeof ItemTitle>;
|
|
4
5
|
export default ItemTitle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
|
-
const itemVariants = tv({
|
|
4
|
+
export const itemVariants = tv({
|
|
5
5
|
base: "group/item [a]:hover:bg-accent/50 [a]:transition-colors focus-visible:border-ring focus-visible:ring-ring/50 flex flex-wrap items-center rounded-md border border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring-[3px]",
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -25,26 +25,25 @@
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<script lang="ts">
|
|
28
|
-
import { cn } from "../../../utils.js";
|
|
28
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
29
29
|
import type { HTMLAttributes } from "svelte/elements";
|
|
30
30
|
import type { Snippet } from "svelte";
|
|
31
31
|
|
|
32
32
|
let {
|
|
33
|
+
ref = $bindable(null),
|
|
33
34
|
class: className,
|
|
34
35
|
child,
|
|
35
36
|
variant,
|
|
36
37
|
size,
|
|
37
38
|
...restProps
|
|
38
|
-
}: HTMLAttributes<HTMLDivElement
|
|
39
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
39
40
|
child?: Snippet<[{ props: Record<string, unknown> }]>;
|
|
40
41
|
variant?: ItemVariant;
|
|
41
42
|
size?: ItemSize;
|
|
42
43
|
} = $props();
|
|
43
44
|
|
|
44
|
-
const classes = $derived(cn(itemVariants({ variant, size }), className));
|
|
45
|
-
|
|
46
45
|
const mergedProps = $derived({
|
|
47
|
-
class:
|
|
46
|
+
class: cn(itemVariants({ variant, size }), className),
|
|
48
47
|
"data-slot": "item",
|
|
49
48
|
"data-variant": variant,
|
|
50
49
|
"data-size": size,
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
{#if child}
|
|
56
55
|
{@render child({ props: mergedProps })}
|
|
57
56
|
{:else}
|
|
58
|
-
<div {...mergedProps}>
|
|
57
|
+
<div bind:this={ref} {...mergedProps}>
|
|
59
58
|
{@render mergedProps.children?.()}
|
|
60
59
|
</div>
|
|
61
60
|
{/if}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
declare const itemVariants: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
export declare const itemVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
4
|
default: string;
|
|
5
5
|
outline: string;
|
|
@@ -32,15 +32,16 @@ declare const itemVariants: import("tailwind-variants").TVReturnType<{
|
|
|
32
32
|
}, undefined, "group/item [a]:hover:bg-accent/50 [a]:transition-colors focus-visible:border-ring focus-visible:ring-ring/50 flex flex-wrap items-center rounded-md border border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring-[3px]", unknown, unknown, undefined>>;
|
|
33
33
|
export type ItemSize = VariantProps<typeof itemVariants>["size"];
|
|
34
34
|
export type ItemVariant = VariantProps<typeof itemVariants>["variant"];
|
|
35
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
35
36
|
import type { HTMLAttributes } from "svelte/elements";
|
|
36
37
|
import type { Snippet } from "svelte";
|
|
37
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
38
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
38
39
|
child?: Snippet<[{
|
|
39
40
|
props: Record<string, unknown>;
|
|
40
41
|
}]>;
|
|
41
42
|
variant?: ItemVariant;
|
|
42
43
|
size?: ItemSize;
|
|
43
44
|
};
|
|
44
|
-
declare const Item: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
45
|
+
declare const Item: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
45
46
|
type Item = ReturnType<typeof Item>;
|
|
46
47
|
export default Item;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../utils.js";
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
|
-
<kbd data-slot="kbd-group" class={cn("inline-flex items-center gap-1", className)} {...restProps}>
|
|
13
|
+
<kbd bind:this={ref} data-slot="kbd-group" class={cn("inline-flex items-center gap-1", className)} {...restProps}>
|
|
9
14
|
{@render children?.()}
|
|
10
15
|
</kbd>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const KbdGroup: import("svelte").Component<HTMLAttributes<HTMLElement
|
|
3
|
+
declare const KbdGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
3
4
|
type KbdGroup = ReturnType<typeof KbdGroup>;
|
|
4
5
|
export default KbdGroup;
|