@kayord/ui 1.0.10 → 1.0.11
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.
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type RowData, type RowModel, type Table, type TableOptions
|
|
1
|
+
import { type RowData, type RowModel, type Table, type TableOptions } from "@tanstack/table-core";
|
|
2
2
|
interface ShadTableOptions<TData extends RowData> extends Omit<TableOptions<TData>, "getCoreRowModel"> {
|
|
3
3
|
getCoreRowModel?: (table: Table<any>) => () => RowModel<any>;
|
|
4
4
|
enablePaging?: boolean;
|
|
5
5
|
enableVisibility?: boolean;
|
|
6
6
|
enableRowSelectionUI?: boolean;
|
|
7
|
-
defaultState?: Partial<TableState>;
|
|
8
7
|
}
|
|
9
8
|
export declare function createShadTable<TData extends RowData>(shadOptions: ShadTableOptions<TData>): Table<TData>;
|
|
10
9
|
export {};
|
|
@@ -176,10 +176,6 @@ export function createShadTable(shadOptions) {
|
|
|
176
176
|
}, options);
|
|
177
177
|
const table = createTable(resolvedOptions);
|
|
178
178
|
let state = $state(table.initialState);
|
|
179
|
-
// DefaultState
|
|
180
|
-
if (shadOptions.defaultState) {
|
|
181
|
-
state = { ...state, ...shadOptions.defaultState };
|
|
182
|
-
}
|
|
183
179
|
const updateOptions = (table, state) => {
|
|
184
180
|
table.setOptions((prev) => {
|
|
185
181
|
return mergeObjects(prev, options, {
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
import { Avatar as AvatarPrimitive } from "bits-ui";
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
loadingStatus = $bindable("loading"),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: AvatarPrimitive.RootProps = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<AvatarPrimitive.Root
|
|
9
14
|
bind:ref
|
|
15
|
+
bind:loadingStatus
|
|
10
16
|
data-slot="avatar"
|
|
11
17
|
class={cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className)}
|
|
12
18
|
{...restProps}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Avatar as AvatarPrimitive } from "bits-ui";
|
|
2
|
-
declare const Avatar: import("svelte").Component<AvatarPrimitive.RootProps, {}, "ref">;
|
|
2
|
+
declare const Avatar: import("svelte").Component<AvatarPrimitive.RootProps, {}, "ref" | "loadingStatus">;
|
|
3
3
|
type Avatar = ReturnType<typeof Avatar>;
|
|
4
4
|
export default Avatar;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.11",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@lucide/svelte": "^0.523.0",
|
|
51
51
|
"@sveltejs/adapter-auto": "^6.0.1",
|
|
52
|
-
"@sveltejs/kit": "^2.22.
|
|
53
|
-
"@sveltejs/package": "^2.3.
|
|
52
|
+
"@sveltejs/kit": "^2.22.1",
|
|
53
|
+
"@sveltejs/package": "^2.3.12",
|
|
54
54
|
"@sveltejs/vite-plugin-svelte": "^5.1.0",
|
|
55
55
|
"@tailwindcss/vite": "^4.1.10",
|
|
56
56
|
"@testing-library/jest-dom": "^6.6.3",
|