Skip to content

Commit 7833d6a

Browse files
committed
feat: initial version
1 parent 84129f0 commit 7833d6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1284
-1518
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: Build
2929
run: pnpm run build
3030

31-
- name: Lint
32-
run: pnpm run lint
31+
# - name: Lint
32+
# run: pnpm run lint
3333

3434
- name: Typecheck
3535
run: pnpm run typecheck
File renamed without changes.

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false,
4+
"plugins": ["prettier-plugin-tailwindcss"],
5+
"tailwindFunctions": ["clsx", "cva"]
6+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @shilong/UI

package.json

Lines changed: 80 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,84 @@
11
{
2-
"name": "repro",
3-
"version": "1.0.0",
4-
"main": "index.js",
2+
"name": "@shilong/react",
3+
"version": "0.0.0",
4+
"packageManager": "pnpm@10.6.3",
5+
"description": "A simple react ui component",
6+
"keywords": [
7+
"ui",
8+
"react",
9+
"tailwindcss",
10+
"shadcn"
11+
],
12+
"type": "module",
13+
"license": "MIT",
14+
"homepage": "https://github.com/Onlylonger/react",
15+
"bugs": {
16+
"url": "https://github.com/Onlylonger/react/issues"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "git+https://github.com/Onlylonger/react.git"
21+
},
22+
"author": "Barry <onlylonger@outlook.com>",
23+
"files": [
24+
"dist"
25+
],
26+
"main": "./dist/index.js",
27+
"module": "./dist/index.js",
28+
"types": "./dist/index.d.ts",
29+
"exports": {
30+
".": {
31+
"import": "./dist/index.js",
32+
"types": "./dist/index.d.ts"
33+
},
34+
"./style.css": "./dist/global.css",
35+
"./package.json": "./package.json"
36+
},
37+
"publishConfig": {
38+
"access": "public"
39+
},
540
"scripts": {
6-
"test": "echo \"Error: no test specified\" && exit 1"
41+
"build": "vite build",
42+
"dev": "vite build -w",
43+
"pg": "vite --config playground/vite.config.ts",
44+
"test": "vitest",
45+
"typecheck": "tsc --noEmit",
46+
"release": "pnpm build && bumpp && npm publish",
47+
"prepublishOnly": "pnpm run build"
48+
},
49+
"peerDependencies": {
50+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
51+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
52+
},
53+
"devDependencies": {
54+
"@tailwindcss/vite": "^4.1.11",
55+
"@testing-library/jest-dom": "^6.6.3",
56+
"@testing-library/react": "^16.3.0",
57+
"@types/node": "^22.15.17",
58+
"@types/react": "^19.1.3",
59+
"@types/react-dom": "^19.1.4",
60+
"@vitejs/plugin-react": "^4.4.1",
61+
"bumpp": "^10.1.0",
62+
"happy-dom": "^17.4.6",
63+
"react": "^19.1.0",
64+
"react-dom": "^19.1.0",
65+
"tailwindcss": "^4.1.11",
66+
"tw-animate-css": "^1.3.6",
67+
"typescript": "^5.8.3",
68+
"vite": "^7.1.1",
69+
"vite-plugin-dts": "^4.5.4",
70+
"vitest": "^3.1.3",
71+
"prettier": "^3.6.2",
72+
"prettier-plugin-tailwindcss": "^0.6.14"
73+
},
74+
"dependencies": {
75+
"@floating-ui/react": "^0.27.15",
76+
"@shilong/utils": "^0.0.9",
77+
"sonner": "^2.0.7"
778
},
8-
"keywords": [],
9-
"author": "",
10-
"license": "ISC",
11-
"description": ""
79+
"pnpm": {
80+
"overrides": {
81+
"@shilong/ui": "link:"
82+
}
83+
}
1284
}

playground/src/App.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { Button, Input, Popover, Toaster, Tooltip, toast } from '@shilong/ui'
2+
3+
export function App() {
4+
return (
5+
<>
6+
<Input />
7+
<Button onClick={() => toast('nih')}>Toast</Button>
8+
<Toaster position="top-center" />
9+
<Popover trigger={<Button>Trigger</Button>}>
10+
<div>nihao</div>
11+
</Popover>
12+
13+
<Popover trigger={<Button>Trigger1</Button>}>
14+
<>nihao</>
15+
</Popover>
16+
17+
<Tooltip trigger={<Button variant="outline">E</Button>} arrow>
18+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores minus
19+
suscipit distinctio asperiores vero molestias, quos rerum aliquid? Et
20+
nulla ducimus, qui repudiandae culpa quod pariatur ipsam aut magni sint.
21+
</Tooltip>
22+
</>
23+
)
24+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { StrictMode } from 'react'
22
import { createRoot } from 'react-dom/client'
33
import { App } from './App.tsx'
44
import './style.css'
5+
import '@shilong/ui/style.css'
56

67
createRoot(document.querySelector('#app')!).render(
78
<StrictMode>
89
<App />
9-
</StrictMode>,
10+
</StrictMode>
1011
)

0 commit comments

Comments
 (0)