@connectorvol/chess-shadcn 1.0.0 → 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.
@@ -0,0 +1,8 @@
1
+ import Root from "./select.svelte";
2
+ import Trigger from "./select-trigger.svelte";
3
+ import Content from "./select-content.svelte";
4
+ import Item from "./select-item.svelte";
5
+ import Separator from "./select-separator.svelte";
6
+ import Group from "./select-group.svelte";
7
+ import Label from "./select-label.svelte";
8
+ export { Root, Trigger, Content, Item, Separator, Group, Label, Root as Select, Trigger as SelectTrigger, Content as SelectContent, Item as SelectItem, Separator as SelectSeparator, Group as SelectGroup, Label as SelectLabel, };
@@ -0,0 +1,10 @@
1
+ import Root from "./select.svelte";
2
+ import Trigger from "./select-trigger.svelte";
3
+ import Content from "./select-content.svelte";
4
+ import Item from "./select-item.svelte";
5
+ import Separator from "./select-separator.svelte";
6
+ import Group from "./select-group.svelte";
7
+ import Label from "./select-label.svelte";
8
+ export { Root, Trigger, Content, Item, Separator, Group, Label,
9
+ //
10
+ Root as Select, Trigger as SelectTrigger, Content as SelectContent, Item as SelectItem, Separator as SelectSeparator, Group as SelectGroup, Label as SelectLabel, };
@@ -0,0 +1,28 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+ import { cn } from "../../../utils.js";
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ children,
9
+ ...restProps
10
+ }: SelectPrimitive.ContentProps = $props();
11
+ </script>
12
+
13
+ <SelectPrimitive.Portal>
14
+ <SelectPrimitive.Content
15
+ bind:ref
16
+ class={cn(
17
+ "bg-popover text-popover-foreground 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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",
18
+ className,
19
+ )}
20
+ {...restProps}
21
+ >
22
+ <SelectPrimitive.ScrollUpButton />
23
+ <SelectPrimitive.Viewport class="p-1">
24
+ {@render children?.()}
25
+ </SelectPrimitive.Viewport>
26
+ <SelectPrimitive.ScrollDownButton />
27
+ </SelectPrimitive.Content>
28
+ </SelectPrimitive.Portal>
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectContent: import("svelte").Component<SelectPrimitive.ContentProps, {}, "ref">;
3
+ type SelectContent = ReturnType<typeof SelectContent>;
4
+ export default SelectContent;
@@ -0,0 +1,7 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+
4
+ let { ...restProps }: SelectPrimitive.GroupProps = $props();
5
+ </script>
6
+
7
+ <SelectPrimitive.Group {...restProps} />
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectGroup: import("svelte").Component<SelectPrimitive.GroupProps, {}, "">;
3
+ type SelectGroup = ReturnType<typeof SelectGroup>;
4
+ export default SelectGroup;
@@ -0,0 +1,30 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+ import Check from "@lucide/svelte/icons/check";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: SelectPrimitive.ItemProps = $props();
12
+ </script>
13
+
14
+ <SelectPrimitive.Item
15
+ bind:ref
16
+ class={cn(
17
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
18
+ className,
19
+ )}
20
+ {...restProps}
21
+ >
22
+ {#snippet children({ selected, highlighted })}
23
+ <span class="absolute right-2 flex size-3.5 items-center justify-center">
24
+ {#if selected}
25
+ <Check class="size-4" />
26
+ {/if}
27
+ </span>
28
+ {@render children?.({ selected, highlighted })}
29
+ {/snippet}
30
+ </SelectPrimitive.Item>
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectItem: import("svelte").Component<SelectPrimitive.ItemProps, {}, "ref">;
3
+ type SelectItem = ReturnType<typeof SelectItem>;
4
+ export default SelectItem;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+ import { cn } from "../../../utils.js";
4
+
5
+ let {
6
+ class: className,
7
+ ...restProps
8
+ }: SelectPrimitive.GroupHeadingProps = $props();
9
+ </script>
10
+
11
+ <SelectPrimitive.GroupHeading
12
+ class={cn("px-2 py-1.5 text-sm font-semibold", className)}
13
+ {...restProps}
14
+ />
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectLabel: import("svelte").Component<SelectPrimitive.GroupHeadingProps, {}, "">;
3
+ type SelectLabel = ReturnType<typeof SelectLabel>;
4
+ export default SelectLabel;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+ import { cn } from "../../../utils.js";
4
+
5
+ let {
6
+ class: className,
7
+ ...restProps
8
+ }: SelectPrimitive.SeparatorProps = $props();
9
+ </script>
10
+
11
+ <SelectPrimitive.Separator
12
+ class={cn("bg-muted -mx-1 my-1 h-px", className)}
13
+ {...restProps}
14
+ />
@@ -0,0 +1,3 @@
1
+ declare const SelectSeparator: import("svelte").Component<SelectPrimitive.SeparatorProps, {}, "">;
2
+ type SelectSeparator = ReturnType<typeof SelectSeparator>;
3
+ export default SelectSeparator;
@@ -0,0 +1,24 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+ import ChevronDown from "@lucide/svelte/icons/chevron-down";
4
+ import { cn } from "../../../utils.js";
5
+
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: SelectPrimitive.TriggerProps = $props();
12
+ </script>
13
+
14
+ <SelectPrimitive.Trigger
15
+ bind:ref
16
+ class={cn(
17
+ "border-input bg-background ring-offset-background data-placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm whitespace-nowrap shadow-sm transition-colors focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
18
+ className,
19
+ )}
20
+ {...restProps}
21
+ >
22
+ {@render children?.()}
23
+ <ChevronDown class="size-4 opacity-50" />
24
+ </SelectPrimitive.Trigger>
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectTrigger: import("svelte").Component<SelectPrimitive.TriggerProps, {}, "ref">;
3
+ type SelectTrigger = ReturnType<typeof SelectTrigger>;
4
+ export default SelectTrigger;
@@ -0,0 +1,7 @@
1
+ <script lang="ts">
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+
4
+ let { ...restProps }: SelectPrimitive.RootProps = $props();
5
+ </script>
6
+
7
+ <SelectPrimitive.Root {...restProps} />
@@ -0,0 +1,3 @@
1
+ declare const Select: import("svelte").Component<import("bits-ui").SelectRootPropsWithoutHTML, {}, "">;
2
+ type Select = ReturnType<typeof Select>;
3
+ export default Select;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PopoverClose, PopoverPortal, } from "./components/ui/popover/index.js";
2
2
  export { Toggle, toggleVariants, type ToggleSize, type ToggleVariant, type ToggleVariants, } from "./components/ui/toggle/index.js";
3
3
  export { Checkbox } from "./components/ui/checkbox/index.js";
4
+ export { Select, SelectTrigger, SelectContent, SelectItem, SelectSeparator, SelectGroup, SelectLabel, } from "./components/ui/select/index.js";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PopoverClose, PopoverPortal, } from "./components/ui/popover/index.js";
2
2
  export { Toggle, toggleVariants, } from "./components/ui/toggle/index.js";
3
3
  export { Checkbox } from "./components/ui/checkbox/index.js";
4
+ export { Select, SelectTrigger, SelectContent, SelectItem, SelectSeparator, SelectGroup, SelectLabel, } from "./components/ui/select/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectorvol/chess-shadcn",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,7 +37,9 @@
37
37
  "prettier": "prettier --write \"**/*.svelte\""
38
38
  },
39
39
  "dependencies": {
40
+ "bits-ui": "2.16.4",
40
41
  "clsx": "^2.1.1",
42
+ "svelte-toolbelt": "^0.10.6",
41
43
  "tailwind-merge": "3.3.1",
42
44
  "tailwind-variants": "3.1.1",
43
45
  "@lucide/svelte": "^1.16.0"
@@ -56,7 +58,6 @@
56
58
  "vite": "8.0.7"
57
59
  },
58
60
  "peerDependencies": {
59
- "bits-ui": "2.16.4",
60
61
  "svelte": "^5.53.12"
61
62
  }
62
63
  }