@srcroot/ui 0.0.25 → 0.0.27

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
@@ -46,7 +46,7 @@ Install every available component at once.
46
46
  npx @srcroot/ui add --all
47
47
  ```
48
48
 
49
- This will copy the component files to your `components/ui` directory and install any necessary peer dependencies (like `lucide-react` or `clsx`).
49
+ This will copy the component files to your `components/ui` directory and install any necessary peer dependencies (like `react-icons` or `clsx`).
50
50
 
51
51
  ### 3. Usage
52
52
 
package/dist/index.js CHANGED
@@ -586,7 +586,7 @@ async function init(options) {
586
586
  "clsx",
587
587
  "tailwind-merge",
588
588
  "class-variance-authority",
589
- "lucide-react"
589
+ "react-icons"
590
590
  ];
591
591
  if (!isTailwind4) {
592
592
  requiredDeps.push("tailwindcss-animate");
package/package.json CHANGED
@@ -1,58 +1,64 @@
1
- {
2
- "name": "@srcroot/ui",
3
- "version": "0.0.25",
4
- "description": "A shadcn-style CLI UI library with polymorphic, accessible React components",
5
- "type": "module",
6
- "bin": {
7
- "srcroot-ui": "./dist/index.js"
8
- },
9
- "scripts": {
10
- "build": "tsup",
11
- "dev": "tsup --watch"
12
- },
13
- "files": [
14
- "dist",
15
- "registry"
16
- ],
17
- "keywords": [
18
- "react",
19
- "ui",
20
- "components",
21
- "tailwind",
22
- "polymorphic",
23
- "accessible"
24
- ],
25
- "dependencies": {
26
- "chalk": "^5.3.0",
27
- "commander": "^12.1.0",
28
- "fs-extra": "^11.2.0",
29
- "ora": "^8.1.1",
30
- "prompts": "^2.4.2",
31
- "tailwindcss-animate": "^1.0.7"
32
- },
33
- "devDependencies": {
34
- "@types/fs-extra": "^11.0.4",
35
- "@types/node": "^22.10.1",
36
- "@types/prompts": "^2.4.9",
37
- "tsup": "^8.3.5",
38
- "typescript": "^5.7.2"
39
- },
40
- "peerDependencies": {
41
- "class-variance-authority": "^0.7.1",
42
- "clsx": "^2.1.1",
43
- "cmdk": "^1.0.0",
44
- "lucide-react": "0.561.0",
45
- "react": "^18.0.0 || ^19.0.0",
46
- "react-dom": "^18.0.0 || ^19.0.0",
47
- "tailwind-merge": "^3.4.0",
48
- "tailwindcss": "^3.0.0 || ^4.0.0"
49
- },
50
- "peerDependenciesMeta": {
51
- "lucide-react": {
52
- "optional": true
53
- },
54
- "cmdk": {
55
- "optional": true
56
- }
57
- }
1
+ {
2
+ "name": "@srcroot/ui",
3
+ "version": "0.0.27",
4
+ "description": "A shadcn-style CLI UI library with polymorphic, accessible React components",
5
+ "type": "module",
6
+ "bin": {
7
+ "srcroot-ui": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsup",
11
+ "dev": "tsup --watch"
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "registry"
16
+ ],
17
+ "keywords": [
18
+ "react",
19
+ "ui",
20
+ "components",
21
+ "tailwind",
22
+ "polymorphic",
23
+ "accessible"
24
+ ],
25
+ "dependencies": {
26
+ "chalk": "^5.3.0",
27
+ "commander": "^12.1.0",
28
+ "fs-extra": "^11.2.0",
29
+ "ora": "^8.1.1",
30
+ "prompts": "^2.4.2"
31
+ },
32
+ "devDependencies": {
33
+ "@types/fs-extra": "^11.0.4",
34
+ "@types/node": "^22.10.1",
35
+ "@types/prompts": "^2.4.9",
36
+ "tsup": "^8.3.5",
37
+ "typescript": "^5.7.2",
38
+ "tailwindcss-animate": "^1.0.7",
39
+ "class-variance-authority": "^0.7.1",
40
+ "clsx": "^2.1.1",
41
+ "cmdk": "^1.0.0",
42
+ "react": "^18.0.0 || ^19.0.0",
43
+ "react-dom": "^18.0.0 || ^19.0.0",
44
+ "tailwind-merge": "^3.4.0",
45
+ "tailwindcss": "^3.0.0 || ^4.0.0",
46
+ "react-icons": "^5.5.0"
47
+ },
48
+ "peerDependencies": {
49
+ "class-variance-authority": "^0.7.1",
50
+ "clsx": "^2.1.1",
51
+ "cmdk": "^1.0.0",
52
+ "react-icons": "^5.5.0",
53
+ "react": "^18.0.0 || ^19.0.0",
54
+ "react-dom": "^18.0.0 || ^19.0.0",
55
+ "tailwind-merge": "^3.4.0",
56
+ "tailwindcss-animate": "^1.0.7",
57
+ "tailwindcss": "^3.0.0 || ^4.0.0"
58
+ },
59
+ "peerDependenciesMeta": {
60
+ "cmdk": {
61
+ "optional": true
62
+ }
63
+ }
58
64
  }
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority"
3
3
  import { cn } from "@/lib/utils"
4
4
 
5
5
  const buttonVariants = cva(
6
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
6
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",
7
7
  {
8
8
  variants: {
9
9
  variant: {
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from "react"
4
- import { Check, ChevronsUpDown, X } from "lucide-react"
4
+ import { LuCheck, LuChevronsUpDown, LuX } from "react-icons/lu"
5
5
 
6
6
  import { cn } from "@/lib/utils"
7
7
  import { Button } from "@/components/ui/button"
@@ -113,7 +113,7 @@ export function Combobox({
113
113
  >
114
114
  {Icon && <Icon className="h-3 w-3" />}
115
115
  {opt.label}
116
- <X className="h-3 w-3 text-muted-foreground hover:text-foreground ml-0.5" />
116
+ <LuX className="h-3 w-3 text-muted-foreground hover:text-foreground ml-0.5" />
117
117
  </Badge>
118
118
  )
119
119
  })
@@ -131,7 +131,7 @@ export function Combobox({
131
131
  <span className="text-muted-foreground">{placeholder}</span>
132
132
  )}
133
133
  </div>
134
- <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
134
+ <LuChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
135
135
  </Button>
136
136
  </PopoverTrigger>
137
137
  <PopoverContent className="w-full min-w-[200px] p-0">
@@ -146,7 +146,7 @@ export function Combobox({
146
146
  value={option.label}
147
147
  onSelect={() => handleSelect(option.value)}
148
148
  >
149
- <Check
149
+ <LuCheck
150
150
  className={cn(
151
151
  "mr-2 h-4 w-4",
152
152
  multiple
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from "react"
4
- import { Search } from "lucide-react"
4
+ import { LuSearch } from "react-icons/lu"
5
5
  import { cn } from "@/lib/utils"
6
6
  import { Dialog, DialogContent } from "@/components/ui/dialog"
7
7
 
@@ -117,7 +117,7 @@ const CommandInput = React.forwardRef<HTMLInputElement, CommandInputProps>(
117
117
 
118
118
  return (
119
119
  <div className="flex items-center border-b px-3">
120
- <Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
120
+ <LuSearch className="mr-2 h-4 w-4 shrink-0 opacity-50" />
121
121
  <input
122
122
  ref={ref}
123
123
  value={search}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from "react"
4
- import { Upload, X, File, Image, FileText, Film, Music } from "lucide-react"
4
+ import { LuUpload, LuX, LuFile, LuImage, LuFileText, LuFilm, LuMusic } from "react-icons/lu"
5
5
  import { cn } from "@/lib/utils"
6
6
  import { Button } from "@/components/ui/button"
7
7
 
@@ -21,11 +21,11 @@ interface UploadedFile {
21
21
  }
22
22
 
23
23
  const getFileIcon = (type: string) => {
24
- if (type.startsWith("image/")) return Image
25
- if (type.startsWith("video/")) return Film
26
- if (type.startsWith("audio/")) return Music
27
- if (type.includes("pdf") || type.includes("document")) return FileText
28
- return File
24
+ if (type.startsWith("image/")) return LuImage
25
+ if (type.startsWith("video/")) return LuFilm
26
+ if (type.startsWith("audio/")) return LuMusic
27
+ if (type.includes("pdf") || type.includes("document")) return LuFileText
28
+ return LuFile
29
29
  }
30
30
 
31
31
  const formatFileSize = (bytes: number): string => {
@@ -163,7 +163,7 @@ export function FileUpload({
163
163
  "flex h-14 w-14 items-center justify-center rounded-full bg-muted transition-colors",
164
164
  isDragging && "bg-primary/10"
165
165
  )}>
166
- <Upload className={cn(
166
+ <LuUpload className={cn(
167
167
  "h-6 w-6 text-muted-foreground",
168
168
  isDragging && "text-primary"
169
169
  )} />
@@ -188,7 +188,7 @@ export function FileUpload({
188
188
  <p className="text-sm text-destructive">{error}</p>
189
189
  )}
190
190
 
191
- {/* File List */}
191
+ {/* LuFile List */}
192
192
  {files.length > 0 && (
193
193
  <div className="space-y-2">
194
194
  {files.map((uploadedFile, index) => {
@@ -228,7 +228,7 @@ export function FileUpload({
228
228
  removeFile(index)
229
229
  }}
230
230
  >
231
- <X className="h-4 w-4" />
231
+ <LuX className="h-4 w-4" />
232
232
  </Button>
233
233
  </div>
234
234
  )
@@ -36,14 +36,14 @@ const Search = React.forwardRef<HTMLInputElement, SearchProps>(
36
36
  ref
37
37
  ) => {
38
38
  const [value, setValue] = React.useState(String(defaultValue))
39
- const debounceRef = React.useRef<NodeJS.Timeout>()
39
+ const debounceRef = React.useRef<NodeJS.Timeout | null>(null)
40
40
 
41
41
  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
42
42
  const newValue = e.target.value
43
43
  setValue(newValue)
44
44
 
45
45
  if (debounceMs > 0) {
46
- clearTimeout(debounceRef.current)
46
+ if (debounceRef.current) clearTimeout(debounceRef.current)
47
47
  debounceRef.current = setTimeout(() => {
48
48
  onSearch?.(newValue)
49
49
  }, debounceMs)
@@ -65,7 +65,7 @@ const Search = React.forwardRef<HTMLInputElement, SearchProps>(
65
65
 
66
66
  React.useEffect(() => {
67
67
  return () => {
68
- clearTimeout(debounceRef.current)
68
+ if (debounceRef.current) clearTimeout(debounceRef.current)
69
69
  }
70
70
  }, [])
71
71
 
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from "react"
4
- import { PanelLeft } from "lucide-react"
4
+ import { LuPanelLeft } from "react-icons/lu"
5
5
  import { cva, type VariantProps } from "class-variance-authority"
6
6
 
7
7
  import { cn } from "@/lib/utils"
@@ -233,7 +233,7 @@ const SidebarTrigger = React.forwardRef<
233
233
  }}
234
234
  {...props}
235
235
  >
236
- <PanelLeft />
236
+ <LuPanelLeft />
237
237
  <span className="sr-only">Toggle Sidebar</span>
238
238
  </Button>
239
239
  )