styled-hairomin 0.2.7 → 0.3.0
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/dist/index.cjs.js +1999 -0
- package/dist/index.esm.js +1993 -0
- package/package.json +34 -10
- package/components/ButtonVariant.jsx +0 -233
- package/components/CardVariant.jsx +0 -387
- package/components/FooterVariant.jsx +0 -564
- package/components/HeaderVariant.jsx +0 -457
- package/components/SidebarVariant.jsx +0 -586
- package/index.js +0 -6
|
@@ -0,0 +1,1999 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
var fa = require('react-icons/fa');
|
|
6
|
+
var Link = require('next/link');
|
|
7
|
+
|
|
8
|
+
const variantStyles$4 = {
|
|
9
|
+
elevated: {
|
|
10
|
+
background: "#fff"},
|
|
11
|
+
bordered: {
|
|
12
|
+
background: "#f8f9fa"},
|
|
13
|
+
gradient: {
|
|
14
|
+
background: "linear-gradient(135deg, #0066cc 0%, #004080 100%)"}
|
|
15
|
+
};
|
|
16
|
+
const ElevatedCard = styled.div`
|
|
17
|
+
width: 100%;
|
|
18
|
+
max-width: 350px;
|
|
19
|
+
background: ${variantStyles$4.elevated.background};
|
|
20
|
+
border-radius: 20px;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
|
|
23
|
+
transition: all 0.4s ease;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
transform: translateY(-10px);
|
|
28
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (max-width: 768px) {
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
const ElevatedImageWrapper = styled.div`
|
|
36
|
+
position: relative;
|
|
37
|
+
height: 220px;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
`;
|
|
40
|
+
const ElevatedImage = styled.img`
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
object-fit: cover;
|
|
44
|
+
transition: transform 0.4s;
|
|
45
|
+
|
|
46
|
+
${ElevatedCard}:hover & {
|
|
47
|
+
transform: scale(1.1);
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
const Badge = styled.div`
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 15px;
|
|
53
|
+
right: 15px;
|
|
54
|
+
background: rgba(0, 102, 204, 0.95);
|
|
55
|
+
color: #fff;
|
|
56
|
+
padding: 0.5rem 1rem;
|
|
57
|
+
border-radius: 25px;
|
|
58
|
+
font-weight: 700;
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
61
|
+
`;
|
|
62
|
+
const ElevatedContent = styled.div`
|
|
63
|
+
padding: 1.5rem;
|
|
64
|
+
`;
|
|
65
|
+
const ElevatedTitle = styled.h3`
|
|
66
|
+
margin: 0 0 0.8rem;
|
|
67
|
+
font-size: 1.5rem;
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
color: #0066cc;
|
|
70
|
+
`;
|
|
71
|
+
const ElevatedFeatures = styled.div`
|
|
72
|
+
display: flex;
|
|
73
|
+
gap: 1.2rem;
|
|
74
|
+
margin: 1rem 0;
|
|
75
|
+
color: #7f8c8d;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
`;
|
|
78
|
+
const Feature = styled.div`
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 0.4rem;
|
|
82
|
+
`;
|
|
83
|
+
const ElevatedFooter = styled.div`
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
align-items: center;
|
|
87
|
+
margin-top: 1.2rem;
|
|
88
|
+
padding-top: 1rem;
|
|
89
|
+
border-top: 1px solid #ecf0f1;
|
|
90
|
+
`;
|
|
91
|
+
const Price = styled.div`
|
|
92
|
+
font-size: 1.6rem;
|
|
93
|
+
font-weight: 800;
|
|
94
|
+
color: #0066cc;
|
|
95
|
+
|
|
96
|
+
span {
|
|
97
|
+
font-size: 0.9rem;
|
|
98
|
+
font-weight: 400;
|
|
99
|
+
color: #95a5a6;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (max-width: 768px) {
|
|
103
|
+
font-size: 1.3rem;
|
|
104
|
+
|
|
105
|
+
span {
|
|
106
|
+
font-size: 0.8rem;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
const Rating = styled.div`
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 0.3rem;
|
|
114
|
+
color: #f39c12;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
`;
|
|
117
|
+
|
|
118
|
+
/* ====== VARIANT BORDERED: Card dengan outline dan ikon ====== */
|
|
119
|
+
const BorderedCard = styled.div`
|
|
120
|
+
width: 100%;
|
|
121
|
+
max-width: 380px;
|
|
122
|
+
background: ${variantStyles$4.bordered.background};
|
|
123
|
+
border: 3px solid #dee2e6;
|
|
124
|
+
border-radius: 16px;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
transition: all 0.3s ease;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
|
|
129
|
+
&:hover {
|
|
130
|
+
border-color: #6c757d;
|
|
131
|
+
box-shadow: 0 8px 24px rgba(108, 117, 125, 0.2);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@media (max-width: 768px) {
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
const BorderedContent = styled.div`
|
|
139
|
+
padding: 1.8rem;
|
|
140
|
+
`;
|
|
141
|
+
const BorderedHeader = styled.div`
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: space-between;
|
|
144
|
+
align-items: start;
|
|
145
|
+
margin-bottom: 1rem;
|
|
146
|
+
`;
|
|
147
|
+
const BorderedTitle = styled.h3`
|
|
148
|
+
margin: 0;
|
|
149
|
+
font-size: 1.4rem;
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
color: #0066cc;
|
|
152
|
+
`;
|
|
153
|
+
const BorderedLocation = styled.div`
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 0.4rem;
|
|
157
|
+
color: #6c757d;
|
|
158
|
+
font-size: 14px;
|
|
159
|
+
margin: 0.5rem 0 1rem;
|
|
160
|
+
`;
|
|
161
|
+
const BorderedImage = styled.img`
|
|
162
|
+
width: 100%;
|
|
163
|
+
height: 200px;
|
|
164
|
+
object-fit: cover;
|
|
165
|
+
border-radius: 12px;
|
|
166
|
+
margin: 1rem 0;
|
|
167
|
+
`;
|
|
168
|
+
const BorderedDescription = styled.p`
|
|
169
|
+
color: #495057;
|
|
170
|
+
font-size: 14px;
|
|
171
|
+
line-height: 1.6;
|
|
172
|
+
margin: 1rem 0;
|
|
173
|
+
`;
|
|
174
|
+
const BorderedFooter = styled.div`
|
|
175
|
+
display: flex;
|
|
176
|
+
justify-content: space-between;
|
|
177
|
+
align-items: center;
|
|
178
|
+
margin-top: 1.5rem;
|
|
179
|
+
padding-top: 1rem;
|
|
180
|
+
border-top: 2px solid #dee2e6;
|
|
181
|
+
flex-wrap: wrap;
|
|
182
|
+
gap: 1rem;
|
|
183
|
+
|
|
184
|
+
@media (max-width: 480px) {
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: stretch;
|
|
187
|
+
text-align: center;
|
|
188
|
+
}
|
|
189
|
+
`;
|
|
190
|
+
const BorderedPrice = styled.div`
|
|
191
|
+
font-size: 1.8rem;
|
|
192
|
+
font-weight: 800;
|
|
193
|
+
color: #0066cc;
|
|
194
|
+
|
|
195
|
+
@media (max-width: 768px) {
|
|
196
|
+
font-size: 1.5rem;
|
|
197
|
+
}
|
|
198
|
+
`;
|
|
199
|
+
const BookButton = styled.button`
|
|
200
|
+
background: #0066cc;
|
|
201
|
+
color: white;
|
|
202
|
+
border: none;
|
|
203
|
+
padding: 0.7rem 1.5rem;
|
|
204
|
+
border-radius: 8px;
|
|
205
|
+
font-weight: 600;
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
transition: all 0.3s;
|
|
208
|
+
|
|
209
|
+
&:hover {
|
|
210
|
+
background: #0052a3;
|
|
211
|
+
transform: scale(1.05);
|
|
212
|
+
}
|
|
213
|
+
`;
|
|
214
|
+
|
|
215
|
+
/* ====== VARIANT GRADIENT: Card gradien berwarna ====== */
|
|
216
|
+
const GradientCard = styled.div`
|
|
217
|
+
width: 100%;
|
|
218
|
+
max-width: 320px;
|
|
219
|
+
background: ${variantStyles$4.gradient.background};
|
|
220
|
+
border-radius: 24px;
|
|
221
|
+
overflow: visible;
|
|
222
|
+
position: relative;
|
|
223
|
+
box-shadow: 0 15px 45px rgba(245, 87, 108, 0.4);
|
|
224
|
+
transition: all 0.4s ease;
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
|
|
227
|
+
&:hover {
|
|
228
|
+
transform: scale(1.05) rotate(2deg);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media (max-width: 768px) {
|
|
232
|
+
max-width: 100%;
|
|
233
|
+
|
|
234
|
+
&:hover {
|
|
235
|
+
transform: none;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
`;
|
|
239
|
+
const GradientImageWrapper = styled.div`
|
|
240
|
+
padding: 1.5rem 1.5rem 0;
|
|
241
|
+
`;
|
|
242
|
+
const GradientImage = styled.img`
|
|
243
|
+
width: 100%;
|
|
244
|
+
height: 240px;
|
|
245
|
+
object-fit: cover;
|
|
246
|
+
border-radius: 16px;
|
|
247
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
|
|
248
|
+
`;
|
|
249
|
+
const GradientContent = styled.div`
|
|
250
|
+
padding: 1.5rem;
|
|
251
|
+
color: white;
|
|
252
|
+
`;
|
|
253
|
+
const GradientTitle = styled.h3`
|
|
254
|
+
margin: 0 0 0.5rem;
|
|
255
|
+
font-size: 1.6rem;
|
|
256
|
+
font-weight: 800;
|
|
257
|
+
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
258
|
+
`;
|
|
259
|
+
const GradientDescription = styled.p`
|
|
260
|
+
margin: 0.5rem 0 1rem;
|
|
261
|
+
opacity: 0.95;
|
|
262
|
+
font-size: 14px;
|
|
263
|
+
line-height: 1.5;
|
|
264
|
+
`;
|
|
265
|
+
const GradientFooter = styled.div`
|
|
266
|
+
display: flex;
|
|
267
|
+
justify-content: space-between;
|
|
268
|
+
align-items: center;
|
|
269
|
+
`;
|
|
270
|
+
const GradientPrice = styled.div`
|
|
271
|
+
font-size: 2rem;
|
|
272
|
+
font-weight: 900;
|
|
273
|
+
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
274
|
+
|
|
275
|
+
@media (max-width: 768px) {
|
|
276
|
+
font-size: 1.5rem;
|
|
277
|
+
}
|
|
278
|
+
`;
|
|
279
|
+
const GradientRating = styled.div`
|
|
280
|
+
background: rgba(255, 255, 255, 0.25);
|
|
281
|
+
backdrop-filter: blur(10px);
|
|
282
|
+
padding: 0.5rem 1rem;
|
|
283
|
+
border-radius: 20px;
|
|
284
|
+
font-weight: 700;
|
|
285
|
+
display: flex;
|
|
286
|
+
align-items: center;
|
|
287
|
+
gap: 0.3rem;
|
|
288
|
+
`;
|
|
289
|
+
function CardVariant({
|
|
290
|
+
variant = "elevated",
|
|
291
|
+
data
|
|
292
|
+
}) {
|
|
293
|
+
switch (variant) {
|
|
294
|
+
case "elevated":
|
|
295
|
+
return /*#__PURE__*/React.createElement(ElevatedCard, null, /*#__PURE__*/React.createElement(ElevatedImageWrapper, null, /*#__PURE__*/React.createElement(ElevatedImage, {
|
|
296
|
+
src: data.image,
|
|
297
|
+
alt: data.title
|
|
298
|
+
}), /*#__PURE__*/React.createElement(Badge, null, data.badge)), /*#__PURE__*/React.createElement(ElevatedContent, null, /*#__PURE__*/React.createElement(ElevatedTitle, null, data.title), /*#__PURE__*/React.createElement(ElevatedFeatures, null, /*#__PURE__*/React.createElement(Feature, null, /*#__PURE__*/React.createElement(fa.FaBed, null), " Kasur Lembut"), /*#__PURE__*/React.createElement(Feature, null, /*#__PURE__*/React.createElement(fa.FaWifi, null), " WiFi Gratis")), /*#__PURE__*/React.createElement(ElevatedFooter, null, /*#__PURE__*/React.createElement(Price, null, data.price, /*#__PURE__*/React.createElement("span", null, "/malam")), /*#__PURE__*/React.createElement(Rating, null, /*#__PURE__*/React.createElement(fa.FaStar, null), " ", data.rating))));
|
|
299
|
+
case "bordered":
|
|
300
|
+
return /*#__PURE__*/React.createElement(BorderedCard, null, /*#__PURE__*/React.createElement(BorderedContent, null, /*#__PURE__*/React.createElement(BorderedHeader, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BorderedTitle, null, data.title), /*#__PURE__*/React.createElement(BorderedLocation, null, /*#__PURE__*/React.createElement(fa.FaMapMarkerAlt, null), " ", data.location))), /*#__PURE__*/React.createElement(BorderedImage, {
|
|
301
|
+
src: data.image,
|
|
302
|
+
alt: data.title
|
|
303
|
+
}), /*#__PURE__*/React.createElement(BorderedDescription, null, data.description), /*#__PURE__*/React.createElement(BorderedFooter, null, /*#__PURE__*/React.createElement(BorderedPrice, null, data.price), /*#__PURE__*/React.createElement(BookButton, null, "Pesan Sekarang"))));
|
|
304
|
+
case "gradient":
|
|
305
|
+
return /*#__PURE__*/React.createElement(GradientCard, null, /*#__PURE__*/React.createElement(GradientImageWrapper, null, /*#__PURE__*/React.createElement(GradientImage, {
|
|
306
|
+
src: data.image,
|
|
307
|
+
alt: data.title
|
|
308
|
+
})), /*#__PURE__*/React.createElement(GradientContent, null, /*#__PURE__*/React.createElement(GradientTitle, null, data.title), /*#__PURE__*/React.createElement(GradientDescription, null, data.description), /*#__PURE__*/React.createElement(GradientFooter, null, /*#__PURE__*/React.createElement(GradientPrice, null, data.price), /*#__PURE__*/React.createElement(GradientRating, null, "\u2605 ", data.rating))));
|
|
309
|
+
default:
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const variantStyles$3 = {
|
|
315
|
+
solid: {
|
|
316
|
+
background: "#0066cc",
|
|
317
|
+
color: "#fff",
|
|
318
|
+
hover: "#0052a3"
|
|
319
|
+
},
|
|
320
|
+
outline: {
|
|
321
|
+
background: "transparent",
|
|
322
|
+
color: "#0066cc",
|
|
323
|
+
border: "#0066cc",
|
|
324
|
+
hover: "#0066cc"
|
|
325
|
+
},
|
|
326
|
+
pill: {
|
|
327
|
+
background: "linear-gradient(135deg, #0066cc 0%, #004080 100%)",
|
|
328
|
+
color: "#fff"}
|
|
329
|
+
};
|
|
330
|
+
const SolidButton = styled.button`
|
|
331
|
+
display: inline-flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
gap: 0.8rem;
|
|
335
|
+
padding: 1rem 2.2rem;
|
|
336
|
+
font-size: 16px;
|
|
337
|
+
font-weight: 700;
|
|
338
|
+
border-radius: 12px;
|
|
339
|
+
border: none;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
transition: all 0.3s ease;
|
|
342
|
+
font-family: "Poppins", sans-serif;
|
|
343
|
+
background: ${variantStyles$3.solid.background};
|
|
344
|
+
color: ${variantStyles$3.solid.color};
|
|
345
|
+
box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
|
|
346
|
+
text-transform: uppercase;
|
|
347
|
+
letter-spacing: 0.5px;
|
|
348
|
+
|
|
349
|
+
&:hover {
|
|
350
|
+
background: ${variantStyles$3.solid.hover};
|
|
351
|
+
transform: translateY(-3px);
|
|
352
|
+
box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
&:active {
|
|
356
|
+
transform: translateY(-1px);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
svg {
|
|
360
|
+
font-size: 18px;
|
|
361
|
+
transition: transform 0.3s;
|
|
362
|
+
flex-shrink: 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
&:hover svg {
|
|
366
|
+
transform: translateX(5px);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@media (max-width: 768px) {
|
|
370
|
+
padding: 0.8rem 1.5rem;
|
|
371
|
+
font-size: 13px;
|
|
372
|
+
gap: 0.5rem;
|
|
373
|
+
width: 100%;
|
|
374
|
+
|
|
375
|
+
svg {
|
|
376
|
+
font-size: 14px;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
`;
|
|
380
|
+
|
|
381
|
+
/* ====== VARIANT OUTLINE: Tombol dengan border dan efek fill saat hover ====== */
|
|
382
|
+
const OutlineButton = styled.button`
|
|
383
|
+
display: inline-flex;
|
|
384
|
+
align-items: center;
|
|
385
|
+
justify-content: center;
|
|
386
|
+
gap: 0.6rem;
|
|
387
|
+
padding: 0.9rem 2rem;
|
|
388
|
+
font-size: 15px;
|
|
389
|
+
font-weight: 600;
|
|
390
|
+
border-radius: 8px;
|
|
391
|
+
border: 2px solid ${variantStyles$3.outline.border};
|
|
392
|
+
background: ${variantStyles$3.outline.background};
|
|
393
|
+
color: ${variantStyles$3.outline.color};
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
transition: all 0.3s ease;
|
|
396
|
+
font-family: "Inter", sans-serif;
|
|
397
|
+
position: relative;
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
|
|
400
|
+
&::before {
|
|
401
|
+
content: "";
|
|
402
|
+
position: absolute;
|
|
403
|
+
top: 0;
|
|
404
|
+
left: -100%;
|
|
405
|
+
width: 100%;
|
|
406
|
+
height: 100%;
|
|
407
|
+
background: ${variantStyles$3.outline.hover};
|
|
408
|
+
transition: left 0.4s ease;
|
|
409
|
+
z-index: 0;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
&:hover::before {
|
|
413
|
+
left: 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
&:hover {
|
|
417
|
+
color: white;
|
|
418
|
+
border-color: ${variantStyles$3.outline.hover};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
span, svg {
|
|
422
|
+
position: relative;
|
|
423
|
+
z-index: 1;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
svg {
|
|
427
|
+
transition: transform 0.3s;
|
|
428
|
+
flex-shrink: 0;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
&:hover svg {
|
|
432
|
+
transform: scale(1.2);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@media (max-width: 768px) {
|
|
436
|
+
padding: 0.7rem 1.5rem;
|
|
437
|
+
font-size: 13px;
|
|
438
|
+
gap: 0.5rem;
|
|
439
|
+
width: 100%;
|
|
440
|
+
}
|
|
441
|
+
`;
|
|
442
|
+
|
|
443
|
+
/* ====== VARIANT PILL: Tombol bulat dengan gradien ====== */
|
|
444
|
+
const PillButton = styled.button`
|
|
445
|
+
display: inline-flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
justify-content: center;
|
|
448
|
+
gap: 0.7rem;
|
|
449
|
+
padding: 1.1rem 2.5rem;
|
|
450
|
+
font-size: 15px;
|
|
451
|
+
font-weight: 700;
|
|
452
|
+
border-radius: 50px;
|
|
453
|
+
border: none;
|
|
454
|
+
cursor: pointer;
|
|
455
|
+
transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
456
|
+
font-family: "Poppins", sans-serif;
|
|
457
|
+
background: ${variantStyles$3.pill.background};
|
|
458
|
+
color: ${variantStyles$3.pill.color};
|
|
459
|
+
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
|
|
460
|
+
position: relative;
|
|
461
|
+
overflow: hidden;
|
|
462
|
+
|
|
463
|
+
&::after {
|
|
464
|
+
content: "";
|
|
465
|
+
position: absolute;
|
|
466
|
+
top: 50%;
|
|
467
|
+
left: 50%;
|
|
468
|
+
width: 0;
|
|
469
|
+
height: 0;
|
|
470
|
+
border-radius: 50%;
|
|
471
|
+
background: rgba(255, 255, 255, 0.2);
|
|
472
|
+
transform: translate(-50%, -50%);
|
|
473
|
+
transition: width 0.6s, height 0.6s;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
&:hover::after {
|
|
477
|
+
width: 300px;
|
|
478
|
+
height: 300px;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
&:hover {
|
|
482
|
+
transform: scale(1.05);
|
|
483
|
+
box-shadow: 0 12px 35px rgba(0, 102, 204, 0.6);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
span, svg {
|
|
487
|
+
position: relative;
|
|
488
|
+
z-index: 1;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
svg {
|
|
492
|
+
animation: bounce 2s infinite;
|
|
493
|
+
flex-shrink: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
@keyframes bounce {
|
|
497
|
+
0%, 100% { transform: translateY(0); }
|
|
498
|
+
50% { transform: translateY(-5px); }
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
@media (max-width: 768px) {
|
|
502
|
+
padding: 0.9rem 2rem;
|
|
503
|
+
font-size: 13px;
|
|
504
|
+
gap: 0.5rem;
|
|
505
|
+
width: 100%;
|
|
506
|
+
}
|
|
507
|
+
`;
|
|
508
|
+
function ButtonVariant({
|
|
509
|
+
variant = "solid",
|
|
510
|
+
onClick,
|
|
511
|
+
data
|
|
512
|
+
}) {
|
|
513
|
+
switch (variant) {
|
|
514
|
+
case "solid":
|
|
515
|
+
return /*#__PURE__*/React.createElement(SolidButton, {
|
|
516
|
+
onClick: onClick
|
|
517
|
+
}, /*#__PURE__*/React.createElement("span", null, data?.label || "Konfirmasi Pemesanan"), data?.icon || /*#__PURE__*/React.createElement(fa.FaChevronRight, null));
|
|
518
|
+
case "outline":
|
|
519
|
+
return /*#__PURE__*/React.createElement(OutlineButton, {
|
|
520
|
+
onClick: onClick
|
|
521
|
+
}, data?.icon || /*#__PURE__*/React.createElement(fa.FaCheck, null), /*#__PURE__*/React.createElement("span", null, data?.label || "Tambah ke Favorit"));
|
|
522
|
+
case "pill":
|
|
523
|
+
return /*#__PURE__*/React.createElement(PillButton, {
|
|
524
|
+
onClick: onClick
|
|
525
|
+
}, data?.icon || /*#__PURE__*/React.createElement(fa.FaDownload, null), /*#__PURE__*/React.createElement("span", null, data?.label || "Unduh"));
|
|
526
|
+
default:
|
|
527
|
+
return null;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
const variantStyles$2 = {
|
|
532
|
+
modern: {
|
|
533
|
+
background: "linear-gradient(135deg, #0066cc 0%, #003d99 100%)",
|
|
534
|
+
color: "#fff"
|
|
535
|
+
},
|
|
536
|
+
minimal: {
|
|
537
|
+
background: "#ffffff",
|
|
538
|
+
color: "#0066cc",
|
|
539
|
+
border: "1px solid #e1e8ed"
|
|
540
|
+
},
|
|
541
|
+
glassmorphism: {
|
|
542
|
+
background: "rgba(0, 102, 204, 0.15)",
|
|
543
|
+
color: "#fff"}
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
// ====== VARIANT MODERN: Elevated header with icons ======
|
|
547
|
+
const ModernHeader = styled.header`
|
|
548
|
+
display: flex;
|
|
549
|
+
justify-content: space-between;
|
|
550
|
+
align-items: center;
|
|
551
|
+
padding: 1rem 2.5rem;
|
|
552
|
+
background: ${variantStyles$2.modern.background};
|
|
553
|
+
color: ${variantStyles$2.modern.color};
|
|
554
|
+
box-shadow: 0 8px 32px rgba(0, 102, 204, 0.3);
|
|
555
|
+
border-radius: 20px;
|
|
556
|
+
margin-bottom: 1.5rem;
|
|
557
|
+
font-family: "Poppins", sans-serif;
|
|
558
|
+
max-width: 100%;
|
|
559
|
+
box-sizing: border-box;
|
|
560
|
+
|
|
561
|
+
@media (max-width: 768px) {
|
|
562
|
+
flex-direction: row;
|
|
563
|
+
gap: 0.5rem;
|
|
564
|
+
padding: 0.6rem 0.8rem;
|
|
565
|
+
border-radius: 12px;
|
|
566
|
+
}
|
|
567
|
+
`;
|
|
568
|
+
const ModernLogo = styled.div`
|
|
569
|
+
font-size: 1.6rem;
|
|
570
|
+
font-weight: 800;
|
|
571
|
+
letter-spacing: -1px;
|
|
572
|
+
display: flex;
|
|
573
|
+
align-items: center;
|
|
574
|
+
gap: 0.5rem;
|
|
575
|
+
|
|
576
|
+
&::before {
|
|
577
|
+
content: "🏨";
|
|
578
|
+
font-size: 2rem;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
@media (max-width: 768px) {
|
|
582
|
+
font-size: 1rem;
|
|
583
|
+
gap: 0.3rem;
|
|
584
|
+
|
|
585
|
+
&::before {
|
|
586
|
+
font-size: 1.2rem;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
`;
|
|
590
|
+
const ModernNav = styled.nav`
|
|
591
|
+
display: flex;
|
|
592
|
+
gap: 2rem;
|
|
593
|
+
align-items: center;
|
|
594
|
+
|
|
595
|
+
@media (max-width: 768px) {
|
|
596
|
+
display: none;
|
|
597
|
+
}
|
|
598
|
+
`;
|
|
599
|
+
const ModernLink = styled.a`
|
|
600
|
+
color: inherit;
|
|
601
|
+
text-decoration: none;
|
|
602
|
+
font-weight: 500;
|
|
603
|
+
font-size: 15px;
|
|
604
|
+
position: relative;
|
|
605
|
+
transition: all 0.3s;
|
|
606
|
+
|
|
607
|
+
&::after {
|
|
608
|
+
content: "";
|
|
609
|
+
position: absolute;
|
|
610
|
+
bottom: -5px;
|
|
611
|
+
left: 0;
|
|
612
|
+
width: 0;
|
|
613
|
+
height: 3px;
|
|
614
|
+
background: white;
|
|
615
|
+
transition: width 0.3s;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
&:hover::after {
|
|
619
|
+
width: 100%;
|
|
620
|
+
}
|
|
621
|
+
`;
|
|
622
|
+
const IconButton = styled.button`
|
|
623
|
+
background: rgba(255, 255, 255, 0.2);
|
|
624
|
+
border: none;
|
|
625
|
+
color: white;
|
|
626
|
+
width: 40px;
|
|
627
|
+
height: 40px;
|
|
628
|
+
border-radius: 50%;
|
|
629
|
+
display: flex;
|
|
630
|
+
align-items: center;
|
|
631
|
+
justify-content: center;
|
|
632
|
+
cursor: pointer;
|
|
633
|
+
transition: all 0.3s;
|
|
634
|
+
|
|
635
|
+
&:hover {
|
|
636
|
+
background: rgba(255, 255, 255, 0.3);
|
|
637
|
+
transform: scale(1.1);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
@media (max-width: 768px) {
|
|
641
|
+
width: 28px;
|
|
642
|
+
height: 28px;
|
|
643
|
+
|
|
644
|
+
svg {
|
|
645
|
+
font-size: 11px;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
`;
|
|
649
|
+
const IconGroup = styled.div`
|
|
650
|
+
display: flex;
|
|
651
|
+
gap: 0.8rem;
|
|
652
|
+
|
|
653
|
+
@media (max-width: 768px) {
|
|
654
|
+
gap: 0.3rem;
|
|
655
|
+
}
|
|
656
|
+
`;
|
|
657
|
+
|
|
658
|
+
// ====== VARIANT MINIMAL: Clean centered header ======
|
|
659
|
+
const MinimalHeader = styled.header`
|
|
660
|
+
background: ${variantStyles$2.minimal.background};
|
|
661
|
+
color: ${variantStyles$2.minimal.color};
|
|
662
|
+
border: ${variantStyles$2.minimal.border};
|
|
663
|
+
padding: 1.5rem 2rem;
|
|
664
|
+
border-radius: 0;
|
|
665
|
+
border-left: none;
|
|
666
|
+
border-right: none;
|
|
667
|
+
margin-bottom: 1.5rem;
|
|
668
|
+
font-family: "Inter", sans-serif;
|
|
669
|
+
max-width: 100%;
|
|
670
|
+
box-sizing: border-box;
|
|
671
|
+
|
|
672
|
+
@media (max-width: 768px) {
|
|
673
|
+
padding: 0.6rem 0.8rem;
|
|
674
|
+
}
|
|
675
|
+
`;
|
|
676
|
+
const MinimalContainer = styled.div`
|
|
677
|
+
max-width: 1200px;
|
|
678
|
+
margin: 0 auto;
|
|
679
|
+
display: flex;
|
|
680
|
+
justify-content: space-between;
|
|
681
|
+
align-items: center;
|
|
682
|
+
`;
|
|
683
|
+
const MinimalLogo = styled.div`
|
|
684
|
+
font-size: 1.3rem;
|
|
685
|
+
font-weight: 700;
|
|
686
|
+
color: #2c3e50;
|
|
687
|
+
text-transform: uppercase;
|
|
688
|
+
letter-spacing: 2px;
|
|
689
|
+
|
|
690
|
+
@media (max-width: 768px) {
|
|
691
|
+
font-size: 0.9rem;
|
|
692
|
+
letter-spacing: 1px;
|
|
693
|
+
}
|
|
694
|
+
`;
|
|
695
|
+
const MinimalNav = styled.nav`
|
|
696
|
+
display: flex;
|
|
697
|
+
gap: 3rem;
|
|
698
|
+
|
|
699
|
+
@media (max-width: 768px) {
|
|
700
|
+
display: none;
|
|
701
|
+
}
|
|
702
|
+
`;
|
|
703
|
+
const MinimalLink = styled.a`
|
|
704
|
+
color: #7f8c8d;
|
|
705
|
+
text-decoration: none;
|
|
706
|
+
font-weight: 500;
|
|
707
|
+
font-size: 14px;
|
|
708
|
+
text-transform: uppercase;
|
|
709
|
+
letter-spacing: 1px;
|
|
710
|
+
transition: color 0.3s;
|
|
711
|
+
|
|
712
|
+
&:hover {
|
|
713
|
+
color: #2c3e50;
|
|
714
|
+
}
|
|
715
|
+
`;
|
|
716
|
+
const MinimalButton = styled.button`
|
|
717
|
+
background: #0066cc;
|
|
718
|
+
color: white;
|
|
719
|
+
border: none;
|
|
720
|
+
padding: 0.7rem 1.8rem;
|
|
721
|
+
border-radius: 25px;
|
|
722
|
+
font-weight: 600;
|
|
723
|
+
cursor: pointer;
|
|
724
|
+
transition: all 0.3s;
|
|
725
|
+
font-size: 14px;
|
|
726
|
+
|
|
727
|
+
&:hover {
|
|
728
|
+
background: #0052a3;
|
|
729
|
+
transform: translateY(-2px);
|
|
730
|
+
box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
@media (max-width: 768px) {
|
|
734
|
+
padding: 0.4rem 0.8rem;
|
|
735
|
+
font-size: 10px;
|
|
736
|
+
}
|
|
737
|
+
`;
|
|
738
|
+
const MinimalMobileMenu = styled.button`
|
|
739
|
+
display: none;
|
|
740
|
+
background: #f0f4f8;
|
|
741
|
+
border: none;
|
|
742
|
+
color: #2c3e50;
|
|
743
|
+
width: 32px;
|
|
744
|
+
height: 32px;
|
|
745
|
+
border-radius: 6px;
|
|
746
|
+
align-items: center;
|
|
747
|
+
justify-content: center;
|
|
748
|
+
cursor: pointer;
|
|
749
|
+
transition: all 0.3s;
|
|
750
|
+
|
|
751
|
+
&:hover {
|
|
752
|
+
background: #e2e8f0;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
@media (max-width: 768px) {
|
|
756
|
+
display: flex;
|
|
757
|
+
}
|
|
758
|
+
`;
|
|
759
|
+
const MinimalActions = styled.div`
|
|
760
|
+
display: flex;
|
|
761
|
+
align-items: center;
|
|
762
|
+
gap: 0.5rem;
|
|
763
|
+
`;
|
|
764
|
+
|
|
765
|
+
// ====== VARIANT GLASSMORPHISM: Glass effect with backdrop blur ======
|
|
766
|
+
const GlassHeader = styled.header`
|
|
767
|
+
background: ${variantStyles$2.glassmorphism.background};
|
|
768
|
+
backdrop-filter: blur(10px);
|
|
769
|
+
-webkit-backdrop-filter: blur(10px);
|
|
770
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
771
|
+
color: ${variantStyles$2.glassmorphism.color};
|
|
772
|
+
padding: 1.2rem 2rem;
|
|
773
|
+
border-radius: 16px;
|
|
774
|
+
margin-bottom: 1.5rem;
|
|
775
|
+
font-family: "Poppins", sans-serif;
|
|
776
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
777
|
+
display: flex;
|
|
778
|
+
justify-content: space-between;
|
|
779
|
+
align-items: center;
|
|
780
|
+
max-width: 100%;
|
|
781
|
+
box-sizing: border-box;
|
|
782
|
+
|
|
783
|
+
@media (max-width: 768px) {
|
|
784
|
+
padding: 0.6rem 0.8rem;
|
|
785
|
+
border-radius: 12px;
|
|
786
|
+
}
|
|
787
|
+
`;
|
|
788
|
+
const GlassLogo = styled.div`
|
|
789
|
+
font-size: 1.5rem;
|
|
790
|
+
font-weight: 700;
|
|
791
|
+
background: linear-gradient(135deg, #fff, #a8edea);
|
|
792
|
+
-webkit-background-clip: text;
|
|
793
|
+
-webkit-text-fill-color: transparent;
|
|
794
|
+
background-clip: text;
|
|
795
|
+
|
|
796
|
+
@media (max-width: 768px) {
|
|
797
|
+
font-size: 0.9rem;
|
|
798
|
+
}
|
|
799
|
+
`;
|
|
800
|
+
const GlassNav = styled.nav`
|
|
801
|
+
display: flex;
|
|
802
|
+
gap: 1.5rem;
|
|
803
|
+
align-items: center;
|
|
804
|
+
|
|
805
|
+
@media (max-width: 768px) {
|
|
806
|
+
display: none;
|
|
807
|
+
}
|
|
808
|
+
`;
|
|
809
|
+
const GlassLink = styled.a`
|
|
810
|
+
color: rgba(255, 255, 255, 0.9);
|
|
811
|
+
text-decoration: none;
|
|
812
|
+
font-weight: 500;
|
|
813
|
+
padding: 0.5rem 1rem;
|
|
814
|
+
border-radius: 8px;
|
|
815
|
+
transition: all 0.3s;
|
|
816
|
+
|
|
817
|
+
&:hover {
|
|
818
|
+
background: rgba(255, 255, 255, 0.15);
|
|
819
|
+
}
|
|
820
|
+
`;
|
|
821
|
+
const GlassSearch = styled.div`
|
|
822
|
+
display: flex;
|
|
823
|
+
align-items: center;
|
|
824
|
+
background: rgba(255, 255, 255, 0.1);
|
|
825
|
+
border-radius: 25px;
|
|
826
|
+
padding: 0.5rem 1.2rem;
|
|
827
|
+
gap: 0.5rem;
|
|
828
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
829
|
+
|
|
830
|
+
input {
|
|
831
|
+
background: transparent;
|
|
832
|
+
border: none;
|
|
833
|
+
outline: none;
|
|
834
|
+
color: white;
|
|
835
|
+
font-size: 14px;
|
|
836
|
+
|
|
837
|
+
&::placeholder {
|
|
838
|
+
color: rgba(255, 255, 255, 0.6);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
@media (max-width: 768px) {
|
|
843
|
+
display: none;
|
|
844
|
+
}
|
|
845
|
+
`;
|
|
846
|
+
const GlassMobileNav = styled.nav`
|
|
847
|
+
display: none;
|
|
848
|
+
|
|
849
|
+
@media (max-width: 768px) {
|
|
850
|
+
display: flex;
|
|
851
|
+
gap: 0.3rem;
|
|
852
|
+
align-items: center;
|
|
853
|
+
}
|
|
854
|
+
`;
|
|
855
|
+
const GlassMobileLink = styled.a`
|
|
856
|
+
color: rgba(255, 255, 255, 0.9);
|
|
857
|
+
text-decoration: none;
|
|
858
|
+
font-weight: 500;
|
|
859
|
+
font-size: 9px;
|
|
860
|
+
padding: 0.25rem 0.4rem;
|
|
861
|
+
border-radius: 4px;
|
|
862
|
+
background: rgba(255, 255, 255, 0.1);
|
|
863
|
+
transition: all 0.3s;
|
|
864
|
+
|
|
865
|
+
&:hover {
|
|
866
|
+
background: rgba(255, 255, 255, 0.2);
|
|
867
|
+
}
|
|
868
|
+
`;
|
|
869
|
+
|
|
870
|
+
// Helper function to normalize links (support both string and { label, href } format)
|
|
871
|
+
const normalizeLink$1 = link => {
|
|
872
|
+
if (typeof link === 'string') {
|
|
873
|
+
return {
|
|
874
|
+
label: link,
|
|
875
|
+
href: '#'
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
return {
|
|
879
|
+
label: link.label,
|
|
880
|
+
href: link.href || '#'
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
function HeaderVariant({
|
|
884
|
+
variant = "modern",
|
|
885
|
+
data
|
|
886
|
+
}) {
|
|
887
|
+
const defaultData = {
|
|
888
|
+
modern: {
|
|
889
|
+
logo: "ResortHub",
|
|
890
|
+
links: ["Beranda", "Kamar", "Fasilitas", "Hubungi"]
|
|
891
|
+
},
|
|
892
|
+
minimal: {
|
|
893
|
+
logo: "RESORT",
|
|
894
|
+
links: ["Beranda", "Kamar", "Tentang", "Hubungi"],
|
|
895
|
+
buttonText: "Pesan Sekarang"
|
|
896
|
+
},
|
|
897
|
+
glassmorphism: {
|
|
898
|
+
logo: "✦ Resort Surgawi",
|
|
899
|
+
links: ["Beranda", "Jelajahi", "Layanan"],
|
|
900
|
+
searchPlaceholder: "Cari..."
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
const headerData = data || defaultData[variant];
|
|
904
|
+
switch (variant) {
|
|
905
|
+
case "modern":
|
|
906
|
+
return /*#__PURE__*/React.createElement(ModernHeader, null, /*#__PURE__*/React.createElement(ModernLogo, null, headerData.logo), /*#__PURE__*/React.createElement(ModernNav, null, headerData.links.map((link, idx) => {
|
|
907
|
+
const {
|
|
908
|
+
label,
|
|
909
|
+
href
|
|
910
|
+
} = normalizeLink$1(link);
|
|
911
|
+
return /*#__PURE__*/React.createElement(ModernLink, {
|
|
912
|
+
key: idx,
|
|
913
|
+
href: href
|
|
914
|
+
}, label);
|
|
915
|
+
})), /*#__PURE__*/React.createElement(IconGroup, null, /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(fa.FaSearch, null)), /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(fa.FaBell, null)), /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(fa.FaBars, null))));
|
|
916
|
+
case "minimal":
|
|
917
|
+
return /*#__PURE__*/React.createElement(MinimalHeader, null, /*#__PURE__*/React.createElement(MinimalContainer, null, /*#__PURE__*/React.createElement(MinimalLogo, null, headerData.logo), /*#__PURE__*/React.createElement(MinimalNav, null, headerData.links.map((link, idx) => {
|
|
918
|
+
const {
|
|
919
|
+
label,
|
|
920
|
+
href
|
|
921
|
+
} = normalizeLink$1(link);
|
|
922
|
+
return /*#__PURE__*/React.createElement(MinimalLink, {
|
|
923
|
+
key: idx,
|
|
924
|
+
href: href
|
|
925
|
+
}, label);
|
|
926
|
+
})), /*#__PURE__*/React.createElement(MinimalActions, null, /*#__PURE__*/React.createElement(MinimalButton, null, headerData.buttonText), /*#__PURE__*/React.createElement(MinimalMobileMenu, null, /*#__PURE__*/React.createElement(fa.FaBars, null)))));
|
|
927
|
+
case "glassmorphism":
|
|
928
|
+
return /*#__PURE__*/React.createElement(GlassHeader, null, /*#__PURE__*/React.createElement(GlassLogo, null, headerData.logo), /*#__PURE__*/React.createElement(GlassNav, null, headerData.links.map((link, idx) => {
|
|
929
|
+
const {
|
|
930
|
+
label,
|
|
931
|
+
href
|
|
932
|
+
} = normalizeLink$1(link);
|
|
933
|
+
return /*#__PURE__*/React.createElement(GlassLink, {
|
|
934
|
+
key: idx,
|
|
935
|
+
href: href
|
|
936
|
+
}, label);
|
|
937
|
+
}), /*#__PURE__*/React.createElement(GlassSearch, null, /*#__PURE__*/React.createElement(fa.FaSearch, {
|
|
938
|
+
size: 14
|
|
939
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
940
|
+
type: "text",
|
|
941
|
+
placeholder: headerData.searchPlaceholder
|
|
942
|
+
}))), /*#__PURE__*/React.createElement(GlassMobileNav, null, headerData.links.map((link, idx) => {
|
|
943
|
+
const {
|
|
944
|
+
label,
|
|
945
|
+
href
|
|
946
|
+
} = normalizeLink$1(link);
|
|
947
|
+
return /*#__PURE__*/React.createElement(GlassMobileLink, {
|
|
948
|
+
key: idx,
|
|
949
|
+
href: href
|
|
950
|
+
}, label);
|
|
951
|
+
})));
|
|
952
|
+
default:
|
|
953
|
+
return null;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
const variantStyles$1 = {
|
|
958
|
+
stacked: {
|
|
959
|
+
background: "#0a2e5a",
|
|
960
|
+
color: "#ecf0f1"
|
|
961
|
+
},
|
|
962
|
+
columns: {
|
|
963
|
+
background: "linear-gradient(135deg, #0066cc 0%, #004080 100%)",
|
|
964
|
+
color: "#fff"
|
|
965
|
+
},
|
|
966
|
+
centered: {
|
|
967
|
+
background: "#0a2e5a",
|
|
968
|
+
color: "#eee"
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
/* ====== VARIANT STACKED: Vertical sections ====== */
|
|
973
|
+
const StackedFooter = styled.footer`
|
|
974
|
+
background: ${variantStyles$1.stacked.background};
|
|
975
|
+
color: ${variantStyles$1.stacked.color};
|
|
976
|
+
padding: 3rem 2rem 1.5rem;
|
|
977
|
+
font-family: "Inter", sans-serif;
|
|
978
|
+
border-top: 4px solid #0066cc;
|
|
979
|
+
max-width: 100%;
|
|
980
|
+
box-sizing: border-box;
|
|
981
|
+
overflow-x: hidden;
|
|
982
|
+
|
|
983
|
+
@media (max-width: 768px) {
|
|
984
|
+
padding: 1rem 0.5rem 0.8rem;
|
|
985
|
+
}
|
|
986
|
+
`;
|
|
987
|
+
const StackedSection = styled.div`
|
|
988
|
+
max-width: 1200px;
|
|
989
|
+
margin: 0 auto 2rem;
|
|
990
|
+
padding-bottom: 2rem;
|
|
991
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
992
|
+
|
|
993
|
+
@media (max-width: 768px) {
|
|
994
|
+
margin: 0 auto 1rem;
|
|
995
|
+
padding-bottom: 1rem;
|
|
996
|
+
}
|
|
997
|
+
`;
|
|
998
|
+
const StackedBrand = styled.div`
|
|
999
|
+
margin-bottom: 1.5rem;
|
|
1000
|
+
|
|
1001
|
+
h2 {
|
|
1002
|
+
font-size: 2rem;
|
|
1003
|
+
font-weight: 800;
|
|
1004
|
+
margin: 0 0 0.5rem;
|
|
1005
|
+
color: #3498db;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
p {
|
|
1009
|
+
margin: 0;
|
|
1010
|
+
opacity: 0.8;
|
|
1011
|
+
font-size: 14px;
|
|
1012
|
+
max-width: 400px;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
@media (max-width: 768px) {
|
|
1016
|
+
text-align: center;
|
|
1017
|
+
margin-bottom: 1rem;
|
|
1018
|
+
|
|
1019
|
+
h2 {
|
|
1020
|
+
font-size: 1.3rem;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
p {
|
|
1024
|
+
max-width: 100%;
|
|
1025
|
+
font-size: 12px;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
`;
|
|
1029
|
+
const StackedLinks = styled.div`
|
|
1030
|
+
display: grid;
|
|
1031
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
1032
|
+
gap: 2rem;
|
|
1033
|
+
margin: 2rem 0;
|
|
1034
|
+
|
|
1035
|
+
@media (max-width: 576px) {
|
|
1036
|
+
grid-template-columns: repeat(3, 1fr);
|
|
1037
|
+
gap: 0.5rem;
|
|
1038
|
+
margin: 1rem 0;
|
|
1039
|
+
text-align: center;
|
|
1040
|
+
justify-items: center;
|
|
1041
|
+
}
|
|
1042
|
+
`;
|
|
1043
|
+
const LinkGroup = styled.div`
|
|
1044
|
+
h4 {
|
|
1045
|
+
font-size: 1rem;
|
|
1046
|
+
font-weight: 700;
|
|
1047
|
+
margin: 0 0 1rem;
|
|
1048
|
+
text-transform: uppercase;
|
|
1049
|
+
letter-spacing: 1px;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
a {
|
|
1053
|
+
display: block;
|
|
1054
|
+
color: inherit;
|
|
1055
|
+
text-decoration: none;
|
|
1056
|
+
margin: 0.6rem 0;
|
|
1057
|
+
opacity: 0.8;
|
|
1058
|
+
font-size: 14px;
|
|
1059
|
+
transition: all 0.3s;
|
|
1060
|
+
|
|
1061
|
+
&:hover {
|
|
1062
|
+
opacity: 1;
|
|
1063
|
+
padding-left: 5px;
|
|
1064
|
+
color: #3498db;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
@media (max-width: 576px) {
|
|
1069
|
+
h4 {
|
|
1070
|
+
font-size: 0.75rem;
|
|
1071
|
+
margin: 0 0 0.5rem;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
a {
|
|
1075
|
+
margin: 0.3rem 0;
|
|
1076
|
+
font-size: 11px;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
`;
|
|
1080
|
+
const StackedBottom = styled.div`
|
|
1081
|
+
max-width: 1200px;
|
|
1082
|
+
margin: 0 auto;
|
|
1083
|
+
display: flex;
|
|
1084
|
+
justify-content: space-between;
|
|
1085
|
+
align-items: center;
|
|
1086
|
+
padding-top: 1.5rem;
|
|
1087
|
+
font-size: 13px;
|
|
1088
|
+
opacity: 0.7;
|
|
1089
|
+
|
|
1090
|
+
@media (max-width: 768px) {
|
|
1091
|
+
flex-direction: column;
|
|
1092
|
+
gap: 0.8rem;
|
|
1093
|
+
text-align: center;
|
|
1094
|
+
font-size: 10px;
|
|
1095
|
+
padding-top: 1rem;
|
|
1096
|
+
}
|
|
1097
|
+
`;
|
|
1098
|
+
const SocialIcons = styled.div`
|
|
1099
|
+
display: flex;
|
|
1100
|
+
gap: 1rem;
|
|
1101
|
+
|
|
1102
|
+
a {
|
|
1103
|
+
color: inherit;
|
|
1104
|
+
width: 36px;
|
|
1105
|
+
height: 36px;
|
|
1106
|
+
display: flex;
|
|
1107
|
+
align-items: center;
|
|
1108
|
+
justify-content: center;
|
|
1109
|
+
border-radius: 50%;
|
|
1110
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1111
|
+
transition: all 0.3s;
|
|
1112
|
+
|
|
1113
|
+
&:hover {
|
|
1114
|
+
background: #3498db;
|
|
1115
|
+
transform: translateY(-3px);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
@media (max-width: 576px) {
|
|
1120
|
+
gap: 0.5rem;
|
|
1121
|
+
|
|
1122
|
+
a {
|
|
1123
|
+
width: 28px;
|
|
1124
|
+
height: 28px;
|
|
1125
|
+
font-size: 12px;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
`;
|
|
1129
|
+
|
|
1130
|
+
/* ====== VARIANT COLUMNS: Multi-column layout ====== */
|
|
1131
|
+
const ColumnsFooter = styled.footer`
|
|
1132
|
+
background: ${variantStyles$1.columns.background};
|
|
1133
|
+
color: ${variantStyles$1.columns.color};
|
|
1134
|
+
padding: 4rem 3rem 2rem;
|
|
1135
|
+
font-family: "Poppins", sans-serif;
|
|
1136
|
+
max-width: 100%;
|
|
1137
|
+
box-sizing: border-box;
|
|
1138
|
+
overflow-x: hidden;
|
|
1139
|
+
|
|
1140
|
+
@media (max-width: 768px) {
|
|
1141
|
+
padding: 1rem 0.5rem 0.8rem;
|
|
1142
|
+
}
|
|
1143
|
+
`;
|
|
1144
|
+
const ColumnsGrid = styled.div`
|
|
1145
|
+
max-width: 1200px;
|
|
1146
|
+
margin: 0 auto;
|
|
1147
|
+
display: grid;
|
|
1148
|
+
grid-template-columns: 2fr 1fr 1fr 1fr;
|
|
1149
|
+
gap: 3rem;
|
|
1150
|
+
margin-bottom: 3rem;
|
|
1151
|
+
|
|
1152
|
+
@media (max-width: 968px) {
|
|
1153
|
+
grid-template-columns: 1fr 1fr;
|
|
1154
|
+
gap: 2rem;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
@media (max-width: 576px) {
|
|
1158
|
+
grid-template-columns: 1fr 1fr;
|
|
1159
|
+
gap: 1rem;
|
|
1160
|
+
margin-bottom: 1.5rem;
|
|
1161
|
+
}
|
|
1162
|
+
`;
|
|
1163
|
+
const ColumnBox = styled.div`
|
|
1164
|
+
h3 {
|
|
1165
|
+
font-size: 1.2rem;
|
|
1166
|
+
font-weight: 700;
|
|
1167
|
+
margin: 0 0 1.5rem;
|
|
1168
|
+
position: relative;
|
|
1169
|
+
padding-bottom: 0.8rem;
|
|
1170
|
+
|
|
1171
|
+
&::after {
|
|
1172
|
+
content: "";
|
|
1173
|
+
position: absolute;
|
|
1174
|
+
bottom: 0;
|
|
1175
|
+
left: 0;
|
|
1176
|
+
width: 50px;
|
|
1177
|
+
height: 3px;
|
|
1178
|
+
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
p {
|
|
1183
|
+
margin: 0.8rem 0;
|
|
1184
|
+
opacity: 0.85;
|
|
1185
|
+
font-size: 14px;
|
|
1186
|
+
line-height: 1.7;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
a {
|
|
1190
|
+
display: block;
|
|
1191
|
+
color: inherit;
|
|
1192
|
+
text-decoration: none;
|
|
1193
|
+
margin: 0.7rem 0;
|
|
1194
|
+
opacity: 0.8;
|
|
1195
|
+
font-size: 14px;
|
|
1196
|
+
transition: all 0.3s;
|
|
1197
|
+
|
|
1198
|
+
&:hover {
|
|
1199
|
+
opacity: 1;
|
|
1200
|
+
color: #667eea;
|
|
1201
|
+
transform: translateX(5px);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
@media (max-width: 576px) {
|
|
1206
|
+
h3 {
|
|
1207
|
+
font-size: 0.9rem;
|
|
1208
|
+
margin: 0 0 0.8rem;
|
|
1209
|
+
padding-bottom: 0.5rem;
|
|
1210
|
+
|
|
1211
|
+
&::after {
|
|
1212
|
+
width: 30px;
|
|
1213
|
+
height: 2px;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
p {
|
|
1218
|
+
font-size: 11px;
|
|
1219
|
+
margin: 0.4rem 0;
|
|
1220
|
+
line-height: 1.5;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
a {
|
|
1224
|
+
font-size: 11px;
|
|
1225
|
+
margin: 0.4rem 0;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
`;
|
|
1229
|
+
const ContactItem = styled.div`
|
|
1230
|
+
display: flex;
|
|
1231
|
+
align-items: center;
|
|
1232
|
+
gap: 0.8rem;
|
|
1233
|
+
margin: 1rem 0;
|
|
1234
|
+
font-size: 14px;
|
|
1235
|
+
|
|
1236
|
+
svg {
|
|
1237
|
+
color: #667eea;
|
|
1238
|
+
font-size: 16px;
|
|
1239
|
+
}
|
|
1240
|
+
`;
|
|
1241
|
+
const ColumnsDivider = styled.div`
|
|
1242
|
+
max-width: 1200px;
|
|
1243
|
+
margin: 0 auto;
|
|
1244
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
1245
|
+
padding-top: 2rem;
|
|
1246
|
+
display: flex;
|
|
1247
|
+
justify-content: space-between;
|
|
1248
|
+
align-items: center;
|
|
1249
|
+
font-size: 13px;
|
|
1250
|
+
opacity: 0.7;
|
|
1251
|
+
|
|
1252
|
+
@media (max-width: 768px) {
|
|
1253
|
+
flex-direction: column;
|
|
1254
|
+
gap: 1rem;
|
|
1255
|
+
text-align: center;
|
|
1256
|
+
}
|
|
1257
|
+
`;
|
|
1258
|
+
|
|
1259
|
+
/* ====== VARIANT CENTERED: Center-aligned footer ====== */
|
|
1260
|
+
const CenteredFooter = styled.footer`
|
|
1261
|
+
background: ${variantStyles$1.centered.background};
|
|
1262
|
+
color: ${variantStyles$1.centered.color};
|
|
1263
|
+
padding: 3rem 2rem;
|
|
1264
|
+
font-family: "Poppins", sans-serif;
|
|
1265
|
+
text-align: center;
|
|
1266
|
+
max-width: 100%;
|
|
1267
|
+
box-sizing: border-box;
|
|
1268
|
+
overflow-x: hidden;
|
|
1269
|
+
|
|
1270
|
+
@media (max-width: 768px) {
|
|
1271
|
+
padding: 1.5rem 0.5rem;
|
|
1272
|
+
}
|
|
1273
|
+
`;
|
|
1274
|
+
const CenteredContent = styled.div`
|
|
1275
|
+
max-width: 800px;
|
|
1276
|
+
margin: 0 auto;
|
|
1277
|
+
`;
|
|
1278
|
+
const CenteredLogo = styled.div`
|
|
1279
|
+
font-size: 2.5rem;
|
|
1280
|
+
font-weight: 900;
|
|
1281
|
+
margin-bottom: 1rem;
|
|
1282
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1283
|
+
-webkit-background-clip: text;
|
|
1284
|
+
-webkit-text-fill-color: transparent;
|
|
1285
|
+
background-clip: text;
|
|
1286
|
+
`;
|
|
1287
|
+
const CenteredTagline = styled.p`
|
|
1288
|
+
font-size: 16px;
|
|
1289
|
+
opacity: 0.8;
|
|
1290
|
+
margin: 1rem 0 2rem;
|
|
1291
|
+
line-height: 1.6;
|
|
1292
|
+
`;
|
|
1293
|
+
const CenteredNav = styled.nav`
|
|
1294
|
+
display: flex;
|
|
1295
|
+
justify-content: center;
|
|
1296
|
+
gap: 2rem;
|
|
1297
|
+
margin: 2rem 0;
|
|
1298
|
+
flex-wrap: wrap;
|
|
1299
|
+
|
|
1300
|
+
a {
|
|
1301
|
+
color: inherit;
|
|
1302
|
+
text-decoration: none;
|
|
1303
|
+
font-weight: 500;
|
|
1304
|
+
font-size: 15px;
|
|
1305
|
+
transition: all 0.3s;
|
|
1306
|
+
|
|
1307
|
+
&:hover {
|
|
1308
|
+
color: #667eea;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
`;
|
|
1312
|
+
const CenteredSocial = styled.div`
|
|
1313
|
+
display: flex;
|
|
1314
|
+
justify-content: center;
|
|
1315
|
+
gap: 1.5rem;
|
|
1316
|
+
margin: 2.5rem 0;
|
|
1317
|
+
|
|
1318
|
+
a {
|
|
1319
|
+
color: inherit;
|
|
1320
|
+
width: 45px;
|
|
1321
|
+
height: 45px;
|
|
1322
|
+
display: flex;
|
|
1323
|
+
align-items: center;
|
|
1324
|
+
justify-content: center;
|
|
1325
|
+
border-radius: 50%;
|
|
1326
|
+
border: 2px solid rgba(255, 255, 255, 0.2);
|
|
1327
|
+
transition: all 0.3s;
|
|
1328
|
+
font-size: 18px;
|
|
1329
|
+
|
|
1330
|
+
&:hover {
|
|
1331
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1332
|
+
border-color: transparent;
|
|
1333
|
+
transform: scale(1.1);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
`;
|
|
1337
|
+
const CenteredCopyright = styled.div`
|
|
1338
|
+
margin-top: 2rem;
|
|
1339
|
+
padding-top: 2rem;
|
|
1340
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
1341
|
+
font-size: 13px;
|
|
1342
|
+
opacity: 0.6;
|
|
1343
|
+
`;
|
|
1344
|
+
|
|
1345
|
+
// Helper function to normalize links (support both string and { label, href } format)
|
|
1346
|
+
const normalizeLink = link => {
|
|
1347
|
+
if (typeof link === 'string') {
|
|
1348
|
+
return {
|
|
1349
|
+
label: link,
|
|
1350
|
+
href: '#'
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
return {
|
|
1354
|
+
label: link.label,
|
|
1355
|
+
href: link.href || '#'
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
function FooterVariant({
|
|
1359
|
+
variant = "stacked",
|
|
1360
|
+
data
|
|
1361
|
+
}) {
|
|
1362
|
+
const defaultData = {
|
|
1363
|
+
stacked: {
|
|
1364
|
+
brandName: "Paradise Resort",
|
|
1365
|
+
brandDesc: "Rasakan kemewahan dan kenyamanan di jantung surga. Liburan impian Anda menanti.",
|
|
1366
|
+
linkGroups: [{
|
|
1367
|
+
title: "Tautan Cepat",
|
|
1368
|
+
links: ["Beranda", "Kamar", "Fasilitas", "Galeri"]
|
|
1369
|
+
}, {
|
|
1370
|
+
title: "Layanan",
|
|
1371
|
+
links: ["Spa & Wellness", "Restoran", "Bar Kolam", "Aktivitas"]
|
|
1372
|
+
}, {
|
|
1373
|
+
title: "Bantuan",
|
|
1374
|
+
links: ["Hubungi Kami", "FAQ", "Kebijakan Privasi", "Syarat & Ketentuan"]
|
|
1375
|
+
}],
|
|
1376
|
+
copyright: "© 2025 Paradise Resort. Hak cipta dilindungi."
|
|
1377
|
+
},
|
|
1378
|
+
columns: {
|
|
1379
|
+
aboutTitle: "Tentang Resort",
|
|
1380
|
+
aboutDesc: "Resort tepi pantai premium yang menawarkan fasilitas kelas dunia, layanan luar biasa, dan pengalaman tak terlupakan untuk semua tamu.",
|
|
1381
|
+
phone: "+62 (555) 123-4567",
|
|
1382
|
+
email: "info@paradiseresort.com",
|
|
1383
|
+
address: "Jl. Pantai No. 123, Pulau Tropis",
|
|
1384
|
+
columns: [{
|
|
1385
|
+
title: "Jelajahi",
|
|
1386
|
+
links: ["Akomodasi", "Kuliner", "Acara", "Pernikahan", "Penawaran"]
|
|
1387
|
+
}, {
|
|
1388
|
+
title: "Kebijakan",
|
|
1389
|
+
links: ["Kebijakan Pemesanan", "Pembatalan", "Privasi", "Syarat & Ketentuan", "Peta Situs"]
|
|
1390
|
+
}, {
|
|
1391
|
+
title: "Newsletter",
|
|
1392
|
+
desc: "Berlangganan untuk penawaran eksklusif dan info terbaru"
|
|
1393
|
+
}]
|
|
1394
|
+
},
|
|
1395
|
+
centered: {
|
|
1396
|
+
logo: "✦ PARADISE ✦",
|
|
1397
|
+
tagline: "Tempat kemewahan bertemu ketenangan. Temukan pelarian sempurna Anda di destinasi resort kelas dunia kami.",
|
|
1398
|
+
links: ["Beranda", "Kamar", "Kuliner", "Spa", "Acara", "Kontak"],
|
|
1399
|
+
copyright: "© 2025 Paradise Resort. Hak cipta dilindungi. | Kebijakan Privasi | Syarat Penggunaan"
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
const footerData = data || defaultData[variant];
|
|
1403
|
+
switch (variant) {
|
|
1404
|
+
case "stacked":
|
|
1405
|
+
return /*#__PURE__*/React.createElement(StackedFooter, null, /*#__PURE__*/React.createElement(StackedSection, null, /*#__PURE__*/React.createElement(StackedBrand, null, /*#__PURE__*/React.createElement("h2", null, footerData.brandName), /*#__PURE__*/React.createElement("p", null, footerData.brandDesc)), /*#__PURE__*/React.createElement(StackedLinks, null, footerData.linkGroups.map((group, idx) => /*#__PURE__*/React.createElement(LinkGroup, {
|
|
1406
|
+
key: idx
|
|
1407
|
+
}, /*#__PURE__*/React.createElement("h4", null, group.title), group.links.map((link, linkIdx) => {
|
|
1408
|
+
const {
|
|
1409
|
+
label,
|
|
1410
|
+
href
|
|
1411
|
+
} = normalizeLink(link);
|
|
1412
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
1413
|
+
key: linkIdx,
|
|
1414
|
+
href: href
|
|
1415
|
+
}, label);
|
|
1416
|
+
}))))), /*#__PURE__*/React.createElement(StackedBottom, null, /*#__PURE__*/React.createElement("div", null, footerData.copyright), /*#__PURE__*/React.createElement(SocialIcons, null, /*#__PURE__*/React.createElement("a", {
|
|
1417
|
+
href: "#"
|
|
1418
|
+
}, /*#__PURE__*/React.createElement(fa.FaFacebookF, null)), /*#__PURE__*/React.createElement("a", {
|
|
1419
|
+
href: "#"
|
|
1420
|
+
}, /*#__PURE__*/React.createElement(fa.FaInstagram, null)), /*#__PURE__*/React.createElement("a", {
|
|
1421
|
+
href: "#"
|
|
1422
|
+
}, /*#__PURE__*/React.createElement(fa.FaTwitter, null)), /*#__PURE__*/React.createElement("a", {
|
|
1423
|
+
href: "#"
|
|
1424
|
+
}, /*#__PURE__*/React.createElement(fa.FaLinkedin, null)))));
|
|
1425
|
+
case "columns":
|
|
1426
|
+
return /*#__PURE__*/React.createElement(ColumnsFooter, null, /*#__PURE__*/React.createElement(ColumnsGrid, null, /*#__PURE__*/React.createElement(ColumnBox, null, /*#__PURE__*/React.createElement("h3", null, footerData.aboutTitle), /*#__PURE__*/React.createElement("p", null, footerData.aboutDesc), /*#__PURE__*/React.createElement(ContactItem, null, /*#__PURE__*/React.createElement(fa.FaPhone, null), /*#__PURE__*/React.createElement("span", null, footerData.phone)), /*#__PURE__*/React.createElement(ContactItem, null, /*#__PURE__*/React.createElement(fa.FaEnvelope, null), /*#__PURE__*/React.createElement("span", null, footerData.email)), /*#__PURE__*/React.createElement(ContactItem, null, /*#__PURE__*/React.createElement(fa.FaMapMarkerAlt, null), /*#__PURE__*/React.createElement("span", null, footerData.address))), footerData.columns.map((col, idx) => /*#__PURE__*/React.createElement(ColumnBox, {
|
|
1427
|
+
key: idx
|
|
1428
|
+
}, /*#__PURE__*/React.createElement("h3", null, col.title), col.links && col.links.map((link, linkIdx) => {
|
|
1429
|
+
const {
|
|
1430
|
+
label,
|
|
1431
|
+
href
|
|
1432
|
+
} = normalizeLink(link);
|
|
1433
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
1434
|
+
key: linkIdx,
|
|
1435
|
+
href: href
|
|
1436
|
+
}, label);
|
|
1437
|
+
}), col.desc && /*#__PURE__*/React.createElement("p", null, col.desc), idx === footerData.columns.length - 1 && /*#__PURE__*/React.createElement(SocialIcons, {
|
|
1438
|
+
style: {
|
|
1439
|
+
justifyContent: 'flex-start',
|
|
1440
|
+
marginTop: '1.5rem'
|
|
1441
|
+
}
|
|
1442
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
1443
|
+
href: "#"
|
|
1444
|
+
}, /*#__PURE__*/React.createElement(fa.FaFacebookF, null)), /*#__PURE__*/React.createElement("a", {
|
|
1445
|
+
href: "#"
|
|
1446
|
+
}, /*#__PURE__*/React.createElement(fa.FaInstagram, null)), /*#__PURE__*/React.createElement("a", {
|
|
1447
|
+
href: "#"
|
|
1448
|
+
}, /*#__PURE__*/React.createElement(fa.FaTwitter, null)))))), /*#__PURE__*/React.createElement(ColumnsDivider, null, /*#__PURE__*/React.createElement("div", null, "\xA9 2025 Paradise Resort. Hak Cipta Dilindungi."), /*#__PURE__*/React.createElement("div", null, "Dirancang dengan \u2764\uFE0F untuk pengalaman mewah")));
|
|
1449
|
+
case "centered":
|
|
1450
|
+
return /*#__PURE__*/React.createElement(CenteredFooter, null, /*#__PURE__*/React.createElement(CenteredContent, null, /*#__PURE__*/React.createElement(CenteredLogo, null, footerData.logo), /*#__PURE__*/React.createElement(CenteredTagline, null, footerData.tagline), /*#__PURE__*/React.createElement(CenteredNav, null, footerData.links.map((link, idx) => {
|
|
1451
|
+
const {
|
|
1452
|
+
label,
|
|
1453
|
+
href
|
|
1454
|
+
} = normalizeLink(link);
|
|
1455
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
1456
|
+
key: idx,
|
|
1457
|
+
href: href
|
|
1458
|
+
}, label);
|
|
1459
|
+
})), /*#__PURE__*/React.createElement(CenteredSocial, null, /*#__PURE__*/React.createElement("a", {
|
|
1460
|
+
href: "#"
|
|
1461
|
+
}, /*#__PURE__*/React.createElement(fa.FaFacebookF, null)), /*#__PURE__*/React.createElement("a", {
|
|
1462
|
+
href: "#"
|
|
1463
|
+
}, /*#__PURE__*/React.createElement(fa.FaInstagram, null)), /*#__PURE__*/React.createElement("a", {
|
|
1464
|
+
href: "#"
|
|
1465
|
+
}, /*#__PURE__*/React.createElement(fa.FaTwitter, null)), /*#__PURE__*/React.createElement("a", {
|
|
1466
|
+
href: "#"
|
|
1467
|
+
}, /*#__PURE__*/React.createElement(fa.FaLinkedin, null))), /*#__PURE__*/React.createElement(CenteredCopyright, null, footerData.copyright)));
|
|
1468
|
+
default:
|
|
1469
|
+
return null;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
const variantStyles = {
|
|
1474
|
+
compact: {
|
|
1475
|
+
background: "#2c3e50",
|
|
1476
|
+
color: "#ecf0f1",
|
|
1477
|
+
hover: "#34495e",
|
|
1478
|
+
title: "Menu"
|
|
1479
|
+
},
|
|
1480
|
+
expanded: {
|
|
1481
|
+
background: "linear-gradient(180deg, #232526 0%, #414345 100%)",
|
|
1482
|
+
color: "#fff",
|
|
1483
|
+
hover: "rgba(255,255,255,0.1)",
|
|
1484
|
+
title: "Navigation"
|
|
1485
|
+
},
|
|
1486
|
+
floating: {
|
|
1487
|
+
background: "rgba(255, 255, 255, 0.95)",
|
|
1488
|
+
color: "#2c3e50",
|
|
1489
|
+
hover: "#f0f0f0",
|
|
1490
|
+
title: "Components"
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
// Default icons mapping
|
|
1495
|
+
const defaultIcons = {
|
|
1496
|
+
header: /*#__PURE__*/React.createElement(fa.FaHome, null),
|
|
1497
|
+
card: /*#__PURE__*/React.createElement(fa.FaBed, null),
|
|
1498
|
+
button: /*#__PURE__*/React.createElement(fa.FaConciergeBell, null),
|
|
1499
|
+
footer: /*#__PURE__*/React.createElement(fa.FaInfoCircle, null),
|
|
1500
|
+
sidebar: /*#__PURE__*/React.createElement(fa.FaUser, null)
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1503
|
+
// Default items fallback
|
|
1504
|
+
const defaultItems = [{
|
|
1505
|
+
name: "Header",
|
|
1506
|
+
href: "#",
|
|
1507
|
+
icon: /*#__PURE__*/React.createElement(fa.FaHome, null)
|
|
1508
|
+
}, {
|
|
1509
|
+
name: "Card",
|
|
1510
|
+
href: "#",
|
|
1511
|
+
icon: /*#__PURE__*/React.createElement(fa.FaBed, null)
|
|
1512
|
+
}, {
|
|
1513
|
+
name: "Button",
|
|
1514
|
+
href: "#",
|
|
1515
|
+
icon: /*#__PURE__*/React.createElement(fa.FaConciergeBell, null)
|
|
1516
|
+
}, {
|
|
1517
|
+
name: "Footer",
|
|
1518
|
+
href: "#",
|
|
1519
|
+
icon: /*#__PURE__*/React.createElement(fa.FaInfoCircle, null)
|
|
1520
|
+
}, {
|
|
1521
|
+
name: "Sidebar",
|
|
1522
|
+
href: "#",
|
|
1523
|
+
icon: /*#__PURE__*/React.createElement(fa.FaUser, null)
|
|
1524
|
+
}];
|
|
1525
|
+
const CompactSidebar = styled.aside`
|
|
1526
|
+
font-family: "Inter", sans-serif;
|
|
1527
|
+
background: ${variantStyles.compact.background};
|
|
1528
|
+
color: ${variantStyles.compact.color};
|
|
1529
|
+
width: 70px;
|
|
1530
|
+
min-height: 100vh;
|
|
1531
|
+
display: flex;
|
|
1532
|
+
flex-direction: column;
|
|
1533
|
+
align-items: center;
|
|
1534
|
+
padding: 1.5rem 0;
|
|
1535
|
+
gap: 0.5rem;
|
|
1536
|
+
position: sticky;
|
|
1537
|
+
top: 0;
|
|
1538
|
+
border-right: 3px solid #3498db;
|
|
1539
|
+
|
|
1540
|
+
@media (max-width: 768px) {
|
|
1541
|
+
min-height: auto;
|
|
1542
|
+
height: 100%;
|
|
1543
|
+
padding: 1rem 0;
|
|
1544
|
+
}
|
|
1545
|
+
`;
|
|
1546
|
+
const CompactTitle = styled.div`
|
|
1547
|
+
writing-mode: vertical-rl;
|
|
1548
|
+
text-orientation: mixed;
|
|
1549
|
+
font-weight: 800;
|
|
1550
|
+
font-size: 1.1rem;
|
|
1551
|
+
margin-bottom: 2rem;
|
|
1552
|
+
letter-spacing: 2px;
|
|
1553
|
+
color: #3498db;
|
|
1554
|
+
|
|
1555
|
+
@media (max-width: 768px) {
|
|
1556
|
+
font-size: 0.9rem;
|
|
1557
|
+
margin-bottom: 1.5rem;
|
|
1558
|
+
}
|
|
1559
|
+
`;
|
|
1560
|
+
const CompactItemLink = styled(Link)`
|
|
1561
|
+
width: 50px;
|
|
1562
|
+
height: 50px;
|
|
1563
|
+
display: flex;
|
|
1564
|
+
align-items: center;
|
|
1565
|
+
justify-content: center;
|
|
1566
|
+
background: none;
|
|
1567
|
+
border: none;
|
|
1568
|
+
color: inherit;
|
|
1569
|
+
border-radius: 12px;
|
|
1570
|
+
cursor: pointer;
|
|
1571
|
+
transition: all 0.3s ease;
|
|
1572
|
+
position: relative;
|
|
1573
|
+
text-decoration: none;
|
|
1574
|
+
|
|
1575
|
+
svg {
|
|
1576
|
+
font-size: 22px;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
&:hover {
|
|
1580
|
+
background: ${variantStyles.compact.hover};
|
|
1581
|
+
transform: scale(1.1);
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
&::after {
|
|
1585
|
+
content: attr(data-label);
|
|
1586
|
+
position: absolute;
|
|
1587
|
+
left: 70px;
|
|
1588
|
+
background: #2c3e50;
|
|
1589
|
+
color: white;
|
|
1590
|
+
padding: 0.5rem 1rem;
|
|
1591
|
+
border-radius: 6px;
|
|
1592
|
+
font-size: 14px;
|
|
1593
|
+
white-space: nowrap;
|
|
1594
|
+
opacity: 0;
|
|
1595
|
+
pointer-events: none;
|
|
1596
|
+
transition: opacity 0.3s;
|
|
1597
|
+
z-index: 1000;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
&:hover::after {
|
|
1601
|
+
opacity: 1;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
@media (max-width: 768px) {
|
|
1605
|
+
width: 40px;
|
|
1606
|
+
height: 40px;
|
|
1607
|
+
|
|
1608
|
+
svg {
|
|
1609
|
+
font-size: 18px;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
&::after {
|
|
1613
|
+
display: none;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
`;
|
|
1617
|
+
const CompactItemButton = styled.button`
|
|
1618
|
+
width: 50px;
|
|
1619
|
+
height: 50px;
|
|
1620
|
+
display: flex;
|
|
1621
|
+
align-items: center;
|
|
1622
|
+
justify-content: center;
|
|
1623
|
+
background: none;
|
|
1624
|
+
border: none;
|
|
1625
|
+
color: inherit;
|
|
1626
|
+
border-radius: 12px;
|
|
1627
|
+
cursor: pointer;
|
|
1628
|
+
transition: all 0.3s ease;
|
|
1629
|
+
position: relative;
|
|
1630
|
+
|
|
1631
|
+
svg {
|
|
1632
|
+
font-size: 22px;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
&:hover {
|
|
1636
|
+
background: ${variantStyles.compact.hover};
|
|
1637
|
+
transform: scale(1.1);
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
&::after {
|
|
1641
|
+
content: attr(data-label);
|
|
1642
|
+
position: absolute;
|
|
1643
|
+
left: 70px;
|
|
1644
|
+
background: #2c3e50;
|
|
1645
|
+
color: white;
|
|
1646
|
+
padding: 0.5rem 1rem;
|
|
1647
|
+
border-radius: 6px;
|
|
1648
|
+
font-size: 14px;
|
|
1649
|
+
white-space: nowrap;
|
|
1650
|
+
opacity: 0;
|
|
1651
|
+
pointer-events: none;
|
|
1652
|
+
transition: opacity 0.3s;
|
|
1653
|
+
z-index: 1000;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
&:hover::after {
|
|
1657
|
+
opacity: 1;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
@media (max-width: 768px) {
|
|
1661
|
+
width: 40px;
|
|
1662
|
+
height: 40px;
|
|
1663
|
+
|
|
1664
|
+
svg {
|
|
1665
|
+
font-size: 18px;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
&::after {
|
|
1669
|
+
display: none;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
`;
|
|
1673
|
+
const ExpandedSidebar = styled.aside`
|
|
1674
|
+
font-family: "Poppins", sans-serif;
|
|
1675
|
+
background: ${variantStyles.expanded.background};
|
|
1676
|
+
color: ${variantStyles.expanded.color};
|
|
1677
|
+
width: 260px;
|
|
1678
|
+
min-height: 100vh;
|
|
1679
|
+
padding: 2rem 1rem;
|
|
1680
|
+
display: flex;
|
|
1681
|
+
flex-direction: column;
|
|
1682
|
+
gap: 0.3rem;
|
|
1683
|
+
position: sticky;
|
|
1684
|
+
top: 0;
|
|
1685
|
+
box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
|
|
1686
|
+
|
|
1687
|
+
@media (max-width: 400px) {
|
|
1688
|
+
width: 100%;
|
|
1689
|
+
min-height: auto;
|
|
1690
|
+
}
|
|
1691
|
+
`;
|
|
1692
|
+
const ExpandedTitle = styled.h2`
|
|
1693
|
+
font-size: 1.5rem;
|
|
1694
|
+
font-weight: 800;
|
|
1695
|
+
margin: 0 0 2rem 1rem;
|
|
1696
|
+
letter-spacing: 1px;
|
|
1697
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1698
|
+
-webkit-background-clip: text;
|
|
1699
|
+
-webkit-text-fill-color: transparent;
|
|
1700
|
+
background-clip: text;
|
|
1701
|
+
`;
|
|
1702
|
+
const ExpandedSection = styled.div`
|
|
1703
|
+
margin-bottom: 1.5rem;
|
|
1704
|
+
`;
|
|
1705
|
+
const SectionLabel = styled.div`
|
|
1706
|
+
font-size: 11px;
|
|
1707
|
+
text-transform: uppercase;
|
|
1708
|
+
letter-spacing: 1.5px;
|
|
1709
|
+
opacity: 0.5;
|
|
1710
|
+
margin: 1rem 0 0.5rem 1rem;
|
|
1711
|
+
font-weight: 700;
|
|
1712
|
+
`;
|
|
1713
|
+
const ExpandedItemLink = styled(Link)`
|
|
1714
|
+
width: 100%;
|
|
1715
|
+
display: flex;
|
|
1716
|
+
align-items: center;
|
|
1717
|
+
justify-content: space-between;
|
|
1718
|
+
padding: 0.9rem 1.2rem;
|
|
1719
|
+
background: none;
|
|
1720
|
+
border: none;
|
|
1721
|
+
color: inherit;
|
|
1722
|
+
border-radius: 12px;
|
|
1723
|
+
cursor: pointer;
|
|
1724
|
+
transition: all 0.3s ease;
|
|
1725
|
+
font-size: 15px;
|
|
1726
|
+
font-weight: 500;
|
|
1727
|
+
position: relative;
|
|
1728
|
+
overflow: hidden;
|
|
1729
|
+
text-decoration: none;
|
|
1730
|
+
|
|
1731
|
+
&::before {
|
|
1732
|
+
content: "";
|
|
1733
|
+
position: absolute;
|
|
1734
|
+
left: 0;
|
|
1735
|
+
top: 0;
|
|
1736
|
+
height: 100%;
|
|
1737
|
+
width: 4px;
|
|
1738
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1739
|
+
opacity: 0;
|
|
1740
|
+
transition: opacity 0.3s;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
&:hover::before {
|
|
1744
|
+
opacity: 1;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
&:hover {
|
|
1748
|
+
background: ${variantStyles.expanded.hover};
|
|
1749
|
+
transform: translateX(5px);
|
|
1750
|
+
}
|
|
1751
|
+
`;
|
|
1752
|
+
const ExpandedItemButton = styled.button`
|
|
1753
|
+
width: 100%;
|
|
1754
|
+
display: flex;
|
|
1755
|
+
align-items: center;
|
|
1756
|
+
justify-content: space-between;
|
|
1757
|
+
padding: 0.9rem 1.2rem;
|
|
1758
|
+
background: none;
|
|
1759
|
+
border: none;
|
|
1760
|
+
color: inherit;
|
|
1761
|
+
border-radius: 12px;
|
|
1762
|
+
cursor: pointer;
|
|
1763
|
+
transition: all 0.3s ease;
|
|
1764
|
+
font-size: 15px;
|
|
1765
|
+
font-weight: 500;
|
|
1766
|
+
position: relative;
|
|
1767
|
+
overflow: hidden;
|
|
1768
|
+
|
|
1769
|
+
&::before {
|
|
1770
|
+
content: "";
|
|
1771
|
+
position: absolute;
|
|
1772
|
+
left: 0;
|
|
1773
|
+
top: 0;
|
|
1774
|
+
height: 100%;
|
|
1775
|
+
width: 4px;
|
|
1776
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1777
|
+
opacity: 0;
|
|
1778
|
+
transition: opacity 0.3s;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
&:hover::before {
|
|
1782
|
+
opacity: 1;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
&:hover {
|
|
1786
|
+
background: ${variantStyles.expanded.hover};
|
|
1787
|
+
transform: translateX(5px);
|
|
1788
|
+
}
|
|
1789
|
+
`;
|
|
1790
|
+
const ItemLeft = styled.div`
|
|
1791
|
+
display: flex;
|
|
1792
|
+
align-items: center;
|
|
1793
|
+
gap: 1rem;
|
|
1794
|
+
|
|
1795
|
+
svg {
|
|
1796
|
+
font-size: 18px;
|
|
1797
|
+
opacity: 0.8;
|
|
1798
|
+
}
|
|
1799
|
+
`;
|
|
1800
|
+
const FloatingSidebar = styled.aside`
|
|
1801
|
+
font-family: "Poppins", sans-serif;
|
|
1802
|
+
background: ${variantStyles.floating.background};
|
|
1803
|
+
color: ${variantStyles.floating.color};
|
|
1804
|
+
width: 240px;
|
|
1805
|
+
min-height: calc(100vh - 40px);
|
|
1806
|
+
margin: 20px;
|
|
1807
|
+
padding: 2rem 0.8rem;
|
|
1808
|
+
display: flex;
|
|
1809
|
+
flex-direction: column;
|
|
1810
|
+
gap: 0.5rem;
|
|
1811
|
+
position: sticky;
|
|
1812
|
+
top: 20px;
|
|
1813
|
+
border-radius: 24px;
|
|
1814
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
|
|
1815
|
+
border: 1px solid rgba(0, 0, 0, 0.05);
|
|
1816
|
+
|
|
1817
|
+
@media (max-width: 400px) {
|
|
1818
|
+
width: calc(100% - 40px);
|
|
1819
|
+
}
|
|
1820
|
+
`;
|
|
1821
|
+
const FloatingTitle = styled.h3`
|
|
1822
|
+
font-size: 1.2rem;
|
|
1823
|
+
font-weight: 700;
|
|
1824
|
+
margin: 0 0 1.5rem 1rem;
|
|
1825
|
+
color: #2c3e50;
|
|
1826
|
+
`;
|
|
1827
|
+
const FloatingItemLink = styled(Link)`
|
|
1828
|
+
width: 100%;
|
|
1829
|
+
display: flex;
|
|
1830
|
+
align-items: center;
|
|
1831
|
+
gap: 1rem;
|
|
1832
|
+
padding: 1rem 1.2rem;
|
|
1833
|
+
background: none;
|
|
1834
|
+
border: none;
|
|
1835
|
+
color: inherit;
|
|
1836
|
+
border-radius: 14px;
|
|
1837
|
+
cursor: pointer;
|
|
1838
|
+
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
1839
|
+
font-size: 15px;
|
|
1840
|
+
font-weight: 600;
|
|
1841
|
+
text-decoration: none;
|
|
1842
|
+
|
|
1843
|
+
svg {
|
|
1844
|
+
font-size: 20px;
|
|
1845
|
+
padding: 8px;
|
|
1846
|
+
background: linear-gradient(135deg, #667eea20, #764ba220);
|
|
1847
|
+
border-radius: 10px;
|
|
1848
|
+
color: #667eea;
|
|
1849
|
+
transition: all 0.3s;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
&:hover {
|
|
1853
|
+
background: ${variantStyles.floating.hover};
|
|
1854
|
+
transform: scale(1.05);
|
|
1855
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
&:hover svg {
|
|
1859
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1860
|
+
color: white;
|
|
1861
|
+
transform: rotate(10deg);
|
|
1862
|
+
}
|
|
1863
|
+
`;
|
|
1864
|
+
const FloatingItemButton = styled.button`
|
|
1865
|
+
width: 100%;
|
|
1866
|
+
display: flex;
|
|
1867
|
+
align-items: center;
|
|
1868
|
+
gap: 1rem;
|
|
1869
|
+
padding: 1rem 1.2rem;
|
|
1870
|
+
background: none;
|
|
1871
|
+
border: none;
|
|
1872
|
+
color: inherit;
|
|
1873
|
+
border-radius: 14px;
|
|
1874
|
+
cursor: pointer;
|
|
1875
|
+
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
1876
|
+
font-size: 15px;
|
|
1877
|
+
font-weight: 600;
|
|
1878
|
+
|
|
1879
|
+
svg {
|
|
1880
|
+
font-size: 20px;
|
|
1881
|
+
padding: 8px;
|
|
1882
|
+
background: linear-gradient(135deg, #667eea20, #764ba220);
|
|
1883
|
+
border-radius: 10px;
|
|
1884
|
+
color: #667eea;
|
|
1885
|
+
transition: all 0.3s;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
&:hover {
|
|
1889
|
+
background: ${variantStyles.floating.hover};
|
|
1890
|
+
transform: scale(1.05);
|
|
1891
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
&:hover svg {
|
|
1895
|
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
1896
|
+
color: white;
|
|
1897
|
+
transform: rotate(10deg);
|
|
1898
|
+
}
|
|
1899
|
+
`;
|
|
1900
|
+
|
|
1901
|
+
// Helper function to get icon for an item
|
|
1902
|
+
const getItemIcon = item => {
|
|
1903
|
+
if (item.icon) return item.icon;
|
|
1904
|
+
const name = (item.name || item.label || "").toLowerCase();
|
|
1905
|
+
return defaultIcons[name] || /*#__PURE__*/React.createElement(fa.FaHome, null);
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
// Helper function to get item display name
|
|
1909
|
+
const getItemName = item => {
|
|
1910
|
+
return item.name || item.label || "Menu";
|
|
1911
|
+
};
|
|
1912
|
+
function SidebarVariant({
|
|
1913
|
+
variant = "compact",
|
|
1914
|
+
items,
|
|
1915
|
+
onSelect,
|
|
1916
|
+
title
|
|
1917
|
+
}) {
|
|
1918
|
+
// Use provided items or fallback to defaults
|
|
1919
|
+
const menuItems = items && items.length > 0 ? items : defaultItems;
|
|
1920
|
+
|
|
1921
|
+
// Get title based on variant or use custom title
|
|
1922
|
+
const sidebarTitle = title || variantStyles[variant]?.title || "Menu";
|
|
1923
|
+
const renderCompactItem = (item, index) => {
|
|
1924
|
+
const icon = getItemIcon(item);
|
|
1925
|
+
const name = getItemName(item);
|
|
1926
|
+
const hasHref = item.href && item.href !== "";
|
|
1927
|
+
if (hasHref) {
|
|
1928
|
+
return /*#__PURE__*/React.createElement(CompactItemLink, {
|
|
1929
|
+
key: item.name || item.label || index,
|
|
1930
|
+
href: item.href,
|
|
1931
|
+
"data-label": name,
|
|
1932
|
+
onClick: () => onSelect?.(name.toLowerCase())
|
|
1933
|
+
}, icon);
|
|
1934
|
+
}
|
|
1935
|
+
return /*#__PURE__*/React.createElement(CompactItemButton, {
|
|
1936
|
+
key: item.name || item.label || index,
|
|
1937
|
+
"data-label": name,
|
|
1938
|
+
onClick: () => onSelect?.(name.toLowerCase())
|
|
1939
|
+
}, icon);
|
|
1940
|
+
};
|
|
1941
|
+
const renderExpandedItem = (item, index) => {
|
|
1942
|
+
const icon = getItemIcon(item);
|
|
1943
|
+
const name = getItemName(item);
|
|
1944
|
+
const hasHref = item.href && item.href !== "";
|
|
1945
|
+
if (hasHref) {
|
|
1946
|
+
return /*#__PURE__*/React.createElement(ExpandedItemLink, {
|
|
1947
|
+
key: item.name || item.label || index,
|
|
1948
|
+
href: item.href,
|
|
1949
|
+
onClick: () => onSelect?.(name.toLowerCase())
|
|
1950
|
+
}, /*#__PURE__*/React.createElement(ItemLeft, null, icon, /*#__PURE__*/React.createElement("span", null, name)), /*#__PURE__*/React.createElement(fa.FaChevronRight, {
|
|
1951
|
+
size: 14,
|
|
1952
|
+
style: {
|
|
1953
|
+
opacity: 0.5
|
|
1954
|
+
}
|
|
1955
|
+
}));
|
|
1956
|
+
}
|
|
1957
|
+
return /*#__PURE__*/React.createElement(ExpandedItemButton, {
|
|
1958
|
+
key: item.name || item.label || index,
|
|
1959
|
+
onClick: () => onSelect?.(name.toLowerCase())
|
|
1960
|
+
}, /*#__PURE__*/React.createElement(ItemLeft, null, icon, /*#__PURE__*/React.createElement("span", null, name)), /*#__PURE__*/React.createElement(fa.FaChevronRight, {
|
|
1961
|
+
size: 14,
|
|
1962
|
+
style: {
|
|
1963
|
+
opacity: 0.5
|
|
1964
|
+
}
|
|
1965
|
+
}));
|
|
1966
|
+
};
|
|
1967
|
+
const renderFloatingItem = (item, index) => {
|
|
1968
|
+
const icon = getItemIcon(item);
|
|
1969
|
+
const name = getItemName(item);
|
|
1970
|
+
const hasHref = item.href && item.href !== "";
|
|
1971
|
+
if (hasHref) {
|
|
1972
|
+
return /*#__PURE__*/React.createElement(FloatingItemLink, {
|
|
1973
|
+
key: item.name || item.label || index,
|
|
1974
|
+
href: item.href,
|
|
1975
|
+
onClick: () => onSelect?.(name.toLowerCase())
|
|
1976
|
+
}, icon, /*#__PURE__*/React.createElement("span", null, name));
|
|
1977
|
+
}
|
|
1978
|
+
return /*#__PURE__*/React.createElement(FloatingItemButton, {
|
|
1979
|
+
key: item.name || item.label || index,
|
|
1980
|
+
onClick: () => onSelect?.(name.toLowerCase())
|
|
1981
|
+
}, icon, /*#__PURE__*/React.createElement("span", null, name));
|
|
1982
|
+
};
|
|
1983
|
+
switch (variant) {
|
|
1984
|
+
case "compact":
|
|
1985
|
+
return /*#__PURE__*/React.createElement(CompactSidebar, null, /*#__PURE__*/React.createElement(CompactTitle, null, sidebarTitle), menuItems.map((item, index) => renderCompactItem(item, index)));
|
|
1986
|
+
case "expanded":
|
|
1987
|
+
return /*#__PURE__*/React.createElement(ExpandedSidebar, null, /*#__PURE__*/React.createElement(ExpandedTitle, null, sidebarTitle), /*#__PURE__*/React.createElement(ExpandedSection, null, /*#__PURE__*/React.createElement(SectionLabel, null, "Components"), menuItems.map((item, index) => renderExpandedItem(item, index))));
|
|
1988
|
+
case "floating":
|
|
1989
|
+
return /*#__PURE__*/React.createElement(FloatingSidebar, null, /*#__PURE__*/React.createElement(FloatingTitle, null, sidebarTitle), menuItems.map((item, index) => renderFloatingItem(item, index)));
|
|
1990
|
+
default:
|
|
1991
|
+
return null;
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
exports.ButtonVariant = ButtonVariant;
|
|
1996
|
+
exports.CardVariant = CardVariant;
|
|
1997
|
+
exports.FooterVariant = FooterVariant;
|
|
1998
|
+
exports.HeaderVariant = HeaderVariant;
|
|
1999
|
+
exports.SidebarVariant = SidebarVariant;
|