Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/roadplan-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "my-qwik-library-name",
"name": "roadplan-ui",
"version": "0.0.1",
"description": "Create a reusable Qwik component library",
"main": "./lib/index.qwik.mjs",
Expand Down Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@builder.io/qwik": "1.5.5",
"@builder.io/qwik-city": "^1.5.5",
"@types/eslint": "^8.56.10",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.7.1",
Expand All @@ -48,6 +49,7 @@
"typescript": "5.4.5",
"undici": "*",
"vite": "^5.2.10",
"vite-tsconfig-paths": "^4.2.1"
"vite-tsconfig-paths": "^4.2.1",
"shiki": "^1.3.0"
}
}
20 changes: 20 additions & 0 deletions packages/roadplan-ui/src/Icons/CheckIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { component$ } from "@builder.io/qwik";

export const CheckIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-check"
>
<path d="M20 6 9 17l-5-5" />
</svg>
);
});
18 changes: 18 additions & 0 deletions packages/roadplan-ui/src/Icons/ChevronIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { component$ } from "@builder.io/qwik";

export const ChevronIcon = component$(() => {
return (
<svg
class="-mr-1 h-5 w-5 rounded-xl stroke-black p-1 dark:stroke-white"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"
clip-rule="evenodd"
/>
</svg>
);
});
20 changes: 20 additions & 0 deletions packages/roadplan-ui/src/Icons/CloseIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { component$ } from "@builder.io/qwik";

export const CloseIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-10 w-10 rounded-xl stroke-black p-1 dark:stroke-white"
fill="none"
stroke-width="2.5"
viewBox="0 0 24 24"
aria-label="Close"
>
<path
d="M6 18L18 6M6 6l12 12"
stroke-linecap="round"
stroke-linejoin="round"
></path>
</svg>
);
});
21 changes: 21 additions & 0 deletions packages/roadplan-ui/src/Icons/CopyIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { component$ } from "@builder.io/qwik";

export const CopyIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-copy"
>
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
</svg>
);
});
17 changes: 17 additions & 0 deletions packages/roadplan-ui/src/Icons/ForkIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { component$ } from "@builder.io/qwik";

export const ForkIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
class="mr-2 h-4 w-4"
fill="currentColor"
viewBox="0 0 16 16"
aria-hidden="true"
>
<path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path>
</svg>
);
});
21 changes: 21 additions & 0 deletions packages/roadplan-ui/src/Icons/GitHubIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { component$ } from "@builder.io/qwik";

export const GitHubIcon = component$<{ classes?: string }>(
({ classes = "w-8 h8" }) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
class={`rounded-xl p-1 ${classes}`}
viewBox="0 0 496 512"
>
<path
class="fill-black dark:fill-white"
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9c1.6 2.3 4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2z"
></path>
</svg>
);
},
);
21 changes: 21 additions & 0 deletions packages/roadplan-ui/src/Icons/MenuIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { component$ } from "@builder.io/qwik";

export const MenuIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
role="img"
class="h-8 w-8 rounded-xl p-1"
viewBox="0 0 24 24"
aria-label="Menu"
>
<g fill="none">
<path d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z" />
<path
class="fill-black dark:fill-white"
d="M20 17.5a1.5 1.5 0 0 1 .144 2.993L20 20.5H4a1.5 1.5 0 0 1-.144-2.993L4 17.5h16Zm0-7a1.5 1.5 0 0 1 0 3H4a1.5 1.5 0 0 1 0-3h16Zm0-7a1.5 1.5 0 0 1 0 3H4a1.5 1.5 0 1 1 0-3h16Z"
/>
</g>
</svg>
);
});
17 changes: 17 additions & 0 deletions packages/roadplan-ui/src/Icons/StarIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { component$ } from "@builder.io/qwik";

export const StarIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
class="mr-2 h-4 w-4"
fill="currentColor"
viewBox="0 0 1792 1792"
aria-hidden="true"
>
<path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z"></path>
</svg>
);
});
19 changes: 19 additions & 0 deletions packages/roadplan-ui/src/Icons/ThemeDarkIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { component$ } from "@builder.io/qwik";

export const ThemeDarkIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
class="w- h-8 rounded-xl p-1"
viewBox="0 0 24 24"
>
<path
class="fill-black dark:fill-white"
d="M21.64 13a1 1 0 0 0-1.05-.14a8.05 8.05 0 0 1-3.37.73a8.15 8.15 0 0 1-8.14-8.1a8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69a1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14a9.79 9.79 0 0 0 2.1-.22a8.11 8.11 0 0 1-7.18 4.32Z"
></path>
</svg>
);
});
19 changes: 19 additions & 0 deletions packages/roadplan-ui/src/Icons/ThemeLightIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { component$ } from "@builder.io/qwik";

export const ThemeLightIcon = component$(() => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
class="h-8 w-8 rounded-xl p-1"
viewBox="0 0 24 24"
>
<path
class="fill-black dark:fill-white"
d="m5.64 17l-.71.71a1 1 0 0 0 0 1.41a1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm7-7a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1ZM5.64 7.05a1 1 0 0 0 .7.29a1 1 0 0 0 .71-.29a1 1 0 0 0 0-1.41l-.71-.71a1 1 0 0 0-1.41 1.41Zm12 .29a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.64.71a1 1 0 0 0 0 1.41a1 1 0 0 0 .66.29ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-9 8a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Zm6.36-2A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0a1 1 0 0 0 0-1.41ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 3.5-3.5a3.5 3.5 0 0 1-3.5 3.5Z"
></path>
</svg>
);
});
31 changes: 31 additions & 0 deletions packages/roadplan-ui/src/docs-components/Aside/Aside.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { component$ } from "@builder.io/qwik";
import { useContent } from "@builder.io/qwik-city";

export const Aside = component$(() => {
const { menu } = useContent();

return (
<div
class={`fixed top-20 mt-8 flex h-[calc(100%-12rem)] flex-col overflow-hidden overflow-y-auto px-6 text-xl text-black dark:text-white`}
>
{(menu?.items || []).map(({ text, items }, idx) => (
<ul key={idx} class="mb-6">
<li class="text-lg font-bold text-black dark:text-white">
<div class="pb-2">{text}</div>
{(items || []).map(({ text, href }, idx) => (
<ul key={idx}>
<li class="border-l-[2px] py-1 text-black dark:text-white">
<a href={href}>
<span class="pl-2 text-sm">
<span>{text}</span>
</span>
</a>
</li>
</ul>
))}
</li>
</ul>
))}
</div>
);
});
24 changes: 24 additions & 0 deletions packages/roadplan-ui/src/docs-components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { component$ } from "@builder.io/qwik";
import { GitHubIcon } from "../../Icons/GitHubIcon";

export const Footer = component$(() => {
return (
<footer class="flex border-t-[2px] border-slate-200 bg-white px-6 py-4 dark:border-slate-800 dark:bg-slate-900">
<div class="grid w-full grid-cols-12">
<div class="col-span-4" />
<div class="col-span-4" />
<div class="col-span-4 flex justify-end">
<a
target="_blank"
href="https://github.com/QwikDev/RoadPlan"
rel="noopener noreferrer"
title="QwikDev/RoadPlan"
aria-label="QwikDev/RoadPlan"
>
<GitHubIcon />
</a>
</div>
</div>
</footer>
);
});
Loading