Skip to content

Commit d99454d

Browse files
committed
types: move all type to types.ts
1 parent 295ab42 commit d99454d

File tree

589 files changed

+1276
-14454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

589 files changed

+1276
-14454
lines changed

.changeset/giant-keys-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'flowbite-svelte-icons': patch
3+
---
4+
5+
types: move all type to types.ts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"gen:exports": "svelte-lib-helpers exports",
3535
"copy:packagejson": "svelte-lib-helpers package",
3636
"gen:docs5": "svelte-lib-helpers docs5",
37-
"lib-helpers": "npm run format && npm run gen:docs5 && npm run package && npm run gen:exports && npm run copy:packagejson"
37+
"lib-helpers": "pnpm format && pnpm gen:docs5 && pnpm package && pnpm gen:exports && pnpm copy:packagejson"
3838
},
3939
"devDependencies": {
4040
"@changesets/cli": "^2.27.9",

src/lib/AddColumnAfterOutline.svelte

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
4+
import type { OutlineBaseProps, OutlineProps } from './types';
55
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
strokeWidth?: string | undefined | null;
19-
class?: string | undefined | null;
20-
}
21-
22-
interface Props extends BaseProps {
23-
title?: TitleType;
24-
desc?: DescType;
25-
ariaLabel?: string;
26-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27-
}
28-
29-
const ctx: BaseProps = getContext('iconCtx') ?? {};
6+
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
307
const sizes = {
318
xs: 'w-3 h-3',
329
sm: 'w-4 h-4',
@@ -44,7 +21,7 @@
4421
class: className,
4522
ariaLabel = 'add column after outline',
4623
...restProps
47-
}: Props = $props();
24+
}: OutlineProps = $props();
4825
4926
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
5027
const hasDescription = $derived(!!(title?.id || desc?.id));

src/lib/AddColumnBeforeOutline.svelte

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
4+
import type { OutlineBaseProps, OutlineProps } from './types';
55
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
strokeWidth?: string | undefined | null;
19-
class?: string | undefined | null;
20-
}
21-
22-
interface Props extends BaseProps {
23-
title?: TitleType;
24-
desc?: DescType;
25-
ariaLabel?: string;
26-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27-
}
28-
29-
const ctx: BaseProps = getContext('iconCtx') ?? {};
6+
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
307
const sizes = {
318
xs: 'w-3 h-3',
329
sm: 'w-4 h-4',
@@ -44,7 +21,7 @@
4421
class: className,
4522
ariaLabel = 'add column before outline',
4623
...restProps
47-
}: Props = $props();
24+
}: OutlineProps = $props();
4825
4926
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
5027
const hasDescription = $derived(!!(title?.id || desc?.id));

src/lib/AddressBookOutline.svelte

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
4+
import type { OutlineBaseProps, OutlineProps } from './types';
55
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
strokeWidth?: string | undefined | null;
19-
class?: string | undefined | null;
20-
}
21-
22-
interface Props extends BaseProps {
23-
title?: TitleType;
24-
desc?: DescType;
25-
ariaLabel?: string;
26-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27-
}
28-
29-
const ctx: BaseProps = getContext('iconCtx') ?? {};
6+
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
307
const sizes = {
318
xs: 'w-3 h-3',
329
sm: 'w-4 h-4',
@@ -44,7 +21,7 @@
4421
class: className,
4522
ariaLabel = 'address book outline',
4623
...restProps
47-
}: Props = $props();
24+
}: OutlineProps = $props();
4825
4926
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
5027
const hasDescription = $derived(!!(title?.id || desc?.id));

src/lib/AddressBookSolid.svelte

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
5-
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
class?: string | undefined | null;
19-
}
20-
21-
interface Props extends BaseProps {
22-
title?: TitleType;
23-
desc?: DescType;
24-
ariaLabel?: string;
25-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
26-
}
4+
import type { BaseProps, Props } from './types';
275
286
const ctx: BaseProps = getContext('iconCtx') ?? {};
297
const sizes = {

src/lib/AdjustmentsHorizontalOutline.svelte

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
4+
import type { OutlineBaseProps, OutlineProps } from './types';
55
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
strokeWidth?: string | undefined | null;
19-
class?: string | undefined | null;
20-
}
21-
22-
interface Props extends BaseProps {
23-
title?: TitleType;
24-
desc?: DescType;
25-
ariaLabel?: string;
26-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27-
}
28-
29-
const ctx: BaseProps = getContext('iconCtx') ?? {};
6+
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
307
const sizes = {
318
xs: 'w-3 h-3',
329
sm: 'w-4 h-4',
@@ -44,7 +21,7 @@
4421
class: className,
4522
ariaLabel = 'adjustments horizontal outline',
4623
...restProps
47-
}: Props = $props();
24+
}: OutlineProps = $props();
4825
4926
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
5027
const hasDescription = $derived(!!(title?.id || desc?.id));

src/lib/AdjustmentsHorizontalSolid.svelte

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
5-
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
class?: string | undefined | null;
19-
}
20-
21-
interface Props extends BaseProps {
22-
title?: TitleType;
23-
desc?: DescType;
24-
ariaLabel?: string;
25-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
26-
}
4+
import type { BaseProps, Props } from './types';
275
286
const ctx: BaseProps = getContext('iconCtx') ?? {};
297
const sizes = {

src/lib/AdjustmentsVerticalOutline.svelte

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
4+
import type { OutlineBaseProps, OutlineProps } from './types';
55
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
strokeWidth?: string | undefined | null;
19-
class?: string | undefined | null;
20-
}
21-
22-
interface Props extends BaseProps {
23-
title?: TitleType;
24-
desc?: DescType;
25-
ariaLabel?: string;
26-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27-
}
28-
29-
const ctx: BaseProps = getContext('iconCtx') ?? {};
6+
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
307
const sizes = {
318
xs: 'w-3 h-3',
329
sm: 'w-4 h-4',
@@ -44,7 +21,7 @@
4421
class: className,
4522
ariaLabel = 'adjustments vertical outline',
4623
...restProps
47-
}: Props = $props();
24+
}: OutlineProps = $props();
4825
4926
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
5027
const hasDescription = $derived(!!(title?.id || desc?.id));

src/lib/AdjustmentsVerticalSolid.svelte

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
<script lang="ts">
22
import { getContext } from 'svelte';
33
import { twMerge } from 'tailwind-merge';
4-
import type { SVGAttributes } from 'svelte/elements';
5-
6-
type TitleType = {
7-
id?: string;
8-
title?: string;
9-
};
10-
type DescType = {
11-
id?: string;
12-
desc?: string;
13-
};
14-
15-
interface BaseProps extends SVGAttributes<SVGElement> {
16-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17-
color?: string | undefined | null;
18-
class?: string | undefined | null;
19-
}
20-
21-
interface Props extends BaseProps {
22-
title?: TitleType;
23-
desc?: DescType;
24-
ariaLabel?: string;
25-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
26-
}
4+
import type { BaseProps, Props } from './types';
275
286
const ctx: BaseProps = getContext('iconCtx') ?? {};
297
const sizes = {

0 commit comments

Comments
 (0)