@kayord/ui 0.0.18 → 0.0.20
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/theme-switch/ThemeSwitch.svelte +4 -1
- package/dist/components/custom/theme-switch/ThemeSwitch.svelte.d.ts +3 -1
- package/dist/components/ui/button/button.svelte +1 -0
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/button/index.js +6 -6
- package/dist/components/ui/checkbox/checkbox.svelte +3 -3
- package/dist/components/ui/command/command-dialog.svelte +17 -0
- package/dist/components/ui/command/command-empty.svelte +12 -0
- package/dist/components/ui/command/command-empty.svelte.d.ts +17 -0
- package/dist/components/ui/command/command-group.svelte +15 -0
- package/dist/components/ui/command/command-group.svelte.d.ts +17 -0
- package/dist/components/ui/command/command-input.svelte +17 -0
- package/dist/components/ui/command/command-input.svelte.d.ts +15 -0
- package/dist/components/ui/command/command-item.svelte +15 -0
- package/dist/components/ui/command/command-item.svelte.d.ts +17 -0
- package/dist/components/ui/command/command-list.svelte +12 -0
- package/dist/components/ui/command/command-list.svelte.d.ts +17 -0
- package/dist/components/ui/command/command-separator.svelte +10 -0
- package/dist/components/ui/command/command-separator.svelte.d.ts +15 -0
- package/dist/components/ui/command/command-shortcut.svelte +14 -0
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +17 -0
- package/dist/components/ui/command/command.svelte +17 -0
- package/dist/components/ui/command/index.d.ts +12 -0
- package/dist/components/ui/command/index.js +14 -0
- package/dist/components/ui/form/form-label.svelte +1 -1
- package/dist/components/ui/form/form-select.svelte +1 -1
- package/dist/components/ui/form/index.d.ts +2 -1
- package/dist/components/ui/form/index.js +3 -2
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/select/select-item.svelte +3 -3
- package/package.json +17 -16
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<script>import { toggleMode, mode } from "mode-watcher";
|
|
2
2
|
import { Moon, Sun } from "lucide-svelte";
|
|
3
|
+
import { cn } from "../../..";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
3
6
|
</script>
|
|
4
7
|
|
|
5
|
-
<button on:click={toggleMode} class="text-primary">
|
|
8
|
+
<button on:click={toggleMode} class={cn("text-primary", className)}>
|
|
6
9
|
{#if $mode == "dark"}
|
|
7
10
|
<Moon />
|
|
8
11
|
{:else}
|
|
@@ -114,4 +114,4 @@ type Props = ButtonPrimitive.Props & {
|
|
|
114
114
|
size?: Size;
|
|
115
115
|
};
|
|
116
116
|
type Events = ButtonPrimitive.Events;
|
|
117
|
-
export { Root, type Props, type Events, Root as Button, type Props as ButtonProps, type Events as ButtonEvents, buttonVariants
|
|
117
|
+
export { Root, type Props, type Events, Root as Button, type Props as ButtonProps, type Events as ButtonEvents, buttonVariants };
|
|
@@ -9,20 +9,20 @@ const buttonVariants = tv({
|
|
|
9
9
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
10
10
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
11
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
12
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
12
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
15
15
|
default: "h-10 px-4 py-2",
|
|
16
16
|
sm: "h-9 rounded-md px-3",
|
|
17
17
|
lg: "h-11 rounded-md px-8",
|
|
18
|
-
icon: "h-10 w-10"
|
|
19
|
-
}
|
|
18
|
+
icon: "h-10 w-10"
|
|
19
|
+
}
|
|
20
20
|
},
|
|
21
21
|
defaultVariants: {
|
|
22
22
|
variant: "default",
|
|
23
|
-
size: "default"
|
|
24
|
-
}
|
|
23
|
+
size: "default"
|
|
24
|
+
}
|
|
25
25
|
});
|
|
26
26
|
export { Root,
|
|
27
27
|
//
|
|
28
|
-
Root as Button, buttonVariants
|
|
28
|
+
Root as Button, buttonVariants };
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
|
|
9
9
|
<CheckboxPrimitive.Root
|
|
10
10
|
class={cn(
|
|
11
|
-
"peer 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-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
|
|
11
|
+
"box-content peer 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-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
bind:checked
|
|
@@ -21,9 +21,9 @@ export { className as class };
|
|
|
21
21
|
let:isIndeterminate
|
|
22
22
|
>
|
|
23
23
|
{#if isChecked}
|
|
24
|
-
<Check class="h-
|
|
24
|
+
<Check class="h-3.5 w-3.5" />
|
|
25
25
|
{:else if isIndeterminate}
|
|
26
|
-
<Minus class="h-
|
|
26
|
+
<Minus class="h-3.5 w-3.5" />
|
|
27
27
|
{/if}
|
|
28
28
|
</CheckboxPrimitive.Indicator>
|
|
29
29
|
</CheckboxPrimitive.Root>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import Command from "./command.svelte";
|
|
2
|
+
import * as Dialog from "../dialog";
|
|
3
|
+
export let open = false;
|
|
4
|
+
export let value = void 0;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<Dialog.Root bind:open {...$$restProps}>
|
|
8
|
+
<Dialog.Content class="overflow-hidden p-0 shadow-lg">
|
|
9
|
+
<Command
|
|
10
|
+
class="[&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group-heading]]:text-muted-foreground [&_[data-cmdk-group]:not([hidden])_~[data-cmdk-group]]:pt-0 [&_[data-cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[data-cmdk-input]]:h-12 [&_[data-cmdk-item]]:px-2 [&_[data-cmdk-item]]:py-3 [&_[data-cmdk-item]_svg]:h-5 [&_[data-cmdk-item]_svg]:w-5"
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
bind:value
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</Command>
|
|
16
|
+
</Dialog.Content>
|
|
17
|
+
</Dialog.Root>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CommandPrimitive.Empty
|
|
8
|
+
class={cn("py-6 text-center text-sm", className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</CommandPrimitive.Empty>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.EmptyProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CommandEmptyProps = typeof __propDef.props;
|
|
13
|
+
export type CommandEmptyEvents = typeof __propDef.events;
|
|
14
|
+
export type CommandEmptySlots = typeof __propDef.slots;
|
|
15
|
+
export default class CommandEmpty extends SvelteComponent<CommandEmptyProps, CommandEmptyEvents, CommandEmptySlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CommandPrimitive.Group
|
|
8
|
+
class={cn(
|
|
9
|
+
"overflow-hidden p-1 text-foreground [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:py-1.5 [&_[data-cmdk-group-heading]]:text-xs [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group-heading]]:text-muted-foreground",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CommandPrimitive.Group>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.GroupProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CommandGroupProps = typeof __propDef.props;
|
|
13
|
+
export type CommandGroupEvents = typeof __propDef.events;
|
|
14
|
+
export type CommandGroupSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CommandGroup extends SvelteComponent<CommandGroupProps, CommandGroupEvents, CommandGroupSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { Search } from "lucide-svelte";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class="flex items-center border-b px-2" data-cmdk-input-wrapper="">
|
|
9
|
+
<Search class="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
|
10
|
+
<CommandPrimitive.Input
|
|
11
|
+
class={cn(
|
|
12
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
{...$$restProps}
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.InputProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {};
|
|
9
|
+
};
|
|
10
|
+
export type CommandInputProps = typeof __propDef.props;
|
|
11
|
+
export type CommandInputEvents = typeof __propDef.events;
|
|
12
|
+
export type CommandInputSlots = typeof __propDef.slots;
|
|
13
|
+
export default class CommandInput extends SvelteComponent<CommandInputProps, CommandInputEvents, CommandInputSlots> {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CommandPrimitive.Item
|
|
8
|
+
class={cn(
|
|
9
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CommandPrimitive.Item>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.ItemProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CommandItemProps = typeof __propDef.props;
|
|
13
|
+
export type CommandItemEvents = typeof __propDef.events;
|
|
14
|
+
export type CommandItemSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CommandItem extends SvelteComponent<CommandItemProps, CommandItemEvents, CommandItemSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CommandPrimitive.List
|
|
8
|
+
class={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</CommandPrimitive.List>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.ListProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CommandListProps = typeof __propDef.props;
|
|
13
|
+
export type CommandListEvents = typeof __propDef.events;
|
|
14
|
+
export type CommandListSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CommandList extends SvelteComponent<CommandListProps, CommandListEvents, CommandListSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CommandPrimitive.Separator
|
|
8
|
+
class={cn("-mx-1 h-px bg-border", className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CommandPrimitive.SeparatorProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {};
|
|
9
|
+
};
|
|
10
|
+
export type CommandSeparatorProps = typeof __propDef.props;
|
|
11
|
+
export type CommandSeparatorEvents = typeof __propDef.events;
|
|
12
|
+
export type CommandSeparatorSlots = typeof __propDef.slots;
|
|
13
|
+
export default class CommandSeparator extends SvelteComponent<CommandSeparatorProps, CommandSeparatorEvents, CommandSeparatorSlots> {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>import { cn } from "../../../utils";
|
|
2
|
+
let className = void 0;
|
|
3
|
+
export { className as class };
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<span
|
|
7
|
+
class={cn(
|
|
8
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
9
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</span>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: HTMLAttributes<HTMLSpanElement>;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CommandShortcutProps = typeof __propDef.props;
|
|
13
|
+
export type CommandShortcutEvents = typeof __propDef.events;
|
|
14
|
+
export type CommandShortcutSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CommandShortcut extends SvelteComponent<CommandShortcutProps, CommandShortcutEvents, CommandShortcutSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
export let value = void 0;
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<CommandPrimitive.Root
|
|
9
|
+
class={cn(
|
|
10
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
bind:value
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</CommandPrimitive.Root>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import Root from "./command.svelte";
|
|
3
|
+
import Dialog from "./command-dialog.svelte";
|
|
4
|
+
import Empty from "./command-empty.svelte";
|
|
5
|
+
import Group from "./command-group.svelte";
|
|
6
|
+
import Item from "./command-item.svelte";
|
|
7
|
+
import Input from "./command-input.svelte";
|
|
8
|
+
import List from "./command-list.svelte";
|
|
9
|
+
import Separator from "./command-separator.svelte";
|
|
10
|
+
import Shortcut from "./command-shortcut.svelte";
|
|
11
|
+
declare const Loading: typeof CommandPrimitive.Loading;
|
|
12
|
+
export { Root, Dialog, Empty, Group, Item, Input, List, Separator, Shortcut, Loading, Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Item as CommandItem, Input as CommandInput, List as CommandList, Separator as CommandSeparator, Shortcut as CommandShortcut, Loading as CommandLoading };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
|
+
import Root from "./command.svelte";
|
|
3
|
+
import Dialog from "./command-dialog.svelte";
|
|
4
|
+
import Empty from "./command-empty.svelte";
|
|
5
|
+
import Group from "./command-group.svelte";
|
|
6
|
+
import Item from "./command-item.svelte";
|
|
7
|
+
import Input from "./command-input.svelte";
|
|
8
|
+
import List from "./command-list.svelte";
|
|
9
|
+
import Separator from "./command-separator.svelte";
|
|
10
|
+
import Shortcut from "./command-shortcut.svelte";
|
|
11
|
+
const Loading = CommandPrimitive.Loading;
|
|
12
|
+
export { Root, Dialog, Empty, Group, Item, Input, List, Separator, Shortcut, Loading,
|
|
13
|
+
//
|
|
14
|
+
Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Item as CommandItem, Input as CommandInput, List as CommandList, Separator as CommandSeparator, Shortcut as CommandShortcut, Loading as CommandLoading };
|
|
@@ -18,6 +18,7 @@ import SelectTrigger from "./form-select-trigger.svelte";
|
|
|
18
18
|
import Button from "./form-button.svelte";
|
|
19
19
|
declare const Root: typeof FormPrimitive.Root;
|
|
20
20
|
declare const Field: typeof FormPrimitive.Field;
|
|
21
|
+
declare const Control: typeof FormPrimitive.Control;
|
|
21
22
|
declare const RadioItem: typeof RadioGroupComp.Item;
|
|
22
23
|
declare const NativeRadio: typeof FormPrimitive.Radio;
|
|
23
24
|
declare const SelectContent: typeof SelectComp.Content;
|
|
@@ -28,4 +29,4 @@ declare const SelectSeparator: typeof SelectComp.Separator;
|
|
|
28
29
|
export type TextareaGetFormField = Omit<ReturnType<typeof getFormField>, "value"> & {
|
|
29
30
|
value: Writable<string>;
|
|
30
31
|
};
|
|
31
|
-
export { Root, Field, Item, Input, Label, Button, Switch, Select, Checkbox, Textarea, Validation, RadioGroup, RadioItem, Description, SelectContent, SelectLabel, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, NativeSelect, NativeRadio, Root as Form, Field as FormField, Item as FormItem, Input as FormInput, Textarea as FormTextarea, Description as FormDescription, Label as FormLabel, Validation as FormValidation, NativeSelect as FormNativeSelect, NativeRadio as FormNativeRadio, Checkbox as FormCheckbox, Switch as FormSwitch, RadioGroup as FormRadioGroup, RadioItem as FormRadioItem, Select as FormSelect, SelectContent as FormSelectContent, SelectLabel as FormSelectLabel, SelectGroup as FormSelectGroup, SelectItem as FormSelectItem, SelectSeparator as FormSelectSeparator, SelectTrigger as FormSelectTrigger, Button as FormButton };
|
|
32
|
+
export { Root, Field, Control, Item, Input, Label, Button, Switch, Select, Checkbox, Textarea, Validation, RadioGroup, RadioItem, Description, SelectContent, SelectLabel, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, NativeSelect, NativeRadio, Root as Form, Field as FormField, Control as FormControl, Item as FormItem, Input as FormInput, Textarea as FormTextarea, Description as FormDescription, Label as FormLabel, Validation as FormValidation, NativeSelect as FormNativeSelect, NativeRadio as FormNativeRadio, Checkbox as FormCheckbox, Switch as FormSwitch, RadioGroup as FormRadioGroup, RadioItem as FormRadioItem, Select as FormSelect, SelectContent as FormSelectContent, SelectLabel as FormSelectLabel, SelectGroup as FormSelectGroup, SelectItem as FormSelectItem, SelectSeparator as FormSelectSeparator, SelectTrigger as FormSelectTrigger, Button as FormButton };
|
|
@@ -16,6 +16,7 @@ import SelectTrigger from "./form-select-trigger.svelte";
|
|
|
16
16
|
import Button from "./form-button.svelte";
|
|
17
17
|
const Root = FormPrimitive.Root;
|
|
18
18
|
const Field = FormPrimitive.Field;
|
|
19
|
+
const Control = FormPrimitive.Control;
|
|
19
20
|
const RadioItem = RadioGroupComp.Item;
|
|
20
21
|
const NativeRadio = FormPrimitive.Radio;
|
|
21
22
|
const SelectContent = SelectComp.Content;
|
|
@@ -23,6 +24,6 @@ const SelectLabel = SelectComp.Label;
|
|
|
23
24
|
const SelectGroup = SelectComp.Group;
|
|
24
25
|
const SelectItem = SelectComp.Item;
|
|
25
26
|
const SelectSeparator = SelectComp.Separator;
|
|
26
|
-
export { Root, Field, Item, Input, Label, Button, Switch, Select, Checkbox, Textarea, Validation, RadioGroup, RadioItem, Description, SelectContent, SelectLabel, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, NativeSelect, NativeRadio,
|
|
27
|
+
export { Root, Field, Control, Item, Input, Label, Button, Switch, Select, Checkbox, Textarea, Validation, RadioGroup, RadioItem, Description, SelectContent, SelectLabel, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, NativeSelect, NativeRadio,
|
|
27
28
|
//
|
|
28
|
-
Root as Form, Field as FormField, Item as FormItem, Input as FormInput, Textarea as FormTextarea, Description as FormDescription, Label as FormLabel, Validation as FormValidation, NativeSelect as FormNativeSelect, NativeRadio as FormNativeRadio, Checkbox as FormCheckbox, Switch as FormSwitch, RadioGroup as FormRadioGroup, RadioItem as FormRadioItem, Select as FormSelect, SelectContent as FormSelectContent, SelectLabel as FormSelectLabel, SelectGroup as FormSelectGroup, SelectItem as FormSelectItem, SelectSeparator as FormSelectSeparator, SelectTrigger as FormSelectTrigger, Button as FormButton };
|
|
29
|
+
Root as Form, Field as FormField, Control as FormControl, Item as FormItem, Input as FormInput, Textarea as FormTextarea, Description as FormDescription, Label as FormLabel, Validation as FormValidation, NativeSelect as FormNativeSelect, NativeRadio as FormNativeRadio, Checkbox as FormCheckbox, Switch as FormSwitch, RadioGroup as FormRadioGroup, RadioItem as FormRadioItem, Select as FormSelect, SelectContent as FormSelectContent, SelectLabel as FormSelectLabel, SelectGroup as FormSelectGroup, SelectItem as FormSelectItem, SelectSeparator as FormSelectSeparator, SelectTrigger as FormSelectTrigger, Button as FormButton };
|
|
@@ -6,7 +6,7 @@ export { className as class };
|
|
|
6
6
|
|
|
7
7
|
<input
|
|
8
8
|
class={cn(
|
|
9
|
-
"flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0
|
|
9
|
+
"flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-foreground file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
bind:value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { cn } from "../../../utils";
|
|
2
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
3
|
import { Check } from "lucide-svelte";
|
|
3
|
-
import { cn } from "../../../utils";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let value;
|
|
6
6
|
export let label = void 0;
|
|
@@ -13,7 +13,7 @@ export { className as class };
|
|
|
13
13
|
{disabled}
|
|
14
14
|
{label}
|
|
15
15
|
class={cn(
|
|
16
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none
|
|
16
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
19
19
|
{...$$restProps}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -21,34 +21,35 @@
|
|
|
21
21
|
"svelte": "^4.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"bits-ui": "^0.9.
|
|
24
|
+
"bits-ui": "^0.9.7",
|
|
25
25
|
"clsx": "^2.0.0",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
26
|
+
"cmdk-sv": "^0.0.6",
|
|
27
|
+
"formsnap": "^0.4.1",
|
|
28
|
+
"lucide-svelte": "^0.292.0",
|
|
29
|
+
"mode-watcher": "^0.0.7",
|
|
30
|
+
"sveltekit-superforms": "^1.10.2",
|
|
30
31
|
"tailwind-merge": "^2.0.0",
|
|
31
32
|
"tailwind-variants": "^0.1.18",
|
|
32
33
|
"zod": "^3.22.4"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@playwright/test": "^1.39.0",
|
|
36
|
-
"@sveltejs/adapter-auto": "^2.1.
|
|
37
|
-
"@sveltejs/kit": "^1.27.
|
|
37
|
+
"@sveltejs/adapter-auto": "^2.1.1",
|
|
38
|
+
"@sveltejs/kit": "^1.27.6",
|
|
38
39
|
"@sveltejs/package": "^2.2.2",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
40
|
-
"@typescript-eslint/parser": "^6.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
|
41
|
+
"@typescript-eslint/parser": "^6.11.0",
|
|
41
42
|
"autoprefixer": "^10.4.16",
|
|
42
|
-
"eslint": "^8.
|
|
43
|
+
"eslint": "^8.53.0",
|
|
43
44
|
"eslint-config-prettier": "^9.0.0",
|
|
44
|
-
"eslint-plugin-svelte": "^2.
|
|
45
|
+
"eslint-plugin-svelte": "^2.35.0",
|
|
45
46
|
"postcss": "^8.4.31",
|
|
46
47
|
"postcss-load-config": "^4.0.1",
|
|
47
|
-
"prettier": "^3.0
|
|
48
|
-
"prettier-plugin-svelte": "^3.0
|
|
48
|
+
"prettier": "^3.1.0",
|
|
49
|
+
"prettier-plugin-svelte": "^3.1.0",
|
|
49
50
|
"publint": "^0.2.5",
|
|
50
|
-
"svelte": "^4.2.
|
|
51
|
-
"svelte-check": "^3.
|
|
51
|
+
"svelte": "^4.2.3",
|
|
52
|
+
"svelte-check": "^3.6.0",
|
|
52
53
|
"tailwindcss": "^3.3.5",
|
|
53
54
|
"tslib": "^2.6.2",
|
|
54
55
|
"typescript": "^5.2.2",
|