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.
Files changed (79) hide show
  1. package/README.md +3 -3
  2. package/bin/rizzo-css.js +24 -24
  3. package/dist/rizzo.min.css +9 -7
  4. package/package.json +4 -4
  5. package/scaffold/astro/Footer.astro +1 -1
  6. package/scaffold/astro/base/README-RIZZO.md +1 -1
  7. package/scaffold/astro/variants/full/README-RIZZO.md +1 -1
  8. package/scaffold/react/base/package.json +1 -1
  9. package/scaffold/svelte/Chart.svelte +34 -0
  10. package/scaffold/svelte/Command.svelte +89 -0
  11. package/scaffold/svelte/Direction.svelte +17 -0
  12. package/scaffold/svelte/InputOtp.svelte +57 -0
  13. package/scaffold/svelte/Menubar.svelte +78 -0
  14. package/scaffold/svelte/base/README-RIZZO.md +2 -1
  15. package/scaffold/svelte/base/vite.config.js +6 -0
  16. package/scaffold/svelte/variants/full/README-RIZZO.md +2 -1
  17. package/scaffold/svelte/variants/full/vite.config.js +6 -0
  18. package/scaffold/vanilla/README-RIZZO.md +2 -2
  19. package/scaffold/vanilla/components/accordion.html +22 -0
  20. package/scaffold/vanilla/components/alert-dialog.html +22 -0
  21. package/scaffold/vanilla/components/alert.html +22 -0
  22. package/scaffold/vanilla/components/aspect-ratio.html +22 -0
  23. package/scaffold/vanilla/components/avatar.html +22 -0
  24. package/scaffold/vanilla/components/back-to-top.html +22 -0
  25. package/scaffold/vanilla/components/badge.html +22 -0
  26. package/scaffold/vanilla/components/breadcrumb.html +22 -0
  27. package/scaffold/vanilla/components/button-group.html +22 -0
  28. package/scaffold/vanilla/components/button.html +22 -0
  29. package/scaffold/vanilla/components/calendar.html +22 -0
  30. package/scaffold/vanilla/components/cards.html +22 -0
  31. package/scaffold/vanilla/components/carousel.html +22 -0
  32. package/scaffold/vanilla/components/chart.html +870 -0
  33. package/scaffold/vanilla/components/collapsible.html +22 -0
  34. package/scaffold/vanilla/components/command.html +870 -0
  35. package/scaffold/vanilla/components/context-menu.html +22 -0
  36. package/scaffold/vanilla/components/copy-to-clipboard.html +22 -0
  37. package/scaffold/vanilla/components/dashboard.html +22 -0
  38. package/scaffold/vanilla/components/direction.html +870 -0
  39. package/scaffold/vanilla/components/divider.html +22 -0
  40. package/scaffold/vanilla/components/docs-sidebar.html +22 -0
  41. package/scaffold/vanilla/components/dropdown.html +22 -0
  42. package/scaffold/vanilla/components/empty.html +22 -0
  43. package/scaffold/vanilla/components/font-switcher.html +22 -0
  44. package/scaffold/vanilla/components/footer.html +22 -0
  45. package/scaffold/vanilla/components/forms.html +22 -0
  46. package/scaffold/vanilla/components/hover-card.html +22 -0
  47. package/scaffold/vanilla/components/icons.html +22 -0
  48. package/scaffold/vanilla/components/index.html +27 -0
  49. package/scaffold/vanilla/components/input-group.html +22 -0
  50. package/scaffold/vanilla/components/input-otp.html +870 -0
  51. package/scaffold/vanilla/components/kbd.html +22 -0
  52. package/scaffold/vanilla/components/label.html +22 -0
  53. package/scaffold/vanilla/components/menubar.html +870 -0
  54. package/scaffold/vanilla/components/modal.html +22 -0
  55. package/scaffold/vanilla/components/navbar.html +22 -0
  56. package/scaffold/vanilla/components/pagination.html +22 -0
  57. package/scaffold/vanilla/components/popover.html +22 -0
  58. package/scaffold/vanilla/components/progress-bar.html +22 -0
  59. package/scaffold/vanilla/components/range-calendar.html +22 -0
  60. package/scaffold/vanilla/components/resizable.html +22 -0
  61. package/scaffold/vanilla/components/scroll-area.html +22 -0
  62. package/scaffold/vanilla/components/search.html +22 -0
  63. package/scaffold/vanilla/components/separator.html +22 -0
  64. package/scaffold/vanilla/components/settings.html +22 -0
  65. package/scaffold/vanilla/components/sheet.html +22 -0
  66. package/scaffold/vanilla/components/skeleton.html +22 -0
  67. package/scaffold/vanilla/components/slider.html +22 -0
  68. package/scaffold/vanilla/components/sound-effects.html +22 -0
  69. package/scaffold/vanilla/components/spinner.html +22 -0
  70. package/scaffold/vanilla/components/switch.html +22 -0
  71. package/scaffold/vanilla/components/table.html +22 -0
  72. package/scaffold/vanilla/components/tabs.html +22 -0
  73. package/scaffold/vanilla/components/theme-switcher.html +22 -0
  74. package/scaffold/vanilla/components/toast.html +22 -0
  75. package/scaffold/vanilla/components/toggle-group.html +22 -0
  76. package/scaffold/vanilla/components/toggle.html +22 -0
  77. package/scaffold/vanilla/components/tooltip.html +22 -0
  78. package/scaffold/vanilla/index.html +22 -0
  79. package/scaffold/vue/base/package.json +1 -1
package/README.md CHANGED
@@ -16,7 +16,7 @@ bun add rizzo-css
16
16
 
17
17
  The package works with **npm**, **pnpm**, **yarn**, and **bun**. After install, run the CLI with your manager’s runner: `npx` (npm/yarn), `pnpm dlx`, or `bunx`.
18
18
 
19
- **Quick start (no install):** `npx rizzo-css init` — choose **framework** (Vanilla, Astro, Svelte, React, or Vue), then **add to existing** or **create new**. Both flows use the **same template choice**: **Landing** (hero/features), **Docs** (sidebar + sample doc), **Dashboard** (sidebar + stats/table), or **Full** (clone of the docs site). Landing/Docs/Dashboard = component picker (all 53 or pick). We **never overwrite your existing files**; any skipped content is in **RIZZO-SETUP.md**. You must add the `<link>` yourself (CLI prints the exact tag). Non-interactive: `npx rizzo-css init --yes --framework vanilla|astro|svelte|react|vue --template landing|docs|dashboard|full` or `npx rizzo-css add --template landing|docs|dashboard|full`. Optional **rizzo-css.json** and `add --install-package`. All get the **same CSS and component styles**. To use the **official Svelte or Astro create command** plus Rizzo, create the app first, then run `npx rizzo-css add`:
19
+ **Quick start (no install):** `npx rizzo-css init` — choose **framework** (Vanilla, Astro, Svelte, React, or Vue), then **add to existing** or **create new**. Both flows use the **same template choice**: **Landing** (hero/features), **Docs** (sidebar + sample doc), **Dashboard** (sidebar + stats/table), or **Full** (clone of the docs site). Landing/Docs/Dashboard = component picker (all 58 or pick). We **never overwrite your existing files**; any skipped content is in **RIZZO-SETUP.md**. You must add the `<link>` yourself (CLI prints the exact tag). Non-interactive: `npx rizzo-css init --yes --framework vanilla|astro|svelte|react|vue --template landing|docs|dashboard|full` or `npx rizzo-css add --template landing|docs|dashboard|full`. Optional **rizzo-css.json** and `add --install-package`. All get the **same CSS and component styles**. To use the **official Svelte or Astro create command** plus Rizzo, create the app first, then run `npx rizzo-css add`:
20
20
 
21
21
  ```bash
22
22
  npm create svelte@latest my-app && cd my-app && npx rizzo-css add
@@ -25,7 +25,7 @@ npm create astro@latest my-app && cd my-app && npx rizzo-css add
25
25
 
26
26
  **Running the CLI:** npm → `npx`; pnpm → `pnpm dlx`; yarn → `npx` (Yarn 1 has no `dlx`; works with Yarn 2+ too); bun → `bunx`. The [docs site](https://rizzo-css.vercel.app/docs/getting-started) tabs show the correct command for each manager.
27
27
 
28
- **Same flow for new and existing:** Both prompt for **Landing** | **Docs** | **Dashboard** | **Full**. Landing/Docs/Dashboard = component picker (all 53 or pick). Full = site clone (no picker); also writes **RIZZO-SNIPPET.txt** (link + theme) unless `--no-snippet`. `npx rizzo-css doctor` checks config and CSS path. `npx rizzo-css theme` lists themes.
28
+ **Same flow for new and existing:** Both prompt for **Landing** | **Docs** | **Dashboard** | **Full**. Landing/Docs/Dashboard = component picker (all 58 or pick). Full = site clone (no picker); also writes **RIZZO-SNIPPET.txt** (link + theme) unless `--no-snippet`. `npx rizzo-css doctor` checks config and CSS path. `npx rizzo-css theme` lists themes.
29
29
 
30
30
  | | **Create new** (`init` → new) | **Add to existing** (`add` or `init` → existing) |
31
31
  |---|------------------------------|--------------------------------------------------|
@@ -72,7 +72,7 @@ import 'rizzo-css';
72
72
  **Without a bundler (plain HTML):** Use a CDN. Both unpkg and jsDelivr resolve the package root to the built CSS (via the `unpkg` / `jsdelivr` fields in this package). For reliability or to pin a version, use the explicit path:
73
73
 
74
74
  ```html
75
- <!-- unpkg (pin version: replace @latest with @0.0.73 or any version) -->
75
+ <!-- unpkg (pin version: replace @latest with @0.0.75 or any version) -->
76
76
  <link rel="stylesheet" href="https://unpkg.com/rizzo-css@latest/dist/rizzo.min.css" />
77
77
 
78
78
  <!-- or jsDelivr -->
package/bin/rizzo-css.js CHANGED
@@ -196,18 +196,18 @@ const THEMES = [...DARK_THEMES, ...LIGHT_THEMES];
196
196
  const VALID_THEME_VALUES = ['system', ...THEMES];
197
197
  // Components available for scaffold (must match scaffold/svelte and scaffold/astro; missing files are skipped on copy)
198
198
  const SVELTE_COMPONENTS = [
199
- 'Button', 'Badge', 'Card', 'Calendar', 'RangeCalendar', 'Carousel', 'Dashboard', 'Divider', 'DocsSidebar', 'Footer', 'Spinner', 'ProgressBar', 'Avatar', 'Alert',
200
- 'BackToTop', 'Breadcrumb', 'FormGroup', 'Input', 'InputGroup', 'Checkbox', 'Textarea', 'Select', 'Radio',
201
- 'CopyToClipboard', 'Tooltip', 'Pagination', 'Tabs', 'Accordion', 'Dropdown',
199
+ 'Button', 'Badge', 'Card', 'Calendar', 'RangeCalendar', 'Carousel', 'Chart', 'Dashboard', 'Divider', 'DocsSidebar', 'Footer', 'Spinner', 'ProgressBar', 'Avatar', 'Alert',
200
+ 'BackToTop', 'Breadcrumb', 'Command', 'FormGroup', 'Input', 'InputGroup', 'InputOtp', 'Checkbox', 'Textarea', 'Select', 'Radio',
201
+ 'CopyToClipboard', 'Tooltip', 'Pagination', 'Tabs', 'Accordion', 'Dropdown', 'Direction', 'Menubar',
202
202
  'Modal', 'Toast', 'Table', 'ThemeSwitcher', 'FontSwitcher', 'SoundEffects',
203
203
  'Navbar', 'Settings', 'Search', 'Icons', 'Skeleton', 'Switch',
204
204
  'Label', 'Kbd', 'Collapsible', 'AlertDialog', 'AspectRatio', 'ButtonGroup', 'Empty', 'Separator',
205
205
  'Slider', 'Sheet', 'Popover', 'Toggle', 'ToggleGroup', 'ScrollArea', 'HoverCard', 'ContextMenu', 'ResizablePaneGroup', 'ResizablePane', 'ResizableHandle',
206
206
  ];
207
207
  const ASTRO_COMPONENTS = [
208
- 'Button', 'Badge', 'Card', 'Calendar', 'RangeCalendar', 'Carousel', 'Dashboard', 'Divider', 'DocsSidebar', 'Footer', 'Spinner', 'ProgressBar', 'Avatar', 'Alert',
209
- 'BackToTop', 'Breadcrumb', 'FormGroup', 'Input', 'InputGroup', 'Checkbox', 'Textarea', 'Select', 'Radio',
210
- 'CopyToClipboard', 'Tooltip', 'Pagination', 'Tabs', 'Accordion', 'Dropdown',
208
+ 'Button', 'Badge', 'Card', 'Calendar', 'RangeCalendar', 'Carousel', 'Chart', 'Dashboard', 'Divider', 'DocsSidebar', 'Footer', 'Spinner', 'ProgressBar', 'Avatar', 'Alert',
209
+ 'BackToTop', 'Breadcrumb', 'Command', 'FormGroup', 'Input', 'InputGroup', 'InputOtp', 'Checkbox', 'Textarea', 'Select', 'Radio',
210
+ 'CopyToClipboard', 'Tooltip', 'Pagination', 'Tabs', 'Accordion', 'Dropdown', 'Direction', 'Menubar',
211
211
  'Modal', 'Toast', 'Table', 'ThemeSwitcher', 'FontSwitcher', 'SoundEffects',
212
212
  'Navbar', 'Settings', 'Search', 'Icons', 'Skeleton', 'Switch',
213
213
  'Label', 'Kbd', 'Collapsible', 'AlertDialog', 'AspectRatio', 'ButtonGroup', 'Empty', 'Separator',
@@ -290,8 +290,8 @@ function logAddedDeps(selected, expanded, framework) {
290
290
  // Vanilla scaffold: component name (same as ASTRO_COMPONENTS) -> components/*.html slug. New components (label, kbd, etc.) have stub pages in scaffold/vanilla/components/.
291
291
  const VANILLA_COMPONENT_SLUGS = {
292
292
  Accordion: 'accordion', Alert: 'alert', AlertDialog: 'alert-dialog', AspectRatio: 'aspect-ratio', Avatar: 'avatar', BackToTop: 'back-to-top', Badge: 'badge', Breadcrumb: 'breadcrumb', Button: 'button', ButtonGroup: 'button-group',
293
- Card: 'cards', Calendar: 'calendar', RangeCalendar: 'range-calendar', Carousel: 'carousel', Checkbox: 'forms', Collapsible: 'collapsible', ContextMenu: 'context-menu', CopyToClipboard: 'copy-to-clipboard', Dashboard: 'dashboard', Divider: 'divider', DocsSidebar: 'docs-sidebar', Dropdown: 'dropdown',
294
- Empty: 'empty', Footer: 'footer', FormGroup: 'forms', HoverCard: 'hover-card', Input: 'forms', InputGroup: 'input-group', Icons: 'icons', Kbd: 'kbd', Label: 'label',
293
+ Card: 'cards', Calendar: 'calendar', RangeCalendar: 'range-calendar', Carousel: 'carousel', Chart: 'chart', Checkbox: 'forms', Collapsible: 'collapsible', Command: 'command', ContextMenu: 'context-menu', CopyToClipboard: 'copy-to-clipboard', Dashboard: 'dashboard', Direction: 'direction', Divider: 'divider', DocsSidebar: 'docs-sidebar', Dropdown: 'dropdown',
294
+ Empty: 'empty', Footer: 'footer', FormGroup: 'forms', HoverCard: 'hover-card', Input: 'forms', InputGroup: 'input-group', InputOtp: 'input-otp', Icons: 'icons', Kbd: 'kbd', Label: 'label', Menubar: 'menubar',
295
295
  Modal: 'modal', Navbar: 'navbar', Pagination: 'pagination', Popover: 'popover', ProgressBar: 'progress-bar',
296
296
  Radio: 'forms', ResizableHandle: 'resizable', ResizablePane: 'resizable', ResizablePaneGroup: 'resizable', ScrollArea: 'scroll-area', Search: 'search', Separator: 'separator', Select: 'forms', Settings: 'settings', Sheet: 'sheet',
297
297
  Skeleton: 'skeleton', Slider: 'slider', SoundEffects: 'sound-effects', Spinner: 'spinner', Switch: 'switch', Table: 'table',
@@ -1124,14 +1124,14 @@ Commands:
1124
1124
  Options (init):
1125
1125
  --yes Non-interactive: scaffold new in cwd with defaults (framework: astro, template: landing)
1126
1126
  --path <dir> Project directory (relative to cwd or absolute). Scaffold and run install there. With --yes; interactive: "Enter path" option.
1127
- --framework <fw> vanilla | astro | svelte | react | vue (same 53 components each)
1127
+ --framework <fw> vanilla | astro | svelte | react | vue (same 58 components each)
1128
1128
  --template <t> create new: css-only | landing | docs | dashboard | full (default: landing). add: same options.
1129
1129
  --package-manager <pm> npm | pnpm | yarn | bun (with --yes, or skip PM prompt when interactive)
1130
1130
  --install After scaffolding, run package manager install in project directory (no prompt)
1131
1131
  --no-install Do not run install; do not prompt (skip "Run <pm> install? (Y/n)")
1132
1132
  --offline Use package manager cache only (no network). Passed to install/add when running PM.
1133
1133
  --no-git With --yes, skip initializing a git repository (default with --yes is to run git init)
1134
- (Git: only init offers or runs git init. Interactive init: "Initialize git? (Y/n)". With --yes, git init runs unless --no-git. Add does not prompt for git. Init (create new): "Run <pm> install? (Y/n)" uses the package manager you selected (npm, pnpm, yarn, bun). Add: "Run <pm> add rizzo-css? (Y/n)" same. Vanilla has no package manager. rizzo-css.json is written only when the project does not already have one.)
1134
+ (Init create-new: we prompt "Run <pm> install? (Y/n)" first when the project has package.json, then "Initialize git? (Y/n)". With --yes we run install when --install and git init unless --no-git. Add does not prompt for git. rizzo-css.json is written only when the project does not already have one.)
1135
1135
 
1136
1136
  Options (add) — run from your existing project root; you will choose a template then select components (or CSS only):
1137
1137
  --template <t> css-only | landing | docs | dashboard | full (CSS only = stylesheet only; others = component picker)
@@ -1189,7 +1189,7 @@ Component dependencies (Full template):
1189
1189
  Full list of available components and what relies on what: npx rizzo-css help components
1190
1190
 
1191
1191
  Frameworks:
1192
- Scaffolds (init/add): Vanilla, Astro, Svelte, React, Vue. Same 53 components in each framework’s syntax; same CSS and BEM. Docs: https://rizzo-css.vercel.app/docs/react and Vue.
1192
+ Scaffolds (init/add): Vanilla, Astro, Svelte, React, Vue. Same 58 components in each framework’s syntax; same CSS and BEM. Docs: https://rizzo-css.vercel.app/docs/react and Vue.
1193
1193
 
1194
1194
  Docs: https://rizzo-css.vercel.app
1195
1195
  `);
@@ -3127,7 +3127,7 @@ async function cmdInit(argv) {
3127
3127
  const pm = getPackageManagerCommands({ agent: selectedPm, command: selectedPm });
3128
3128
  const nextStep = pm.install + ' && ' + pm.run('dev');
3129
3129
  const runPrefix = projectDir !== cwd ? 'cd ' + pathRelative(cwd, projectDir) + ' && ' : '';
3130
- const hasPackageJson = useHandpickAstro || useHandpickSvelte || useAstroBase || useSvelteBase || useReactBase || useVueBase || (selectedVariation === 'css-only' && (framework === 'astro' || framework === 'svelte' || framework === 'react' || framework === 'vue'));
3130
+ const hasPackageJson = useHandpickAstro || useHandpickSvelte || useAstroBase || useSvelteBase || useReactBase || useVueBase || (useFullVariant && framework !== 'vanilla') || (selectedVariation === 'css-only' && (framework === 'astro' || framework === 'svelte' || framework === 'react' || framework === 'vue'));
3131
3131
 
3132
3132
  console.log('\n Scaffold complete. Summary above.');
3133
3133
 
@@ -3139,17 +3139,7 @@ async function cmdInit(argv) {
3139
3139
  console.log(' - Wrote ' + RIZZO_CONFIG_FILE);
3140
3140
  }
3141
3141
 
3142
- // Git init: in every scenario — prompt when interactive, run when --yes (unless --no-git)
3143
- if (!yes) {
3144
- const shouldGitInit = await confirmGitInit();
3145
- if (shouldGitInit) {
3146
- runGitInit(projectDir);
3147
- }
3148
- } else if (!hasFlag(argv, '--no-git')) {
3149
- runGitInit(projectDir);
3150
- }
3151
-
3152
- // Package manager install: only for Astro/Svelte (Vanilla has no package.json)
3142
+ // Package manager install: prompt first (when interactive), then run if requested or --install. Only when project has package.json.
3153
3143
  const installCmd = pm.install + (hasFlag(argv, '--offline') ? ' --offline' : '');
3154
3144
  if (runInstallAfterScaffold && !noInstall && hasPackageJson) {
3155
3145
  const dirLabel = projectDir !== cwd ? ' in ' + pathRelative(cwd, projectDir) : ' (current directory)';
@@ -3176,6 +3166,16 @@ async function cmdInit(argv) {
3176
3166
  }
3177
3167
  }
3178
3168
 
3169
+ // Git init: after install prompt — prompt when interactive, run when --yes (unless --no-git)
3170
+ if (!yes) {
3171
+ const shouldGitInit = await confirmGitInit();
3172
+ if (shouldGitInit) {
3173
+ runGitInit(projectDir);
3174
+ }
3175
+ } else if (!hasFlag(argv, '--no-git')) {
3176
+ runGitInit(projectDir);
3177
+ }
3178
+
3179
3179
  if (useHandpickAstro || useHandpickSvelte) {
3180
3180
  const fw = useHandpickAstro ? 'Astro' : 'SvelteKit';
3181
3181
  console.log(' - ' + fw + ' (manual): base + ' + selectedComponents.length + ' component(s). Run: ' + runPrefix + nextStep);
@@ -3192,7 +3192,7 @@ async function cmdInit(argv) {
3192
3192
  if (useVueBase) {
3193
3193
  console.log(' - Vue (Vite): app + ' + (componentsToCopy.length > 0 ? componentsToCopy.length + ' component(s).' : 'base.') + ' Run: ' + runPrefix + nextStep);
3194
3194
  }
3195
- const hasBaseScaffold = useAstroBase || useSvelteBase || useHandpickAstro || useHandpickSvelte || useReactBase || useVueBase || (selectedVariation === 'css-only' && (framework === 'astro' || framework === 'svelte' || framework === 'react' || framework === 'vue'));
3195
+ const hasBaseScaffold = useAstroBase || useSvelteBase || useHandpickAstro || useHandpickSvelte || useReactBase || useVueBase || useFullVariant || (selectedVariation === 'css-only' && (framework === 'astro' || framework === 'svelte' || framework === 'react' || framework === 'vue'));
3196
3196
  if ((framework === 'astro' || framework === 'svelte' || framework === 'react' || framework === 'vue') && !hasBaseScaffold) {
3197
3197
  const fw = framework === 'svelte' ? 'Svelte' : framework === 'react' ? 'React' : framework === 'vue' ? 'Vue' : 'Astro';
3198
3198
  const createExample = getCreateProjectExample(pm, framework);