svelte-firekit 0.0.1

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 (147) hide show
  1. package/README.md +58 -0
  2. package/dist/auth/reset-password.svelte +20 -0
  3. package/dist/auth/reset-password.svelte.d.ts +18 -0
  4. package/dist/auth/sign-in.svelte +30 -0
  5. package/dist/auth/sign-in.svelte.d.ts +4 -0
  6. package/dist/auth/sign-up.svelte +30 -0
  7. package/dist/auth/sign-up.svelte.d.ts +4 -0
  8. package/dist/auth/uid.d.ts +1 -0
  9. package/dist/auth/uid.js +7 -0
  10. package/dist/auth/user-button.svelte +117 -0
  11. package/dist/auth/user-button.svelte.d.ts +5 -0
  12. package/dist/auth/user.svelte.d.ts +10 -0
  13. package/dist/auth/user.svelte.js +21 -0
  14. package/dist/auth.d.ts +39 -0
  15. package/dist/auth.js +100 -0
  16. package/dist/components/auth/google-sign-in.svelte +46 -0
  17. package/dist/components/auth/google-sign-in.svelte.d.ts +4 -0
  18. package/dist/components/auth/reset-password-form.svelte +58 -0
  19. package/dist/components/auth/reset-password-form.svelte.d.ts +18 -0
  20. package/dist/components/auth/sign-in-form.svelte +77 -0
  21. package/dist/components/auth/sign-in-form.svelte.d.ts +18 -0
  22. package/dist/components/auth/sign-up-form.svelte +112 -0
  23. package/dist/components/auth/sign-up-form.svelte.d.ts +18 -0
  24. package/dist/components/ui/alert-dialog/alert-dialog-action.svelte +13 -0
  25. package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +3 -0
  26. package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte +17 -0
  27. package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +3 -0
  28. package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +23 -0
  29. package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +2 -0
  30. package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +16 -0
  31. package/dist/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +3 -0
  32. package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +20 -0
  33. package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +4 -0
  34. package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +20 -0
  35. package/dist/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +4 -0
  36. package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +19 -0
  37. package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +3 -0
  38. package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +18 -0
  39. package/dist/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +3 -0
  40. package/dist/components/ui/alert-dialog/index.js +15 -0
  41. package/dist/components/ui/avatar/avatar-fallback.svelte +16 -0
  42. package/dist/components/ui/avatar/avatar-fallback.svelte.d.ts +3 -0
  43. package/dist/components/ui/avatar/avatar-image.svelte +20 -0
  44. package/dist/components/ui/avatar/avatar-image.svelte.d.ts +3 -0
  45. package/dist/components/ui/avatar/avatar.svelte +18 -0
  46. package/dist/components/ui/avatar/avatar.svelte.d.ts +3 -0
  47. package/dist/components/ui/avatar/index.d.ts +4 -0
  48. package/dist/components/ui/avatar/index.js +6 -0
  49. package/dist/components/ui/button/button.svelte +75 -0
  50. package/dist/components/ui/button/button.svelte.d.ts +117 -0
  51. package/dist/components/ui/button/index.d.ts +2 -0
  52. package/dist/components/ui/button/index.js +4 -0
  53. package/dist/components/ui/card/card-content.svelte +16 -0
  54. package/dist/components/ui/card/card-content.svelte.d.ts +4 -0
  55. package/dist/components/ui/card/card-description.svelte +16 -0
  56. package/dist/components/ui/card/card-description.svelte.d.ts +4 -0
  57. package/dist/components/ui/card/card-footer.svelte +16 -0
  58. package/dist/components/ui/card/card-footer.svelte.d.ts +4 -0
  59. package/dist/components/ui/card/card-header.svelte +16 -0
  60. package/dist/components/ui/card/card-header.svelte.d.ts +4 -0
  61. package/dist/components/ui/card/card-title.svelte +25 -0
  62. package/dist/components/ui/card/card-title.svelte.d.ts +7 -0
  63. package/dist/components/ui/card/card.svelte +20 -0
  64. package/dist/components/ui/card/card.svelte.d.ts +4 -0
  65. package/dist/components/ui/card/index.d.ts +7 -0
  66. package/dist/components/ui/card/index.js +9 -0
  67. package/dist/components/ui/checkbox/checkbox.svelte +33 -0
  68. package/dist/components/ui/checkbox/checkbox.svelte.d.ts +3 -0
  69. package/dist/components/ui/checkbox/index.d.ts +2 -0
  70. package/dist/components/ui/checkbox/index.js +4 -0
  71. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +37 -0
  72. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +5 -0
  73. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +22 -0
  74. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +3 -0
  75. package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +19 -0
  76. package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +11 -0
  77. package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +23 -0
  78. package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +17 -0
  79. package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +23 -0
  80. package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +7 -0
  81. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +30 -0
  82. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +3 -0
  83. package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +16 -0
  84. package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +3 -0
  85. package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
  86. package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +4 -0
  87. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +19 -0
  88. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +3 -0
  89. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +28 -0
  90. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +5 -0
  91. package/dist/components/ui/dropdown-menu/index.js +17 -0
  92. package/dist/components/ui/form/form-button.svelte +7 -0
  93. package/dist/components/ui/form/form-button.svelte.d.ts +3 -0
  94. package/dist/components/ui/form/form-description.svelte +17 -0
  95. package/dist/components/ui/form/form-description.svelte.d.ts +3 -0
  96. package/dist/components/ui/form/form-element-field.svelte +30 -0
  97. package/dist/components/ui/form/form-element-field.svelte.d.ts +22 -0
  98. package/dist/components/ui/form/form-field-errors.svelte +30 -0
  99. package/dist/components/ui/form/form-field-errors.svelte.d.ts +5 -0
  100. package/dist/components/ui/form/form-field.svelte +30 -0
  101. package/dist/components/ui/form/form-field.svelte.d.ts +21 -0
  102. package/dist/components/ui/form/form-fieldset.svelte +21 -0
  103. package/dist/components/ui/form/form-fieldset.svelte.d.ts +19 -0
  104. package/dist/components/ui/form/form-label.svelte +21 -0
  105. package/dist/components/ui/form/form-label.svelte.d.ts +3 -0
  106. package/dist/components/ui/form/form-legend.svelte +17 -0
  107. package/dist/components/ui/form/form-legend.svelte.d.ts +3 -0
  108. package/dist/components/ui/form/index.d.ts +11 -0
  109. package/dist/components/ui/form/index.js +13 -0
  110. package/dist/components/ui/input/index.d.ts +2 -0
  111. package/dist/components/ui/input/index.js +4 -0
  112. package/dist/components/ui/input/input.svelte +22 -0
  113. package/dist/components/ui/input/input.svelte.d.ts +4 -0
  114. package/dist/components/ui/label/index.d.ts +2 -0
  115. package/dist/components/ui/label/index.js +4 -0
  116. package/dist/components/ui/label/label.svelte +19 -0
  117. package/dist/components/ui/label/label.svelte.d.ts +3 -0
  118. package/dist/components/ui/sonner/index.d.ts +1 -0
  119. package/dist/components/ui/sonner/index.js +1 -0
  120. package/dist/components/ui/sonner/sonner.svelte +20 -0
  121. package/dist/components/ui/sonner/sonner.svelte.d.ts +3 -0
  122. package/dist/config.d.ts +2 -0
  123. package/dist/config.js +39 -0
  124. package/dist/firebase.d.ts +43 -0
  125. package/dist/firebase.js +110 -0
  126. package/dist/firestore/Collection.svelte +148 -0
  127. package/dist/firestore/Collection.svelte.d.ts +27 -0
  128. package/dist/firestore/collection.svelte.js +207 -0
  129. package/dist/firestore/doc.svelte.d.ts +1 -0
  130. package/dist/firestore/doc.svelte.js +1 -0
  131. package/dist/firestore/firestore.d.ts +31 -0
  132. package/dist/firestore/firestore.js +100 -0
  133. package/dist/firestore/perf.d.ts +3 -0
  134. package/dist/firestore/perf.js +12 -0
  135. package/dist/index.d.ts +2 -0
  136. package/dist/index.js +3 -0
  137. package/dist/schemas/reset-password.d.ts +4 -0
  138. package/dist/schemas/reset-password.js +4 -0
  139. package/dist/schemas/sign-in.d.ts +5 -0
  140. package/dist/schemas/sign-in.js +5 -0
  141. package/dist/schemas/sign-up.d.ts +8 -0
  142. package/dist/schemas/sign-up.js +8 -0
  143. package/dist/types/nav.d.ts +9 -0
  144. package/dist/types/nav.js +1 -0
  145. package/dist/utils.d.ts +3 -0
  146. package/dist/utils.js +16 -0
  147. package/package.json +64 -0
@@ -0,0 +1,117 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
3
+ import { type VariantProps } from "tailwind-variants";
4
+ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
5
+ variant: {
6
+ default: string;
7
+ destructive: string;
8
+ outline: string;
9
+ secondary: string;
10
+ ghost: string;
11
+ link: string;
12
+ };
13
+ size: {
14
+ default: string;
15
+ sm: string;
16
+ lg: string;
17
+ icon: string;
18
+ };
19
+ }, undefined, "focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
20
+ variant: {
21
+ default: string;
22
+ destructive: string;
23
+ outline: string;
24
+ secondary: string;
25
+ ghost: string;
26
+ link: string;
27
+ };
28
+ size: {
29
+ default: string;
30
+ sm: string;
31
+ lg: string;
32
+ icon: string;
33
+ };
34
+ }, {
35
+ variant: {
36
+ default: string;
37
+ destructive: string;
38
+ outline: string;
39
+ secondary: string;
40
+ ghost: string;
41
+ link: string;
42
+ };
43
+ size: {
44
+ default: string;
45
+ sm: string;
46
+ lg: string;
47
+ icon: string;
48
+ };
49
+ }>, {
50
+ variant: {
51
+ default: string;
52
+ destructive: string;
53
+ outline: string;
54
+ secondary: string;
55
+ ghost: string;
56
+ link: string;
57
+ };
58
+ size: {
59
+ default: string;
60
+ sm: string;
61
+ lg: string;
62
+ icon: string;
63
+ };
64
+ }, undefined, import("tailwind-variants").TVReturnType<{
65
+ variant: {
66
+ default: string;
67
+ destructive: string;
68
+ outline: string;
69
+ secondary: string;
70
+ ghost: string;
71
+ link: string;
72
+ };
73
+ size: {
74
+ default: string;
75
+ sm: string;
76
+ lg: string;
77
+ icon: string;
78
+ };
79
+ }, undefined, "focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
80
+ variant: {
81
+ default: string;
82
+ destructive: string;
83
+ outline: string;
84
+ secondary: string;
85
+ ghost: string;
86
+ link: string;
87
+ };
88
+ size: {
89
+ default: string;
90
+ sm: string;
91
+ lg: string;
92
+ icon: string;
93
+ };
94
+ }, {
95
+ variant: {
96
+ default: string;
97
+ destructive: string;
98
+ outline: string;
99
+ secondary: string;
100
+ ghost: string;
101
+ link: string;
102
+ };
103
+ size: {
104
+ default: string;
105
+ sm: string;
106
+ lg: string;
107
+ icon: string;
108
+ };
109
+ }>, unknown, unknown, undefined>>;
110
+ export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
111
+ export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
112
+ export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
113
+ variant?: ButtonVariant;
114
+ size?: ButtonSize;
115
+ };
116
+ declare const Button: import("svelte").Component<ButtonProps, {}, "ref">;
117
+ export default Button;
@@ -0,0 +1,2 @@
1
+ import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, buttonVariants } from "./button.svelte";
2
+ export { Root, type ButtonProps as Props, Root as Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant, };
@@ -0,0 +1,4 @@
1
+ import Root, { buttonVariants, } from "./button.svelte";
2
+ export { Root,
3
+ //
4
+ Root as Button, buttonVariants, };
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import type { WithElementRef } from "bits-ui";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
12
+ </script>
13
+
14
+ <div bind:this={ref} class={cn("p-6", className)} {...restProps}>
15
+ {@render children?.()}
16
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const CardContent: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
4
+ export default CardContent;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import type { WithElementRef } from "bits-ui";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: WithElementRef<HTMLAttributes<HTMLParagraphElement>> = $props();
12
+ </script>
13
+
14
+ <p bind:this={ref} class={cn("text-muted-foreground text-sm", className)} {...restProps}>
15
+ {@render children?.()}
16
+ </p>
@@ -0,0 +1,4 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const CardDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
4
+ export default CardDescription;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import type { WithElementRef } from "bits-ui";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
12
+ </script>
13
+
14
+ <div bind:this={ref} class={cn("flex items-center p-6 pt-0", className)} {...restProps}>
15
+ {@render children?.()}
16
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const CardFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
4
+ export default CardFooter;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import type { WithElementRef } from "bits-ui";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
12
+ </script>
13
+
14
+ <div bind:this={ref} class={cn("flex flex-col space-y-1.5 p-6 pb-0", className)} {...restProps}>
15
+ {@render children?.()}
16
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const CardHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
4
+ export default CardHeader;
@@ -0,0 +1,25 @@
1
+ <script lang="ts">
2
+ import type { WithElementRef } from "bits-ui";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ level = 3,
10
+ children,
11
+ ...restProps
12
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
13
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
14
+ } = $props();
15
+ </script>
16
+
17
+ <div
18
+ role="heading"
19
+ aria-level={level}
20
+ bind:this={ref}
21
+ class={cn("font-semibold leading-none tracking-tight", className)}
22
+ {...restProps}
23
+ >
24
+ {@render children?.()}
25
+ </div>
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const CardTitle: import("svelte").Component<HTMLAttributes<HTMLDivElement> & {
3
+ ref?: HTMLElement | null | undefined;
4
+ } & {
5
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
6
+ }, {}, "ref">;
7
+ export default CardTitle;
@@ -0,0 +1,20 @@
1
+ <script lang="ts">
2
+ import type { WithElementRef } from "bits-ui";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
12
+ </script>
13
+
14
+ <div
15
+ bind:this={ref}
16
+ class={cn("bg-card text-card-foreground rounded-xl border shadow", className)}
17
+ {...restProps}
18
+ >
19
+ {@render children?.()}
20
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const Card: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
4
+ export default Card;
@@ -0,0 +1,7 @@
1
+ import Root from "./card.svelte";
2
+ import Content from "./card-content.svelte";
3
+ import Description from "./card-description.svelte";
4
+ import Footer from "./card-footer.svelte";
5
+ import Header from "./card-header.svelte";
6
+ import Title from "./card-title.svelte";
7
+ export { Root, Content, Description, Footer, Header, Title, Root as Card, Content as CardContent, Description as CardDescription, Footer as CardFooter, Header as CardHeader, Title as CardTitle, };
@@ -0,0 +1,9 @@
1
+ import Root from "./card.svelte";
2
+ import Content from "./card-content.svelte";
3
+ import Description from "./card-description.svelte";
4
+ import Footer from "./card-footer.svelte";
5
+ import Header from "./card-header.svelte";
6
+ import Title from "./card-title.svelte";
7
+ export { Root, Content, Description, Footer, Header, Title,
8
+ //
9
+ Root as Card, Content as CardContent, Description as CardDescription, Footer as CardFooter, Header as CardHeader, Title as CardTitle, };
@@ -0,0 +1,33 @@
1
+ <script lang="ts">
2
+ import { Checkbox as CheckboxPrimitive, type WithoutChildrenOrChild } from "bits-ui";
3
+ import Check from "svelte-radix/Check.svelte";
4
+ import Minus from "svelte-radix/Minus.svelte";
5
+ import { cn } from "../../../utils.js";
6
+
7
+ let {
8
+ ref = $bindable(null),
9
+ class: className,
10
+ checked = $bindable(false),
11
+ ...restProps
12
+ }: WithoutChildrenOrChild<CheckboxPrimitive.RootProps> = $props();
13
+ </script>
14
+
15
+ <CheckboxPrimitive.Root
16
+ class={cn(
17
+ "border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
18
+ className
19
+ )}
20
+ bind:checked
21
+ bind:ref
22
+ {...restProps}
23
+ >
24
+ {#snippet children({ checked })}
25
+ <span class="flex size-4 items-center justify-center text-current">
26
+ {#if checked === "indeterminate"}
27
+ <Minus class="size-3.5" />
28
+ {:else}
29
+ <Check class={cn("size-3.5", !checked && "text-transparent")} />
30
+ {/if}
31
+ </span>
32
+ {/snippet}
33
+ </CheckboxPrimitive.Root>
@@ -0,0 +1,3 @@
1
+ import { Checkbox as CheckboxPrimitive } from "bits-ui";
2
+ declare const Checkbox: import("svelte").Component<Omit<Omit<CheckboxPrimitive.RootProps, "child">, "children">, {}, "ref" | "checked">;
3
+ export default Checkbox;
@@ -0,0 +1,2 @@
1
+ import Root from "./checkbox.svelte";
2
+ export { Root, Root as Checkbox, };
@@ -0,0 +1,4 @@
1
+ import Root from "./checkbox.svelte";
2
+ export { Root,
3
+ //
4
+ Root as Checkbox, };
@@ -0,0 +1,37 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive, type WithoutChild } from "bits-ui";
3
+ import Check from "svelte-radix/Check.svelte";
4
+ import Minus from "svelte-radix/Minus.svelte";
5
+ import { cn } from "../../../utils.js";
6
+
7
+ let {
8
+ ref = $bindable(null),
9
+ class: className,
10
+ children: childrenProp,
11
+ checked = $bindable(false),
12
+ ...restProps
13
+ }: WithoutChild<DropdownMenuPrimitive.CheckboxItemProps> = $props();
14
+
15
+ export { className as class };
16
+ </script>
17
+
18
+ <DropdownMenuPrimitive.CheckboxItem
19
+ bind:ref
20
+ bind:checked
21
+ class={cn(
22
+ "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
23
+ className
24
+ )}
25
+ {...restProps}
26
+ >
27
+ {#snippet children({ checked })}
28
+ <span class="absolute left-2 flex size-3.5 items-center justify-center">
29
+ {#if checked === "indeterminate"}
30
+ <Minus class="size-3.5" />
31
+ {:else}
32
+ <Check class={cn("size-3.5", !checked && "text-transparent")} />
33
+ {/if}
34
+ </span>
35
+ {@render childrenProp?.({ checked })}
36
+ {/snippet}
37
+ </DropdownMenuPrimitive.CheckboxItem>
@@ -0,0 +1,5 @@
1
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
+ declare const DropdownMenuCheckboxItem: import("svelte").Component<Omit<DropdownMenuPrimitive.CheckboxItemProps, "child">, {
3
+ class: string | null | undefined;
4
+ }, "ref" | "checked">;
5
+ export default DropdownMenuCheckboxItem;
@@ -0,0 +1,22 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ sideOffset = 4,
9
+ ...restProps
10
+ }: DropdownMenuPrimitive.ContentProps = $props();
11
+ </script>
12
+
13
+ <DropdownMenuPrimitive.Content
14
+ bind:ref
15
+ {sideOffset}
16
+ class={cn(
17
+ "bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
18
+ "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 outline-none",
19
+ className
20
+ )}
21
+ {...restProps}
22
+ />
@@ -0,0 +1,3 @@
1
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
+ declare const DropdownMenuContent: import("svelte").Component<DropdownMenuPrimitive.ContentProps, {}, "ref">;
3
+ export default DropdownMenuContent;
@@ -0,0 +1,19 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
3
+ import { cn } from "../../../utils.js";
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ inset,
9
+ ...restProps
10
+ }: DropdownMenuPrimitive.GroupHeadingProps & {
11
+ inset?: boolean;
12
+ } = $props();
13
+ </script>
14
+
15
+ <DropdownMenuPrimitive.GroupHeading
16
+ bind:ref
17
+ class={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
18
+ {...restProps}
19
+ />
@@ -0,0 +1,11 @@
1
+ declare const DropdownMenuGroupHeading: import("svelte").Component<Omit<{}, "children" | "child"> & {
2
+ child?: import("svelte").Snippet<[{
3
+ props: Record<string, unknown>;
4
+ }]> | undefined;
5
+ children?: import("svelte").Snippet<[]> | undefined;
6
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
7
+ ref?: HTMLElement | null | undefined;
8
+ } & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").ContextMenuGroupHeadingPropsWithoutHTML> & {
9
+ inset?: boolean;
10
+ }, {}, "ref">;
11
+ export default DropdownMenuGroupHeading;
@@ -0,0 +1,23 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ inset,
9
+ ...restProps
10
+ }: DropdownMenuPrimitive.ItemProps & {
11
+ inset?: boolean;
12
+ } = $props();
13
+ </script>
14
+
15
+ <DropdownMenuPrimitive.Item
16
+ bind:ref
17
+ class={cn(
18
+ "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
19
+ inset && "pl-8",
20
+ className
21
+ )}
22
+ {...restProps}
23
+ />
@@ -0,0 +1,17 @@
1
+ declare const DropdownMenuItem: import("svelte").Component<Omit<{
2
+ disabled?: boolean;
3
+ textValue?: string;
4
+ onSelect?: (event: Event) => void;
5
+ }, "children" | "child"> & {
6
+ child?: import("svelte").Snippet<[{
7
+ props: Record<string, unknown>;
8
+ }]> | undefined;
9
+ children?: import("svelte").Snippet<[]> | undefined;
10
+ style?: import("bits-ui").StyleProperties | string | null | undefined;
11
+ ref?: HTMLElement | null | undefined;
12
+ } & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").ContextMenuItemPropsWithoutHTML<{
13
+ _default: never;
14
+ }>> & {
15
+ inset?: boolean;
16
+ }, {}, "ref">;
17
+ export default DropdownMenuItem;
@@ -0,0 +1,23 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../../utils.js";
3
+ import { type WithElementRef } from "bits-ui";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ inset,
10
+ children,
11
+ ...restProps
12
+ }: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
13
+ inset?: boolean;
14
+ } = $props();
15
+ </script>
16
+
17
+ <div
18
+ bind:this={ref}
19
+ class={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
20
+ {...restProps}
21
+ >
22
+ {@render children?.()}
23
+ </div>
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ declare const DropdownMenuLabel: import("svelte").Component<HTMLAttributes<HTMLDivElement> & {
3
+ ref?: HTMLElement | null | undefined;
4
+ } & {
5
+ inset?: boolean;
6
+ }, {}, "ref">;
7
+ export default DropdownMenuLabel;
@@ -0,0 +1,30 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive, type WithoutChild } from "bits-ui";
3
+ import DotFilled from "svelte-radix/DotFilled.svelte";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children: childrenProp,
10
+ ...restProps
11
+ }: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();
12
+ </script>
13
+
14
+ <DropdownMenuPrimitive.RadioItem
15
+ bind:ref
16
+ class={cn(
17
+ "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
18
+ className
19
+ )}
20
+ {...restProps}
21
+ >
22
+ {#snippet children({ checked })}
23
+ <span class="absolute left-2 flex size-3.5 items-center justify-center">
24
+ {#if checked}
25
+ <DotFilled class="size-4 fill-current" />
26
+ {/if}
27
+ </span>
28
+ {@render childrenProp?.({ checked })}
29
+ {/snippet}
30
+ </DropdownMenuPrimitive.RadioItem>
@@ -0,0 +1,3 @@
1
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
+ declare const DropdownMenuRadioItem: import("svelte").Component<Omit<DropdownMenuPrimitive.RadioItemProps, "child">, {}, "ref">;
3
+ export default DropdownMenuRadioItem;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
3
+ import { cn } from "../../../utils.js";
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ ...restProps
9
+ }: DropdownMenuPrimitive.SeparatorProps = $props();
10
+ </script>
11
+
12
+ <DropdownMenuPrimitive.Separator
13
+ bind:ref
14
+ class={cn("bg-muted -mx-1 my-1 h-px", className)}
15
+ {...restProps}
16
+ />
@@ -0,0 +1,3 @@
1
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
+ declare const DropdownMenuSeparator: import("svelte").Component<DropdownMenuPrimitive.SeparatorProps, {}, "ref">;
3
+ export default DropdownMenuSeparator;
@@ -0,0 +1,20 @@
1
+ <script lang="ts">
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ import { type WithElementRef } from "bits-ui";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();
12
+ </script>
13
+
14
+ <span
15
+ bind:this={ref}
16
+ class={cn("ml-auto text-xs tracking-widest opacity-60", className)}
17
+ {...restProps}
18
+ >
19
+ {@render children?.()}
20
+ </span>
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ import { type WithElementRef } from "bits-ui";
3
+ declare const DropdownMenuShortcut: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
4
+ export default DropdownMenuShortcut;
@@ -0,0 +1,19 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
3
+ import { cn } from "../../../utils.js";
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ ...restProps
9
+ }: DropdownMenuPrimitive.SubContentProps = $props();
10
+ </script>
11
+
12
+ <DropdownMenuPrimitive.SubContent
13
+ bind:ref
14
+ class={cn(
15
+ "bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-lg focus:outline-none",
16
+ className
17
+ )}
18
+ {...restProps}
19
+ />
@@ -0,0 +1,3 @@
1
+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
+ declare const DropdownMenuSubContent: import("svelte").Component<DropdownMenuPrimitive.SubContentProps, {}, "ref">;
3
+ export default DropdownMenuSubContent;