rizzo-css 0.0.82 → 0.0.84

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.
Files changed (75) hide show
  1. package/README.md +1 -1
  2. package/dist/rizzo.min.css +1 -1
  3. package/package.json +1 -1
  4. package/scaffold/astro/Settings.astro +3 -2
  5. package/scaffold/react/DocsSidebar.tsx +10 -3
  6. package/scaffold/react/base/package.json +1 -1
  7. package/scaffold/react/variants/full/package.json +1 -1
  8. package/scaffold/react/variants/full/src/config/docsNav.ts +50 -33
  9. package/scaffold/svelte/Settings.svelte +30 -5
  10. package/scaffold/svelte/variants/full/src/config/docsNav.ts +194 -14
  11. package/scaffold/vanilla/README-RIZZO.md +1 -1
  12. package/scaffold/vanilla/components/accordion.html +10 -0
  13. package/scaffold/vanilla/components/alert-dialog.html +10 -0
  14. package/scaffold/vanilla/components/alert.html +10 -0
  15. package/scaffold/vanilla/components/aspect-ratio.html +10 -0
  16. package/scaffold/vanilla/components/avatar.html +10 -0
  17. package/scaffold/vanilla/components/back-to-top.html +10 -0
  18. package/scaffold/vanilla/components/badge.html +10 -0
  19. package/scaffold/vanilla/components/breadcrumb.html +10 -0
  20. package/scaffold/vanilla/components/button-group.html +10 -0
  21. package/scaffold/vanilla/components/button.html +10 -0
  22. package/scaffold/vanilla/components/calendar.html +10 -0
  23. package/scaffold/vanilla/components/cards.html +10 -0
  24. package/scaffold/vanilla/components/carousel.html +10 -0
  25. package/scaffold/vanilla/components/chart.html +10 -0
  26. package/scaffold/vanilla/components/collapsible.html +10 -0
  27. package/scaffold/vanilla/components/command.html +10 -0
  28. package/scaffold/vanilla/components/context-menu.html +10 -0
  29. package/scaffold/vanilla/components/copy-to-clipboard.html +10 -0
  30. package/scaffold/vanilla/components/dashboard.html +10 -0
  31. package/scaffold/vanilla/components/direction.html +10 -0
  32. package/scaffold/vanilla/components/divider.html +10 -0
  33. package/scaffold/vanilla/components/docs-sidebar.html +10 -0
  34. package/scaffold/vanilla/components/dropdown.html +10 -0
  35. package/scaffold/vanilla/components/empty.html +10 -0
  36. package/scaffold/vanilla/components/font-switcher.html +10 -0
  37. package/scaffold/vanilla/components/footer.html +10 -0
  38. package/scaffold/vanilla/components/forms.html +10 -0
  39. package/scaffold/vanilla/components/hover-card.html +10 -0
  40. package/scaffold/vanilla/components/icons.html +10 -0
  41. package/scaffold/vanilla/components/index.html +10 -0
  42. package/scaffold/vanilla/components/input-group.html +10 -0
  43. package/scaffold/vanilla/components/input-otp.html +10 -0
  44. package/scaffold/vanilla/components/kbd.html +10 -0
  45. package/scaffold/vanilla/components/label.html +10 -0
  46. package/scaffold/vanilla/components/menubar.html +10 -0
  47. package/scaffold/vanilla/components/modal.html +10 -0
  48. package/scaffold/vanilla/components/navbar.html +10 -0
  49. package/scaffold/vanilla/components/pagination.html +10 -0
  50. package/scaffold/vanilla/components/popover.html +10 -0
  51. package/scaffold/vanilla/components/progress-bar.html +10 -0
  52. package/scaffold/vanilla/components/range-calendar.html +10 -0
  53. package/scaffold/vanilla/components/resizable.html +10 -0
  54. package/scaffold/vanilla/components/scroll-area.html +10 -0
  55. package/scaffold/vanilla/components/search.html +10 -0
  56. package/scaffold/vanilla/components/separator.html +10 -0
  57. package/scaffold/vanilla/components/settings.html +10 -0
  58. package/scaffold/vanilla/components/sheet.html +10 -0
  59. package/scaffold/vanilla/components/skeleton.html +10 -0
  60. package/scaffold/vanilla/components/slider.html +10 -0
  61. package/scaffold/vanilla/components/sound-effects.html +10 -0
  62. package/scaffold/vanilla/components/spinner.html +10 -0
  63. package/scaffold/vanilla/components/switch.html +10 -0
  64. package/scaffold/vanilla/components/table.html +10 -0
  65. package/scaffold/vanilla/components/tabs.html +10 -0
  66. package/scaffold/vanilla/components/theme-switcher.html +10 -0
  67. package/scaffold/vanilla/components/toast.html +10 -0
  68. package/scaffold/vanilla/components/toggle-group.html +10 -0
  69. package/scaffold/vanilla/components/toggle.html +10 -0
  70. package/scaffold/vanilla/components/tooltip.html +10 -0
  71. package/scaffold/vanilla/index.html +10 -0
  72. package/scaffold/vue/DocsSidebar.vue +9 -3
  73. package/scaffold/vue/base/package.json +1 -1
  74. package/scaffold/vue/variants/full/package.json +1 -1
  75. package/scaffold/vue/variants/full/src/config/docsNav.ts +50 -33
@@ -12,6 +12,8 @@ export interface DocsNavLink {
12
12
  frameworkOnly?: boolean;
13
13
  absolute?: boolean;
14
14
  sections?: DocsNavSection[];
15
+ /** When true, open in new tab (external to main site). */
16
+ external?: boolean;
15
17
  }
16
18
 
17
19
  export interface DocsNavGroup {
@@ -36,7 +38,7 @@ const props = withDefaults(
36
38
  const activeSectionId = ref<string | null>(null);
37
39
 
38
40
  function fullHref(link: { href: string; frameworkOnly?: boolean; absolute?: boolean }): string {
39
- if (link.absolute && link.href.startsWith('/')) return link.href;
41
+ if (link.absolute && link.href) return link.href;
40
42
  const base = link.frameworkOnly ? props.pathPrefix : '/docs';
41
43
  return `${base}/${link.href}`;
42
44
  }
@@ -98,6 +100,8 @@ onUnmounted(() => {
98
100
  :href="fullHref(link)"
99
101
  class="docs-sidebar__link"
100
102
  :class="{ 'docs-sidebar__link--active': isActive(link) && (link.sections?.length === 0 || activeSectionId == null) }"
103
+ :target="link.external ? '_blank' : undefined"
104
+ :rel="link.external ? 'noopener noreferrer' : undefined"
101
105
  :aria-current="isActive(link) && (link.sections?.length === 0 || activeSectionId == null) ? 'page' : undefined"
102
106
  >
103
107
  {{ link.label }}
@@ -111,8 +115,10 @@ onUnmounted(() => {
111
115
  <a
112
116
  :href="`${fullHref(link)}#${section.id}`"
113
117
  class="docs-sidebar__sublink"
114
- :class="{ 'docs-sidebar__sublink--active': activeSectionId === section.id && currentPath.replace(/\/$/, '') === fullHref(link) }"
115
- :aria-current="(activeSectionId === section.id && currentPath.replace(/\/$/, '') === fullHref(link)) ? 'location' : undefined"
118
+ :class="{ 'docs-sidebar__sublink--active': !link.external && activeSectionId === section.id && currentPath.replace(/\/$/, '') === fullHref(link).split('#')[0] }"
119
+ :aria-current="(!link.external && activeSectionId === section.id && currentPath.replace(/\/$/, '') === fullHref(link).split('#')[0]) ? 'location' : undefined"
120
+ :target="link.external ? '_blank' : undefined"
121
+ :rel="link.external ? 'noopener noreferrer' : undefined"
116
122
  >
117
123
  {{ section.label }}
118
124
  </a>
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "@vitejs/plugin-vue": "^5.2.1",
16
- "rizzo-css": "^0.0.82",
16
+ "rizzo-css": "^0.0.84",
17
17
  "typescript": "~5.6.2",
18
18
  "vite": "^6.0.1",
19
19
  "vue-tsc": "^2.1.10"
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@vitejs/plugin-vue": "^5.2.1",
17
- "rizzo-css": "^0.0.82",
17
+ "rizzo-css": "^0.0.84",
18
18
  "typescript": "~5.6.2",
19
19
  "vite": "^6.0.1",
20
20
  "vue-tsc": "^2.1.10"
@@ -1,6 +1,16 @@
1
1
  /**
2
- * Docs nav for the full template. Matches main site structure (Introduction, Components, Blocks, Themes).
2
+ * Docs sidebar nav for full template. Matches https://rizzo-css.vercel.app exactly.
3
+ * Local routes: /docs/overview, /docs/getting-started, /docs/components. All other links point to the main site.
3
4
  */
5
+ import { COMPONENT_CATEGORIES } from './componentCategories';
6
+
7
+ const SITE_BASE = 'https://rizzo-css.vercel.app';
8
+ const FRAMEWORK_PREFIX = '/docs/vue';
9
+
10
+ function slugToTitle(slug: string): string {
11
+ return slug.split('-').map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');
12
+ }
13
+
4
14
  export interface DocsNavSection {
5
15
  id: string;
6
16
  label: string;
@@ -12,6 +22,7 @@ export interface DocsNavLink {
12
22
  frameworkOnly?: boolean;
13
23
  absolute?: boolean;
14
24
  sections?: DocsNavSection[];
25
+ external?: boolean;
15
26
  }
16
27
 
17
28
  export interface DocsNavGroup {
@@ -23,48 +34,54 @@ export const DOCS_NAV: DocsNavGroup[] = [
23
34
  {
24
35
  label: 'Introduction',
25
36
  links: [
26
- {
27
- href: 'overview',
28
- label: 'Overview',
29
- frameworkOnly: true,
30
- sections: [
31
- { id: 'overview', label: 'Overview' },
32
- { id: 'installation', label: 'Installation' },
33
- { id: 'components', label: 'Components' },
34
- { id: 'blocks', label: 'Blocks' },
35
- ],
36
- },
37
- {
38
- href: 'getting-started',
39
- label: 'Getting Started',
40
- sections: [
41
- { id: 'installation', label: 'Installation' },
42
- { id: 'project-structure', label: 'Project Structure' },
43
- { id: 'development', label: 'Development' },
44
- { id: 'using-components', label: 'Using Components' },
45
- { id: 'using-themes', label: 'Using Themes' },
46
- ],
47
- },
37
+ { href: '/docs/overview', label: 'Overview', absolute: true, sections: [{ id: 'overview', label: 'Overview' }, { id: 'installation', label: 'Installation' }, { id: 'components', label: 'Components' }, { id: 'blocks', label: 'Blocks' }] },
38
+ { href: `${SITE_BASE}/docs/showcase`, label: 'Showcase', absolute: true, external: true, sections: [{ id: 'components', label: 'Components' }, { id: 'themes', label: 'Themes' }, { id: 'blocks', label: 'Blocks' }, { id: 'examples', label: 'Examples' }] },
39
+ { href: '/docs/getting-started', label: 'Getting Started', absolute: true, sections: [{ id: 'installation', label: 'Installation' }, { id: 'installation-by-framework', label: 'By framework' }, { id: 'vanilla', label: 'Vanilla' }, { id: 'astro', label: 'Astro' }, { id: 'svelte', label: 'Svelte' }, { id: 'react', label: 'React' }, { id: 'vue', label: 'Vue' }, { id: 'project-structure', label: 'Project Structure' }, { id: 'development', label: 'Development' }, { id: 'building', label: 'Building' }, { id: 'using-components', label: 'Using Components' }, { id: 'using-themes', label: 'Using Themes' }, { id: 'css-architecture', label: 'CSS Architecture' }] },
40
+ ],
41
+ },
42
+ {
43
+ label: 'Foundations',
44
+ links: [
45
+ { href: `${SITE_BASE}/docs/design-system`, label: 'Design System', absolute: true, external: true },
46
+ { href: `${SITE_BASE}/docs/theming`, label: 'Theming', absolute: true, external: true },
47
+ { href: `${SITE_BASE}/docs/accessibility`, label: 'Accessibility', absolute: true, external: true },
48
+ { href: `${SITE_BASE}/docs/accessibility/manual-testing`, label: 'Manual testing checklist', absolute: true, external: true },
49
+ { href: `${SITE_BASE}/docs/colors`, label: 'Colors', absolute: true, external: true },
50
+ { href: `${SITE_BASE}/docs/tokens`, label: 'Tokens reference', absolute: true, external: true },
51
+ { href: `${SITE_BASE}/docs/best-practices`, label: 'Best Practices', absolute: true, external: true },
48
52
  ],
49
53
  },
50
54
  {
51
55
  label: 'Components',
52
- links: [{ href: 'components', label: 'Overview', frameworkOnly: true }],
56
+ links: [
57
+ { href: '/docs/components', label: 'Overview', absolute: true },
58
+ ...COMPONENT_CATEGORIES.flatMap((cat) =>
59
+ cat.slugs.map((slug) => ({
60
+ href: `${SITE_BASE}${FRAMEWORK_PREFIX}/components/${slug}`,
61
+ label: slugToTitle(slug),
62
+ absolute: true as const,
63
+ external: true as const,
64
+ }))
65
+ ),
66
+ ],
53
67
  },
54
68
  {
55
69
  label: 'Blocks',
56
70
  links: [
57
- { href: '/blocks', label: 'Blocks overview', absolute: true },
58
- { href: '/blocks/landing-hero', label: 'Landing hero', absolute: true },
59
- { href: '/blocks/pricing', label: 'Pricing cards', absolute: true },
60
- { href: '/blocks/dashboard-01', label: 'Dashboard', absolute: true },
61
- { href: '/blocks/docs-layout', label: 'Docs layout', absolute: true },
62
- { href: '/blocks/login', label: 'Login', absolute: true },
63
- { href: '/blocks/signup', label: 'Sign up', absolute: true },
71
+ { href: `${SITE_BASE}/blocks`, label: 'Blocks overview', absolute: true, external: true },
72
+ { href: `${SITE_BASE}/blocks/landing-hero`, label: 'Landing hero', absolute: true, external: true },
73
+ { href: `${SITE_BASE}/blocks/pricing`, label: 'Pricing cards', absolute: true, external: true },
74
+ { href: `${SITE_BASE}/blocks/dashboard-01`, label: 'Dashboard', absolute: true, external: true },
75
+ { href: `${SITE_BASE}/blocks/docs-layout`, label: 'Docs layout', absolute: true, external: true },
76
+ { href: `${SITE_BASE}/blocks/login`, label: 'Login', absolute: true, external: true },
77
+ { href: `${SITE_BASE}/blocks/signup`, label: 'Sign up', absolute: true, external: true },
64
78
  ],
65
79
  },
66
80
  {
67
- label: 'Themes',
68
- links: [{ href: '/themes', label: 'Themes', absolute: true }],
81
+ label: 'Examples',
82
+ links: [
83
+ { href: `${SITE_BASE}/docs/examples`, label: 'Examples overview', absolute: true, external: true },
84
+ { href: `${SITE_BASE}/docs/examples/form-layouts`, label: 'Form & layout examples', absolute: true, external: true, sections: [{ id: 'login-form', label: 'Login form' }, { id: 'contact-form', label: 'Contact form' }, { id: 'dashboard-stats', label: 'Dashboard stats cards' }, { id: 'card-grid', label: 'Card grid' }, { id: 'settings-panel', label: 'Settings panel' }] },
85
+ ],
69
86
  },
70
87
  ];