@kayord/ui 2.0.2 → 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.
Files changed (87) hide show
  1. package/README.md +7 -22
  2. package/dist/components/ui/button-group/button-group-separator.svelte +7 -1
  3. package/dist/components/ui/button-group/button-group-separator.svelte.d.ts +1 -1
  4. package/dist/components/ui/button-group/button-group-text.svelte +8 -11
  5. package/dist/components/ui/button-group/button-group-text.svelte.d.ts +3 -2
  6. package/dist/components/ui/button-group/button-group.svelte +5 -3
  7. package/dist/components/ui/button-group/button-group.svelte.d.ts +4 -3
  8. package/dist/components/ui/command/command.svelte +8 -2
  9. package/dist/components/ui/command/command.svelte.d.ts +5 -1
  10. package/dist/components/ui/empty/empty-content.svelte +8 -2
  11. package/dist/components/ui/empty/empty-content.svelte.d.ts +2 -1
  12. package/dist/components/ui/empty/empty-description.svelte +8 -2
  13. package/dist/components/ui/empty/empty-description.svelte.d.ts +2 -1
  14. package/dist/components/ui/empty/empty-header.svelte +8 -2
  15. package/dist/components/ui/empty/empty-header.svelte.d.ts +2 -1
  16. package/dist/components/ui/empty/empty-media.svelte +4 -2
  17. package/dist/components/ui/empty/empty-media.svelte.d.ts +3 -2
  18. package/dist/components/ui/empty/empty-title.svelte +8 -3
  19. package/dist/components/ui/empty/empty-title.svelte.d.ts +2 -1
  20. package/dist/components/ui/empty/empty.svelte +8 -2
  21. package/dist/components/ui/empty/empty.svelte.d.ts +2 -1
  22. package/dist/components/ui/field/field-content.svelte +8 -2
  23. package/dist/components/ui/field/field-content.svelte.d.ts +2 -1
  24. package/dist/components/ui/field/field-description.svelte +8 -2
  25. package/dist/components/ui/field/field-description.svelte.d.ts +2 -1
  26. package/dist/components/ui/field/field-error.svelte +4 -2
  27. package/dist/components/ui/field/field-error.svelte.d.ts +3 -2
  28. package/dist/components/ui/field/field-group.svelte +8 -2
  29. package/dist/components/ui/field/field-group.svelte.d.ts +2 -1
  30. package/dist/components/ui/field/field-legend.svelte +4 -2
  31. package/dist/components/ui/field/field-legend.svelte.d.ts +3 -2
  32. package/dist/components/ui/field/field-separator.svelte +4 -2
  33. package/dist/components/ui/field/field-separator.svelte.d.ts +3 -2
  34. package/dist/components/ui/field/field-set.svelte +8 -2
  35. package/dist/components/ui/field/field-set.svelte.d.ts +2 -1
  36. package/dist/components/ui/field/field-title.svelte +8 -2
  37. package/dist/components/ui/field/field-title.svelte.d.ts +2 -1
  38. package/dist/components/ui/field/field.svelte +5 -3
  39. package/dist/components/ui/field/field.svelte.d.ts +4 -3
  40. package/dist/components/ui/input-group/input-group-addon.svelte +5 -3
  41. package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +4 -3
  42. package/dist/components/ui/input-group/input-group-button.svelte +9 -1
  43. package/dist/components/ui/input-group/input-group-button.svelte.d.ts +1 -1
  44. package/dist/components/ui/input-group/input-group-input.svelte +7 -1
  45. package/dist/components/ui/input-group/input-group-input.svelte.d.ts +1 -1
  46. package/dist/components/ui/input-group/input-group-text.svelte +8 -2
  47. package/dist/components/ui/input-group/input-group-text.svelte.d.ts +2 -1
  48. package/dist/components/ui/input-group/input-group-textarea.svelte +7 -1
  49. package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +1 -1
  50. package/dist/components/ui/input-group/input-group.svelte +8 -2
  51. package/dist/components/ui/input-group/input-group.svelte.d.ts +2 -1
  52. package/dist/components/ui/item/item-actions.svelte +8 -3
  53. package/dist/components/ui/item/item-actions.svelte.d.ts +2 -1
  54. package/dist/components/ui/item/item-content.svelte +8 -2
  55. package/dist/components/ui/item/item-content.svelte.d.ts +2 -1
  56. package/dist/components/ui/item/item-description.svelte +8 -2
  57. package/dist/components/ui/item/item-description.svelte.d.ts +2 -1
  58. package/dist/components/ui/item/item-footer.svelte +13 -3
  59. package/dist/components/ui/item/item-footer.svelte.d.ts +2 -1
  60. package/dist/components/ui/item/item-group.svelte +14 -3
  61. package/dist/components/ui/item/item-group.svelte.d.ts +2 -1
  62. package/dist/components/ui/item/item-header.svelte +13 -3
  63. package/dist/components/ui/item/item-header.svelte.d.ts +2 -1
  64. package/dist/components/ui/item/item-media.svelte +11 -4
  65. package/dist/components/ui/item/item-media.svelte.d.ts +4 -3
  66. package/dist/components/ui/item/item-separator.svelte +2 -2
  67. package/dist/components/ui/item/item-separator.svelte.d.ts +1 -1
  68. package/dist/components/ui/item/item-title.svelte +8 -2
  69. package/dist/components/ui/item/item-title.svelte.d.ts +2 -1
  70. package/dist/components/ui/item/item.svelte +6 -7
  71. package/dist/components/ui/item/item.svelte.d.ts +4 -3
  72. package/dist/components/ui/kbd/kbd-group.svelte +8 -3
  73. package/dist/components/ui/kbd/kbd-group.svelte.d.ts +2 -1
  74. package/dist/components/ui/kbd/kbd.svelte +8 -2
  75. package/dist/components/ui/kbd/kbd.svelte.d.ts +2 -1
  76. package/dist/components/ui/native-select/index.d.ts +4 -0
  77. package/dist/components/ui/native-select/index.js +4 -0
  78. package/dist/components/ui/native-select/native-select-opt-group.svelte +10 -0
  79. package/dist/components/ui/native-select/native-select-opt-group.svelte.d.ts +5 -0
  80. package/dist/components/ui/native-select/native-select-option.svelte +10 -0
  81. package/dist/components/ui/native-select/native-select-option.svelte.d.ts +5 -0
  82. package/dist/components/ui/native-select/native-select.svelte +35 -0
  83. package/dist/components/ui/native-select/native-select.svelte.d.ts +5 -0
  84. package/dist/components/ui/scroll-area/scroll-area.svelte +3 -0
  85. package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +2 -1
  86. package/dist/components/ui/spinner/spinner.svelte +1 -3
  87. package/package.json +17 -17
@@ -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 { class: className, children, ...restProps }: HTMLFieldsetAttributes = $props();
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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}
@@ -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 {type} data-size={size} {variant} class={cn(inputGroupButtonVariants({ size }), className)} {...restProps}>
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 { value = $bindable(), class: className, ...props }: ComponentProps<typeof Input> = $props();
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLSpanElement> = $props();
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 { value = $bindable(), class: className, ...props }: ComponentProps<typeof Textarea> = $props();
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 { class: className, children, ...props }: HTMLAttributes<HTMLDivElement> = $props();
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLParagraphElement> = $props();
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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-footer" class={cn("flex basis-full items-center justify-between gap-2", className)} {...restProps}>
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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 role="list" data-slot="item-group" class={cn("group/item-group flex flex-col", className)} {...restProps}>
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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-header" class={cn("flex basis-full items-center justify-between gap-2", className)} {...restProps}>
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> & { variant?: ItemMediaVariant } = $props();
31
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> & { variant?: ItemMediaVariant } = $props();
31
32
  </script>
32
33
 
33
- <div data-slot="item-media" data-variant={variant} class={cn(itemMediaVariants({ variant }), className)} {...restProps}>
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 { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
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;