@kayord/ui 0.3.4 → 0.3.5

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,4 +1,5 @@
1
1
  <script>import { ArrowDown, ArrowUp } from "lucide-svelte";
2
+ import { fade } from "svelte/transition";
2
3
  import { Button, ProgressLoading, Skeleton } from "../../..";
3
4
  import { Subscribe, Render } from "svelte-headless-table";
4
5
  import * as Table from "../../ui/table";
@@ -19,6 +20,13 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
19
20
 
20
21
  <div class="w-full">
21
22
  <div class="rounded-md border m-2">
23
+ {#if isLoading}
24
+ <span in:fade={{ duration: 300 }}>
25
+ <ProgressLoading class="h-1" />
26
+ </span>
27
+ {:else}
28
+ <div class="h-1"></div>
29
+ {/if}
22
30
  {#if $$slots.header || title.length > 0}
23
31
  <div class="rounded-t-md overflow-hidden">
24
32
  {#if $$slots.header}
@@ -33,9 +41,6 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
33
41
  {#if $$slots.subHeader}
34
42
  <slot name="subHeader" />
35
43
  {/if}
36
- {#if isLoading}
37
- <ProgressLoading class="h-1" />
38
- {/if}
39
44
  <Table.Root {...$tableAttrs} class="table-auto">
40
45
  {#if !hideHeader}
41
46
  <Table.Header>
@@ -68,7 +73,7 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
68
73
  </Table.Header>
69
74
  {/if}
70
75
  <Table.Body {...$tableBodyAttrs}>
71
- {#if isLoading}
76
+ {#if isLoading && $rows.length == 0}
72
77
  {#each { length: 5 } as _, i}
73
78
  <Table.Row>
74
79
  {#each flatColumns as cell}
@@ -102,6 +107,11 @@ const pageSize = isPagingEnabled ? pluginStates.page.pageSize : void 0;
102
107
  {/if}
103
108
  </Table.Body>
104
109
  </Table.Root>
110
+ {#if isLoading}
111
+ <span in:fade={{ duration: 300 }}>
112
+ <ProgressLoading class="h-1" />
113
+ </span>
114
+ {/if}
105
115
  </div>
106
116
  {#if isPagingEnabled}
107
117
  <Pagination.Root count={serverItemCount ?? $rows.length} perPage={$pageSize} let:pages let:currentPage>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.3.4",
4
+ "version": "0.3.5",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "clsx": "^2.1.0",
35
35
  "cmdk-sv": "^0.0.13",
36
36
  "formsnap": "^0.4.2",
37
- "lucide-svelte": "^0.309.0",
37
+ "lucide-svelte": "^0.312.0",
38
38
  "mode-watcher": "^0.1.2",
39
39
  "svelte-headless-table": "^0.18.1",
40
40
  "svelte-sonner": "^0.3.11",
@@ -45,29 +45,29 @@
45
45
  "zod": "^3.22.4"
46
46
  },
47
47
  "devDependencies": {
48
- "@playwright/test": "^1.40.1",
48
+ "@playwright/test": "^1.41.0",
49
49
  "@sveltejs/adapter-auto": "^3.1.0",
50
- "@sveltejs/kit": "^2.3.2",
51
- "@sveltejs/package": "^2.2.5",
50
+ "@sveltejs/kit": "^2.3.3",
51
+ "@sveltejs/package": "^2.2.6",
52
52
  "@sveltejs/vite-plugin-svelte": "^3.0.1",
53
53
  "@typescript-eslint/eslint-plugin": "^6.19.0",
54
54
  "@typescript-eslint/parser": "^6.19.0",
55
- "autoprefixer": "^10.4.16",
55
+ "autoprefixer": "^10.4.17",
56
56
  "eslint": "^8.56.0",
57
57
  "eslint-config-prettier": "^9.1.0",
58
58
  "eslint-plugin-svelte": "^2.35.1",
59
59
  "postcss": "^8.4.33",
60
60
  "postcss-load-config": "^5.0.2",
61
- "prettier": "^3.2.2",
61
+ "prettier": "^3.2.4",
62
62
  "prettier-plugin-svelte": "^3.1.2",
63
63
  "publint": "^0.2.7",
64
- "svelte": "^4.2.8",
64
+ "svelte": "^4.2.9",
65
65
  "svelte-check": "^3.6.3",
66
66
  "tailwindcss": "^3.4.1",
67
67
  "tslib": "^2.6.2",
68
68
  "typescript": "^5.3.3",
69
69
  "vite": "^5.0.11",
70
- "vitest": "^1.2.0"
70
+ "vitest": "^1.2.1"
71
71
  },
72
72
  "svelte": "./dist/index.js",
73
73
  "types": "./dist/index.d.ts",