@nuvra-ui/react 0.0.2 → 0.0.4

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @nuvra-ui/react
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`faf848c`](https://github.com/nuvra-ui/Nuvra-UI/commit/faf848c790097552ec90eb5e8e8bf872745b638f)]:
8
+ - @nuvra-ui/utils@0.0.1
9
+
10
+ ## 0.0.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [`fca2ee2`](https://github.com/nuvra-ui/Nuvra-UI/commit/fca2ee2074353fef71c1e9ae710f2446d17b976a) - Button, Badge, Link Component
15
+
3
16
  ## 0.0.2
4
17
 
5
18
  ### Patch Changes
package/eslint.config.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { baseConfig } from "@nuvra-ui/eslint-config";
2
2
 
3
- export default baseConfig;
3
+ export default [...baseConfig];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvra-ui/react",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -12,10 +12,11 @@
12
12
  "react-dom": "^19.2.0"
13
13
  },
14
14
  "dependencies": {
15
- "@nuvra-ui/eslint-config": "0.0.0"
15
+ "@nuvra-ui/utils": "0.0.1"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@eslint/js": "^9.39.1",
19
+ "@storybook/react": "^10.2.1",
19
20
  "@types/node": "^24.10.1",
20
21
  "@types/react": "^19.2.5",
21
22
  "@types/react-dom": "^19.2.3",
@@ -27,10 +28,11 @@
27
28
  "typescript": "~5.9.3",
28
29
  "typescript-eslint": "^8.46.4",
29
30
  "vite": "npm:rolldown-vite@7.2.5",
30
- "vite-plugin-dts": "^4.5.4"
31
+ "vite-plugin-dts": "^4.5.4",
32
+ "@nuvra-ui/eslint-config": "0.0.0"
31
33
  },
32
34
  "scripts": {
33
- "dev": "vite",
35
+ "dev": "vite build --watch",
34
36
  "build": "tsc -b && vite build",
35
37
  "lint": "eslint .",
36
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";