@kayord/ui 0.9.0 → 0.9.1

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.
@@ -3,20 +3,25 @@
3
3
  import { cn } from "../../../utils";
4
4
  import { type Icon } from "lucide-svelte";
5
5
  import LoaderCircleIcon from "lucide-svelte/icons/loader-circle";
6
- import { fade } from "svelte/transition";
6
+ import { scale } from "svelte/transition";
7
7
 
8
8
  interface LoaderIconProps extends Omit<ComponentProps<Icon>, "iconNode"> {
9
9
  isLoading?: boolean;
10
10
  }
11
11
 
12
- type $$Props = LoaderIconProps;
13
- let className: $$Props["class"] = undefined;
14
- export let isLoading: $$Props["isLoading"] = true;
15
12
  export { className as class };
13
+
14
+ interface Props {
15
+ class?: string | undefined | null;
16
+ isLoading?: boolean;
17
+ iconProps?: LoaderIconProps;
18
+ }
19
+
20
+ let { class: className = undefined, isLoading, iconProps }: Props = $props();
16
21
  </script>
17
22
 
18
23
  {#if isLoading}
19
- <div class="flex justify-center" in:fade={{ delay: 150, duration: 400 }} out:fade={{ duration: 0 }}>
20
- <LoaderCircleIcon class={cn("h-8 w-8 animate-spin m-2", className)} {...$$restProps} />
24
+ <div class="flex justify-center" in:scale={{ duration: 350 }} out:scale={{ duration: 200 }}>
25
+ <LoaderCircleIcon class={cn("h-8 w-8 animate-spin m-2", className)} {...iconProps} />
21
26
  </div>
22
27
  {/if}
@@ -9,18 +9,24 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
9
9
  }): Exports;
10
10
  z_$$bindings?: Bindings;
11
11
  }
12
- declare const Loader: $$__sveltets_2_IsomorphicComponent<Omit<{
13
- [x: string]: any;
14
- name?: string | undefined;
15
- color?: string | undefined;
16
- size?: string | number | undefined;
17
- strokeWidth?: string | number | undefined;
18
- absoluteStrokeWidth?: boolean | undefined;
19
- iconNode?: import("lucide-svelte").IconNode | undefined;
20
- }, "iconNode"> & {
12
+ declare const Loader: $$__sveltets_2_IsomorphicComponent<{
13
+ class?: string | undefined | null;
21
14
  isLoading?: boolean | undefined;
15
+ iconProps?: (Omit<{
16
+ [x: string]: any;
17
+ name?: string | undefined;
18
+ color?: string | undefined;
19
+ size?: string | number | undefined;
20
+ strokeWidth?: string | number | undefined;
21
+ absoluteStrokeWidth?: boolean | undefined;
22
+ iconNode?: import("lucide-svelte").IconNode | undefined;
23
+ }, "iconNode"> & {
24
+ isLoading?: boolean | undefined;
25
+ }) | undefined;
22
26
  }, {
23
27
  [evt: string]: CustomEvent<any>;
24
- }, {}, Record<string, any>, string>;
28
+ }, {}, {
29
+ class: string | null | undefined;
30
+ }, "">;
25
31
  type Loader = InstanceType<typeof Loader>;
26
32
  export default Loader;
@@ -4,11 +4,14 @@
4
4
  import Sun from "lucide-svelte/icons/sun";
5
5
  import { cn } from "../../../utils";
6
6
 
7
- let className: string | undefined | null = undefined;
8
- export { className as class };
7
+ interface Props {
8
+ class?: string | undefined | null;
9
+ }
10
+
11
+ let { class: className = undefined }: Props = $props();
9
12
  </script>
10
13
 
11
- <button on:click={toggleMode} class={cn("text-primary", className)}>
14
+ <button onclick={toggleMode} class={cn("text-primary", className)}>
12
15
  {#if $mode == "dark"}
13
16
  <Moon />
14
17
  {:else}
@@ -13,6 +13,6 @@ declare const ThemeSwitch: $$__sveltets_2_IsomorphicComponent<{
13
13
  class?: string | undefined | null;
14
14
  }, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, Record<string, any>, string>;
16
+ }, {}, Record<string, any>, "">;
17
17
  type ThemeSwitch = InstanceType<typeof ThemeSwitch>;
18
18
  export default ThemeSwitch;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.9.0",
4
+ "version": "0.9.1",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",