@rock.star/ui 1.0.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 +27 -0
- package/dist/hooks/index.d.ts +51 -0
- package/dist/hooks/index.js +351 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/icon/index.d.ts +30 -0
- package/dist/icon/index.js +205 -0
- package/dist/icon/index.js.map +1 -0
- package/dist/lib/index.d.ts +301 -0
- package/dist/lib/index.js +380 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/styles.css +509 -0
- package/dist/ui/index.d.ts +794 -0
- package/dist/ui/index.js +7336 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/utils/index.ts
|
|
2
|
+
function getCountryFlagUrl(countryCode, size = "24") {
|
|
3
|
+
if (!countryCode) return "";
|
|
4
|
+
return `https://flagcdn.com/${size}x${Math.floor(Number(size) * 0.75)}/${countryCode.toLowerCase()}.png`;
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
getCountryFlagUrl
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export function getCountryFlagUrl(\n countryCode: string,\n size: \"16\" | \"24\" | \"32\" | \"48\" | \"64\" | \"128\" = \"24\"\n): string {\n if (!countryCode) return \"\"\n return `https://flagcdn.com/${size}x${Math.floor(Number(size) * 0.75)}/${countryCode.toLowerCase()}.png`\n}\n"],"mappings":";AAAO,SAAS,kBACd,aACA,OAAiD,MACzC;AACR,MAAI,CAAC,YAAa,QAAO;AACzB,SAAO,uBAAuB,IAAI,IAAI,KAAK,MAAM,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,YAAY,YAAY,CAAC;AACpG;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rock.star/ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Rockstar shared React UI components, icons, hooks, utilities, and styles.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"imports": {
|
|
9
|
+
"#components/*": "./src/ui/*.tsx",
|
|
10
|
+
"#hooks/*": "./src/hooks/*.ts",
|
|
11
|
+
"#lib/*": "./src/lib/*.ts"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"registry": "https://registry.npmjs.org"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/ui/index.d.ts",
|
|
23
|
+
"import": "./dist/ui/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./icon": {
|
|
26
|
+
"types": "./dist/icon/index.d.ts",
|
|
27
|
+
"import": "./dist/icon/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./hooks": {
|
|
30
|
+
"types": "./dist/hooks/index.d.ts",
|
|
31
|
+
"import": "./dist/hooks/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./lib": {
|
|
34
|
+
"types": "./dist/lib/index.d.ts",
|
|
35
|
+
"import": "./dist/lib/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./utils": {
|
|
38
|
+
"types": "./dist/utils/index.d.ts",
|
|
39
|
+
"import": "./dist/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./styles.css": "./dist/styles.css",
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/rockstar-bio/ui.git"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/rockstar-bio/ui#readme",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/rockstar-bio/ui/issues"
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsup",
|
|
55
|
+
"format": "prettier --write .",
|
|
56
|
+
"format:check": "prettier --check .",
|
|
57
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"next": "^16.0.0",
|
|
61
|
+
"react": "^19.0.0",
|
|
62
|
+
"react-dom": "^19.0.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@base-ui/react": "^1.6.0",
|
|
66
|
+
"@gravity-ui/icons": "^2.3.0",
|
|
67
|
+
"@number-flow/react": "^0.6.2",
|
|
68
|
+
"@radix-ui/react-collapsible": "^1.1.20",
|
|
69
|
+
"@radix-ui/react-scroll-area": "^1.2.18",
|
|
70
|
+
"@radix-ui/react-select": "^2.3.7",
|
|
71
|
+
"@shadcn/react": "^0.3.0",
|
|
72
|
+
"@visx/curve": "4.0.1-alpha.0",
|
|
73
|
+
"@visx/event": "4.0.1-alpha.0",
|
|
74
|
+
"@visx/gradient": "4.0.1-alpha.0",
|
|
75
|
+
"@visx/grid": "4.0.1-alpha.0",
|
|
76
|
+
"@visx/responsive": "4.0.1-alpha.0",
|
|
77
|
+
"@visx/scale": "4.0.1-alpha.0",
|
|
78
|
+
"@visx/shape": "4.0.1-alpha.0",
|
|
79
|
+
"class-variance-authority": "^0.7.1",
|
|
80
|
+
"clsx": "^2.1.1",
|
|
81
|
+
"cmdk": "^1.1.1",
|
|
82
|
+
"d3-array": "^3.2.4",
|
|
83
|
+
"d3-shape": "^3.2.0",
|
|
84
|
+
"embla-carousel-react": "^8.6.0",
|
|
85
|
+
"feral-blob": "^0.2.0",
|
|
86
|
+
"goey-toast": "^0.5.0",
|
|
87
|
+
"input-otp": "^1.4.2",
|
|
88
|
+
"lucide-react": "^1.27.0",
|
|
89
|
+
"motion": "^12.42.2",
|
|
90
|
+
"next-themes": "^0.4.6",
|
|
91
|
+
"nuqs": "^2.9.4",
|
|
92
|
+
"openai": "^7.4.0",
|
|
93
|
+
"qrcode": "^1.5.4",
|
|
94
|
+
"recharts": "^3.8.0",
|
|
95
|
+
"sonner": "^2.0.7",
|
|
96
|
+
"tailwind-merge": "^3.6.0",
|
|
97
|
+
"tw-animate-css": "^1.4.0",
|
|
98
|
+
"tailwindcss": "^4",
|
|
99
|
+
"shadcn": "^4.13.0"
|
|
100
|
+
},
|
|
101
|
+
"devDependencies": {
|
|
102
|
+
"@types/node": "^20.19.43",
|
|
103
|
+
"@types/qrcode": "^1.5.6",
|
|
104
|
+
"@types/react": "^19",
|
|
105
|
+
"@types/react-dom": "^19",
|
|
106
|
+
"next": "^16.0.0",
|
|
107
|
+
"prettier": "^3.8.3",
|
|
108
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
109
|
+
"tsup": "^8.5.0",
|
|
110
|
+
"typescript": "^5"
|
|
111
|
+
}
|
|
112
|
+
}
|