@kayord/ui 0.4.5 → 0.5.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.
- package/dist/components/custom/data-table/DataTableCheckbox.svelte.d.ts +17 -0
- package/dist/components/ui/accordion/accordion-trigger.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/components/ui/calendar/calendar-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-day.svelte +3 -3
- package/dist/components/ui/calendar/calendar-head-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-header.svelte +1 -1
- package/dist/components/ui/calendar/calendar-months.svelte +1 -1
- package/dist/components/ui/calendar/calendar-next-button.svelte +1 -1
- package/dist/components/ui/calendar/calendar-prev-button.svelte +1 -1
- package/dist/components/ui/calendar/calendar.svelte +1 -1
- package/dist/components/ui/carousel/carousel-next.svelte +2 -2
- package/dist/components/ui/carousel/carousel-previous.svelte +2 -2
- package/dist/components/ui/carousel/carousel.svelte.d.ts +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +4 -3
- package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command.svelte.d.ts +17 -0
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +2 -2
- package/dist/components/ui/dialog/dialog-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/form/form-button.svelte +1 -1
- package/dist/components/ui/form/form-button.svelte.d.ts +3 -1
- package/dist/components/ui/form/form-description.svelte +3 -3
- package/dist/components/ui/form/form-description.svelte.d.ts +7 -1
- package/dist/components/ui/form/form-element-field.svelte +15 -0
- package/dist/components/ui/form/form-element-field.svelte.d.ts +24 -0
- package/dist/components/ui/form/form-field-errors.svelte +20 -0
- package/dist/components/ui/form/form-field-errors.svelte.d.ts +34 -0
- package/dist/components/ui/form/form-field.svelte +15 -0
- package/dist/components/ui/form/form-field.svelte.d.ts +24 -0
- package/dist/components/ui/form/form-fieldset.svelte +21 -0
- package/dist/components/ui/form/form-fieldset.svelte.d.ts +23 -0
- package/dist/components/ui/form/form-label.svelte +4 -4
- package/dist/components/ui/form/form-label.svelte.d.ts +3 -1
- package/dist/components/ui/form/form-legend.svelte +13 -0
- package/dist/components/ui/form/form-legend.svelte.d.ts +22 -0
- package/dist/components/ui/form/index.d.ts +7 -28
- package/dist/components/ui/form/index.js +8 -24
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/input/input.svelte.d.ts +1 -1
- package/dist/components/ui/menubar/menubar-checkbox-item.svelte +2 -2
- package/dist/components/ui/menubar/menubar-item.svelte +1 -1
- package/dist/components/ui/menubar/menubar-radio-item.svelte +2 -2
- package/dist/components/ui/menubar/menubar-sub-trigger.svelte +2 -2
- package/dist/components/ui/menubar/menubar-trigger.svelte +1 -1
- package/dist/components/ui/pagination/pagination-ellipsis.svelte +2 -2
- package/dist/components/ui/pagination/pagination-next-button.svelte +1 -1
- package/dist/components/ui/pagination/pagination-prev-button.svelte +1 -1
- package/dist/components/ui/pagination/pagination.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-header.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-months.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar.svelte +1 -1
- package/dist/components/ui/select/select-item.svelte +5 -3
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/sheet/sheet-content.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +7 -3
- package/dist/components/ui/sonner/sonner.svelte.d.ts +1 -1
- package/package.json +25 -25
- package/dist/components/ui/drawer/drawer-description.svelte.d.ts +0 -16
- package/dist/components/ui/drawer/drawer-title.svelte.d.ts +0 -16
- package/dist/components/ui/drawer/index.d.ts +0 -13
- package/dist/components/ui/form/form-checkbox.svelte +0 -19
- package/dist/components/ui/form/form-checkbox.svelte.d.ts +0 -13
- package/dist/components/ui/form/form-input.svelte +0 -22
- package/dist/components/ui/form/form-input.svelte.d.ts +0 -14
- package/dist/components/ui/form/form-item.svelte +0 -8
- package/dist/components/ui/form/form-item.svelte.d.ts +0 -17
- package/dist/components/ui/form/form-native-select.svelte +0 -17
- package/dist/components/ui/form/form-native-select.svelte.d.ts +0 -17
- package/dist/components/ui/form/form-radio-group.svelte +0 -17
- package/dist/components/ui/form/form-radio-group.svelte.d.ts +0 -17
- package/dist/components/ui/form/form-select-trigger.svelte +0 -11
- package/dist/components/ui/form/form-select-trigger.svelte.d.ts +0 -22
- package/dist/components/ui/form/form-select.svelte +0 -16
- package/dist/components/ui/form/form-select.svelte.d.ts +0 -35
- package/dist/components/ui/form/form-switch.svelte +0 -18
- package/dist/components/ui/form/form-switch.svelte.d.ts +0 -13
- package/dist/components/ui/form/form-textarea.svelte +0 -22
- package/dist/components/ui/form/form-textarea.svelte.d.ts +0 -14
- package/dist/components/ui/form/form-validation.svelte +0 -7
- package/dist/components/ui/form/form-validation.svelte.d.ts +0 -15
- package/dist/components/ui/select/select.svelte +0 -8
- package/dist/components/ui/select/select.svelte.d.ts +0 -16
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { Writable } from "svelte/store";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: Omit<import("bits-ui/dist/bits/checkbox/types").Props, "checked"> & {
|
|
5
|
+
checked: Writable<boolean>;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
type DataTableCheckboxProps_ = typeof __propDef.props;
|
|
13
|
+
export { DataTableCheckboxProps_ as DataTableCheckboxProps };
|
|
14
|
+
export type DataTableCheckboxEvents = typeof __propDef.events;
|
|
15
|
+
export type DataTableCheckboxSlots = typeof __propDef.slots;
|
|
16
|
+
export default class DataTableCheckbox extends SvelteComponent<DataTableCheckboxProps_, DataTableCheckboxEvents, DataTableCheckboxSlots> {
|
|
17
|
+
}
|
|
@@ -13,7 +13,7 @@ export { className as class };
|
|
|
13
13
|
{transition}
|
|
14
14
|
{transitionConfig}
|
|
15
15
|
class={cn(
|
|
16
|
-
"fixed left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%]
|
|
16
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full",
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
19
19
|
{...$$restProps}
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
<CalendarPrimitive.Cell
|
|
9
9
|
{date}
|
|
10
10
|
class={cn(
|
|
11
|
-
"h-9 w-9 text-center text-sm
|
|
11
|
+
"relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md [&:has([data-selected])]:bg-accent [&:has([data-selected][data-outside-month])]:bg-accent/50",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...$$restProps}
|
|
@@ -16,13 +16,13 @@ export { className as class };
|
|
|
16
16
|
"h-9 w-9 p-0 font-normal ",
|
|
17
17
|
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
|
18
18
|
// Selected
|
|
19
|
-
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground
|
|
19
|
+
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:opacity-100 data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground",
|
|
20
20
|
// Disabled
|
|
21
21
|
"data-[disabled]:text-muted-foreground data-[disabled]:opacity-50",
|
|
22
22
|
// Unavailable
|
|
23
|
-
"data-[unavailable]:
|
|
23
|
+
"data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through",
|
|
24
24
|
// Outside months
|
|
25
|
-
"data-[outside-month]:text-muted-foreground data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30
|
|
25
|
+
"data-[outside-month]:pointer-events-none data-[outside-month]:text-muted-foreground data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
{...$$restProps}
|
|
@@ -5,7 +5,7 @@ export { className as class };
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<CalendarPrimitive.HeadCell
|
|
8
|
-
class={cn("
|
|
8
|
+
class={cn("w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground", className)}
|
|
9
9
|
{...$$restProps}
|
|
10
10
|
>
|
|
11
11
|
<slot />
|
|
@@ -5,7 +5,7 @@ export { className as class };
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<CalendarPrimitive.Header
|
|
8
|
-
class={cn("flex justify-between pt-1
|
|
8
|
+
class={cn("relative flex w-full items-center justify-between pt-1", className)}
|
|
9
9
|
{...$$restProps}
|
|
10
10
|
>
|
|
11
11
|
<slot />
|
|
@@ -3,6 +3,6 @@ let className = void 0;
|
|
|
3
3
|
export { className as class };
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
|
-
<div class={cn("flex flex-col
|
|
6
|
+
<div class={cn("mt-4 flex flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0", className)} {...$$restProps}>
|
|
7
7
|
<slot />
|
|
8
8
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
-
import
|
|
2
|
+
import ChevronRight from "lucide-svelte/icons/chevron-right";
|
|
3
3
|
import { buttonVariants } from "../button";
|
|
4
4
|
import { cn } from "../../../utils";
|
|
5
5
|
let className = void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
-
import
|
|
2
|
+
import ChevronLeft from "lucide-svelte/icons/chevron-left";
|
|
3
3
|
import { buttonVariants } from "../button";
|
|
4
4
|
import { cn } from "../../../utils";
|
|
5
5
|
let className = void 0;
|
|
@@ -37,7 +37,7 @@ export { className as class };
|
|
|
37
37
|
</Calendar.GridHead>
|
|
38
38
|
<Calendar.GridBody>
|
|
39
39
|
{#each month.weeks as weekDates}
|
|
40
|
-
<Calendar.GridRow class="w-full
|
|
40
|
+
<Calendar.GridRow class="mt-2 w-full">
|
|
41
41
|
{#each weekDates as date}
|
|
42
42
|
<Calendar.Cell {date}>
|
|
43
43
|
<Calendar.Day {date} month={month.value} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { Button, buttonVariants } from "../button/index.js";
|
|
2
2
|
import { cn } from "../../../utils";
|
|
3
|
-
import
|
|
3
|
+
import ArrowRight from "lucide-svelte/icons/arrow-right";
|
|
4
4
|
import { getEmblaContext } from "./context.js";
|
|
5
5
|
let className = void 0;
|
|
6
6
|
export { className as class };
|
|
@@ -13,7 +13,7 @@ const { orientation, canScrollNext, scrollNext, handleKeyDown } = getEmblaContex
|
|
|
13
13
|
{variant}
|
|
14
14
|
{size}
|
|
15
15
|
class={cn(
|
|
16
|
-
"absolute h-8 w-8 rounded-full
|
|
16
|
+
"absolute h-8 w-8 touch-manipulation rounded-full",
|
|
17
17
|
$orientation === "horizontal"
|
|
18
18
|
? "-right-12 top-1/2 -translate-y-1/2"
|
|
19
19
|
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { Button, buttonVariants } from "../button/index.js";
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
|
-
import
|
|
3
|
+
import ArrowLeft from "lucide-svelte/icons/arrow-left";
|
|
4
4
|
import { getEmblaContext } from "./context.js";
|
|
5
5
|
let className = void 0;
|
|
6
6
|
export { className as class };
|
|
@@ -13,7 +13,7 @@ const { orientation, canScrollPrev, scrollPrev, handleKeyDown } = getEmblaContex
|
|
|
13
13
|
{variant}
|
|
14
14
|
{size}
|
|
15
15
|
class={cn(
|
|
16
|
-
"absolute h-8 w-8 rounded-full
|
|
16
|
+
"absolute h-8 w-8 touch-manipulation rounded-full",
|
|
17
17
|
$orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
@@ -16,5 +16,5 @@ type CarouselProps_ = typeof __propDef.props;
|
|
|
16
16
|
export { CarouselProps_ as CarouselProps };
|
|
17
17
|
export type CarouselEvents = typeof __propDef.events;
|
|
18
18
|
export type CarouselSlots = typeof __propDef.slots;
|
|
19
|
-
export default class Carousel extends SvelteComponent<
|
|
19
|
+
export default class Carousel extends SvelteComponent<CarouselProps_, CarouselEvents, CarouselSlots> {
|
|
20
20
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>import { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
2
|
-
import
|
|
2
|
+
import Check from "lucide-svelte/icons/check";
|
|
3
|
+
import Minus from "lucide-svelte/icons/minus";
|
|
3
4
|
import { cn } from "../../../utils";
|
|
4
5
|
let className = void 0;
|
|
5
6
|
export let checked = false;
|
|
@@ -8,7 +9,7 @@ export { className as class };
|
|
|
8
9
|
|
|
9
10
|
<CheckboxPrimitive.Root
|
|
10
11
|
class={cn(
|
|
11
|
-
"box-content
|
|
12
|
+
"peer box-content h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[disabled=true]:opacity-50",
|
|
12
13
|
className
|
|
13
14
|
)}
|
|
14
15
|
bind:checked
|
|
@@ -16,7 +17,7 @@ export { className as class };
|
|
|
16
17
|
on:click
|
|
17
18
|
>
|
|
18
19
|
<CheckboxPrimitive.Indicator
|
|
19
|
-
class={cn("flex items-center justify-center text-current
|
|
20
|
+
class={cn("flex h-4 w-4 items-center justify-center text-current")}
|
|
20
21
|
let:isChecked
|
|
21
22
|
let:isIndeterminate
|
|
22
23
|
>
|
|
@@ -4,7 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
preventScroll?: boolean | undefined;
|
|
5
5
|
closeOnEscape?: boolean | undefined;
|
|
6
6
|
closeOnOutsideClick?: boolean | undefined;
|
|
7
|
-
onOutsideClick?: ((event: PointerEvent) => void) | undefined;
|
|
7
|
+
onOutsideClick?: ((event: MouseEvent | TouchEvent | PointerEvent) => void) | undefined;
|
|
8
8
|
portal?: string | HTMLElement | null | undefined;
|
|
9
9
|
open?: boolean | undefined;
|
|
10
10
|
onOpenChange?: import("bits-ui/dist/internal").OnChangeFn<boolean> | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.CommandProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type CommandProps_ = typeof __propDef.props;
|
|
13
|
+
export { CommandProps_ as CommandProps };
|
|
14
|
+
export type CommandEvents = typeof __propDef.events;
|
|
15
|
+
export type CommandSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Command extends SvelteComponent<CommandProps_, CommandEvents, CommandSlots> {
|
|
17
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
2
|
+
import Check from "lucide-svelte/icons/check";
|
|
2
3
|
import { cn } from "../../../utils";
|
|
3
|
-
import { Check } from "lucide-svelte";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let checked = void 0;
|
|
6
6
|
export { className as class };
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
<ContextMenuPrimitive.CheckboxItem
|
|
10
10
|
bind:checked
|
|
11
11
|
class={cn(
|
|
12
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
12
|
+
"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-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
15
15
|
{...$$restProps}
|
|
@@ -7,7 +7,7 @@ export { className as class };
|
|
|
7
7
|
|
|
8
8
|
<ContextMenuPrimitive.Item
|
|
9
9
|
class={cn(
|
|
10
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[
|
|
10
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
11
11
|
inset && "pl-8",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
2
|
+
import Circle from "lucide-svelte/icons/circle";
|
|
2
3
|
import { cn } from "../../../utils";
|
|
3
|
-
import { Circle } from "lucide-svelte";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let value;
|
|
6
6
|
export { className as class };
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
|
|
9
9
|
<ContextMenuPrimitive.RadioItem
|
|
10
10
|
class={cn(
|
|
11
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
11
|
+
"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-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{value}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
2
|
+
import ChevronRight from "lucide-svelte/icons/chevron-right";
|
|
2
3
|
import { cn } from "../../../utils";
|
|
3
|
-
import { ChevronRight } from "lucide-svelte";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let inset = void 0;
|
|
6
6
|
export { className as class };
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
|
|
9
9
|
<ContextMenuPrimitive.SubTrigger
|
|
10
10
|
class={cn(
|
|
11
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[
|
|
11
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground",
|
|
12
12
|
inset && "pl-8",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { Dialog as DialogPrimitive } from "bits-ui";
|
|
2
|
+
import X from "lucide-svelte/icons/x";
|
|
2
3
|
import * as Dialog from ".";
|
|
3
4
|
import { cn, flyAndScale } from "../../../utils";
|
|
4
|
-
import { X } from "lucide-svelte";
|
|
5
5
|
let className = void 0;
|
|
6
6
|
export let transition = flyAndScale;
|
|
7
7
|
export let transitionConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
2
|
+
import Check from "lucide-svelte/icons/check";
|
|
2
3
|
import { cn } from "../../../utils";
|
|
3
|
-
import { Check } from "lucide-svelte";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let checked = void 0;
|
|
6
6
|
export { className as class };
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
<DropdownMenuPrimitive.CheckboxItem
|
|
10
10
|
bind:checked
|
|
11
11
|
class={cn(
|
|
12
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
12
|
+
"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-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
15
15
|
{...$$restProps}
|
|
@@ -7,7 +7,7 @@ export { className as class };
|
|
|
7
7
|
|
|
8
8
|
<DropdownMenuPrimitive.Item
|
|
9
9
|
class={cn(
|
|
10
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[
|
|
10
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
11
11
|
inset && "pl-8",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
2
|
+
import Circle from "lucide-svelte/icons/circle";
|
|
2
3
|
import { cn } from "../../../utils";
|
|
3
|
-
import { Circle } from "lucide-svelte";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let value;
|
|
6
6
|
export { className as class };
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
|
|
9
9
|
<DropdownMenuPrimitive.RadioItem
|
|
10
10
|
class={cn(
|
|
11
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
11
|
+
"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-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{value}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
2
|
+
import ChevronRight from "lucide-svelte/icons/chevron-right";
|
|
2
3
|
import { cn } from "../../../utils";
|
|
3
|
-
import { ChevronRight } from "lucide-svelte";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let inset = void 0;
|
|
6
6
|
export { className as class };
|
|
@@ -2,10 +2,12 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import * as Button from "../button";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: Button.Props;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
5
8
|
slots: {
|
|
6
9
|
default: {};
|
|
7
10
|
};
|
|
8
|
-
events: import("bits-ui/dist/bits/button/types").Events;
|
|
9
11
|
};
|
|
10
12
|
export type FormButtonProps = typeof __propDef.props;
|
|
11
13
|
export type FormButtonEvents = typeof __propDef.events;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<script>import
|
|
1
|
+
<script>import * as FormPrimitive from "formsnap";
|
|
2
2
|
import { cn } from "../../../utils";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export { className as class };
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
|
-
<FormPrimitive.Description class={cn("text-sm text-muted-foreground", className)} {...$$restProps}>
|
|
8
|
-
<slot />
|
|
7
|
+
<FormPrimitive.Description class={cn("text-sm text-muted-foreground", className)} {...$$restProps} let:descriptionAttrs>
|
|
8
|
+
<slot {descriptionAttrs} />
|
|
9
9
|
</FormPrimitive.Description>
|
|
@@ -6,7 +6,13 @@ declare const __propDef: {
|
|
|
6
6
|
[evt: string]: CustomEvent<any>;
|
|
7
7
|
};
|
|
8
8
|
slots: {
|
|
9
|
-
default: {
|
|
9
|
+
default: {
|
|
10
|
+
descriptionAttrs: {
|
|
11
|
+
id: string;
|
|
12
|
+
'data-fs-error': string | undefined;
|
|
13
|
+
'data-fs-description': string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
10
16
|
};
|
|
11
17
|
};
|
|
12
18
|
export type FormDescriptionProps = typeof __propDef.props;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script generics="T extends Record<string, unknown>, U extends FormPathLeaves<T>">import * as FormPrimitive from "formsnap";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
export let form;
|
|
6
|
+
export let name;
|
|
7
|
+
let className = void 0;
|
|
8
|
+
export { className as class };
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<FormPrimitive.ElementField {form} {name} let:constraints let:errors let:tainted let:value>
|
|
12
|
+
<div class={cn("space-y-2", className)}>
|
|
13
|
+
<slot {constraints} {errors} {tainted} {value} />
|
|
14
|
+
</div>
|
|
15
|
+
</FormPrimitive.ElementField>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FormPathLeaves } from "sveltekit-superforms";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import * as FormPrimitive from "formsnap";
|
|
5
|
+
declare class __sveltets_Render<T extends Record<string, unknown>, U extends FormPathLeaves<T>> {
|
|
6
|
+
props(): FormPrimitive.ElementFieldProps<T, U> & HTMLAttributes<HTMLElement>;
|
|
7
|
+
events(): {} & {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots(): {
|
|
11
|
+
default: {
|
|
12
|
+
constraints: Partial<{}> | undefined;
|
|
13
|
+
errors: string[];
|
|
14
|
+
tainted: boolean;
|
|
15
|
+
value: never;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export type FormElementFieldProps<T extends Record<string, unknown>, U extends FormPathLeaves<T>> = ReturnType<__sveltets_Render<T, U>['props']>;
|
|
20
|
+
export type FormElementFieldEvents<T extends Record<string, unknown>, U extends FormPathLeaves<T>> = ReturnType<__sveltets_Render<T, U>['events']>;
|
|
21
|
+
export type FormElementFieldSlots<T extends Record<string, unknown>, U extends FormPathLeaves<T>> = ReturnType<__sveltets_Render<T, U>['slots']>;
|
|
22
|
+
export default class FormElementField<T extends Record<string, unknown>, U extends FormPathLeaves<T>> extends SvelteComponent<FormElementFieldProps<T, U>, FormElementFieldEvents<T, U>, FormElementFieldSlots<T, U>> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import * as FormPrimitive from "formsnap";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
export let errorClasses = void 0;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<FormPrimitive.FieldErrors
|
|
9
|
+
class={cn("text-sm font-medium text-destructive", className)}
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
let:errors
|
|
12
|
+
let:fieldErrorsAttrs
|
|
13
|
+
let:errorAttrs
|
|
14
|
+
>
|
|
15
|
+
<slot {errors} {fieldErrorsAttrs} {errorAttrs}>
|
|
16
|
+
{#each errors as error}
|
|
17
|
+
<div {...errorAttrs} class={cn(errorClasses)}>{error}</div>
|
|
18
|
+
{/each}
|
|
19
|
+
</slot>
|
|
20
|
+
</FormPrimitive.FieldErrors>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
id?: string | undefined;
|
|
5
|
+
asChild?: boolean | undefined;
|
|
6
|
+
el?: HTMLDivElement | undefined;
|
|
7
|
+
} & import("svelte/elements").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
errorClasses?: string | undefined | null;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {
|
|
15
|
+
errors: string[];
|
|
16
|
+
fieldErrorsAttrs: {
|
|
17
|
+
id: string;
|
|
18
|
+
'data-fs-error': string | undefined;
|
|
19
|
+
'data-fs-field-errors': string;
|
|
20
|
+
'aria-live': "assertive";
|
|
21
|
+
};
|
|
22
|
+
errorAttrs: {
|
|
23
|
+
'data-fs-field-error': string;
|
|
24
|
+
'data-fs-error': string | undefined;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type FormFieldErrorsProps = typeof __propDef.props;
|
|
30
|
+
export type FormFieldErrorsEvents = typeof __propDef.events;
|
|
31
|
+
export type FormFieldErrorsSlots = typeof __propDef.slots;
|
|
32
|
+
export default class FormFieldErrors extends SvelteComponent<FormFieldErrorsProps, FormFieldErrorsEvents, FormFieldErrorsSlots> {
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script generics="T extends Record<string, unknown>, U extends FormPath<T>">import * as FormPrimitive from "formsnap";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
export let form;
|
|
6
|
+
export let name;
|
|
7
|
+
let className = void 0;
|
|
8
|
+
export { className as class };
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<FormPrimitive.Field {form} {name} let:constraints let:errors let:tainted let:value>
|
|
12
|
+
<div class={cn("space-y-2", className)}>
|
|
13
|
+
<slot {constraints} {errors} {tainted} {value} />
|
|
14
|
+
</div>
|
|
15
|
+
</FormPrimitive.Field>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FormPath } from "sveltekit-superforms";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import * as FormPrimitive from "formsnap";
|
|
5
|
+
declare class __sveltets_Render<T extends Record<string, unknown>, U extends FormPath<T>> {
|
|
6
|
+
props(): FormPrimitive.FieldProps<T, U> & HTMLAttributes<HTMLElement>;
|
|
7
|
+
events(): {} & {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots(): {
|
|
11
|
+
default: {
|
|
12
|
+
constraints: Partial<{}> | undefined;
|
|
13
|
+
errors: string[];
|
|
14
|
+
tainted: boolean;
|
|
15
|
+
value: unknown;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export type FormFieldProps<T extends Record<string, unknown>, U extends FormPath<T>> = ReturnType<__sveltets_Render<T, U>['props']>;
|
|
20
|
+
export type FormFieldEvents<T extends Record<string, unknown>, U extends FormPath<T>> = ReturnType<__sveltets_Render<T, U>['events']>;
|
|
21
|
+
export type FormFieldSlots<T extends Record<string, unknown>, U extends FormPath<T>> = ReturnType<__sveltets_Render<T, U>['slots']>;
|
|
22
|
+
export default class FormField<T extends Record<string, unknown>, U extends FormPath<T>> extends SvelteComponent<FormFieldProps<T, U>, FormFieldEvents<T, U>, FormFieldSlots<T, U>> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script generics="T extends Record<string, unknown>, U extends FormPath<T>">import * as FormPrimitive from "formsnap";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
export let form;
|
|
6
|
+
export let name;
|
|
7
|
+
let className = void 0;
|
|
8
|
+
export { className as class };
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<FormPrimitive.Fieldset
|
|
12
|
+
{form}
|
|
13
|
+
{name}
|
|
14
|
+
let:constraints
|
|
15
|
+
let:errors
|
|
16
|
+
let:tainted
|
|
17
|
+
let:value
|
|
18
|
+
class={cn("space-y-2", className)}
|
|
19
|
+
>
|
|
20
|
+
<slot {constraints} {errors} {tainted} {value} />
|
|
21
|
+
</FormPrimitive.Fieldset>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FormPath } from "sveltekit-superforms";
|
|
3
|
+
import * as FormPrimitive from "formsnap";
|
|
4
|
+
declare class __sveltets_Render<T extends Record<string, unknown>, U extends FormPath<T>> {
|
|
5
|
+
props(): FormPrimitive.FieldsetProps<T, U>;
|
|
6
|
+
events(): {} & {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots(): {
|
|
10
|
+
default: {
|
|
11
|
+
constraints: Partial<{}> | undefined;
|
|
12
|
+
errors: string[];
|
|
13
|
+
tainted: boolean;
|
|
14
|
+
value: unknown;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export type FormFieldsetProps<T extends Record<string, unknown>, U extends FormPath<T>> = ReturnType<__sveltets_Render<T, U>['props']>;
|
|
19
|
+
export type FormFieldsetEvents<T extends Record<string, unknown>, U extends FormPath<T>> = ReturnType<__sveltets_Render<T, U>['events']>;
|
|
20
|
+
export type FormFieldsetSlots<T extends Record<string, unknown>, U extends FormPath<T>> = ReturnType<__sveltets_Render<T, U>['slots']>;
|
|
21
|
+
export default class FormFieldset<T extends Record<string, unknown>, U extends FormPath<T>> extends SvelteComponent<FormFieldsetProps<T, U>, FormFieldsetEvents<T, U>, FormFieldsetSlots<T, U>> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { getFormControl } from "formsnap";
|
|
2
2
|
import { cn } from "../../../utils";
|
|
3
3
|
import { Label } from "../label";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export { className as class };
|
|
6
|
-
const {
|
|
6
|
+
const { labelAttrs } = getFormControl();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<Label
|
|
10
|
-
<slot />
|
|
9
|
+
<Label {...$labelAttrs} class={cn("data-[fs-error]:text-destructive", className)} {...$$restProps}>
|
|
10
|
+
<slot {labelAttrs} />
|
|
11
11
|
</Label>
|