rizzo-css 0.0.11 → 0.0.13
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/.env.example +12 -0
- package/LICENSE +21 -0
- package/README.md +17 -3
- package/bin/rizzo-css.js +98 -42
- package/dist/rizzo.min.css +3 -2
- package/package.json +5 -3
- package/scaffold/astro-app/README.md +13 -2
- package/scaffold/astro-app/src/components/Accordion.astro +178 -0
- package/scaffold/astro-app/src/components/Alert.astro +131 -0
- package/scaffold/astro-app/src/components/Avatar.astro +59 -0
- package/scaffold/astro-app/src/components/Badge.astro +24 -0
- package/scaffold/astro-app/src/components/Breadcrumb.astro +61 -0
- package/scaffold/astro-app/src/components/Button.astro +3 -0
- package/scaffold/astro-app/src/components/Card.astro +18 -0
- package/scaffold/astro-app/src/components/Checkbox.astro +38 -0
- package/scaffold/astro-app/src/components/CodeBlock.astro +393 -0
- package/scaffold/astro-app/src/components/CopyToClipboard.astro +219 -0
- package/scaffold/astro-app/src/components/Divider.astro +37 -0
- package/scaffold/astro-app/src/components/Dropdown.astro +807 -0
- package/scaffold/astro-app/src/components/FormGroup.astro +59 -0
- package/scaffold/astro-app/src/components/FrameworkSwitcher.astro +72 -0
- package/scaffold/astro-app/src/components/Input.astro +59 -0
- package/scaffold/astro-app/src/components/Modal.astro +212 -0
- package/scaffold/astro-app/src/components/Navbar.astro +701 -0
- package/scaffold/astro-app/src/components/Pagination.astro +240 -0
- package/scaffold/astro-app/src/components/ProgressBar.astro +65 -0
- package/scaffold/astro-app/src/components/Radio.astro +38 -0
- package/scaffold/astro-app/src/components/Search.astro +1259 -0
- package/scaffold/astro-app/src/components/Select.astro +49 -0
- package/scaffold/astro-app/src/components/Settings.astro +382 -0
- package/scaffold/astro-app/src/components/Spinner.astro +30 -0
- package/scaffold/astro-app/src/components/Table.astro +181 -0
- package/scaffold/astro-app/src/components/Tabs.astro +223 -0
- package/scaffold/astro-app/src/components/Textarea.astro +58 -0
- package/scaffold/astro-app/src/components/ThemeSwitcher.astro +504 -0
- package/scaffold/astro-app/src/components/Toast.astro +30 -0
- package/scaffold/astro-app/src/components/Tooltip.astro +32 -0
- package/scaffold/astro-app/src/components/icons/Brush.astro +10 -0
- package/scaffold/astro-app/src/components/icons/Cake.astro +11 -0
- package/scaffold/astro-app/src/components/icons/Check.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Cherry.astro +11 -0
- package/scaffold/astro-app/src/components/icons/ChevronDown.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Circle.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Close.astro +30 -0
- package/scaffold/astro-app/src/components/icons/Cmd.astro +26 -0
- package/scaffold/astro-app/src/components/icons/Copy.astro +30 -0
- package/scaffold/astro-app/src/components/icons/Eye.astro +30 -0
- package/scaffold/astro-app/src/components/icons/Filter.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Flame.astro +28 -0
- package/scaffold/astro-app/src/components/icons/Flower.astro +11 -0
- package/scaffold/astro-app/src/components/icons/Gear.astro +30 -0
- package/scaffold/astro-app/src/components/icons/Heart.astro +28 -0
- package/scaffold/astro-app/src/components/icons/IceCream.astro +31 -0
- package/scaffold/astro-app/src/components/icons/Leaf.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Lemon.astro +11 -0
- package/scaffold/astro-app/src/components/icons/Moon.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Owl.astro +34 -0
- package/scaffold/astro-app/src/components/icons/Palette.astro +33 -0
- package/scaffold/astro-app/src/components/icons/Rainbow.astro +31 -0
- package/scaffold/astro-app/src/components/icons/Search.astro +30 -0
- package/scaffold/astro-app/src/components/icons/Shield.astro +28 -0
- package/scaffold/astro-app/src/components/icons/Snowflake.astro +34 -0
- package/scaffold/astro-app/src/components/icons/Sort.astro +30 -0
- package/scaffold/astro-app/src/components/icons/Sun.astro +29 -0
- package/scaffold/astro-app/src/components/icons/Sunset.astro +10 -0
- package/scaffold/astro-app/src/components/icons/Zap.astro +9 -0
- package/scaffold/astro-app/src/components/icons/devicons/Astro.astro +53 -0
- package/scaffold/astro-app/src/components/icons/devicons/Bash.astro +34 -0
- package/scaffold/astro-app/src/components/icons/devicons/Css3.astro +29 -0
- package/scaffold/astro-app/src/components/icons/devicons/Git.astro +24 -0
- package/scaffold/astro-app/src/components/icons/devicons/Html5.astro +27 -0
- package/scaffold/astro-app/src/components/icons/devicons/Javascript.astro +25 -0
- package/scaffold/astro-app/src/components/icons/devicons/Nodejs.astro +47 -0
- package/scaffold/astro-app/src/components/icons/devicons/Plaintext.astro +33 -0
- package/scaffold/astro-app/src/components/icons/devicons/React.astro +27 -0
- package/scaffold/astro-app/src/components/icons/devicons/Svelte.astro +25 -0
- package/scaffold/astro-app/src/components/icons/devicons/Vue.astro +26 -0
- package/scaffold/astro-app/src/config/frameworks.ts +26 -0
- package/scaffold/astro-app/src/config/themes.ts +54 -0
- package/scaffold/astro-app/src/layouts/DocsLayout.astro +204 -0
- package/scaffold/astro-app/src/layouts/Layout.astro +11 -2
- package/scaffold/astro-app/src/pages/components/accordion.astro +172 -0
- package/scaffold/astro-app/src/pages/components/alert.astro +250 -0
- package/scaffold/astro-app/src/pages/components/avatar.astro +102 -0
- package/scaffold/astro-app/src/pages/components/badge.astro +119 -0
- package/scaffold/astro-app/src/pages/components/breadcrumb.astro +124 -0
- package/scaffold/astro-app/src/pages/components/button.astro +74 -0
- package/scaffold/astro-app/src/pages/components/cards.astro +247 -0
- package/scaffold/astro-app/src/pages/components/copy-to-clipboard.astro +49 -0
- package/scaffold/astro-app/src/pages/components/divider.astro +74 -0
- package/scaffold/astro-app/src/pages/components/dropdown.astro +394 -0
- package/scaffold/astro-app/src/pages/components/forms.astro +367 -0
- package/scaffold/astro-app/src/pages/components/icons.astro +246 -0
- package/scaffold/astro-app/src/pages/components/modal.astro +152 -0
- package/scaffold/astro-app/src/pages/components/navbar.astro +80 -0
- package/scaffold/astro-app/src/pages/components/pagination.astro +126 -0
- package/scaffold/astro-app/src/pages/components/progress-bar.astro +94 -0
- package/scaffold/astro-app/src/pages/components/search.astro +155 -0
- package/scaffold/astro-app/src/pages/components/settings.astro +78 -0
- package/scaffold/astro-app/src/pages/components/spinner.astro +81 -0
- package/scaffold/astro-app/src/pages/components/table.astro +144 -0
- package/scaffold/astro-app/src/pages/components/tabs.astro +220 -0
- package/scaffold/astro-app/src/pages/components/theme-switcher.astro +67 -0
- package/scaffold/astro-app/src/pages/components/toast.astro +157 -0
- package/scaffold/astro-app/src/pages/components/tooltip.astro +209 -0
- package/scaffold/astro-app/src/pages/components.astro +290 -0
- package/scaffold/astro-app/src/pages/docs/accessibility.astro +9 -0
- package/scaffold/astro-app/src/pages/docs/colors.astro +9 -0
- package/scaffold/astro-app/src/pages/docs/design-system.astro +9 -0
- package/scaffold/astro-app/src/pages/docs/getting-started.astro +9 -0
- package/scaffold/astro-app/src/pages/docs/index.astro +15 -0
- package/scaffold/astro-app/src/pages/docs/themes/[theme].astro +14 -0
- package/scaffold/astro-app/src/pages/docs/theming.astro +10 -0
- package/scaffold/astro-app/src/pages/index.astro +5 -11
- package/scaffold/svelte/Table.svelte +6 -5
- package/scaffold/svelte/Tabs.svelte +3 -1
- package/scaffold/svelte-app/README.md +9 -2
- package/scaffold/svelte-app/src/app.html +1 -1
- package/scaffold/svelte-app/src/lib/rizzo/Accordion.svelte +128 -0
- package/scaffold/svelte-app/src/lib/rizzo/Alert.svelte +85 -0
- package/scaffold/svelte-app/src/lib/rizzo/Avatar.svelte +39 -0
- package/scaffold/svelte-app/src/lib/rizzo/Badge.svelte +31 -0
- package/scaffold/svelte-app/src/lib/rizzo/Breadcrumb.svelte +49 -0
- package/scaffold/svelte-app/src/lib/rizzo/Button.svelte +27 -0
- package/scaffold/svelte-app/src/lib/rizzo/Card.svelte +17 -0
- package/scaffold/svelte-app/src/lib/rizzo/Checkbox.svelte +37 -0
- package/scaffold/svelte-app/src/lib/rizzo/CopyToClipboard.svelte +79 -0
- package/scaffold/svelte-app/src/lib/rizzo/Divider.svelte +28 -0
- package/scaffold/svelte-app/src/lib/rizzo/Dropdown.svelte +254 -0
- package/scaffold/svelte-app/src/lib/rizzo/FormGroup.svelte +51 -0
- package/scaffold/svelte-app/src/lib/rizzo/Input.svelte +59 -0
- package/scaffold/svelte-app/src/lib/rizzo/Modal.svelte +157 -0
- package/scaffold/svelte-app/src/lib/rizzo/Pagination.svelte +93 -0
- package/scaffold/svelte-app/src/lib/rizzo/ProgressBar.svelte +58 -0
- package/scaffold/svelte-app/src/lib/rizzo/Radio.svelte +38 -0
- package/scaffold/svelte-app/src/lib/rizzo/Select.svelte +51 -0
- package/scaffold/svelte-app/src/lib/rizzo/Spinner.svelte +14 -0
- package/scaffold/svelte-app/src/lib/rizzo/Table.svelte +158 -0
- package/scaffold/svelte-app/src/lib/rizzo/Tabs.svelte +117 -0
- package/scaffold/svelte-app/src/lib/rizzo/Textarea.svelte +59 -0
- package/scaffold/svelte-app/src/lib/rizzo/ThemeSwitcher.svelte +315 -0
- package/scaffold/svelte-app/src/lib/rizzo/Toast.svelte +33 -0
- package/scaffold/svelte-app/src/lib/rizzo/Tooltip.svelte +19 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Check.svelte +29 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/ChevronDown.svelte +29 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Circle.svelte +29 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Close.svelte +30 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Cmd.svelte +27 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Copy.svelte +30 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Eye.svelte +30 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Filter.svelte +29 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Gear.svelte +30 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/IceCream.svelte +31 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Moon.svelte +29 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Owl.svelte +34 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Palette.svelte +33 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Rainbow.svelte +31 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Search.svelte +30 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Snowflake.svelte +34 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/Sort.svelte +30 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Astro.svelte +45 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Bash.svelte +28 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Css3.svelte +23 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Git.svelte +18 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Html5.svelte +21 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Javascript.svelte +19 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Nodejs.svelte +44 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Plaintext.svelte +24 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/React.svelte +21 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/SvelteIcon.svelte +19 -0
- package/scaffold/svelte-app/src/lib/rizzo/icons/devicons/Vue.svelte +20 -0
- package/scaffold/svelte-app/src/lib/rizzo/index.ts +33 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/CodeBlock.svelte +239 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/SvelteDocPage.svelte +99 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/AccordionDoc.svelte +53 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/AlertDoc.svelte +114 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/AvatarDoc.svelte +92 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/BadgeDoc.svelte +60 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/BreadcrumbDoc.svelte +55 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ButtonDoc.svelte +55 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/CardsDoc.svelte +173 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ComingSoon.svelte +12 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ComponentsOverview.svelte +92 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/CopyToClipboardDoc.svelte +26 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/DividerDoc.svelte +105 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/DropdownDoc.svelte +161 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/FormsDoc.svelte +375 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/IconsDoc.svelte +246 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/Index.svelte +8 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ModalDoc.svelte +50 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/NavbarDoc.svelte +79 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/PaginationDoc.svelte +44 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ProgressBarDoc.svelte +95 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/SearchDoc.svelte +147 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/SettingsDoc.svelte +158 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/SpinnerDoc.svelte +41 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/TableDoc.svelte +116 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/TabsDoc.svelte +152 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ThemeSwitcherDoc.svelte +181 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/Theming.svelte +6 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/ToastDoc.svelte +136 -0
- package/scaffold/svelte-app/src/lib/rizzo-docs/pages/TooltipDoc.svelte +57 -0
- package/scaffold/svelte-app/src/routes/+page.svelte +2 -2
- package/scaffold/svelte-app/src/routes/components/+page.svelte +4 -0
- package/scaffold/svelte-app/src/routes/components/[slug]/+page.svelte +7 -0
- package/scaffold/vanilla/README.md +20 -8
- package/scaffold/vanilla/components/accordion.html +187 -0
- package/scaffold/vanilla/components/alert.html +187 -0
- package/scaffold/vanilla/components/avatar.html +187 -0
- package/scaffold/vanilla/components/badge.html +187 -0
- package/scaffold/vanilla/components/breadcrumb.html +187 -0
- package/scaffold/vanilla/components/button.html +187 -0
- package/scaffold/vanilla/components/cards.html +187 -0
- package/scaffold/vanilla/components/copy-to-clipboard.html +187 -0
- package/scaffold/vanilla/components/divider.html +187 -0
- package/scaffold/vanilla/components/dropdown.html +187 -0
- package/scaffold/vanilla/components/forms.html +187 -0
- package/scaffold/vanilla/components/icons.html +187 -0
- package/scaffold/vanilla/components/index.html +212 -0
- package/scaffold/vanilla/components/modal.html +187 -0
- package/scaffold/vanilla/components/navbar.html +187 -0
- package/scaffold/vanilla/components/pagination.html +187 -0
- package/scaffold/vanilla/components/progress-bar.html +187 -0
- package/scaffold/vanilla/components/search.html +187 -0
- package/scaffold/vanilla/components/settings.html +187 -0
- package/scaffold/vanilla/components/spinner.html +187 -0
- package/scaffold/vanilla/components/table.html +187 -0
- package/scaffold/vanilla/components/tabs.html +187 -0
- package/scaffold/vanilla/components/theme-switcher.html +187 -0
- package/scaffold/vanilla/components/toast.html +187 -0
- package/scaffold/vanilla/components/tooltip.html +187 -0
- package/scaffold/vanilla/index.html +17 -283
- package/scaffold/vanilla/js/main.js +748 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
import Tooltip from '../../components/Tooltip.astro';
|
|
4
|
+
import Button from '../../components/Button.astro';
|
|
5
|
+
import CodeBlock from '../../components/CodeBlock.astro';
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<DocsLayout title="Tooltip Component — Astro" description="Accessible tooltip component with positioning options and hover states">
|
|
9
|
+
|
|
10
|
+
<p class="docs__read-docs">Read the full docs for this component at <a href="https://rizzo-css.vercel.app/docs/components/tooltip" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs/components/tooltip</a>.</p>
|
|
11
|
+
|
|
12
|
+
<section>
|
|
13
|
+
<h2>Tooltip Component</h2>
|
|
14
|
+
<p>An accessible tooltip component that provides additional context or information when users hover over or focus on an element. Tooltips are positioned relative to their trigger element and support multiple positions.</p>
|
|
15
|
+
</section>
|
|
16
|
+
|
|
17
|
+
<section>
|
|
18
|
+
<h2>Basic Usage</h2>
|
|
19
|
+
<p>Wrap any element with a tooltip wrapper and include the Tooltip component:</p>
|
|
20
|
+
|
|
21
|
+
<div class="example">
|
|
22
|
+
<div class="example-title">Basic Tooltip</div>
|
|
23
|
+
<div style="display: flex; flex-wrap: wrap; gap: var(--spacing-4); align-items: center; padding: var(--spacing-8);">
|
|
24
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-basic">
|
|
25
|
+
<button class="btn btn-primary">Hover me</button>
|
|
26
|
+
<Tooltip id="tooltip-basic" text="This is a basic tooltip" position="top" />
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<CodeBlock code={`---
|
|
32
|
+
import Tooltip from '../../components/Tooltip.astro';
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-basic">
|
|
36
|
+
<button class="btn btn-primary">Hover me</button>
|
|
37
|
+
<Tooltip id="tooltip-basic" text="This is a basic tooltip" position="top" />
|
|
38
|
+
</div>`} language="astro" />
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<section>
|
|
42
|
+
<h2>Positions</h2>
|
|
43
|
+
<p>Tooltips can be positioned in four directions: top, bottom, left, or right.</p>
|
|
44
|
+
|
|
45
|
+
<div class="example">
|
|
46
|
+
<div class="example-title">Position Examples</div>
|
|
47
|
+
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-6); align-items: center; justify-items: center; padding: var(--spacing-12); min-height: 300px;">
|
|
48
|
+
<!-- Top -->
|
|
49
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-top" style="grid-column: 2; grid-row: 1;">
|
|
50
|
+
<button class="btn btn-primary">Top</button>
|
|
51
|
+
<Tooltip id="tooltip-top" text="Tooltip on top" position="top" />
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- Left -->
|
|
55
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-left" style="grid-column: 1; grid-row: 2;">
|
|
56
|
+
<button class="btn btn-primary">Left</button>
|
|
57
|
+
<Tooltip id="tooltip-left" text="Tooltip on left" position="left" />
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- Right -->
|
|
61
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-right" style="grid-column: 3; grid-row: 2;">
|
|
62
|
+
<button class="btn btn-primary">Right</button>
|
|
63
|
+
<Tooltip id="tooltip-right" text="Tooltip on right" position="right" />
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- Bottom -->
|
|
67
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-bottom" style="grid-column: 2; grid-row: 3;">
|
|
68
|
+
<button class="btn btn-primary">Bottom</button>
|
|
69
|
+
<Tooltip id="tooltip-bottom" text="Tooltip on bottom" position="bottom" />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<CodeBlock code={`<!-- Top position -->
|
|
75
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-top">
|
|
76
|
+
<button>Hover me</button>
|
|
77
|
+
<Tooltip id="tooltip-top" text="Tooltip on top" position="top" />
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!-- Bottom position -->
|
|
81
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-bottom">
|
|
82
|
+
<button>Hover me</button>
|
|
83
|
+
<Tooltip id="tooltip-bottom" text="Tooltip on bottom" position="bottom" />
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<!-- Left position -->
|
|
87
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-left">
|
|
88
|
+
<button>Hover me</button>
|
|
89
|
+
<Tooltip id="tooltip-left" text="Tooltip on left" position="left" />
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<!-- Right position -->
|
|
93
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-right">
|
|
94
|
+
<button>Hover me</button>
|
|
95
|
+
<Tooltip id="tooltip-right" text="Tooltip on right" position="right" />
|
|
96
|
+
</div>`} language="astro" />
|
|
97
|
+
</section>
|
|
98
|
+
|
|
99
|
+
<section>
|
|
100
|
+
<h2>With Different Elements</h2>
|
|
101
|
+
<p>Tooltips work with any element - buttons, links, icons, badges, etc.</p>
|
|
102
|
+
|
|
103
|
+
<div class="example">
|
|
104
|
+
<div class="example-title">Tooltip Examples</div>
|
|
105
|
+
<div style="display: flex; flex-wrap: wrap; gap: var(--spacing-4); align-items: center; padding: var(--spacing-8);">
|
|
106
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-button">
|
|
107
|
+
<button class="btn btn-success">Success Button</button>
|
|
108
|
+
<Tooltip id="tooltip-button" text="This is a success button" position="top" />
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-link">
|
|
112
|
+
<a href="#tooltip-link" style="color: var(--accent); text-decoration: underline;">Hover link</a>
|
|
113
|
+
<Tooltip id="tooltip-link" text="This is a link with a tooltip" position="top" />
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-badge">
|
|
117
|
+
<span class="badge badge--primary">New</span>
|
|
118
|
+
<Tooltip id="tooltip-badge" text="This is a badge with a tooltip" position="top" />
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-icon">
|
|
122
|
+
<button class="btn" aria-label="Settings" style="padding: var(--spacing-2);">
|
|
123
|
+
<svg width="20" height="20" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2">
|
|
124
|
+
<circle cx="8" cy="8" r="2.5"></circle>
|
|
125
|
+
<path d="M8 1v2M8 13v2M15 8h-2M3 8H1M12.364 3.636l-1.414 1.414M5.05 10.95l-1.414 1.414M12.364 12.364l-1.414-1.414M5.05 5.05L3.636 3.636"></path>
|
|
126
|
+
</svg>
|
|
127
|
+
</button>
|
|
128
|
+
<Tooltip id="tooltip-icon" text="Settings icon" position="top" />
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</section>
|
|
133
|
+
|
|
134
|
+
<section>
|
|
135
|
+
<h2>Long Text</h2>
|
|
136
|
+
<p>Tooltips automatically wrap long text and have a maximum width:</p>
|
|
137
|
+
|
|
138
|
+
<div class="example">
|
|
139
|
+
<div class="example-title">Long Text Tooltip</div>
|
|
140
|
+
<div style="display: flex; flex-wrap: wrap; gap: var(--spacing-4); align-items: center; padding: var(--spacing-8);">
|
|
141
|
+
<div class="tooltip-wrapper" aria-describedby="tooltip-long">
|
|
142
|
+
<button class="btn btn-info">Hover for long text</button>
|
|
143
|
+
<Tooltip id="tooltip-long" text="This is a much longer tooltip that will automatically wrap to multiple lines when it exceeds the maximum width of the tooltip container." position="top" />
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</section>
|
|
148
|
+
|
|
149
|
+
<section>
|
|
150
|
+
<h2>Props</h2>
|
|
151
|
+
<ul>
|
|
152
|
+
<li><code>text</code> (string, required) - The tooltip text content</li>
|
|
153
|
+
<li><code>position</code> ('top' | 'bottom' | 'left' | 'right', optional) - Tooltip position relative to trigger element (default: 'top')</li>
|
|
154
|
+
<li><code>delay</code> (number, optional) - Delay in milliseconds before showing tooltip (default: 0)</li>
|
|
155
|
+
<li><code>id</code> (string, optional) - Unique ID for the tooltip. If not provided, a random ID will be generated</li>
|
|
156
|
+
<li><code>class</code> (string, optional) - Additional CSS classes</li>
|
|
157
|
+
</ul>
|
|
158
|
+
</section>
|
|
159
|
+
|
|
160
|
+
<section>
|
|
161
|
+
<h2>Features</h2>
|
|
162
|
+
<ul>
|
|
163
|
+
<li>Four position options (top, bottom, left, right)</li>
|
|
164
|
+
<li>Automatic arrow positioning</li>
|
|
165
|
+
<li>Accessible with ARIA attributes</li>
|
|
166
|
+
<li>Keyboard accessible (works with focus states)</li>
|
|
167
|
+
<li>Theme-aware styling using semantic variables</li>
|
|
168
|
+
<li>Smooth animations (respects <code>prefers-reduced-motion</code>)</li>
|
|
169
|
+
<li>Automatic text wrapping for long content</li>
|
|
170
|
+
<li>Maximum width constraint for readability</li>
|
|
171
|
+
</ul>
|
|
172
|
+
</section>
|
|
173
|
+
|
|
174
|
+
<section>
|
|
175
|
+
<h2>Accessibility</h2>
|
|
176
|
+
<p>The Tooltip component includes comprehensive accessibility features:</p>
|
|
177
|
+
<ul>
|
|
178
|
+
<li><strong>ARIA Attributes:</strong> Uses <code>role="tooltip"</code> and <code>aria-describedby</code> pattern</li>
|
|
179
|
+
<li><strong>Keyboard Support:</strong> Tooltips appear on focus for keyboard users</li>
|
|
180
|
+
<li><strong>Screen Reader Support:</strong> Tooltip content is associated with the trigger element</li>
|
|
181
|
+
<li><strong>Focus Management:</strong> Tooltips work with <code>:focus-within</code> for proper focus handling</li>
|
|
182
|
+
</ul>
|
|
183
|
+
|
|
184
|
+
<h3>Proper Usage</h3>
|
|
185
|
+
<p>Always use <code>aria-describedby</code> on the trigger element to associate it with the tooltip:</p>
|
|
186
|
+
<CodeBlock code={`<div class="tooltip-wrapper" aria-describedby="my-tooltip">
|
|
187
|
+
<button>Hover me</button>
|
|
188
|
+
<Tooltip id="my-tooltip" text="Tooltip text" />
|
|
189
|
+
</div>`} language="astro" />
|
|
190
|
+
</section>
|
|
191
|
+
|
|
192
|
+
<section>
|
|
193
|
+
<h2>Styling</h2>
|
|
194
|
+
<p>Tooltips use semantic theme variables and automatically adapt to the selected theme:</p>
|
|
195
|
+
<ul>
|
|
196
|
+
<li>Background: <code>var(--text)</code> (uses text color for high contrast)</li>
|
|
197
|
+
<li>Text: <code>var(--background)</code> (uses background color for contrast)</li>
|
|
198
|
+
<li>Shadow: <code>var(--shadow-lg)</code> for depth</li>
|
|
199
|
+
</ul>
|
|
200
|
+
<p><strong>Svelte & Vanilla:</strong> <a href="/docs/svelte/components/tooltip">Svelte</a> · Vanilla: same HTML and BEM as in Usage above; add minimal JS for show/hide and position.</p>
|
|
201
|
+
</section>
|
|
202
|
+
</DocsLayout>
|
|
203
|
+
|
|
204
|
+
<style>
|
|
205
|
+
.tooltip-wrapper {
|
|
206
|
+
position: relative;
|
|
207
|
+
display: inline-block;
|
|
208
|
+
}
|
|
209
|
+
</style>
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../layouts/DocsLayout.astro';
|
|
3
|
+
import Card from '../components/Card.astro';
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<DocsLayout title="Components — Astro" description="Component library with usage examples and live demos">
|
|
7
|
+
<section>
|
|
8
|
+
<h2>Component Library</h2>
|
|
9
|
+
<p>Rizzo CSS includes a comprehensive set of accessible, theme-aware components. Each component is built with semantic variables, follows BEM naming conventions, and includes full keyboard navigation and ARIA support.</p>
|
|
10
|
+
<p>Full documentation (getting started, theming, API) is on the main site: <a href="https://rizzo-css.vercel.app/docs" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs</a>.</p>
|
|
11
|
+
</section>
|
|
12
|
+
|
|
13
|
+
<section>
|
|
14
|
+
<h2>Available Components</h2>
|
|
15
|
+
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--spacing-70), 1fr)); gap: var(--spacing-6); margin: var(--spacing-8) 0;">
|
|
16
|
+
<a href="/components/navbar" class="component-card-link">
|
|
17
|
+
<Card variant="elevated">
|
|
18
|
+
<div class="card__body">
|
|
19
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Navbar</h3>
|
|
20
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Responsive, accessible navigation bar with integrated settings button</p>
|
|
21
|
+
</div>
|
|
22
|
+
</Card>
|
|
23
|
+
</a>
|
|
24
|
+
|
|
25
|
+
<a href="/components/settings" class="component-card-link">
|
|
26
|
+
<Card variant="elevated">
|
|
27
|
+
<div class="card__body">
|
|
28
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Settings</h3>
|
|
29
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Comprehensive settings panel for theme switching and accessibility options</p>
|
|
30
|
+
</div>
|
|
31
|
+
</Card>
|
|
32
|
+
</a>
|
|
33
|
+
|
|
34
|
+
<a href="/components/theme-switcher" class="component-card-link">
|
|
35
|
+
<Card variant="elevated">
|
|
36
|
+
<div class="card__body">
|
|
37
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Theme Switcher</h3>
|
|
38
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible theme switcher with theme icons and keyboard navigation</p>
|
|
39
|
+
</div>
|
|
40
|
+
</Card>
|
|
41
|
+
</a>
|
|
42
|
+
|
|
43
|
+
<a href="/components/button" class="component-card-link">
|
|
44
|
+
<Card variant="elevated">
|
|
45
|
+
<div class="card__body">
|
|
46
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Button</h3>
|
|
47
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Semantic button component with variants using theme variables</p>
|
|
48
|
+
</div>
|
|
49
|
+
</Card>
|
|
50
|
+
</a>
|
|
51
|
+
|
|
52
|
+
<a href="/components/badge" class="component-card-link">
|
|
53
|
+
<Card variant="elevated">
|
|
54
|
+
<div class="card__body">
|
|
55
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Badge</h3>
|
|
56
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Small labels and tags for displaying status, categories, or counts</p>
|
|
57
|
+
</div>
|
|
58
|
+
</Card>
|
|
59
|
+
</a>
|
|
60
|
+
|
|
61
|
+
<a href="/components/accordion" class="component-card-link">
|
|
62
|
+
<Card variant="elevated">
|
|
63
|
+
<div class="card__body">
|
|
64
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Accordion</h3>
|
|
65
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Collapsible sections with single/multiple open and keyboard navigation</p>
|
|
66
|
+
</div>
|
|
67
|
+
</Card>
|
|
68
|
+
</a>
|
|
69
|
+
|
|
70
|
+
<a href="/components/breadcrumb" class="component-card-link">
|
|
71
|
+
<Card variant="elevated">
|
|
72
|
+
<div class="card__body">
|
|
73
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Breadcrumb</h3>
|
|
74
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Navigation breadcrumbs with separator customization and responsive truncation</p>
|
|
75
|
+
</div>
|
|
76
|
+
</Card>
|
|
77
|
+
</a>
|
|
78
|
+
|
|
79
|
+
<a href="/components/pagination" class="component-card-link">
|
|
80
|
+
<Card variant="elevated">
|
|
81
|
+
<div class="card__body">
|
|
82
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Pagination</h3>
|
|
83
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible pagination with prev/next, page numbers, ellipsis, and configurable URLs</p>
|
|
84
|
+
</div>
|
|
85
|
+
</Card>
|
|
86
|
+
</a>
|
|
87
|
+
|
|
88
|
+
<a href="/components/progress-bar" class="component-card-link">
|
|
89
|
+
<Card variant="elevated">
|
|
90
|
+
<div class="card__body">
|
|
91
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Progress Bar</h3>
|
|
92
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Progress bar with variants, sizes, optional label, and indeterminate (loading) state</p>
|
|
93
|
+
</div>
|
|
94
|
+
</Card>
|
|
95
|
+
</a>
|
|
96
|
+
|
|
97
|
+
<a href="/components/spinner" class="component-card-link">
|
|
98
|
+
<Card variant="elevated">
|
|
99
|
+
<div class="card__body">
|
|
100
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Spinner</h3>
|
|
101
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible loading spinner with variants and sizes; respects reduced motion</p>
|
|
102
|
+
</div>
|
|
103
|
+
</Card>
|
|
104
|
+
</a>
|
|
105
|
+
|
|
106
|
+
<a href="/components/avatar" class="component-card-link">
|
|
107
|
+
<Card variant="elevated">
|
|
108
|
+
<div class="card__body">
|
|
109
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Avatar</h3>
|
|
110
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">User avatar with image or initials fallback, sizes and circle/square shape</p>
|
|
111
|
+
</div>
|
|
112
|
+
</Card>
|
|
113
|
+
</a>
|
|
114
|
+
|
|
115
|
+
<a href="/components/divider" class="component-card-link">
|
|
116
|
+
<Card variant="elevated">
|
|
117
|
+
<div class="card__body">
|
|
118
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Divider</h3>
|
|
119
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Horizontal or vertical divider line with optional label (e.g. OR)</p>
|
|
120
|
+
</div>
|
|
121
|
+
</Card>
|
|
122
|
+
</a>
|
|
123
|
+
|
|
124
|
+
<a href="/components/table" class="component-card-link">
|
|
125
|
+
<Card variant="elevated">
|
|
126
|
+
<div class="card__body">
|
|
127
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Table</h3>
|
|
128
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Data table with column sorting and optional filtering</p>
|
|
129
|
+
</div>
|
|
130
|
+
</Card>
|
|
131
|
+
</a>
|
|
132
|
+
|
|
133
|
+
<a href="/components/icons" class="component-card-link">
|
|
134
|
+
<Card variant="elevated">
|
|
135
|
+
<div class="card__body">
|
|
136
|
+
<h3 style="margin: 0 0 0.5rem 0;">Icons</h3>
|
|
137
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Reusable SVG icon components (Tabler Icons and Devicons) with interactive card grid and copy functionality</p>
|
|
138
|
+
</div>
|
|
139
|
+
</Card>
|
|
140
|
+
</a>
|
|
141
|
+
|
|
142
|
+
<a href="/components/copy-to-clipboard" class="component-card-link">
|
|
143
|
+
<Card variant="elevated">
|
|
144
|
+
<div class="card__body">
|
|
145
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">CopyToClipboard</h3>
|
|
146
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Component for copying text values to the clipboard with visual feedback</p>
|
|
147
|
+
</div>
|
|
148
|
+
</Card>
|
|
149
|
+
</a>
|
|
150
|
+
|
|
151
|
+
<a href="/components/forms" class="component-card-link">
|
|
152
|
+
<Card variant="elevated">
|
|
153
|
+
<div class="card__body">
|
|
154
|
+
<h3 style="margin: 0 0 0.5rem 0;">Forms</h3>
|
|
155
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Comprehensive set of accessible form components with validation states</p>
|
|
156
|
+
</div>
|
|
157
|
+
</Card>
|
|
158
|
+
</a>
|
|
159
|
+
|
|
160
|
+
<a href="/components/cards" class="component-card-link">
|
|
161
|
+
<Card variant="elevated">
|
|
162
|
+
<div class="card__body">
|
|
163
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Cards</h3>
|
|
164
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Flexible card component with variants, sections, and image support</p>
|
|
165
|
+
</div>
|
|
166
|
+
</Card>
|
|
167
|
+
</a>
|
|
168
|
+
|
|
169
|
+
<a href="/components/modal" class="component-card-link">
|
|
170
|
+
<Card variant="elevated">
|
|
171
|
+
<div class="card__body">
|
|
172
|
+
<h3 style="margin: 0 0 0.5rem 0;">Modal</h3>
|
|
173
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible modal/dialog component with focus trapping and keyboard navigation</p>
|
|
174
|
+
</div>
|
|
175
|
+
</Card>
|
|
176
|
+
</a>
|
|
177
|
+
|
|
178
|
+
<a href="/components/alert" class="component-card-link">
|
|
179
|
+
<Card variant="elevated">
|
|
180
|
+
<div class="card__body">
|
|
181
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Alert</h3>
|
|
182
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible alert component with variants, dismissible functionality, and auto-dismiss</p>
|
|
183
|
+
</div>
|
|
184
|
+
</Card>
|
|
185
|
+
</a>
|
|
186
|
+
|
|
187
|
+
<a href="/components/toast" class="component-card-link">
|
|
188
|
+
<Card variant="elevated">
|
|
189
|
+
<div class="card__body">
|
|
190
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Toast</h3>
|
|
191
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Fixed position toast notifications with auto-dismiss and programmatic control</p>
|
|
192
|
+
</div>
|
|
193
|
+
</Card>
|
|
194
|
+
</a>
|
|
195
|
+
|
|
196
|
+
<a href="/components/search" class="component-card-link">
|
|
197
|
+
<Card variant="elevated">
|
|
198
|
+
<div class="card__body">
|
|
199
|
+
<h3 style="margin: 0 0 0.5rem 0;">Search</h3>
|
|
200
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Search with Algolia integration; Cmd icon + K in trigger (same size as search icon); same live example on Astro, Svelte, and Vanilla</p>
|
|
201
|
+
</div>
|
|
202
|
+
</Card>
|
|
203
|
+
</a>
|
|
204
|
+
|
|
205
|
+
<a href="/components/tooltip" class="component-card-link">
|
|
206
|
+
<Card variant="elevated">
|
|
207
|
+
<div class="card__body">
|
|
208
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Tooltip</h3>
|
|
209
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible tooltip component with positioning options and hover states</p>
|
|
210
|
+
</div>
|
|
211
|
+
</Card>
|
|
212
|
+
</a>
|
|
213
|
+
|
|
214
|
+
<a href="/components/dropdown" class="component-card-link">
|
|
215
|
+
<Card variant="elevated">
|
|
216
|
+
<div class="card__body">
|
|
217
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Dropdown</h3>
|
|
218
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible dropdown menu with keyboard navigation, nested submenus, separators, and menu items</p>
|
|
219
|
+
</div>
|
|
220
|
+
</Card>
|
|
221
|
+
</a>
|
|
222
|
+
|
|
223
|
+
<a href="/components/tabs" class="component-card-link">
|
|
224
|
+
<Card variant="elevated">
|
|
225
|
+
<div class="card__body">
|
|
226
|
+
<h3 style="margin: 0 0 var(--spacing-2) 0;">Tabs</h3>
|
|
227
|
+
<p style="margin: 0; color: var(--text-dim); font-size: var(--font-size-sm);">Accessible tabs component with keyboard navigation and ARIA tab pattern</p>
|
|
228
|
+
</div>
|
|
229
|
+
</Card>
|
|
230
|
+
</a>
|
|
231
|
+
</div>
|
|
232
|
+
</section>
|
|
233
|
+
|
|
234
|
+
<section>
|
|
235
|
+
<h2>Component Features</h2>
|
|
236
|
+
<p>All components in Rizzo CSS share these core features:</p>
|
|
237
|
+
<ul>
|
|
238
|
+
<li><strong>Semantic Theming</strong> - All components use semantic CSS variables that adapt to the selected theme</li>
|
|
239
|
+
<li><strong>Accessibility</strong> - Full keyboard navigation, ARIA attributes, and screen reader support</li>
|
|
240
|
+
<li><strong>BEM Naming</strong> - Consistent class naming convention (block__element--modifier)</li>
|
|
241
|
+
<li><strong>Responsive</strong> - Mobile-first design with responsive breakpoints</li>
|
|
242
|
+
<li><strong>Theme-Aware</strong> - Automatically adapt to all 14 available themes</li>
|
|
243
|
+
<li><strong>WCAG AA Compliant</strong> - Proper contrast ratios and accessible color combinations</li>
|
|
244
|
+
</ul>
|
|
245
|
+
</section>
|
|
246
|
+
</DocsLayout>
|
|
247
|
+
|
|
248
|
+
<style>
|
|
249
|
+
.component-card-link {
|
|
250
|
+
text-decoration: none;
|
|
251
|
+
color: inherit;
|
|
252
|
+
display: block;
|
|
253
|
+
transition: transform var(--transition-base);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.component-card-link:hover {
|
|
257
|
+
transform: translateY(calc(-1 * var(--spacing-0-125)));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.component-card-link:focus-visible {
|
|
261
|
+
outline: var(--outline-width) solid var(--accent);
|
|
262
|
+
outline-offset: var(--outline-offset);
|
|
263
|
+
border-radius: var(--radius-lg);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.component-card-link .card__body h3 {
|
|
267
|
+
color: var(--text);
|
|
268
|
+
transition: color var(--transition-base);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.component-card-link:hover .card__body h3 {
|
|
272
|
+
color: var(--accent);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (prefers-reduced-motion: reduce) {
|
|
276
|
+
.component-card-link {
|
|
277
|
+
transition: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.component-card-link:hover {
|
|
281
|
+
transform: none;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media (width <= 640px) {
|
|
286
|
+
div[style*="grid-template-columns"] {
|
|
287
|
+
grid-template-columns: 1fr !important;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
<DocsLayout title="Accessibility" description="Keyboard, ARIA, and screen reader support.">
|
|
5
|
+
<section>
|
|
6
|
+
<p>Read the full doc on the main site:</p>
|
|
7
|
+
<p><a href="https://rizzo-css.vercel.app/docs/accessibility" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs/accessibility</a></p>
|
|
8
|
+
</section>
|
|
9
|
+
</DocsLayout>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
<DocsLayout title="Colors" description="Semantic color variables and themes.">
|
|
5
|
+
<section>
|
|
6
|
+
<p>Read the full doc on the main site:</p>
|
|
7
|
+
<p><a href="https://rizzo-css.vercel.app/docs/colors" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs/colors</a></p>
|
|
8
|
+
</section>
|
|
9
|
+
</DocsLayout>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
<DocsLayout title="Design System" description="Design tokens, BEM, and structure.">
|
|
5
|
+
<section>
|
|
6
|
+
<p>Read the full doc on the main site:</p>
|
|
7
|
+
<p><a href="https://rizzo-css.vercel.app/docs/design-system" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs/design-system</a></p>
|
|
8
|
+
</section>
|
|
9
|
+
</DocsLayout>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
<DocsLayout title="Getting Started" description="Install, add CSS, and set a theme.">
|
|
5
|
+
<section>
|
|
6
|
+
<p>Read the full doc on the main site:</p>
|
|
7
|
+
<p><a href="https://rizzo-css.vercel.app/docs/getting-started" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs/getting-started</a></p>
|
|
8
|
+
</section>
|
|
9
|
+
</DocsLayout>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
<DocsLayout title="Documentation" description="Overview and links to the full docs on the main site.">
|
|
5
|
+
<section>
|
|
6
|
+
<p>Full documentation lives on the main site. Use the links below or the nav.</p>
|
|
7
|
+
<ul>
|
|
8
|
+
<li><a href="https://rizzo-css.vercel.app/docs/getting-started" target="_blank" rel="noopener noreferrer">Getting Started</a></li>
|
|
9
|
+
<li><a href="https://rizzo-css.vercel.app/docs/design-system" target="_blank" rel="noopener noreferrer">Design System</a></li>
|
|
10
|
+
<li><a href="https://rizzo-css.vercel.app/docs/accessibility" target="_blank" rel="noopener noreferrer">Accessibility</a></li>
|
|
11
|
+
<li><a href="https://rizzo-css.vercel.app/docs/colors" target="_blank" rel="noopener noreferrer">Colors</a></li>
|
|
12
|
+
<li><a href="https://rizzo-css.vercel.app/docs/theming" target="_blank" rel="noopener noreferrer">Theming</a></li>
|
|
13
|
+
</ul>
|
|
14
|
+
</section>
|
|
15
|
+
</DocsLayout>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../../layouts/DocsLayout.astro';
|
|
3
|
+
|
|
4
|
+
const { theme } = Astro.params;
|
|
5
|
+
const mainSiteUrl = 'https://rizzo-css.vercel.app/docs/themes/' + theme;
|
|
6
|
+
const themeId = theme || 'unknown';
|
|
7
|
+
---
|
|
8
|
+
<DocsLayout title={`Theme: ${themeId}`} description="Theme preview and link to main site.">
|
|
9
|
+
<section>
|
|
10
|
+
<p>Full theme showcase on the main site:</p>
|
|
11
|
+
<p><a href={mainSiteUrl} target="_blank" rel="noopener noreferrer">{mainSiteUrl}</a></p>
|
|
12
|
+
<p>Set this theme with <code>data-theme="{themeId}"</code> on <code><html></code> or use the Settings panel.</p>
|
|
13
|
+
</section>
|
|
14
|
+
</DocsLayout>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocsLayout from '../../layouts/DocsLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
<DocsLayout title="Theming" description="Theme overview and how to set data-theme.">
|
|
5
|
+
<section>
|
|
6
|
+
<p>Full theming docs and theme showcase on the main site:</p>
|
|
7
|
+
<p><a href="https://rizzo-css.vercel.app/docs/theming" target="_blank" rel="noopener noreferrer">https://rizzo-css.vercel.app/docs/theming</a></p>
|
|
8
|
+
<p>Use the nav to open individual theme pages below, or the Settings panel to switch themes.</p>
|
|
9
|
+
</section>
|
|
10
|
+
</DocsLayout>
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Layout from '../layouts/Layout.astro';
|
|
3
|
-
/* Placeholder replaced by rizzo-css CLI when scaffolding */
|
|
4
3
|
const TITLE = '{{TITLE}}';
|
|
5
4
|
---
|
|
6
5
|
<Layout title={TITLE}>
|
|
7
|
-
<
|
|
8
|
-
<header class="container flex flex-wrap items-center justify-between gap-4" style="padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); border-bottom: 1px solid var(--border);">
|
|
9
|
-
<a href="/" class="font-semibold" style="font-size: var(--font-size-lg); color: var(--text); text-decoration: none;">{TITLE}</a>
|
|
10
|
-
<a href="https://rizzo-css.vercel.app/docs/getting-started" class="btn btn-outline" target="_blank" rel="noopener noreferrer">Docs</a>
|
|
11
|
-
</header>
|
|
12
|
-
<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);">
|
|
6
|
+
<div class="flex flex-col items-center justify-center text-center" style="padding: var(--spacing-12) var(--spacing-4); min-height: calc(100vh - 4rem);">
|
|
13
7
|
<span class="badge badge--primary badge--sm mb-4">Astro + Rizzo CSS</span>
|
|
14
8
|
<h1 style="font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 800; line-height: 1.1; margin: 0 0 var(--spacing-4) 0; color: var(--text);">Build something great</h1>
|
|
15
9
|
<p style="font-size: var(--font-size-xl); color: var(--text-dim); max-width: 42ch; margin: 0 0 var(--spacing-8) 0; line-height: var(--line-height-relaxed);">Same design system as Vanilla JS and Svelte — 14 themes, 24 components, full keyboard and screen reader support.</p>
|
|
16
10
|
<div class="flex flex-wrap justify-center gap-4 mb-12">
|
|
17
|
-
<a href="
|
|
18
|
-
<a href="https://rizzo-css.vercel.app/docs/
|
|
11
|
+
<a href="/components" class="btn btn-primary">Component showcase</a>
|
|
12
|
+
<a href="https://rizzo-css.vercel.app/docs/getting-started" class="btn btn-outline" target="_blank" rel="noopener noreferrer">Get started (docs)</a>
|
|
19
13
|
<button type="button" class="btn btn-outline" onclick="window.showToast && window.showToast('Hello from Rizzo!', { variant: 'success' })">Show toast</button>
|
|
20
14
|
</div>
|
|
21
15
|
<div class="flex flex-wrap justify-center gap-3 mb-16">
|
|
@@ -24,7 +18,7 @@ const TITLE = '{{TITLE}}';
|
|
|
24
18
|
<span class="badge badge--info">WCAG AA</span>
|
|
25
19
|
</div>
|
|
26
20
|
<footer style="margin-top: auto; padding-top: var(--spacing-8); color: var(--text-dim); font-size: var(--font-size-sm);">
|
|
27
|
-
<a href="https://rizzo-css.vercel.app" style="color: var(--accent);">Rizzo CSS</a> — design system for the web
|
|
21
|
+
<a href="https://rizzo-css.vercel.app" style="color: var(--accent);">Rizzo CSS</a> — design system for the web. <a href="https://rizzo-css.vercel.app/docs" target="_blank" rel="noopener noreferrer">Full docs</a>.
|
|
28
22
|
</footer>
|
|
29
|
-
</
|
|
23
|
+
</div>
|
|
30
24
|
</Layout>
|