@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
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
import type { ComponentProps } from "svelte";
|
|
4
4
|
import { Separator } from "../separator/index.js";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
orientation = "vertical",
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof Separator> = $props();
|
|
7
12
|
</script>
|
|
8
13
|
|
|
9
14
|
<Separator
|
|
15
|
+
bind:ref
|
|
10
16
|
data-slot="button-group-separator"
|
|
11
17
|
{orientation}
|
|
12
18
|
class={cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className)}
|
|
@@ -8,6 +8,6 @@ declare const ButtonGroupSeparator: 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 ButtonGroupSeparator = ReturnType<typeof ButtonGroupSeparator>;
|
|
13
13
|
export default ButtonGroupSeparator;
|
|
@@ -1,33 +1,30 @@
|
|
|
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
|
import type { Snippet } from "svelte";
|
|
5
5
|
|
|
6
6
|
let {
|
|
7
|
+
ref = $bindable(null),
|
|
7
8
|
class: className,
|
|
8
9
|
child,
|
|
9
10
|
...restProps
|
|
10
|
-
}: HTMLAttributes<HTMLDivElement
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
11
12
|
child?: Snippet<[{ props: Record<string, unknown> }]>;
|
|
12
13
|
} = $props();
|
|
13
14
|
|
|
14
|
-
const classes = $derived(
|
|
15
|
-
cn(
|
|
16
|
-
"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
17
|
-
className
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
|
|
21
15
|
const mergedProps = $derived({
|
|
22
16
|
...restProps,
|
|
23
|
-
class:
|
|
17
|
+
class: cn(
|
|
18
|
+
"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
24
21
|
});
|
|
25
22
|
</script>
|
|
26
23
|
|
|
27
24
|
{#if child}
|
|
28
25
|
{@render child({ props: mergedProps })}
|
|
29
26
|
{:else}
|
|
30
|
-
<div {...mergedProps}>
|
|
27
|
+
<div bind:this={ref} {...mergedProps}>
|
|
31
28
|
{@render mergedProps.children?.()}
|
|
32
29
|
</div>
|
|
33
30
|
{/if}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
import type { Snippet } from "svelte";
|
|
3
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
4
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
5
|
child?: Snippet<[{
|
|
5
6
|
props: Record<string, unknown>;
|
|
6
7
|
}]>;
|
|
7
8
|
};
|
|
8
|
-
declare const ButtonGroupText: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
declare const ButtonGroupText: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
9
10
|
type ButtonGroupText = ReturnType<typeof ButtonGroupText>;
|
|
10
11
|
export default ButtonGroupText;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
|
-
const buttonGroupVariants = tv({
|
|
4
|
+
export const buttonGroupVariants = tv({
|
|
5
5
|
base: "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
6
6
|
variants: {
|
|
7
7
|
orientation: {
|
|
@@ -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
|
orientation = "horizontal",
|
|
30
31
|
...restProps
|
|
31
|
-
}: HTMLAttributes<HTMLDivElement
|
|
32
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
32
33
|
orientation?: ButtonGroupOrientation;
|
|
33
34
|
} = $props();
|
|
34
35
|
</script>
|
|
35
36
|
|
|
36
37
|
<div
|
|
38
|
+
bind:this={ref}
|
|
37
39
|
role="group"
|
|
38
40
|
data-slot="button-group"
|
|
39
41
|
data-orientation={orientation}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
declare const buttonGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
export declare const buttonGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
orientation: {
|
|
4
4
|
horizontal: string;
|
|
5
5
|
vertical: string;
|
|
@@ -16,10 +16,11 @@ declare const buttonGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
|
16
16
|
};
|
|
17
17
|
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", unknown, unknown, undefined>>;
|
|
18
18
|
export type ButtonGroupOrientation = VariantProps<typeof buttonGroupVariants>["orientation"];
|
|
19
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
19
20
|
import type { HTMLAttributes } from "svelte/elements";
|
|
20
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
21
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
21
22
|
orientation?: ButtonGroupOrientation;
|
|
22
23
|
};
|
|
23
|
-
declare const ButtonGroup: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
24
|
+
declare const ButtonGroup: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
24
25
|
type ButtonGroup = ReturnType<typeof ButtonGroup>;
|
|
25
26
|
export default ButtonGroup;
|
|
@@ -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="empty-content"
|
|
10
16
|
class={cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", 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 EmptyContent: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const EmptyContent: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type EmptyContent = ReturnType<typeof EmptyContent>;
|
|
4
5
|
export default EmptyContent;
|
|
@@ -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="empty-description"
|
|
10
16
|
class={cn(
|
|
11
17
|
"text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const EmptyDescription: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const EmptyDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type EmptyDescription = ReturnType<typeof EmptyDescription>;
|
|
4
5
|
export default EmptyDescription;
|
|
@@ -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="empty-header"
|
|
10
16
|
class={cn("flex max-w-sm flex-col items-center gap-2 text-center", 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 EmptyHeader: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const EmptyHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type EmptyHeader = ReturnType<typeof EmptyHeader>;
|
|
4
5
|
export default EmptyHeader;
|
|
@@ -18,18 +18,20 @@
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<script lang="ts">
|
|
21
|
-
import { cn } from "../../../utils.js";
|
|
21
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
22
22
|
import type { HTMLAttributes } from "svelte/elements";
|
|
23
23
|
|
|
24
24
|
let {
|
|
25
|
+
ref = $bindable(null),
|
|
25
26
|
class: className,
|
|
26
27
|
children,
|
|
27
28
|
variant = "default",
|
|
28
29
|
...restProps
|
|
29
|
-
}: HTMLAttributes<HTMLDivElement
|
|
30
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & { variant?: EmptyMediaVariant } = $props();
|
|
30
31
|
</script>
|
|
31
32
|
|
|
32
33
|
<div
|
|
34
|
+
bind:this={ref}
|
|
33
35
|
data-slot="empty-icon"
|
|
34
36
|
data-variant={variant}
|
|
35
37
|
class={cn(emptyMediaVariants({ variant }), className)}
|
|
@@ -16,10 +16,11 @@ export declare const emptyMediaVariants: import("tailwind-variants").TVReturnTyp
|
|
|
16
16
|
};
|
|
17
17
|
}, undefined, "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
18
18
|
export type EmptyMediaVariant = VariantProps<typeof emptyMediaVariants>["variant"];
|
|
19
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
19
20
|
import type { HTMLAttributes } from "svelte/elements";
|
|
20
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
21
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
21
22
|
variant?: EmptyMediaVariant;
|
|
22
23
|
};
|
|
23
|
-
declare const EmptyMedia: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
24
|
+
declare const EmptyMedia: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
24
25
|
type EmptyMedia = ReturnType<typeof EmptyMedia>;
|
|
25
26
|
export default EmptyMedia;
|
|
@@ -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="empty-title" class={cn("text-lg font-medium tracking-tight", className)} {...restProps}>
|
|
13
|
+
<div bind:this={ref} data-slot="empty-title" class={cn("text-lg font-medium tracking-tight", 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 EmptyTitle: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const EmptyTitle: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type EmptyTitle = ReturnType<typeof EmptyTitle>;
|
|
4
5
|
export default EmptyTitle;
|
|
@@ -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="empty"
|
|
10
16
|
class={cn(
|
|
11
17
|
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const Empty: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const Empty: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type Empty = ReturnType<typeof Empty>;
|
|
4
5
|
export default Empty;
|
|
@@ -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="field-content"
|
|
10
16
|
class={cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", 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 FieldContent: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const FieldContent: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type FieldContent = ReturnType<typeof FieldContent>;
|
|
4
5
|
export default FieldContent;
|
|
@@ -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="field-description"
|
|
10
16
|
class={cn(
|
|
11
17
|
"text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const FieldDescription: import("svelte").Component<HTMLAttributes<HTMLParagraphElement
|
|
3
|
+
declare const FieldDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
3
4
|
type FieldDescription = ReturnType<typeof FieldDescription>;
|
|
4
5
|
export default FieldDescription;
|
|
@@ -1,14 +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
|
import type { Snippet } from "svelte";
|
|
5
5
|
|
|
6
6
|
let {
|
|
7
|
+
ref = $bindable(null),
|
|
7
8
|
class: className,
|
|
8
9
|
children,
|
|
9
10
|
errors,
|
|
10
11
|
...restProps
|
|
11
|
-
}: HTMLAttributes<HTMLDivElement
|
|
12
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
12
13
|
children?: Snippet;
|
|
13
14
|
errors?: { message?: string }[];
|
|
14
15
|
} = $props();
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
|
|
35
36
|
{#if hasContent}
|
|
36
37
|
<div
|
|
38
|
+
bind:this={ref}
|
|
37
39
|
role="alert"
|
|
38
40
|
data-slot="field-error"
|
|
39
41
|
class={cn("text-destructive text-sm font-normal", className)}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
import type { Snippet } from "svelte";
|
|
3
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
4
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
5
|
children?: Snippet;
|
|
5
6
|
errors?: {
|
|
6
7
|
message?: string;
|
|
7
8
|
}[];
|
|
8
9
|
};
|
|
9
|
-
declare const FieldError: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
10
|
+
declare const FieldError: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
10
11
|
type FieldError = ReturnType<typeof FieldError>;
|
|
11
12
|
export default FieldError;
|
|
@@ -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="field-group"
|
|
10
16
|
class={cn(
|
|
11
17
|
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const FieldGroup: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const FieldGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type FieldGroup = ReturnType<typeof FieldGroup>;
|
|
4
5
|
export default FieldGroup;
|
|
@@ -1,18 +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
5
|
let {
|
|
6
|
+
ref = $bindable(null),
|
|
6
7
|
class: className,
|
|
7
8
|
variant = "legend",
|
|
8
9
|
children,
|
|
9
10
|
...restProps
|
|
10
|
-
}: HTMLAttributes<HTMLLegendElement
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLLegendElement>> & {
|
|
11
12
|
variant?: "legend" | "label";
|
|
12
13
|
} = $props();
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<legend
|
|
17
|
+
bind:this={ref}
|
|
16
18
|
data-slot="field-legend"
|
|
17
19
|
data-variant={variant}
|
|
18
20
|
class={cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className)}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
type $$ComponentProps = HTMLAttributes<HTMLLegendElement
|
|
3
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLLegendElement>> & {
|
|
3
4
|
variant?: "legend" | "label";
|
|
4
5
|
};
|
|
5
|
-
declare const FieldLegend: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
declare const FieldLegend: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
7
|
type FieldLegend = ReturnType<typeof FieldLegend>;
|
|
7
8
|
export default FieldLegend;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Separator } from "../separator/index.js";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
3
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
4
4
|
import type { HTMLAttributes } from "svelte/elements";
|
|
5
5
|
import type { Snippet } from "svelte";
|
|
6
6
|
|
|
7
7
|
let {
|
|
8
|
+
ref = $bindable(null),
|
|
8
9
|
class: className,
|
|
9
10
|
children,
|
|
10
11
|
...restProps
|
|
11
|
-
}: HTMLAttributes<HTMLDivElement
|
|
12
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
12
13
|
children?: Snippet;
|
|
13
14
|
} = $props();
|
|
14
15
|
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
</script>
|
|
17
18
|
|
|
18
19
|
<div
|
|
20
|
+
bind:this={ref}
|
|
19
21
|
data-slot="field-separator"
|
|
20
22
|
data-content={hasContent}
|
|
21
23
|
class={cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className)}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
import type { Snippet } from "svelte";
|
|
3
|
-
type $$ComponentProps = HTMLAttributes<HTMLDivElement
|
|
4
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
5
|
children?: Snippet;
|
|
5
6
|
};
|
|
6
|
-
declare const FieldSeparator: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
declare const FieldSeparator: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
8
|
type FieldSeparator = ReturnType<typeof FieldSeparator>;
|
|
8
9
|
export default FieldSeparator;
|
|
@@ -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 { HTMLFieldsetAttributes } from "svelte/elements";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLFieldsetAttributes> = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<fieldset
|
|
14
|
+
bind:this={ref}
|
|
9
15
|
data-slot="field-set"
|
|
10
16
|
class={cn(
|
|
11
17
|
"flex flex-col gap-6",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLFieldsetAttributes } from "svelte/elements";
|
|
2
|
-
declare const FieldSet: import("svelte").Component<HTMLFieldsetAttributes
|
|
3
|
+
declare const FieldSet: import("svelte").Component<WithElementRef<HTMLFieldsetAttributes>, {}, "ref">;
|
|
3
4
|
type FieldSet = ReturnType<typeof FieldSet>;
|
|
4
5
|
export default FieldSet;
|
|
@@ -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="field-title"
|
|
10
16
|
class={cn(
|
|
11
17
|
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
-
declare const FieldTitle: import("svelte").Component<HTMLAttributes<HTMLDivElement
|
|
3
|
+
declare const FieldTitle: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
4
|
type FieldTitle = ReturnType<typeof FieldTitle>;
|
|
4
5
|
export default FieldTitle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
|
-
const fieldVariants = tv({
|
|
4
|
+
export const fieldVariants = tv({
|
|
5
5
|
base: "group/field data-[invalid=true]:text-destructive flex w-full gap-3",
|
|
6
6
|
variants: {
|
|
7
7
|
orientation: {
|
|
@@ -27,20 +27,22 @@
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<script lang="ts">
|
|
30
|
-
import { cn } from "../../../utils.js";
|
|
30
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
31
31
|
import type { HTMLAttributes } from "svelte/elements";
|
|
32
32
|
|
|
33
33
|
let {
|
|
34
|
+
ref = $bindable(null),
|
|
34
35
|
class: className,
|
|
35
36
|
orientation = "vertical",
|
|
36
37
|
children,
|
|
37
38
|
...restProps
|
|
38
|
-
}: HTMLAttributes<HTMLDivElement
|
|
39
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
39
40
|
orientation?: FieldOrientation;
|
|
40
41
|
} = $props();
|
|
41
42
|
</script>
|
|
42
43
|
|
|
43
44
|
<div
|
|
45
|
+
bind:this={ref}
|
|
44
46
|
role="group"
|
|
45
47
|
data-slot="field"
|
|
46
48
|
data-orientation={orientation}
|