rizzo-css 0.0.73 → 0.0.75
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 +24 -24
- package/dist/rizzo.min.css +9 -7
- package/package.json +4 -4
- package/scaffold/astro/Footer.astro +1 -1
- package/scaffold/astro/base/README-RIZZO.md +1 -1
- package/scaffold/astro/variants/full/README-RIZZO.md +1 -1
- package/scaffold/react/base/package.json +1 -1
- package/scaffold/svelte/Chart.svelte +34 -0
- package/scaffold/svelte/Command.svelte +89 -0
- package/scaffold/svelte/Direction.svelte +17 -0
- package/scaffold/svelte/InputOtp.svelte +57 -0
- package/scaffold/svelte/Menubar.svelte +78 -0
- package/scaffold/svelte/base/README-RIZZO.md +2 -1
- package/scaffold/svelte/base/vite.config.js +6 -0
- package/scaffold/svelte/variants/full/README-RIZZO.md +2 -1
- package/scaffold/svelte/variants/full/vite.config.js +6 -0
- package/scaffold/vanilla/README-RIZZO.md +2 -2
- package/scaffold/vanilla/components/accordion.html +22 -0
- package/scaffold/vanilla/components/alert-dialog.html +22 -0
- package/scaffold/vanilla/components/alert.html +22 -0
- package/scaffold/vanilla/components/aspect-ratio.html +22 -0
- package/scaffold/vanilla/components/avatar.html +22 -0
- package/scaffold/vanilla/components/back-to-top.html +22 -0
- package/scaffold/vanilla/components/badge.html +22 -0
- package/scaffold/vanilla/components/breadcrumb.html +22 -0
- package/scaffold/vanilla/components/button-group.html +22 -0
- package/scaffold/vanilla/components/button.html +22 -0
- package/scaffold/vanilla/components/calendar.html +22 -0
- package/scaffold/vanilla/components/cards.html +22 -0
- package/scaffold/vanilla/components/carousel.html +22 -0
- package/scaffold/vanilla/components/chart.html +870 -0
- package/scaffold/vanilla/components/collapsible.html +22 -0
- package/scaffold/vanilla/components/command.html +870 -0
- package/scaffold/vanilla/components/context-menu.html +22 -0
- package/scaffold/vanilla/components/copy-to-clipboard.html +22 -0
- package/scaffold/vanilla/components/dashboard.html +22 -0
- package/scaffold/vanilla/components/direction.html +870 -0
- package/scaffold/vanilla/components/divider.html +22 -0
- package/scaffold/vanilla/components/docs-sidebar.html +22 -0
- package/scaffold/vanilla/components/dropdown.html +22 -0
- package/scaffold/vanilla/components/empty.html +22 -0
- package/scaffold/vanilla/components/font-switcher.html +22 -0
- package/scaffold/vanilla/components/footer.html +22 -0
- package/scaffold/vanilla/components/forms.html +22 -0
- package/scaffold/vanilla/components/hover-card.html +22 -0
- package/scaffold/vanilla/components/icons.html +22 -0
- package/scaffold/vanilla/components/index.html +27 -0
- package/scaffold/vanilla/components/input-group.html +22 -0
- package/scaffold/vanilla/components/input-otp.html +870 -0
- package/scaffold/vanilla/components/kbd.html +22 -0
- package/scaffold/vanilla/components/label.html +22 -0
- package/scaffold/vanilla/components/menubar.html +870 -0
- package/scaffold/vanilla/components/modal.html +22 -0
- package/scaffold/vanilla/components/navbar.html +22 -0
- package/scaffold/vanilla/components/pagination.html +22 -0
- package/scaffold/vanilla/components/popover.html +22 -0
- package/scaffold/vanilla/components/progress-bar.html +22 -0
- package/scaffold/vanilla/components/range-calendar.html +22 -0
- package/scaffold/vanilla/components/resizable.html +22 -0
- package/scaffold/vanilla/components/scroll-area.html +22 -0
- package/scaffold/vanilla/components/search.html +22 -0
- package/scaffold/vanilla/components/separator.html +22 -0
- package/scaffold/vanilla/components/settings.html +22 -0
- package/scaffold/vanilla/components/sheet.html +22 -0
- package/scaffold/vanilla/components/skeleton.html +22 -0
- package/scaffold/vanilla/components/slider.html +22 -0
- package/scaffold/vanilla/components/sound-effects.html +22 -0
- package/scaffold/vanilla/components/spinner.html +22 -0
- package/scaffold/vanilla/components/switch.html +22 -0
- package/scaffold/vanilla/components/table.html +22 -0
- package/scaffold/vanilla/components/tabs.html +22 -0
- package/scaffold/vanilla/components/theme-switcher.html +22 -0
- package/scaffold/vanilla/components/toast.html +22 -0
- package/scaffold/vanilla/components/toggle-group.html +22 -0
- package/scaffold/vanilla/components/toggle.html +22 -0
- package/scaffold/vanilla/components/tooltip.html +22 -0
- package/scaffold/vanilla/index.html +22 -0
- package/scaffold/vue/base/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rizzo-css",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.75",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18"
|
|
6
6
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
|
-
"rizzo-css": "
|
|
23
|
+
"rizzo-css": "bin/rizzo-css.js"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
".env.example",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
],
|
|
54
54
|
"repository": {
|
|
55
55
|
"type": "git",
|
|
56
|
-
"url": "https://github.com/mingleusa/rizzo-css.git"
|
|
56
|
+
"url": "git+https://github.com/mingleusa/rizzo-css.git"
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://rizzo-css.vercel.app",
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"author": "mingleusa"
|
|
61
|
-
}
|
|
61
|
+
}
|
|
@@ -13,7 +13,7 @@ interface Props {
|
|
|
13
13
|
links?: FooterLink[];
|
|
14
14
|
/** Optional class for the root element */
|
|
15
15
|
class?: string;
|
|
16
|
-
/** Optional version string (e.g. from package.json); shown as "v0.0.
|
|
16
|
+
/** Optional version string (e.g. from package.json); shown as "v0.0.75" with link to CHANGELOG */
|
|
17
17
|
version?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Design system · Vanilla · Astro · Svelte
|
|
16
16
|
</pre>
|
|
17
17
|
|
|
18
|
-
Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Astro, then **Landing**, **Docs**, **Dashboard**, or **Full**. **Full** = clone of the docs site. **Landing** / **Docs** / **Dashboard** = base + component picker (all
|
|
18
|
+
Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Astro, then **Landing**, **Docs**, **Dashboard**, or **Full**. **Full** = clone of the docs site. **Landing** / **Docs** / **Dashboard** = base + component picker (all 58 or pick). Same template choice for **Add to existing** (`npx rizzo-css add`).
|
|
19
19
|
|
|
20
20
|
## Setup
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Design system · Vanilla · Astro · Svelte
|
|
16
16
|
</pre>
|
|
17
17
|
|
|
18
|
-
Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Astro, then **Full** template. **Full** = clone of the Rizzo docs site (no component picker). **Landing** / **Docs** / **Dashboard** = base + component picker (all
|
|
18
|
+
Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Astro, then **Full** template. **Full** = clone of the Rizzo docs site (no component picker). **Landing** / **Docs** / **Dashboard** = base + component picker (all 58 or pick). Same template choice for **Add to existing** (`npx rizzo-css add`).
|
|
19
19
|
|
|
20
20
|
## Setup
|
|
21
21
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface ChartDataItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
data?: ChartDataItem[];
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
data = [
|
|
14
|
+
{ label: 'A', value: 40 },
|
|
15
|
+
{ label: 'B', value: 65 },
|
|
16
|
+
{ label: 'C', value: 30 },
|
|
17
|
+
],
|
|
18
|
+
class: className = '',
|
|
19
|
+
}: Props = $props();
|
|
20
|
+
|
|
21
|
+
const max = $derived(Math.max(1, ...data.map((d) => d.value)));
|
|
22
|
+
const ariaLabel = $derived(`Bar chart: ${data.map((d) => `${d.label} ${d.value}`).join(', ')}`);
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="chart {className}" role="img" aria-label={ariaLabel}>
|
|
26
|
+
<div class="chart__bars">
|
|
27
|
+
{#each data as d (d.label)}
|
|
28
|
+
<div class="chart__bar-wrap">
|
|
29
|
+
<div class="chart__bar" style="height: {(d.value / max) * 100}%" />
|
|
30
|
+
<span class="chart__label">{d.label}</span>
|
|
31
|
+
</div>
|
|
32
|
+
{/each}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface CommandItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
shortcut?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
triggerLabel?: string;
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
items?: CommandItem[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
triggerLabel = 'Open command palette (⌘K)',
|
|
17
|
+
searchPlaceholder = 'Search…',
|
|
18
|
+
items = [],
|
|
19
|
+
class: className = '',
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
|
|
22
|
+
let open = $state(false);
|
|
23
|
+
let query = $state('');
|
|
24
|
+
let selectedIndex = $state(0);
|
|
25
|
+
let searchEl: HTMLInputElement;
|
|
26
|
+
|
|
27
|
+
const filtered = $derived(items.filter((item) => item.label.toLowerCase().includes(query.toLowerCase())));
|
|
28
|
+
|
|
29
|
+
$effect(() => {
|
|
30
|
+
if (filtered.length) selectedIndex = 0;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
function close() {
|
|
34
|
+
open = false;
|
|
35
|
+
query = '';
|
|
36
|
+
selectedIndex = 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function onKey(e: KeyboardEvent) {
|
|
40
|
+
if (e.key === 'Escape') close();
|
|
41
|
+
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
open = !open;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
$effect(() => {
|
|
48
|
+
if (!open) return;
|
|
49
|
+
document.addEventListener('keydown', onKey);
|
|
50
|
+
queueMicrotask(() => searchEl?.focus());
|
|
51
|
+
return () => document.removeEventListener('keydown', onKey);
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<div class="command-root {className}">
|
|
56
|
+
<button type="button" class="btn btn-outline" onclick={() => (open = true)} aria-haspopup="dialog" aria-expanded={open}>
|
|
57
|
+
{triggerLabel}
|
|
58
|
+
</button>
|
|
59
|
+
{#if open}
|
|
60
|
+
<div class="command__overlay" aria-hidden="false" role="presentation" onclick={close}></div>
|
|
61
|
+
<div class="command__dialog" role="dialog" aria-modal="true" aria-label="Command palette">
|
|
62
|
+
<div class="command__search-wrap">
|
|
63
|
+
<input
|
|
64
|
+
type="search"
|
|
65
|
+
class="command__search"
|
|
66
|
+
placeholder={searchPlaceholder}
|
|
67
|
+
autocomplete="off"
|
|
68
|
+
bind:value={query}
|
|
69
|
+
bind:this={searchEl}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="command__list" role="listbox">
|
|
73
|
+
{#each filtered as item, i}
|
|
74
|
+
<button
|
|
75
|
+
type="button"
|
|
76
|
+
class="command__item"
|
|
77
|
+
role="option"
|
|
78
|
+
aria-selected={i === selectedIndex}
|
|
79
|
+
onclick={close}
|
|
80
|
+
onmouseenter={() => (selectedIndex = i)}
|
|
81
|
+
>
|
|
82
|
+
{item.label}
|
|
83
|
+
{#if item.shortcut}<kbd>{item.shortcut}</kbd>{/if}
|
|
84
|
+
</button>
|
|
85
|
+
{/each}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
{/if}
|
|
89
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
dir?: 'ltr' | 'rtl';
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { dir = 'ltr', class: className = '', children }: Props = $props();
|
|
11
|
+
|
|
12
|
+
const dirClass = $derived(dir === 'rtl' ? 'direction--rtl' : 'direction--ltr');
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div class="direction {dirClass} {className}" {dir}>
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
length?: number;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let { length = 6, ariaLabel = 'One-time code', class: className = '' }: Props = $props();
|
|
9
|
+
|
|
10
|
+
const indices = $derived(Array.from({ length }, (_, i) => i));
|
|
11
|
+
let digits = $state<string[]>(Array(length).fill(''));
|
|
12
|
+
let containerEl: HTMLDivElement;
|
|
13
|
+
|
|
14
|
+
function inputs() {
|
|
15
|
+
return containerEl?.querySelectorAll<HTMLInputElement>('.input-otp__digit') ?? [];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function handleInput(i: number, e: Event) {
|
|
19
|
+
const v = (e.target as HTMLInputElement).value.replace(/\D/g, '').slice(-1);
|
|
20
|
+
digits = [...digits];
|
|
21
|
+
digits[i] = v;
|
|
22
|
+
if (v && i < length - 1) inputs()[i + 1]?.focus();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function handleKeyDown(i: number, e: KeyboardEvent) {
|
|
26
|
+
if (e.key === 'Backspace' && !digits[i] && i > 0) inputs()[i - 1]?.focus();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function handlePaste(e: ClipboardEvent) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const pasted = (e.clipboardData?.getData('text') || '').replace(/\D/g, '').slice(0, length);
|
|
32
|
+
const next = [...digits];
|
|
33
|
+
pasted.split('').forEach((ch, j) => {
|
|
34
|
+
if (next[j] !== undefined) next[j] = ch;
|
|
35
|
+
});
|
|
36
|
+
digits = next;
|
|
37
|
+
const focusIdx = Math.min(pasted.length, length) - 1;
|
|
38
|
+
inputs()[focusIdx]?.focus();
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<div class="input-otp {className}" role="group" aria-label={ariaLabel} bind:this={containerEl}>
|
|
43
|
+
{#each indices as i}
|
|
44
|
+
<input
|
|
45
|
+
type="text"
|
|
46
|
+
inputmode="numeric"
|
|
47
|
+
maxlength="1"
|
|
48
|
+
autocomplete="one-time-code"
|
|
49
|
+
class="input-otp__digit"
|
|
50
|
+
aria-label="Digit {i + 1} of {length}"
|
|
51
|
+
value={digits[i]}
|
|
52
|
+
oninput={(e) => handleInput(i, e)}
|
|
53
|
+
onkeydown={(e) => handleKeyDown(i, e)}
|
|
54
|
+
onpaste={handlePaste}
|
|
55
|
+
/>
|
|
56
|
+
{/each}
|
|
57
|
+
</div>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface MenubarMenuItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface MenubarItem {
|
|
8
|
+
label: string;
|
|
9
|
+
menu: MenubarMenuItem[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
items?: MenubarItem[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
items = [
|
|
19
|
+
{ label: 'File', menu: [{ label: 'New', href: '#' }, { label: 'Open', href: '#' }] },
|
|
20
|
+
{ label: 'Edit', menu: [{ label: 'Undo', href: '#' }] },
|
|
21
|
+
],
|
|
22
|
+
class: className = '',
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
|
|
25
|
+
let openIndex = $state<number | null>(null);
|
|
26
|
+
let navRef: HTMLElement;
|
|
27
|
+
|
|
28
|
+
function close(e?: MouseEvent) {
|
|
29
|
+
if (e && navRef && navRef.contains(e.target as Node)) return;
|
|
30
|
+
openIndex = null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$effect(() => {
|
|
34
|
+
if (openIndex === null) return;
|
|
35
|
+
const onClose = (e: MouseEvent) => close(e);
|
|
36
|
+
const onKey = (e: KeyboardEvent) => {
|
|
37
|
+
if (e.key === 'Escape') openIndex = null;
|
|
38
|
+
};
|
|
39
|
+
const t = setTimeout(() => document.addEventListener('click', onClose), 0);
|
|
40
|
+
document.addEventListener('keydown', onKey);
|
|
41
|
+
return () => {
|
|
42
|
+
clearTimeout(t);
|
|
43
|
+
document.removeEventListener('click', onClose);
|
|
44
|
+
document.removeEventListener('keydown', onKey);
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<nav bind:this={navRef} class="menubar {className}" role="menubar" aria-label="Main menu">
|
|
50
|
+
{#each items as item, i}
|
|
51
|
+
<div class="menubar__item" role="none">
|
|
52
|
+
<button
|
|
53
|
+
type="button"
|
|
54
|
+
role="menuitem"
|
|
55
|
+
class="menubar__trigger"
|
|
56
|
+
aria-haspopup="true"
|
|
57
|
+
aria-expanded={openIndex === i}
|
|
58
|
+
onclick={() => (openIndex = openIndex === i ? null : i)}
|
|
59
|
+
>
|
|
60
|
+
{item.label}
|
|
61
|
+
</button>
|
|
62
|
+
<div
|
|
63
|
+
class="menubar__menu"
|
|
64
|
+
role="menu"
|
|
65
|
+
aria-label={item.label}
|
|
66
|
+
hidden={openIndex !== i}
|
|
67
|
+
>
|
|
68
|
+
{#each item.menu as entry}
|
|
69
|
+
{#if entry.href}
|
|
70
|
+
<a href={entry.href} class="menubar__menu-item" role="menuitem">{entry.label}</a>
|
|
71
|
+
{:else}
|
|
72
|
+
<button type="button" class="menubar__menu-item" role="menuitem" onclick={() => (openIndex = null)}>{entry.label}</button>
|
|
73
|
+
{/if}
|
|
74
|
+
{/each}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
{/each}
|
|
78
|
+
</nav>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Design system · Vanilla · Astro · Svelte
|
|
16
16
|
</pre>
|
|
17
17
|
|
|
18
|
-
SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Svelte, then **Landing**, **Docs**, **Dashboard**, or **Full**. **Full** = clone of the docs site. **Landing** / **Docs** / **Dashboard** = base + component picker (all
|
|
18
|
+
SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Svelte, then **Landing**, **Docs**, **Dashboard**, or **Full**. **Full** = clone of the docs site. **Landing** / **Docs** / **Dashboard** = base + component picker (all 58 or pick). Same template choice for **Add to existing** (`npx rizzo-css add`).
|
|
19
19
|
|
|
20
20
|
## Setup
|
|
21
21
|
|
|
@@ -38,6 +38,7 @@ SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you
|
|
|
38
38
|
## Project structure
|
|
39
39
|
|
|
40
40
|
- `svelte.config.js` — SvelteKit configuration
|
|
41
|
+
- `vite.config.js` — Vite config with SvelteKit plugin (required for `pnpm dev`)
|
|
41
42
|
- `src/app.html` — HTML shell with Rizzo CSS and theme (edit `data-theme` for default)
|
|
42
43
|
- `src/routes/+layout.svelte` — Root layout
|
|
43
44
|
- `src/routes/+page.svelte` — Home page
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Design system · Vanilla · Astro · Svelte
|
|
16
16
|
</pre>
|
|
17
17
|
|
|
18
|
-
SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Svelte, then **Full** template. **Full** = clone of the Rizzo docs site (no component picker). **Landing** / **Docs** / **Dashboard** = base + component picker (all
|
|
18
|
+
SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you chose **Create new** and Svelte, then **Full** template. **Full** = clone of the Rizzo docs site (no component picker). **Landing** / **Docs** / **Dashboard** = base + component picker (all 58 or pick). Same template choice for **Add to existing** (`npx rizzo-css add`).
|
|
19
19
|
|
|
20
20
|
## Setup
|
|
21
21
|
|
|
@@ -38,6 +38,7 @@ SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init` when you
|
|
|
38
38
|
## Project structure
|
|
39
39
|
|
|
40
40
|
- `svelte.config.js` — SvelteKit configuration
|
|
41
|
+
- `vite.config.js` — Vite config with SvelteKit plugin (required for `pnpm dev`)
|
|
41
42
|
- `src/app.html` — HTML shell with Rizzo CSS and theme (edit `data-theme` for default)
|
|
42
43
|
- `src/routes/+layout.svelte` — Root layout
|
|
43
44
|
- `src/routes/+page.svelte` — Home page
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Design system · Vanilla · Astro · Svelte
|
|
16
16
|
</pre>
|
|
17
17
|
|
|
18
|
-
This project was scaffolded with `npx rizzo-css init` when you chose **Create new project** and Vanilla JS, then **Landing**, **Docs**, **Dashboard**, or **Full**. **Full** = clone of the docs site. **Landing** / **Docs** / **Dashboard** = CSS, fonts, icons, sfx + component picker (all
|
|
18
|
+
This project was scaffolded with `npx rizzo-css init` when you chose **Create new project** and Vanilla JS, then **Landing**, **Docs**, **Dashboard**, or **Full**. **Full** = clone of the docs site. **Landing** / **Docs** / **Dashboard** = CSS, fonts, icons, sfx + component picker (all 58 or pick); Landing adds hero/features; Docs adds sidebar + sample doc; Dashboard adds sidebar + stats/table. **Add to existing project** (or `npx rizzo-css add`) uses the **same template choice**; you must add the stylesheet `<link>` yourself (CLI prints the exact tag).
|
|
19
19
|
|
|
20
20
|
## First-time setup
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ If you prefer to load CSS from a CDN instead of the local file, replace the `<li
|
|
|
28
28
|
- `<link rel="stylesheet" href="https://unpkg.com/rizzo-css@latest/dist/rizzo.min.css" />`
|
|
29
29
|
- Or jsDelivr: `https://cdn.jsdelivr.net/npm/rizzo-css@latest/dist/rizzo.min.css`
|
|
30
30
|
|
|
31
|
-
(Replace `@latest` with a specific version, e.g. `@0.0.
|
|
31
|
+
(Replace `@latest` with a specific version, e.g. `@0.0.75`, in production.)
|
|
32
32
|
|
|
33
33
|
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.
|
|
34
34
|
|