@pokle/basecoat 0.3.10-beta2.pokle
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/.eleventy.js +47 -0
- package/.gitattributes +1 -0
- package/.gitignore +12 -0
- package/AGENTS.md +112 -0
- package/CONTRIBUTING.md +15 -0
- package/LICENSE.md +21 -0
- package/README.md +29 -0
- package/ROADMAP.md +20 -0
- package/docs/css/custom.css +92 -0
- package/docs/css/highlight.css +151 -0
- package/docs/css/styles.css +8 -0
- package/docs/css/themes/claude.css +95 -0
- package/docs/css/themes/doom-64.css +95 -0
- package/docs/css/themes/supabase.css +100 -0
- package/docs/src/_data/site.js +10 -0
- package/docs/src/_includes/layouts/base.njk +112 -0
- package/docs/src/_includes/layouts/layout.njk +15 -0
- package/docs/src/_includes/layouts/page.njk +21 -0
- package/docs/src/_includes/macros/code_block.njk +23 -0
- package/docs/src/_includes/macros/code_preview.njk +26 -0
- package/docs/src/_includes/macros/toc.njk +20 -0
- package/docs/src/_includes/partials/header.njk +64 -0
- package/docs/src/_includes/partials/kitchen-sink/accordion.njk +89 -0
- package/docs/src/_includes/partials/kitchen-sink/alert-dialog.njk +26 -0
- package/docs/src/_includes/partials/kitchen-sink/alert.njk +72 -0
- package/docs/src/_includes/partials/kitchen-sink/avatar.njk +37 -0
- package/docs/src/_includes/partials/kitchen-sink/badge.njk +47 -0
- package/docs/src/_includes/partials/kitchen-sink/breadcrumb.njk +42 -0
- package/docs/src/_includes/partials/kitchen-sink/button.njk +101 -0
- package/docs/src/_includes/partials/kitchen-sink/card.njk +147 -0
- package/docs/src/_includes/partials/kitchen-sink/checkbox.njk +34 -0
- package/docs/src/_includes/partials/kitchen-sink/combobox.njk +83 -0
- package/docs/src/_includes/partials/kitchen-sink/dialog.njk +65 -0
- package/docs/src/_includes/partials/kitchen-sink/dropdown-menu.njk +294 -0
- package/docs/src/_includes/partials/kitchen-sink/form.njk +106 -0
- package/docs/src/_includes/partials/kitchen-sink/input.njk +27 -0
- package/docs/src/_includes/partials/kitchen-sink/label.njk +30 -0
- package/docs/src/_includes/partials/kitchen-sink/pagination.njk +34 -0
- package/docs/src/_includes/partials/kitchen-sink/popover.njk +43 -0
- package/docs/src/_includes/partials/kitchen-sink/radio-group.njk +33 -0
- package/docs/src/_includes/partials/kitchen-sink/select.njk +99 -0
- package/docs/src/_includes/partials/kitchen-sink/skeleton.njk +40 -0
- package/docs/src/_includes/partials/kitchen-sink/slider.njk +38 -0
- package/docs/src/_includes/partials/kitchen-sink/switch.njk +27 -0
- package/docs/src/_includes/partials/kitchen-sink/table.njk +74 -0
- package/docs/src/_includes/partials/kitchen-sink/tabs.njk +105 -0
- package/docs/src/_includes/partials/kitchen-sink/textarea.njk +27 -0
- package/docs/src/_includes/partials/kitchen-sink/toast.njk +25 -0
- package/docs/src/_includes/partials/kitchen-sink/tooltip.njk +24 -0
- package/docs/src/_includes/partials/sidebar.njk +139 -0
- package/docs/src/assets/apple-touch-icon.png +0 -0
- package/docs/src/assets/favicon.svg +12 -0
- package/docs/src/assets/images/avatar-1.png +0 -0
- package/docs/src/assets/images/avatar-2.png +0 -0
- package/docs/src/assets/images/avatar-3.png +0 -0
- package/docs/src/assets/images/screenshot.png +0 -0
- package/docs/src/assets/social-screenshot.png +0 -0
- package/docs/src/assets/social.png +0 -0
- package/docs/src/assets/styles.css +6309 -0
- package/docs/src/components/accordion.njk +75 -0
- package/docs/src/components/alert-dialog.njk +119 -0
- package/docs/src/components/alert.njk +108 -0
- package/docs/src/components/avatar.njk +40 -0
- package/docs/src/components/badge.njk +93 -0
- package/docs/src/components/breadcrumb.njk +71 -0
- package/docs/src/components/button-group.njk +290 -0
- package/docs/src/components/button.njk +141 -0
- package/docs/src/components/card.njk +156 -0
- package/docs/src/components/carousel.njk +102 -0
- package/docs/src/components/chart.njk +814 -0
- package/docs/src/components/checkbox.njk +101 -0
- package/docs/src/components/combobox.njk +293 -0
- package/docs/src/components/command.njk +288 -0
- package/docs/src/components/dialog.njk +177 -0
- package/docs/src/components/dropdown-menu.njk +403 -0
- package/docs/src/components/empty.njk +157 -0
- package/docs/src/components/field.njk +459 -0
- package/docs/src/components/form.njk +79 -0
- package/docs/src/components/input-group.njk +372 -0
- package/docs/src/components/input.njk +90 -0
- package/docs/src/components/item.njk +320 -0
- package/docs/src/components/kbd.njk +76 -0
- package/docs/src/components/label.njk +41 -0
- package/docs/src/components/pagination.njk +48 -0
- package/docs/src/components/popover.njk +174 -0
- package/docs/src/components/progress.njk +44 -0
- package/docs/src/components/radio-group.njk +48 -0
- package/docs/src/components/select.njk +457 -0
- package/docs/src/components/sidebar.njk +219 -0
- package/docs/src/components/skeleton.njk +51 -0
- package/docs/src/components/slider.njk +47 -0
- package/docs/src/components/spinner.njk +214 -0
- package/docs/src/components/switch.njk +54 -0
- package/docs/src/components/table.njk +87 -0
- package/docs/src/components/tabs.njk +232 -0
- package/docs/src/components/textarea.njk +90 -0
- package/docs/src/components/theme-switcher.njk +111 -0
- package/docs/src/components/toast.njk +279 -0
- package/docs/src/components/tooltip.njk +53 -0
- package/docs/src/fragments/toast/error.njk +6 -0
- package/docs/src/fragments/toast/info.njk +5 -0
- package/docs/src/fragments/toast/success.njk +7 -0
- package/docs/src/fragments/toast/warning.njk +5 -0
- package/docs/src/index.njk +336 -0
- package/docs/src/installation.njk +275 -0
- package/docs/src/introduction.njk +63 -0
- package/docs/src/kitchen-sink.njk +52 -0
- package/docs/src/llms.txt +506 -0
- package/docs/src/robots.njk +7 -0
- package/docs/src/sitemap.njk +15 -0
- package/docs/src/test.njk +39 -0
- package/package.json +51 -0
- package/packages/cli/README.md +55 -0
- package/packages/cli/index.js +193 -0
- package/packages/cli/package.json +44 -0
- package/packages/css/README.md +63 -0
- package/packages/css/package.json +63 -0
- package/scripts/build.js +170 -0
- package/src/css/basecoat.cdn.css +2 -0
- package/src/css/basecoat.css +1310 -0
- package/src/jinja/command.html.jinja +206 -0
- package/src/jinja/dialog.html.jinja +94 -0
- package/src/jinja/dropdown-menu.html.jinja +124 -0
- package/src/jinja/popover.html.jinja +48 -0
- package/src/jinja/select.html.jinja +196 -0
- package/src/jinja/sidebar.html.jinja +144 -0
- package/src/jinja/tabs.html.jinja +78 -0
- package/src/jinja/toast.html.jinja +117 -0
- package/src/js/basecoat.js +99 -0
- package/src/js/command.js +175 -0
- package/src/js/dropdown-menu.js +171 -0
- package/src/js/popover.js +73 -0
- package/src/js/select.js +432 -0
- package/src/js/sidebar.js +104 -0
- package/src/js/tabs.js +63 -0
- package/src/js/toast.js +181 -0
- package/src/nunjucks/command.njk +206 -0
- package/src/nunjucks/dialog.njk +92 -0
- package/src/nunjucks/dropdown-menu.njk +124 -0
- package/src/nunjucks/popover.njk +48 -0
- package/src/nunjucks/select.njk +196 -0
- package/src/nunjucks/sidebar.njk +144 -0
- package/src/nunjucks/tabs.njk +78 -0
- package/src/nunjucks/toast.njk +117 -0
- package/wrangler.jsonc +7 -0
package/.eleventy.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import eleventyLucideicons from "@grimlink/eleventy-plugin-lucide-icons";
|
|
2
|
+
import prettier from "prettier";
|
|
3
|
+
import Nunjucks from "nunjucks";
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
6
|
+
|
|
7
|
+
export default async function(eleventyConfig) {
|
|
8
|
+
eleventyConfig.addWatchTarget("src/nunjucks/");
|
|
9
|
+
eleventyConfig.setInputDirectory("./docs/src");
|
|
10
|
+
eleventyConfig.addPassthroughCopy({"docs/src/assets": "assets"});
|
|
11
|
+
eleventyConfig.addPassthroughCopy({ "src/js": "assets/js" });
|
|
12
|
+
eleventyConfig.addPassthroughCopy({ "docs/src/llms.txt": "llms.txt" });
|
|
13
|
+
eleventyConfig.addPlugin(eleventyLucideicons);
|
|
14
|
+
eleventyConfig.addShortcode("fetchCode", function(filePath) {
|
|
15
|
+
const absolutePath = path.resolve(process.cwd(), filePath);
|
|
16
|
+
try {
|
|
17
|
+
return fs.readFileSync(absolutePath, 'utf8');
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.error(`[Eleventy FetchCode Error] Failed to read: ${absolutePath}`, error);
|
|
20
|
+
return `<!-- Error fetching code for ${filePath} -->`;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
eleventyConfig.addNunjucksAsyncFilter("prettyHtml", async (code, callback) => {
|
|
25
|
+
try {
|
|
26
|
+
const formattedCode = await prettier.format(code, {
|
|
27
|
+
parser: "html",
|
|
28
|
+
printWidth: 1000,
|
|
29
|
+
singleAttributePerLine: false,
|
|
30
|
+
bracketSameLine: true,
|
|
31
|
+
htmlWhitespaceSensitivity: "ignore"
|
|
32
|
+
});
|
|
33
|
+
callback(null, formattedCode);
|
|
34
|
+
} catch (err) {
|
|
35
|
+
console.error("Error formatting HTML with Prettier:", err);
|
|
36
|
+
callback(err, code);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
let nunjucksEnvironment = new Nunjucks.Environment(
|
|
40
|
+
new Nunjucks.FileSystemLoader([
|
|
41
|
+
"src/nunjucks",
|
|
42
|
+
"docs/src/_includes"
|
|
43
|
+
]),
|
|
44
|
+
{ autoescape: true }
|
|
45
|
+
);
|
|
46
|
+
eleventyConfig.setLibrary("njk", nunjucksEnvironment);
|
|
47
|
+
}
|
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
docs/src/assets/styles.css merge=theirs
|
package/.gitignore
ADDED
package/AGENTS.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Basecoat – Agent Guide
|
|
2
|
+
|
|
3
|
+
## What is Basecoat?
|
|
4
|
+
|
|
5
|
+
Basecoat is a vanilla JavaScript/HTML/CSS port of shadcn/ui components. It reuses shadcn/ui's design patterns and Tailwind CSS classes while maintaining semantic HTML, native browser elements, and full accessibility (ARIA attributes, proper hierarchies, keyboard navigation). The goal is to provide shadcn-quality components without React dependencies.
|
|
6
|
+
|
|
7
|
+
## Quickstart
|
|
8
|
+
|
|
9
|
+
- Install deps: `npm i`
|
|
10
|
+
- Dev docs server: `npm run docs:dev`
|
|
11
|
+
- Build CSS/JS: `npm run build`
|
|
12
|
+
- Build static docs: `npm run docs:build`
|
|
13
|
+
|
|
14
|
+
## What to edit (and what not)
|
|
15
|
+
|
|
16
|
+
- Edit sources only:
|
|
17
|
+
- `src/css/basecoat.css` – All component CSS classes (Tailwind + custom)
|
|
18
|
+
- `src/js/*.js` – Individual component JS files (kebab-case, ESM) + `basecoat.js` (component registry)
|
|
19
|
+
- `src/nunjucks/*.njk` and `src/jinja/*.html.jinja` – Component template macros
|
|
20
|
+
- `docs/src/components/*.njk` – Component documentation pages with examples
|
|
21
|
+
- `docs/src/_includes/` – Layout templates, partials, and navigation
|
|
22
|
+
- Do not edit build outputs:
|
|
23
|
+
- `packages/*/dist` – built CSS/JS bundles
|
|
24
|
+
- `_site/` – generated docs site
|
|
25
|
+
|
|
26
|
+
## Project layout
|
|
27
|
+
|
|
28
|
+
- Workspaces: root npm workspace with publishable packages in `packages/*`.
|
|
29
|
+
- Packages:
|
|
30
|
+
- `packages/css` – built CSS and JS bundles under `dist/`.
|
|
31
|
+
- `packages/cli` – CLI; distributed assets live under `dist/`.
|
|
32
|
+
- Docs site: `docs/src` (Eleventy); output goes to `_site/`.
|
|
33
|
+
|
|
34
|
+
## Conventions
|
|
35
|
+
|
|
36
|
+
- ESM everywhere (`import`/`export`).
|
|
37
|
+
- Prettier defaults (2 spaces; single quotes per file preference).
|
|
38
|
+
- Filenames for assets: kebab-case (e.g., `dropdown-menu.js`, `basecoat.cdn.css`).
|
|
39
|
+
- JS naming: `camelCase` for vars/functions; `PascalCase` for DOM classes and exported component names when applicable.
|
|
40
|
+
|
|
41
|
+
## Design Principles
|
|
42
|
+
|
|
43
|
+
- **Minimal code**: Prefer native HTML elements and browser behavior over JavaScript abstractions
|
|
44
|
+
- **Accessibility-first**: Semantic HTML, proper ARIA attributes, keyboard navigation
|
|
45
|
+
- **CSS patterns**:
|
|
46
|
+
- Use `border` for lines/separators (not `background` on `<hr>`)
|
|
47
|
+
- Use `:is()` and `:has()` for compact selectors
|
|
48
|
+
- Use `isolation: isolate` to contain z-index stacking contexts
|
|
49
|
+
- Use `data-*` attributes for styling states, `aria-*` for accessibility semantics
|
|
50
|
+
- **Component patterns**:
|
|
51
|
+
- Dialog variants use wrapper classes (e.g., `.command-dialog` wraps `.command`)
|
|
52
|
+
- JavaScript components register with `window.basecoat.register()`
|
|
53
|
+
- Emit custom events for user actions (e.g., `command:select`)
|
|
54
|
+
- Filter disabled options (`aria-disabled="true"`) from all interactions
|
|
55
|
+
- **When NOT to create a component**:
|
|
56
|
+
- If it's just composition of existing elements (users can do it with standard HTML/Tailwind)
|
|
57
|
+
- If behavior is fully native (e.g., fieldset, legend)
|
|
58
|
+
|
|
59
|
+
## Adding new components
|
|
60
|
+
|
|
61
|
+
Before creating a component, ask:
|
|
62
|
+
1. Does shadcn/ui have it? → Port it
|
|
63
|
+
2. Is it pure composition? → Document pattern, no component
|
|
64
|
+
3. Does it need JS behavior? → Create component
|
|
65
|
+
4. Is it just CSS? → Add to basecoat.css, document usage
|
|
66
|
+
|
|
67
|
+
Examples:
|
|
68
|
+
- Field/Fieldset: CSS-only patterns (no JS component)
|
|
69
|
+
- Empty/Item/Input Group: Pure composition (docs only)
|
|
70
|
+
- Command/Select: JS behavior required (full component)
|
|
71
|
+
|
|
72
|
+
## Common tasks
|
|
73
|
+
|
|
74
|
+
- Update a component's CSS/JS: Edit `src/css/basecoat.css` and/or `src/js/*.js`.
|
|
75
|
+
- Update a component template: Edit `src/nunjucks/*.njk` and/or `src/jinja/*.html.jinja`.
|
|
76
|
+
- Add a new component: Create JS, CSS, templates, and docs page under `docs/src/components/*.njk`.
|
|
77
|
+
- Update navigation: Edit files in `docs/src/_includes/partials/`.
|
|
78
|
+
|
|
79
|
+
## Testing
|
|
80
|
+
|
|
81
|
+
No automated testing configured. User validates manually via the docs site (`npm run docs:dev`).
|
|
82
|
+
|
|
83
|
+
## Commits and PRs
|
|
84
|
+
|
|
85
|
+
- Commits: concise, imperative (≤72 chars), optional scope.
|
|
86
|
+
- Example: `select: prevent change event on init`.
|
|
87
|
+
- PRs: include description, linked issues (e.g., `Closes #123`), and before/after screenshots or code snippets for visual/behavioral changes.
|
|
88
|
+
- Keep PRs focused; update docs examples when components or APIs change.
|
|
89
|
+
|
|
90
|
+
## Environment and tooling
|
|
91
|
+
|
|
92
|
+
- Node 18+ recommended.
|
|
93
|
+
- Eleventy config: `.eleventy.js`.
|
|
94
|
+
- Tailwind via `@tailwindcss/cli` v4.
|
|
95
|
+
- Build uses Tailwind CLI and `terser`; both are provided via devDependencies.
|
|
96
|
+
|
|
97
|
+
## Git workflow
|
|
98
|
+
|
|
99
|
+
- `.gitattributes` configures merge strategies for generated files
|
|
100
|
+
- `docs/src/assets/styles.css` auto-resolves to incoming changes (regenerated by Tailwind)
|
|
101
|
+
- Always run `npm run build` before publishing packages
|
|
102
|
+
|
|
103
|
+
## Publishing packages
|
|
104
|
+
|
|
105
|
+
1. Bump version in root `package.json`
|
|
106
|
+
2. Run `npm run build` to generate dist files
|
|
107
|
+
3. Run `npm publish --workspaces` to publish both packages
|
|
108
|
+
|
|
109
|
+
## Package references
|
|
110
|
+
|
|
111
|
+
- `packages/css` usage and details: see `packages/css/README.md`.
|
|
112
|
+
- `packages/cli` usage and details: see `packages/cli/README.md`.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Contributing to Basecoat
|
|
2
|
+
|
|
3
|
+
- Support development by sponsoring the author: https://github.com/sponsors/hunvreus
|
|
4
|
+
- Submit pull requests (PRs) against the `development` branch, not `main`.
|
|
5
|
+
- For branches, we have:
|
|
6
|
+
- `main` is our production and default branch. This is what we deploy to https://basecoatui.com and publish to https://www.npmjs.com/package/basecoat-css and https://www.npmjs.com/package/basecoat-cli.
|
|
7
|
+
- `development` is for staging. We will deploy it soon at https://dev.basecoatui.com.
|
|
8
|
+
- New features are worked in `feature/name-of-the-feature` branches.
|
|
9
|
+
- Issues are addressed in `issue/123-main-isse` branches.
|
|
10
|
+
- When ready, we PR against `development`, test it and then finally merge to `main`.
|
|
11
|
+
- Keep changes focused: one feature or fix per PR.
|
|
12
|
+
- Test locally before submitting.
|
|
13
|
+
- Follow existing code style.
|
|
14
|
+
|
|
15
|
+
Thanks for helping!
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ronan Berder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Basecoat
|
|
2
|
+
|
|
3
|
+
A collection of modern UI components built with Tailwind CSS that works with any web stack. Basecoat brings the magic of [shadcn/ui](https://ui.shadcn.com) to traditional web applications, no React required.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Lightweight**: no runtime JS, just CSS and a tiny bit of vanilla JavaScript for the more interactive components.
|
|
10
|
+
- **Easy to use**: add classes like `btn` or `input` and you're done.
|
|
11
|
+
- **Framework-agnostic**: works with any backend or frontend stack.
|
|
12
|
+
- **Accessible**: components follow accessibility best practices.
|
|
13
|
+
- **Dark mode ready**: respects your Tailwind config.
|
|
14
|
+
- **Extendable**: tweak styles with Tailwind or CSS variables.
|
|
15
|
+
- **Themable**: fully compatible with shadcn/ui themes.
|
|
16
|
+
- **Readable**: no class soup, just clean markup.
|
|
17
|
+
- **Free and open source**: MIT licensed.
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
Visit [basecoatui.com](https://basecoatui.com).
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
Visit [basecoatui.com/installation](https://basecoatui.com/installation)
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
[MIT](/LICENSE.md)
|
package/ROADMAP.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## Now
|
|
2
|
+
|
|
3
|
+
- [ ] Add Drawer component
|
|
4
|
+
- [ ] Make utility components (e.g., Item) into proper components (i.e., .item)
|
|
5
|
+
- [ ] Split CSS into components
|
|
6
|
+
|
|
7
|
+
## Next
|
|
8
|
+
|
|
9
|
+
- [ ] Make Command load dynamic items (e.g. search results from remote endpoint)
|
|
10
|
+
- [ ] Make Combobox load dynamic items (e.g. search results from remote endpoint)
|
|
11
|
+
- [ ] Add Toggle component
|
|
12
|
+
- [ ] Add Carousel component
|
|
13
|
+
- [ ] Add Sheet component
|
|
14
|
+
- [ ] Add Separator component
|
|
15
|
+
- [ ] Adding Menubar component
|
|
16
|
+
|
|
17
|
+
## Later
|
|
18
|
+
|
|
19
|
+
- [ ] Add Calendar component (https://flatpickr.js.org/)
|
|
20
|
+
- [ ] Finish Chart component (https://www.chartjs.org/)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* HTMX */
|
|
2
|
+
.htmx-indicator {
|
|
3
|
+
@apply invisible opacity-0 transition-discrete transition-all;
|
|
4
|
+
}
|
|
5
|
+
.htmx-indicator:not(.htmx-request) {
|
|
6
|
+
@apply hidden;
|
|
7
|
+
}
|
|
8
|
+
.htmx-request,
|
|
9
|
+
.htmx-request.htmx-indicator {
|
|
10
|
+
@apply visible opacity-100;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.content {
|
|
14
|
+
> h2 {
|
|
15
|
+
@apply mt-12 lg:mt-20 mb-6 scroll-m-22 text-2xl font-semibold tracking-tight first:mt-0;
|
|
16
|
+
}
|
|
17
|
+
> h3 {
|
|
18
|
+
@apply mt-8 mb-6 scroll-m-22 text-xl font-semibold tracking-tight;
|
|
19
|
+
}
|
|
20
|
+
> h4 {
|
|
21
|
+
@apply my-6 scroll-m-22 font-semibold tracking-tight;
|
|
22
|
+
}
|
|
23
|
+
.prose {
|
|
24
|
+
@apply my-6;
|
|
25
|
+
|
|
26
|
+
a {
|
|
27
|
+
@apply font-medium underline underline-offset-4;
|
|
28
|
+
}
|
|
29
|
+
code:not(pre > code) {
|
|
30
|
+
@apply relative rounded-md bg-muted/50 px-[0.3rem] py-[0.2rem] font-mono text-sm;
|
|
31
|
+
}
|
|
32
|
+
blockquote {
|
|
33
|
+
@apply border-l-4 border-border pl-4;
|
|
34
|
+
}
|
|
35
|
+
ol {
|
|
36
|
+
@apply list-decimal ml-6;
|
|
37
|
+
}
|
|
38
|
+
ul {
|
|
39
|
+
@apply list-disc ml-6;
|
|
40
|
+
}
|
|
41
|
+
ol,
|
|
42
|
+
ul {
|
|
43
|
+
li {
|
|
44
|
+
@apply mt-2;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
dl {
|
|
48
|
+
@apply border-b pb-3 my-6;
|
|
49
|
+
dt {
|
|
50
|
+
@apply border-t pt-3 mt-3 first:mt-0;
|
|
51
|
+
}
|
|
52
|
+
dd {
|
|
53
|
+
@apply mt-2 space-y-2;
|
|
54
|
+
}
|
|
55
|
+
dl {
|
|
56
|
+
@apply mt-4 border-b-0 pb-0 pl-8 my-0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
b,
|
|
60
|
+
strong {
|
|
61
|
+
@apply font-semibold;
|
|
62
|
+
}
|
|
63
|
+
> p,
|
|
64
|
+
> blockquote,
|
|
65
|
+
> ul,
|
|
66
|
+
> ol,
|
|
67
|
+
> dl,
|
|
68
|
+
> table,
|
|
69
|
+
> pre,
|
|
70
|
+
> p {
|
|
71
|
+
@apply my-6;
|
|
72
|
+
}
|
|
73
|
+
> *:first-child {
|
|
74
|
+
@apply !mt-0;
|
|
75
|
+
}
|
|
76
|
+
> *:last-child {
|
|
77
|
+
@apply !mb-0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.step {
|
|
81
|
+
counter-increment: step;
|
|
82
|
+
|
|
83
|
+
&:before {
|
|
84
|
+
@apply absolute w-8 h-8 md:w-9 md:h-9 bg-muted rounded-full font-mono font-semibold text-center text-sm inline-flex items-center justify-center -indent-px border-4 mr-2 border-background;
|
|
85
|
+
@apply md:ml-[-50px] md:mt-[-4px];
|
|
86
|
+
content: counter(step);
|
|
87
|
+
}
|
|
88
|
+
> h3 {
|
|
89
|
+
@apply max-md:ml-10 min-h-8 flex items-center;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Custom Highlight.js theme with CSS variables
|
|
3
|
+
derived from github.min.css and github-dark.min.css
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
/* Base */
|
|
8
|
+
--hljs-bg: #fff;
|
|
9
|
+
--hljs-color: #24292e;
|
|
10
|
+
|
|
11
|
+
/* Tokens */
|
|
12
|
+
--hljs-keyword: #d73a49;
|
|
13
|
+
--hljs-title: #6f42c1;
|
|
14
|
+
--hljs-literal: #005cc5;
|
|
15
|
+
--hljs-string: #032f62;
|
|
16
|
+
--hljs-symbol: #e36209;
|
|
17
|
+
--hljs-comment: #6a737d;
|
|
18
|
+
--hljs-tag: #22863a;
|
|
19
|
+
--hljs-section: #005cc5;
|
|
20
|
+
--hljs-bullet: #735c0f;
|
|
21
|
+
|
|
22
|
+
/* Diffs */
|
|
23
|
+
--hljs-addition-color: #22863a;
|
|
24
|
+
--hljs-addition-bg: #f0fff4;
|
|
25
|
+
--hljs-deletion-color: #b31d28;
|
|
26
|
+
--hljs-deletion-bg: #ffeef0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html.dark {
|
|
30
|
+
/* Base */
|
|
31
|
+
--hljs-bg: #0d1117;
|
|
32
|
+
--hljs-color: #c9d1d9;
|
|
33
|
+
|
|
34
|
+
/* Tokens */
|
|
35
|
+
--hljs-keyword: #ff7b72;
|
|
36
|
+
--hljs-title: #d2a8ff;
|
|
37
|
+
--hljs-literal: #79c0ff;
|
|
38
|
+
--hljs-string: #a5d6ff;
|
|
39
|
+
--hljs-symbol: #ffa657;
|
|
40
|
+
--hljs-comment: #8b949e;
|
|
41
|
+
--hljs-tag: #7ee787;
|
|
42
|
+
--hljs-section: #1f6feb;
|
|
43
|
+
--hljs-bullet: #f2cc60;
|
|
44
|
+
|
|
45
|
+
/* Diffs */
|
|
46
|
+
--hljs-addition-color: #aff5b4;
|
|
47
|
+
--hljs-addition-bg: #033a16;
|
|
48
|
+
--hljs-deletion-color: #ffdcd7;
|
|
49
|
+
--hljs-deletion-bg: #67060c;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* --- Base --- */
|
|
53
|
+
pre code.hljs{
|
|
54
|
+
display:block;
|
|
55
|
+
overflow-x:auto;
|
|
56
|
+
padding:1em
|
|
57
|
+
}
|
|
58
|
+
code.hljs{
|
|
59
|
+
padding:3px 5px
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* --- Mapped styles --- */
|
|
63
|
+
.hljs {
|
|
64
|
+
color: var(--hljs-color);
|
|
65
|
+
background: var(--hljs-bg);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.hljs-doctag,
|
|
69
|
+
.hljs-keyword,
|
|
70
|
+
.hljs-meta .hljs-keyword,
|
|
71
|
+
.hljs-template-tag,
|
|
72
|
+
.hljs-template-variable,
|
|
73
|
+
.hljs-type,
|
|
74
|
+
.hljs-variable.language_ {
|
|
75
|
+
color: var(--hljs-keyword);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.hljs-title,
|
|
79
|
+
.hljs-title.class_,
|
|
80
|
+
.hljs-title.class_.inherited__,
|
|
81
|
+
.hljs-title.function_ {
|
|
82
|
+
color: var(--hljs-title);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hljs-attr,
|
|
86
|
+
.hljs-attribute,
|
|
87
|
+
.hljs-literal,
|
|
88
|
+
.hljs-meta,
|
|
89
|
+
.hljs-number,
|
|
90
|
+
.hljs-operator,
|
|
91
|
+
.hljs-selector-attr,
|
|
92
|
+
.hljs-selector-class,
|
|
93
|
+
.hljs-selector-id,
|
|
94
|
+
.hljs-variable {
|
|
95
|
+
color: var(--hljs-literal);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hljs-meta .hljs-string,
|
|
99
|
+
.hljs-regexp,
|
|
100
|
+
.hljs-string {
|
|
101
|
+
color: var(--hljs-string);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.hljs-built_in,
|
|
105
|
+
.hljs-symbol {
|
|
106
|
+
color: var(--hljs-symbol);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.hljs-code,
|
|
110
|
+
.hljs-comment,
|
|
111
|
+
.hljs-formula {
|
|
112
|
+
color: var(--hljs-comment);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.hljs-name,
|
|
116
|
+
.hljs-quote,
|
|
117
|
+
.hljs-selector-pseudo,
|
|
118
|
+
.hljs-selector-tag {
|
|
119
|
+
color: var(--hljs-tag);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hljs-subst {
|
|
123
|
+
color: var(--hljs-color);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.hljs-section {
|
|
127
|
+
color: var(--hljs-section);
|
|
128
|
+
font-weight: 700;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.hljs-bullet {
|
|
132
|
+
color: var(--hljs-bullet);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.hljs-emphasis {
|
|
136
|
+
font-style: italic;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.hljs-strong {
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.hljs-addition {
|
|
144
|
+
color: var(--hljs-addition-color);
|
|
145
|
+
background-color: var(--hljs-addition-bg);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.hljs-deletion {
|
|
149
|
+
color: var(--hljs-deletion-color);
|
|
150
|
+
background-color: var(--hljs-deletion-bg);
|
|
151
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.theme-claude {
|
|
2
|
+
&:root {
|
|
3
|
+
--background: oklch(0.98 0.01 95.10);
|
|
4
|
+
--foreground: oklch(0.34 0.03 95.72);
|
|
5
|
+
--card: oklch(0.98 0.01 95.10);
|
|
6
|
+
--card-foreground: oklch(0.19 0.00 106.59);
|
|
7
|
+
--popover: oklch(1.00 0 0);
|
|
8
|
+
--popover-foreground: oklch(0.27 0.02 98.94);
|
|
9
|
+
--primary: oklch(0.62 0.14 39.04);
|
|
10
|
+
--primary-foreground: oklch(1.00 0 0);
|
|
11
|
+
--secondary: oklch(0.92 0.01 92.99);
|
|
12
|
+
--secondary-foreground: oklch(0.43 0.02 98.60);
|
|
13
|
+
--muted: oklch(0.93 0.02 90.24);
|
|
14
|
+
--muted-foreground: oklch(0.61 0.01 97.42);
|
|
15
|
+
--accent: oklch(0.92 0.01 92.99);
|
|
16
|
+
--accent-foreground: oklch(0.27 0.02 98.94);
|
|
17
|
+
--destructive: oklch(0.19 0.00 106.59);
|
|
18
|
+
--destructive-foreground: oklch(1.00 0 0);
|
|
19
|
+
--border: oklch(0.88 0.01 97.36);
|
|
20
|
+
--input: oklch(0.76 0.02 98.35);
|
|
21
|
+
--ring: oklch(0.59 0.17 253.06);
|
|
22
|
+
--chart-1: oklch(0.56 0.13 43.00);
|
|
23
|
+
--chart-2: oklch(0.69 0.16 290.41);
|
|
24
|
+
--chart-3: oklch(0.88 0.03 93.13);
|
|
25
|
+
--chart-4: oklch(0.88 0.04 298.18);
|
|
26
|
+
--chart-5: oklch(0.56 0.13 42.06);
|
|
27
|
+
--sidebar: oklch(0.97 0.01 98.88);
|
|
28
|
+
--sidebar-foreground: oklch(0.36 0.01 106.65);
|
|
29
|
+
--sidebar-primary: oklch(0.62 0.14 39.04);
|
|
30
|
+
--sidebar-primary-foreground: oklch(0.99 0 0);
|
|
31
|
+
--sidebar-accent: oklch(0.92 0.01 92.99);
|
|
32
|
+
--sidebar-accent-foreground: oklch(0.33 0 0);
|
|
33
|
+
--sidebar-border: oklch(0.94 0 0);
|
|
34
|
+
--sidebar-ring: oklch(0.77 0 0);
|
|
35
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
36
|
+
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
37
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
38
|
+
--radius: 0.5rem;
|
|
39
|
+
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
40
|
+
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
41
|
+
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
42
|
+
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
43
|
+
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
|
44
|
+
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
|
45
|
+
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
|
46
|
+
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.dark {
|
|
50
|
+
--background: oklch(0.27 0.00 106.64);
|
|
51
|
+
--foreground: oklch(0.81 0.01 93.01);
|
|
52
|
+
--card: oklch(0.27 0.00 106.64);
|
|
53
|
+
--card-foreground: oklch(0.98 0.01 95.10);
|
|
54
|
+
--popover: oklch(0.31 0.00 106.60);
|
|
55
|
+
--popover-foreground: oklch(0.92 0.00 106.48);
|
|
56
|
+
--primary: oklch(0.67 0.13 38.76);
|
|
57
|
+
--primary-foreground: oklch(1.00 0 0);
|
|
58
|
+
--secondary: oklch(0.98 0.01 95.10);
|
|
59
|
+
--secondary-foreground: oklch(0.31 0.00 106.60);
|
|
60
|
+
--muted: oklch(0.22 0.00 106.71);
|
|
61
|
+
--muted-foreground: oklch(0.77 0.02 99.07);
|
|
62
|
+
--accent: oklch(0.21 0.01 95.42);
|
|
63
|
+
--accent-foreground: oklch(0.97 0.01 98.88);
|
|
64
|
+
--destructive: oklch(0.64 0.21 25.33);
|
|
65
|
+
--destructive-foreground: oklch(1.00 0 0);
|
|
66
|
+
--border: oklch(0.36 0.01 106.89);
|
|
67
|
+
--input: oklch(0.43 0.01 100.22);
|
|
68
|
+
--ring: oklch(0.59 0.17 253.06);
|
|
69
|
+
--chart-1: oklch(0.56 0.13 43.00);
|
|
70
|
+
--chart-2: oklch(0.69 0.16 290.41);
|
|
71
|
+
--chart-3: oklch(0.21 0.01 95.42);
|
|
72
|
+
--chart-4: oklch(0.31 0.05 289.32);
|
|
73
|
+
--chart-5: oklch(0.56 0.13 42.06);
|
|
74
|
+
--sidebar: oklch(0.24 0.00 67.71);
|
|
75
|
+
--sidebar-foreground: oklch(0.81 0.01 93.01);
|
|
76
|
+
--sidebar-primary: oklch(0.33 0 0);
|
|
77
|
+
--sidebar-primary-foreground: oklch(0.99 0 0);
|
|
78
|
+
--sidebar-accent: oklch(0.17 0.00 106.62);
|
|
79
|
+
--sidebar-accent-foreground: oklch(0.81 0.01 93.01);
|
|
80
|
+
--sidebar-border: oklch(0.94 0 0);
|
|
81
|
+
--sidebar-ring: oklch(0.77 0 0);
|
|
82
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
83
|
+
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
84
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
85
|
+
--radius: 0.5rem;
|
|
86
|
+
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
87
|
+
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
88
|
+
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
89
|
+
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
90
|
+
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
|
91
|
+
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
|
92
|
+
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
|
93
|
+
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
|
94
|
+
}
|
|
95
|
+
}
|