elegant-lib 0.0.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.
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # react-components-starter
2
+
3
+ A starter for creating a React component library.
4
+
5
+ ## Development
6
+
7
+ - Install dependencies:
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ - Run the playground:
14
+
15
+ ```bash
16
+ npm run play
17
+ ```
18
+
19
+ - Run the unit tests:
20
+
21
+ ```bash
22
+ npm run test
23
+ ```
24
+
25
+ - Build the library:
26
+
27
+ ```bash
28
+ npm run build
29
+ ```
@@ -0,0 +1,9 @@
1
+ import "react";
2
+ import "class-variance-authority";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/components/ui/button.d.ts
6
+
7
+ declare function Button(): react_jsx_runtime0.JSX.Element;
8
+ //#endregion
9
+ export { Button };
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
1
+ import "react";
2
+ import "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import MuiButton from "@mui/material/Button";
5
+ import "clsx";
6
+ import "tailwind-merge";
7
+ import { jsx } from "react/jsx-runtime";
8
+
9
+ //#region src/components/ui/button.tsx
10
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
11
+ variants: {
12
+ variant: {
13
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
14
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
15
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
16
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
17
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
18
+ link: "text-primary underline-offset-4 hover:underline"
19
+ },
20
+ size: {
21
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
22
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
23
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
24
+ icon: "size-9",
25
+ "icon-sm": "size-8",
26
+ "icon-lg": "size-10"
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ variant: "default",
31
+ size: "default"
32
+ }
33
+ });
34
+ function Button() {
35
+ return /* @__PURE__ */ jsx(MuiButton, {
36
+ variant: "contained",
37
+ children: "Hello world"
38
+ });
39
+ }
40
+
41
+ //#endregion
42
+ export { Button };
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "elegant-lib",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "description": "A starter for creating a React component library.",
6
+ "author": "Author Name <author.name@mail.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/author/library#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/author/library.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/author/library/issues"
15
+ },
16
+ "exports": {
17
+ ".": "./dist/index.js",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "main": "./dist/index.js",
21
+ "module": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "scripts": {
30
+ "build": "tsdown",
31
+ "dev": "tsdown --watch",
32
+ "play": "vite",
33
+ "test": "vitest",
34
+ "typecheck": "tsc --noEmit",
35
+ "release": "bumpp && pnpm publish",
36
+ "prepublishOnly": "pnpm run build"
37
+ },
38
+ "peerDependencies": {
39
+ "react": "^19.2.0",
40
+ "react-dom": "^19.2.0"
41
+ },
42
+ "devDependencies": {
43
+ "@tsconfig/strictest": "^2.0.8",
44
+ "@types/node": "^25.0.3",
45
+ "@types/react": "^19.2.7",
46
+ "@types/react-dom": "^19.2.3",
47
+ "@vitejs/plugin-react": "^5.1.2",
48
+ "@vitest/browser-playwright": "^4.0.16",
49
+ "bumpp": "^10.3.2",
50
+ "tsdown": "^0.18.1",
51
+ "tw-animate-css": "^1.4.0",
52
+ "typescript": "^5.9.3",
53
+ "vite": "^7.3.0",
54
+ "vitest": "^4.0.16",
55
+ "vitest-browser-react": "^2.0.2"
56
+ },
57
+ "dependencies": {
58
+ "@base-ui/react": "^1.0.0",
59
+ "@emotion/react": "^11.14.0",
60
+ "@emotion/styled": "^11.14.1",
61
+ "@mui/material": "^5.0.0",
62
+ "@radix-ui/react-slot": "^1.2.4",
63
+ "@tailwindcss/vite": "^4.1.18",
64
+ "class-variance-authority": "^0.7.1",
65
+ "clsx": "^2.1.1",
66
+ "lucide-react": "^0.562.0",
67
+ "tailwind-merge": "^3.4.0",
68
+ "tailwindcss": "^4.1.18"
69
+ }
70
+ }