diff --git a/src/routes/examples/[component]/+page.svelte b/src/docs/components/DualThemeLayout.svelte similarity index 67% rename from src/routes/examples/[component]/+page.svelte rename to src/docs/components/DualThemeLayout.svelte index 0bac892..ab1d0e9 100644 --- a/src/routes/examples/[component]/+page.svelte +++ b/src/docs/components/DualThemeLayout.svelte @@ -1,8 +1,15 @@ - -
- - - Shapes - - -
- {#each shapes as shape} - - {/each} -
-
-
- - - - Colors - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Outline - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Ghost - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Hero - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Disabled - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Sizes - - -
- {#each sizes as size} -
- -
- {/each} -
-
-
- - - - Full width - - -
- {#each colors as color} -
- -
- {/each} -
-
-
-
diff --git a/src/docs/examples/CardExamples.svelte b/src/docs/examples/CardExamples.svelte deleted file mode 100644 index d3cf6db..0000000 --- a/src/docs/examples/CardExamples.svelte +++ /dev/null @@ -1,64 +0,0 @@ - - -
-
- - -

- Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi - ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus doloremque, - omnis, assumenda mollitia officia aliquid. -

-
-
- - - - Card with title - - -

- Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi - ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus doloremque, - omnis, assumenda mollitia officia aliquid. -

-
-
- - - - Card with title and footer - - -

- Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi - ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus doloremque, - omnis, assumenda mollitia officia aliquid. -

-
- Footer goes here -
- - - - Card with title, description, and footer - This is the description - - -

- Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi - ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus doloremque, - omnis, assumenda mollitia officia aliquid. -

-
- Footer -
-
-
diff --git a/src/docs/examples/CheckboxExamples.svelte b/src/docs/examples/CheckboxExamples.svelte deleted file mode 100644 index 798ea54..0000000 --- a/src/docs/examples/CheckboxExamples.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - -
- - - Colors - - -
- {#each colors as color} -
- - - -
- {/each} -
-
-
- - - - Sizes - - -
- {#each sizes as size} -
- - - -
- {/each} -
-
-
- - - - Shapes - - -
- {#each shapes as shape} -
- - - -
- {/each} -
-
-
-
diff --git a/src/docs/examples/Example.svelte b/src/docs/examples/Example.svelte deleted file mode 100644 index a08b098..0000000 --- a/src/docs/examples/Example.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -

Examples

-
- -{@render children()} diff --git a/src/docs/examples/IconButtonExamples.svelte b/src/docs/examples/IconButtonExamples.svelte deleted file mode 100644 index 5cef3ea..0000000 --- a/src/docs/examples/IconButtonExamples.svelte +++ /dev/null @@ -1,105 +0,0 @@ - - -
- - - Shapes - - -
- {#each shapes as shape} - - {/each} -
-
-
- - - - Colors - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Outline - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Ghost - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Hero - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Disabled - - -
- {#each colors as color} - - {/each} -
-
-
- - - - Sizes - - -
- {#each sizes as size} -
- -
- {/each} -
-
-
-
diff --git a/src/docs/examples/LogoExamples.svelte b/src/docs/examples/LogoExamples.svelte deleted file mode 100644 index 2b58762..0000000 --- a/src/docs/examples/LogoExamples.svelte +++ /dev/null @@ -1,64 +0,0 @@ - - -
- - - Logo - - -
- {#each sizes as size} -
- - - -
- {/each} -
-
-
- - - Icon - - - {#each sizes as size} -
- -
- {/each} -
-
- - - Inline - - - {#each sizes as size} -
- -
- {/each} -
-
- - - - Stacked - - - {#each sizes as size} -
- -
- {/each} -
-
-
diff --git a/src/docs/routes.ts b/src/docs/routes.ts deleted file mode 100644 index 7a44e0f..0000000 --- a/src/docs/routes.ts +++ /dev/null @@ -1,20 +0,0 @@ -import ButtonExamples from '$docs/examples/ButtonExamples.svelte'; -import CardExamples from '$docs/examples/CardExamples.svelte'; -import CheckboxExamples from '$docs/examples/CheckboxExamples.svelte'; -import LogoExamples from '$docs/examples/LogoExamples.svelte'; -import IconButtonExamples from '$docs/examples/IconButtonExamples.svelte'; -import type { Component } from 'svelte'; - -type Route = { - name: string; - link: string; - component: Component | Component<{ theme?: 'light' | 'dark' }>; -}; - -export const routes: Route[] = [ - { name: 'Button', link: '/examples/button', component: ButtonExamples }, - { name: 'Checkbox', link: '/examples/checkbox', component: CheckboxExamples }, - { name: 'Card', link: '/examples/card', component: CardExamples }, - { name: 'IconButton', link: '/examples/icon-button', component: IconButtonExamples }, - { name: 'Logo', link: '/examples/logo', component: LogoExamples }, -]; diff --git a/src/lib/components/Checkbox.svelte b/src/lib/components/Checkbox.svelte index 4793937..23334d8 100644 --- a/src/lib/components/Checkbox.svelte +++ b/src/lib/components/Checkbox.svelte @@ -40,30 +40,17 @@ }, size: { tiny: 'size-4', - small: 'size-6', - medium: 'size-8', - large: 'size-16', - giant: 'size-32', + small: 'size-5', + medium: 'size-6', + large: 'size-8', + giant: 'size-10', }, - }, - compoundVariants: [ - // - { size: 'tiny', shape: 'semi-round', class: 'rounded' }, - { size: 'small', shape: 'semi-round', class: 'rounded-md' }, - { size: 'large', shape: 'semi-round', class: 'rounded-xl' }, - { size: 'giant', shape: 'semi-round', class: 'rounded-2xl' }, - ], - }); - - const parent = tv({ - base: 'flex items-center justify-center text-current', - variants: { - size: { - tiny: 'size-4', - small: 'size-6', - medium: 'size-8', - large: 'size-16', - giant: 'size-32', + roundedSize: { + tiny: 'rounded-md', + small: 'rounded-md', + medium: 'rounded-md', + large: 'rounded-lg', + giant: 'rounded-xl', }, }, }); @@ -87,12 +74,15 @@ {#snippet children({ checked })} -
+
{#if checked === true} {:else if checked === 'indeterminate'} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2c6afd5..042752a 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,5 @@
diff --git a/src/routes/examples/[component]/+page.ts b/src/routes/examples/[component]/+page.ts deleted file mode 100644 index 1e1b350..0000000 --- a/src/routes/examples/[component]/+page.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { PageLoad } from './$types.js'; - -export const load = (({ params, url }) => { - return { - component: params.component, - link: url.pathname, - }; -}) satisfies PageLoad; diff --git a/src/routes/examples/button/+page.svelte b/src/routes/examples/button/+page.svelte new file mode 100644 index 0000000..07eaa5f --- /dev/null +++ b/src/routes/examples/button/+page.svelte @@ -0,0 +1,119 @@ + + + + {#snippet component()} +
+ + + Shapes + + +
+ {#each shapes as shape} + + {/each} +
+
+
+ + + + Colors + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Outline + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Ghost + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Hero + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Disabled + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Sizes + + +
+ {#each sizes as size} +
+ +
+ {/each} +
+
+
+ + + + Full width + + +
+ {#each colors as color} +
+ +
+ {/each} +
+
+
+
+ {/snippet} +
diff --git a/src/routes/examples/card/+page.svelte b/src/routes/examples/card/+page.svelte new file mode 100644 index 0000000..f6d717f --- /dev/null +++ b/src/routes/examples/card/+page.svelte @@ -0,0 +1,64 @@ + + + + {#snippet component()} +
+
+ + +

+ Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi + ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus + doloremque, omnis, assumenda mollitia officia aliquid. +

+
+
+ + + + Card with title + + +

+ Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi + ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus + doloremque, omnis, assumenda mollitia officia aliquid. +

+
+
+ + + + Card with title and footer + + +

+ Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi + ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus + doloremque, omnis, assumenda mollitia officia aliquid. +

+
+ Footer goes here +
+ + + + Card with title, description, and footer + This is the description + + +

+ Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quibusdam maxime illo sequi + ipsam possimus rem harum nostrum esse itaque vero blanditiis eius sit ducimus + doloremque, omnis, assumenda mollitia officia aliquid. +

+
+ Footer +
+
+
+ {/snippet} +
diff --git a/src/routes/examples/checkbox/+page.svelte b/src/routes/examples/checkbox/+page.svelte new file mode 100644 index 0000000..77770fb --- /dev/null +++ b/src/routes/examples/checkbox/+page.svelte @@ -0,0 +1,62 @@ + + + + {#snippet component()} +
+ + + Colors + + +
+ {#each colors as color} +
+ + + +
+ {/each} +
+
+
+ + + + Sizes + + +
+ {#each sizes as size} +
+ + + +
+ {/each} +
+
+
+ + + + Shapes + + +
+ {#each shapes as shape} +
+ + + +
+ {/each} +
+
+
+
+ {/snippet} +
diff --git a/src/routes/examples/icon-button/+page.svelte b/src/routes/examples/icon-button/+page.svelte new file mode 100644 index 0000000..e4e177f --- /dev/null +++ b/src/routes/examples/icon-button/+page.svelte @@ -0,0 +1,107 @@ + + + + {#snippet component()} +
+ + + Shapes + + +
+ {#each shapes as shape} + + {/each} +
+
+
+ + + + Colors + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Outline + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Ghost + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Hero + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Disabled + + +
+ {#each colors as color} + + {/each} +
+
+
+ + + + Sizes + + +
+ {#each sizes as size} +
+ +
+ {/each} +
+
+
+
+ {/snippet} +
diff --git a/src/routes/examples/logo/+page.svelte b/src/routes/examples/logo/+page.svelte new file mode 100644 index 0000000..2548e90 --- /dev/null +++ b/src/routes/examples/logo/+page.svelte @@ -0,0 +1,65 @@ + + + + {#snippet component({ theme })} +
+ + + Logo + + +
+ {#each sizes as size} +
+ + + +
+ {/each} +
+
+
+ + + Icon + + + {#each sizes as size} +
+ +
+ {/each} +
+
+ + + Inline + + + {#each sizes as size} +
+ +
+ {/each} +
+
+ + + + Stacked + + + {#each sizes as size} +
+ +
+ {/each} +
+
+
+ {/snippet} +