xegavnj 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/README.md +75 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,36 +1,90 @@
1
- This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1
+ # xegavnj (DapoerRasa Library)
2
2
 
3
- ## Getting Started
3
+ Library komponen React untuk DapoerRasa yang menyediakan kumpulan komponen reusable yang dirancang untuk aplikasi web modern dengan dukungan tema.
4
4
 
5
- First, run the development server:
5
+ ## Instalasi
6
6
 
7
7
  ```bash
8
- npm run dev
9
- # or
10
- yarn dev
11
- # or
12
- pnpm dev
13
- # or
14
- bun dev
8
+ npm install xegavnj
15
9
  ```
16
10
 
17
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
11
+ ## Penggunaan Dasar
18
12
 
19
- You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
13
+ Import komponen yang Anda butuhkan lalu gunakan dalam file React Anda. Pastikan untuk membungkus aplikasi Anda dengan `ThemeProvider` jika ingin menggunakan fitur tema otomatis.
20
14
 
21
- This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
15
+ ```jsx
16
+ import { ThemeProvider, AppHeader, Button } from "xegavnj";
22
17
 
23
- ## Learn More
18
+ export default function App() {
19
+ return (
20
+ <ThemeProvider>
21
+ <AppHeader variant="primary" logo="DapoerRasa" />
22
+ <main style={{ padding: '2rem' }}>
23
+ <h1>Selamat Datang</h1>
24
+ <Button label="Klik Saya" onClick={() => alert('Halo!')} />
25
+ </main>
26
+ </ThemeProvider>
27
+ );
28
+ }
29
+ ```
30
+
31
+ ## Komponen & Varian
32
+
33
+ ### Button
34
+ Komponen tombol yang dapat disesuaikan sepenuhnya.
35
+
36
+ **Props:**
37
+ - `label`: Teks tombol.
38
+ - `bg`: Warna background.
39
+ - `icon`: Komponen icon (dari lucide-react).
40
+ - `variant`: (Custom melalui props style seperti bg, border).
41
+
42
+ ### Card
43
+ Komponen kartu untuk menampilkan konten.
44
+
45
+ **Varian (`variant`):**
46
+ - `basic`: Kartu teks sederhana dengan border atas berwarna.
47
+ - `image`: Kartu dengan gambar di atas.
48
+ - `horizontal`: Kartu layout mendatar (gambar di kiri, konten di kanan).
49
+
50
+ **Props:**
51
+ - `title`, `description`, `image`, `buttonLabel`, `meta`.
52
+
53
+ ### AppHeader
54
+ Header navigasi responsif.
55
+
56
+ **Varian (`variant`):**
57
+ - `primary`: Background solid (ungu), menu di kanan.
58
+ - `centered`: Logo besar di tengah, menu di bawahnya.
59
+ - `split`: Gradient background, menu dan tombol CTA terpisah.
60
+
61
+ **Props:**
62
+ - `logo`: Teks logo.
63
+ - `menuItems`: Array object `{ label, href }`.
64
+ - `showThemeToggle`: Boolean untuk menampilkan tombol ganti tema.
24
65
 
25
- To learn more about Next.js, take a look at the following resources:
66
+ ### AppSidebar
67
+ Sidebar navigasi untuk dashboard atau dokumentasi.
26
68
 
27
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
69
+ **Varian (`variant`):**
70
+ - `default`: List menu vertikal standar.
71
+ - `grouped`: Menu dikelompokkan berdasarkan kategori.
72
+ - `floating`: Sidebar melayang dengan sudut membulat.
29
73
 
30
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
74
+ **Props:**
75
+ - `title`: Judul sidebar.
76
+ - `items`: Array menu item.
77
+ - `groups`: Array group untuk varian grouped.
31
78
 
32
- ## Deploy on Vercel
79
+ ### AppFooter
80
+ Footer halaman.
33
81
 
34
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
82
+ **Varian (`variant`):**
83
+ - `primary`: Footer sederhana centered.
84
+ - `dark`: Background gelap dengan dukungan ikon sosmed.
85
+ - `split`: Layout terpisah untuk link tambahan.
35
86
 
36
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
87
+ **Props:**
88
+ - `copyright`: Teks hak cipta.
89
+ - `socials`: Boolean untuk ikon sosmed (hanya varian dark).
90
+ - `links`: Array link tambahan (hanya varian split).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xegavnj",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {