@kayord/ui 0.12.24 → 0.13.2

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 (37) hide show
  1. package/dist/components/custom/data-table/DataTable.svelte.d.ts +4 -4
  2. package/dist/components/custom/data-table/DataTableActions.svelte.d.ts +2 -2
  3. package/dist/components/custom/data-table/DataTableCheckbox.svelte.d.ts +4 -4
  4. package/dist/components/custom/data-table/DataTableHeader.svelte.d.ts +3 -3
  5. package/dist/components/custom/data-table/Pagination.svelte.d.ts +3 -3
  6. package/dist/components/custom/data-table/VisibilitySelect.svelte.d.ts +3 -3
  7. package/dist/components/custom/loader/Loader.svelte.d.ts +6 -6
  8. package/dist/components/custom/progress-loading/ProgressLoading.svelte.d.ts +3 -3
  9. package/dist/components/custom/theme-switch/ThemeSwitch.svelte.d.ts +2 -2
  10. package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +5 -2
  11. package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +4 -1
  12. package/dist/components/ui/badge/badge.svelte.d.ts +2 -2
  13. package/dist/components/ui/breadcrumb/breadcrumb-link.svelte.d.ts +3 -3
  14. package/dist/components/ui/card/card-title.svelte +1 -1
  15. package/dist/components/ui/command/command-dialog.svelte +3 -1
  16. package/dist/components/ui/command/command-dialog.svelte.d.ts +2 -1
  17. package/dist/components/ui/context-menu/context-menu-content.svelte +18 -9
  18. package/dist/components/ui/context-menu/context-menu-content.svelte.d.ts +3 -1
  19. package/dist/components/ui/dialog/dialog-content.svelte +3 -1
  20. package/dist/components/ui/dialog/dialog-content.svelte.d.ts +1 -0
  21. package/dist/components/ui/drawer/drawer-content.svelte +10 -2
  22. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +15 -10
  23. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +69 -1
  24. package/dist/components/ui/hover-card/hover-card-content.svelte +16 -11
  25. package/dist/components/ui/hover-card/hover-card-content.svelte.d.ts +12 -1
  26. package/dist/components/ui/menubar/menubar-content.svelte +18 -13
  27. package/dist/components/ui/menubar/menubar-content.svelte.d.ts +69 -1
  28. package/dist/components/ui/popover/popover-content.svelte +5 -2
  29. package/dist/components/ui/popover/popover-content.svelte.d.ts +10 -1
  30. package/dist/components/ui/select/select-content.svelte +5 -2
  31. package/dist/components/ui/select/select-content.svelte.d.ts +3 -1
  32. package/dist/components/ui/sheet/sheet-content.svelte +3 -1
  33. package/dist/components/ui/sheet/sheet-content.svelte.d.ts +1 -0
  34. package/dist/components/ui/toggle/toggle.svelte +4 -4
  35. package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
  36. package/package.json +19 -19
  37. package/dist/components/ui/drawer/drawer-content.svelte.d.ts +0 -4
@@ -1,4 +1,6 @@
1
- type Props<T> = {
1
+ import { type ColumnDef, type Table as TableType } from "@tanstack/table-core";
2
+ import type { Snippet } from "svelte";
3
+ interface Props<T> {
2
4
  table: TableType<T>;
3
5
  columns: ColumnDef<T>[];
4
6
  isLoading?: boolean;
@@ -14,9 +16,7 @@ type Props<T> = {
14
16
  class?: string;
15
17
  headerClass?: string;
16
18
  disableUISorting?: boolean;
17
- };
18
- import { type ColumnDef, type Table as TableType } from "@tanstack/table-core";
19
- import type { Snippet } from "svelte";
19
+ }
20
20
  declare class __sveltets_Render<T> {
21
21
  props(): Props<T>;
22
22
  events(): {};
@@ -1,6 +1,6 @@
1
- type Props = {
1
+ interface Props {
2
2
  id: string;
3
- };
3
+ }
4
4
  declare const DataTableActions: import("svelte").Component<Props, {}, "">;
5
5
  type DataTableActions = ReturnType<typeof DataTableActions>;
6
6
  export default DataTableActions;
@@ -1,10 +1,10 @@
1
- type Props = ComponentProps<typeof Checkbox> & {
1
+ import { Checkbox } from "../../ui/checkbox";
2
+ import type { ComponentProps } from "svelte";
3
+ interface Props extends ComponentProps<typeof Checkbox> {
2
4
  checked?: boolean;
3
5
  indeterminate?: boolean;
4
6
  class?: string;
5
- };
6
- import { Checkbox } from "../../ui/checkbox";
7
- import type { ComponentProps } from "svelte";
7
+ }
8
8
  declare const DataTableCheckbox: import("svelte").Component<Props, {}, "">;
9
9
  type DataTableCheckbox = ReturnType<typeof DataTableCheckbox>;
10
10
  export default DataTableCheckbox;
@@ -1,9 +1,9 @@
1
- type Props<T> = {
1
+ import { type Header, type Table as TypeType } from "@tanstack/table-core";
2
+ interface Props<T> {
2
3
  header: Header<T, unknown>;
3
4
  table: TypeType<T>;
4
5
  disableUISorting?: boolean;
5
- };
6
- import { type Header, type Table as TypeType } from "@tanstack/table-core";
6
+ }
7
7
  declare class __sveltets_Render<T> {
8
8
  props(): Props<T>;
9
9
  events(): {};
@@ -1,8 +1,8 @@
1
- type Props<T> = {
1
+ import type { Table } from "@tanstack/table-core";
2
+ interface Props<T> {
2
3
  table: Table<T>;
3
4
  canChangePageSize?: boolean;
4
- };
5
- import type { Table } from "@tanstack/table-core";
5
+ }
6
6
  declare class __sveltets_Render<T> {
7
7
  props(): Props<T>;
8
8
  events(): {};
@@ -1,7 +1,7 @@
1
- type Props<T> = {
2
- table: Table<T>;
3
- };
4
1
  import type { Table } from "@tanstack/table-core";
2
+ interface Props<T> {
3
+ table: Table<T>;
4
+ }
5
5
  declare class __sveltets_Render<T> {
6
6
  props(): Props<T>;
7
7
  events(): {};
@@ -1,13 +1,13 @@
1
- type LoaderIconProps = Omit<ComponentProps<Icon>, "iconNode"> & {
1
+ import type { ComponentProps } from "svelte";
2
+ import { type Icon } from "lucide-svelte";
3
+ interface LoaderIconProps extends Omit<ComponentProps<Icon>, "iconNode"> {
2
4
  isLoading?: boolean;
3
- };
4
- type Props = {
5
+ }
6
+ interface Props {
5
7
  class?: string | undefined | null;
6
8
  isLoading?: boolean;
7
9
  iconProps?: LoaderIconProps;
8
- };
9
- import type { ComponentProps } from "svelte";
10
- import { type Icon } from "lucide-svelte";
10
+ }
11
11
  declare const Loader: import("svelte").Component<Props, {
12
12
  class: string | null | undefined;
13
13
  }, "">;
@@ -1,8 +1,8 @@
1
- type Props = {
1
+ import { type ProgressRootProps } from "bits-ui";
2
+ interface Props {
2
3
  class?: ProgressRootProps["class"];
3
4
  [key: string]: any;
4
- };
5
- import { type ProgressRootProps } from "bits-ui";
5
+ }
6
6
  declare const ProgressLoading: import("svelte").Component<Props, {}, "">;
7
7
  type ProgressLoading = ReturnType<typeof ProgressLoading>;
8
8
  export default ProgressLoading;
@@ -1,6 +1,6 @@
1
- type Props = {
1
+ interface Props {
2
2
  class?: string | undefined | null;
3
- };
3
+ }
4
4
  declare const ThemeSwitch: import("svelte").Component<Props, {}, "">;
5
5
  type ThemeSwitch = ReturnType<typeof ThemeSwitch>;
6
6
  export default ThemeSwitch;
@@ -6,11 +6,14 @@
6
6
  let {
7
7
  ref = $bindable(null),
8
8
  class: className,
9
+ portalProps,
9
10
  ...restProps
10
- }: WithoutChild<AlertDialogPrimitive.ContentProps> = $props();
11
+ }: WithoutChild<AlertDialogPrimitive.ContentProps> & {
12
+ portalProps?: AlertDialogPrimitive.PortalProps;
13
+ } = $props();
11
14
  </script>
12
15
 
13
- <AlertDialogPrimitive.Portal>
16
+ <AlertDialogPrimitive.Portal {...portalProps}>
14
17
  <AlertDialogOverlay />
15
18
  <AlertDialogPrimitive.Content
16
19
  bind:ref
@@ -1,3 +1,6 @@
1
- declare const AlertDialogContent: import("svelte").Component<Omit<import("bits-ui").DialogContentProps, "child">, {}, "ref">;
1
+ import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
2
+ declare const AlertDialogContent: import("svelte").Component<Omit<import("bits-ui").DialogContentProps, "child"> & {
3
+ portalProps?: AlertDialogPrimitive.PortalProps;
4
+ }, {}, "ref">;
2
5
  type AlertDialogContent = ReturnType<typeof AlertDialogContent>;
3
6
  export default AlertDialogContent;
@@ -50,11 +50,11 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
50
50
  };
51
51
  }>, unknown, unknown, undefined>>;
52
52
  export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
53
+ import type { WithElementRef } from "bits-ui";
54
+ import type { HTMLAnchorAttributes } from "svelte/elements";
53
55
  type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
54
56
  variant?: BadgeVariant;
55
57
  };
56
- import type { WithElementRef } from "bits-ui";
57
- import type { HTMLAnchorAttributes } from "svelte/elements";
58
58
  declare const Badge: import("svelte").Component<$$ComponentProps, {}, "ref">;
59
59
  type Badge = ReturnType<typeof Badge>;
60
60
  export default Badge;
@@ -1,11 +1,11 @@
1
+ import type { HTMLAnchorAttributes } from "svelte/elements";
2
+ import type { Snippet } from "svelte";
3
+ import type { WithElementRef } from "bits-ui";
1
4
  type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
2
5
  child?: Snippet<[{
3
6
  props: HTMLAnchorAttributes;
4
7
  }]>;
5
8
  };
6
- import type { HTMLAnchorAttributes } from "svelte/elements";
7
- import type { Snippet } from "svelte";
8
- import type { WithElementRef } from "bits-ui";
9
9
  declare const BreadcrumbLink: import("svelte").Component<$$ComponentProps, {}, "ref">;
10
10
  type BreadcrumbLink = ReturnType<typeof BreadcrumbLink>;
11
11
  export default BreadcrumbLink;
@@ -18,7 +18,7 @@
18
18
  role="heading"
19
19
  aria-level={level}
20
20
  bind:this={ref}
21
- class={cn("text-lg font-semibold leading-none tracking-tight", className)}
21
+ class={cn("text-2xl font-semibold leading-none tracking-tight", className)}
22
22
  {...restProps}
23
23
  >
24
24
  {@render children?.()}
@@ -8,16 +8,18 @@
8
8
  open = $bindable(false),
9
9
  ref = $bindable(null),
10
10
  value = $bindable(""),
11
+ portalProps,
11
12
  children,
12
13
  ...restProps
13
14
  }: WithoutChildrenOrChild<DialogPrimitive.RootProps> &
14
15
  WithoutChildrenOrChild<CommandPrimitive.RootProps> & {
16
+ portalProps?: DialogPrimitive.PortalProps;
15
17
  children: Snippet;
16
18
  } = $props();
17
19
  </script>
18
20
 
19
21
  <Dialog.Root bind:open {...restProps}>
20
- <Dialog.Content class="overflow-hidden p-0 shadow-lg">
22
+ <Dialog.Content class="overflow-hidden p-0 shadow-lg" {portalProps}>
21
23
  <Command
22
24
  class="[&_[data-command-group]:not([hidden])_~[data-command-group]]:pt-0 [&_[data-command-group]]:px-2 [&_[data-command-input-wrapper]_svg]:h-5 [&_[data-command-input-wrapper]_svg]:w-5 [&_[data-command-input]]:h-12 [&_[data-command-item]]:px-2 [&_[data-command-item]]:py-3 [&_[data-command-item]_svg]:h-5 [&_[data-command-item]_svg]:w-5"
23
25
  {...restProps}
@@ -1,6 +1,7 @@
1
- import type { Command as CommandPrimitive } from "bits-ui";
1
+ import type { Command as CommandPrimitive, Dialog as DialogPrimitive } from "bits-ui";
2
2
  import type { Snippet } from "svelte";
3
3
  declare const CommandDialog: import("svelte").Component<Omit<import("bits-ui").AlertDialogRootPropsWithoutHTML, "children"> & Omit<Omit<CommandPrimitive.RootProps, "child">, "children"> & {
4
+ portalProps?: DialogPrimitive.PortalProps;
4
5
  children: Snippet;
5
6
  }, {}, "ref" | "value" | "open">;
6
7
  type CommandDialog = ReturnType<typeof CommandDialog>;
@@ -2,14 +2,23 @@
2
2
  import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
3
3
  import { cn } from "../../../utils.js";
4
4
 
5
- let { ref = $bindable(null), class: className, ...restProps }: ContextMenuPrimitive.ContentProps = $props();
5
+ let {
6
+ ref = $bindable(null),
7
+ portalProps,
8
+ class: className,
9
+ ...restProps
10
+ }: ContextMenuPrimitive.ContentProps & {
11
+ portalProps?: ContextMenuPrimitive.PortalProps;
12
+ } = $props();
6
13
  </script>
7
14
 
8
- <ContextMenuPrimitive.Content
9
- bind:ref
10
- class={cn(
11
- "z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none",
12
- className
13
- )}
14
- {...restProps}
15
- />
15
+ <ContextMenuPrimitive.Portal {...portalProps}>
16
+ <ContextMenuPrimitive.Content
17
+ bind:ref
18
+ class={cn(
19
+ "z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none",
20
+ className
21
+ )}
22
+ {...restProps}
23
+ />
24
+ </ContextMenuPrimitive.Portal>
@@ -1,4 +1,6 @@
1
1
  import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
2
- declare const ContextMenuContent: import("svelte").Component<ContextMenuPrimitive.ContentProps, {}, "ref">;
2
+ declare const ContextMenuContent: import("svelte").Component<ContextMenuPrimitive.ContentProps & {
3
+ portalProps?: ContextMenuPrimitive.PortalProps;
4
+ }, {}, "ref">;
3
5
  type ContextMenuContent = ReturnType<typeof ContextMenuContent>;
4
6
  export default ContextMenuContent;
@@ -8,14 +8,16 @@
8
8
  let {
9
9
  ref = $bindable(null),
10
10
  class: className,
11
+ portalProps,
11
12
  children,
12
13
  ...restProps
13
14
  }: WithoutChildrenOrChild<DialogPrimitive.ContentProps> & {
15
+ portalProps?: DialogPrimitive.PortalProps;
14
16
  children: Snippet;
15
17
  } = $props();
16
18
  </script>
17
19
 
18
- <Dialog.Portal>
20
+ <Dialog.Portal {...portalProps}>
19
21
  <Dialog.Overlay />
20
22
  <DialogPrimitive.Content
21
23
  bind:ref
@@ -1,6 +1,7 @@
1
1
  import { Dialog as DialogPrimitive } from "bits-ui";
2
2
  import type { Snippet } from "svelte";
3
3
  declare const DialogContent: import("svelte").Component<Omit<Omit<DialogPrimitive.ContentProps, "child">, "children"> & {
4
+ portalProps?: DialogPrimitive.PortalProps;
4
5
  children: Snippet;
5
6
  }, {}, "ref">;
6
7
  type DialogContent = ReturnType<typeof DialogContent>;
@@ -3,10 +3,18 @@
3
3
  import DrawerOverlay from "./drawer-overlay.svelte";
4
4
  import { cn } from "../../../utils.js";
5
5
 
6
- let { ref = $bindable(null), class: className, children, ...restProps }: DrawerPrimitive.ContentProps = $props();
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ portalProps,
10
+ children,
11
+ ...restProps
12
+ }: DrawerPrimitive.ContentProps & {
13
+ portalProps?: DrawerPrimitive.PortalProps;
14
+ } = $props();
7
15
  </script>
8
16
 
9
- <DrawerPrimitive.Portal>
17
+ <DrawerPrimitive.Portal {...portalProps}>
10
18
  <DrawerOverlay />
11
19
  <DrawerPrimitive.Content
12
20
  bind:ref
@@ -5,17 +5,22 @@
5
5
  let {
6
6
  ref = $bindable(null),
7
7
  sideOffset = 4,
8
+ portalProps,
8
9
  class: className,
9
10
  ...restProps
10
- }: DropdownMenuPrimitive.ContentProps = $props();
11
+ }: DropdownMenuPrimitive.ContentProps & {
12
+ portalProps?: DropdownMenuPrimitive.PortalProps;
13
+ } = $props();
11
14
  </script>
12
15
 
13
- <DropdownMenuPrimitive.Content
14
- bind:ref
15
- {sideOffset}
16
- class={cn(
17
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
18
- className
19
- )}
20
- {...restProps}
21
- />
16
+ <DropdownMenuPrimitive.Portal {...portalProps}>
17
+ <DropdownMenuPrimitive.Content
18
+ bind:ref
19
+ {sideOffset}
20
+ class={cn(
21
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
22
+ className
23
+ )}
24
+ {...restProps}
25
+ />
26
+ </DropdownMenuPrimitive.Portal>
@@ -1,4 +1,72 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
- declare const DropdownMenuContent: import("svelte").Component<DropdownMenuPrimitive.ContentProps, {}, "ref">;
2
+ declare const DropdownMenuContent: import("svelte").Component<{
3
+ forceMount?: boolean | undefined;
4
+ dir?: import("bits-ui").Direction | undefined;
5
+ loop?: boolean | undefined;
6
+ onInteractOutside?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideEventHandler | undefined;
7
+ interactOutsideBehavior?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideBehaviorType | undefined;
8
+ onFocusOutside?: ((event: FocusEvent) => void) | undefined;
9
+ onEscapeKeydown?: ((e: KeyboardEvent) => void) | undefined;
10
+ escapeKeydownBehavior?: import("bits-ui/dist/bits/utilities/escape-layer/types").EscapeBehaviorType | undefined;
11
+ onOpenAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
12
+ onCloseAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
13
+ trapFocus?: boolean | undefined;
14
+ preventOverflowTextSelection?: boolean | undefined;
15
+ preventScroll?: boolean | undefined;
16
+ align?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Align | undefined;
17
+ side?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side | undefined;
18
+ sideOffset?: number | undefined;
19
+ alignOffset?: number | undefined | undefined;
20
+ arrowPadding?: number | undefined;
21
+ avoidCollisions?: boolean | undefined | undefined;
22
+ collisionBoundary?: import("bits-ui/dist/internal/types").Arrayable<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Boundary> | undefined;
23
+ collisionPadding?: (number | Partial<Record<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side, number>>) | undefined;
24
+ sticky?: "partial" | "always" | undefined;
25
+ hideWhenDetached?: boolean | undefined;
26
+ updatePositionStrategy?: "optimized" | "always" | undefined;
27
+ strategy?: "absolute" | "fixed" | undefined | undefined;
28
+ customAnchor?: (string | HTMLElement | import("bits-ui/dist/internal/floating-svelte/types").Measurable | null) | undefined;
29
+ child?: import("svelte").Snippet<[import("bits-ui/dist/bits/menu/types").MenuContentSnippetProps & {
30
+ props: Record<string, unknown>;
31
+ }]> | undefined;
32
+ children?: import("svelte").Snippet | undefined;
33
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
34
+ ref?: HTMLElement | null | undefined;
35
+ } & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, {
36
+ forceMount?: boolean | undefined;
37
+ dir?: import("bits-ui").Direction | undefined;
38
+ loop?: boolean | undefined;
39
+ onInteractOutside?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideEventHandler | undefined;
40
+ interactOutsideBehavior?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideBehaviorType | undefined;
41
+ onFocusOutside?: ((event: FocusEvent) => void) | undefined;
42
+ onEscapeKeydown?: ((e: KeyboardEvent) => void) | undefined;
43
+ escapeKeydownBehavior?: import("bits-ui/dist/bits/utilities/escape-layer/types").EscapeBehaviorType | undefined;
44
+ onOpenAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
45
+ onCloseAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
46
+ trapFocus?: boolean | undefined;
47
+ preventOverflowTextSelection?: boolean | undefined;
48
+ preventScroll?: boolean | undefined;
49
+ align?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Align | undefined;
50
+ side?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side | undefined;
51
+ sideOffset?: number | undefined;
52
+ alignOffset?: number | undefined | undefined;
53
+ arrowPadding?: number | undefined;
54
+ avoidCollisions?: boolean | undefined | undefined;
55
+ collisionBoundary?: import("bits-ui/dist/internal/types").Arrayable<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Boundary> | undefined;
56
+ collisionPadding?: (number | Partial<Record<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side, number>>) | undefined;
57
+ sticky?: "partial" | "always" | undefined;
58
+ hideWhenDetached?: boolean | undefined;
59
+ updatePositionStrategy?: "optimized" | "always" | undefined;
60
+ strategy?: "absolute" | "fixed" | undefined | undefined;
61
+ customAnchor?: (string | HTMLElement | import("bits-ui/dist/internal/floating-svelte/types").Measurable | null) | undefined;
62
+ child?: import("svelte").Snippet<[import("bits-ui/dist/bits/menu/types").MenuContentSnippetProps & {
63
+ props: Record<string, unknown>;
64
+ }]> | undefined;
65
+ children?: import("svelte").Snippet | undefined;
66
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
67
+ ref?: HTMLElement | null | undefined;
68
+ }> & {
69
+ portalProps?: DropdownMenuPrimitive.PortalProps;
70
+ }, {}, "ref">;
3
71
  type DropdownMenuContent = ReturnType<typeof DropdownMenuContent>;
4
72
  export default DropdownMenuContent;
@@ -7,17 +7,22 @@
7
7
  class: className,
8
8
  align = "center",
9
9
  sideOffset = 4,
10
+ portalProps,
10
11
  ...restProps
11
- }: HoverCardPrimitive.ContentProps = $props();
12
+ }: HoverCardPrimitive.ContentProps & {
13
+ portalProps?: HoverCardPrimitive.PortalProps;
14
+ } = $props();
12
15
  </script>
13
16
 
14
- <HoverCardPrimitive.Content
15
- bind:ref
16
- {align}
17
- {sideOffset}
18
- class={cn(
19
- "z-50 mt-3 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
20
- className
21
- )}
22
- {...restProps}
23
- />
17
+ <HoverCardPrimitive.Portal {...portalProps}>
18
+ <HoverCardPrimitive.Content
19
+ bind:ref
20
+ {align}
21
+ {sideOffset}
22
+ class={cn(
23
+ "z-50 mt-3 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
24
+ className
25
+ )}
26
+ {...restProps}
27
+ />
28
+ </HoverCardPrimitive.Portal>
@@ -1,4 +1,15 @@
1
1
  import { LinkPreview as HoverCardPrimitive } from "bits-ui";
2
- declare const HoverCardContent: import("svelte").Component<HoverCardPrimitive.ContentProps, {}, "ref">;
2
+ declare const HoverCardContent: import("svelte").Component<Omit<Pick<import("bits-ui/dist/bits/utilities/floating-layer/types").FloatingLayerContentProps, "dir" | "align" | "side" | "sideOffset" | "alignOffset" | "arrowPadding" | "avoidCollisions" | "collisionBoundary" | "collisionPadding" | "sticky" | "hideWhenDetached"> & Omit<import("bits-ui/dist/bits/utilities/dismissible-layer/types").DismissibleLayerProps, "onInteractOutsideStart"> & import("bits-ui/dist/bits/utilities/escape-layer/types").EscapeLayerProps & {
3
+ forceMount?: boolean;
4
+ }, "child" | "children"> & {
5
+ child?: import("svelte").Snippet<[import("bits-ui").LinkPreviewContentSnippetProps & {
6
+ props: Record<string, unknown>;
7
+ }]> | undefined;
8
+ children?: import("svelte").Snippet;
9
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
10
+ ref?: HTMLElement | null | undefined;
11
+ } & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").LinkPreviewContentPropsWithoutHTML> & {
12
+ portalProps?: HoverCardPrimitive.PortalProps;
13
+ }, {}, "ref">;
3
14
  type HoverCardContent = ReturnType<typeof HoverCardContent>;
4
15
  export default HoverCardContent;
@@ -9,19 +9,24 @@
9
9
  alignOffset = -4,
10
10
  align = "start",
11
11
  side = "bottom",
12
+ portalProps,
12
13
  ...restProps
13
- }: MenubarPrimitive.ContentProps = $props();
14
+ }: MenubarPrimitive.ContentProps & {
15
+ portalProps?: MenubarPrimitive.PortalProps;
16
+ } = $props();
14
17
  </script>
15
18
 
16
- <MenubarPrimitive.Content
17
- bind:ref
18
- {sideOffset}
19
- {align}
20
- {alignOffset}
21
- {side}
22
- class={cn(
23
- "z-50 min-w-[12rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none",
24
- className
25
- )}
26
- {...restProps}
27
- />
19
+ <MenubarPrimitive.Portal {...portalProps}>
20
+ <MenubarPrimitive.Content
21
+ bind:ref
22
+ {sideOffset}
23
+ {align}
24
+ {alignOffset}
25
+ {side}
26
+ class={cn(
27
+ "z-50 min-w-[12rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none",
28
+ className
29
+ )}
30
+ {...restProps}
31
+ />
32
+ </MenubarPrimitive.Portal>
@@ -1,4 +1,72 @@
1
1
  import { Menubar as MenubarPrimitive } from "bits-ui";
2
- declare const MenubarContent: import("svelte").Component<MenubarPrimitive.ContentProps, {}, "ref">;
2
+ declare const MenubarContent: import("svelte").Component<{
3
+ forceMount?: boolean | undefined;
4
+ dir?: import("bits-ui").Direction | undefined;
5
+ loop?: boolean | undefined;
6
+ onInteractOutside?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideEventHandler | undefined;
7
+ interactOutsideBehavior?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideBehaviorType | undefined;
8
+ onFocusOutside?: ((event: FocusEvent) => void) | undefined;
9
+ onEscapeKeydown?: ((e: KeyboardEvent) => void) | undefined;
10
+ escapeKeydownBehavior?: import("bits-ui/dist/bits/utilities/escape-layer/types").EscapeBehaviorType | undefined;
11
+ onOpenAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
12
+ onCloseAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
13
+ trapFocus?: boolean | undefined;
14
+ preventOverflowTextSelection?: boolean | undefined;
15
+ preventScroll?: boolean | undefined;
16
+ align?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Align | undefined;
17
+ side?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side | undefined;
18
+ sideOffset?: number | undefined;
19
+ alignOffset?: number | undefined | undefined;
20
+ arrowPadding?: number | undefined;
21
+ avoidCollisions?: boolean | undefined | undefined;
22
+ collisionBoundary?: import("bits-ui/dist/internal/types").Arrayable<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Boundary> | undefined;
23
+ collisionPadding?: (number | Partial<Record<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side, number>>) | undefined;
24
+ sticky?: "partial" | "always" | undefined;
25
+ hideWhenDetached?: boolean | undefined;
26
+ updatePositionStrategy?: "optimized" | "always" | undefined;
27
+ strategy?: "absolute" | "fixed" | undefined | undefined;
28
+ customAnchor?: (string | HTMLElement | import("bits-ui/dist/internal/floating-svelte/types").Measurable | null) | undefined;
29
+ child?: import("svelte").Snippet<[import("bits-ui/dist/bits/menu/types").MenuContentSnippetProps & {
30
+ props: Record<string, unknown>;
31
+ }]> | undefined;
32
+ children?: import("svelte").Snippet | undefined;
33
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
34
+ ref?: HTMLElement | null | undefined;
35
+ } & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, {
36
+ forceMount?: boolean | undefined;
37
+ dir?: import("bits-ui").Direction | undefined;
38
+ loop?: boolean | undefined;
39
+ onInteractOutside?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideEventHandler | undefined;
40
+ interactOutsideBehavior?: import("bits-ui/dist/bits/utilities/dismissible-layer/types").InteractOutsideBehaviorType | undefined;
41
+ onFocusOutside?: ((event: FocusEvent) => void) | undefined;
42
+ onEscapeKeydown?: ((e: KeyboardEvent) => void) | undefined;
43
+ escapeKeydownBehavior?: import("bits-ui/dist/bits/utilities/escape-layer/types").EscapeBehaviorType | undefined;
44
+ onOpenAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
45
+ onCloseAutoFocus?: import("bits-ui/dist/internal/events").EventCallback | undefined;
46
+ trapFocus?: boolean | undefined;
47
+ preventOverflowTextSelection?: boolean | undefined;
48
+ preventScroll?: boolean | undefined;
49
+ align?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Align | undefined;
50
+ side?: import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side | undefined;
51
+ sideOffset?: number | undefined;
52
+ alignOffset?: number | undefined | undefined;
53
+ arrowPadding?: number | undefined;
54
+ avoidCollisions?: boolean | undefined | undefined;
55
+ collisionBoundary?: import("bits-ui/dist/internal/types").Arrayable<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Boundary> | undefined;
56
+ collisionPadding?: (number | Partial<Record<import("bits-ui/dist/bits/utilities/floating-layer/useFloatingLayer.svelte").Side, number>>) | undefined;
57
+ sticky?: "partial" | "always" | undefined;
58
+ hideWhenDetached?: boolean | undefined;
59
+ updatePositionStrategy?: "optimized" | "always" | undefined;
60
+ strategy?: "absolute" | "fixed" | undefined | undefined;
61
+ customAnchor?: (string | HTMLElement | import("bits-ui/dist/internal/floating-svelte/types").Measurable | null) | undefined;
62
+ child?: import("svelte").Snippet<[import("bits-ui/dist/bits/menu/types").MenuContentSnippetProps & {
63
+ props: Record<string, unknown>;
64
+ }]> | undefined;
65
+ children?: import("svelte").Snippet | undefined;
66
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
67
+ ref?: HTMLElement | null | undefined;
68
+ }> & {
69
+ portalProps?: MenubarPrimitive.PortalProps;
70
+ }, {}, "ref">;
3
71
  type MenubarContent = ReturnType<typeof MenubarContent>;
4
72
  export default MenubarContent;
@@ -7,11 +7,14 @@
7
7
  class: className,
8
8
  sideOffset = 4,
9
9
  align = "center",
10
+ portalProps,
10
11
  ...restProps
11
- }: PopoverPrimitive.ContentProps = $props();
12
+ }: PopoverPrimitive.ContentProps & {
13
+ portalProps?: PopoverPrimitive.PortalProps;
14
+ } = $props();
12
15
  </script>
13
16
 
14
- <PopoverPrimitive.Portal>
17
+ <PopoverPrimitive.Portal {...portalProps}>
15
18
  <PopoverPrimitive.Content
16
19
  bind:ref
17
20
  {sideOffset}
@@ -1,4 +1,13 @@
1
1
  import { Popover as PopoverPrimitive } from "bits-ui";
2
- declare const PopoverContent: import("svelte").Component<PopoverPrimitive.ContentProps, {}, "ref">;
2
+ declare const PopoverContent: import("svelte").Component<Omit<Omit<import("bits-ui/dist/bits/utilities/popper-layer/types").PopperLayerProps, "loop" | "content">, "child" | "children"> & {
3
+ child?: import("svelte").Snippet<[import("bits-ui").PopoverContentSnippetProps & {
4
+ props: Record<string, unknown>;
5
+ }]> | undefined;
6
+ children?: import("svelte").Snippet;
7
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
8
+ ref?: HTMLElement | null | undefined;
9
+ } & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").DatePickerContentPropsWithoutHTML> & {
10
+ portalProps?: PopoverPrimitive.PortalProps;
11
+ }, {}, "ref">;
3
12
  type PopoverContent = ReturnType<typeof PopoverContent>;
4
13
  export default PopoverContent;
@@ -8,12 +8,15 @@
8
8
  ref = $bindable(null),
9
9
  class: className,
10
10
  sideOffset = 4,
11
+ portalProps,
11
12
  children,
12
13
  ...restProps
13
- }: WithoutChild<SelectPrimitive.ContentProps> = $props();
14
+ }: WithoutChild<SelectPrimitive.ContentProps> & {
15
+ portalProps?: SelectPrimitive.PortalProps;
16
+ } = $props();
14
17
  </script>
15
18
 
16
- <SelectPrimitive.Portal>
19
+ <SelectPrimitive.Portal {...portalProps}>
17
20
  <SelectPrimitive.Content
18
21
  bind:ref
19
22
  {sideOffset}
@@ -1,4 +1,6 @@
1
1
  import { Select as SelectPrimitive } from "bits-ui";
2
- declare const SelectContent: import("svelte").Component<Omit<SelectPrimitive.ContentProps, "child">, {}, "ref">;
2
+ declare const SelectContent: import("svelte").Component<Omit<SelectPrimitive.ContentProps, "child"> & {
3
+ portalProps?: SelectPrimitive.PortalProps;
4
+ }, {}, "ref">;
3
5
  type SelectContent = ReturnType<typeof SelectContent>;
4
6
  export default SelectContent;
@@ -31,15 +31,17 @@
31
31
  ref = $bindable(null),
32
32
  class: className,
33
33
  side = "right",
34
+ portalProps,
34
35
  children,
35
36
  ...restProps
36
37
  }: WithoutChildrenOrChild<SheetPrimitive.ContentProps> & {
38
+ portalProps?: SheetPrimitive.PortalProps;
37
39
  side?: Side;
38
40
  children: Snippet;
39
41
  } = $props();
40
42
  </script>
41
43
 
42
- <SheetPrimitive.Portal>
44
+ <SheetPrimitive.Portal {...portalProps}>
43
45
  <SheetOverlay />
44
46
  <SheetPrimitive.Content bind:ref class={cn(sheetVariants({ side }), className)} {...restProps}>
45
47
  {@render children?.()}
@@ -53,6 +53,7 @@ export type Side = VariantProps<typeof sheetVariants>["side"];
53
53
  import { Dialog as SheetPrimitive } from "bits-ui";
54
54
  import type { Snippet } from "svelte";
55
55
  declare const SheetContent: import("svelte").Component<Omit<Omit<SheetPrimitive.ContentProps, "child">, "children"> & {
56
+ portalProps?: SheetPrimitive.PortalProps;
56
57
  side?: Side;
57
58
  children: Snippet;
58
59
  }, {}, "ref">;
@@ -2,16 +2,16 @@
2
2
  import { type VariantProps, tv } from "tailwind-variants";
3
3
 
4
4
  export const toggleVariants = tv({
5
- base: "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
5
+ base: "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
6
6
  variants: {
7
7
  variant: {
8
8
  default: "bg-transparent",
9
9
  outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent",
10
10
  },
11
11
  size: {
12
- default: "h-10 px-3",
13
- sm: "h-9 px-2.5",
14
- lg: "h-11 px-5",
12
+ default: "h-10 min-w-10 px-3",
13
+ sm: "h-9 min-w-9 px-2.5",
14
+ lg: "h-11 min-w-11 px-5",
15
15
  },
16
16
  },
17
17
  defaultVariants: {
@@ -9,7 +9,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
9
9
  sm: string;
10
10
  lg: string;
11
11
  };
12
- }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
12
+ }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
13
13
  variant: {
14
14
  default: string;
15
15
  outline: string;
@@ -49,7 +49,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
49
49
  sm: string;
50
50
  lg: string;
51
51
  };
52
- }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
52
+ }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
53
53
  variant: {
54
54
  default: string;
55
55
  outline: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.12.24",
4
+ "version": "0.13.2",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -33,54 +33,54 @@
33
33
  "zod": "^3.23.8"
34
34
  },
35
35
  "dependencies": {
36
- "@internationalized/date": "^3.5.6",
37
- "bits-ui": "1.0.0-next.59",
36
+ "@internationalized/date": "^3.6.0",
37
+ "bits-ui": "1.0.0-next.64",
38
38
  "clsx": "^2.1.1",
39
- "embla-carousel-svelte": "8.4.0",
39
+ "embla-carousel-svelte": "8.5.1",
40
40
  "formsnap": "2.0.0-next.1",
41
- "mode-watcher": "^0.4.1",
41
+ "mode-watcher": "^0.5.0",
42
42
  "paneforge": "1.0.0-next.1",
43
43
  "svelte-sonner": "^0.3.28",
44
- "tailwind-merge": "^2.5.4",
44
+ "tailwind-merge": "^2.5.5",
45
45
  "tailwind-variants": "^0.3.0",
46
46
  "vaul-svelte": "1.0.0-next.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@kayord/tw-plugin": "^1.0.3",
50
50
  "@sveltejs/adapter-auto": "^3.3.1",
51
- "@sveltejs/kit": "^2.8.1",
51
+ "@sveltejs/kit": "^2.8.4",
52
52
  "@sveltejs/package": "^2.3.7",
53
53
  "@sveltejs/vite-plugin-svelte": "^4.0.1",
54
54
  "@testing-library/jest-dom": "^6.6.3",
55
- "@testing-library/svelte": "^5.2.4",
56
- "@typescript-eslint/eslint-plugin": "^8.15.0",
57
- "@typescript-eslint/parser": "^8.15.0",
55
+ "@testing-library/svelte": "^5.2.6",
56
+ "@typescript-eslint/eslint-plugin": "^8.16.0",
57
+ "@typescript-eslint/parser": "^8.16.0",
58
58
  "autoprefixer": "^10.4.20",
59
59
  "eslint": "^9.15.0",
60
60
  "eslint-config-prettier": "^9.1.0",
61
61
  "eslint-plugin-svelte": "^2.46.0",
62
62
  "happy-dom": "^15.11.6",
63
- "lucide-svelte": "^0.460.1",
63
+ "lucide-svelte": "^0.461.0",
64
64
  "postcss": "^8.4.49",
65
- "prettier": "^3.3.3",
66
- "prettier-plugin-svelte": "^3.2.8",
67
- "prettier-plugin-tailwindcss": "^0.6.8",
65
+ "prettier": "^3.4.1",
66
+ "prettier-plugin-svelte": "^3.3.2",
67
+ "prettier-plugin-tailwindcss": "^0.6.9",
68
68
  "publint": "^0.2.12",
69
- "svelte": "^5.2.3",
70
- "svelte-check": "^4.0.9",
69
+ "svelte": "^5.2.8",
70
+ "svelte-check": "^4.1.0",
71
71
  "tailwindcss": "^3.4.15",
72
72
  "tailwindcss-animate": "^1.0.7",
73
73
  "tslib": "^2.8.1",
74
- "typescript": "^5.6.3",
74
+ "typescript": "^5.7.2",
75
75
  "vite": "^5.4.11",
76
- "vitest": "^2.1.5",
76
+ "vitest": "^2.1.6",
77
77
  "zod": "^3.23.8"
78
78
  },
79
79
  "svelte": "./dist/index.js",
80
80
  "types": "./dist/index.d.ts",
81
81
  "main": "./dist/index.js",
82
82
  "type": "module",
83
- "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee",
83
+ "packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387",
84
84
  "scripts": {
85
85
  "dev": "vite dev",
86
86
  "build": "vite build && npm run package",
@@ -1,4 +0,0 @@
1
- import { Drawer as DrawerPrimitive } from "vaul-svelte";
2
- declare const DrawerContent: import("svelte").Component<DrawerPrimitive.ContentProps, {}, "ref">;
3
- type DrawerContent = ReturnType<typeof DrawerContent>;
4
- export default DrawerContent;