shapes-ui 0.3.0 → 0.4.1

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 (116) hide show
  1. package/.github/workflows/release.yml +35 -35
  2. package/CHANGELOG.md +114 -0
  3. package/content/components/autocomplete.mdx +17 -0
  4. package/content/components/avatar.mdx +17 -0
  5. package/content/components/combobox.mdx +11 -0
  6. package/content/components/context-menu.mdx +11 -0
  7. package/content/components/dialog.mdx +2 -2
  8. package/content/components/drawer.mdx +33 -0
  9. package/content/components/form.mdx +17 -0
  10. package/content/components/menu.mdx +44 -0
  11. package/content/components/menubar.mdx +17 -0
  12. package/content/components/meter.mdx +17 -0
  13. package/content/components/navigation-menu.mdx +5 -0
  14. package/content/components/number-field.mdx +5 -0
  15. package/content/components/popover.mdx +5 -0
  16. package/content/components/preview-card.mdx +5 -0
  17. package/content/components/progress.mdx +5 -0
  18. package/content/components/radio.mdx +5 -0
  19. package/content/components/scroll-area.mdx +11 -0
  20. package/content/components/select.mdx +5 -0
  21. package/content/components/slider.mdx +5 -0
  22. package/content/components/switch.mdx +5 -0
  23. package/content/components/tabs.mdx +5 -0
  24. package/content/components/toast.mdx +5 -0
  25. package/content/components/toggle.mdx +11 -0
  26. package/content/components/toolbar.mdx +5 -0
  27. package/dist/cli.js +31 -10
  28. package/examples/__index.tsx +395 -74
  29. package/examples/autocomplete-demo.tsx +37 -0
  30. package/examples/avatar-demo.tsx +23 -0
  31. package/examples/combobox-demo.tsx +30 -0
  32. package/examples/context-menu-demo.tsx +47 -0
  33. package/examples/dialog-demo.tsx +6 -13
  34. package/examples/drawer-controlled.tsx +41 -0
  35. package/examples/drawer-demo.tsx +46 -0
  36. package/examples/drawer-indent.tsx +47 -0
  37. package/examples/drawer-positions.tsx +45 -0
  38. package/examples/drawer-snap-points.tsx +50 -0
  39. package/examples/form-demo.tsx +27 -0
  40. package/examples/menu-advanced.tsx +131 -0
  41. package/examples/menu-align.tsx +33 -0
  42. package/examples/menu-checkbox.tsx +28 -0
  43. package/examples/menu-demo.tsx +64 -0
  44. package/examples/menu-group.tsx +41 -0
  45. package/examples/menu-radio.tsx +23 -0
  46. package/examples/menu-submenu.tsx +43 -0
  47. package/examples/menubar-demo.tsx +49 -0
  48. package/examples/meter-demo.tsx +26 -0
  49. package/examples/navigation-menu-demo.tsx +3 -0
  50. package/examples/number-field-demo.tsx +3 -0
  51. package/examples/popover-demo.tsx +3 -0
  52. package/examples/preview-card-demo.tsx +3 -0
  53. package/examples/progress-demo.tsx +3 -0
  54. package/examples/radio-demo.tsx +3 -0
  55. package/examples/scroll-area-demo.tsx +19 -0
  56. package/examples/select-demo.tsx +3 -0
  57. package/examples/slider-demo.tsx +3 -0
  58. package/examples/switch-demo.tsx +3 -0
  59. package/examples/tabs-demo.tsx +3 -0
  60. package/examples/toast-demo.tsx +3 -0
  61. package/examples/toggle-demo.tsx +55 -0
  62. package/examples/toolbar-demo.tsx +32 -0
  63. package/package.json +44 -39
  64. package/public/r/autocomplete.json +18 -0
  65. package/public/r/avatar.json +15 -0
  66. package/public/r/combobox.json +19 -0
  67. package/public/r/context-menu.json +16 -0
  68. package/public/r/dialog.json +1 -1
  69. package/public/r/drawer.json +18 -0
  70. package/public/r/form.json +15 -0
  71. package/public/r/index.json +24 -1
  72. package/public/r/menu.json +16 -0
  73. package/public/r/menubar.json +16 -0
  74. package/public/r/meter.json +15 -0
  75. package/public/r/navigation-menu.json +16 -0
  76. package/public/r/number-field.json +16 -0
  77. package/public/r/popover.json +15 -0
  78. package/public/r/preview-card.json +15 -0
  79. package/public/r/progress.json +15 -0
  80. package/public/r/radio.json +16 -0
  81. package/public/r/scroll-area.json +15 -0
  82. package/public/r/select.json +16 -0
  83. package/public/r/slider.json +15 -0
  84. package/public/r/switch.json +15 -0
  85. package/public/r/tabs.json +16 -0
  86. package/public/r/toast.json +16 -0
  87. package/public/r/toggle.json +16 -0
  88. package/public/r/toolbar.json +15 -0
  89. package/scripts/generate-examples.mts +36 -10
  90. package/src/commands/init.ts +27 -10
  91. package/src/components/ui/autocomplete.tsx +161 -0
  92. package/src/components/ui/avatar.tsx +47 -0
  93. package/src/components/ui/combobox.tsx +277 -0
  94. package/src/components/ui/context-menu.tsx +245 -0
  95. package/src/components/ui/dialog.tsx +43 -40
  96. package/src/components/ui/drawer.tsx +184 -0
  97. package/src/components/ui/form.tsx +11 -0
  98. package/src/components/ui/menu.tsx +219 -0
  99. package/src/components/ui/menubar.tsx +209 -0
  100. package/src/components/ui/meter.tsx +59 -0
  101. package/src/components/ui/navigation-menu.tsx +105 -0
  102. package/src/components/ui/number-field.tsx +110 -0
  103. package/src/components/ui/popover.tsx +59 -0
  104. package/src/components/ui/preview-card.tsx +52 -0
  105. package/src/components/ui/progress.tsx +58 -0
  106. package/src/components/ui/radio.tsx +36 -0
  107. package/src/components/ui/scroll-area.tsx +64 -0
  108. package/src/components/ui/select.tsx +190 -0
  109. package/src/components/ui/slider.tsx +47 -0
  110. package/src/components/ui/switch.tsx +36 -0
  111. package/src/components/ui/tabs.tsx +75 -0
  112. package/src/components/ui/toast.tsx +76 -0
  113. package/src/components/ui/toggle.tsx +54 -0
  114. package/src/components/ui/toolbar.tsx +44 -0
  115. package/src/utils/cli-utils.ts +12 -0
  116. package/vite.config.ts +2 -2
@@ -1,46 +1,46 @@
1
1
  name: Release
2
2
 
3
3
  on:
4
- push:
5
- branches:
6
- - main
4
+ push:
5
+ branches:
6
+ - main
7
7
 
8
8
  concurrency: ${{ github.workflow }}-${{ github.ref }}
9
9
 
10
10
  jobs:
11
- release:
12
- name: Release
13
- runs-on: ubuntu-latest
14
- permissions:
15
- contents: write
16
- pull-requests: write
17
- id-token: write
18
- steps:
19
- - name: Checkout Repo
20
- uses: actions/checkout@v4
21
- with:
22
- fetch-depth: 0
11
+ release:
12
+ name: Release
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
17
+ id-token: write
18
+ steps:
19
+ - name: Checkout Repo
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
23
 
24
- - name: Setup Node.js 24
25
- uses: actions/setup-node@v4
26
- with:
27
- node-version: 24
28
- registry-url: "https://registry.npmjs.org"
24
+ - name: Setup Node.js 24
25
+ uses: actions/setup-node@v4
26
+ with:
27
+ node-version: 24
28
+ registry-url: "https://registry.npmjs.org"
29
29
 
30
- - name: Install pnpm
31
- uses: pnpm/action-setup@v3
32
- with:
33
- version: 9
30
+ - name: Install pnpm
31
+ uses: pnpm/action-setup@v3
32
+ with:
33
+ version: 9
34
34
 
35
- - name: Install Dependencies
36
- run: pnpm install
35
+ - name: Install Dependencies
36
+ run: pnpm install
37
37
 
38
- - name: Create Release Pull Request or Publish to npm
39
- id: changesets
40
- uses: changesets/action@v1
41
- with:
42
- publish: pnpm release
43
- commit: "chore: version packages"
44
- title: "chore: version packages"
45
- env:
46
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38
+ - name: Create Release Pull Request or Publish to npm
39
+ id: changesets
40
+ uses: changesets/action@v1
41
+ with:
42
+ publish: pnpm release
43
+ commit: "chore: version packages"
44
+ title: "chore: version packages"
45
+ env:
46
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,119 @@
1
1
  # shapes-ui
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 803ab28: Updated menu component stylings and examples
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0125286: ## Added tabs component
14
+
15
+ ## "shapes-ui": minor
16
+
17
+ Added tabs component
18
+
19
+ - 6c3b1e7: ## Added toggle component
20
+
21
+ ## "shapes-ui": minor
22
+
23
+ Added toggle component
24
+
25
+ - 258921a: Added popover component
26
+ - 8c31990: ## Added select component
27
+
28
+ ## "shapes-ui": minor
29
+
30
+ Added select component
31
+
32
+ - ae0e06c: Added switch component
33
+ - a64d5fc: ## Added meter component
34
+
35
+ ## "shapes-ui": minor
36
+
37
+ Added meter component
38
+
39
+ - ea2fa8d: ## Added menu component
40
+
41
+ ## "shapes-ui": minor
42
+
43
+ Added menu component
44
+
45
+ - 1b12754: Ådded form component
46
+ - 8b9b200: ## Added preview card component
47
+
48
+ ## "shapes-ui": minor
49
+
50
+ Added preview card component
51
+
52
+ - 9c9ffec: Added number-field component
53
+ - ba419d2: Added navigation-menu component
54
+ - c6c8075: Added menubar component
55
+ - cbc4e67: Added drawer component
56
+ - 62cb1a0: added meter component
57
+ - 43eba89: Added combobox component
58
+ - af7d67e: ## Added radio component
59
+
60
+ ## "shapes-ui": minor
61
+
62
+ Added radio component
63
+
64
+ - 20eb988: ## Added toolbar component
65
+
66
+ ## "shapes-ui": minor
67
+
68
+ Added toolbar component
69
+
70
+ - 65cf7c2: Added autocomplete component
71
+ - 14c5d2f: ## Added toast component
72
+
73
+ ## "shapes-ui": minor
74
+
75
+ Added toast component
76
+
77
+ - 1c5217c: ## Added menubar component
78
+
79
+ ## "shapes-ui": minor
80
+
81
+ Added menubar component
82
+
83
+ - 3dc2d69: ## Added progress component
84
+
85
+ ## "shapes-ui": minor
86
+
87
+ Added progress component
88
+
89
+ - 41b2289: Added context menu component
90
+ - c4ebe16: Added autocomplete component
91
+ - cbc4e67: Added Drawer component
92
+ - 92070ea: Added avatar component
93
+ - 49d55ab: Added scroll area component
94
+ - c2a8f2c: ## Added tooltip component
95
+
96
+ ## "shapes-ui": minor
97
+
98
+ Added tooltip component
99
+
100
+ - baf0a06: Added menu component
101
+ - ff33653: ## Added slider component
102
+
103
+ ## "shapes-ui": minor
104
+
105
+ Added slider component
106
+
107
+ - c309349: ## Added scroll area component
108
+
109
+ ## "shapes-ui": minor
110
+
111
+ Added scroll area component
112
+
113
+ ### Patch Changes
114
+
115
+ - 4b63949: UJpdated the cli script and examples etc.
116
+
3
117
  ## 0.3.0
4
118
 
5
119
  ### Minor Changes
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Autocomplete
3
+ slug: autocomplete
4
+ description: Input field with autocomplete functionality and dropdown list of filtered options.
5
+ ---
6
+
7
+ <RenderPreview name="autocomplete-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="autocomplete" />
12
+
13
+ ## Examples
14
+
15
+ ### Demo
16
+
17
+ <RenderPreview name="autocomplete-demo" />
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Avatar
3
+ slug: avatar
4
+ description: Profile image component with fallback for missing images or initials.
5
+ ---
6
+
7
+ <RenderPreview name="avatar-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="avatar" />
12
+
13
+ ## Examples
14
+
15
+ ### Demo
16
+
17
+ <RenderPreview name="avatar-demo" />
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: Combobox
3
+ slug: combobox
4
+ description: A searchable input with a list of predefined options.
5
+ ---
6
+
7
+ <RenderPreview name="combobox-demo" />
8
+
9
+ # Installation
10
+
11
+ <InstallationBlock name="combobox" />
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: Context Menu
3
+ slug: context-menu
4
+ description: Displays a context menu that appears at the pointer on right click or long press.
5
+ ---
6
+
7
+ <RenderPreview name="context-menu-demo" />
8
+
9
+ # Installation
10
+
11
+ <InstallationBlock name="context-menu" />
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Dialog
3
- slug: dialog
3
+ slug: dialog
4
4
  description: Modal overlay for confirmations and forms.
5
5
  ---
6
6
 
@@ -8,4 +8,4 @@ description: Modal overlay for confirmations and forms.
8
8
 
9
9
  ## Installation
10
10
 
11
- <InstallationBlock name="dialog" />
11
+ <InstallationBlock name="dialog" />
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: Drawer
3
+ slug: drawer
4
+ description: A slide-out panel from the edge of the screen.
5
+ ---
6
+
7
+ <RenderPreview name="drawer-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="drawer" />
12
+
13
+ ## Examples
14
+
15
+ ### Default
16
+
17
+ <RenderPreview name="drawer-demo" />
18
+
19
+ ### Indent background
20
+
21
+ <RenderPreview name="drawer-indent" />
22
+
23
+ ### Positions
24
+
25
+ <RenderPreview name="drawer-positions" />
26
+
27
+ ### Snap points
28
+
29
+ <RenderPreview name="drawer-snap-points" />
30
+
31
+ ### Controlled
32
+
33
+ <RenderPreview name="drawer-controlled" />
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Form
3
+ slug: form
4
+ description: Form wrapper component with consolidated error handling and field validation support.
5
+ ---
6
+
7
+ <RenderPreview name="form-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="form" />
12
+
13
+ ## Examples
14
+
15
+ ### Demo
16
+
17
+ <RenderPreview name="form-demo" />
@@ -0,0 +1,44 @@
1
+ ---
2
+ title: Menu
3
+ slug: menu
4
+ description: Dropdown menu component with support for items, groups, separators, and submenus.
5
+ ---
6
+
7
+ <RenderPreview name="menu-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="menu" />
12
+
13
+ ## Examples
14
+
15
+ ### Sides and alignments
16
+
17
+ Side and alignment of the menu can be configured using the `side` and `align` props on the `MenuPopup` component.
18
+
19
+ <RenderPreview name="menu-align" />
20
+
21
+ ### Groups
22
+
23
+ Use `MenuGroup` and `MenuLabel` to visually group related menu items (for example — account actions vs. file actions).
24
+
25
+ <RenderPreview name="menu-group" />
26
+
27
+ ### Submenus
28
+
29
+ Nest `MenuSub` with `MenuSubTrigger` to create hierarchical menus and "open recent"‑style lists.
30
+
31
+ <RenderPreview name="menu-submenu" />
32
+
33
+ ### Checkbox & radio items
34
+
35
+ Use `MenuCheckboxItem` for independent toggles and `MenuRadioGroup`/`MenuRadioItem` for exclusive selections inside a menu.
36
+
37
+ <RenderPreview name="menu-checkbox" />
38
+ <RenderPreview name="menu-radio" />
39
+
40
+ ### Advanced
41
+
42
+ A combined example showing groups, a submenu, checkbox items and radio items together.
43
+
44
+ <RenderPreview name="menu-advanced" />
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Menubar
3
+ slug: menubar
4
+ description: Menu bar providing commands and options for your application with dropdown menus.
5
+ ---
6
+
7
+ <RenderPreview name="menubar-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="menubar" />
12
+
13
+ ## Examples
14
+
15
+ ### Demo
16
+
17
+ <RenderPreview name="menubar-demo" />
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Meter
3
+ slug: meter
4
+ description: Meter component that provides a graphical display of a numeric value within a range.
5
+ ---
6
+
7
+ <RenderPreview name="meter-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="meter" />
12
+
13
+ ## Examples
14
+
15
+ ### Demo
16
+
17
+ <RenderPreview name="meter-demo" />
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Navigation Menu
3
+ slug: navigation-menu
4
+ description: Navigation menu component for displaying a collection of links and dropdown menus.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Number Field
3
+ slug: number-field
4
+ description: An input field component specifically designed for numeric input, with built-in validation and formatting options
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Popover
3
+ slug: popover
4
+ description: Popover component that displays content anchored to a trigger element.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Preview Card
3
+ slug: preview-card
4
+ description: Component that displays a preview of linked content when hovered.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Progress
3
+ slug: progress
4
+ description: Progress bar component for displaying the status of a task.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Radio
3
+ slug: radio
4
+ description: Radio button component for selecting a single option from a group.
5
+ ---
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: Scroll Area
3
+ slug: scroll-area
4
+ description: A scroll area component that provides a customizable and accessible way to display scrollable content.
5
+ ---
6
+
7
+ <RenderPreview name="scroll-area-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="scroll-area" />
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Select
3
+ slug: select
4
+ description: Select component for choosing a predefined value in a dropdown menu.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Slider
3
+ slug: slider
4
+ description: Slider component for selecting a value or range of values.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Switch
3
+ slug: switch
4
+ description: Switch component that indicates whether a setting is on or off.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Tabs
3
+ slug: tabs
4
+ description: Tabs component for toggling between related panels on the same page.
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Toast
3
+ slug: toast
4
+ description: A brief message that appears temporarily to inform users of an action or event.
5
+ ---
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: Toggle
3
+ slug: toggle
4
+ description: A button that can be toggled between two states.
5
+ ---
6
+
7
+ <RenderPreview example="toggle-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock component="toggle" />
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Toolbar
3
+ slug: toolbar
4
+ description: A collection of buttons and controls organized in a horizontal bar.
5
+ ---
package/dist/cli.js CHANGED
@@ -13835,6 +13835,12 @@ function getMissingDeps(pkg, deps) {
13835
13835
  if (!pkg) return deps;
13836
13836
  return deps.filter((dep) => !pkg.dependencies?.[dep] && !pkg.devDependencies?.[dep]);
13837
13837
  }
13838
+ async function isViteProject() {
13839
+ const viteConfigTs = path.join(process.cwd(), "vite.config.ts");
13840
+ const viteConfigJs = path.join(process.cwd(), "vite.config.js");
13841
+ const viteConfigMjs = path.join(process.cwd(), "vite.config.mjs");
13842
+ return await fs2.pathExists(viteConfigTs) || await fs2.pathExists(viteConfigJs) || await fs2.pathExists(viteConfigMjs);
13843
+ }
13838
13844
 
13839
13845
  // src/commands/add.ts
13840
13846
  import path2 from "path";
@@ -13959,7 +13965,10 @@ async function addCommand(components, config2) {
13959
13965
  import path3 from "path";
13960
13966
  import { confirm, intro, note as note2, outro, select, text, spinner as spinner2 } from "@clack/prompts";
13961
13967
  import { execa as execa2 } from "execa";
13968
+ import figlet from "figlet";
13962
13969
  import fs4 from "fs-extra";
13970
+ import gradient from "gradient-string";
13971
+ import pc from "picocolors";
13963
13972
  var BASE_DEPS = [
13964
13973
  "@base-ui/react",
13965
13974
  "class-variance-authority",
@@ -13968,15 +13977,14 @@ var BASE_DEPS = [
13968
13977
  "tailwind-merge",
13969
13978
  "tw-animate-css"
13970
13979
  ];
13971
- var TAILWIND_DEV_DEPS = ["tailwindcss", "@tailwindcss/vite"];
13972
13980
  async function installDeps(deps, dev = false) {
13973
13981
  if (!deps.length) return;
13974
13982
  const spin = spinner2();
13975
- const label = dev ? "Installing Tailwind v4" : "Installing base dependencies";
13983
+ const label = dev ? "Installing dev dependencies" : "Installing dependencies";
13976
13984
  spin.start(label);
13977
13985
  const [command, ...args] = await getInstallCommand(deps, dev);
13978
13986
  await execa2(command, args);
13979
- spin.stop("Dependencies installed");
13987
+ spin.stop(pc.green("Dependencies installed"));
13980
13988
  }
13981
13989
  async function ensureTailwindStyles(cssPath) {
13982
13990
  const template = '@import "tailwindcss";\n';
@@ -13992,15 +14000,21 @@ ${template}`);
13992
14000
  }
13993
14001
  await fs4.writeFile(absPath, template);
13994
14002
  }
14003
+ function renderTitle() {
14004
+ const text2 = figlet.textSync("Shapes UI", { font: "Standard" });
14005
+ console.log(gradient.pastel.multiline(text2));
14006
+ }
13995
14007
  async function initCommand() {
13996
- intro("Shapes UI");
14008
+ console.clear();
14009
+ renderTitle();
14010
+ intro(pc.bgCyan(pc.black(" Welcome to Shapes UI ")));
13997
14011
  const configPath = path3.join(process.cwd(), "shapes.json");
13998
14012
  if (await fs4.pathExists(configPath)) {
13999
14013
  const overwrite = exitIfCancelled(
14000
14014
  await confirm({ message: "shapes.json already exists. Overwrite it?" })
14001
14015
  );
14002
14016
  if (!overwrite) {
14003
- outro("Init cancelled.");
14017
+ outro(pc.yellow("Init cancelled."));
14004
14018
  return;
14005
14019
  }
14006
14020
  }
@@ -14021,6 +14035,7 @@ async function initCommand() {
14021
14035
  );
14022
14036
  const pkg = await readPackageJson();
14023
14037
  const hasTailwindV4 = isTailwindV4Installed(pkg);
14038
+ const isVite = await isViteProject();
14024
14039
  const hasExistingCss = exitIfCancelled(
14025
14040
  await confirm({ message: "Do you already have a CSS file?" })
14026
14041
  );
@@ -14031,7 +14046,11 @@ async function initCommand() {
14031
14046
  })
14032
14047
  ) : "src/styles/globals.css";
14033
14048
  if (!hasTailwindV4) {
14034
- await installDeps(TAILWIND_DEV_DEPS, true);
14049
+ const tailwindDeps = ["tailwindcss"];
14050
+ if (isVite) {
14051
+ tailwindDeps.push("@tailwindcss/vite");
14052
+ }
14053
+ await installDeps(tailwindDeps, true);
14035
14054
  }
14036
14055
  const missingBaseDeps = getMissingDeps(pkg, BASE_DEPS);
14037
14056
  await installDeps(missingBaseDeps, false);
@@ -14043,15 +14062,17 @@ async function initCommand() {
14043
14062
  paths: { ui: uiPath, lib: "./src/lib" }
14044
14063
  };
14045
14064
  await fs4.writeJSON("shapes.json", config2, { spaces: 2 });
14046
- note2("Created shapes.json");
14065
+ note2("Created shapes.json", "Configuration");
14047
14066
  const addNow = exitIfCancelled(await confirm({ message: "Add components now?" }));
14048
14067
  if (addNow) {
14049
14068
  const selected = await pickComponents();
14050
- for (const name of selected) {
14051
- await installComponent(name, config2);
14069
+ if (selected.length > 0) {
14070
+ for (const name of selected) {
14071
+ await installComponent(name, config2);
14072
+ }
14052
14073
  }
14053
14074
  }
14054
- outro("Shapes UI is ready.");
14075
+ outro(pc.green("Shapes UI is ready."));
14055
14076
  }
14056
14077
 
14057
14078
  // src/commands/cli.ts