@nuvra-ui/react 0.0.1 → 0.0.3
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/CHANGELOG.md +12 -0
- package/eslint.config.js +1 -1
- package/package.json +8 -3
- package/src/components/Badge/Badge.stories.tsx +16 -0
- package/src/components/Badge/Badge.tsx +19 -0
- package/src/components/Button/Button.stories.tsx +16 -0
- package/src/components/Button/Button.tsx +19 -0
- package/src/components/Link/Link.stories.tsx +16 -0
- package/src/components/Link/Link.tsx +19 -0
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @nuvra-ui/react
|
|
2
2
|
|
|
3
|
+
## 0.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fca2ee2`](https://github.com/nuvra-ui/Nuvra-UI/commit/fca2ee2074353fef71c1e9ae710f2446d17b976a) - Button, Badge, Link Component
|
|
8
|
+
|
|
9
|
+
## 0.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`eb41f4a`](https://github.com/nuvra-ui/Nuvra-UI/commit/eb41f4a5d4b0ebd1fbe4cd93499233375a637b9b) - Publish package on NPM
|
|
14
|
+
|
|
3
15
|
## 0.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/eslint.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvra-ui/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
5
8
|
"main": "./dist/index.umd.js",
|
|
6
9
|
"module": "./dist/index.es.js",
|
|
7
10
|
"peerDependencies": {
|
|
@@ -9,10 +12,12 @@
|
|
|
9
12
|
"react-dom": "^19.2.0"
|
|
10
13
|
},
|
|
11
14
|
"dependencies": {
|
|
12
|
-
"@nuvra-ui/eslint-config": "0.0.0"
|
|
15
|
+
"@nuvra-ui/eslint-config": "0.0.0",
|
|
16
|
+
"@nuvra-ui/utils": "0.0.0"
|
|
13
17
|
},
|
|
14
18
|
"devDependencies": {
|
|
15
19
|
"@eslint/js": "^9.39.1",
|
|
20
|
+
"@storybook/react": "^10.2.1",
|
|
16
21
|
"@types/node": "^24.10.1",
|
|
17
22
|
"@types/react": "^19.2.5",
|
|
18
23
|
"@types/react-dom": "^19.2.3",
|
|
@@ -27,7 +32,7 @@
|
|
|
27
32
|
"vite-plugin-dts": "^4.5.4"
|
|
28
33
|
},
|
|
29
34
|
"scripts": {
|
|
30
|
-
"dev": "vite",
|
|
35
|
+
"dev": "vite build --watch",
|
|
31
36
|
"build": "tsc -b && vite build",
|
|
32
37
|
"lint": "eslint .",
|
|
33
38
|
"preview": "vite preview"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Badge } from "./Badge";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
component: Badge,
|
|
7
|
+
} satisfies Meta<typeof Badge>;
|
|
8
|
+
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
|
|
12
|
+
export const Example: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
children: "Badge",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn } from "@nuvra-ui/utils";
|
|
2
|
+
|
|
3
|
+
export function Badge({
|
|
4
|
+
className,
|
|
5
|
+
children,
|
|
6
|
+
...props
|
|
7
|
+
}: React.HTMLAttributes<HTMLSpanElement>) {
|
|
8
|
+
return (
|
|
9
|
+
<span
|
|
10
|
+
className={cn(
|
|
11
|
+
"bg-primary text-primary-foreground text-sm px-3 py-1 rounded-full",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</span>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Button } from "./Button";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
component: Button,
|
|
7
|
+
} satisfies Meta<typeof Button>;
|
|
8
|
+
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
|
|
12
|
+
export const Example: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
children: "Button",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn } from "@nuvra-ui/utils";
|
|
2
|
+
|
|
3
|
+
export function Button({
|
|
4
|
+
className,
|
|
5
|
+
children,
|
|
6
|
+
...props
|
|
7
|
+
}: React.ButtonHTMLAttributes<HTMLButtonElement>) {
|
|
8
|
+
return (
|
|
9
|
+
<button
|
|
10
|
+
className={cn(
|
|
11
|
+
"bg-primary hover:bg-primary/90 text-primary-foreground px-3 py-1 rounded-md flex justify-center items-center",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</button>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Link } from "./Link";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
component: Link,
|
|
7
|
+
} satisfies Meta<typeof Link>;
|
|
8
|
+
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
|
|
12
|
+
export const Example: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
children: "Link",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn } from "@nuvra-ui/utils";
|
|
2
|
+
|
|
3
|
+
export function Link({
|
|
4
|
+
className,
|
|
5
|
+
children,
|
|
6
|
+
...props
|
|
7
|
+
}: React.AnchorHTMLAttributes<HTMLAnchorElement>) {
|
|
8
|
+
return (
|
|
9
|
+
<a
|
|
10
|
+
className={cn(
|
|
11
|
+
"text-primary underline-offset-4 hover:underline",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</a>
|
|
18
|
+
);
|
|
19
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button } from "./components/Button/Button";
|