Skip to content

Commit

Permalink
fix: component docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed May 12, 2024
1 parent b6c920f commit 2f30e10
Show file tree
Hide file tree
Showing 300 changed files with 6,541 additions and 2,686 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-grapes-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-heros-v2": patch
---

fix: component docs
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"test:unit": "vitest",
"gen:exports": "svelte-lib-helpers exports",
"copy:packagejson": "svelte-lib-helpers package",
"gen:docs5": "svelte-lib-helpers docs5FromType",
"gen:docs5": "svelte-lib-helpers docs5",
"gen:docs5FromType": "svelte-lib-helpers docs5FromType",
"lib-helpers": "npm run gen:docs5 && npm run package && npm run gen:exports && npm run copy:packagejson"
},
"devDependencies": {
Expand Down Expand Up @@ -64,7 +65,7 @@
"svelte": "5.0.0-next.130",
"svelte-5-ui-lib": "^0.4.12",
"svelte-check": "^3.7.1",
"svelte-lib-helpers": "^0.4.5",
"svelte-lib-helpers": "^0.4.6",
"svelte-preprocess": "^5.1.4",
"svelte-rune-highlight": "^0.5.9",
"tailwind-merge": "^2.3.0",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 22 additions & 9 deletions src/lib/AcademicCap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
variation = ctx.variation || "outline",
strokeWidth = ctx.strokeWidth || '1.5',
withEvents = ctx.withEvents || false,
title = {},
desc = {},
title,
desc,
class: classname,
ariaLabel = "academic cap",
onclick,
Expand All @@ -51,8 +51,8 @@
...restProps
}: Props = $props();
let ariaDescribedby = `${title.id || ''} ${desc.id || ''}`;
const hasDescription = $derived(!!(title.id || desc.id));
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
let viewBox: string = $state('');
$effect(() => {
Expand Down Expand Up @@ -87,10 +87,10 @@
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -117,10 +117,10 @@
{viewBox}
stroke-width={strokeWidth}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -139,5 +139,18 @@
@component
[Go to docs](https://svelte-heros-v2.codewithshin.com/)
## Props
@props:
@prop size = ctx.size || '24'
@prop role = ctx.role || 'img'
@prop color = ctx.color || 'currentColor'
@prop variation = ctx.variation || "outline"
@prop strokeWidth = ctx.strokeWidth || '1.5'
@prop withEvents = ctx.withEvents || false
@prop title
@prop desc
@prop class: classname
@prop ariaLabel = "academic cap"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop ...restProps
-->
31 changes: 22 additions & 9 deletions src/lib/AdjustmentsHorizontal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
variation = ctx.variation || "outline",
strokeWidth = ctx.strokeWidth || '1.5',
withEvents = ctx.withEvents || false,
title = {},
desc = {},
title,
desc,
class: classname,
ariaLabel = "adjustments horizontal",
onclick,
Expand All @@ -51,8 +51,8 @@
...restProps
}: Props = $props();
let ariaDescribedby = `${title.id || ''} ${desc.id || ''}`;
const hasDescription = $derived(!!(title.id || desc.id));
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
let viewBox: string = $state('');
$effect(() => {
Expand Down Expand Up @@ -87,10 +87,10 @@
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -117,10 +117,10 @@
{viewBox}
stroke-width={strokeWidth}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -139,5 +139,18 @@
@component
[Go to docs](https://svelte-heros-v2.codewithshin.com/)
## Props
@props:
@prop size = ctx.size || '24'
@prop role = ctx.role || 'img'
@prop color = ctx.color || 'currentColor'
@prop variation = ctx.variation || "outline"
@prop strokeWidth = ctx.strokeWidth || '1.5'
@prop withEvents = ctx.withEvents || false
@prop title
@prop desc
@prop class: classname
@prop ariaLabel = "adjustments horizontal"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop ...restProps
-->
31 changes: 22 additions & 9 deletions src/lib/AdjustmentsVertical.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
variation = ctx.variation || "outline",
strokeWidth = ctx.strokeWidth || '1.5',
withEvents = ctx.withEvents || false,
title = {},
desc = {},
title,
desc,
class: classname,
ariaLabel = "adjustments vertical",
onclick,
Expand All @@ -51,8 +51,8 @@
...restProps
}: Props = $props();
let ariaDescribedby = `${title.id || ''} ${desc.id || ''}`;
const hasDescription = $derived(!!(title.id || desc.id));
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
let viewBox: string = $state('');
$effect(() => {
Expand Down Expand Up @@ -87,10 +87,10 @@
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -117,10 +117,10 @@
{viewBox}
stroke-width={strokeWidth}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -139,5 +139,18 @@
@component
[Go to docs](https://svelte-heros-v2.codewithshin.com/)
## Props
@props:
@prop size = ctx.size || '24'
@prop role = ctx.role || 'img'
@prop color = ctx.color || 'currentColor'
@prop variation = ctx.variation || "outline"
@prop strokeWidth = ctx.strokeWidth || '1.5'
@prop withEvents = ctx.withEvents || false
@prop title
@prop desc
@prop class: classname
@prop ariaLabel = "adjustments vertical"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop ...restProps
-->
31 changes: 22 additions & 9 deletions src/lib/ArchiveBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
variation = ctx.variation || "outline",
strokeWidth = ctx.strokeWidth || '1.5',
withEvents = ctx.withEvents || false,
title = {},
desc = {},
title,
desc,
class: classname,
ariaLabel = "archive box",
onclick,
Expand All @@ -51,8 +51,8 @@
...restProps
}: Props = $props();
let ariaDescribedby = `${title.id || ''} ${desc.id || ''}`;
const hasDescription = $derived(!!(title.id || desc.id));
let ariaDescribedby = `${title?.id || ''} ${desc?.id || ''}`;
const hasDescription = $derived(!!(title?.id || desc?.id));
let viewBox: string = $state('');
$effect(() => {
Expand Down Expand Up @@ -87,10 +87,10 @@
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -117,10 +117,10 @@
{viewBox}
stroke-width={strokeWidth}
>
{#if title.id && title.title}
{#if title?.id && title.title}
<title id="{title.id}">{title.title}</title>
{/if}
{#if desc.id && desc.desc}
{#if desc?.id && desc.desc}
<desc id="{desc.id}">{desc.desc}</desc>
{/if}
{#if variation === 'outline'}
Expand All @@ -139,5 +139,18 @@
@component
[Go to docs](https://svelte-heros-v2.codewithshin.com/)
## Props
@props:
@prop size = ctx.size || '24'
@prop role = ctx.role || 'img'
@prop color = ctx.color || 'currentColor'
@prop variation = ctx.variation || "outline"
@prop strokeWidth = ctx.strokeWidth || '1.5'
@prop withEvents = ctx.withEvents || false
@prop title
@prop desc
@prop class: classname
@prop ariaLabel = "archive box"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop ...restProps
-->
Loading

0 comments on commit 2f30e10

Please sign in to comment.