rizzo-css 0.0.14 → 0.0.15
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 +2 -2
- package/dist/rizzo.min.css +10 -7
- package/package.json +1 -1
- package/scaffold/astro-app/src/components/DocsSidebar.astro +51 -0
- package/scaffold/astro-app/src/components/Navbar.astro +45 -123
- package/scaffold/astro-app/src/layouts/DocsLayout.astro +72 -13
- package/scaffold/astro-app/src/pages/components/navbar.astro +3 -3
- package/scaffold/astro-app/src/pages/components/theme-switcher.astro +1 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/CodeBlock.svelte +1 -1
- package/scaffold/vanilla/README.md +1 -1
- package/scaffold/vanilla/components/accordion.html +14 -0
- package/scaffold/vanilla/components/alert.html +14 -0
- package/scaffold/vanilla/components/avatar.html +14 -0
- package/scaffold/vanilla/components/badge.html +14 -0
- package/scaffold/vanilla/components/breadcrumb.html +14 -0
- package/scaffold/vanilla/components/button.html +14 -0
- package/scaffold/vanilla/components/cards.html +14 -0
- package/scaffold/vanilla/components/copy-to-clipboard.html +14 -0
- package/scaffold/vanilla/components/divider.html +14 -0
- package/scaffold/vanilla/components/dropdown.html +14 -0
- package/scaffold/vanilla/components/forms.html +14 -0
- package/scaffold/vanilla/components/icons.html +14 -0
- package/scaffold/vanilla/components/index.html +14 -0
- package/scaffold/vanilla/components/modal.html +14 -0
- package/scaffold/vanilla/components/navbar.html +14 -0
- package/scaffold/vanilla/components/pagination.html +14 -0
- package/scaffold/vanilla/components/progress-bar.html +14 -0
- package/scaffold/vanilla/components/search.html +14 -0
- package/scaffold/vanilla/components/settings.html +14 -0
- package/scaffold/vanilla/components/spinner.html +14 -0
- package/scaffold/vanilla/components/table.html +14 -0
- package/scaffold/vanilla/components/tabs.html +14 -0
- package/scaffold/vanilla/components/theme-switcher.html +14 -0
- package/scaffold/vanilla/components/toast.html +14 -0
- package/scaffold/vanilla/components/tooltip.html +14 -0
- package/scaffold/vanilla/index.html +14 -0
|
@@ -2,22 +2,7 @@
|
|
|
2
2
|
import Gear from './icons/Gear.astro';
|
|
3
3
|
import Search from './Search.astro';
|
|
4
4
|
import { getFrameworkFromPath } from '../config/frameworks.js';
|
|
5
|
-
import
|
|
6
|
-
import { THEMES_DARK, THEMES_LIGHT } from '../config/themes';
|
|
7
|
-
import Owl from './icons/Owl.astro';
|
|
8
|
-
import Palette from './icons/Palette.astro';
|
|
9
|
-
import Flame from './icons/Flame.astro';
|
|
10
|
-
import Sunset from './icons/Sunset.astro';
|
|
11
|
-
import Zap from './icons/Zap.astro';
|
|
12
|
-
import Shield from './icons/Shield.astro';
|
|
13
|
-
import Heart from './icons/Heart.astro';
|
|
14
|
-
import Sun from './icons/Sun.astro';
|
|
15
|
-
import Cake from './icons/Cake.astro';
|
|
16
|
-
import Lemon from './icons/Lemon.astro';
|
|
17
|
-
import Rainbow from './icons/Rainbow.astro';
|
|
18
|
-
import Leaf from './icons/Leaf.astro';
|
|
19
|
-
import Cherry from './icons/Cherry.astro';
|
|
20
|
-
import Brush from './icons/Brush.astro';
|
|
5
|
+
import { DOCS_NAV } from '../config/docsNav';
|
|
21
6
|
|
|
22
7
|
// Extend Window interface for openSettings
|
|
23
8
|
declare global {
|
|
@@ -49,48 +34,32 @@ interface NavLink {
|
|
|
49
34
|
href: string;
|
|
50
35
|
label: string;
|
|
51
36
|
subLinks?: Array<{ href: string; label: string }>;
|
|
37
|
+
/** Docs dropdown: grouped sections (Introduction, Foundations) */
|
|
38
|
+
docsMenu?: {
|
|
39
|
+
groups: Array<{ label: string; links: Array<{ href: string; label: string }> }>;
|
|
40
|
+
};
|
|
52
41
|
/** Components dropdown: overview full width, then two columns of links */
|
|
53
42
|
componentsMenu?: {
|
|
54
43
|
overview: { href: string; label: string };
|
|
55
44
|
links: Array<{ href: string; label: string }>;
|
|
56
45
|
};
|
|
57
|
-
/** Themes dropdown: overview full width, then Dark | Light columns with icons */
|
|
58
|
-
themesMenu?: {
|
|
59
|
-
overview: { href: string; label: string };
|
|
60
|
-
dark: Array<{ href: string; label: string; icon: typeof Owl }>;
|
|
61
|
-
light: Array<{ href: string; label: string; icon: typeof Owl }>;
|
|
62
|
-
};
|
|
63
46
|
}
|
|
64
47
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
heart: Heart,
|
|
74
|
-
sun: Sun,
|
|
75
|
-
cake: Cake,
|
|
76
|
-
lemon: Lemon,
|
|
77
|
-
rainbow: Rainbow,
|
|
78
|
-
leaf: Leaf,
|
|
79
|
-
cherry: Cherry,
|
|
80
|
-
brush: Brush,
|
|
81
|
-
};
|
|
48
|
+
// Build docs menu from DOCS_NAV (Introduction + Foundations only; Components has its own nav menu)
|
|
49
|
+
const docsMenuGroups = DOCS_NAV.filter((group) => group.label !== 'Components').map((group) => ({
|
|
50
|
+
label: group.label,
|
|
51
|
+
links: group.links.map((link) => ({
|
|
52
|
+
href: link.frameworkOnly ? `${docsPrefix}/${link.href}` : `/docs/${link.href}`,
|
|
53
|
+
label: link.label,
|
|
54
|
+
})),
|
|
55
|
+
}));
|
|
82
56
|
|
|
83
57
|
const navLinks: NavLink[] = [
|
|
84
58
|
{ href: '/', label: 'Home' },
|
|
85
59
|
{
|
|
86
60
|
href: '/docs/getting-started',
|
|
87
61
|
label: 'Docs',
|
|
88
|
-
|
|
89
|
-
{ href: '/docs/getting-started', label: 'Getting Started' },
|
|
90
|
-
{ href: '/docs/design-system', label: 'Design System' },
|
|
91
|
-
{ href: '/docs/accessibility', label: 'Accessibility' },
|
|
92
|
-
{ href: '/docs/colors', label: 'Colors' },
|
|
93
|
-
],
|
|
62
|
+
docsMenu: { groups: docsMenuGroups },
|
|
94
63
|
},
|
|
95
64
|
{
|
|
96
65
|
href: componentHref('/docs/components'),
|
|
@@ -125,23 +94,6 @@ const navLinks: NavLink[] = [
|
|
|
125
94
|
],
|
|
126
95
|
},
|
|
127
96
|
},
|
|
128
|
-
{
|
|
129
|
-
href: '/docs/theming',
|
|
130
|
-
label: 'Themes',
|
|
131
|
-
themesMenu: {
|
|
132
|
-
overview: { href: '/docs/theming', label: 'Overview' },
|
|
133
|
-
dark: THEMES_DARK.map((t) => ({
|
|
134
|
-
href: `/docs/themes/${t.value}`,
|
|
135
|
-
label: t.label,
|
|
136
|
-
icon: themeIconMap[t.iconKey],
|
|
137
|
-
})),
|
|
138
|
-
light: THEMES_LIGHT.map((t) => ({
|
|
139
|
-
href: `/docs/themes/${t.value}`,
|
|
140
|
-
label: t.label,
|
|
141
|
-
icon: themeIconMap[t.iconKey],
|
|
142
|
-
})),
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
97
|
];
|
|
146
98
|
---
|
|
147
99
|
|
|
@@ -191,7 +143,7 @@ const navLinks: NavLink[] = [
|
|
|
191
143
|
<div class="navbar__menu" id="navbar-menu" role="menu">
|
|
192
144
|
{navLinks.map((link) => {
|
|
193
145
|
const isActive = currentPath === link.href || (link.href !== '/' && currentPath.startsWith(link.href));
|
|
194
|
-
const hasSubLinks = (link.subLinks && link.subLinks.length > 0) || !!link.
|
|
146
|
+
const hasSubLinks = (link.subLinks && link.subLinks.length > 0) || !!link.docsMenu || !!link.componentsMenu;
|
|
195
147
|
const subLinkId = hasSubLinks ? `navbar-submenu-${link.label.toLowerCase().replace(/\s+/g, '-')}` : undefined;
|
|
196
148
|
|
|
197
149
|
return (
|
|
@@ -225,7 +177,34 @@ const navLinks: NavLink[] = [
|
|
|
225
177
|
{link.label}
|
|
226
178
|
</div>
|
|
227
179
|
)}
|
|
228
|
-
{link.
|
|
180
|
+
{link.docsMenu ? (
|
|
181
|
+
<ul class="navbar__submenu navbar__submenu--docs" id={subLinkId} role="menu" aria-label={`${link.label} submenu`}>
|
|
182
|
+
{link.docsMenu.groups.map((group) => (
|
|
183
|
+
<li class="navbar__submenu-group" role="none">
|
|
184
|
+
<span class="navbar__submenu-group-label" aria-hidden="true">{group.label}</span>
|
|
185
|
+
<ul class="navbar__submenu-list" role="group" aria-label={group.label}>
|
|
186
|
+
{group.links.map((subLink) => {
|
|
187
|
+
const isSubActive = currentPath === subLink.href;
|
|
188
|
+
return (
|
|
189
|
+
<li role="none">
|
|
190
|
+
<div
|
|
191
|
+
class="navbar__sublink"
|
|
192
|
+
role="menuitem"
|
|
193
|
+
tabindex={-1}
|
|
194
|
+
aria-label={subLink.label}
|
|
195
|
+
aria-current={isSubActive ? 'page' : undefined}
|
|
196
|
+
data-nav-href={subLink.href}
|
|
197
|
+
>
|
|
198
|
+
{subLink.label}
|
|
199
|
+
</div>
|
|
200
|
+
</li>
|
|
201
|
+
);
|
|
202
|
+
})}
|
|
203
|
+
</ul>
|
|
204
|
+
</li>
|
|
205
|
+
))}
|
|
206
|
+
</ul>
|
|
207
|
+
) : link.componentsMenu ? (
|
|
229
208
|
<ul class="navbar__submenu navbar__submenu--components" id={subLinkId} role="menu" aria-label={`${link.label} submenu`}>
|
|
230
209
|
<li class="navbar__submenu-overview" role="none">
|
|
231
210
|
<div
|
|
@@ -276,63 +255,6 @@ const navLinks: NavLink[] = [
|
|
|
276
255
|
</div>
|
|
277
256
|
</li>
|
|
278
257
|
</ul>
|
|
279
|
-
) : link.themesMenu ? (
|
|
280
|
-
<ul class="navbar__submenu navbar__submenu--themes" id={subLinkId} role="menu" aria-label={`${link.label} submenu`}>
|
|
281
|
-
<li class="navbar__submenu-overview" role="none">
|
|
282
|
-
<div
|
|
283
|
-
class="navbar__sublink navbar__sublink--overview"
|
|
284
|
-
role="menuitem"
|
|
285
|
-
tabindex={-1}
|
|
286
|
-
aria-label={link.themesMenu.overview.label}
|
|
287
|
-
aria-current={currentPath === link.themesMenu.overview.href ? 'page' : undefined}
|
|
288
|
-
data-nav-href={link.themesMenu.overview.href}
|
|
289
|
-
>
|
|
290
|
-
{link.themesMenu.overview.label}
|
|
291
|
-
</div>
|
|
292
|
-
</li>
|
|
293
|
-
<li class="navbar__submenu-themes-grid" role="none">
|
|
294
|
-
<div class="navbar__submenu-column">
|
|
295
|
-
<span class="navbar__submenu-column-label" aria-hidden="true">Dark themes</span>
|
|
296
|
-
{link.themesMenu.dark.map((theme) => {
|
|
297
|
-
const isSubActive = currentPath === theme.href;
|
|
298
|
-
const ThemeIcon = theme.icon;
|
|
299
|
-
return (
|
|
300
|
-
<div
|
|
301
|
-
class="navbar__sublink navbar__sublink--with-icon"
|
|
302
|
-
role="menuitem"
|
|
303
|
-
tabindex={-1}
|
|
304
|
-
aria-label={theme.label}
|
|
305
|
-
aria-current={isSubActive ? 'page' : undefined}
|
|
306
|
-
data-nav-href={theme.href}
|
|
307
|
-
>
|
|
308
|
-
<ThemeIcon width={16} height={16} class="navbar__sublink-icon" />
|
|
309
|
-
<span class="navbar__sublink-text">{theme.label}</span>
|
|
310
|
-
</div>
|
|
311
|
-
);
|
|
312
|
-
})}
|
|
313
|
-
</div>
|
|
314
|
-
<div class="navbar__submenu-column">
|
|
315
|
-
<span class="navbar__submenu-column-label" aria-hidden="true">Light themes</span>
|
|
316
|
-
{link.themesMenu.light.map((theme) => {
|
|
317
|
-
const isSubActive = currentPath === theme.href;
|
|
318
|
-
const ThemeIcon = theme.icon;
|
|
319
|
-
return (
|
|
320
|
-
<div
|
|
321
|
-
class="navbar__sublink navbar__sublink--with-icon"
|
|
322
|
-
role="menuitem"
|
|
323
|
-
tabindex={-1}
|
|
324
|
-
aria-label={theme.label}
|
|
325
|
-
aria-current={isSubActive ? 'page' : undefined}
|
|
326
|
-
data-nav-href={theme.href}
|
|
327
|
-
>
|
|
328
|
-
<ThemeIcon width={16} height={16} class="navbar__sublink-icon" />
|
|
329
|
-
<span class="navbar__sublink-text">{theme.label}</span>
|
|
330
|
-
</div>
|
|
331
|
-
);
|
|
332
|
-
})}
|
|
333
|
-
</div>
|
|
334
|
-
</li>
|
|
335
|
-
</ul>
|
|
336
258
|
) : hasSubLinks && link.subLinks ? (
|
|
337
259
|
<ul class="navbar__submenu" id={subLinkId} role="menu" aria-label={`${link.label} submenu`}>
|
|
338
260
|
{link.subLinks.map((subLink) => {
|
|
@@ -514,8 +436,8 @@ const navLinks: NavLink[] = [
|
|
|
514
436
|
}, 0);
|
|
515
437
|
}
|
|
516
438
|
|
|
517
|
-
// Focus management
|
|
518
|
-
if (!
|
|
439
|
+
// Focus management: when opening, focus first sublink (desktop and mobile)
|
|
440
|
+
if (!isExpanded && sublinks.length > 0) {
|
|
519
441
|
setTimeout(() => (sublinks[0] as HTMLElement).focus(), 0);
|
|
520
442
|
}
|
|
521
443
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Layout from './Layout.astro';
|
|
3
|
+
import FrameworkSwitcher from '../components/FrameworkSwitcher.astro';
|
|
4
|
+
import DocsSidebar from '../components/DocsSidebar.astro';
|
|
5
|
+
import { getFrameworkFromPath } from '../config/frameworks';
|
|
6
|
+
|
|
3
7
|
interface Props {
|
|
4
8
|
title: string;
|
|
5
9
|
description?: string;
|
|
@@ -8,33 +12,88 @@ interface Props {
|
|
|
8
12
|
|
|
9
13
|
const { title, description, class: className = '' } = Astro.props;
|
|
10
14
|
const docsClass = className ? `docs ${className}` : 'docs';
|
|
15
|
+
const { framework } = getFrameworkFromPath(currentPath);
|
|
11
16
|
---
|
|
12
17
|
|
|
13
18
|
<Layout>
|
|
14
|
-
<div class={docsClass}>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
<div class={docsClass} data-docs>
|
|
20
|
+
<script is:inline>
|
|
21
|
+
(function(){var w=typeof window!=='undefined'?window.innerWidth:1025;if(w<=1024){document.documentElement.classList.add('docs-sidebar-mobile');}else{document.documentElement.classList.add('docs-sidebar-desktop');}})();
|
|
22
|
+
</script>
|
|
23
|
+
<div id="docs-sidebar-container">
|
|
24
|
+
<button
|
|
25
|
+
type="button"
|
|
26
|
+
class="docs__sidebar-toggle"
|
|
27
|
+
aria-label="Open documentation menu"
|
|
28
|
+
aria-expanded="false"
|
|
29
|
+
aria-controls="docs-sidebar"
|
|
30
|
+
data-docs-sidebar-toggle
|
|
31
|
+
>
|
|
32
|
+
<span class="docs__sidebar-toggle-icon" aria-hidden="true">
|
|
33
|
+
<span></span>
|
|
34
|
+
<span></span>
|
|
35
|
+
<span></span>
|
|
36
|
+
</span>
|
|
37
|
+
<span class="docs__sidebar-toggle-text">Docs</span>
|
|
38
|
+
</button>
|
|
39
|
+
<div class="docs__sidebar-overlay" data-docs-sidebar-overlay aria-hidden="true"></div>
|
|
40
|
+
<DocsSidebar currentPath={currentPath} framework={framework} />
|
|
41
|
+
</div>
|
|
42
|
+
<div class="docs__main">
|
|
43
|
+
<div class="docs__container">
|
|
44
|
+
<header class="docs__header"> <h1 class="docs__title">{title}</h1>
|
|
45
|
+
{description && <p class="docs__description">{description}</p>}
|
|
18
46
|
<p class="docs__read-docs">
|
|
19
47
|
<a href="https://rizzo-css.vercel.app/docs" target="_blank" rel="noopener noreferrer">Read the full docs</a> (getting started, theming, API) on the main site.
|
|
20
48
|
</p>
|
|
21
49
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
50
|
+
</header>
|
|
51
|
+
<div class="docs__content">
|
|
52
|
+
<slot />
|
|
53
|
+
</div>
|
|
26
54
|
</div>
|
|
27
55
|
</div>
|
|
28
56
|
</div>
|
|
57
|
+
<script>
|
|
58
|
+
(function () {
|
|
59
|
+
const container = document.getElementById('docs-sidebar-container');
|
|
60
|
+
if (!container) return;
|
|
61
|
+
const toggle = container.querySelector('[data-docs-sidebar-toggle]');
|
|
62
|
+
const overlay = container.querySelector('[data-docs-sidebar-overlay]');
|
|
63
|
+
const docs = document.querySelector('[data-docs]');
|
|
64
|
+
if (!toggle || !overlay || !docs) return;
|
|
65
|
+
function open() {
|
|
66
|
+
docs?.classList.add('docs--sidebar-open');
|
|
67
|
+
toggle?.setAttribute('aria-expanded', 'true');
|
|
68
|
+
overlay?.setAttribute('aria-hidden', 'false');
|
|
69
|
+
}
|
|
70
|
+
function close() {
|
|
71
|
+
docs?.classList.remove('docs--sidebar-open');
|
|
72
|
+
toggle?.setAttribute('aria-expanded', 'false');
|
|
73
|
+
overlay?.setAttribute('aria-hidden', 'true');
|
|
74
|
+
}
|
|
75
|
+
toggle.addEventListener('click', function () {
|
|
76
|
+
if (docs?.classList.contains('docs--sidebar-open')) close();
|
|
77
|
+
else open();
|
|
78
|
+
});
|
|
79
|
+
overlay.addEventListener('click', close);
|
|
80
|
+
// On mobile, remove sidebar from DOM so the page has fewer nodes
|
|
81
|
+
if (document.documentElement.classList.contains('docs-sidebar-mobile')) {
|
|
82
|
+
if (document.readyState === 'loading') {
|
|
83
|
+
document.addEventListener('DOMContentLoaded', function () { container.remove(); });
|
|
84
|
+
} else {
|
|
85
|
+
container.remove();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
})();
|
|
89
|
+
</script>
|
|
29
90
|
</Layout>
|
|
30
91
|
<style>
|
|
31
|
-
.docs {
|
|
32
|
-
padding: 2rem 0;
|
|
33
|
-
min-height: calc(100vh - 4rem);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
92
|
.docs__container {
|
|
37
93
|
width: 100%;
|
|
94
|
+
max-width: var(--container-default, 1200px);
|
|
95
|
+
margin: 0 auto;
|
|
96
|
+
padding: 0 var(--spacing-4);
|
|
38
97
|
}
|
|
39
98
|
|
|
40
99
|
.docs__header {
|
|
@@ -16,12 +16,12 @@ import CodeBlock from '../../components/CodeBlock.astro';
|
|
|
16
16
|
<div class="example-title">Live Example</div>
|
|
17
17
|
<p>The navbar is already included in the Layout component at the top of this page. It includes:</p>
|
|
18
18
|
<ul>
|
|
19
|
-
<li><strong>Desktop:</strong>
|
|
19
|
+
<li><strong>Desktop:</strong> Docs dropdown (Introduction, Foundations); Components dropdown with 2-column layout and vertical divider</li>
|
|
20
20
|
<li><strong>Mobile:</strong> Menu toggle on left; search and settings icon-only (same size as menu toggle) on right</li>
|
|
21
21
|
<li>Responsive mobile menu with hamburger toggle (activates at 1024px and below)</li>
|
|
22
22
|
<li>Smooth hamburger-to-X animation</li>
|
|
23
23
|
<li>Active link indicator with underline matching hover effect</li>
|
|
24
|
-
<li>Dropdown menus
|
|
24
|
+
<li>Dropdown menus: Docs (Getting Started, Design System, Theming, Accessibility, Colors) and Components (Overview + all component links). Theming is under Docs; no separate Themes item in the nav.</li>
|
|
25
25
|
<li>Dropdown arrow rotates on hover</li>
|
|
26
26
|
<li>Smart dropdown alignment (prevents viewport overflow)</li>
|
|
27
27
|
<li>Full keyboard navigation for dropdowns (Arrow keys, Enter, Space, Escape, Home, End)</li>
|
|
@@ -52,7 +52,7 @@ import Navbar from '../../components/Navbar.astro';
|
|
|
52
52
|
<li><strong>Desktop Layout:</strong>
|
|
53
53
|
<ul>
|
|
54
54
|
<li>Search and settings buttons on far right</li>
|
|
55
|
-
<li><strong>2-column dropdown layout</strong> - Components
|
|
55
|
+
<li><strong>2-column dropdown layout</strong> - The Components dropdown displays in a 2-column grid with vertical divider. Docs dropdown shows Introduction and Foundations only (Theming is under Docs).</li>
|
|
56
56
|
<li>Smart dropdown positioning - Automatically adjusts to prevent viewport overflow</li>
|
|
57
57
|
<li>Dropdown arrow rotates on hover/expand</li>
|
|
58
58
|
</ul>
|
|
@@ -32,6 +32,7 @@ import ThemeSwitcher from '../../components/ThemeSwitcher.astro';
|
|
|
32
32
|
<li><strong>Preview panel</strong> – Always visible when the menu is open (on viewports >480px). Shows a fixed “Preview” label; the theme name, swatch, and accent bar show the <strong>current</strong> theme by default and the <strong>hovered</strong> theme on hover/focus. Full-height divider between list and preview. Hidden on small viewports.</li>
|
|
33
33
|
<li>Groups themes by Preference, Dark, and Light; each theme has a unique icon.</li>
|
|
34
34
|
<li>Shows active theme name and icon in the trigger button.</li>
|
|
35
|
+
<li><strong>Consistent width</strong> – The trigger and dropdown use a fixed width (<code>--theme-switcher-width</code>) everywhere (Settings, navbar, standalone) so the longest theme name fits on one line.</li>
|
|
35
36
|
<li>When System is selected, both System and the applied theme show the active background and accent bar.</li>
|
|
36
37
|
<li>Persists selection in <code>localStorage</code> (key <code>theme</code>: theme id or <code>system</code>).</li>
|
|
37
38
|
<li>First visit uses initial <code>data-theme</code> or OS preference.</li>
|
|
@@ -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.15`, 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
|
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Accordion</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Alert</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Avatar</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Badge</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Breadcrumb</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Button</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Cards</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Copy to Clipboard</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
<main id="main-content" class="flex flex-col items-center justify-center text-center min-h-screen" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
177
184
|
<h1 style="font-size: var(--font-size-3xl); margin: 0 0 var(--spacing-4) 0; color: var(--text);">Divider</h1>
|
|
178
185
|
<p style="color: var(--text-dim); margin-bottom: var(--spacing-4);">Read the full docs for this component on the main site:</p>
|
|
@@ -188,6 +195,13 @@
|
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
191
205
|
<script src="../js/main.js"></script>
|
|
192
206
|
</body>
|
|
193
207
|
</html>
|