negodesign 0.0.61 → 0.0.63

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.
@@ -4,6 +4,7 @@ export interface ItemGridProps {
4
4
  title: string;
5
5
  isLoading?: boolean;
6
6
  description?: string;
7
+ iconClass?: string;
7
8
  titleClass?: string;
8
9
  descriptionClass?: string;
9
10
  icon: string | IconSvgElement;
@@ -9,6 +9,7 @@
9
9
  icon,
10
10
  title,
11
11
  isLoading,
12
+ iconClass,
12
13
  titleClass,
13
14
  description,
14
15
  descriptionClass,
@@ -20,9 +21,9 @@
20
21
  onclick={() => {
21
22
  if (id && onClick) onClick(id);
22
23
  }}
23
- class="flex flex-col justify-center items-center gap-2"
24
+ class="flex flex-col justify-center items-center gap-2 hover:bg-primary/30 rounded-xl"
24
25
  >
25
- <IconRenderGrid {icon} {isLoading} />
26
+ <IconRenderGrid {icon} {iconClass} {isLoading} />
26
27
  <TitleGrid {titleClass} {title} {isLoading} />
27
28
  <DescriptionGrid {descriptionClass} {description} {isLoading} />
28
29
  </button>
@@ -10,6 +10,7 @@
10
10
  title,
11
11
  isLoading,
12
12
  description,
13
+ iconClass,
13
14
  titleClass,
14
15
  descriptionClass,
15
16
  onClick,
@@ -20,9 +21,9 @@
20
21
  onclick={() => {
21
22
  if (id && onClick) onClick(id);
22
23
  }}
23
- class="flex flex-col justify-center items-center gap-2 border rounded-lg p-2 cursor-pointer"
24
+ class="flex flex-col justify-center items-center gap-2 border rounded-lg p-2 cursor-pointer hover:bg-primary/30"
24
25
  >
25
- <IconRenderGrid {icon} {isLoading} />
26
+ <IconRenderGrid {icon} {iconClass} {isLoading} />
26
27
  <TitleGrid {titleClass} {title} {isLoading} />
27
28
  <DescriptionGrid {descriptionClass} {description} {isLoading} />
28
29
  </button>
@@ -17,11 +17,21 @@
17
17
  : 'grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 max-h-237.5 overflow-y-auto'}
18
18
  {className}"
19
19
  >
20
- {#each items as item, i (i)}
21
- {#if variant == 2}
22
- <Grid02 {...item} {onClick} {isLoading} />
23
- {:else}
24
- <Grid01 {...item} {onClick} {isLoading} />
25
- {/if}
26
- {/each}
20
+ {#if isLoading}
21
+ {#each Array.from({ length: responsive.isMobile ? 3 : 10 }) as it, i (i)}
22
+ {#if variant == 2}
23
+ <Grid02 title={`${it}`} description="" icon="" {isLoading} />
24
+ {:else}
25
+ <Grid01 title={`${it}`} description="" icon="" {isLoading} />
26
+ {/if}
27
+ {/each}
28
+ {:else}
29
+ {#each items as item, i (i)}
30
+ {#if variant == 2}
31
+ <Grid02 {...item} {onClick} />
32
+ {:else}
33
+ <Grid01 {...item} {onClick} />
34
+ {/if}
35
+ {/each}
36
+ {/if}
27
37
  </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, isLoading, items }: GridProps = $props();
7
+ let { variant, className, isLoading, onClick, items }: GridProps = $props();
8
8
 
9
9
  const styleMobile = "flex justify-between overflow-x-auto no-scrollbar";
10
10
 
@@ -25,11 +25,21 @@
25
25
  <div
26
26
  class="{responsive.isMobile ? styleMobile : cols()} gap-4 my-2 {className}"
27
27
  >
28
- {#each items as item, i (i)}
29
- {#if variant == 2}
30
- <Grid02 {...item} {isLoading} />
31
- {:else}
32
- <Grid01 {...item} {isLoading} />
33
- {/if}
34
- {/each}
28
+ {#if isLoading}
29
+ {#each Array.from({ length: responsive.isMobile ? 3 : 10 }) as it, i (i)}
30
+ {#if variant == 2}
31
+ <Grid02 title={`${it}`} description="" icon="" {isLoading} />
32
+ {:else}
33
+ <Grid01 title={`${it}`} description="" icon="" {isLoading} />
34
+ {/if}
35
+ {/each}
36
+ {:else}
37
+ {#each items as item, i (i)}
38
+ {#if variant == 2}
39
+ <Grid02 {...item} {onClick} />
40
+ {:else}
41
+ <Grid01 {...item} {onClick} />
42
+ {/if}
43
+ {/each}
44
+ {/if}
35
45
  </div>
@@ -5,9 +5,11 @@
5
5
 
6
6
  let {
7
7
  icon,
8
+ iconClass,
8
9
  isLoading,
9
10
  }: {
10
11
  icon: string | IconSvgElement;
12
+ iconClass?: string;
11
13
  isLoading?: boolean;
12
14
  } = $props();
13
15
  </script>
@@ -15,7 +17,7 @@
15
17
  {#if isLoading}
16
18
  <Skeleton class="min-w-17.5 md:min-w-25 h-2.5 bg-gray-400" />
17
19
  {:else if typeof icon === "string"}
18
- <i class="{icon} text-4xl md:text-6xl"></i>
20
+ <i class="{icon} text-4xl md:text-6xl {iconClass}"></i>
19
21
  {:else}
20
- <HugeiconsIcon {icon} class="size-8 md:size-10" />
22
+ <HugeiconsIcon {icon} class="size-8 md:size-10 {iconClass}" />
21
23
  {/if}
@@ -1,6 +1,7 @@
1
1
  import type { IconSvgElement } from "@hugeicons/svelte";
2
2
  type $$ComponentProps = {
3
3
  icon: string | IconSvgElement;
4
+ iconClass?: string;
4
5
  isLoading?: boolean;
5
6
  };
6
7
  declare const IconRenderGrid: import("svelte").Component<$$ComponentProps, {}, "">;
package/dist/globals.css CHANGED
@@ -3353,6 +3353,14 @@
3353
3353
  .hover\:bg-neutral-800:hover {
3354
3354
  background-color: var(--color-neutral-800);
3355
3355
  }
3356
+ .hover\:bg-primary\/30:hover {
3357
+ background-color: var(--primary);
3358
+ }
3359
+ @supports (color: color-mix(in lab, red, red)) {
3360
+ .hover\:bg-primary\/30:hover {
3361
+ background-color: color-mix(in oklab, var(--primary) 30%, transparent);
3362
+ }
3363
+ }
3356
3364
  .hover\:bg-primary\/80:hover {
3357
3365
  background-color: var(--primary);
3358
3366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negodesign",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [