xegavnj 0.1.8

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,36 @@
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).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
20
+
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.
22
+
23
+ ## Learn More
24
+
25
+ To learn more about Next.js, take a look at the following resources:
26
+
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.
29
+
30
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
+
32
+ ## Deploy on Vercel
33
+
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.
35
+
36
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
@@ -0,0 +1,294 @@
1
+ "use client";
2
+ import { useState } from 'react';
3
+ import styled, { css } from "styled-components";
4
+ import { Copy, Check, Code as CodeIcon, Twitter, Facebook, Instagram } from "lucide-react";
5
+
6
+ // =============================================================================
7
+ // REUSABLE FOOTER COMPONENT
8
+ // =============================================================================
9
+
10
+ const FooterWrapper = styled.footer`
11
+ width: 100%;
12
+ padding: 2rem;
13
+ transition: all 0.3s ease;
14
+
15
+ /* Primary Variant */
16
+ ${props => props.$variant === 'primary' && css`
17
+ background-color: #6366f1;
18
+ color: white;
19
+ display: flex;
20
+ justify-content: center;
21
+ align-items: center;
22
+ text-align: center;
23
+ `}
24
+
25
+ /* Dark Variant */
26
+ ${props => props.$variant === 'dark' && css`
27
+ background-color: #111827;
28
+ color: white;
29
+ display: flex;
30
+ flex-direction: column;
31
+ align-items: center;
32
+ justify-content: center;
33
+ gap: 1rem;
34
+ padding: 3rem 2rem;
35
+
36
+ @media (min-width: 768px) {
37
+ flex-direction: row;
38
+ gap: 2rem;
39
+ }
40
+ `}
41
+
42
+ /* Split Variant */
43
+ ${props => props.$variant === 'split' && css`
44
+ background: linear-gradient(to right, #8b5cf6, #d946ef);
45
+ color: white;
46
+ display: flex;
47
+ flex-direction: column;
48
+ align-items: center;
49
+ gap: 1.5rem;
50
+
51
+ @media (min-width: 768px) {
52
+ flex-direction: row;
53
+ justify-content: space-between;
54
+ }
55
+ `}
56
+ `;
57
+
58
+ const Copyright = styled.div`
59
+ font-size: 0.9rem;
60
+ opacity: 0.9;
61
+ font-weight: 500;
62
+ `;
63
+
64
+ const Socials = styled.div`
65
+ display: flex;
66
+ gap: 1.5rem;
67
+
68
+ svg {
69
+ cursor: pointer;
70
+ opacity: 0.8;
71
+ transition: opacity 0.2s;
72
+ &:hover { opacity: 1; }
73
+ }
74
+ `;
75
+
76
+ const FooterLinks = styled.div`
77
+ display: flex;
78
+ gap: 1.5rem;
79
+
80
+ a {
81
+ color: white;
82
+ text-decoration: none;
83
+ font-size: 0.85rem;
84
+ font-weight: 500;
85
+ opacity: 0.9;
86
+ &:hover { text-decoration: underline; opacity: 1; }
87
+ }
88
+ `;
89
+
90
+ export function Footer({
91
+ variant = 'primary',
92
+ copyright = '© 2025 Company. All rights reserved.',
93
+ socials = false,
94
+ links = []
95
+ }) {
96
+ return (
97
+ <FooterWrapper $variant={variant}>
98
+ <Copyright>{copyright}</Copyright>
99
+
100
+ {variant === 'dark' && socials && (
101
+ <Socials>
102
+ <Twitter size={20} />
103
+ <Facebook size={20} />
104
+ <Instagram size={20} />
105
+ </Socials>
106
+ )}
107
+
108
+ {variant === 'split' && links.length > 0 && (
109
+ <FooterLinks>
110
+ {links.map((link, idx) => (
111
+ <a key={idx} href={link.href}>{link.label}</a>
112
+ ))}
113
+ </FooterLinks>
114
+ )}
115
+ </FooterWrapper>
116
+ );
117
+ }
118
+
119
+
120
+ // =============================================================================
121
+ // SHOWCASE & DOCUMENTATION WRAPPER
122
+ // =============================================================================
123
+
124
+ const ShowcaseContainer = styled.div`
125
+ width: 100%;
126
+ padding: 2rem 0; /* Removed horizontal padding to allow full width appearance in constrained container */
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: 4rem;
130
+ background-color: #f8fafc;
131
+ min-height: 100vh;
132
+ `;
133
+
134
+ const Title = styled.h2`
135
+ text-align: center;
136
+ font-size: 2rem;
137
+ color: #1e293b;
138
+ margin-bottom: 2rem;
139
+ font-weight: 800;
140
+ `;
141
+
142
+ const FooterDisplayWrapper = styled.div`
143
+ width: 100%;
144
+ margin-bottom: 2rem;
145
+ `;
146
+
147
+ const CodeControlBar = styled.div`
148
+ display: flex;
149
+ justify-content: center; /* Center the button for footer style */
150
+ padding: 0.5rem;
151
+ margin-top: 1rem;
152
+ `;
153
+
154
+ const ActionButton = styled.button`
155
+ display: flex;
156
+ align-items: center;
157
+ gap: 0.5rem;
158
+ padding: 0.5rem 1rem;
159
+ border-radius: 6px;
160
+ border: 1px solid #cbd5e1;
161
+ background: white;
162
+ font-size: 0.85rem;
163
+ color: #475569;
164
+ cursor: pointer;
165
+ font-weight: 500;
166
+ transition: all 0.2s;
167
+ box-shadow: 0 1px 2px rgba(0,0,0,0.05);
168
+
169
+ &:hover {
170
+ background: #f8fafc;
171
+ border-color: #94a3b8;
172
+ }
173
+ `;
174
+
175
+ const CodeBlock = styled.div`
176
+ background: #1e1e1e;
177
+ color: #d4d4d4;
178
+ padding: 1rem;
179
+ overflow-x: auto;
180
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
181
+ font-size: 0.85rem;
182
+ line-height: 1.5;
183
+ border-radius: 8px;
184
+ margin: 1rem auto;
185
+ max-width: 800px; /* Constrain code block width */
186
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
187
+ `;
188
+
189
+ function FooterVariantDisplay({ title, code, children }) {
190
+ const [showCode, setShowCode] = useState(false);
191
+ const [copied, setCopied] = useState(false);
192
+
193
+ const handleCopy = () => {
194
+ navigator.clipboard.writeText(code);
195
+ setCopied(true);
196
+ setTimeout(() => setCopied(false), 2000);
197
+ };
198
+
199
+ return (
200
+ <FooterDisplayWrapper>
201
+ <h3 style={{ textAlign: 'center', marginBottom: '1.5rem', color: '#64748b', textTransform: 'uppercase', letterSpacing: '0.1em', fontSize: '1rem' }}>{title}</h3>
202
+
203
+ {/* Direct Children Render - No Card Wrapper */}
204
+ <div style={{ boxShadow: "0 1px 3px rgba(0,0,0,0.1)" }}>
205
+ {children}
206
+ </div>
207
+
208
+ <CodeControlBar>
209
+ <div style={{ display: 'flex', gap: '0.5rem' }}>
210
+ <ActionButton onClick={() => setShowCode(!showCode)}>
211
+ <CodeIcon size={16} />
212
+ {showCode ? "Sembunyikan Kode" : "Lihat Kode"}
213
+ </ActionButton>
214
+ {showCode && (
215
+ <ActionButton onClick={handleCopy}>
216
+ {copied ? <Check size={16} /> : <Copy size={16} />}
217
+ {copied ? "Disalin!" : "Salin"}
218
+ </ActionButton>
219
+ )}
220
+ </div>
221
+ </CodeControlBar>
222
+
223
+ {showCode && (
224
+ <CodeBlock>
225
+ <pre>{code}</pre>
226
+ </CodeBlock>
227
+ )}
228
+ </FooterDisplayWrapper>
229
+ );
230
+ }
231
+
232
+ export function FooterShowcase() {
233
+ return (
234
+ <ShowcaseContainer>
235
+ <Title>Komponen Footer</Title>
236
+ <p style={{ textAlign: 'center', color: '#666', marginBottom: '2rem' }}>
237
+ Pilih varian Footer di bawah ini ✨
238
+ </p>
239
+
240
+ <FooterVariantDisplay
241
+ title="Primary Footer"
242
+ code={`<Footer
243
+ variant="primary"
244
+ copyright="© 2025 DapoerRasa. All rights reserved."
245
+ />`}
246
+ >
247
+ <Footer variant="primary" copyright="© 2025 DapoerRasa. All rights reserved." />
248
+ </FooterVariantDisplay>
249
+
250
+ <FooterVariantDisplay
251
+ title="Dark Footer (dengan ikon media sosial)"
252
+ code={`<Footer
253
+ variant="dark"
254
+ copyright="© 2025 DapoerRasa"
255
+ socials={true}
256
+ />`}
257
+ >
258
+ <Footer variant="dark" copyright="© 2025 DapoerRasa" socials={true} />
259
+ </FooterVariantDisplay>
260
+
261
+ <FooterVariantDisplay
262
+ title="Split Footer (dengan link tambahan)"
263
+ code={`<Footer
264
+ variant="split"
265
+ copyright="© 2025 DapoerRasa"
266
+ links={[
267
+ { label: "Privacy Policy", href: "#" },
268
+ { label: "Terms", href: "#" },
269
+ { label: "Support", href: "#" }
270
+ ]}
271
+ />`}
272
+ >
273
+ <Footer
274
+ variant="split"
275
+ copyright="© 2025 DapoerRasa"
276
+ links={[
277
+ { label: "Privacy Policy", href: "#" },
278
+ { label: "Terms", href: "#" },
279
+ { label: "Support", href: "#" }
280
+ ]}
281
+ />
282
+ </FooterVariantDisplay>
283
+
284
+ </ShowcaseContainer>
285
+ );
286
+ }
287
+
288
+ /**
289
+ * Default Export: Generic Reusable Footer
290
+ */
291
+ export default function AppFooter(props) {
292
+ const defaultCopyright = "© 2025 DapoerRasa. All rights reserved.";
293
+ return <Footer copyright={defaultCopyright} {...props} />;
294
+ }