@kayord/ui 0.12.22 → 0.12.24

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.
@@ -27,6 +27,7 @@
27
27
  enableVisibility?: boolean;
28
28
  enableFullscreen?: boolean;
29
29
  class?: string;
30
+ headerClass?: string;
30
31
  disableUISorting?: boolean;
31
32
  }
32
33
 
@@ -44,6 +45,7 @@
44
45
  enableVisibility = false,
45
46
  enableFullscreen = false,
46
47
  class: className,
48
+ headerClass,
47
49
  disableUISorting = false,
48
50
  }: Props<T> = $props();
49
51
 
@@ -65,6 +67,7 @@
65
67
  onCheckedChange: () => r.row.toggleSelected(),
66
68
  }),
67
69
  enableResizing: false,
70
+ enableSorting: false,
68
71
  };
69
72
  columns.unshift(rowSelectionColumn);
70
73
  }
@@ -73,10 +76,11 @@
73
76
  <div
74
77
  class={cn(
75
78
  "w-full",
76
- tableStore.isFullscreen ? "absolute left-0 top-0 z-10 h-screen bg-background transition-all" : "w-full"
79
+ tableStore.isFullscreen ? "absolute left-0 top-0 z-10 h-screen bg-background transition-all" : "w-full",
80
+ className
77
81
  )}
78
82
  >
79
- <div class={cn(className)}>
83
+ <div class={cn(headerClass)}>
80
84
  {#if header}
81
85
  {@render header()}
82
86
  {:else}
@@ -1,22 +1,24 @@
1
+ type Props<T> = {
2
+ table: TableType<T>;
3
+ columns: ColumnDef<T>[];
4
+ isLoading?: boolean;
5
+ header?: Snippet;
6
+ subHeader?: Snippet;
7
+ footer?: Snippet;
8
+ leftToolbar?: Snippet;
9
+ rightToolbar?: Snippet;
10
+ noDataMessage?: string;
11
+ hideHeader?: boolean;
12
+ enableVisibility?: boolean;
13
+ enableFullscreen?: boolean;
14
+ class?: string;
15
+ headerClass?: string;
16
+ disableUISorting?: boolean;
17
+ };
1
18
  import { type ColumnDef, type Table as TableType } from "@tanstack/table-core";
2
19
  import type { Snippet } from "svelte";
3
20
  declare class __sveltets_Render<T> {
4
- props(): {
5
- table: TableType<T>;
6
- columns: ColumnDef<T>[];
7
- isLoading?: boolean;
8
- header?: Snippet;
9
- subHeader?: Snippet;
10
- footer?: Snippet;
11
- leftToolbar?: Snippet;
12
- rightToolbar?: Snippet;
13
- noDataMessage?: string;
14
- hideHeader?: boolean;
15
- enableVisibility?: boolean;
16
- enableFullscreen?: boolean;
17
- class?: string;
18
- disableUISorting?: boolean;
19
- };
21
+ props(): Props<T>;
20
22
  events(): {};
21
23
  slots(): {};
22
24
  bindings(): "";
@@ -1,5 +1,6 @@
1
- declare const DataTableActions: import("svelte").Component<{
1
+ type Props = {
2
2
  id: string;
3
- }, {}, "">;
3
+ };
4
+ declare const DataTableActions: import("svelte").Component<Props, {}, "">;
4
5
  type DataTableActions = ReturnType<typeof DataTableActions>;
5
6
  export default DataTableActions;
@@ -12,4 +12,4 @@
12
12
  let { checked, class: className, ...rest }: Props = $props();
13
13
  </script>
14
14
 
15
- <Checkbox bind:checked class={cn(className)} {...rest} />
15
+ <Checkbox bind:checked class={cn("rounded-[5px]", className)} {...rest} />
@@ -1,7 +1,10 @@
1
- declare const DataTableCheckbox: import("svelte").Component<Omit<Omit<import("bits-ui").CheckboxRootProps, "child">, "children"> & {
1
+ type Props = ComponentProps<typeof Checkbox> & {
2
2
  checked?: boolean;
3
3
  indeterminate?: boolean;
4
4
  class?: string;
5
- }, {}, "">;
5
+ };
6
+ import { Checkbox } from "../../ui/checkbox";
7
+ import type { ComponentProps } from "svelte";
8
+ declare const DataTableCheckbox: import("svelte").Component<Props, {}, "">;
6
9
  type DataTableCheckbox = ReturnType<typeof DataTableCheckbox>;
7
10
  export default DataTableCheckbox;
@@ -21,7 +21,7 @@
21
21
  {#if !header.isPlaceholder}
22
22
  <div class="flex items-center gap-1">
23
23
  <FlexRender content={header.column.columnDef.header} context={header.getContext()} />
24
- {#if isSortingEnabled}
24
+ {#if isSortingEnabled && header.column.getCanSort()}
25
25
  <button onclick={header.column.getToggleSortingHandler()}>
26
26
  {#if header.column.getIsSorted() == "asc"}
27
27
  <ArrowDownIcon class="size-4" />
@@ -1,10 +1,11 @@
1
+ type Props<T> = {
2
+ header: Header<T, unknown>;
3
+ table: TypeType<T>;
4
+ disableUISorting?: boolean;
5
+ };
1
6
  import { type Header, type Table as TypeType } from "@tanstack/table-core";
2
7
  declare class __sveltets_Render<T> {
3
- props(): {
4
- header: Header<T, unknown>;
5
- table: TypeType<T>;
6
- disableUISorting?: boolean;
7
- };
8
+ props(): Props<T>;
8
9
  events(): {};
9
10
  slots(): {};
10
11
  bindings(): "";
@@ -1,9 +1,10 @@
1
+ type Props<T> = {
2
+ table: Table<T>;
3
+ canChangePageSize?: boolean;
4
+ };
1
5
  import type { Table } from "@tanstack/table-core";
2
6
  declare class __sveltets_Render<T> {
3
- props(): {
4
- table: Table<T>;
5
- canChangePageSize?: boolean;
6
- };
7
+ props(): Props<T>;
7
8
  events(): {};
8
9
  slots(): {};
9
10
  bindings(): "";
@@ -1,8 +1,9 @@
1
+ type Props<T> = {
2
+ table: Table<T>;
3
+ };
1
4
  import type { Table } from "@tanstack/table-core";
2
5
  declare class __sveltets_Render<T> {
3
- props(): {
4
- table: Table<T>;
5
- };
6
+ props(): Props<T>;
6
7
  events(): {};
7
8
  slots(): {};
8
9
  bindings(): "";
@@ -1,18 +1,14 @@
1
- declare const Loader: import("svelte").Component<{
1
+ type LoaderIconProps = Omit<ComponentProps<Icon>, "iconNode"> & {
2
+ isLoading?: boolean;
3
+ };
4
+ type Props = {
2
5
  class?: string | undefined | null;
3
6
  isLoading?: boolean;
4
- iconProps?: Omit<{
5
- [x: string]: any;
6
- name?: string | undefined;
7
- color?: string;
8
- size?: number | string;
9
- strokeWidth?: number | string;
10
- absoluteStrokeWidth?: boolean;
11
- iconNode?: import("lucide-svelte").IconNode;
12
- }, "iconNode"> & {
13
- isLoading?: boolean;
14
- };
15
- }, {
7
+ iconProps?: LoaderIconProps;
8
+ };
9
+ import type { ComponentProps } from "svelte";
10
+ import { type Icon } from "lucide-svelte";
11
+ declare const Loader: import("svelte").Component<Props, {
16
12
  class: string | null | undefined;
17
13
  }, "">;
18
14
  type Loader = ReturnType<typeof Loader>;
@@ -1,7 +1,8 @@
1
- import { type ProgressRootProps } from "bits-ui";
2
- declare const ProgressLoading: import("svelte").Component<{
3
- [key: string]: any;
1
+ type Props = {
4
2
  class?: ProgressRootProps["class"];
5
- }, {}, "">;
3
+ [key: string]: any;
4
+ };
5
+ import { type ProgressRootProps } from "bits-ui";
6
+ declare const ProgressLoading: import("svelte").Component<Props, {}, "">;
6
7
  type ProgressLoading = ReturnType<typeof ProgressLoading>;
7
8
  export default ProgressLoading;
@@ -1,5 +1,6 @@
1
- declare const ThemeSwitch: import("svelte").Component<{
1
+ type Props = {
2
2
  class?: string | undefined | null;
3
- }, {}, "">;
3
+ };
4
+ declare const ThemeSwitch: import("svelte").Component<Props, {}, "">;
4
5
  type ThemeSwitch = ReturnType<typeof ThemeSwitch>;
5
6
  export default ThemeSwitch;
@@ -50,11 +50,11 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
50
50
  };
51
51
  }>, unknown, unknown, undefined>>;
52
52
  export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
53
- import type { HTMLAnchorAttributes } from "svelte/elements";
54
- declare const Badge: import("svelte").Component<HTMLAnchorAttributes & {
55
- ref?: HTMLElement | null | undefined;
56
- } & {
53
+ type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
57
54
  variant?: BadgeVariant;
58
- }, {}, "ref">;
55
+ };
56
+ import type { WithElementRef } from "bits-ui";
57
+ import type { HTMLAnchorAttributes } from "svelte/elements";
58
+ declare const Badge: import("svelte").Component<$$ComponentProps, {}, "ref">;
59
59
  type Badge = ReturnType<typeof Badge>;
60
60
  export default Badge;
@@ -1,11 +1,11 @@
1
- import type { HTMLAnchorAttributes } from "svelte/elements";
2
- import type { Snippet } from "svelte";
3
- declare const BreadcrumbLink: import("svelte").Component<HTMLAnchorAttributes & {
4
- ref?: HTMLElement | null | undefined;
5
- } & {
1
+ type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
6
2
  child?: Snippet<[{
7
3
  props: HTMLAnchorAttributes;
8
4
  }]>;
9
- }, {}, "ref">;
5
+ };
6
+ import type { HTMLAnchorAttributes } from "svelte/elements";
7
+ import type { Snippet } from "svelte";
8
+ import type { WithElementRef } from "bits-ui";
9
+ declare const BreadcrumbLink: import("svelte").Component<$$ComponentProps, {}, "ref">;
10
10
  type BreadcrumbLink = ReturnType<typeof BreadcrumbLink>;
11
11
  export default BreadcrumbLink;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.12.22",
4
+ "version": "0.12.24",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -34,46 +34,46 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@internationalized/date": "^3.5.6",
37
- "bits-ui": "1.0.0-next.52",
37
+ "bits-ui": "1.0.0-next.59",
38
38
  "clsx": "^2.1.1",
39
- "embla-carousel-svelte": "8.3.1",
39
+ "embla-carousel-svelte": "8.4.0",
40
40
  "formsnap": "2.0.0-next.1",
41
41
  "mode-watcher": "^0.4.1",
42
42
  "paneforge": "1.0.0-next.1",
43
43
  "svelte-sonner": "^0.3.28",
44
44
  "tailwind-merge": "^2.5.4",
45
45
  "tailwind-variants": "^0.3.0",
46
- "vaul-svelte": "1.0.0-next.2"
46
+ "vaul-svelte": "1.0.0-next.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@kayord/tw-plugin": "^1.0.3",
50
50
  "@sveltejs/adapter-auto": "^3.3.1",
51
- "@sveltejs/kit": "^2.8.0",
51
+ "@sveltejs/kit": "^2.8.1",
52
52
  "@sveltejs/package": "^2.3.7",
53
- "@sveltejs/vite-plugin-svelte": "^4.0.0",
53
+ "@sveltejs/vite-plugin-svelte": "^4.0.1",
54
54
  "@testing-library/jest-dom": "^6.6.3",
55
55
  "@testing-library/svelte": "^5.2.4",
56
- "@typescript-eslint/eslint-plugin": "^8.14.0",
57
- "@typescript-eslint/parser": "^8.14.0",
56
+ "@typescript-eslint/eslint-plugin": "^8.15.0",
57
+ "@typescript-eslint/parser": "^8.15.0",
58
58
  "autoprefixer": "^10.4.20",
59
- "eslint": "^9.14.0",
59
+ "eslint": "^9.15.0",
60
60
  "eslint-config-prettier": "^9.1.0",
61
61
  "eslint-plugin-svelte": "^2.46.0",
62
- "happy-dom": "^15.11.4",
63
- "lucide-svelte": "^0.456.0",
62
+ "happy-dom": "^15.11.6",
63
+ "lucide-svelte": "^0.460.1",
64
64
  "postcss": "^8.4.49",
65
65
  "prettier": "^3.3.3",
66
66
  "prettier-plugin-svelte": "^3.2.8",
67
67
  "prettier-plugin-tailwindcss": "^0.6.8",
68
68
  "publint": "^0.2.12",
69
- "svelte": "^5.1.16",
70
- "svelte-check": "^4.0.7",
71
- "tailwindcss": "^3.4.14",
69
+ "svelte": "^5.2.3",
70
+ "svelte-check": "^4.0.9",
71
+ "tailwindcss": "^3.4.15",
72
72
  "tailwindcss-animate": "^1.0.7",
73
73
  "tslib": "^2.8.1",
74
74
  "typescript": "^5.6.3",
75
75
  "vite": "^5.4.11",
76
- "vitest": "^2.1.4",
76
+ "vitest": "^2.1.5",
77
77
  "zod": "^3.23.8"
78
78
  },
79
79
  "svelte": "./dist/index.js",