apps-docs 0.0.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.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # Astro Starter Kit: Basics
2
+
3
+ ```sh
4
+ bun create astro@latest -- --template basics
5
+ ```
6
+
7
+ > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
8
+
9
+ ## 🚀 Project Structure
10
+
11
+ Inside of your Astro project, you'll see the following folders and files:
12
+
13
+ ```text
14
+ /
15
+ ├── public/
16
+ │ └── favicon.svg
17
+ ├── src
18
+ │   ├── assets
19
+ │   │   └── astro.svg
20
+ │   ├── components
21
+ │   │   └── Welcome.astro
22
+ │   ├── layouts
23
+ │   │   └── Layout.astro
24
+ │   └── pages
25
+ │   └── index.astro
26
+ └── package.json
27
+ ```
28
+
29
+ To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
30
+
31
+ ## 🧞 Commands
32
+
33
+ All commands are run from the root of the project, from a terminal:
34
+
35
+ | Command | Action |
36
+ | :------------------------ | :----------------------------------------------- |
37
+ | `bun install` | Installs dependencies |
38
+ | `bun dev` | Starts local dev server at `localhost:4321` |
39
+ | `bun build` | Build your production site to `./dist/` |
40
+ | `bun preview` | Preview your build locally, before deploying |
41
+ | `bun astro ...` | Run CLI commands like `astro add`, `astro check` |
42
+ | `bun astro -- --help` | Get help using the Astro CLI |
43
+
44
+ ## 👀 Want to learn more?
45
+
46
+ Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
@@ -0,0 +1,31 @@
1
+ // @ts-check
2
+ import { defineConfig } from "astro/config";
3
+ import svelte from "@astrojs/svelte";
4
+ import mdx from "@astrojs/mdx";
5
+ import tailwindcss from "@tailwindcss/vite";
6
+ import { fileURLToPath } from "url";
7
+ import path from "path";
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+
12
+ export default defineConfig({
13
+ integrations: [svelte(), mdx()],
14
+ vite: {
15
+ plugins: [tailwindcss()],
16
+ ssr: {
17
+ noExternal: ["@kori-ui/svelte", "@kori-ui/utilities", "@kori-ui/styles"]
18
+ },
19
+ server: {
20
+ fs: {
21
+ allow: [path.resolve(__dirname, "../../")]
22
+ }
23
+ },
24
+ resolve: {
25
+ alias: {
26
+ "@examples": path.resolve(__dirname, "./src/examples"),
27
+ "@components": path.resolve(__dirname, "./src/components")
28
+ }
29
+ }
30
+ }
31
+ });
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "apps-docs",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "scripts": {
6
+ "dev": "astro dev",
7
+ "build": "astro build",
8
+ "preview": "astro preview",
9
+ "astro": "astro"
10
+ },
11
+ "dependencies": {
12
+ "@astrojs/mdx": "^4.3.13",
13
+ "@astrojs/svelte": "^7.2.5",
14
+ "@kori-ui/styles": "^0.0.2-alpha.1",
15
+ "@kori-ui/svelte": "^0.0.2-alpha.1",
16
+ "@tailwindcss/vite": "^4.1.18",
17
+ "astro": "^5.16.11",
18
+ "svelte": "^5.46.4",
19
+ "tailwindcss": "^4.1.18",
20
+ "typescript": "^5.9.3"
21
+ },
22
+ "devDependencies": {
23
+ "svelte-preprocess": "^6.0.3"
24
+ }
25
+ }
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
2
+ <path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
3
+ <style>
4
+ path { fill: #000; }
5
+ @media (prefers-color-scheme: dark) {
6
+ path { fill: #FFF; }
7
+ }
8
+ </style>
9
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" width="115" height="48"><path fill="#17191E" d="M7.77 36.35C6.4 35.11 6 32.51 6.57 30.62c.99 1.2 2.35 1.57 3.75 1.78 2.18.33 4.31.2 6.33-.78.23-.12.44-.27.7-.42.18.55.23 1.1.17 1.67a4.56 4.56 0 0 1-1.94 3.23c-.43.32-.9.61-1.34.91-1.38.94-1.76 2.03-1.24 3.62l.05.17a3.63 3.63 0 0 1-1.6-1.38 3.87 3.87 0 0 1-.63-2.1c0-.37 0-.74-.05-1.1-.13-.9-.55-1.3-1.33-1.32a1.56 1.56 0 0 0-1.63 1.26c0 .06-.03.12-.05.2Z"/><path fill="url(#a)" d="M7.77 36.35C6.4 35.11 6 32.51 6.57 30.62c.99 1.2 2.35 1.57 3.75 1.78 2.18.33 4.31.2 6.33-.78.23-.12.44-.27.7-.42.18.55.23 1.1.17 1.67a4.56 4.56 0 0 1-1.94 3.23c-.43.32-.9.61-1.34.91-1.38.94-1.76 2.03-1.24 3.62l.05.17a3.63 3.63 0 0 1-1.6-1.38 3.87 3.87 0 0 1-.63-2.1c0-.37 0-.74-.05-1.1-.13-.9-.55-1.3-1.33-1.32a1.56 1.56 0 0 0-1.63 1.26c0 .06-.03.12-.05.2Z"/><path fill="#17191E" d="M.02 30.31s4.02-1.95 8.05-1.95l3.04-9.4c.11-.45.44-.76.82-.76.37 0 .7.31.82.76l3.04 9.4c4.77 0 8.05 1.95 8.05 1.95L17 11.71c-.2-.56-.53-.91-.98-.91H7.83c-.44 0-.76.35-.97.9L.02 30.31Zm42.37-5.97c0 1.64-2.05 2.62-4.88 2.62-1.85 0-2.5-.45-2.5-1.41 0-1 .8-1.49 2.65-1.49 1.67 0 3.09.03 4.73.23v.05Zm.03-2.04a21.37 21.37 0 0 0-4.37-.36c-5.32 0-7.82 1.25-7.82 4.18 0 3.04 1.71 4.2 5.68 4.2 3.35 0 5.63-.84 6.46-2.92h.14c-.03.5-.05 1-.05 1.4 0 1.07.18 1.16 1.06 1.16h4.15a16.9 16.9 0 0 1-.36-4c0-1.67.06-2.93.06-4.62 0-3.45-2.07-5.64-8.56-5.64-2.8 0-5.9.48-8.26 1.19.22.93.54 2.83.7 4.06 2.04-.96 4.95-1.37 7.2-1.37 3.11 0 3.97.71 3.97 2.15v.57Zm11.37 3c-.56.07-1.33.07-2.12.07-.83 0-1.6-.03-2.12-.1l-.02.58c0 2.85 1.87 4.52 8.45 4.52 6.2 0 8.2-1.64 8.2-4.55 0-2.74-1.33-4.09-7.2-4.39-4.58-.2-4.99-.7-4.99-1.28 0-.66.59-1 3.65-1 3.18 0 4.03.43 4.03 1.35v.2a46.13 46.13 0 0 1 4.24.03l.02-.55c0-3.36-2.8-4.46-8.2-4.46-6.08 0-8.13 1.49-8.13 4.39 0 2.6 1.64 4.23 7.48 4.48 4.3.14 4.77.62 4.77 1.28 0 .7-.7 1.03-3.71 1.03-3.47 0-4.35-.48-4.35-1.47v-.13Zm19.82-12.05a17.5 17.5 0 0 1-6.24 3.48c.03.84.03 2.4.03 3.24l1.5.02c-.02 1.63-.04 3.6-.04 4.9 0 3.04 1.6 5.32 6.58 5.32 2.1 0 3.5-.23 5.23-.6a43.77 43.77 0 0 1-.46-4.13c-1.03.34-2.34.53-3.78.53-2 0-2.82-.55-2.82-2.13 0-1.37 0-2.65.03-3.84 2.57.02 5.13.07 6.64.11-.02-1.18.03-2.9.1-4.04-2.2.04-4.65.07-6.68.07l.07-2.93h-.16Zm13.46 6.04a767.33 767.33 0 0 1 .07-3.18H82.6c.07 1.96.07 3.98.07 6.92 0 2.95-.03 4.99-.07 6.93h5.18c-.09-1.37-.11-3.68-.11-5.65 0-3.1 1.26-4 4.12-4 1.33 0 2.28.16 3.1.46.03-1.16.26-3.43.4-4.43-.86-.25-1.81-.41-2.96-.41-2.46-.03-4.26.98-5.1 3.38l-.17-.02Zm22.55 3.65c0 2.5-1.8 3.66-4.64 3.66-2.81 0-4.61-1.1-4.61-3.66s1.82-3.52 4.61-3.52c2.82 0 4.64 1.03 4.64 3.52Zm4.71-.11c0-4.96-3.87-7.18-9.35-7.18-5.5 0-9.23 2.22-9.23 7.18 0 4.94 3.49 7.59 9.21 7.59 5.77 0 9.37-2.65 9.37-7.6Z"/><defs><linearGradient id="a" x1="6.33" x2="19.43" y1="40.8" y2="34.6" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1440" height="1024" fill="none"><path fill="url(#a)" fill-rule="evenodd" d="M-217.58 475.75c91.82-72.02 225.52-29.38 341.2-44.74C240 415.56 372.33 315.14 466.77 384.9c102.9 76.02 44.74 246.76 90.31 366.31 29.83 78.24 90.48 136.14 129.48 210.23 57.92 109.99 169.67 208.23 155.9 331.77-13.52 121.26-103.42 264.33-224.23 281.37-141.96 20.03-232.72-220.96-374.06-196.99-151.7 25.73-172.68 330.24-325.85 315.72-128.6-12.2-110.9-230.73-128.15-358.76-12.16-90.14 65.87-176.25 44.1-264.57-26.42-107.2-167.12-163.46-176.72-273.45-10.15-116.29 33.01-248.75 124.87-320.79Z" clip-rule="evenodd" style="opacity:.154"/><path fill="url(#b)" fill-rule="evenodd" d="M1103.43 115.43c146.42-19.45 275.33-155.84 413.5-103.59 188.09 71.13 409 212.64 407.06 413.88-1.94 201.25-259.28 278.6-414.96 405.96-130 106.35-240.24 294.39-405.6 265.3-163.7-28.8-161.93-274.12-284.34-386.66-134.95-124.06-436-101.46-445.82-284.6-9.68-180.38 247.41-246.3 413.54-316.9 101.01-42.93 207.83 21.06 316.62 6.61Z" clip-rule="evenodd" style="opacity:.154"/><defs><linearGradient id="b" x1="373" x2="1995.44" y1="1100" y2="118.03" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient><linearGradient id="a" x1="107.37" x2="1130.66" y1="1993.35" y2="1026.31" gradientUnits="userSpaceOnUse"><stop stop-color="#3245FF"/><stop offset="1" stop-color="#BC52EE"/></linearGradient></defs></svg>
@@ -0,0 +1,66 @@
1
+ ---
2
+ import { Code } from 'astro:components';
3
+
4
+ interface Props {
5
+ code: string;
6
+ }
7
+
8
+ const { code } = Astro.props;
9
+ ---
10
+
11
+ <div class="relative flex flex-col overflow-hidden rounded-xl border border-zinc-900 bg-zinc-950 my-6 group/example">
12
+ <button
13
+ class="copy-button absolute top-3 right-3 z-20 p-2 rounded-lg border border-zinc-800 bg-zinc-950 text-zinc-400 opacity-0 group-hover/example:opacity-100 transition-all hover:bg-zinc-900 hover:text-white"
14
+ data-code={code}
15
+ title="Copy code"
16
+ >
17
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="copy-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>
18
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="check-icon hidden text-green-500"><polyline points="20 6 9 17 4 12"></polyline></svg>
19
+ </button>
20
+
21
+ <div class="flex min-h-[200px] items-center justify-center p-12 bg-[radial-gradient(#18181b_1px,transparent_1px)] [background-size:20px_20px]">
22
+ <slot />
23
+ </div>
24
+
25
+ <details class="border-t border-zinc-900 bg-zinc-900/20">
26
+ <summary class="flex items-center justify-end px-4 py-2 cursor-pointer list-none select-none">
27
+ <span class="text-[10px] uppercase tracking-widest text-zinc-500 hover:text-white transition-colors font-bold">
28
+ View Code
29
+ </span>
30
+ </summary>
31
+ <div class="p-4 bg-[#0d1117] border-t border-zinc-900 overflow-hidden text-sm code-container">
32
+ <Code code={code} lang="svelte" theme="github-dark" />
33
+ </div>
34
+ </details>
35
+ </div>
36
+
37
+ <script>
38
+ const copyButtons = document.querySelectorAll('.copy-button');
39
+
40
+ copyButtons.forEach(button => {
41
+ button.addEventListener('click', () => {
42
+ const code = button.getAttribute('data-code');
43
+ const copyIcon = button.querySelector('.copy-icon');
44
+ const checkIcon = button.querySelector('.check-icon');
45
+
46
+ if (code) {
47
+ navigator.clipboard.writeText(code).then(() => {
48
+ copyIcon?.classList.add('hidden');
49
+ checkIcon?.classList.remove('hidden');
50
+
51
+ setTimeout(() => {
52
+ copyIcon?.classList.remove('hidden');
53
+ checkIcon?.classList.add('hidden');
54
+ }, 2000);
55
+ });
56
+ }
57
+ });
58
+ });
59
+ </script>
60
+
61
+ <style is:global>
62
+ @reference "../styles/global.css";
63
+ .code-container pre {
64
+ @apply text-sm !m-0 !bg-transparent !p-0 !border-none !shadow-none !ring-0 !leading-relaxed;
65
+ }
66
+ </style>
@@ -0,0 +1,65 @@
1
+ <script lang="ts">
2
+ import { Button } from "@kori-ui/svelte";
3
+
4
+ interface Props {
5
+ githubUrl?: string;
6
+ styleUrl?: string;
7
+ }
8
+
9
+ let { githubUrl = "https://github.com/jaftdelgado/kori-ui", styleUrl }: Props = $props();
10
+
11
+ const openLink = (url: string) => {
12
+ window.open(url, "_blank", "noopener,noreferrer");
13
+ };
14
+ </script>
15
+
16
+ <div class="flex flex-wrap gap-3 my-6">
17
+ {#if githubUrl}
18
+ <Button variant="secondary" size="sm" onclick={() => openLink(githubUrl)}>
19
+ <span class="flex items-center gap-2">
20
+ <svg
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ width="14"
23
+ height="14"
24
+ viewBox="0 0 24 24"
25
+ fill="none"
26
+ stroke="currentColor"
27
+ stroke-width="2"
28
+ stroke-linecap="round"
29
+ stroke-linejoin="round"
30
+ ><path
31
+ d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.28 1.15-.28 2.35 0 3.5-.73 1.02-1.08 2.25-1 3.5 0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"
32
+ ></path><path d="M9 18c-4.51 2-5-2-7-2"></path></svg
33
+ >
34
+ View Source
35
+ </span>
36
+ </Button>
37
+ {/if}
38
+
39
+ {#if styleUrl}
40
+ <Button variant="ghost" size="sm" onclick={() => openLink(styleUrl)}>
41
+ <span class="flex items-center gap-2 text-zinc-400">
42
+ <svg
43
+ xmlns="http://www.w3.org/2000/svg"
44
+ width="14"
45
+ height="14"
46
+ viewBox="0 0 24 24"
47
+ fill="none"
48
+ stroke="currentColor"
49
+ stroke-width="2"
50
+ stroke-linecap="round"
51
+ stroke-linejoin="round"
52
+ ><path
53
+ d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
54
+ ></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line
55
+ x1="12"
56
+ y1="22.08"
57
+ x2="12"
58
+ y2="12"
59
+ ></line></svg
60
+ >
61
+ Styles
62
+ </span>
63
+ </Button>
64
+ {/if}
65
+ </div>
@@ -0,0 +1,26 @@
1
+ <script lang="ts">
2
+ import { icons, type IconName } from "../resources/icons";
3
+
4
+ interface Props {
5
+ name: IconName;
6
+ size?: number | string;
7
+ class?: string;
8
+ }
9
+
10
+ let { name, size = 16, class: className }: Props = $props();
11
+ </script>
12
+
13
+ <svg
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ width={size}
16
+ height={size}
17
+ viewBox="0 0 24 24"
18
+ fill="none"
19
+ stroke="currentColor"
20
+ stroke-width="2"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"
23
+ class={className}
24
+ >
25
+ <path d={icons[name]} />
26
+ </svg>
@@ -0,0 +1,12 @@
1
+ <script lang="ts">
2
+ import { SegmentedControl } from "@kori-ui/svelte";
3
+ interface Props {
4
+ options: any[];
5
+ value: string;
6
+ size?: "md" | "lg";
7
+ }
8
+
9
+ let { options, value = $bindable(), size = "md" }: Props = $props();
10
+ </script>
11
+
12
+ <SegmentedControl bind:value {options} {size} />
@@ -0,0 +1,58 @@
1
+ ---
2
+ const posts = await Astro.glob("../pages/docs/components/*.mdx");
3
+
4
+ const components = posts.map((post) => {
5
+ const url = post.url;
6
+ const name = post.frontmatter.title?.split('|')[0].trim() ||
7
+ url?.split('/').pop()?.replace(/-/g, ' ');
8
+
9
+ return { name, url };
10
+ });
11
+
12
+ const { pathname } = Astro.url;
13
+ const normalizePath = (path: string) => path.replace(/\/$/, "");
14
+ ---
15
+
16
+ <nav class="space-y-8">
17
+ <div>
18
+ <h4 class="text-xs font-bold mb-4 text-orange-500 uppercase tracking-widest px-2">
19
+ General
20
+ </h4>
21
+ <ul class="space-y-1">
22
+ <li>
23
+ <a
24
+ href="/docs/introduction"
25
+ class={`block px-3 py-2 text-sm rounded-md transition-colors ${
26
+ normalizePath(pathname) === "/docs/introduction"
27
+ ? "bg-orange-500/10 text-orange-500 font-medium"
28
+ : "text-zinc-400 hover:text-white hover:bg-zinc-900"
29
+ }`}
30
+ >
31
+ Introducción
32
+ </a>
33
+ </li>
34
+ </ul>
35
+ </div>
36
+
37
+ <div>
38
+ <h4 class="text-xs font-semibold mb-4 text-secondaryText uppercase px-2">
39
+ Componentes
40
+ </h4>
41
+ <ul>
42
+ {components.sort((a, b) => a.name.localeCompare(b.name)).map((comp) => (
43
+ <li>
44
+ <a
45
+ href={comp.url}
46
+ class={` px-4 h-9 items-center inline-flex text-sm rounded-xl transition-colors ${
47
+ normalizePath(pathname) === normalizePath(comp.url || "")
48
+ ? "bg-secondaryControl text-primaryText font-medium"
49
+ : "text-secondaryText hover:text-primaryText"
50
+ }`}
51
+ >
52
+ {comp.name}
53
+ </a>
54
+ </li>
55
+ ))}
56
+ </ul>
57
+ </div>
58
+ </nav>
@@ -0,0 +1,34 @@
1
+ ---
2
+ interface Props {
3
+ headings: { depth: number; slug: string; text: string }[];
4
+ }
5
+
6
+ const { headings } = Astro.props;
7
+ const filteredHeadings = headings.filter((h) => h.depth > 1 && h.depth < 4);
8
+ ---
9
+
10
+ {
11
+ filteredHeadings.length > 0 && (
12
+ <div class="sticky top-0">
13
+ <h4 class="text-[10px] font-bold mb-5 text-zinc-500 uppercase tracking-[0.2em]">
14
+ On this page
15
+ </h4>
16
+ <nav class="flex flex-col border-l border-zinc-900">
17
+ {filteredHeadings.map((h) => (
18
+ <a
19
+ href={`#${h.slug}`}
20
+ class:list={[
21
+ "text-sm transition-all duration-200 hover:text-orange-500 border-l -ml-px py-1.5",
22
+ {
23
+ "pl-6 text-zinc-500 border-transparent": h.depth === 3,
24
+ "pl-4 text-zinc-400 border-transparent hover:border-orange-500": h.depth === 2,
25
+ },
26
+ ]}
27
+ >
28
+ {h.text}
29
+ </a>
30
+ ))}
31
+ </nav>
32
+ </div>
33
+ )
34
+ }
@@ -0,0 +1,210 @@
1
+ ---
2
+ import astroLogo from '../assets/astro.svg';
3
+ import background from '../assets/background.svg';
4
+ ---
5
+
6
+ <div id="container">
7
+ <img id="background" src={background.src} alt="" fetchpriority="high" />
8
+ <main>
9
+ <section id="hero">
10
+ <a href="https://astro.build"
11
+ ><img src={astroLogo.src} width="115" height="48" alt="Astro Homepage" /></a
12
+ >
13
+ <h1>
14
+ To get started, open the <code><pre>src/pages</pre></code> directory in your project.
15
+ </h1>
16
+ <section id="links">
17
+ <a class="button" href="https://docs.astro.build">Read our docs</a>
18
+ <a href="https://astro.build/chat"
19
+ >Join our Discord <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"
20
+ ><path
21
+ fill="currentColor"
22
+ d="M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69Zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69Z"
23
+ ></path></svg
24
+ >
25
+ </a>
26
+ </section>
27
+ </section>
28
+ </main>
29
+
30
+ <a href="https://astro.build/blog/astro-5/" id="news" class="box">
31
+ <svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"
32
+ ><path
33
+ d="M24.667 12c1.333 1.414 2 3.192 2 5.334 0 4.62-4.934 5.7-7.334 12C18.444 28.567 18 27.456 18 26c0-4.642 6.667-7.053 6.667-14Zm-5.334-5.333c1.6 1.65 2.4 3.43 2.4 5.333 0 6.602-8.06 7.59-6.4 17.334C13.111 27.787 12 25.564 12 22.666c0-4.434 7.333-8 7.333-16Zm-6-5.333C15.111 3.555 16 5.556 16 7.333c0 8.333-11.333 10.962-5.333 22-3.488-.774-6-4-6-8 0-8.667 8.666-10 8.666-20Z"
34
+ fill="#111827"></path></svg
35
+ >
36
+ <h2>What's New in Astro 5.0?</h2>
37
+ <p>
38
+ From content layers to server islands, click to learn more about the new features and
39
+ improvements in Astro 5.0
40
+ </p>
41
+ </a>
42
+ </div>
43
+
44
+ <style>
45
+ #background {
46
+ position: fixed;
47
+ top: 0;
48
+ left: 0;
49
+ width: 100%;
50
+ height: 100%;
51
+ z-index: -1;
52
+ filter: blur(100px);
53
+ }
54
+
55
+ #container {
56
+ font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
57
+ height: 100%;
58
+ }
59
+
60
+ main {
61
+ height: 100%;
62
+ display: flex;
63
+ justify-content: center;
64
+ }
65
+
66
+ #hero {
67
+ display: flex;
68
+ align-items: start;
69
+ flex-direction: column;
70
+ justify-content: center;
71
+ padding: 16px;
72
+ }
73
+
74
+ h1 {
75
+ font-size: 22px;
76
+ margin-top: 0.25em;
77
+ }
78
+
79
+ #links {
80
+ display: flex;
81
+ gap: 16px;
82
+ }
83
+
84
+ #links a {
85
+ display: flex;
86
+ align-items: center;
87
+ padding: 10px 12px;
88
+ color: #111827;
89
+ text-decoration: none;
90
+ transition: color 0.2s;
91
+ }
92
+
93
+ #links a:hover {
94
+ color: rgb(78, 80, 86);
95
+ }
96
+
97
+ #links a svg {
98
+ height: 1em;
99
+ margin-left: 8px;
100
+ }
101
+
102
+ #links a.button {
103
+ color: white;
104
+ background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
105
+ box-shadow:
106
+ inset 0 0 0 1px rgba(255, 255, 255, 0.12),
107
+ inset 0 -2px 0 rgba(0, 0, 0, 0.24);
108
+ border-radius: 10px;
109
+ }
110
+
111
+ #links a.button:hover {
112
+ color: rgb(230, 230, 230);
113
+ box-shadow: none;
114
+ }
115
+
116
+ pre {
117
+ font-family:
118
+ ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono',
119
+ monospace;
120
+ font-weight: normal;
121
+ background: linear-gradient(14deg, #d83333 0%, #f041ff 100%);
122
+ -webkit-background-clip: text;
123
+ -webkit-text-fill-color: transparent;
124
+ background-clip: text;
125
+ margin: 0;
126
+ }
127
+
128
+ h2 {
129
+ margin: 0 0 1em;
130
+ font-weight: normal;
131
+ color: #111827;
132
+ font-size: 20px;
133
+ }
134
+
135
+ p {
136
+ color: #4b5563;
137
+ font-size: 16px;
138
+ line-height: 24px;
139
+ letter-spacing: -0.006em;
140
+ margin: 0;
141
+ }
142
+
143
+ code {
144
+ display: inline-block;
145
+ background:
146
+ linear-gradient(66.77deg, #f3cddd 0%, #f5cee7 100%) padding-box,
147
+ linear-gradient(155deg, #d83333 0%, #f041ff 18%, #f5cee7 45%) border-box;
148
+ border-radius: 8px;
149
+ border: 1px solid transparent;
150
+ padding: 6px 8px;
151
+ }
152
+
153
+ .box {
154
+ padding: 16px;
155
+ background: rgba(255, 255, 255, 1);
156
+ border-radius: 16px;
157
+ border: 1px solid white;
158
+ }
159
+
160
+ #news {
161
+ position: absolute;
162
+ bottom: 16px;
163
+ right: 16px;
164
+ max-width: 300px;
165
+ text-decoration: none;
166
+ transition: background 0.2s;
167
+ backdrop-filter: blur(50px);
168
+ }
169
+
170
+ #news:hover {
171
+ background: rgba(255, 255, 255, 0.55);
172
+ }
173
+
174
+ @media screen and (max-height: 368px) {
175
+ #news {
176
+ display: none;
177
+ }
178
+ }
179
+
180
+ @media screen and (max-width: 768px) {
181
+ #container {
182
+ display: flex;
183
+ flex-direction: column;
184
+ }
185
+
186
+ #hero {
187
+ display: block;
188
+ padding-top: 10%;
189
+ }
190
+
191
+ #links {
192
+ flex-wrap: wrap;
193
+ }
194
+
195
+ #links a.button {
196
+ padding: 14px 18px;
197
+ }
198
+
199
+ #news {
200
+ right: 16px;
201
+ left: 16px;
202
+ bottom: 2.5rem;
203
+ max-width: 100%;
204
+ }
205
+
206
+ h1 {
207
+ line-height: 1.5;
208
+ }
209
+ }
210
+ </style>
@@ -0,0 +1,20 @@
1
+ <script lang="ts">
2
+ import { Button } from "@kori-ui/svelte";
3
+ import Icon from "@components/Icon.svelte";
4
+ </script>
5
+
6
+ <div class="flex flex-wrap items-center gap-4">
7
+ <Button variant="secondary">
8
+ {#snippet startContent()}
9
+ <Icon name="arrowLeft" />
10
+ {/snippet}
11
+ Go Back
12
+ </Button>
13
+
14
+ <Button>
15
+ Save Changes
16
+ {#snippet endContent()}
17
+ <Icon name="check" />
18
+ {/snippet}
19
+ </Button>
20
+ </div>
@@ -0,0 +1,9 @@
1
+ <script lang="ts">
2
+ import { Button } from "@kori-ui/svelte";
3
+ </script>
4
+
5
+ <div class="flex flex-wrap items-center gap-4">
6
+ <Button size="sm">Small</Button>
7
+ <Button size="md">Medium</Button>
8
+ <Button size="lg">Large</Button>
9
+ </div>
@@ -0,0 +1,5 @@
1
+ <script lang="ts">
2
+ import { Button } from "@kori-ui/svelte";
3
+ </script>
4
+
5
+ <Button on:click={() => console.log("Click!")}>Default Button</Button>
@@ -0,0 +1,9 @@
1
+ <script lang="ts">
2
+ import { Button } from "@kori-ui/svelte";
3
+ </script>
4
+
5
+ <div class="flex flex-wrap items-center gap-4">
6
+ <Button variant="primary">Primary</Button>
7
+ <Button variant="secondary">Secondary</Button>
8
+ <Button variant="ghost">Ghost</Button>
9
+ </div>
@@ -0,0 +1,50 @@
1
+ ---
2
+ import "../styles/global.css";
3
+ import Sidebar from "@components/Sidebar.astro";
4
+ import TableOfContents from "@components/TableOfContents.astro";
5
+
6
+ interface Props {
7
+ title?: string;
8
+ headings?: { depth: number; slug: string; text: string }[];
9
+ }
10
+
11
+ const { title = "Kori UI Docs", headings = [] } = Astro.props;
12
+ ---
13
+
14
+ <!doctype html>
15
+ <html lang="en" class="dark">
16
+ <head>
17
+ <meta charset="UTF-8" />
18
+ <meta name="viewport" content="width=device-width" />
19
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
20
+ <meta name="generator" content={Astro.generator} />
21
+ <title>{title}</title>
22
+ </head>
23
+ <body class="bg-zinc-950 text-zinc-100 antialiased overflow-hidden">
24
+ <nav class="fixed top-0 z-50 w-full h-16 border-b border-zinc-900 bg-zinc-950/80 backdrop-blur-md px-6 flex items-center justify-between">
25
+ <div class="flex items-center gap-2">
26
+ <div class="w-8 h-8 bg-orange-500 rounded-lg shadow-lg shadow-orange-500/20"></div>
27
+ <span class="font-bold text-xl tracking-tighter text-white uppercase">KORI UI</span>
28
+ </div>
29
+ <div class="flex items-center gap-4">
30
+ <a href="https://github.com/jaftdelgado/kori-ui" target="_blank" class="text-sm text-zinc-400 hover:text-white transition-colors">GitHub</a>
31
+ </div>
32
+ </nav>
33
+
34
+ <div class="flex pt-16 h-screen">
35
+ <aside class="hidden md:flex flex-col w-72 overflow-y-auto p-6 shrink-0">
36
+ <Sidebar />
37
+ </aside>
38
+
39
+ <main class="flex-1 overflow-y-auto p-8 md:p-12 custom-scrollbar relative scroll-smooth prose-content">
40
+ <div class="max-w-2xl mx-auto w-full">
41
+ <slot />
42
+ </div>
43
+ </main>
44
+
45
+ <aside class="hidden lg:flex flex-col w-72 overflow-y-auto p-8 shrink-0">
46
+ <TableOfContents headings={headings} />
47
+ </aside>
48
+ </div>
49
+ </body>
50
+ </html>
@@ -0,0 +1,32 @@
1
+ ---
2
+ import "../styles/global.css";
3
+
4
+ interface Props {
5
+ title?: string;
6
+ }
7
+
8
+ const { title = "Kori UI Docs" } = Astro.props;
9
+ ---
10
+
11
+ <!doctype html>
12
+ <html lang="en">
13
+ <head>
14
+ <meta charset="UTF-8" />
15
+ <meta name="viewport" content="width=device-width" />
16
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
17
+ <meta name="generator" content={Astro.generator} />
18
+ <title>{title}</title>
19
+ </head>
20
+ <body >
21
+ <slot />
22
+ </body>
23
+ </html>
24
+
25
+ <style>
26
+ html,
27
+ body {
28
+ margin: 0;
29
+ width: 100%;
30
+ height: 100%;
31
+ }
32
+ </style>
@@ -0,0 +1,68 @@
1
+ ---
2
+ layout: ../../../layouts/DocsLayout.astro
3
+ title: "Button | Kori UI"
4
+ ---
5
+
6
+ import ComponentExample from "@components/ComponentExample.astro";
7
+
8
+ import ButtonUsage from "@examples/button/ButtonUsage.svelte";
9
+ import ButtonUsageCode from "@examples/button/ButtonUsage.svelte?raw";
10
+
11
+ import ButtonVariants from "@examples/button/ButtonVariants.svelte";
12
+ import ButtonVariantsCode from "@examples/button/ButtonVariants.svelte?raw";
13
+
14
+ import ButtonSizes from "@examples/button/ButtonSizes.svelte";
15
+ import ButtonSizesCode from "@examples/button/ButtonSizes.svelte?raw";
16
+
17
+ import ButtonContent from "@examples/button/ButtonContent.svelte";
18
+ import ButtonContentCode from "@examples/button/ButtonContent.svelte?raw";
19
+
20
+ import ExternalLinks from "@components/ExternalLinks.svelte";
21
+
22
+ # Button
23
+
24
+ Interactive element that allows action to be taken and desicions to be made with a click.
25
+
26
+ <ExternalLinks
27
+ client:load
28
+ githubUrl="https://github.com/jaftdelgado/kori-ui/blob/main/packages/components/button/src/lib/Button.svelte"
29
+ styleUrl="https://github.com/jaftdelgado/kori-ui/blob/main/packages/components/button/src/lib/button.css"
30
+ />
31
+
32
+ <ComponentExample code={ButtonUsageCode}>
33
+ <ButtonUsage client:load />
34
+ </ComponentExample>
35
+
36
+ ## Examples
37
+
38
+ ### Variants
39
+
40
+ <ComponentExample code={ButtonVariantsCode}>
41
+ <ButtonVariants client:load />
42
+ </ComponentExample>
43
+
44
+ ### Sizes
45
+
46
+ <ComponentExample code={ButtonSizesCode}>
47
+ <ButtonSizes client:load />
48
+ </ComponentExample>
49
+
50
+ ### Start & End Content
51
+
52
+ <ComponentExample code={ButtonContentCode}>
53
+ <ButtonContent client:load />
54
+ </ComponentExample>
55
+
56
+ ---
57
+
58
+ ## API Reference
59
+
60
+ The `Button` component accepts the following properties through Svelte 5 runes.
61
+
62
+ | Prop | Type | Default | Description |
63
+ | :------------- | :------------------------------------ | :---------- | :--------------------------------------- |
64
+ | `variant` | `'primary' \| 'secondary' \| 'ghost'` | `'primary'` | Defines the visual style of the button. |
65
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Sets the vertical scale and padding. |
66
+ | `disabled` | `boolean` | `false` | Prevents user interaction when true. |
67
+ | `startContent` | `Snippet \| Component \| string` | `undefined` | Content placed before the label (icons). |
68
+ | `endContent` | `Snippet \| Component \| string` | `undefined` | Content placed after the label (icons). |
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: ../../../layouts/DocsLayout.astro
3
+ title: "Segmented Control | Kori UI"
4
+ ---
5
+
6
+ import Showcase from "../../../components/Showcase.svelte";
7
+
8
+ # Segmented Control
9
+
10
+ Aquí puedes ver el componente funcionando:
11
+
12
+ <Showcase
13
+ client:load
14
+ value="test"
15
+ options={[
16
+ { value: "test", label: "Test" },
17
+ { value: "demo", label: "Demo" }
18
+ ]}
19
+ />
@@ -0,0 +1,8 @@
1
+ ---
2
+ import Welcome from '../components/Welcome.astro';
3
+ import Layout from '../layouts/Layout.astro';
4
+ ---
5
+
6
+ <Layout>
7
+ <Welcome />
8
+ </Layout>
@@ -0,0 +1,12 @@
1
+ export const icons = {
2
+ arrowLeft: "M19 12H5m7 7-7-7 7-7",
3
+ check: "M20 6 9 17l-5-5",
4
+ chevronRight: "m9 18 6-6-6-6",
5
+ externalLink: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6m4-7h6v6m-11 5L22 2",
6
+ github:
7
+ "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.28 1.15-.28 2.35 0 3.5-.73 1.02-1.08 2.25-1 3.5 0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4M9 18c-4.51 2-5-2-7-2",
8
+ print:
9
+ "M10.75 2.5h-5.5a.75.75 0 0 0-.75.75V4h7v-.75a.75.75 0 0 0-.75-.75M13 4v-.75A2.25 2.25 0 0 0 10.75 1h-5.5A2.25 2.25 0 0 0 3 3.25V4a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h1v1a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-1h1a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-9 6v.5H3A1.5 1.5 0 0 1 1.5 9V7A1.5 1.5 0 0 1 3 5.5h10A1.5 1.5 0 0 1 14.5 7v2a1.5 1.5 0 0 1-1.5 1.5h-1V10a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2m6-.5H6a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5m2.5-1a1 1 0 1 0 0-2a1 1 0 0 0 0 2"
10
+ } as const;
11
+
12
+ export type IconName = keyof typeof icons;
@@ -0,0 +1,16 @@
1
+ @import "tailwindcss";
2
+ @import "@kori-ui/styles";
3
+
4
+ @import "./typography.css";
5
+
6
+ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");
7
+
8
+ @theme {
9
+ --font-sans:
10
+ "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
11
+ "Segoe UI Symbol", "Noto Color Emoji";
12
+ }
13
+
14
+ :root {
15
+ font-family: var(--font-sans);
16
+ }
@@ -0,0 +1,38 @@
1
+ .prose-content {
2
+ & h1 {
3
+ @apply text-primaryText text-4xl font-semibold mb-8 tracking-tighter;
4
+ }
5
+
6
+ & h2 {
7
+ @apply text-2xl font-medium mb-4 mt-16 text-zinc-100 pb-2 tracking-tight;
8
+ }
9
+
10
+ & h3 {
11
+ @apply text-xl font-medium mb-2 mt-10 tracking-tight;
12
+ }
13
+
14
+ & p {
15
+ @apply text-zinc-400 leading-relaxed mb-5 text-[15px];
16
+ }
17
+
18
+ & pre {
19
+ @apply p-4 rounded-xl border border-zinc-800 bg-zinc-900/50 my-6 overflow-x-auto;
20
+ }
21
+
22
+ & code:not(pre code) {
23
+ @apply bg-zinc-800 text-zinc-200 px-1.5 py-0.5 rounded text-sm font-mono;
24
+ }
25
+
26
+ & ul,
27
+ & ol {
28
+ @apply mb-5 ml-6 text-zinc-400 space-y-2;
29
+ }
30
+
31
+ & ul {
32
+ @apply list-disc;
33
+ }
34
+
35
+ & li strong {
36
+ @apply text-zinc-200;
37
+ }
38
+ }
@@ -0,0 +1,5 @@
1
+ import { vitePreprocess } from "@astrojs/svelte";
2
+
3
+ export default {
4
+ preprocess: vitePreprocess()
5
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "astro/tsconfigs/strict",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "paths": {
6
+ "@examples/*": ["src/examples/*"],
7
+ "@components/*": ["src/components/*"]
8
+ }
9
+ },
10
+ "include": [".astro/types.d.ts", "**/*"],
11
+ "exclude": ["dist"]
12
+ }