untitledui 0.1.55 → 0.1.56-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,159 +1,138 @@
1
+ [![npm version](https://img.shields.io/npm/v/untitledui.svg)](https://www.npmjs.com/package/untitledui)
2
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
3
+
1
4
  # Untitled UI CLI
2
5
 
3
- The Untitled UI CLI tool helps you quickly scaffold projects with Untitled UI React and add components and page examples to your existing projects with an interactive interface in seconds.
6
+ The official CLI for [Untitled UI React](https://www.untitledui.com/react) quickly scaffold projects, add components, and install page examples with an interactive interface.
4
7
 
5
- ## Usage
8
+ ## Installation
6
9
 
7
- To always use the latest version of the CLI, we recommend using `npx`:
10
+ We recommend using `npx` to always run the latest version:
8
11
 
9
12
  ```bash
10
13
  npx untitledui@latest <command>
11
14
  ```
12
15
 
13
- The Untitled UI CLI provides the following commands:
16
+ Or install globally:
14
17
 
15
- If you run a command without providing further arguments, you'll be presented with an interactive interface to continue.
18
+ ```bash
19
+ npm install -g untitledui
20
+ ```
16
21
 
17
- - `init`: Initialize a new project or adjust an existing one.
18
- - `add`: Add a component to your project.
19
- - `example`: Add an example page to the project.
20
- - `login`: Authenticate with Untitled UI to access PRO components.
22
+ ## Quick Start
21
23
 
22
- ## Commands
24
+ ```bash
25
+ # Create a new project
26
+ npx untitledui@latest init my-app --nextjs
23
27
 
24
- ### `init`
28
+ # Add components to an existing project
29
+ npx untitledui@latest add button toggle avatar
25
30
 
26
- The `init` command is used to initialize a new project or adjust an existing one.
31
+ # Add a page example
32
+ npx untitledui@latest example dashboards-01/05
27
33
 
28
- If you run the command without any arguments, you will be guided through an interactive setup process.
34
+ # Authenticate for PRO access
35
+ npx untitledui@latest login
36
+ ```
37
+
38
+ ## Commands
29
39
 
30
- **Usage:**
40
+ ### `init`
41
+
42
+ Initialize a new project or configure an existing one with Untitled UI.
31
43
 
32
44
  ```bash
33
45
  npx untitledui@latest init [directory] [options]
34
46
  ```
35
47
 
36
- **Arguments:**
37
-
38
- - `[directory]`: The directory to initialize the project in.
39
-
40
- **Options:**
41
-
42
- - `--vite`: Initialize a Vite project.
43
- - `--nextjs`: Initialize a Next.js project.
44
- - `-o, --overwrite`: Overwrite existing files.
45
- - `--colors-list`: Show the colors list.
46
- - `-c, --color <color-name>`: Specify a color for the project.
47
- - `-h, --help`: Display the help message.
48
+ | Option | Description |
49
+ |---|---|
50
+ | `--vite` | Initialize a Vite project |
51
+ | `--nextjs` | Initialize a Next.js project |
52
+ | `-o, --overwrite` | Overwrite existing files |
53
+ | `--colors-list` | Show available brand colors |
54
+ | `-c, --color <name>` | Set the brand color |
48
55
 
49
56
  **Examples:**
50
57
 
51
- - Initialize a new Next.js project in a directory named `my-app`:
52
-
53
- ```bash
54
- npx untitledui@latest init my-app --nextjs
55
- ```
56
-
57
- - Initialize a new Vite project with a specific color:
58
-
59
- ```bash
60
- npx untitledui@latest init my-vite-app --vite --color blue
61
- ```
58
+ ```bash
59
+ npx untitledui@latest init my-app --nextjs
60
+ npx untitledui@latest init my-app --vite --color blue
61
+ ```
62
62
 
63
63
  ### `add`
64
64
 
65
- The `add` command is used to add a component to your project.
66
-
67
- If you run the command without any arguments, you will be guided through an interactive process to select components.
68
-
69
- **Usage:**
65
+ Add components to your project.
70
66
 
71
67
  ```bash
72
68
  npx untitledui@latest add [components...] [options]
73
69
  ```
74
70
 
75
- **Arguments:**
76
-
77
- - `[components...]`: The components to add.
78
-
79
- **Options:**
80
-
81
- - `-a, --all`: Add all available components.
82
- - `-o, --overwrite`: Overwrite existing files.
83
- - `-p, --path <path>`: The path to add the component to.
84
- - `-d, --dir <directory>`: The directory where the project is located.
85
- - `-t, --type <base|marketing|shared-assets|application|foundations>`: The type of the component to add.
71
+ | Option | Description |
72
+ |---|---|
73
+ | `-a, --all` | Add all available components |
74
+ | `-o, --overwrite` | Overwrite existing files |
75
+ | `-p, --path <path>` | Custom components directory |
76
+ | `-d, --dir <directory>` | Project directory |
77
+ | `-t, --type <type>` | Component type (`base`, `marketing`, `shared-assets`, `application`, `foundations`) |
86
78
 
87
79
  **Examples:**
88
80
 
89
- - Add a single component:
90
-
91
- ```bash
92
- npx untitledui@latest add button
93
- ```
94
-
95
- - Add multiple components:
96
-
97
- ```bash
98
- npx untitledui@latest add button toggle avatar
99
- ```
100
-
101
- - Add all marketing components:
102
-
103
- ```bash
104
- npx untitledui@latest add --all --type marketing
105
- ```
81
+ ```bash
82
+ npx untitledui@latest add button
83
+ npx untitledui@latest add button toggle avatar
84
+ npx untitledui@latest add --all --type marketing
85
+ ```
106
86
 
107
87
  ### `example`
108
88
 
109
- The `example` command is used to add an example page to the project.
110
-
111
- **Usage:**
89
+ Add a page example to your project.
112
90
 
113
91
  ```bash
114
92
  npx untitledui@latest example [example] [options]
115
93
  ```
116
94
 
117
- **Arguments:**
118
-
119
- - `[example]`: The example to add. This can be a specific example path copied from the [Untitled UI React website](https://www.untitledui.com/react/components) (e.g., `dashboards-01/05`).
120
-
121
- **Options:**
122
-
123
- - `-o, --overwrite`: Overwrite existing files.
124
- - `-p, --path <path>`: The path to add the component to.
125
- - `-e, --example-path <example-path>`: The path to add the example file to.
95
+ | Option | Description |
96
+ |---|---|
97
+ | `-o, --overwrite` | Overwrite existing files |
98
+ | `-p, --path <path>` | Custom components directory |
99
+ | `-e, --example-path <path>` | Custom example file directory |
126
100
 
127
101
  **Examples:**
128
102
 
129
- - Add application UI examples:
130
-
131
- ```bash
132
- npx untitledui@latest example application
133
- ```
134
-
135
- - Add a specific example by its path:
136
-
137
- ```bash
138
- npx untitledui@latest example dashboards-01/05
139
- ```
103
+ ```bash
104
+ npx untitledui@latest example application
105
+ npx untitledui@latest example dashboards-01/05
106
+ ```
140
107
 
141
108
  ### `login`
142
109
 
143
- The `login` command is used to authenticate with Untitled UI to access PRO components.
144
-
145
- **Usage:**
110
+ Authenticate with Untitled UI to access PRO components.
146
111
 
147
112
  ```bash
148
113
  npx untitledui@latest login
149
114
  ```
150
115
 
151
- This command will open a browser window for you to authenticate with your Untitled UI account.
116
+ Opens a browser window for authentication. Your credentials are stored locally at `~/.untitledui/config.json`.
152
117
 
153
- ## License
118
+ ## Configuration
154
119
 
155
- The Untitled UI CLI is licensed under the [MIT License](LICENSE).
120
+ The CLI detects your project setup automatically:
121
+
122
+ - **Framework**: Next.js (App/Pages Router) and Vite
123
+ - **Package manager**: npm, yarn, pnpm, and bun
124
+ - **TypeScript**: Reads `tsconfig.json` for path aliases
125
+ - **Tailwind CSS**: v4+ with automatic dependency installation
126
+ - **Custom paths**: Supports `components.json` for alias configuration
127
+
128
+ ## Documentation
129
+
130
+ Full documentation is available at [untitledui.com/react/docs](https://www.untitledui.com/react/docs/introduction).
156
131
 
157
132
  ## Bug Reports
158
133
 
159
- If you find a bug, please report it on our [issue tracker](https://github.com/untitleduico/react/issues).
134
+ Found a bug? Please report it on our [issue tracker](https://github.com/untitleduico/react/issues).
135
+
136
+ ## License
137
+
138
+ MIT © [Untitled UI](https://www.untitledui.com/react)
@@ -0,0 +1,287 @@
1
+ import type { TransformRule } from "../../helper/upgrade-transforms";
2
+
3
+ export interface MigrationDefinition {
4
+ fromVersion: string;
5
+ toVersion: string;
6
+ classTransforms: TransformRule[];
7
+ importTransforms: { from: string; to: string; description: string }[];
8
+ propTransforms: { from: string; to: string; description: string }[];
9
+ structuralPatterns: { pattern: string; instruction: string }[];
10
+ orphanedTokens: string[];
11
+ dependencyChanges: {
12
+ update: Record<string, string>;
13
+ add: Record<string, string>;
14
+ devUpdate: Record<string, string>;
15
+ devAdd: Record<string, string>;
16
+ remove: string[];
17
+ };
18
+ configChanges: {
19
+ tsconfig: { description: string; find: string; replace: string }[];
20
+ };
21
+ notes: string[];
22
+ }
23
+
24
+ export const migration: MigrationDefinition = {
25
+ fromVersion: "7",
26
+ toVersion: "8",
27
+
28
+ classTransforms: [
29
+ // Typo fix
30
+ {
31
+ pattern: /\bshadow-skeumorphic-xs\b/g,
32
+ replace: "shadow-skeuomorphic-xs",
33
+ description: "shadow-skeumorphic-xs → shadow-skeuomorphic-xs (typo fix)",
34
+ },
35
+ {
36
+ pattern: /\bshadow-skeumorphic\b/g,
37
+ replace: "shadow-skeuomorphic",
38
+ description: "shadow-skeumorphic → shadow-skeuomorphic (typo fix)",
39
+ },
40
+
41
+ // Utility color renames
42
+ {
43
+ pattern: /\butility-gray-blue-/g,
44
+ replace: "utility-slate-",
45
+ description: "utility-gray-blue- → utility-slate-",
46
+ },
47
+ {
48
+ pattern: /\butility-blue-light-/g,
49
+ replace: "utility-sky-",
50
+ description: "utility-blue-light- → utility-sky-",
51
+ },
52
+ {
53
+ pattern: /\butility-gray-/g,
54
+ replace: "utility-neutral-",
55
+ description: "utility-gray- → utility-neutral-",
56
+ },
57
+ {
58
+ pattern: /\butility-error-/g,
59
+ replace: "utility-red-",
60
+ description: "utility-error- → utility-red-",
61
+ },
62
+ {
63
+ pattern: /\butility-warning-/g,
64
+ replace: "utility-yellow-",
65
+ description: "utility-warning- → utility-yellow-",
66
+ },
67
+ {
68
+ pattern: /\butility-success-/g,
69
+ replace: "utility-green-",
70
+ description: "utility-success- → utility-green-",
71
+ },
72
+
73
+ // Tailwind v4 outline rename
74
+ {
75
+ pattern: /\boutline-none\b/g,
76
+ replace: "outline-hidden",
77
+ description: "outline-none → outline-hidden",
78
+ },
79
+
80
+ // Disabled token removals and replacements
81
+ {
82
+ pattern: /\bbg-disabled_subtle\b/g,
83
+ replace: "opacity-50",
84
+ description: "bg-disabled_subtle → opacity-50",
85
+ needsReview: true,
86
+ },
87
+ {
88
+ pattern: /\bbg-disabled\b/g,
89
+ replace: "opacity-50",
90
+ description: "bg-disabled → opacity-50",
91
+ needsReview: true,
92
+ },
93
+ {
94
+ pattern: /\btext-disabled\b/g,
95
+ replace: "",
96
+ description: "text-disabled → removed",
97
+ needsReview: true,
98
+ },
99
+ {
100
+ pattern: /\bring-disabled_subtle\b/g,
101
+ replace: "",
102
+ description: "ring-disabled_subtle → removed",
103
+ needsReview: true,
104
+ },
105
+ {
106
+ pattern: /\bring-disabled\b/g,
107
+ replace: "",
108
+ description: "ring-disabled → removed",
109
+ needsReview: true,
110
+ },
111
+ {
112
+ pattern: /\bborder-disabled_subtle\b/g,
113
+ replace: "",
114
+ description: "border-disabled_subtle → removed",
115
+ needsReview: true,
116
+ },
117
+ {
118
+ pattern: /\bborder-disabled\b/g,
119
+ replace: "",
120
+ description: "border-disabled → removed",
121
+ needsReview: true,
122
+ },
123
+ {
124
+ pattern: /\btext-fg-disabled_subtle\b/g,
125
+ replace: "",
126
+ description: "text-fg-disabled_subtle → removed",
127
+ needsReview: true,
128
+ },
129
+ {
130
+ pattern: /\btext-fg-disabled\b/g,
131
+ replace: "",
132
+ description: "text-fg-disabled → removed",
133
+ needsReview: true,
134
+ },
135
+ {
136
+ pattern: /\btext-placeholder_subtle\b/g,
137
+ replace: "",
138
+ description: "text-placeholder_subtle → removed",
139
+ needsReview: true,
140
+ },
141
+
142
+ // Button icon token replacements (_hover variants MUST come first)
143
+ {
144
+ pattern: /\btext-button-primary-icon_hover\b/g,
145
+ replace: "text-white/70",
146
+ description: "text-button-primary-icon_hover → text-white/70",
147
+ },
148
+ {
149
+ pattern: /\btext-button-primary-icon\b/g,
150
+ replace: "text-white/60",
151
+ description: "text-button-primary-icon → text-white/60",
152
+ },
153
+ {
154
+ pattern: /\btext-button-destructive-primary-icon_hover\b/g,
155
+ replace: "text-white/70",
156
+ description: "text-button-destructive-primary-icon_hover → text-white/70",
157
+ },
158
+ {
159
+ pattern: /\btext-button-destructive-primary-icon\b/g,
160
+ replace: "text-white/60",
161
+ description: "text-button-destructive-primary-icon → text-white/60",
162
+ },
163
+
164
+ // Misc token renames
165
+ {
166
+ pattern: /\bbg-avatar-bg\b/g,
167
+ replace: "bg-tertiary",
168
+ description: "bg-avatar-bg → bg-tertiary",
169
+ },
170
+ {
171
+ pattern: /\bring-bg-brand-solid\b/g,
172
+ replace: "ring-brand-solid",
173
+ description: "ring-bg-brand-solid → ring-brand-solid",
174
+ },
175
+ {
176
+ pattern: /\bbg-active\b/g,
177
+ replace: "bg-primary_hover",
178
+ description: "bg-active → bg-primary_hover",
179
+ needsReview: true,
180
+ },
181
+ {
182
+ pattern: /\bbg-toggle-button-fg_disabled\b/g,
183
+ replace: "",
184
+ description: "bg-toggle-button-fg_disabled → removed",
185
+ needsReview: true,
186
+ },
187
+ ],
188
+
189
+ importTransforms: [
190
+ {
191
+ from: "pin-input/pin-input",
192
+ to: "input/pin-input",
193
+ description: "pin-input moved into input directory",
194
+ },
195
+ {
196
+ from: "nav-item-button",
197
+ to: "nav-button",
198
+ description: "nav-item-button renamed to nav-button",
199
+ },
200
+ ],
201
+
202
+ propTransforms: [
203
+ {
204
+ from: "placeholderIcon=",
205
+ to: "icon=",
206
+ description: "placeholderIcon prop renamed to icon",
207
+ },
208
+ {
209
+ from: 'color="gray-blue"',
210
+ to: 'color="slate"',
211
+ description: 'color="gray-blue" renamed to color="slate"',
212
+ },
213
+ {
214
+ from: 'color="blue-light"',
215
+ to: 'color="sky"',
216
+ description: 'color="blue-light" renamed to color="sky"',
217
+ },
218
+ ],
219
+
220
+ structuralPatterns: [
221
+ // {
222
+ // pattern: "AriaDialogTrigger",
223
+ // instruction:
224
+ // "Remove AriaDialogTrigger wrapper. Move isOpen and onOpenChange props directly to ModalOverlay. Remove the DialogTrigger import if no longer used.",
225
+ // },
226
+ ],
227
+
228
+ orphanedTokens: [
229
+ "bg-disabled_subtle",
230
+ "text-disabled",
231
+ "ring-disabled",
232
+ "border-disabled",
233
+ "text-fg-disabled",
234
+ "bg-avatar-bg",
235
+ "text-button-primary-icon",
236
+ "text-button-destructive-primary-icon",
237
+ "bg-toggle-button-fg_disabled",
238
+ "utility-gray-",
239
+ "utility-error-",
240
+ "utility-warning-",
241
+ "utility-success-",
242
+ "utility-gray-blue-",
243
+ "utility-blue-light-",
244
+ "skeumorphic",
245
+ ],
246
+
247
+ dependencyChanges: {
248
+ update: {
249
+ next: "16.2.0",
250
+ react: "^19.2.4",
251
+ "react-dom": "^19.2.4",
252
+ "react-aria-components": "^1.16.0",
253
+ "react-aria": "^3.47.0",
254
+ tailwindcss: "^4.2.2",
255
+ motion: "^12.38.0",
256
+ recharts: "^3.8.0",
257
+ },
258
+ add: {},
259
+ devUpdate: {
260
+ storybook: "^10.3.0",
261
+ vite: "^8.0.0",
262
+ "@vitejs/plugin-react": "^6.0.1",
263
+ eslint: "^10.0.3",
264
+ typescript: "^5.9.3",
265
+ },
266
+ devAdd: {
267
+ "@storybook/test-runner": "^0.24.3",
268
+ },
269
+ remove: [],
270
+ },
271
+
272
+ configChanges: {
273
+ tsconfig: [
274
+ {
275
+ description: "Update JSX transform to react-jsx",
276
+ find: '"jsx": "preserve"',
277
+ replace: '"jsx": "react-jsx"',
278
+ },
279
+ ],
280
+ },
281
+
282
+ notes: [
283
+ "Default size for Select, ComboBox, and Input changed from 'sm' to 'md'. Review component usage.",
284
+ "Avatar size 'xxs' removed. Use 'xs' instead.",
285
+ "Dropdown no longer defaults to selectionMode='single'. Set explicitly if needed.",
286
+ ],
287
+ };
@@ -60,3 +60,10 @@ input[type="number"] {
60
60
  input[type="search"]::-webkit-search-cancel-button {
61
61
  -webkit-appearance: none;
62
62
  }
63
+
64
+ /* Hide the default outline on chart elements. */
65
+ .recharts-surface,
66
+ .recharts-surface g,
67
+ .recharts-surface path {
68
+ outline: none;
69
+ }