Skip to content

Commit

Permalink
types: move all type to types.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed Oct 14, 2024
1 parent 295ab42 commit d99454d
Show file tree
Hide file tree
Showing 589 changed files with 1,276 additions and 14,454 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-keys-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'flowbite-svelte-icons': patch
---

types: move all type to types.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"gen:exports": "svelte-lib-helpers exports",
"copy:packagejson": "svelte-lib-helpers package",
"gen:docs5": "svelte-lib-helpers docs5",
"lib-helpers": "npm run format && npm run gen:docs5 && npm run package && npm run gen:exports && npm run copy:packagejson"
"lib-helpers": "pnpm format && pnpm gen:docs5 && pnpm package && pnpm gen:exports && pnpm copy:packagejson"
},
"devDependencies": {
"@changesets/cli": "^2.27.9",
Expand Down
29 changes: 3 additions & 26 deletions src/lib/AddColumnAfterOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
import type { OutlineBaseProps, OutlineProps } from './types';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
strokeWidth?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
const ctx: BaseProps = getContext('iconCtx') ?? {};
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
const sizes = {
xs: 'w-3 h-3',
sm: 'w-4 h-4',
Expand All @@ -44,7 +21,7 @@
class: className,
ariaLabel = 'add column after outline',
...restProps
}: Props = $props();
}: OutlineProps = $props();
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
Expand Down
29 changes: 3 additions & 26 deletions src/lib/AddColumnBeforeOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
import type { OutlineBaseProps, OutlineProps } from './types';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
strokeWidth?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
const ctx: BaseProps = getContext('iconCtx') ?? {};
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
const sizes = {
xs: 'w-3 h-3',
sm: 'w-4 h-4',
Expand All @@ -44,7 +21,7 @@
class: className,
ariaLabel = 'add column before outline',
...restProps
}: Props = $props();
}: OutlineProps = $props();
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
Expand Down
29 changes: 3 additions & 26 deletions src/lib/AddressBookOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
import type { OutlineBaseProps, OutlineProps } from './types';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
strokeWidth?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
const ctx: BaseProps = getContext('iconCtx') ?? {};
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
const sizes = {
xs: 'w-3 h-3',
sm: 'w-4 h-4',
Expand All @@ -44,7 +21,7 @@
class: className,
ariaLabel = 'address book outline',
...restProps
}: Props = $props();
}: OutlineProps = $props();
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
Expand Down
24 changes: 1 addition & 23 deletions src/lib/AddressBookSolid.svelte
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
import type { BaseProps, Props } from './types';
const ctx: BaseProps = getContext('iconCtx') ?? {};
const sizes = {
Expand Down
29 changes: 3 additions & 26 deletions src/lib/AdjustmentsHorizontalOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
import type { OutlineBaseProps, OutlineProps } from './types';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
strokeWidth?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
const ctx: BaseProps = getContext('iconCtx') ?? {};
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
const sizes = {
xs: 'w-3 h-3',
sm: 'w-4 h-4',
Expand All @@ -44,7 +21,7 @@
class: className,
ariaLabel = 'adjustments horizontal outline',
...restProps
}: Props = $props();
}: OutlineProps = $props();
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
Expand Down
24 changes: 1 addition & 23 deletions src/lib/AdjustmentsHorizontalSolid.svelte
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
import type { BaseProps, Props } from './types';
const ctx: BaseProps = getContext('iconCtx') ?? {};
const sizes = {
Expand Down
29 changes: 3 additions & 26 deletions src/lib/AdjustmentsVerticalOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
import type { OutlineBaseProps, OutlineProps } from './types';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
strokeWidth?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
const ctx: BaseProps = getContext('iconCtx') ?? {};
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
const sizes = {
xs: 'w-3 h-3',
sm: 'w-4 h-4',
Expand All @@ -44,7 +21,7 @@
class: className,
ariaLabel = 'adjustments vertical outline',
...restProps
}: Props = $props();
}: OutlineProps = $props();
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
Expand Down
24 changes: 1 addition & 23 deletions src/lib/AdjustmentsVerticalSolid.svelte
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
import type { BaseProps, Props } from './types';
const ctx: BaseProps = getContext('iconCtx') ?? {};
const sizes = {
Expand Down
29 changes: 3 additions & 26 deletions src/lib/AlignCenterOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
import type { OutlineBaseProps, OutlineProps } from './types';
type TitleType = {
id?: string;
title?: string;
};
type DescType = {
id?: string;
desc?: string;
};
interface BaseProps extends SVGAttributes<SVGElement> {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: string | undefined | null;
strokeWidth?: string | undefined | null;
class?: string | undefined | null;
}
interface Props extends BaseProps {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
}
const ctx: BaseProps = getContext('iconCtx') ?? {};
const ctx: OutlineBaseProps = getContext('iconCtx') ?? {};
const sizes = {
xs: 'w-3 h-3',
sm: 'w-4 h-4',
Expand All @@ -44,7 +21,7 @@
class: className,
ariaLabel = 'align center outline',
...restProps
}: Props = $props();
}: OutlineProps = $props();
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
Expand Down
Loading

0 comments on commit d99454d

Please sign in to comment.