@stubber/ui 1.0.26 → 1.1.0

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 (25) hide show
  1. package/dist/components/collapsible/collapsible-content.svelte +11 -0
  2. package/dist/components/collapsible/collapsible-content.svelte.d.ts +19 -0
  3. package/dist/components/collapsible/index.d.ts +5 -0
  4. package/dist/components/collapsible/index.js +7 -0
  5. package/dist/components/command/command-dialog.svelte +17 -0
  6. package/dist/components/command/command-dialog.svelte.d.ts +40 -0
  7. package/dist/components/command/command-empty.svelte +9 -0
  8. package/dist/components/command/command-empty.svelte.d.ts +19 -0
  9. package/dist/components/command/command-group.svelte +15 -0
  10. package/dist/components/command/command-group.svelte.d.ts +19 -0
  11. package/dist/components/command/command-input.svelte +19 -0
  12. package/dist/components/command/command-input.svelte.d.ts +17 -0
  13. package/dist/components/command/command-item.svelte +19 -0
  14. package/dist/components/command/command-item.svelte.d.ts +33 -0
  15. package/dist/components/command/command-list.svelte +12 -0
  16. package/dist/components/command/command-list.svelte.d.ts +19 -0
  17. package/dist/components/command/command-separator.svelte +7 -0
  18. package/dist/components/command/command-separator.svelte.d.ts +17 -0
  19. package/dist/components/command/command-shortcut.svelte +11 -0
  20. package/dist/components/command/command-shortcut.svelte.d.ts +19 -0
  21. package/dist/components/command/command.svelte +17 -0
  22. package/dist/components/command/command.svelte.d.ts +19 -0
  23. package/dist/components/command/index.d.ts +12 -0
  24. package/dist/components/command/index.js +14 -0
  25. package/package.json +2 -1
@@ -0,0 +1,11 @@
1
+ <script>import { Collapsible as CollapsiblePrimitive } from "bits-ui";
2
+ import { slide } from "svelte/transition";
3
+ export let transition = slide;
4
+ export let transitionConfig = {
5
+ duration: 150
6
+ };
7
+ </script>
8
+
9
+ <CollapsiblePrimitive.Content {transition} {transitionConfig} {...$$restProps}>
10
+ <slot />
11
+ </CollapsiblePrimitive.Content>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { Collapsible as CollapsiblePrimitive } from "bits-ui";
3
+ declare const __propDef: {
4
+ props: CollapsiblePrimitive.ContentProps;
5
+ events: {
6
+ [evt: string]: CustomEvent<any>;
7
+ };
8
+ slots: {
9
+ default: {};
10
+ };
11
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type CollapsibleContentProps = typeof __propDef.props;
15
+ export type CollapsibleContentEvents = typeof __propDef.events;
16
+ export type CollapsibleContentSlots = typeof __propDef.slots;
17
+ export default class CollapsibleContent extends SvelteComponent<CollapsibleContentProps, CollapsibleContentEvents, CollapsibleContentSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Collapsible as CollapsiblePrimitive } from "bits-ui";
2
+ import Content from "./collapsible-content.svelte";
3
+ declare const Root: typeof CollapsiblePrimitive.Root;
4
+ declare const Trigger: typeof CollapsiblePrimitive.Trigger;
5
+ export { Root, Content, Trigger, Root as Collapsible, Content as CollapsibleContent, Trigger as CollapsibleTrigger, };
@@ -0,0 +1,7 @@
1
+ import { Collapsible as CollapsiblePrimitive } from "bits-ui";
2
+ import Content from "./collapsible-content.svelte";
3
+ const Root = CollapsiblePrimitive.Root;
4
+ const Trigger = CollapsiblePrimitive.Trigger;
5
+ export { Root, Content, Trigger,
6
+ //
7
+ Root as Collapsible, Content as CollapsibleContent, Trigger as CollapsibleTrigger, };
@@ -0,0 +1,17 @@
1
+ <script>import Command from "./command.svelte";
2
+ import * as Dialog from "../dialog/index.js";
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]]:text-muted-foreground [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[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,40 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ preventScroll?: boolean | undefined;
5
+ closeOnEscape?: boolean | undefined;
6
+ closeOnOutsideClick?: boolean | undefined;
7
+ onOutsideClick?: ((event: PointerEvent | MouseEvent | TouchEvent) => void) | undefined;
8
+ portal?: (HTMLElement | string | null) | undefined;
9
+ open?: boolean | undefined;
10
+ onOpenChange?: import("bits-ui/dist/internal").OnChangeFn<boolean> | undefined;
11
+ openFocus?: import("bits-ui").FocusProp | undefined;
12
+ closeFocus?: import("bits-ui").FocusProp | undefined;
13
+ } & {
14
+ state?: import("svelte/store").Writable<import("cmdk-sv").State> | undefined;
15
+ label?: string | undefined;
16
+ shouldFilter?: boolean | undefined;
17
+ filter?: ((value: string, search: string) => number) | undefined;
18
+ value?: string | undefined;
19
+ onValueChange?: ((value: string) => void) | undefined;
20
+ loop?: boolean | undefined;
21
+ ids?: Partial<import("cmdk-sv").CommandIds> | undefined;
22
+ } & import("cmdk-sv/dist/internal").HTMLDivAttributes & {
23
+ onKeydown?: (e: KeyboardEvent) => void;
24
+ asChild?: boolean;
25
+ };
26
+ events: {
27
+ [evt: string]: CustomEvent<any>;
28
+ };
29
+ slots: {
30
+ default: {};
31
+ };
32
+ exports?: {} | undefined;
33
+ bindings?: string | undefined;
34
+ };
35
+ export type CommandDialogProps = typeof __propDef.props;
36
+ export type CommandDialogEvents = typeof __propDef.events;
37
+ export type CommandDialogSlots = typeof __propDef.slots;
38
+ export default class CommandDialog extends SvelteComponent<CommandDialogProps, CommandDialogEvents, CommandDialogSlots> {
39
+ }
40
+ export {};
@@ -0,0 +1,9 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
3
+ let className = void 0;
4
+ export { className as class };
5
+ </script>
6
+
7
+ <CommandPrimitive.Empty class={cn("py-6 text-center text-sm", className)} {...$$restProps}>
8
+ <slot />
9
+ </CommandPrimitive.Empty>
@@ -0,0 +1,19 @@
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
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type CommandEmptyProps = typeof __propDef.props;
15
+ export type CommandEmptyEvents = typeof __propDef.events;
16
+ export type CommandEmptySlots = typeof __propDef.slots;
17
+ export default class CommandEmpty extends SvelteComponent<CommandEmptyProps, CommandEmptyEvents, CommandEmptySlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,15 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
3
+ let className = void 0;
4
+ export { className as class };
5
+ </script>
6
+
7
+ <CommandPrimitive.Group
8
+ class={cn(
9
+ "text-foreground [&_[data-cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[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",
10
+ className,
11
+ )}
12
+ {...$$restProps}
13
+ >
14
+ <slot />
15
+ </CommandPrimitive.Group>
@@ -0,0 +1,19 @@
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
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type CommandGroupProps = typeof __propDef.props;
15
+ export type CommandGroupEvents = typeof __propDef.events;
16
+ export type CommandGroupSlots = typeof __propDef.slots;
17
+ export default class CommandGroup extends SvelteComponent<CommandGroupProps, CommandGroupEvents, CommandGroupSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,19 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
3
+ let className = void 0;
4
+ export { className as class };
5
+ export let value = "";
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
+ <i class="fas fa-search mr-2 h-4 w-4 shrink-0 opacity-50"></i>
11
+ <CommandPrimitive.Input
12
+ class={cn(
13
+ "placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",
14
+ className,
15
+ )}
16
+ {...$$restProps}
17
+ bind:value
18
+ />
19
+ </div>
@@ -0,0 +1,17 @@
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
+ exports?: {} | undefined;
10
+ bindings?: string | undefined;
11
+ };
12
+ export type CommandInputProps = typeof __propDef.props;
13
+ export type CommandInputEvents = typeof __propDef.events;
14
+ export type CommandInputSlots = typeof __propDef.slots;
15
+ export default class CommandInput extends SvelteComponent<CommandInputProps, CommandInputEvents, CommandInputSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,19 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
3
+ export let asChild = false;
4
+ let className = void 0;
5
+ export { className as class };
6
+ </script>
7
+
8
+ <CommandPrimitive.Item
9
+ {asChild}
10
+ class={cn(
11
+ "aria-selected:bg-accent aria-selected:text-accent-foreground 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-[disabled]:opacity-50",
12
+ className,
13
+ )}
14
+ {...$$restProps}
15
+ let:action
16
+ let:attrs
17
+ >
18
+ <slot {action} {attrs} />
19
+ </CommandPrimitive.Item>
@@ -0,0 +1,33 @@
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
+ action: (node: HTMLElement) => {
11
+ destroy(): void;
12
+ };
13
+ attrs: {
14
+ 'aria-disabled': boolean | undefined;
15
+ 'aria-selected': boolean | undefined;
16
+ 'data-disabled': boolean | undefined;
17
+ 'data-selected': boolean | undefined;
18
+ 'data-cmdk-item': string;
19
+ 'data-value': string;
20
+ role: string;
21
+ id: string;
22
+ };
23
+ };
24
+ };
25
+ exports?: {} | undefined;
26
+ bindings?: string | undefined;
27
+ };
28
+ export type CommandItemProps = typeof __propDef.props;
29
+ export type CommandItemEvents = typeof __propDef.events;
30
+ export type CommandItemSlots = typeof __propDef.slots;
31
+ export default class CommandItem extends SvelteComponent<CommandItemProps, CommandItemEvents, CommandItemSlots> {
32
+ }
33
+ export {};
@@ -0,0 +1,12 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
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,19 @@
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
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type CommandListProps = typeof __propDef.props;
15
+ export type CommandListEvents = typeof __propDef.events;
16
+ export type CommandListSlots = typeof __propDef.slots;
17
+ export default class CommandList extends SvelteComponent<CommandListProps, CommandListEvents, CommandListSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,7 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
3
+ let className = void 0;
4
+ export { className as class };
5
+ </script>
6
+
7
+ <CommandPrimitive.Separator class={cn("bg-border -mx-1 h-px", className)} {...$$restProps} />
@@ -0,0 +1,17 @@
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
+ exports?: {} | undefined;
10
+ bindings?: string | undefined;
11
+ };
12
+ export type CommandSeparatorProps = typeof __propDef.props;
13
+ export type CommandSeparatorEvents = typeof __propDef.events;
14
+ export type CommandSeparatorSlots = typeof __propDef.slots;
15
+ export default class CommandSeparator extends SvelteComponent<CommandSeparatorProps, CommandSeparatorEvents, CommandSeparatorSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,11 @@
1
+ <script>import { cn } from "../../utils/shadcn-utils.js";
2
+ let className = void 0;
3
+ export { className as class };
4
+ </script>
5
+
6
+ <span
7
+ class={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)}
8
+ {...$$restProps}
9
+ >
10
+ <slot />
11
+ </span>
@@ -0,0 +1,19 @@
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
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type CommandShortcutProps = typeof __propDef.props;
15
+ export type CommandShortcutEvents = typeof __propDef.events;
16
+ export type CommandShortcutSlots = typeof __propDef.slots;
17
+ export default class CommandShortcut extends SvelteComponent<CommandShortcutProps, CommandShortcutEvents, CommandShortcutSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,17 @@
1
+ <script>import { Command as CommandPrimitive } from "cmdk-sv";
2
+ import { cn } from "../../utils/shadcn-utils.js";
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
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
11
+ className,
12
+ )}
13
+ bind:value
14
+ {...$$restProps}
15
+ >
16
+ <slot />
17
+ </CommandPrimitive.Root>
@@ -0,0 +1,19 @@
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
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ type CommandProps_ = typeof __propDef.props;
15
+ export { CommandProps_ as CommandProps };
16
+ export type CommandEvents = typeof __propDef.events;
17
+ export type CommandSlots = typeof __propDef.slots;
18
+ export default class Command extends SvelteComponent<CommandProps_, CommandEvents, CommandSlots> {
19
+ }
@@ -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, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubber/ui",
3
- "version": "1.0.26",
3
+ "version": "1.1.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && pnpm run package && node ./fix_dts_imports.js",
@@ -63,6 +63,7 @@
63
63
  "dependencies": {
64
64
  "bits-ui": "^0.22.0",
65
65
  "clsx": "^2.1.1",
66
+ "cmdk-sv": "^0.0.18",
66
67
  "svelte-popperjs": "^1.3.2",
67
68
  "svelte-select": "^5.6.0",
68
69
  "svelte-sonner": "^0.3.28",