rizzo-css 0.0.21 → 0.0.23
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 +3 -3
- package/bin/rizzo-css.js +132 -49
- package/dist/rizzo.min.css +4 -4
- package/package.json +1 -1
- package/scaffold/astro/Navbar.astro +11 -3
- package/scaffold/astro/icons/Cat.astro +27 -0
- package/scaffold/astro-minimal/{README.md → README-RIZZO.md} +5 -2
- package/scaffold/astro-minimal/src/layouts/Layout.astro +1 -2
- package/scaffold/svelte/Navbar.svelte +12 -2
- package/scaffold/svelte/icons/Cat.svelte +28 -0
- package/scaffold/svelte-minimal/{README.md → README-RIZZO.md} +5 -2
- package/scaffold/vanilla/{README.md → README-RIZZO.md} +4 -4
- package/scaffold/vanilla/components/accordion.html +18 -0
- package/scaffold/vanilla/components/alert.html +18 -0
- package/scaffold/vanilla/components/avatar.html +18 -0
- package/scaffold/vanilla/components/badge.html +18 -0
- package/scaffold/vanilla/components/breadcrumb.html +18 -0
- package/scaffold/vanilla/components/button.html +18 -0
- package/scaffold/vanilla/components/cards.html +18 -0
- package/scaffold/vanilla/components/copy-to-clipboard.html +18 -0
- package/scaffold/vanilla/components/divider.html +18 -0
- package/scaffold/vanilla/components/dropdown.html +18 -0
- package/scaffold/vanilla/components/forms.html +18 -0
- package/scaffold/vanilla/components/icons.html +18 -0
- package/scaffold/vanilla/components/index.html +18 -0
- package/scaffold/vanilla/components/modal.html +18 -0
- package/scaffold/vanilla/components/navbar.html +18 -0
- package/scaffold/vanilla/components/pagination.html +18 -0
- package/scaffold/vanilla/components/progress-bar.html +18 -0
- package/scaffold/vanilla/components/search.html +18 -0
- package/scaffold/vanilla/components/settings.html +18 -0
- package/scaffold/vanilla/components/spinner.html +18 -0
- package/scaffold/vanilla/components/table.html +18 -0
- package/scaffold/vanilla/components/tabs.html +18 -0
- package/scaffold/vanilla/components/theme-switcher.html +18 -0
- package/scaffold/vanilla/components/toast.html +18 -0
- package/scaffold/vanilla/components/tooltip.html +18 -0
- package/scaffold/vanilla/icons/Cat.svg +11 -0
- package/scaffold/vanilla/index.html +18 -0
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import Cat from './icons/Cat.astro';
|
|
3
|
+
interface Props { siteName?: string; logo?: string; }
|
|
4
|
+
const { siteName = 'Site', logo } = Astro.props;
|
|
4
5
|
---
|
|
5
6
|
<nav class="navbar" role="navigation" aria-label="Main navigation">
|
|
6
7
|
<div class="navbar__container">
|
|
7
8
|
<div class="navbar__brand">
|
|
8
|
-
<a href="/" class="navbar__brand-link">
|
|
9
|
+
<a href="/" class="navbar__brand-link">
|
|
10
|
+
{logo ? (
|
|
11
|
+
<img src={logo} alt="" class="navbar__logo" />
|
|
12
|
+
) : (
|
|
13
|
+
<Cat width={32} height={32} class="navbar__logo" aria-hidden="true" />
|
|
14
|
+
)}
|
|
15
|
+
{siteName}
|
|
16
|
+
</a>
|
|
9
17
|
</div>
|
|
10
18
|
<button type="button" class="navbar__toggle" aria-label="Toggle menu" aria-expanded="false">
|
|
11
19
|
<span class="navbar__toggle-icon" aria-hidden="true"><span></span><span></span><span></span></span>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Cat icon (e.g. for pink/cute themes)
|
|
3
|
+
// License: MIT
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { width = 16, height = 16, class: className = '' } = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<svg
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
width={width}
|
|
17
|
+
height={height}
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
fill="currentColor"
|
|
20
|
+
class={className}
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
>
|
|
23
|
+
<path d="M9.606 5.563c.766 0 .914-.157 2.394-.157s1.628.157 2.394.157c.638 0 2.554-1.563 3.511-1.563s2.075.563 2.075 2.188v1.875c-.002.492-.18 2-.88 1.597c1.111 1.314.88 2.922.88 4.34c0 3.906-5.267 5-7.98 5s-7.98-1.094-7.98-5c0-1.418-.231-3.026.88-4.34c-.7.403-.878-1.105-.88-1.598V6.188C4.02 4.563 5.137 4 6.095 4c.957 0 2.873 1.563 3.511 1.563" opacity="0.5"/>
|
|
24
|
+
<path d="M9.016 11.063c-.489 0-.815.317-.98.583a1.8 1.8 0 0 0-.254.948c0 .332.082.67.254.947c.165.266.491.584.98.584c.49 0 .815-.318.98-.584c.172-.278.254-.615.254-.947c0-.333-.082-.67-.254-.948c-.165-.266-.49-.584-.98-.584m5.021.584c.164-.266.49-.584.98-.584c.488 0 .814.318.979.584c.172.278.254.615.254.948s-.082.67-.254.947c-.165.266-.49.584-.98.584c-.489 0-.815-.318-.98-.584a1.8 1.8 0 0 1-.254-.947c0-.333.082-.67.255-.948"/>
|
|
25
|
+
<path fill-rule="evenodd" d="M11.178 14.08a2.4 2.4 0 0 1 .841-.143c.292 0 .59.045.842.143a1.3 1.3 0 0 1 .408.245c.134.123.307.35.307.675a.92.92 0 0 1-.307.675a1.3 1.3 0 0 1-.408.245c-.253.098-.55.143-.842.143c-.29 0-.588-.045-.84-.143a1.3 1.3 0 0 1-.41-.245a.92.92 0 0 1-.306-.675c0-.325.173-.552.307-.675a1.3 1.3 0 0 1 .408-.245" clip-rule="evenodd"/>
|
|
26
|
+
<path d="M17.863 13.375a.75.75 0 0 1 .75-.75c.296 0 .65.067.981.149c.345.085.72.199 1.076.321c.684.234 1.41.532 1.737.744a.75.75 0 0 1-.813 1.26c-.157-.101-.722-.35-1.409-.585a12 12 0 0 0-.95-.284a3 3 0 0 0-.622-.105a.75.75 0 0 1-.75-.75m.105 1.75a.75.75 0 1 0 0 1.5c.206 0 .55.115.98.343c.342.18.656.385.901.545l.131.086a.75.75 0 0 0 .814-1.26l-.113-.074a13 13 0 0 0-1.032-.623c-.457-.242-1.08-.517-1.681-.517m-14.153-.611c-.687.235-1.252.484-1.408.585a.75.75 0 0 1-.814-1.26c.328-.212 1.053-.51 1.737-.744c.357-.122.732-.237 1.077-.321c.33-.082.684-.149.98-.149a.75.75 0 0 1 0 1.5c-.107 0-.317.03-.622.105c-.29.072-.621.172-.95.284m.205 3.085l.131-.086c.246-.16.56-.365.901-.545c.431-.228.775-.343.98-.343a.75.75 0 0 0 0-1.5c-.6 0-1.224.275-1.68.517c-.41.216-.79.465-1.033.623l-.113.074a.75.75 0 0 0 .814 1.26"/>
|
|
27
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Astro + Rizzo CSS (minimal)
|
|
2
2
|
|
|
3
|
-
Minimal Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework astro --template full
|
|
3
|
+
Minimal Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework astro --template full`, **minimal**, or **manual**.
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
@@ -26,7 +26,10 @@ Minimal Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init --fram
|
|
|
26
26
|
- `astro.config.mjs` — Astro configuration
|
|
27
27
|
- `src/layouts/Layout.astro` — Layout with Rizzo CSS and theme (edit `data-theme` for default)
|
|
28
28
|
- `src/pages/index.astro` — Home page
|
|
29
|
-
- `public/css/rizzo.min.css` — Rizzo CSS bundle
|
|
29
|
+
- `public/css/rizzo.min.css` — Rizzo CSS bundle (added by CLI; font URLs point to `/assets/fonts/`)
|
|
30
|
+
- `public/assets/fonts/` — Rizzo font files (added by CLI)
|
|
31
|
+
- `README-RIZZO.md` — This file (scaffold docs; does not replace your project README)
|
|
32
|
+
- `LICENSE-RIZZO` — Rizzo CSS license (does not replace your project LICENSE)
|
|
30
33
|
|
|
31
34
|
## Commands
|
|
32
35
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
/* Placeholders replaced by rizzo-css CLI when scaffolding */
|
|
3
|
+
/* {{THEME_LIST_COMMENT}} */
|
|
3
4
|
const DATA_THEME = '{{DATA_THEME}}';
|
|
4
|
-
const THEME_LIST_COMMENT = '{{THEME_LIST_COMMENT}}';
|
|
5
5
|
/** @type {{ title?: string }} */
|
|
6
6
|
const { title = '{{TITLE}}' } = Astro.props;
|
|
7
7
|
---
|
|
8
8
|
<!doctype html>
|
|
9
9
|
<html lang="en" data-theme={DATA_THEME}>
|
|
10
|
-
{THEME_LIST_COMMENT}
|
|
11
10
|
<head>
|
|
12
11
|
<meta charset="UTF-8" />
|
|
13
12
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import Cat from './icons/Cat.svelte';
|
|
3
|
+
|
|
2
4
|
interface Props {
|
|
3
5
|
siteName?: string;
|
|
6
|
+
logo?: string;
|
|
4
7
|
}
|
|
5
|
-
let { siteName = 'Site' }: Props = $props();
|
|
8
|
+
let { siteName = 'Site', logo }: Props = $props();
|
|
6
9
|
let menuOpen = $state(false);
|
|
7
10
|
</script>
|
|
8
11
|
|
|
9
12
|
<nav class="navbar" role="navigation" aria-label="Main navigation">
|
|
10
13
|
<div class="navbar__container">
|
|
11
14
|
<div class="navbar__brand">
|
|
12
|
-
<a href="/" class="navbar__brand-link">
|
|
15
|
+
<a href="/" class="navbar__brand-link">
|
|
16
|
+
{#if logo}
|
|
17
|
+
<img src={logo} alt="" class="navbar__logo" />
|
|
18
|
+
{:else}
|
|
19
|
+
<Cat width={32} height={32} class="navbar__logo" aria-hidden="true" />
|
|
20
|
+
{/if}
|
|
21
|
+
{siteName}
|
|
22
|
+
</a>
|
|
13
23
|
</div>
|
|
14
24
|
<button
|
|
15
25
|
type="button"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
let { width = 16, height = 16, class: className = '' }: Props = $props();
|
|
8
|
+
</script>
|
|
9
|
+
<svg
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{width}
|
|
12
|
+
{height}
|
|
13
|
+
viewBox="0 0 24 24"
|
|
14
|
+
fill="currentColor"
|
|
15
|
+
class={`icon rizzo-icon ${className}`.trim()}
|
|
16
|
+
aria-hidden="true"
|
|
17
|
+
>
|
|
18
|
+
<path d="M9.606 5.563c.766 0 .914-.157 2.394-.157s1.628.157 2.394.157c.638 0 2.554-1.563 3.511-1.563s2.075.563 2.075 2.188v1.875c-.002.492-.18 2-.88 1.597c1.111 1.314.88 2.922.88 4.34c0 3.906-5.267 5-7.98 5s-7.98-1.094-7.98-5c0-1.418-.231-3.026.88-4.34c-.7.403-.878-1.105-.88-1.598V6.188C4.02 4.563 5.137 4 6.095 4c.957 0 2.873 1.563 3.511 1.563" opacity="0.5"/>
|
|
19
|
+
<path d="M9.016 11.063c-.489 0-.815.317-.98.583a1.8 1.8 0 0 0-.254.948c0 .332.082.67.254.947c.165.266.491.584.98.584c.49 0 .815-.318.98-.584c.172-.278.254-.615.254-.947c0-.333-.082-.67-.254-.948c-.165-.266-.49-.584-.98-.584m5.021.584c.164-.266.49-.584.98-.584c.488 0 .814.318.979.584c.172.278.254.615.254.948s-.082.67-.254.947c-.165.266-.49.584-.98.584c-.489 0-.815-.318-.98-.584a1.8 1.8 0 0 1-.254-.947c0-.333.082-.67.255-.948"/>
|
|
20
|
+
<path fill-rule="evenodd" d="M11.178 14.08a2.4 2.4 0 0 1 .841-.143c.292 0 .59.045.842.143a1.3 1.3 0 0 1 .408.245c.134.123.307.35.307.675a.92.92 0 0 1-.307.675a1.3 1.3 0 0 1-.408.245c-.253.098-.55.143-.842.143c-.29 0-.588-.045-.84-.143a1.3 1.3 0 0 1-.41-.245a.92.92 0 0 1-.306-.675c0-.325.173-.552.307-.675a1.3 1.3 0 0 1 .408-.245" clip-rule="evenodd"/>
|
|
21
|
+
<path d="M17.863 13.375a.75.75 0 0 1 .75-.75c.296 0 .65.067.981.149c.345.085.72.199 1.076.321c.684.234 1.41.532 1.737.744a.75.75 0 0 1-.813 1.26c-.157-.101-.722-.35-1.409-.585a12 12 0 0 0-.95-.284a3 3 0 0 0-.622-.105a.75.75 0 0 1-.75-.75m.105 1.75a.75.75 0 1 0 0 1.5c.206 0 .55.115.98.343c.342.18.656.385.901.545l.131.086a.75.75 0 0 0 .814-1.26l-.113-.074a13 13 0 0 0-1.032-.623c-.457-.242-1.08-.517-1.681-.517m-14.153-.611c-.687.235-1.252.484-1.408.585a.75.75 0 0 1-.814-1.26c.328-.212 1.053-.51 1.737-.744c.357-.122.732-.237 1.077-.321c.33-.082.684-.149.98-.149a.75.75 0 0 1 0 1.5c-.107 0-.317.03-.622.105c-.29.072-.621.172-.95.284m.205 3.085l.131-.086c.246-.16.56-.365.901-.545c.431-.228.775-.343.98-.343a.75.75 0 0 0 0-1.5c-.6 0-1.224.275-1.68.517c-.41.216-.79.465-1.033.623l-.113.074a.75.75 0 0 0 .814 1.26"/>
|
|
22
|
+
</svg>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
.rizzo-icon {
|
|
26
|
+
color: var(--icon);
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SvelteKit + Rizzo CSS (minimal)
|
|
2
2
|
|
|
3
|
-
Minimal SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework svelte --template full
|
|
3
|
+
Minimal SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework svelte --template full`, **minimal**, or **manual**.
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
@@ -26,7 +26,10 @@ Minimal SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init --
|
|
|
26
26
|
- `src/app.html` — HTML shell with Rizzo CSS and theme (edit `data-theme` for default)
|
|
27
27
|
- `src/routes/+layout.svelte` — Root layout
|
|
28
28
|
- `src/routes/+page.svelte` — Home page
|
|
29
|
-
- `static/css/rizzo.min.css` — Rizzo CSS bundle (
|
|
29
|
+
- `static/css/rizzo.min.css` — Rizzo CSS bundle (added by CLI; font URLs point to `/assets/fonts/`)
|
|
30
|
+
- `static/assets/fonts/` — Rizzo font files (added by CLI)
|
|
31
|
+
- `README-RIZZO.md` — This file (scaffold docs; does not replace your project README)
|
|
32
|
+
- `LICENSE-RIZZO` — Rizzo CSS license (does not replace your project LICENSE)
|
|
30
33
|
|
|
31
34
|
## Commands
|
|
32
35
|
|
|
@@ -13,7 +13,7 @@ If you prefer to load CSS from a CDN instead of the local file, replace the `<li
|
|
|
13
13
|
- `<link rel="stylesheet" href="https://unpkg.com/rizzo-css@latest/dist/rizzo.min.css" />`
|
|
14
14
|
- Or jsDelivr: `https://cdn.jsdelivr.net/npm/rizzo-css@latest/dist/rizzo.min.css`
|
|
15
15
|
|
|
16
|
-
(Replace `@latest` with a specific version, e.g. `@0.0.
|
|
16
|
+
(Replace `@latest` with a specific version, e.g. `@0.0.23`, in production.)
|
|
17
17
|
|
|
18
18
|
The CLI replaces placeholders in `index.html` (e.g. `{{DATA_THEME}}`, `{{TITLE}}`) when you run `rizzo-css init`. The theme selected during init is used on first load when you have no saved preference in the browser.
|
|
19
19
|
|
|
@@ -24,7 +24,7 @@ The CLI replaces placeholders in `index.html` (e.g. `{{DATA_THEME}}`, `{{TITLE}}
|
|
|
24
24
|
- **CSS** — The CLI copies `css/rizzo.min.css`; the link uses `{{LINK_HREF}}` (replaced at init). To use a CDN, replace that with the CDN URL.
|
|
25
25
|
- **Scripts** — `js/main.js` provides theme sync, settings panel, toast, tabs, modal, dropdown, accordion. Customize or extend as needed.
|
|
26
26
|
|
|
27
|
-
## What
|
|
27
|
+
## What's included
|
|
28
28
|
|
|
29
29
|
- **Theme flash prevention** — Small inline script in `<head>` applies saved theme and settings before first paint.
|
|
30
30
|
- **js/main.js** — Bundled vanilla JS for components (loaded via `<script src="js/main.js"></script>`):
|
|
@@ -48,7 +48,7 @@ pnpm dlx serve .
|
|
|
48
48
|
|
|
49
49
|
## Other scaffolds
|
|
50
50
|
|
|
51
|
-
- **Astro:** `scaffold/astro-minimal/` — minimal Astro app; optional components from `scaffold/astro/` (see
|
|
52
|
-
- **Svelte:** `scaffold/svelte-minimal/` — minimal SvelteKit app; optional components from `scaffold/svelte/` (see
|
|
51
|
+
- **Astro:** `scaffold/astro-minimal/` — minimal Astro app; optional components from `scaffold/astro/` (see README-RIZZO.md).
|
|
52
|
+
- **Svelte:** `scaffold/svelte-minimal/` — minimal SvelteKit app; optional components from `scaffold/svelte/` (see README-RIZZO.md).
|
|
53
53
|
|
|
54
54
|
Docs: [rizzo-css.vercel.app](https://rizzo-css.vercel.app)
|