negodesign 0.0.58 → 0.0.59
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.
- package/dist/components/core/grid/data/types.d.ts +2 -0
- package/dist/components/core/grid/ui/01/Grid01.svelte +5 -4
- package/dist/components/core/grid/ui/02/Grid02.svelte +4 -3
- package/dist/components/core/grid/ui/PanelGrid.svelte +3 -3
- package/dist/components/core/grid/ui/SimpleGrid.svelte +3 -3
- package/dist/components/core/grid/ui/shared/DescriptionGrid.svelte +7 -1
- package/dist/components/core/grid/ui/shared/DescriptionGrid.svelte.d.ts +1 -0
- package/dist/components/core/grid/ui/shared/IconRenderGrid.svelte +6 -1
- package/dist/components/core/grid/ui/shared/IconRenderGrid.svelte.d.ts +1 -0
- package/dist/components/core/grid/ui/shared/TitleGrid.svelte +9 -1
- package/dist/components/core/grid/ui/shared/TitleGrid.svelte.d.ts +1 -0
- package/dist/globals.css +15 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import type { IconSvgElement } from "@hugeicons/svelte";
|
|
|
2
2
|
export interface ItemGridProps {
|
|
3
3
|
id?: string | number;
|
|
4
4
|
title: string;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
description?: string;
|
|
6
7
|
titleClass?: string;
|
|
7
8
|
descriptionClass?: string;
|
|
@@ -12,5 +13,6 @@ export interface GridProps {
|
|
|
12
13
|
items?: ItemGridProps[];
|
|
13
14
|
className?: string;
|
|
14
15
|
variant?: 1 | 2;
|
|
16
|
+
isLoading?: boolean;
|
|
15
17
|
onClick?: (id: string | number) => void;
|
|
16
18
|
}
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
id,
|
|
9
9
|
icon,
|
|
10
10
|
title,
|
|
11
|
-
|
|
11
|
+
isLoading,
|
|
12
12
|
titleClass,
|
|
13
|
+
description,
|
|
13
14
|
descriptionClass,
|
|
14
15
|
onClick,
|
|
15
16
|
}: ItemGridProps = $props();
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
}}
|
|
22
23
|
class="flex flex-col justify-center items-center gap-2"
|
|
23
24
|
>
|
|
24
|
-
<IconRenderGrid {icon} />
|
|
25
|
-
<TitleGrid {titleClass} {title} />
|
|
26
|
-
<DescriptionGrid {descriptionClass} {description} />
|
|
25
|
+
<IconRenderGrid {icon} {isLoading} />
|
|
26
|
+
<TitleGrid {titleClass} {title} {isLoading} />
|
|
27
|
+
<DescriptionGrid {descriptionClass} {description} {isLoading} />
|
|
27
28
|
</button>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
id,
|
|
9
9
|
icon,
|
|
10
10
|
title,
|
|
11
|
+
isLoading,
|
|
11
12
|
description,
|
|
12
13
|
titleClass,
|
|
13
14
|
descriptionClass,
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
}}
|
|
22
23
|
class="flex flex-col justify-center items-center gap-2 border rounded-lg p-2 cursor-pointer"
|
|
23
24
|
>
|
|
24
|
-
<IconRenderGrid {icon} />
|
|
25
|
-
<TitleGrid {titleClass} {title} />
|
|
26
|
-
<DescriptionGrid {descriptionClass} {description} />
|
|
25
|
+
<IconRenderGrid {icon} {isLoading} />
|
|
26
|
+
<TitleGrid {titleClass} {title} {isLoading} />
|
|
27
|
+
<DescriptionGrid {descriptionClass} {description} {isLoading} />
|
|
27
28
|
</button>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import Grid02 from "./02/Grid02.svelte";
|
|
5
5
|
import Grid01 from "./01/Grid01.svelte";
|
|
6
6
|
|
|
7
|
-
let { variant, className,
|
|
7
|
+
let { variant, className, isLoading, items, onClick }: GridProps = $props();
|
|
8
8
|
|
|
9
9
|
const styleMobile = "flex justify-between overflow-x-auto no-scrollbar";
|
|
10
10
|
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
>
|
|
20
20
|
{#each items as item, i (i)}
|
|
21
21
|
{#if variant == 2}
|
|
22
|
-
<Grid02 {...item} {onClick} />
|
|
22
|
+
<Grid02 {...item} {onClick} {isLoading} />
|
|
23
23
|
{:else}
|
|
24
|
-
<Grid01 {...item} {onClick} />
|
|
24
|
+
<Grid01 {...item} {onClick} {isLoading} />
|
|
25
25
|
{/if}
|
|
26
26
|
{/each}
|
|
27
27
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import Grid02 from "./02/Grid02.svelte";
|
|
5
5
|
import Grid01 from "./01/Grid01.svelte";
|
|
6
6
|
|
|
7
|
-
let { variant, className, items }: GridProps = $props();
|
|
7
|
+
let { variant, className, isLoading, items }: GridProps = $props();
|
|
8
8
|
|
|
9
9
|
const styleMobile = "flex justify-between overflow-x-auto no-scrollbar";
|
|
10
10
|
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
>
|
|
28
28
|
{#each items as item, i (i)}
|
|
29
29
|
{#if variant == 2}
|
|
30
|
-
<Grid02 {...item} />
|
|
30
|
+
<Grid02 {...item} {isLoading} />
|
|
31
31
|
{:else}
|
|
32
|
-
<Grid01 {...item} />
|
|
32
|
+
<Grid01 {...item} {isLoading} />
|
|
33
33
|
{/if}
|
|
34
34
|
{/each}
|
|
35
35
|
</div>
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
3
|
+
|
|
2
4
|
let {
|
|
5
|
+
isLoading,
|
|
3
6
|
description,
|
|
4
7
|
descriptionClass,
|
|
5
8
|
}: {
|
|
9
|
+
isLoading?: boolean;
|
|
6
10
|
description?: string;
|
|
7
11
|
descriptionClass?: string;
|
|
8
12
|
} = $props();
|
|
9
13
|
</script>
|
|
10
14
|
|
|
11
|
-
{#if
|
|
15
|
+
{#if isLoading}
|
|
16
|
+
<Skeleton class="w-full h-2.5 bg-gray-500/95" />
|
|
17
|
+
{:else if description}
|
|
12
18
|
<p
|
|
13
19
|
class="{descriptionClass} text-center min-w-48 md:w-52 lg:w-56 text-muted-foreground line-clamp-2 md:line-clamp-3"
|
|
14
20
|
>
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
|
|
2
3
|
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
4
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
4
5
|
|
|
5
6
|
let {
|
|
6
7
|
icon,
|
|
8
|
+
isLoading,
|
|
7
9
|
}: {
|
|
8
10
|
icon: string | IconSvgElement;
|
|
11
|
+
isLoading?: boolean;
|
|
9
12
|
} = $props();
|
|
10
13
|
</script>
|
|
11
14
|
|
|
12
|
-
{#if
|
|
15
|
+
{#if isLoading}
|
|
16
|
+
<Skeleton class="min-w-17.5 md:min-w-25 h-2.5 bg-gray-400" />
|
|
17
|
+
{:else if typeof icon === "string"}
|
|
13
18
|
<i class="{icon} text-4xl md:text-6xl"></i>
|
|
14
19
|
{:else}
|
|
15
20
|
<HugeiconsIcon {icon} class="size-8 md:size-10" />
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
2
2
|
type $$ComponentProps = {
|
|
3
3
|
icon: string | IconSvgElement;
|
|
4
|
+
isLoading?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare const IconRenderGrid: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
7
|
type IconRenderGrid = ReturnType<typeof IconRenderGrid>;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { Skeleton } from "../../../../ui/skeleton";
|
|
3
|
+
|
|
2
4
|
let {
|
|
5
|
+
isLoading,
|
|
3
6
|
title,
|
|
4
7
|
titleClass,
|
|
5
8
|
}: {
|
|
9
|
+
isLoading?: boolean;
|
|
6
10
|
title?: string;
|
|
7
11
|
titleClass?: string;
|
|
8
12
|
} = $props();
|
|
9
13
|
</script>
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
{#if isLoading}
|
|
16
|
+
<Skeleton class="w-full h-12.5 bg-gray-500/95" />
|
|
17
|
+
{:else}
|
|
18
|
+
<p class={titleClass}>{title}</p>
|
|
19
|
+
{/if}
|
package/dist/globals.css
CHANGED
|
@@ -768,6 +768,9 @@
|
|
|
768
768
|
.h-2 {
|
|
769
769
|
height: calc(var(--spacing) * 2);
|
|
770
770
|
}
|
|
771
|
+
.h-2\.5 {
|
|
772
|
+
height: calc(var(--spacing) * 2.5);
|
|
773
|
+
}
|
|
771
774
|
.h-3 {
|
|
772
775
|
height: calc(var(--spacing) * 3);
|
|
773
776
|
}
|
|
@@ -1104,6 +1107,9 @@
|
|
|
1104
1107
|
.min-w-5 {
|
|
1105
1108
|
min-width: calc(var(--spacing) * 5);
|
|
1106
1109
|
}
|
|
1110
|
+
.min-w-17\.5 {
|
|
1111
|
+
min-width: calc(var(--spacing) * 17.5);
|
|
1112
|
+
}
|
|
1107
1113
|
.min-w-25 {
|
|
1108
1114
|
min-width: calc(var(--spacing) * 25);
|
|
1109
1115
|
}
|
|
@@ -1828,6 +1834,12 @@
|
|
|
1828
1834
|
background-color: color-mix(in oklab, var(--color-gray-500) 90%, transparent);
|
|
1829
1835
|
}
|
|
1830
1836
|
}
|
|
1837
|
+
.bg-gray-500\/95 {
|
|
1838
|
+
background-color: color-mix(in srgb, oklch(55.1% 0.027 264.364) 95%, transparent);
|
|
1839
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1840
|
+
background-color: color-mix(in oklab, var(--color-gray-500) 95%, transparent);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1831
1843
|
.bg-gray-800\/50 {
|
|
1832
1844
|
background-color: color-mix(in srgb, oklch(27.8% 0.033 256.848) 50%, transparent);
|
|
1833
1845
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -4368,6 +4380,9 @@
|
|
|
4368
4380
|
.md\:max-w-md {
|
|
4369
4381
|
max-width: var(--container-md);
|
|
4370
4382
|
}
|
|
4383
|
+
.md\:min-w-25 {
|
|
4384
|
+
min-width: calc(var(--spacing) * 25);
|
|
4385
|
+
}
|
|
4371
4386
|
.md\:min-w-32 {
|
|
4372
4387
|
min-width: calc(var(--spacing) * 32);
|
|
4373
4388
|
}
|