@kayord/ui 0.3.5 → 0.4.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 (29) hide show
  1. package/dist/components/custom/data-table/DataTable.svelte +11 -2
  2. package/dist/components/custom/data-table/DataTableCheckbox.svelte +5 -0
  3. package/dist/components/custom/data-table/DataTableCheckbox.svelte.d.ts +17 -0
  4. package/dist/components/custom/data-table/index.d.ts +1 -0
  5. package/dist/components/custom/data-table/index.js +1 -0
  6. package/dist/components/custom/index.d.ts +1 -1
  7. package/dist/components/custom/index.js +1 -1
  8. package/dist/components/ui/carousel/carousel-content.svelte +29 -0
  9. package/dist/components/ui/carousel/carousel-content.svelte.d.ts +17 -0
  10. package/dist/components/ui/carousel/carousel-item.svelte +16 -0
  11. package/dist/components/ui/carousel/carousel-item.svelte.d.ts +17 -0
  12. package/dist/components/ui/carousel/carousel-next.svelte +29 -0
  13. package/dist/components/ui/carousel/carousel-next.svelte.d.ts +15 -0
  14. package/dist/components/ui/carousel/carousel-previous.svelte +27 -0
  15. package/dist/components/ui/carousel/carousel-previous.svelte.d.ts +15 -0
  16. package/dist/components/ui/carousel/carousel.svelte +80 -0
  17. package/dist/components/ui/carousel/carousel.svelte.d.ts +20 -0
  18. package/dist/components/ui/carousel/context.d.ts +30 -0
  19. package/dist/components/ui/carousel/context.js +12 -0
  20. package/dist/components/ui/carousel/index.d.ts +5 -0
  21. package/dist/components/ui/carousel/index.js +5 -0
  22. package/dist/components/ui/drawer/drawer-description.svelte.d.ts +16 -0
  23. package/dist/components/ui/drawer/drawer-title.svelte.d.ts +16 -0
  24. package/dist/components/ui/drawer/index.d.ts +13 -0
  25. package/dist/components/ui/form/form-select.svelte.d.ts +1 -1
  26. package/dist/components/ui/index.d.ts +1 -0
  27. package/dist/components/ui/index.js +1 -0
  28. package/dist/components/ui/select/select-trigger.svelte +1 -1
  29. package/package.json +19 -18
@@ -16,6 +16,8 @@ const sortKeys = isSortEnabled ? pluginStates.sort.sortKeys : void 0;
16
16
  const isPagingEnabled = pluginStates.page != void 0;
17
17
  const pageIndex = isPagingEnabled ? pluginStates.page.pageIndex : void 0;
18
18
  const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
19
+ const isSelectEnabled = pluginStates.select != void 0;
20
+ const selectedDataIds = isSelectEnabled ? pluginStates.select.selectedDataIds : void 0;
19
21
  </script>
20
22
 
21
23
  <div class="w-full">
@@ -49,7 +51,7 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
49
51
  <Table.Row>
50
52
  {#each headerRow.cells as cell (cell.id)}
51
53
  <Subscribe attrs={cell.attrs()} let:attrs props={cell.props()} let:props>
52
- <Table.Head {...attrs}>
54
+ <Table.Head {...attrs} class="[&:has([role=checkbox])]:pl-4">
53
55
  {#if isSortEnabled}
54
56
  <Button variant="ghost" on:click={props.sort.toggle}>
55
57
  <Render of={cell.render()} />
@@ -93,7 +95,7 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
93
95
  {/if}
94
96
  {#each $pageRows as row (row.id)}
95
97
  <Subscribe rowAttrs={row.attrs()} let:rowAttrs>
96
- <Table.Row {...rowAttrs}>
98
+ <Table.Row {...rowAttrs} data-state={!isSelectEnabled ? false : $selectedDataIds[row.id] && "selected"}>
97
99
  {#each row.cells as cell (cell.id)}
98
100
  <Subscribe attrs={cell.attrs()} let:attrs>
99
101
  <Table.Cell {...attrs}>
@@ -113,6 +115,12 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
113
115
  </span>
114
116
  {/if}
115
117
  </div>
118
+ {#if isSelectEnabled}
119
+ <div class="flex-1 text-sm text-muted-foreground ml-4">
120
+ {Object.keys($selectedDataIds).length} of{" "}
121
+ {$rows.length} row(s) selected.
122
+ </div>
123
+ {/if}
116
124
  {#if isPagingEnabled}
117
125
  <Pagination.Root count={serverItemCount ?? $rows.length} perPage={$pageSize} let:pages let:currentPage>
118
126
  <Pagination.Content>
@@ -142,6 +150,7 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
142
150
  </Pagination.Content>
143
151
  </Pagination.Root>
144
152
  {/if}
153
+
145
154
  {#if $$slots.footer}
146
155
  <div class="rounded-b-md overflow-hidden">
147
156
  <slot name="footer" />
@@ -0,0 +1,5 @@
1
+ <script>import { Checkbox } from "../../ui/checkbox";
2
+ export let checked;
3
+ </script>
4
+
5
+ <Checkbox bind:checked={$checked} />
@@ -0,0 +1,17 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { Writable } from "svelte/store";
3
+ declare const __propDef: {
4
+ props: {
5
+ checked: Writable<boolean>;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export type DataTableCheckboxProps = typeof __propDef.props;
13
+ export type DataTableCheckboxEvents = typeof __propDef.events;
14
+ export type DataTableCheckboxSlots = typeof __propDef.slots;
15
+ export default class DataTableCheckbox extends SvelteComponent<DataTableCheckboxProps, DataTableCheckboxEvents, DataTableCheckboxSlots> {
16
+ }
17
+ export {};
@@ -1 +1,2 @@
1
1
  export { default as DataTable } from "./DataTable.svelte";
2
+ export { default as DataTableCheckbox } from "./DataTableCheckbox.svelte";
@@ -1 +1,2 @@
1
1
  export { default as DataTable } from "./DataTable.svelte";
2
+ export { default as DataTableCheckbox } from "./DataTableCheckbox.svelte";
@@ -1,4 +1,4 @@
1
1
  export { Loader } from "./loader/index.js";
2
2
  export { ThemeSwitch } from "./theme-switch/index.js";
3
- export { DataTable } from "./data-table/index.js";
3
+ export * from "./data-table/index.js";
4
4
  export { ProgressLoading } from "./progress-loading/index.js";
@@ -1,4 +1,4 @@
1
1
  export { Loader } from "./loader/index.js";
2
2
  export { ThemeSwitch } from "./theme-switch/index.js";
3
- export { DataTable } from "./data-table/index.js";
3
+ export * from "./data-table/index.js";
4
4
  export { ProgressLoading } from "./progress-loading/index.js";
@@ -0,0 +1,29 @@
1
+ <script>import { cn } from "../../../utils.js";
2
+ import { getEmblaContext } from "./context.js";
3
+ import emblaCarouselSvelte from "embla-carousel-svelte";
4
+ let className = void 0;
5
+ export { className as class };
6
+ const { orientation, options, plugins, onInit } = getEmblaContext("<Carousel.Content/>");
7
+ </script>
8
+
9
+ <div
10
+ class="overflow-hidden"
11
+ use:emblaCarouselSvelte={{
12
+ options: {
13
+ container: "[data-embla-container]",
14
+ slides: "[data-embla-slide]",
15
+ ...$options,
16
+ axis: $orientation === "horizontal" ? "x" : "y",
17
+ },
18
+ plugins: $plugins,
19
+ }}
20
+ on:emblaInit={onInit}
21
+ >
22
+ <div
23
+ class={cn("flex", $orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)}
24
+ data-embla-container=""
25
+ {...$$restProps}
26
+ >
27
+ <slot />
28
+ </div>
29
+ </div>
@@ -0,0 +1,17 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLAttributes<HTMLDivElement>;
5
+ events: {
6
+ [evt: string]: CustomEvent<any>;
7
+ };
8
+ slots: {
9
+ default: {};
10
+ };
11
+ };
12
+ export type CarouselContentProps = typeof __propDef.props;
13
+ export type CarouselContentEvents = typeof __propDef.events;
14
+ export type CarouselContentSlots = typeof __propDef.slots;
15
+ export default class CarouselContent extends SvelteComponent<CarouselContentProps, CarouselContentEvents, CarouselContentSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,16 @@
1
+ <script>import { cn } from "../../../utils";
2
+ import { getEmblaContext } from "./context.js";
3
+ let className = void 0;
4
+ export { className as class };
5
+ const { orientation } = getEmblaContext("<Carousel.Item/>");
6
+ </script>
7
+
8
+ <div
9
+ role="group"
10
+ aria-roledescription="slide"
11
+ class={cn("min-w-0 shrink-0 grow-0 basis-full", $orientation === "horizontal" ? "pl-4" : "pt-4", className)}
12
+ data-embla-slide=""
13
+ {...$$restProps}
14
+ >
15
+ <slot />
16
+ </div>
@@ -0,0 +1,17 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLAttributes<HTMLDivElement>;
5
+ events: {
6
+ [evt: string]: CustomEvent<any>;
7
+ };
8
+ slots: {
9
+ default: {};
10
+ };
11
+ };
12
+ export type CarouselItemProps = typeof __propDef.props;
13
+ export type CarouselItemEvents = typeof __propDef.events;
14
+ export type CarouselItemSlots = typeof __propDef.slots;
15
+ export default class CarouselItem extends SvelteComponent<CarouselItemProps, CarouselItemEvents, CarouselItemSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,29 @@
1
+ <script>import { Button, buttonVariants } from "../button/index.js";
2
+ import { cn } from "../../../utils";
3
+ import { ArrowRight } from "lucide-svelte";
4
+ import { getEmblaContext } from "./context.js";
5
+ let className = void 0;
6
+ export { className as class };
7
+ export let variant = "outline";
8
+ export let size = "icon";
9
+ const { orientation, canScrollNext, scrollNext, handleKeyDown } = getEmblaContext("<Carousel.Next/>");
10
+ </script>
11
+
12
+ <Button
13
+ {variant}
14
+ {size}
15
+ class={cn(
16
+ "absolute h-8 w-8 rounded-full touch-manipulation",
17
+ $orientation === "horizontal"
18
+ ? "-right-12 top-1/2 -translate-y-1/2"
19
+ : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
20
+ className
21
+ )}
22
+ disabled={!$canScrollNext}
23
+ on:click={scrollNext}
24
+ on:keydown={handleKeyDown}
25
+ {...$$restProps}
26
+ >
27
+ <ArrowRight class="h-4 w-4" />
28
+ <span class="sr-only">Next slide</span>
29
+ </Button>
@@ -0,0 +1,15 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type Props } from "../button/index.js";
3
+ declare const __propDef: {
4
+ props: Props;
5
+ events: {
6
+ [evt: string]: CustomEvent<any>;
7
+ };
8
+ slots: {};
9
+ };
10
+ export type CarouselNextProps = typeof __propDef.props;
11
+ export type CarouselNextEvents = typeof __propDef.events;
12
+ export type CarouselNextSlots = typeof __propDef.slots;
13
+ export default class CarouselNext extends SvelteComponent<CarouselNextProps, CarouselNextEvents, CarouselNextSlots> {
14
+ }
15
+ export {};
@@ -0,0 +1,27 @@
1
+ <script>import { Button, buttonVariants } from "../button/index.js";
2
+ import { cn } from "../../../utils.js";
3
+ import { ArrowLeft } from "lucide-svelte";
4
+ import { getEmblaContext } from "./context.js";
5
+ let className = void 0;
6
+ export { className as class };
7
+ export let variant = "outline";
8
+ export let size = "icon";
9
+ const { orientation, canScrollPrev, scrollPrev, handleKeyDown } = getEmblaContext("<Carousel.Previous/>");
10
+ </script>
11
+
12
+ <Button
13
+ {variant}
14
+ {size}
15
+ class={cn(
16
+ "absolute h-8 w-8 rounded-full touch-manipulation",
17
+ $orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
18
+ className
19
+ )}
20
+ disabled={!$canScrollPrev}
21
+ on:click={scrollPrev}
22
+ on:keydown={handleKeyDown}
23
+ {...$$restProps}
24
+ >
25
+ <ArrowLeft class="h-4 w-4" />
26
+ <span class="sr-only">Previous slide</span>
27
+ </Button>
@@ -0,0 +1,15 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type Props } from "../button/index.js";
3
+ declare const __propDef: {
4
+ props: Props;
5
+ events: {
6
+ [evt: string]: CustomEvent<any>;
7
+ };
8
+ slots: {};
9
+ };
10
+ export type CarouselPreviousProps = typeof __propDef.props;
11
+ export type CarouselPreviousEvents = typeof __propDef.events;
12
+ export type CarouselPreviousSlots = typeof __propDef.slots;
13
+ export default class CarouselPrevious extends SvelteComponent<CarouselPreviousProps, CarouselPreviousEvents, CarouselPreviousSlots> {
14
+ }
15
+ export {};
@@ -0,0 +1,80 @@
1
+ <script>import { setEmblaContex } from "./context.js";
2
+ import { cn } from "../../../utils.js";
3
+ import { writable } from "svelte/store";
4
+ import { onDestroy } from "svelte";
5
+ export let opts = {};
6
+ export let plugins = [];
7
+ export let api = void 0;
8
+ export let orientation = "horizontal";
9
+ let className = void 0;
10
+ export { className as class };
11
+ const apiStore = writable(void 0);
12
+ const orientationStore = writable(orientation);
13
+ const canScrollPrev = writable(false);
14
+ const canScrollNext = writable(false);
15
+ const optionsStore = writable(opts);
16
+ const pluginStore = writable(plugins);
17
+ $:
18
+ orientationStore.set(orientation);
19
+ $:
20
+ pluginStore.set(plugins);
21
+ $:
22
+ optionsStore.set(opts);
23
+ function scrollPrev() {
24
+ api?.scrollPrev();
25
+ }
26
+ function scrollNext() {
27
+ api?.scrollNext();
28
+ }
29
+ function onSelect(api2) {
30
+ if (!api2)
31
+ return;
32
+ canScrollPrev.set(api2.canScrollPrev());
33
+ canScrollNext.set(api2.canScrollNext());
34
+ }
35
+ $:
36
+ if (api) {
37
+ onSelect(api);
38
+ api.on("select", onSelect);
39
+ api.on("reInit", onSelect);
40
+ }
41
+ function handleKeyDown(e) {
42
+ if (e.key === "ArrowLeft") {
43
+ e.preventDefault();
44
+ scrollPrev();
45
+ } else if (e.key === "ArrowRight") {
46
+ e.preventDefault();
47
+ scrollNext();
48
+ }
49
+ }
50
+ setEmblaContex({
51
+ api: apiStore,
52
+ scrollPrev,
53
+ scrollNext,
54
+ orientation: orientationStore,
55
+ canScrollNext,
56
+ canScrollPrev,
57
+ handleKeyDown,
58
+ options: optionsStore,
59
+ plugins: pluginStore,
60
+ onInit
61
+ });
62
+ function onInit(event) {
63
+ api = event.detail;
64
+ apiStore.set(api);
65
+ }
66
+ onDestroy(() => {
67
+ api?.off("select", onSelect);
68
+ });
69
+ </script>
70
+
71
+ <div
72
+ class={cn("relative", className)}
73
+ on:mouseenter
74
+ on:mouseleave
75
+ role="region"
76
+ aria-roledescription="carousel"
77
+ {...$$restProps}
78
+ >
79
+ <slot />
80
+ </div>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type CarouselProps } from "./context.js";
3
+ declare const __propDef: {
4
+ props: CarouselProps;
5
+ events: {
6
+ mouseenter: MouseEvent;
7
+ mouseleave: MouseEvent;
8
+ } & {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ type CarouselProps_ = typeof __propDef.props;
16
+ export { CarouselProps_ as CarouselProps };
17
+ export type CarouselEvents = typeof __propDef.events;
18
+ export type CarouselSlots = typeof __propDef.slots;
19
+ export default class Carousel extends SvelteComponent<CarouselProps, CarouselEvents, CarouselSlots> {
20
+ }
@@ -0,0 +1,30 @@
1
+ /// <reference types="svelte" />
2
+ import type { EmblaCarouselSvelteType } from "embla-carousel-svelte";
3
+ import type emblaCarouselSvelte from "embla-carousel-svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+ import type { Writable, Readable } from "svelte/store";
6
+ export type CarouselAPI = NonNullable<NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]> extends (evt: CustomEvent<infer CarouselAPI>) => void ? CarouselAPI : never;
7
+ type EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;
8
+ export type CarouselOptions = EmblaCarouselConfig["options"];
9
+ export type CarouselPlugins = EmblaCarouselConfig["plugins"];
10
+ export type CarouselProps = {
11
+ opts?: CarouselOptions;
12
+ plugins?: CarouselPlugins;
13
+ api?: CarouselAPI;
14
+ orientation?: "horizontal" | "vertical";
15
+ } & HTMLAttributes<HTMLDivElement>;
16
+ type EmblaContext = {
17
+ api: Writable<CarouselAPI | undefined>;
18
+ orientation: Writable<"horizontal" | "vertical">;
19
+ scrollNext: () => void;
20
+ scrollPrev: () => void;
21
+ canScrollNext: Readable<boolean>;
22
+ canScrollPrev: Readable<boolean>;
23
+ handleKeyDown: (e: KeyboardEvent) => void;
24
+ options: Writable<CarouselOptions>;
25
+ plugins: Writable<CarouselPlugins>;
26
+ onInit: (e: CustomEvent<CarouselAPI>) => void;
27
+ };
28
+ export declare function setEmblaContex(config: EmblaContext): EmblaContext;
29
+ export declare function getEmblaContext(name?: string): EmblaContext;
30
+ export {};
@@ -0,0 +1,12 @@
1
+ import { getContext, hasContext, setContext } from "svelte";
2
+ const EMBLA_CAROUSEL_CONTEXT = Symbol("EMBLA_CAROUSEL_CONTEXT");
3
+ export function setEmblaContex(config) {
4
+ setContext(EMBLA_CAROUSEL_CONTEXT, config);
5
+ return config;
6
+ }
7
+ export function getEmblaContext(name = "This component") {
8
+ if (!hasContext(EMBLA_CAROUSEL_CONTEXT)) {
9
+ throw new Error(`${name} must be used within a <Carousel.Root> component`);
10
+ }
11
+ return getContext(EMBLA_CAROUSEL_CONTEXT);
12
+ }
@@ -0,0 +1,5 @@
1
+ export { default as Root } from "./carousel.svelte";
2
+ export { default as Content } from "./carousel-content.svelte";
3
+ export { default as Item } from "./carousel-item.svelte";
4
+ export { default as Previous } from "./carousel-previous.svelte";
5
+ export { default as Next } from "./carousel-next.svelte";
@@ -0,0 +1,5 @@
1
+ export { default as Root } from "./carousel.svelte";
2
+ export { default as Content } from "./carousel-content.svelte";
3
+ export { default as Item } from "./carousel-item.svelte";
4
+ export { default as Previous } from "./carousel-previous.svelte";
5
+ export { default as Next } from "./carousel-next.svelte";
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: import("bits-ui/dist/bits/dialog/types").DescriptionProps;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {
8
+ default: {};
9
+ };
10
+ };
11
+ export type DrawerDescriptionProps = typeof __propDef.props;
12
+ export type DrawerDescriptionEvents = typeof __propDef.events;
13
+ export type DrawerDescriptionSlots = typeof __propDef.slots;
14
+ export default class DrawerDescription extends SvelteComponent<DrawerDescriptionProps, DrawerDescriptionEvents, DrawerDescriptionSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: import("bits-ui/dist/bits/dialog/types").TitleProps;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {
8
+ default: {};
9
+ };
10
+ };
11
+ export type DrawerTitleProps = typeof __propDef.props;
12
+ export type DrawerTitleEvents = typeof __propDef.events;
13
+ export type DrawerTitleSlots = typeof __propDef.slots;
14
+ export default class DrawerTitle extends SvelteComponent<DrawerTitleProps, DrawerTitleEvents, DrawerTitleSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="svelte" />
2
+ import { Drawer as DrawerPrimitive } from "vaul-svelte";
3
+ import Root from "./drawer.svelte";
4
+ import Content from "./drawer-content.svelte";
5
+ import Description from "./drawer-description.svelte";
6
+ import Overlay from "./drawer-overlay.svelte";
7
+ import Footer from "./drawer-footer.svelte";
8
+ import Header from "./drawer-header.svelte";
9
+ import Title from "./drawer-title.svelte";
10
+ declare const Trigger: typeof DrawerPrimitive.Content;
11
+ declare const Portal: typeof import("bits-ui/dist/bits/dialog").Portal;
12
+ declare const Close: typeof DrawerPrimitive.Content;
13
+ export { Root, Content, Description, Overlay, Footer, Header, Title, Trigger, Portal, Close, Root as Drawer, Content as DrawerContent, Description as DrawerDescription, Overlay as DrawerOverlay, Footer as DrawerFooter, Header as DrawerHeader, Title as DrawerTitle, Trigger as DrawerTrigger, Portal as DrawerPortal, Close as DrawerClose, };
@@ -3,8 +3,8 @@ declare const __propDef: {
3
3
  props: {
4
4
  disabled?: boolean | undefined;
5
5
  name?: string | undefined;
6
- required?: boolean | undefined;
7
6
  loop?: boolean | undefined;
7
+ required?: boolean | undefined;
8
8
  preventScroll?: boolean | undefined;
9
9
  closeOnEscape?: boolean | undefined;
10
10
  closeOnOutsideClick?: boolean | undefined;
@@ -7,6 +7,7 @@ export { Badge, type Variant as BadgeVariant, badgeVariants } from "./badge/inde
7
7
  export { Button, type ButtonEvents, type ButtonProps, buttonVariants } from "./button/index.js";
8
8
  export * as Calendar from "./calendar/index.js";
9
9
  export * as Card from "./card/index.js";
10
+ export * as Carousel from "./carousel/index.js";
10
11
  export { Checkbox } from "./checkbox/index.js";
11
12
  export * as Collapsible from "./collapsible/index.js";
12
13
  export * as Command from "./command/index.js";
@@ -7,6 +7,7 @@ export { Badge, badgeVariants } from "./badge/index.js";
7
7
  export { Button, buttonVariants } from "./button/index.js";
8
8
  export * as Calendar from "./calendar/index.js";
9
9
  export * as Card from "./card/index.js";
10
+ export * as Carousel from "./carousel/index.js";
10
11
  export { Checkbox } from "./checkbox/index.js";
11
12
  export * as Collapsible from "./collapsible/index.js";
12
13
  export * as Command from "./command/index.js";
@@ -7,7 +7,7 @@ export { className as class };
7
7
 
8
8
  <SelectPrimitive.Trigger
9
9
  class={cn(
10
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
10
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 line-clamp-1 truncate",
11
11
  className
12
12
  )}
13
13
  {...$$restProps}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.3.5",
4
+ "version": "0.4.0",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -30,28 +30,29 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@internationalized/date": "^3.5.1",
33
- "bits-ui": "^0.14.0",
33
+ "bits-ui": "^0.16.0",
34
34
  "clsx": "^2.1.0",
35
35
  "cmdk-sv": "^0.0.13",
36
- "formsnap": "^0.4.2",
37
- "lucide-svelte": "^0.312.0",
38
- "mode-watcher": "^0.1.2",
36
+ "embla-carousel-svelte": "8.0.0-rc22",
37
+ "formsnap": "^0.4.3",
38
+ "lucide-svelte": "^0.320.0",
39
+ "mode-watcher": "^0.2.0",
39
40
  "svelte-headless-table": "^0.18.1",
40
41
  "svelte-sonner": "^0.3.11",
41
- "sveltekit-superforms": "^1.13.3",
42
- "tailwind-merge": "^2.2.0",
42
+ "sveltekit-superforms": "^1.13.4",
43
+ "tailwind-merge": "^2.2.1",
43
44
  "tailwind-variants": "^0.1.20",
44
- "vaul-svelte": "^0.0.7",
45
+ "vaul-svelte": "^0.2.1",
45
46
  "zod": "^3.22.4"
46
47
  },
47
48
  "devDependencies": {
48
- "@playwright/test": "^1.41.0",
49
- "@sveltejs/adapter-auto": "^3.1.0",
50
- "@sveltejs/kit": "^2.3.3",
49
+ "@playwright/test": "^1.41.1",
50
+ "@sveltejs/adapter-auto": "^3.1.1",
51
+ "@sveltejs/kit": "^2.5.0",
51
52
  "@sveltejs/package": "^2.2.6",
52
- "@sveltejs/vite-plugin-svelte": "^3.0.1",
53
- "@typescript-eslint/eslint-plugin": "^6.19.0",
54
- "@typescript-eslint/parser": "^6.19.0",
53
+ "@sveltejs/vite-plugin-svelte": "^3.0.2",
54
+ "@typescript-eslint/eslint-plugin": "^6.20.0",
55
+ "@typescript-eslint/parser": "^6.20.0",
55
56
  "autoprefixer": "^10.4.17",
56
57
  "eslint": "^8.56.0",
57
58
  "eslint-config-prettier": "^9.1.0",
@@ -66,8 +67,8 @@
66
67
  "tailwindcss": "^3.4.1",
67
68
  "tslib": "^2.6.2",
68
69
  "typescript": "^5.3.3",
69
- "vite": "^5.0.11",
70
- "vitest": "^1.2.1"
70
+ "vite": "^5.0.12",
71
+ "vitest": "^1.2.2"
71
72
  },
72
73
  "svelte": "./dist/index.js",
73
74
  "types": "./dist/index.d.ts",
@@ -81,8 +82,8 @@
81
82
  "test": "npm run test:integration && npm run test:unit",
82
83
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
83
84
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
84
- "lint": "prettier --plugin-search-dir . --check . && eslint .",
85
- "format": "prettier --plugin-search-dir . --write .",
85
+ "lint": "prettier --check . && eslint .",
86
+ "format": "prettier --write .",
86
87
  "test:integration": "playwright test",
87
88
  "test:unit": "vitest"
88
89
  }