@kayord/ui 0.7.2 → 0.8.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 (24) hide show
  1. package/dist/components/custom/data-table/DataTable.svelte +2 -1
  2. package/dist/components/custom/data-table/DataTableActions.svelte +2 -2
  3. package/dist/components/custom/loader/Loader.svelte +3 -2
  4. package/dist/components/custom/theme-switch/ThemeSwitch.svelte +2 -1
  5. package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +17 -0
  6. package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +17 -0
  7. package/dist/components/ui/breadcrumb/breadcrumb-item.svelte +9 -0
  8. package/dist/components/ui/breadcrumb/breadcrumb-item.svelte.d.ts +19 -0
  9. package/dist/components/ui/breadcrumb/breadcrumb-link.svelte +22 -0
  10. package/dist/components/ui/breadcrumb/breadcrumb-link.svelte.d.ts +22 -0
  11. package/dist/components/ui/breadcrumb/breadcrumb-list.svelte +13 -0
  12. package/dist/components/ui/breadcrumb/breadcrumb-list.svelte.d.ts +19 -0
  13. package/dist/components/ui/breadcrumb/breadcrumb-page.svelte +16 -0
  14. package/dist/components/ui/breadcrumb/breadcrumb-page.svelte.d.ts +21 -0
  15. package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +12 -0
  16. package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte.d.ts +19 -0
  17. package/dist/components/ui/breadcrumb/breadcrumb.svelte +8 -0
  18. package/dist/components/ui/breadcrumb/breadcrumb.svelte.d.ts +19 -0
  19. package/dist/components/ui/breadcrumb/index.d.ts +8 -0
  20. package/dist/components/ui/breadcrumb/index.js +10 -0
  21. package/dist/components/ui/index.d.ts +1 -0
  22. package/dist/components/ui/index.js +1 -0
  23. package/dist/components/ui/pagination/pagination-ellipsis.svelte +3 -3
  24. package/package.json +19 -18
@@ -1,4 +1,5 @@
1
- <script>import { ArrowDown, ArrowUp } from "lucide-svelte";
1
+ <script>import ArrowDown from "lucide-svelte/icons/arrow-down";
2
+ import ArrowUp from "lucide-svelte/icons/arrow-up";
2
3
  import { fade } from "svelte/transition";
3
4
  import { Button, ProgressLoading, Skeleton } from "../../..";
4
5
  import { Subscribe, Render } from "svelte-headless-table";
@@ -1,6 +1,6 @@
1
1
  <script>import * as DropdownMenu from "../../ui/dropdown-menu";
2
2
  import { Button } from "../../ui/button";
3
- import { MoreHorizontal } from "lucide-svelte";
3
+ import MoreHorizontalIcon from "lucide-svelte/icons/ellipsis";
4
4
  export let id;
5
5
  </script>
6
6
 
@@ -8,7 +8,7 @@ export let id;
8
8
  <DropdownMenu.Trigger asChild let:builder>
9
9
  <Button variant="ghost" builders={[builder]} size="icon" class="relative w-8 h-8 p-0">
10
10
  <span class="sr-only">Open menu</span>
11
- <MoreHorizontal class="w-4 h-4" />
11
+ <MoreHorizontalIcon class="w-4 h-4" />
12
12
  </Button>
13
13
  </DropdownMenu.Trigger>
14
14
  <DropdownMenu.Content>
@@ -1,5 +1,6 @@
1
1
  <script>import { cn } from "../../../utils";
2
- import { Loader2 } from "lucide-svelte";
2
+ import {} from "lucide-svelte";
3
+ import LoaderCircleIcon from "lucide-svelte/icons/loader-circle";
3
4
  let className = void 0;
4
5
  export let isLoading = true;
5
6
  export { className as class };
@@ -7,6 +8,6 @@ export { className as class };
7
8
 
8
9
  {#if isLoading}
9
10
  <div class="flex justify-center">
10
- <Loader2 class={cn("h-8 w-8 animate-spin m-2", className)} {...$$restProps} />
11
+ <LoaderCircleIcon class={cn("h-8 w-8 animate-spin m-2", className)} {...$$restProps} />
11
12
  </div>
12
13
  {/if}
@@ -1,5 +1,6 @@
1
1
  <script>import { toggleMode, mode } from "mode-watcher";
2
- import { Moon, Sun } from "lucide-svelte";
2
+ import Moon from "lucide-svelte/icons/moon";
3
+ import Sun from "lucide-svelte/icons/sun";
3
4
  import { cn } from "../../../utils";
4
5
  let className = void 0;
5
6
  export { className as class };
@@ -0,0 +1,17 @@
1
+ <script>import { cn } from "../../../utils.js";
2
+ import Ellipsis from "lucide-svelte/icons/ellipsis";
3
+ export let el = void 0;
4
+ let className = void 0;
5
+ export { className as class };
6
+ </script>
7
+
8
+ <span
9
+ bind:this={el}
10
+ role="presentation"
11
+ aria-hidden="true"
12
+ class={cn("flex h-9 w-9 items-center justify-center", className)}
13
+ {...$$restProps}
14
+ >
15
+ <Ellipsis class="h-4 w-4" />
16
+ <span class="sr-only">More</span>
17
+ </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
+ el?: HTMLSpanElement | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export type BreadcrumbEllipsisProps = typeof __propDef.props;
13
+ export type BreadcrumbEllipsisEvents = typeof __propDef.events;
14
+ export type BreadcrumbEllipsisSlots = typeof __propDef.slots;
15
+ export default class BreadcrumbEllipsis extends SvelteComponent<BreadcrumbEllipsisProps, BreadcrumbEllipsisEvents, BreadcrumbEllipsisSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,9 @@
1
+ <script>import { cn } from "../../../utils.js";
2
+ export let el = void 0;
3
+ let className = void 0;
4
+ export { className as class };
5
+ </script>
6
+
7
+ <li bind:this={el} class={cn("inline-flex items-center gap-1.5", className)}>
8
+ <slot />
9
+ </li>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLLiAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLLiAttributes & {
5
+ el?: HTMLLIElement | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type BreadcrumbItemProps = typeof __propDef.props;
15
+ export type BreadcrumbItemEvents = typeof __propDef.events;
16
+ export type BreadcrumbItemSlots = typeof __propDef.slots;
17
+ export default class BreadcrumbItem extends SvelteComponent<BreadcrumbItemProps, BreadcrumbItemEvents, BreadcrumbItemSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,22 @@
1
+ <script>import { cn } from "../../../utils.js";
2
+ export let href = void 0;
3
+ export let el = void 0;
4
+ export let asChild = false;
5
+ let className = void 0;
6
+ export { className as class };
7
+ let attrs;
8
+ $:
9
+ attrs = {
10
+ class: cn("transition-colors hover:text-foreground", className),
11
+ href,
12
+ ...$$restProps
13
+ };
14
+ </script>
15
+
16
+ {#if asChild}
17
+ <slot {attrs} />
18
+ {:else}
19
+ <a bind:this={el} {...attrs} {href}>
20
+ <slot {attrs} />
21
+ </a>
22
+ {/if}
@@ -0,0 +1,22 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLAnchorAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLAnchorAttributes & {
5
+ el?: HTMLAnchorElement | undefined;
6
+ asChild?: boolean | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {
13
+ attrs: Record<string, unknown>;
14
+ };
15
+ };
16
+ };
17
+ export type BreadcrumbLinkProps = typeof __propDef.props;
18
+ export type BreadcrumbLinkEvents = typeof __propDef.events;
19
+ export type BreadcrumbLinkSlots = typeof __propDef.slots;
20
+ export default class BreadcrumbLink extends SvelteComponent<BreadcrumbLinkProps, BreadcrumbLinkEvents, BreadcrumbLinkSlots> {
21
+ }
22
+ export {};
@@ -0,0 +1,13 @@
1
+ <script>import { cn } from "../../../utils.js";
2
+ export let el = void 0;
3
+ let className = void 0;
4
+ export { className as class };
5
+ </script>
6
+
7
+ <ol
8
+ bind:this={el}
9
+ class={cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className)}
10
+ {...$$restProps}
11
+ >
12
+ <slot />
13
+ </ol>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLOlAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLOlAttributes & {
5
+ el?: HTMLOListElement | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type BreadcrumbListProps = typeof __propDef.props;
15
+ export type BreadcrumbListEvents = typeof __propDef.events;
16
+ export type BreadcrumbListSlots = typeof __propDef.slots;
17
+ export default class BreadcrumbList extends SvelteComponent<BreadcrumbListProps, BreadcrumbListEvents, BreadcrumbListSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,16 @@
1
+ <script>import { cn } from "../../../utils.js";
2
+ export let el = void 0;
3
+ export let className = void 0;
4
+ export { className as class };
5
+ </script>
6
+
7
+ <span
8
+ bind:this={el}
9
+ role="link"
10
+ aria-disabled="true"
11
+ aria-current="page"
12
+ class={cn("font-normal text-foreground", className)}
13
+ {...$$restProps}
14
+ >
15
+ <slot />
16
+ </span>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: {
5
+ class?: string | null | undefined;
6
+ } & HTMLAttributes<HTMLSpanElement> & {
7
+ el?: HTMLSpanElement | undefined;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export type BreadcrumbPageProps = typeof __propDef.props;
17
+ export type BreadcrumbPageEvents = typeof __propDef.events;
18
+ export type BreadcrumbPageSlots = typeof __propDef.slots;
19
+ export default class BreadcrumbPage extends SvelteComponent<BreadcrumbPageProps, BreadcrumbPageEvents, BreadcrumbPageSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,12 @@
1
+ <script>import ChevronRight from "lucide-svelte/icons/chevron-right";
2
+ import { cn } from "../../../utils.js";
3
+ export let el = void 0;
4
+ let className = void 0;
5
+ export { className as class };
6
+ </script>
7
+
8
+ <li role="presentation" aria-hidden="true" class={cn("[&>svg]:size-3.5", className)} bind:this={el} {...$$restProps}>
9
+ <slot>
10
+ <ChevronRight />
11
+ </slot>
12
+ </li>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLLiAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLLiAttributes & {
5
+ el?: HTMLLIElement | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type BreadcrumbSeparatorProps = typeof __propDef.props;
15
+ export type BreadcrumbSeparatorEvents = typeof __propDef.events;
16
+ export type BreadcrumbSeparatorSlots = typeof __propDef.slots;
17
+ export default class BreadcrumbSeparator extends SvelteComponent<BreadcrumbSeparatorProps, BreadcrumbSeparatorEvents, BreadcrumbSeparatorSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,8 @@
1
+ <script>export let el = void 0;
2
+ let className = void 0;
3
+ export { className as class };
4
+ </script>
5
+
6
+ <nav class={className} bind:this={el} aria-label="breadcrumb" {...$$restProps}>
7
+ <slot />
8
+ </nav>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const __propDef: {
4
+ props: HTMLAttributes<HTMLElement> & {
5
+ el?: HTMLElement | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type BreadcrumbProps = typeof __propDef.props;
15
+ export type BreadcrumbEvents = typeof __propDef.events;
16
+ export type BreadcrumbSlots = typeof __propDef.slots;
17
+ export default class Breadcrumb extends SvelteComponent<BreadcrumbProps, BreadcrumbEvents, BreadcrumbSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,8 @@
1
+ import Root from "./breadcrumb.svelte";
2
+ import Ellipsis from "./breadcrumb-ellipsis.svelte";
3
+ import Item from "./breadcrumb-item.svelte";
4
+ import Separator from "./breadcrumb-separator.svelte";
5
+ import Link from "./breadcrumb-link.svelte";
6
+ import List from "./breadcrumb-list.svelte";
7
+ import Page from "./breadcrumb-page.svelte";
8
+ export { Root, Ellipsis, Item, Separator, Link, List, Page, Root as Breadcrumb, Ellipsis as BreadcrumbEllipsis, Item as BreadcrumbItem, Separator as BreadcrumbSeparator, Link as BreadcrumbLink, List as BreadcrumbList, Page as BreadcrumbPage, };
@@ -0,0 +1,10 @@
1
+ import Root from "./breadcrumb.svelte";
2
+ import Ellipsis from "./breadcrumb-ellipsis.svelte";
3
+ import Item from "./breadcrumb-item.svelte";
4
+ import Separator from "./breadcrumb-separator.svelte";
5
+ import Link from "./breadcrumb-link.svelte";
6
+ import List from "./breadcrumb-list.svelte";
7
+ import Page from "./breadcrumb-page.svelte";
8
+ export { Root, Ellipsis, Item, Separator, Link, List, Page,
9
+ //
10
+ Root as Breadcrumb, Ellipsis as BreadcrumbEllipsis, Item as BreadcrumbItem, Separator as BreadcrumbSeparator, Link as BreadcrumbLink, List as BreadcrumbList, Page as BreadcrumbPage, };
@@ -5,6 +5,7 @@ export { AspectRatio } from "./aspect-ratio/index.js";
5
5
  export * as Avatar from "./avatar/index.js";
6
6
  export { Badge, type Variant as BadgeVariant, badgeVariants } from "./badge/index.js";
7
7
  export { Button, type ButtonEvents, type ButtonProps, buttonVariants } from "./button/index.js";
8
+ export * as Breadcrumb from "./breadcrumb/index.js";
8
9
  export * as Calendar from "./calendar/index.js";
9
10
  export * as Card from "./card/index.js";
10
11
  export * as Carousel from "./carousel/index.js";
@@ -5,6 +5,7 @@ export { AspectRatio } from "./aspect-ratio/index.js";
5
5
  export * as Avatar from "./avatar/index.js";
6
6
  export { Badge, badgeVariants } from "./badge/index.js";
7
7
  export { Button, buttonVariants } from "./button/index.js";
8
+ export * as Breadcrumb from "./breadcrumb/index.js";
8
9
  export * as Calendar from "./calendar/index.js";
9
10
  export * as Card from "./card/index.js";
10
11
  export * as Carousel from "./carousel/index.js";
@@ -1,10 +1,10 @@
1
- <script>import MoreHorizontal from "lucide-svelte/icons/ellipsis";
2
- import { cn } from "../../../utils.js";
1
+ <script>import { cn } from "../../../utils.js";
2
+ import Ellipsis from "lucide-svelte/icons/ellipsis";
3
3
  let className = void 0;
4
4
  export { className as class };
5
5
  </script>
6
6
 
7
7
  <span aria-hidden class={cn("flex h-9 w-9 items-center justify-center", className)} {...$$restProps}>
8
- <MoreHorizontal class="h-4 w-4" />
8
+ <Ellipsis class="h-4 w-4" />
9
9
  <span class="sr-only">More pages</span>
10
10
  </span>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.7.2",
4
+ "version": "0.8.0",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -30,46 +30,48 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@internationalized/date": "^3.5.2",
33
- "bits-ui": "^0.19.5",
33
+ "bits-ui": "^0.19.7",
34
34
  "clsx": "^2.1.0",
35
35
  "cmdk-sv": "^0.0.15",
36
36
  "embla-carousel-svelte": "8.0.0",
37
37
  "formsnap": "^0.5.1",
38
- "lucide-svelte": "^0.354.0",
39
- "mode-watcher": "^0.2.2",
38
+ "lucide-svelte": "^0.358.0",
39
+ "mode-watcher": "^0.3.0",
40
40
  "paneforge": "^0.0.2",
41
41
  "svelte-headless-table": "^0.18.2",
42
42
  "svelte-sonner": "^0.3.19",
43
- "sveltekit-superforms": "^2.8.1",
44
- "tailwind-merge": "^2.2.1",
45
- "tailwind-variants": "^0.2.0",
46
- "vaul-svelte": "^0.2.4",
43
+ "sveltekit-superforms": "^2.10.1",
44
+ "tailwind-merge": "^2.2.2",
45
+ "tailwind-variants": "^0.2.1",
46
+ "vaul-svelte": "^0.3.0",
47
47
  "zod": "^3.22.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@playwright/test": "^1.42.1",
51
50
  "@sveltejs/adapter-auto": "^3.1.1",
52
- "@sveltejs/kit": "^2.5.3",
51
+ "@sveltejs/kit": "^2.5.4",
53
52
  "@sveltejs/package": "^2.3.0",
54
53
  "@sveltejs/vite-plugin-svelte": "^3.0.2",
55
- "@typescript-eslint/eslint-plugin": "^7.1.1",
56
- "@typescript-eslint/parser": "^7.1.1",
54
+ "@testing-library/jest-dom": "^6.4.2",
55
+ "@testing-library/svelte": "^4.1.0",
56
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
57
+ "@typescript-eslint/parser": "^7.2.0",
57
58
  "autoprefixer": "^10.4.18",
58
59
  "eslint": "^8.57.0",
59
60
  "eslint-config-prettier": "^9.1.0",
60
61
  "eslint-plugin-svelte": "^2.35.1",
61
- "postcss": "^8.4.35",
62
+ "happy-dom": "^13.9.0",
63
+ "postcss": "^8.4.36",
62
64
  "postcss-load-config": "^5.0.3",
63
65
  "prettier": "^3.2.5",
64
66
  "prettier-plugin-svelte": "^3.2.2",
65
67
  "publint": "^0.2.7",
66
68
  "svelte": "^4.2.12",
67
- "svelte-check": "^3.6.6",
69
+ "svelte-check": "^3.6.7",
68
70
  "tailwindcss": "^3.4.1",
69
71
  "tslib": "^2.6.2",
70
72
  "typescript": "^5.4.2",
71
- "vite": "^5.1.5",
72
- "vitest": "^1.3.1"
73
+ "vite": "^5.1.6",
74
+ "vitest": "^1.4.0"
73
75
  },
74
76
  "svelte": "./dist/index.js",
75
77
  "types": "./dist/index.d.ts",
@@ -80,12 +82,11 @@
80
82
  "build": "vite build && npm run package",
81
83
  "preview": "vite preview",
82
84
  "package": "svelte-kit sync && svelte-package && publint",
83
- "test": "npm run test:integration && npm run test:unit",
85
+ "test": "npm run test:unit",
84
86
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
85
87
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
86
88
  "lint": "prettier --check . && eslint .",
87
89
  "format": "prettier --write .",
88
- "test:integration": "playwright test",
89
90
  "test:unit": "vitest"
90
91
  }
91
92
  }